:: RELAT_1 semantic presentation

definition
let c1 be set ;
attr a1 is Relation-like means :Def1: :: RELAT_1:def 1
for b1 being set st b1 in a1 holds
ex b2, b3 being set st b1 = [b2,b3];
end;

:: deftheorem Def1 defines Relation-like RELAT_1:def 1 :
for b1 being set holds
( b1 is Relation-like iff for b2 being set st b2 in b1 holds
ex b3, b4 being set st b2 = [b3,b4] );

registration
cluster empty Relation-like set ;
existence
ex b1 being set st
( b1 is Relation-like & b1 is empty )
proof end;
end;

definition
mode Relation is Relation-like set ;
end;

theorem Th1: :: RELAT_1:1
canceled;

theorem Th2: :: RELAT_1:2
canceled;

theorem Th3: :: RELAT_1:3
for b1 being set
for b2 being Relation st b1 c= b2 holds
b1 is Relation-like
proof end;

theorem Th4: :: RELAT_1:4
for b1, b2 being set holds {[b1,b2]} is Relation-like
proof end;

theorem Th5: :: RELAT_1:5
for b1, b2, b3, b4 being set holds {[b1,b2],[b3,b4]} is Relation-like
proof end;

theorem Th6: :: RELAT_1:6
for b1, b2 being set holds [:b1,b2:] is Relation-like
proof end;

scheme :: RELAT_1:sch 1
s1{ F1() -> set , F2() -> set , P1[ set , set ] } :
ex b1 being Relation st
for b2, b3 being set holds
( [b2,b3] in b1 iff ( b2 in F1() & b3 in F2() & P1[b2,b3] ) )
proof end;

Lemma4: for b1, b2 being set
for b3 being Relation st [b1,b2] in b3 holds
( b1 in union (union b3) & b2 in union (union b3) )
proof end;

definition
let c1, c2 be Relation;
redefine pred c1 = c2 means :Def2: :: RELAT_1:def 2
for b1, b2 being set holds
( [b1,b2] in a1 iff [b1,b2] in a2 );
compatibility
( c1 = c2 iff for b1, b2 being set holds
( [b1,b2] in c1 iff [b1,b2] in c2 ) )
proof end;
end;

:: deftheorem Def2 defines = RELAT_1:def 2 :
for b1, b2 being Relation holds
( b1 = b2 iff for b3, b4 being set holds
( [b3,b4] in b1 iff [b3,b4] in b2 ) );

registration
let c1, c2 be Relation;
cluster a1 /\ a2 -> Relation-like ;
coherence
c1 /\ c2 is Relation-like
proof end;
cluster a1 \/ a2 -> Relation-like ;
coherence
c1 \/ c2 is Relation-like
proof end;
cluster a1 \ a2 -> Relation-like ;
coherence
c1 \ c2 is Relation-like
proof end;
end;

definition
let c1, c2 be Relation;
redefine pred c1 c= c2 means :Def3: :: RELAT_1:def 3
for b1, b2 being set st [b1,b2] in a1 holds
[b1,b2] in a2;
compatibility
( c1 c= c2 iff for b1, b2 being set st [b1,b2] in c1 holds
[b1,b2] in c2 )
proof end;
end;

:: deftheorem Def3 defines c= RELAT_1:def 3 :
for b1, b2 being Relation holds
( b1 c= b2 iff for b3, b4 being set st [b3,b4] in b1 holds
[b3,b4] in b2 );

theorem Th7: :: RELAT_1:7
canceled;

theorem Th8: :: RELAT_1:8
canceled;

theorem Th9: :: RELAT_1:9
for b1 being set
for b2 being Relation holds b1 /\ b2 is Relation
proof end;

theorem Th10: :: RELAT_1:10
for b1 being set
for b2 being Relation holds b2 \ b1 is Relation
proof end;

definition
let c1 be Relation;
func dom c1 -> set means :Def4: :: RELAT_1:def 4
for b1 being set holds
( b1 in a2 iff ex b2 being set st [b1,b2] in a1 );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being set st [b2,b3] in c1 )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being set st [b3,b4] in c1 ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set st [b3,b4] in c1 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines dom RELAT_1:def 4 :
for b1 being Relation
for b2 being set holds
( b2 = dom b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being set st [b3,b4] in b1 ) );

theorem Th11: :: RELAT_1:11
canceled;

theorem Th12: :: RELAT_1:12
canceled;

theorem Th13: :: RELAT_1:13
for b1, b2 being Relation holds dom (b1 \/ b2) = (dom b1) \/ (dom b2)
proof end;

theorem Th14: :: RELAT_1:14
for b1, b2 being Relation holds dom (b1 /\ b2) c= (dom b1) /\ (dom b2)
proof end;

theorem Th15: :: RELAT_1:15
for b1, b2 being Relation holds (dom b1) \ (dom b2) c= dom (b1 \ b2)
proof end;

definition
let c1 be Relation;
func rng c1 -> set means :Def5: :: RELAT_1:def 5
for b1 being set holds
( b1 in a2 iff ex b2 being set st [b2,b1] in a1 );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being set st [b3,b2] in c1 )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being set st [b4,b3] in c1 ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set st [b4,b3] in c1 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines rng RELAT_1:def 5 :
for b1 being Relation
for b2 being set holds
( b2 = rng b1 iff for b3 being set holds
( b3 in b2 iff ex b4 being set st [b4,b3] in b1 ) );

theorem Th16: :: RELAT_1:16
canceled;

theorem Th17: :: RELAT_1:17
canceled;

theorem Th18: :: RELAT_1:18
for b1 being set
for b2 being Relation st b1 in dom b2 holds
ex b3 being set st b3 in rng b2
proof end;

theorem Th19: :: RELAT_1:19
for b1 being set
for b2 being Relation st b1 in rng b2 holds
ex b3 being set st b3 in dom b2
proof end;

theorem Th20: :: RELAT_1:20
for b1, b2 being set
for b3 being Relation st [b1,b2] in b3 holds
( b1 in dom b3 & b2 in rng b3 ) by Def4, Def5;

theorem Th21: :: RELAT_1:21
for b1 being Relation holds b1 c= [:(dom b1),(rng b1):]
proof end;

theorem Th22: :: RELAT_1:22
for b1 being Relation holds b1 /\ [:(dom b1),(rng b1):] = b1
proof end;

theorem Th23: :: RELAT_1:23
for b1, b2 being set
for b3 being Relation st b3 = {[b1,b2]} holds
( dom b3 = {b1} & rng b3 = {b2} )
proof end;

theorem Th24: :: RELAT_1:24
for b1, b2, b3, b4 being set
for b5 being Relation st b5 = {[b1,b2],[b3,b4]} holds
( dom b5 = {b1,b3} & rng b5 = {b2,b4} )
proof end;

theorem Th25: :: RELAT_1:25
for b1, b2 being Relation st b1 c= b2 holds
( dom b1 c= dom b2 & rng b1 c= rng b2 )
proof end;

theorem Th26: :: RELAT_1:26
for b1, b2 being Relation holds rng (b1 \/ b2) = (rng b1) \/ (rng b2)
proof end;

theorem Th27: :: RELAT_1:27
for b1, b2 being Relation holds rng (b1 /\ b2) c= (rng b1) /\ (rng b2)
proof end;

theorem Th28: :: RELAT_1:28
for b1, b2 being Relation holds (rng b1) \ (rng b2) c= rng (b1 \ b2)
proof end;

definition
let c1 be Relation;
func field c1 -> set equals :: RELAT_1:def 6
(dom a1) \/ (rng a1);
correctness
coherence
(dom c1) \/ (rng c1) is set
;
;
end;

:: deftheorem Def6 defines field RELAT_1:def 6 :
for b1 being Relation holds field b1 = (dom b1) \/ (rng b1);

theorem Th29: :: RELAT_1:29
for b1 being Relation holds
( dom b1 c= field b1 & rng b1 c= field b1 ) by XBOOLE_1:7;

theorem Th30: :: RELAT_1:30
for b1, b2 being set
for b3 being Relation st [b1,b2] in b3 holds
( b1 in field b3 & b2 in field b3 )
proof end;

theorem Th31: :: RELAT_1:31
for b1, b2 being Relation st b1 c= b2 holds
field b1 c= field b2
proof end;

theorem Th32: :: RELAT_1:32
for b1, b2 being set
for b3 being Relation st b3 = {[b1,b2]} holds
field b3 = {b1,b2}
proof end;

theorem Th33: :: RELAT_1:33
for b1, b2 being Relation holds field (b1 \/ b2) = (field b1) \/ (field b2)
proof end;

theorem Th34: :: RELAT_1:34
for b1, b2 being Relation holds field (b1 /\ b2) c= (field b1) /\ (field b2)
proof end;

definition
let c1 be Relation;
func c1 ~ -> Relation means :Def7: :: RELAT_1:def 7
for b1, b2 being set holds
( [b1,b2] in a2 iff [b2,b1] in a1 );
existence
ex b1 being Relation st
for b2, b3 being set holds
( [b2,b3] in b1 iff [b3,b2] in c1 )
proof end;
uniqueness
for b1, b2 being Relation st ( for b3, b4 being set holds
( [b3,b4] in b1 iff [b4,b3] in c1 ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff [b4,b3] in c1 ) ) holds
b1 = b2
proof end;
involutiveness
for b1, b2 being Relation st ( for b3, b4 being set holds
( [b3,b4] in b1 iff [b4,b3] in b2 ) ) holds
for b3, b4 being set holds
( [b3,b4] in b2 iff [b4,b3] in b1 )
;
end;

:: deftheorem Def7 defines ~ RELAT_1:def 7 :
for b1, b2 being Relation holds
( b2 = b1 ~ iff for b3, b4 being set holds
( [b3,b4] in b2 iff [b4,b3] in b1 ) );

theorem Th35: :: RELAT_1:35
canceled;

theorem Th36: :: RELAT_1:36
canceled;

theorem Th37: :: RELAT_1:37
for b1 being Relation holds
( rng b1 = dom (b1 ~ ) & dom b1 = rng (b1 ~ ) )
proof end;

theorem Th38: :: RELAT_1:38
for b1 being Relation holds field b1 = field (b1 ~ )
proof end;

theorem Th39: :: RELAT_1:39
for b1, b2 being Relation holds (b1 /\ b2) ~ = (b1 ~ ) /\ (b2 ~ )
proof end;

theorem Th40: :: RELAT_1:40
for b1, b2 being Relation holds (b1 \/ b2) ~ = (b1 ~ ) \/ (b2 ~ )
proof end;

theorem Th41: :: RELAT_1:41
for b1, b2 being Relation holds (b1 \ b2) ~ = (b1 ~ ) \ (b2 ~ )
proof end;

definition
let c1, c2 be Relation;
func c1 * c2 -> Relation means :Def8: :: RELAT_1:def 8
for b1, b2 being set holds
( [b1,b2] in a3 iff ex b3 being set st
( [b1,b3] in a1 & [b3,b2] in a2 ) );
existence
ex b1 being Relation st
for b2, b3 being set holds
( [b2,b3] in b1 iff ex b4 being set st
( [b2,b4] in c1 & [b4,b3] in c2 ) )
proof end;
uniqueness
for b1, b2 being Relation st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ex b5 being set st
( [b3,b5] in c1 & [b5,b4] in c2 ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ex b5 being set st
( [b3,b5] in c1 & [b5,b4] in c2 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def8 defines * RELAT_1:def 8 :
for b1, b2, b3 being Relation holds
( b3 = b1 * b2 iff for b4, b5 being set holds
( [b4,b5] in b3 iff ex b6 being set st
( [b4,b6] in b1 & [b6,b5] in b2 ) ) );

theorem Th42: :: RELAT_1:42
canceled;

theorem Th43: :: RELAT_1:43
canceled;

theorem Th44: :: RELAT_1:44
for b1, b2 being Relation holds dom (b1 * b2) c= dom b1
proof end;

theorem Th45: :: RELAT_1:45
for b1, b2 being Relation holds rng (b1 * b2) c= rng b2
proof end;

theorem Th46: :: RELAT_1:46
for b1, b2 being Relation st rng b1 c= dom b2 holds
dom (b1 * b2) = dom b1
proof end;

theorem Th47: :: RELAT_1:47
for b1, b2 being Relation st dom b1 c= rng b2 holds
rng (b2 * b1) = rng b1
proof end;

theorem Th48: :: RELAT_1:48
for b1, b2, b3 being Relation st b1 c= b2 holds
b3 * b1 c= b3 * b2
proof end;

theorem Th49: :: RELAT_1:49
for b1, b2, b3 being Relation st b1 c= b2 holds
b1 * b3 c= b2 * b3
proof end;

theorem Th50: :: RELAT_1:50
for b1, b2, b3, b4 being Relation st b1 c= b2 & b3 c= b4 holds
b1 * b3 c= b2 * b4
proof end;

theorem Th51: :: RELAT_1:51
for b1, b2, b3 being Relation holds b1 * (b2 \/ b3) = (b1 * b2) \/ (b1 * b3)
proof end;

theorem Th52: :: RELAT_1:52
for b1, b2, b3 being Relation holds b1 * (b2 /\ b3) c= (b1 * b2) /\ (b1 * b3)
proof end;

theorem Th53: :: RELAT_1:53
for b1, b2, b3 being Relation holds (b1 * b2) \ (b1 * b3) c= b1 * (b2 \ b3)
proof end;

theorem Th54: :: RELAT_1:54
for b1, b2 being Relation holds (b1 * b2) ~ = (b2 ~ ) * (b1 ~ )
proof end;

theorem Th55: :: RELAT_1:55
for b1, b2, b3 being Relation holds (b1 * b2) * b3 = b1 * (b2 * b3)
proof end;

registration
cluster empty -> Relation-like set ;
coherence
for b1 being set st b1 is empty holds
b1 is Relation-like
proof end;
end;

registration
cluster {} -> Relation-like ;
coherence
{} is Relation-like
;
end;

registration
cluster non empty set ;
existence
not for b1 being Relation holds b1 is empty
proof end;
end;

registration
let c1 be non empty Relation;
cluster dom a1 -> non empty ;
coherence
not dom c1 is empty
proof end;
cluster rng a1 -> non empty ;
coherence
not rng c1 is empty
proof end;
end;

theorem Th56: :: RELAT_1:56
for b1 being Relation st ( for b2, b3 being set holds not [b2,b3] in b1 ) holds
b1 = {}
proof end;

theorem Th57: :: RELAT_1:57
canceled;

theorem Th58: :: RELAT_1:58
canceled;

theorem Th59: :: RELAT_1:59
canceled;

theorem Th60: :: RELAT_1:60
( dom {} = {} & rng {} = {} )
proof end;

theorem Th61: :: RELAT_1:61
canceled;

theorem Th62: :: RELAT_1:62
for b1 being Relation holds
( {} * b1 = {} & b1 * {} = {} )
proof end;

registration
let c1 be empty set ;
cluster dom a1 -> empty Relation-like ;
coherence
dom c1 is empty
by Th60;
cluster rng a1 -> empty Relation-like ;
coherence
rng c1 is empty
by Th60;
let c2 be Relation;
cluster a1 * a2 -> empty ;
coherence
c1 * c2 is empty
by Th62;
cluster a2 * a1 -> empty ;
coherence
c2 * c1 is empty
by Th62;
end;

theorem Th63: :: RELAT_1:63
canceled;

theorem Th64: :: RELAT_1:64
for b1 being Relation st ( dom b1 = {} or rng b1 = {} ) holds
b1 = {}
proof end;

theorem Th65: :: RELAT_1:65
for b1 being Relation holds
( dom b1 = {} iff rng b1 = {} ) by Th60, Th64;

theorem Th66: :: RELAT_1:66
{} ~ = {}
proof end;

registration
let c1 be empty set ;
cluster a1 ~ -> empty ;
coherence
c1 ~ is empty
by Th66;
end;

theorem Th67: :: RELAT_1:67
for b1, b2 being Relation st rng b1 misses dom b2 holds
b1 * b2 = {}
proof end;

definition
let c1 be Relation;
attr a1 is non-empty means :: RELAT_1:def 9
not {} in rng a1;
end;

:: deftheorem Def9 defines non-empty RELAT_1:def 9 :
for b1 being Relation holds
( b1 is non-empty iff not {} in rng b1 );

definition
let c1 be set ;
func id c1 -> Relation means :Def10: :: RELAT_1:def 10
for b1, b2 being set holds
( [b1,b2] in a2 iff ( b1 in a1 & b1 = b2 ) );
existence
ex b1 being Relation st
for b2, b3 being set holds
( [b2,b3] in b1 iff ( b2 in c1 & b2 = b3 ) )
proof end;
uniqueness
for b1, b2 being Relation st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ( b3 in c1 & b3 = b4 ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ( b3 in c1 & b3 = b4 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def10 defines id RELAT_1:def 10 :
for b1 being set
for b2 being Relation holds
( b2 = id b1 iff for b3, b4 being set holds
( [b3,b4] in b2 iff ( b3 in b1 & b3 = b4 ) ) );

theorem Th68: :: RELAT_1:68
canceled;

theorem Th69: :: RELAT_1:69
canceled;

theorem Th70: :: RELAT_1:70
canceled;

theorem Th71: :: RELAT_1:71
for b1 being set holds
( dom (id b1) = b1 & rng (id b1) = b1 )
proof end;

theorem Th72: :: RELAT_1:72
for b1 being set holds (id b1) ~ = id b1
proof end;

theorem Th73: :: RELAT_1:73
for b1 being set
for b2 being Relation st ( for b3 being set st b3 in b1 holds
[b3,b3] in b2 ) holds
id b1 c= b2
proof end;

theorem Th74: :: RELAT_1:74
for b1, b2, b3 being set
for b4 being Relation holds
( [b1,b2] in (id b3) * b4 iff ( b1 in b3 & [b1,b2] in b4 ) )
proof end;

theorem Th75: :: RELAT_1:75
for b1, b2, b3 being set
for b4 being Relation holds
( [b1,b2] in b4 * (id b3) iff ( b2 in b3 & [b1,b2] in b4 ) )
proof end;

theorem Th76: :: RELAT_1:76
for b1 being set
for b2 being Relation holds
( b2 * (id b1) c= b2 & (id b1) * b2 c= b2 )
proof end;

theorem Th77: :: RELAT_1:77
for b1 being set
for b2 being Relation st dom b2 c= b1 holds
(id b1) * b2 = b2
proof end;

theorem Th78: :: RELAT_1:78
for b1 being Relation holds (id (dom b1)) * b1 = b1 by Th77;

theorem Th79: :: RELAT_1:79
for b1 being set
for b2 being Relation st rng b2 c= b1 holds
b2 * (id b1) = b2
proof end;

theorem Th80: :: RELAT_1:80
for b1 being Relation holds b1 * (id (rng b1)) = b1 by Th79;

theorem Th81: :: RELAT_1:81
id {} = {}
proof end;

theorem Th82: :: RELAT_1:82
for b1 being set
for b2, b3, b4 being Relation st dom b2 = b1 & rng b3 c= b1 & b3 * b2 = id (dom b4) & b2 * b4 = id b1 holds
b4 = b3
proof end;

definition
let c1 be Relation;
let c2 be set ;
func c1 | c2 -> Relation means :Def11: :: RELAT_1:def 11
for b1, b2 being set holds
( [b1,b2] in a3 iff ( b1 in a2 & [b1,b2] in a1 ) );
existence
ex b1 being Relation st
for b2, b3 being set holds
( [b2,b3] in b1 iff ( b2 in c2 & [b2,b3] in c1 ) )
proof end;
uniqueness
for b1, b2 being Relation st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ( b3 in c2 & [b3,b4] in c1 ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ( b3 in c2 & [b3,b4] in c1 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def11 defines | RELAT_1:def 11 :
for b1 being Relation
for b2 being set
for b3 being Relation holds
( b3 = b1 | b2 iff for b4, b5 being set holds
( [b4,b5] in b3 iff ( b4 in b2 & [b4,b5] in b1 ) ) );

theorem Th83: :: RELAT_1:83
canceled;

theorem Th84: :: RELAT_1:84
canceled;

theorem Th85: :: RELAT_1:85
canceled;

theorem Th86: :: RELAT_1:86
for b1, b2 being set
for b3 being Relation holds
( b1 in dom (b3 | b2) iff ( b1 in b2 & b1 in dom b3 ) )
proof end;

theorem Th87: :: RELAT_1:87
for b1 being set
for b2 being Relation holds dom (b2 | b1) c= b1
proof end;

theorem Th88: :: RELAT_1:88
for b1 being set
for b2 being Relation holds b2 | b1 c= b2
proof end;

theorem Th89: :: RELAT_1:89
for b1 being set
for b2 being Relation holds dom (b2 | b1) c= dom b2
proof end;

theorem Th90: :: RELAT_1:90
for b1 being set
for b2 being Relation holds dom (b2 | b1) = (dom b2) /\ b1
proof end;

theorem Th91: :: RELAT_1:91
for b1 being set
for b2 being Relation st b1 c= dom b2 holds
dom (b2 | b1) = b1
proof end;

theorem Th92: :: RELAT_1:92
for b1 being set
for b2, b3 being Relation holds (b2 | b1) * b3 c= b2 * b3
proof end;

theorem Th93: :: RELAT_1:93
for b1 being set
for b2, b3 being Relation holds b2 * (b3 | b1) c= b2 * b3
proof end;

theorem Th94: :: RELAT_1:94
for b1 being set
for b2 being Relation holds b2 | b1 = (id b1) * b2
proof end;

theorem Th95: :: RELAT_1:95
for b1 being set
for b2 being Relation holds
( b2 | b1 = {} iff dom b2 misses b1 )
proof end;

theorem Th96: :: RELAT_1:96
for b1 being set
for b2 being Relation holds b2 | b1 = b2 /\ [:b1,(rng b2):]
proof end;

theorem Th97: :: RELAT_1:97
for b1 being set
for b2 being Relation st dom b2 c= b1 holds
b2 | b1 = b2
proof end;

theorem Th98: :: RELAT_1:98
for b1 being Relation holds b1 | (dom b1) = b1 by Th97;

theorem Th99: :: RELAT_1:99
for b1 being set
for b2 being Relation holds rng (b2 | b1) c= rng b2
proof end;

theorem Th100: :: RELAT_1:100
for b1, b2 being set
for b3 being Relation holds (b3 | b1) | b2 = b3 | (b1 /\ b2)
proof end;

theorem Th101: :: RELAT_1:101
for b1 being set
for b2 being Relation holds (b2 | b1) | b1 = b2 | b1
proof end;

theorem Th102: :: RELAT_1:102
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
(b3 | b1) | b2 = b3 | b1
proof end;

theorem Th103: :: RELAT_1:103
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
(b3 | b2) | b1 = b3 | b1
proof end;

theorem Th104: :: RELAT_1:104
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
b3 | b1 c= b3 | b2
proof end;

theorem Th105: :: RELAT_1:105
for b1 being set
for b2, b3 being Relation st b2 c= b3 holds
b2 | b1 c= b3 | b1
proof end;

theorem Th106: :: RELAT_1:106
for b1, b2 being set
for b3, b4 being Relation st b3 c= b4 & b1 c= b2 holds
b3 | b1 c= b4 | b2
proof end;

theorem Th107: :: RELAT_1:107
for b1, b2 being set
for b3 being Relation holds b3 | (b1 \/ b2) = (b3 | b1) \/ (b3 | b2)
proof end;

theorem Th108: :: RELAT_1:108
for b1, b2 being set
for b3 being Relation holds b3 | (b1 /\ b2) = (b3 | b1) /\ (b3 | b2)
proof end;

theorem Th109: :: RELAT_1:109
for b1, b2 being set
for b3 being Relation holds b3 | (b1 \ b2) = (b3 | b1) \ (b3 | b2)
proof end;

theorem Th110: :: RELAT_1:110
for b1 being Relation holds b1 | {} = {}
proof end;

theorem Th111: :: RELAT_1:111
for b1 being set holds {} | b1 = {}
proof end;

theorem Th112: :: RELAT_1:112
for b1 being set
for b2, b3 being Relation holds (b2 * b3) | b1 = (b2 | b1) * b3
proof end;

definition
let c1 be set ;
let c2 be Relation;
func c1 | c2 -> Relation means :Def12: :: RELAT_1:def 12
for b1, b2 being set holds
( [b1,b2] in a3 iff ( b2 in a1 & [b1,b2] in a2 ) );
existence
ex b1 being Relation st
for b2, b3 being set holds
( [b2,b3] in b1 iff ( b3 in c1 & [b2,b3] in c2 ) )
proof end;
uniqueness
for b1, b2 being Relation st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ( b4 in c1 & [b3,b4] in c2 ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ( b4 in c1 & [b3,b4] in c2 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def12 defines | RELAT_1:def 12 :
for b1 being set
for b2, b3 being Relation holds
( b3 = b1 | b2 iff for b4, b5 being set holds
( [b4,b5] in b3 iff ( b5 in b1 & [b4,b5] in b2 ) ) );

theorem Th113: :: RELAT_1:113
canceled;

theorem Th114: :: RELAT_1:114
canceled;

theorem Th115: :: RELAT_1:115
for b1, b2 being set
for b3 being Relation holds
( b1 in rng (b2 | b3) iff ( b1 in b2 & b1 in rng b3 ) )
proof end;

theorem Th116: :: RELAT_1:116
for b1 being set
for b2 being Relation holds rng (b1 | b2) c= b1
proof end;

theorem Th117: :: RELAT_1:117
for b1 being set
for b2 being Relation holds b1 | b2 c= b2
proof end;

theorem Th118: :: RELAT_1:118
for b1 being set
for b2 being Relation holds rng (b1 | b2) c= rng b2
proof end;

theorem Th119: :: RELAT_1:119
for b1 being set
for b2 being Relation holds rng (b1 | b2) = (rng b2) /\ b1
proof end;

theorem Th120: :: RELAT_1:120
for b1 being set
for b2 being Relation st b1 c= rng b2 holds
rng (b1 | b2) = b1
proof end;

theorem Th121: :: RELAT_1:121
for b1 being set
for b2, b3 being Relation holds (b1 | b2) * b3 c= b2 * b3
proof end;

theorem Th122: :: RELAT_1:122
for b1 being set
for b2, b3 being Relation holds b2 * (b1 | b3) c= b2 * b3
proof end;

theorem Th123: :: RELAT_1:123
for b1 being set
for b2 being Relation holds b1 | b2 = b2 * (id b1)
proof end;

theorem Th124: :: RELAT_1:124
for b1 being set
for b2 being Relation holds b1 | b2 = b2 /\ [:(dom b2),b1:]
proof end;

theorem Th125: :: RELAT_1:125
for b1 being set
for b2 being Relation st rng b2 c= b1 holds
b1 | b2 = b2
proof end;

theorem Th126: :: RELAT_1:126
for b1 being Relation holds (rng b1) | b1 = b1 by Th125;

theorem Th127: :: RELAT_1:127
for b1, b2 being set
for b3 being Relation holds b1 | (b2 | b3) = (b1 /\ b2) | b3
proof end;

theorem Th128: :: RELAT_1:128
for b1 being set
for b2 being Relation holds b1 | (b1 | b2) = b1 | b2
proof end;

theorem Th129: :: RELAT_1:129
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
b2 | (b1 | b3) = b1 | b3
proof end;

theorem Th130: :: RELAT_1:130
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
b1 | (b2 | b3) = b1 | b3
proof end;

theorem Th131: :: RELAT_1:131
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
b1 | b3 c= b2 | b3
proof end;

theorem Th132: :: RELAT_1:132
for b1 being set
for b2, b3 being Relation st b2 c= b3 holds
b1 | b2 c= b1 | b3
proof end;

theorem Th133: :: RELAT_1:133
for b1, b2 being set
for b3, b4 being Relation st b3 c= b4 & b1 c= b2 holds
b1 | b3 c= b2 | b4
proof end;

theorem Th134: :: RELAT_1:134
for b1, b2 being set
for b3 being Relation holds (b1 \/ b2) | b3 = (b1 | b3) \/ (b2 | b3)
proof end;

theorem Th135: :: RELAT_1:135
for b1, b2 being set
for b3 being Relation holds (b1 /\ b2) | b3 = (b1 | b3) /\ (b2 | b3)
proof end;

theorem Th136: :: RELAT_1:136
for b1, b2 being set
for b3 being Relation holds (b1 \ b2) | b3 = (b1 | b3) \ (b2 | b3)
proof end;

theorem Th137: :: RELAT_1:137
for b1 being Relation holds {} | b1 = {}
proof end;

theorem Th138: :: RELAT_1:138
for b1 being set holds b1 | {} = {}
proof end;

theorem Th139: :: RELAT_1:139
for b1 being set
for b2, b3 being Relation holds b1 | (b2 * b3) = b2 * (b1 | b3)
proof end;

theorem Th140: :: RELAT_1:140
for b1, b2 being set
for b3 being Relation holds (b1 | b3) | b2 = b1 | (b3 | b2)
proof end;

definition
let c1 be Relation;
let c2 be set ;
func c1 .: c2 -> set means :Def13: :: RELAT_1:def 13
for b1 being set holds
( b1 in a3 iff ex b2 being set st
( [b2,b1] in a1 & b2 in a2 ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being set st
( [b3,b2] in c1 & b3 in c2 ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being set st
( [b4,b3] in c1 & b4 in c2 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set st
( [b4,b3] in c1 & b4 in c2 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def13 defines .: RELAT_1:def 13 :
for b1 being Relation
for b2, b3 being set holds
( b3 = b1 .: b2 iff for b4 being set holds
( b4 in b3 iff ex b5 being set st
( [b5,b4] in b1 & b5 in b2 ) ) );

theorem Th141: :: RELAT_1:141
canceled;

theorem Th142: :: RELAT_1:142
canceled;

theorem Th143: :: RELAT_1:143
for b1, b2 being set
for b3 being Relation holds
( b1 in b3 .: b2 iff ex b4 being set st
( b4 in dom b3 & [b4,b1] in b3 & b4 in b2 ) )
proof end;

theorem Th144: :: RELAT_1:144
for b1 being set
for b2 being Relation holds b2 .: b1 c= rng b2
proof end;

theorem Th145: :: RELAT_1:145
for b1 being set
for b2 being Relation holds b2 .: b1 = b2 .: ((dom b2) /\ b1)
proof end;

theorem Th146: :: RELAT_1:146
for b1 being Relation holds b1 .: (dom b1) = rng b1
proof end;

theorem Th147: :: RELAT_1:147
for b1 being set
for b2 being Relation holds b2 .: b1 c= b2 .: (dom b2)
proof end;

theorem Th148: :: RELAT_1:148
for b1 being set
for b2 being Relation holds rng (b2 | b1) = b2 .: b1
proof end;

theorem Th149: :: RELAT_1:149
for b1 being Relation holds b1 .: {} = {}
proof end;

theorem Th150: :: RELAT_1:150
for b1 being set holds {} .: b1 = {}
proof end;

theorem Th151: :: RELAT_1:151
for b1 being set
for b2 being Relation holds
( b2 .: b1 = {} iff dom b2 misses b1 )
proof end;

theorem Th152: :: RELAT_1:152
for b1 being set
for b2 being Relation st b1 <> {} & b1 c= dom b2 holds
b2 .: b1 <> {}
proof end;

theorem Th153: :: RELAT_1:153
for b1, b2 being set
for b3 being Relation holds b3 .: (b1 \/ b2) = (b3 .: b1) \/ (b3 .: b2)
proof end;

theorem Th154: :: RELAT_1:154
for b1, b2 being set
for b3 being Relation holds b3 .: (b1 /\ b2) c= (b3 .: b1) /\ (b3 .: b2)
proof end;

theorem Th155: :: RELAT_1:155
for b1, b2 being set
for b3 being Relation holds (b3 .: b1) \ (b3 .: b2) c= b3 .: (b1 \ b2)
proof end;

theorem Th156: :: RELAT_1:156
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
b3 .: b1 c= b3 .: b2
proof end;

theorem Th157: :: RELAT_1:157
for b1 being set
for b2, b3 being Relation st b2 c= b3 holds
b2 .: b1 c= b3 .: b1
proof end;

theorem Th158: :: RELAT_1:158
for b1, b2 being set
for b3, b4 being Relation st b3 c= b4 & b1 c= b2 holds
b3 .: b1 c= b4 .: b2
proof end;

theorem Th159: :: RELAT_1:159
for b1 being set
for b2, b3 being Relation holds (b2 * b3) .: b1 = b3 .: (b2 .: b1)
proof end;

theorem Th160: :: RELAT_1:160
for b1, b2 being Relation holds rng (b1 * b2) = b2 .: (rng b1)
proof end;

theorem Th161: :: RELAT_1:161
for b1, b2 being set
for b3 being Relation holds (b3 | b1) .: b2 c= b3 .: b2
proof end;

theorem Th162: :: RELAT_1:162
canceled;

theorem Th163: :: RELAT_1:163
for b1 being set
for b2 being Relation holds (dom b2) /\ b1 c= (b2 ~ ) .: (b2 .: b1)
proof end;

definition
let c1 be Relation;
let c2 be set ;
func c1 " c2 -> set means :Def14: :: RELAT_1:def 14
for b1 being set holds
( b1 in a3 iff ex b2 being set st
( [b1,b2] in a1 & b2 in a2 ) );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff ex b3 being set st
( [b2,b3] in c1 & b3 in c2 ) )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff ex b4 being set st
( [b3,b4] in c1 & b4 in c2 ) ) ) & ( for b3 being set holds
( b3 in b2 iff ex b4 being set st
( [b3,b4] in c1 & b4 in c2 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def14 defines " RELAT_1:def 14 :
for b1 being Relation
for b2, b3 being set holds
( b3 = b1 " b2 iff for b4 being set holds
( b4 in b3 iff ex b5 being set st
( [b4,b5] in b1 & b5 in b2 ) ) );

theorem Th164: :: RELAT_1:164
canceled;

theorem Th165: :: RELAT_1:165
canceled;

theorem Th166: :: RELAT_1:166
for b1, b2 being set
for b3 being Relation holds
( b1 in b3 " b2 iff ex b4 being set st
( b4 in rng b3 & [b1,b4] in b3 & b4 in b2 ) )
proof end;

theorem Th167: :: RELAT_1:167
for b1 being set
for b2 being Relation holds b2 " b1 c= dom b2
proof end;

theorem Th168: :: RELAT_1:168
for b1 being set
for b2 being Relation holds b2 " b1 = b2 " ((rng b2) /\ b1)
proof end;

theorem Th169: :: RELAT_1:169
for b1 being Relation holds b1 " (rng b1) = dom b1
proof end;

theorem Th170: :: RELAT_1:170
for b1 being set
for b2 being Relation holds b2 " b1 c= b2 " (rng b2)
proof end;

theorem Th171: :: RELAT_1:171
for b1 being Relation holds b1 " {} = {}
proof end;

theorem Th172: :: RELAT_1:172
for b1 being set holds {} " b1 = {}
proof end;

theorem Th173: :: RELAT_1:173
for b1 being set
for b2 being Relation holds
( b2 " b1 = {} iff rng b2 misses b1 )
proof end;

theorem Th174: :: RELAT_1:174
for b1 being set
for b2 being Relation st b1 <> {} & b1 c= rng b2 holds
b2 " b1 <> {}
proof end;

theorem Th175: :: RELAT_1:175
for b1, b2 being set
for b3 being Relation holds b3 " (b1 \/ b2) = (b3 " b1) \/ (b3 " b2)
proof end;

theorem Th176: :: RELAT_1:176
for b1, b2 being set
for b3 being Relation holds b3 " (b1 /\ b2) c= (b3 " b1) /\ (b3 " b2)
proof end;

theorem Th177: :: RELAT_1:177
for b1, b2 being set
for b3 being Relation holds (b3 " b1) \ (b3 " b2) c= b3 " (b1 \ b2)
proof end;

theorem Th178: :: RELAT_1:178
for b1, b2 being set
for b3 being Relation st b1 c= b2 holds
b3 " b1 c= b3 " b2
proof end;

theorem Th179: :: RELAT_1:179
for b1 being set
for b2, b3 being Relation st b2 c= b3 holds
b2 " b1 c= b3 " b1
proof end;

theorem Th180: :: RELAT_1:180
for b1, b2 being set
for b3, b4 being Relation st b3 c= b4 & b1 c= b2 holds
b3 " b1 c= b4 " b2
proof end;

theorem Th181: :: RELAT_1:181
for b1 being set
for b2, b3 being Relation holds (b2 * b3) " b1 = b2 " (b3 " b1)
proof end;

theorem Th182: :: RELAT_1:182
for b1, b2 being Relation holds dom (b1 * b2) = b1 " (dom b2)
proof end;

theorem Th183: :: RELAT_1:183
for b1 being set
for b2 being Relation holds (rng b2) /\ b1 c= (b2 ~ ) " (b2 " b1)
proof end;

definition
let c1 be Relation;
attr a1 is empty-yielding means :Def15: :: RELAT_1:def 15
rng a1 c= {{} };
end;

:: deftheorem Def15 defines empty-yielding RELAT_1:def 15 :
for b1 being Relation holds
( b1 is empty-yielding iff rng b1 c= {{} } );

theorem Th184: :: RELAT_1:184
for b1 being Relation holds
( b1 is empty-yielding iff for b2 being set st b2 in rng b1 holds
b2 = {} )
proof end;

theorem Th185: :: RELAT_1:185
for b1, b2 being Relation
for b3, b4 being set st b1 | b3 = b2 | b3 & b1 | b4 = b2 | b4 holds
b1 | (b3 \/ b4) = b2 | (b3 \/ b4)
proof end;

theorem Th186: :: RELAT_1:186
for b1 being set
for b2, b3 being Relation st dom b3 c= b1 & b3 c= b2 holds
b3 c= b2 | b1
proof end;

theorem Th187: :: RELAT_1:187
for b1 being Relation
for b2 being set st b2 misses dom b1 holds
b1 | b2 = {}
proof end;

theorem Th188: :: RELAT_1:188
for b1, b2 being Relation
for b3, b4 being set st b3 c= b4 & b1 | b4 = b2 | b4 holds
b1 | b3 = b2 | b3
proof end;

theorem Th189: :: RELAT_1:189
for b1, b2 being Relation holds b1 | (dom b2) = b1 | (dom (b2 | (dom b1)))
proof end;

registration
cluster {} -> Relation-like empty-yielding ;
coherence
{} is empty-yielding
proof end;
end;

registration
cluster empty-yielding set ;
existence
ex b1 being Relation st b1 is empty-yielding
proof end;
end;

registration
let c1 be empty-yielding Relation;
let c2 be set ;
cluster a1 | a2 -> empty-yielding ;
coherence
c1 | c2 is empty-yielding
proof end;
end;

theorem Th190: :: RELAT_1:190
for b1 being set
for b2 being Relation st not b2 | b1 is empty-yielding holds
not b2 is empty-yielding
proof end;