:: YELLOW_0 semantic presentation

scheme :: YELLOW_0:sch 1
s1{ F1() -> non empty set , P1[ set , set ] } :
ex b1 being non empty strict RelStr st
( the carrier of b1 = F1() & ( for b2, b3 being Element of b1 holds
( b2 <= b3 iff P1[b2,b3] ) ) )
proof end;

definition
let c1 be non empty RelStr ;
redefine attr a1 is reflexive means :: YELLOW_0:def 1
for b1 being Element of a1 holds b1 <= b1;
compatibility
( c1 is reflexive iff for b1 being Element of c1 holds b1 <= b1 )
proof end;
end;

:: deftheorem Def1 defines reflexive YELLOW_0:def 1 :
for b1 being non empty RelStr holds
( b1 is reflexive iff for b2 being Element of b1 holds b2 <= b2 );

definition
let c1 be RelStr ;
redefine attr a1 is transitive means :: YELLOW_0:def 2
for b1, b2, b3 being Element of a1 holds
( b1 <= b2 & b2 <= b3 implies b1 <= b3 );
compatibility
( c1 is transitive iff for b1, b2, b3 being Element of c1 holds
( b1 <= b2 & b2 <= b3 implies b1 <= b3 ) )
proof end;
redefine attr a1 is antisymmetric means :: YELLOW_0:def 3
for b1, b2 being Element of a1 holds
( b1 <= b2 & b2 <= b1 implies b1 = b2 );
compatibility
( c1 is antisymmetric iff for b1, b2 being Element of c1 holds
( b1 <= b2 & b2 <= b1 implies b1 = b2 ) )
proof end;
end;

:: deftheorem Def2 defines transitive YELLOW_0:def 2 :
for b1 being RelStr holds
( b1 is transitive iff for b2, b3, b4 being Element of b1 holds
( b2 <= b3 & b3 <= b4 implies b2 <= b4 ) );

:: deftheorem Def3 defines antisymmetric YELLOW_0:def 3 :
for b1 being RelStr holds
( b1 is antisymmetric iff for b2, b3 being Element of b1 holds
( b2 <= b3 & b3 <= b2 implies b2 = b3 ) );

registration
cluster non empty complete -> non empty with_suprema with_infima RelStr ;
coherence
for b1 being non empty RelStr holds
( b1 is complete implies ( b1 is with_suprema & b1 is with_infima ) )
by LATTICE3:12;
cluster non empty trivial reflexive -> non empty reflexive transitive antisymmetric complete RelStr ;
coherence
for b1 being non empty reflexive RelStr holds
( b1 is trivial implies ( b1 is complete & b1 is transitive & b1 is antisymmetric ) )
proof end;
end;

registration
let c1 be set ;
let c2 be Relation of {c1};
cluster RelStr(# {a1},a2 #) -> trivial ;
coherence
RelStr(# {c1},c2 #) is trivial
proof end;
end;

registration
cluster non empty trivial strict reflexive transitive antisymmetric with_suprema with_infima complete RelStr ;
existence
ex b1 being RelStr st
( b1 is strict & b1 is trivial & not b1 is empty & b1 is reflexive )
proof end;
end;

theorem Th1: :: YELLOW_0:1
for b1, b2 being RelStr holds
( RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #) implies for b3, b4 being Element of b1
for b5, b6 being Element of b2 holds
( b3 = b5 & b4 = b6 implies ( ( b3 <= b4 implies b5 <= b6 ) & ( b3 < b4 implies b5 < b6 ) ) ) )
proof end;

theorem Th2: :: YELLOW_0:2
for b1, b2 being RelStr holds
( RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #) implies for b3 being set
for b4 being Element of b1
for b5 being Element of b2 holds
( b4 = b5 implies ( ( b3 is_<=_than b4 implies b3 is_<=_than b5 ) & ( b3 is_>=_than b4 implies b3 is_>=_than b5 ) ) ) )
proof end;

theorem Th3: :: YELLOW_0:3
for b1, b2 being RelStr holds
( RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #) & b1 is complete implies b2 is complete )
proof end;

theorem Th4: :: YELLOW_0:4
for b1 being transitive RelStr
for b2, b3 being Element of b1 holds
( b2 <= b3 implies for b4 being set holds
( ( b3 is_<=_than b4 implies b2 is_<=_than b4 ) & ( b2 is_>=_than b4 implies b3 is_>=_than b4 ) ) )
proof end;

theorem Th5: :: YELLOW_0:5
for b1 being non empty RelStr
for b2 being set
for b3 being Element of b1 holds
( ( b3 is_>=_than b2 implies b3 is_>=_than b2 /\ the carrier of b1 ) & ( b3 is_>=_than b2 /\ the carrier of b1 implies b3 is_>=_than b2 ) & ( b3 is_<=_than b2 implies b3 is_<=_than b2 /\ the carrier of b1 ) & ( b3 is_<=_than b2 /\ the carrier of b1 implies b3 is_<=_than b2 ) )
proof end;

theorem Th6: :: YELLOW_0:6
for b1 being RelStr
for b2 being Element of b1 holds
( {} is_<=_than b2 & {} is_>=_than b2 )
proof end;

theorem Th7: :: YELLOW_0:7
for b1 being RelStr
for b2, b3 being Element of b1 holds
( ( b2 is_<=_than {b3} implies b2 <= b3 ) & ( b2 <= b3 implies b2 is_<=_than {b3} ) & ( b2 is_>=_than {b3} implies b3 <= b2 ) & ( b3 <= b2 implies b2 is_>=_than {b3} ) )
proof end;

theorem Th8: :: YELLOW_0:8
for b1 being RelStr
for b2, b3, b4 being Element of b1 holds
( ( b2 is_<=_than {b3,b4} implies ( b2 <= b3 & b2 <= b4 ) ) & ( b2 <= b3 & b2 <= b4 implies b2 is_<=_than {b3,b4} ) & ( b2 is_>=_than {b3,b4} implies ( b3 <= b2 & b4 <= b2 ) ) & ( b3 <= b2 & b4 <= b2 implies b2 is_>=_than {b3,b4} ) )
proof end;

theorem Th9: :: YELLOW_0:9
for b1 being RelStr
for b2, b3 being set holds
( b2 c= b3 implies for b4 being Element of b1 holds
( ( b4 is_<=_than b3 implies b4 is_<=_than b2 ) & ( b4 is_>=_than b3 implies b4 is_>=_than b2 ) ) )
proof end;

theorem Th10: :: YELLOW_0:10
for b1 being RelStr
for b2, b3 being set
for b4 being Element of b1 holds
( ( b4 is_<=_than b2 & b4 is_<=_than b3 implies b4 is_<=_than b2 \/ b3 ) & ( b4 is_>=_than b2 & b4 is_>=_than b3 implies b4 is_>=_than b2 \/ b3 ) )
proof end;

theorem Th11: :: YELLOW_0:11
for b1 being transitive RelStr
for b2 being set
for b3, b4 being Element of b1 holds
( b2 is_<=_than b3 & b3 <= b4 implies b2 is_<=_than b4 )
proof end;

theorem Th12: :: YELLOW_0:12
for b1 being transitive RelStr
for b2 being set
for b3, b4 being Element of b1 holds
( b2 is_>=_than b3 & b3 >= b4 implies b2 is_>=_than b4 )
proof end;

registration
let c1 be non empty RelStr ;
cluster [#] a1 -> non empty ;
coherence
not [#] c1 is empty
by PRE_TOPC:12;
end;

definition
let c1 be RelStr ;
attr a1 is lower-bounded means :Def4: :: YELLOW_0:def 4
ex b1 being Element of a1 st b1 is_<=_than the carrier of a1;
attr a1 is upper-bounded means :Def5: :: YELLOW_0:def 5
ex b1 being Element of a1 st b1 is_>=_than the carrier of a1;
end;

:: deftheorem Def4 defines lower-bounded YELLOW_0:def 4 :
for b1 being RelStr holds
( b1 is lower-bounded iff ex b2 being Element of b1 st b2 is_<=_than the carrier of b1 );

:: deftheorem Def5 defines upper-bounded YELLOW_0:def 5 :
for b1 being RelStr holds
( b1 is upper-bounded iff ex b2 being Element of b1 st b2 is_>=_than the carrier of b1 );

definition
let c1 be RelStr ;
attr a1 is bounded means :: YELLOW_0:def 6
( a1 is lower-bounded & a1 is upper-bounded );
end;

:: deftheorem Def6 defines bounded YELLOW_0:def 6 :
for b1 being RelStr holds
( b1 is bounded iff ( b1 is lower-bounded & b1 is upper-bounded ) );

theorem Th13: :: YELLOW_0:13
for b1, b2 being RelStr holds
( RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #) implies ( ( b1 is lower-bounded implies b2 is lower-bounded ) & ( b1 is upper-bounded implies b2 is upper-bounded ) ) )
proof end;

registration
cluster non empty complete -> non empty bounded RelStr ;
coherence
for b1 being non empty RelStr holds
( b1 is complete implies b1 is bounded )
proof end;
cluster bounded -> lower-bounded upper-bounded RelStr ;
coherence
for b1 being RelStr holds
( b1 is bounded implies ( b1 is lower-bounded & b1 is upper-bounded ) )
proof end;
cluster lower-bounded upper-bounded -> bounded RelStr ;
coherence
for b1 being RelStr holds
( b1 is lower-bounded & b1 is upper-bounded implies b1 is bounded )
proof end;
end;

registration
cluster non empty with_suprema with_infima complete lower-bounded upper-bounded bounded RelStr ;
existence
ex b1 being non empty Poset st b1 is complete
proof end;
end;

definition
let c1 be RelStr ;
let c2 be set ;
pred ex_sup_of c2,c1 means :Def7: :: YELLOW_0:def 7
ex b1 being Element of a1 st
( a2 is_<=_than b1 & ( for b2 being Element of a1 holds
( a2 is_<=_than b2 implies b2 >= b1 ) ) & ( for b2 being Element of a1 holds
( a2 is_<=_than b2 & ( for b3 being Element of a1 holds
( a2 is_<=_than b3 implies b3 >= b2 ) ) implies b2 = b1 ) ) );
pred ex_inf_of c2,c1 means :Def8: :: YELLOW_0:def 8
ex b1 being Element of a1 st
( a2 is_>=_than b1 & ( for b2 being Element of a1 holds
( a2 is_>=_than b2 implies b2 <= b1 ) ) & ( for b2 being Element of a1 holds
( a2 is_>=_than b2 & ( for b3 being Element of a1 holds
( a2 is_>=_than b3 implies b3 <= b2 ) ) implies b2 = b1 ) ) );
end;

:: deftheorem Def7 defines ex_sup_of YELLOW_0:def 7 :
for b1 being RelStr
for b2 being set holds
( ex_sup_of b2,b1 iff ex b3 being Element of b1 st
( b2 is_<=_than b3 & ( for b4 being Element of b1 holds
( b2 is_<=_than b4 implies b4 >= b3 ) ) & ( for b4 being Element of b1 holds
( b2 is_<=_than b4 & ( for b5 being Element of b1 holds
( b2 is_<=_than b5 implies b5 >= b4 ) ) implies b4 = b3 ) ) ) );

:: deftheorem Def8 defines ex_inf_of YELLOW_0:def 8 :
for b1 being RelStr
for b2 being set holds
( ex_inf_of b2,b1 iff ex b3 being Element of b1 st
( b2 is_>=_than b3 & ( for b4 being Element of b1 holds
( b2 is_>=_than b4 implies b4 <= b3 ) ) & ( for b4 being Element of b1 holds
( b2 is_>=_than b4 & ( for b5 being Element of b1 holds
( b2 is_>=_than b5 implies b5 <= b4 ) ) implies b4 = b3 ) ) ) );

theorem Th14: :: YELLOW_0:14
for b1, b2 being RelStr holds
( RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #) implies for b3 being set holds
( ( ex_sup_of b3,b1 implies ex_sup_of b3,b2 ) & ( ex_inf_of b3,b1 implies ex_inf_of b3,b2 ) ) )
proof end;

theorem Th15: :: YELLOW_0:15
for b1 being antisymmetric RelStr
for b2 being set holds
( ex_sup_of b2,b1 iff ex b3 being Element of b1 st
( b2 is_<=_than b3 & ( for b4 being Element of b1 holds
( b2 is_<=_than b4 implies b3 <= b4 ) ) ) )
proof end;

theorem Th16: :: YELLOW_0:16
for b1 being antisymmetric RelStr
for b2 being set holds
( ex_inf_of b2,b1 iff ex b3 being Element of b1 st
( b2 is_>=_than b3 & ( for b4 being Element of b1 holds
( b2 is_>=_than b4 implies b3 >= b4 ) ) ) )
proof end;

theorem Th17: :: YELLOW_0:17
for b1 being non empty antisymmetric complete RelStr
for b2 being set holds
( ex_sup_of b2,b1 & ex_inf_of b2,b1 )
proof end;

theorem Th18: :: YELLOW_0:18
for b1 being antisymmetric RelStr
for b2, b3, b4 being Element of b1 holds
( ( b4 = b2 "\/" b3 & ex_sup_of {b2,b3},b1 implies ( b4 >= b2 & b4 >= b3 & ( for b5 being Element of b1 holds
( b5 >= b2 & b5 >= b3 implies b4 <= b5 ) ) ) ) & ( b4 >= b2 & b4 >= b3 & ( for b5 being Element of b1 holds
( b5 >= b2 & b5 >= b3 implies b4 <= b5 ) ) implies ( b4 = b2 "\/" b3 & ex_sup_of {b2,b3},b1 ) ) )
proof end;

theorem Th19: :: YELLOW_0:19
for b1 being antisymmetric RelStr
for b2, b3, b4 being Element of b1 holds
( ( b4 = b2 "/\" b3 & ex_inf_of {b2,b3},b1 implies ( b4 <= b2 & b4 <= b3 & ( for b5 being Element of b1 holds
( b5 <= b2 & b5 <= b3 implies b4 >= b5 ) ) ) ) & ( b4 <= b2 & b4 <= b3 & ( for b5 being Element of b1 holds
( b5 <= b2 & b5 <= b3 implies b4 >= b5 ) ) implies ( b4 = b2 "/\" b3 & ex_inf_of {b2,b3},b1 ) ) )
proof end;

theorem Th20: :: YELLOW_0:20
for b1 being antisymmetric RelStr holds
( b1 is with_suprema iff for b2, b3 being Element of b1 holds ex_sup_of {b2,b3},b1 )
proof end;

theorem Th21: :: YELLOW_0:21
for b1 being antisymmetric RelStr holds
( b1 is with_infima iff for b2, b3 being Element of b1 holds ex_inf_of {b2,b3},b1 )
proof end;

theorem Th22: :: YELLOW_0:22
for b1 being antisymmetric with_suprema RelStr
for b2, b3, b4 being Element of b1 holds
( b4 = b2 "\/" b3 iff ( b4 >= b2 & b4 >= b3 & ( for b5 being Element of b1 holds
( b5 >= b2 & b5 >= b3 implies b4 <= b5 ) ) ) )
proof end;

theorem Th23: :: YELLOW_0:23
for b1 being antisymmetric with_infima RelStr
for b2, b3, b4 being Element of b1 holds
( b4 = b2 "/\" b3 iff ( b4 <= b2 & b4 <= b3 & ( for b5 being Element of b1 holds
( b5 <= b2 & b5 <= b3 implies b4 >= b5 ) ) ) )
proof end;

theorem Th24: :: YELLOW_0:24
for b1 being reflexive antisymmetric with_suprema RelStr
for b2, b3 being Element of b1 holds
( b2 = b2 "\/" b3 iff b2 >= b3 )
proof end;

theorem Th25: :: YELLOW_0:25
for b1 being reflexive antisymmetric with_infima RelStr
for b2, b3 being Element of b1 holds
( b2 = b2 "/\" b3 iff b2 <= b3 )
proof end;

definition
let c1 be RelStr ;
let c2 be set ;
func "\/" c2,c1 -> Element of a1 means :Def9: :: YELLOW_0:def 9
( a2 is_<=_than a3 & ( for b1 being Element of a1 holds
( a2 is_<=_than b1 implies a3 <= b1 ) ) ) if ex_sup_of a2,a1
;
uniqueness
for b1, b2 being Element of c1 holds
( ex_sup_of c2,c1 & c2 is_<=_than b1 & ( for b3 being Element of c1 holds
( c2 is_<=_than b3 implies b1 <= b3 ) ) & c2 is_<=_than b2 & ( for b3 being Element of c1 holds
( c2 is_<=_than b3 implies b2 <= b3 ) ) implies b1 = b2 )
proof end;
existence
not ( ex_sup_of c2,c1 & ( for b1 being Element of c1 holds
not ( c2 is_<=_than b1 & ( for b2 being Element of c1 holds
( c2 is_<=_than b2 implies b1 <= b2 ) ) ) ) )
proof end;
correctness
consistency
for b1 being Element of c1 holds
verum
;
;
func "/\" c2,c1 -> Element of a1 means :Def10: :: YELLOW_0:def 10
( a2 is_>=_than a3 & ( for b1 being Element of a1 holds
( a2 is_>=_than b1 implies b1 <= a3 ) ) ) if ex_inf_of a2,a1
;
uniqueness
for b1, b2 being Element of c1 holds
( ex_inf_of c2,c1 & c2 is_>=_than b1 & ( for b3 being Element of c1 holds
( c2 is_>=_than b3 implies b3 <= b1 ) ) & c2 is_>=_than b2 & ( for b3 being Element of c1 holds
( c2 is_>=_than b3 implies b3 <= b2 ) ) implies b1 = b2 )
proof end;
existence
not ( ex_inf_of c2,c1 & ( for b1 being Element of c1 holds
not ( c2 is_>=_than b1 & ( for b2 being Element of c1 holds
( c2 is_>=_than b2 implies b2 <= b1 ) ) ) ) )
proof end;
correctness
consistency
for b1 being Element of c1 holds
verum
;
;
end;

:: deftheorem Def9 defines "\/" YELLOW_0:def 9 :
for b1 being RelStr
for b2 being set
for b3 being Element of b1 holds
( ex_sup_of b2,b1 implies ( b3 = "\/" b2,b1 iff ( b2 is_<=_than b3 & ( for b4 being Element of b1 holds
( b2 is_<=_than b4 implies b3 <= b4 ) ) ) ) );

:: deftheorem Def10 defines "/\" YELLOW_0:def 10 :
for b1 being RelStr
for b2 being set
for b3 being Element of b1 holds
( ex_inf_of b2,b1 implies ( b3 = "/\" b2,b1 iff ( b2 is_>=_than b3 & ( for b4 being Element of b1 holds
( b2 is_>=_than b4 implies b4 <= b3 ) ) ) ) );

theorem Th26: :: YELLOW_0:26
for b1, b2 being RelStr holds
( RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #) implies for b3 being set holds
( ex_sup_of b3,b1 implies "\/" b3,b1 = "\/" b3,b2 ) )
proof end;

theorem Th27: :: YELLOW_0:27
for b1, b2 being RelStr holds
( RelStr(# the carrier of b1,the InternalRel of b1 #) = RelStr(# the carrier of b2,the InternalRel of b2 #) implies for b3 being set holds
( ex_inf_of b3,b1 implies "/\" b3,b1 = "/\" b3,b2 ) )
proof end;

theorem Th28: :: YELLOW_0:28
for b1 being non empty complete Poset
for b2 being set holds
( "\/" b2,b1 = "\/" b2,(latt b1) & "/\" b2,b1 = "/\" b2,(latt b1) )
proof end;

theorem Th29: :: YELLOW_0:29
for b1 being complete Lattice
for b2 being set holds
( "\/" b2,b1 = "\/" b2,(LattPOSet b1) & "/\" b2,b1 = "/\" b2,(LattPOSet b1) )
proof end;

theorem Th30: :: YELLOW_0:30
for b1 being antisymmetric RelStr
for b2 being Element of b1
for b3 being set holds
( ( b2 = "\/" b3,b1 & ex_sup_of b3,b1 implies ( b2 is_>=_than b3 & ( for b4 being Element of b1 holds
( b4 is_>=_than b3 implies b2 <= b4 ) ) ) ) & ( b2 is_>=_than b3 & ( for b4 being Element of b1 holds
( b4 is_>=_than b3 implies b2 <= b4 ) ) implies ( b2 = "\/" b3,b1 & ex_sup_of b3,b1 ) ) )
proof end;

theorem Th31: :: YELLOW_0:31
for b1 being antisymmetric RelStr
for b2 being Element of b1
for b3 being set holds
( ( b2 = "/\" b3,b1 & ex_inf_of b3,b1 implies ( b2 is_<=_than b3 & ( for b4 being Element of b1 holds
( b4 is_<=_than b3 implies b2 >= b4 ) ) ) ) & ( b2 is_<=_than b3 & ( for b4 being Element of b1 holds
( b4 is_<=_than b3 implies b2 >= b4 ) ) implies ( b2 = "/\" b3,b1 & ex_inf_of b3,b1 ) ) )
proof end;

theorem Th32: :: YELLOW_0:32
for b1 being non empty antisymmetric complete RelStr
for b2 being Element of b1
for b3 being set holds
( b2 = "\/" b3,b1 iff ( b2 is_>=_than b3 & ( for b4 being Element of b1 holds
( b4 is_>=_than b3 implies b2 <= b4 ) ) ) )
proof end;

theorem Th33: :: YELLOW_0:33
for b1 being non empty antisymmetric complete RelStr
for b2 being Element of b1
for b3 being set holds
( b2 = "/\" b3,b1 iff ( b2 is_<=_than b3 & ( for b4 being Element of b1 holds
( b4 is_<=_than b3 implies b2 >= b4 ) ) ) )
proof end;

theorem Th34: :: YELLOW_0:34
for b1 being RelStr
for b2, b3 being set holds
( b2 c= b3 & ex_sup_of b2,b1 & ex_sup_of b3,b1 implies "\/" b2,b1 <= "\/" b3,b1 )
proof end;

theorem Th35: :: YELLOW_0:35
for b1 being RelStr
for b2, b3 being set holds
( b2 c= b3 & ex_inf_of b2,b1 & ex_inf_of b3,b1 implies "/\" b2,b1 >= "/\" b3,b1 )
proof end;

theorem Th36: :: YELLOW_0:36
for b1 being transitive antisymmetric RelStr
for b2, b3 being set holds
( ex_sup_of b2,b1 & ex_sup_of b3,b1 & ex_sup_of b2 \/ b3,b1 implies "\/" (b2 \/ b3),b1 = ("\/" b2,b1) "\/" ("\/" b3,b1) )
proof end;

theorem Th37: :: YELLOW_0:37
for b1 being transitive antisymmetric RelStr
for b2, b3 being set holds
( ex_inf_of b2,b1 & ex_inf_of b3,b1 & ex_inf_of b2 \/ b3,b1 implies "/\" (b2 \/ b3),b1 = ("/\" b2,b1) "/\" ("/\" b3,b1) )
proof end;

notation
let c1 be RelStr ;
let c2 be Subset of c1;
synonym sup c2 for "\/" c2,c1;
synonym inf c2 for "/\" c2,c1;
end;

theorem Th38: :: YELLOW_0:38
for b1 being non empty reflexive antisymmetric RelStr
for b2 being Element of b1 holds
( ex_sup_of {b2},b1 & ex_inf_of {b2},b1 )
proof end;

theorem Th39: :: YELLOW_0:39
for b1 being non empty reflexive antisymmetric RelStr
for b2 being Element of b1 holds
( sup {b2} = b2 & inf {b2} = b2 )
proof end;

theorem Th40: :: YELLOW_0:40
for b1 being with_infima Poset
for b2, b3 being Element of b1 holds inf {b2,b3} = b2 "/\" b3
proof end;

theorem Th41: :: YELLOW_0:41
for b1 being with_suprema Poset
for b2, b3 being Element of b1 holds sup {b2,b3} = b2 "\/" b3
proof end;

theorem Th42: :: YELLOW_0:42
for b1 being non empty antisymmetric lower-bounded RelStr holds
( ex_sup_of {} ,b1 & ex_inf_of the carrier of b1,b1 )
proof end;

theorem Th43: :: YELLOW_0:43
for b1 being non empty antisymmetric upper-bounded RelStr holds
( ex_inf_of {} ,b1 & ex_sup_of the carrier of b1,b1 )
proof end;

definition
let c1 be RelStr ;
func Bottom c1 -> Element of a1 equals :: YELLOW_0:def 11
"\/" {} ,a1;
correctness
coherence
"\/" {} ,c1 is Element of c1
;
;
func Top c1 -> Element of a1 equals :: YELLOW_0:def 12
"/\" {} ,a1;
correctness
coherence
"/\" {} ,c1 is Element of c1
;
;
end;

:: deftheorem Def11 defines Bottom YELLOW_0:def 11 :
for b1 being RelStr holds Bottom b1 = "\/" {} ,b1;

:: deftheorem Def12 defines Top YELLOW_0:def 12 :
for b1 being RelStr holds Top b1 = "/\" {} ,b1;

theorem Th44: :: YELLOW_0:44
for b1 being non empty antisymmetric lower-bounded RelStr
for b2 being Element of b1 holds Bottom b1 <= b2
proof end;

theorem Th45: :: YELLOW_0:45
for b1 being non empty antisymmetric upper-bounded RelStr
for b2 being Element of b1 holds b2 <= Top b1
proof end;

theorem Th46: :: YELLOW_0:46
for b1 being non empty RelStr
for b2, b3 being set holds
( ( for b4 being Element of b1 holds
( b4 is_>=_than b2 iff b4 is_>=_than b3 ) ) & ex_sup_of b2,b1 implies ex_sup_of b3,b1 )
proof end;

theorem Th47: :: YELLOW_0:47
for b1 being non empty RelStr
for b2, b3 being set holds
( ex_sup_of b2,b1 & ( for b4 being Element of b1 holds
( b4 is_>=_than b2 iff b4 is_>=_than b3 ) ) implies "\/" b2,b1 = "\/" b3,b1 )
proof end;

theorem Th48: :: YELLOW_0:48
for b1 being non empty RelStr
for b2, b3 being set holds
( ( for b4 being Element of b1 holds
( b4 is_<=_than b2 iff b4 is_<=_than b3 ) ) & ex_inf_of b2,b1 implies ex_inf_of b3,b1 )
proof end;

theorem Th49: :: YELLOW_0:49
for b1 being non empty RelStr
for b2, b3 being set holds
( ex_inf_of b2,b1 & ( for b4 being Element of b1 holds
( b4 is_<=_than b2 iff b4 is_<=_than b3 ) ) implies "/\" b2,b1 = "/\" b3,b1 )
proof end;

theorem Th50: :: YELLOW_0:50
for b1 being non empty RelStr
for b2 being set holds
( ( ex_sup_of b2,b1 implies ex_sup_of b2 /\ the carrier of b1,b1 ) & ( ex_sup_of b2 /\ the carrier of b1,b1 implies ex_sup_of b2,b1 ) & ( ex_inf_of b2,b1 implies ex_inf_of b2 /\ the carrier of b1,b1 ) & ( ex_inf_of b2 /\ the carrier of b1,b1 implies ex_inf_of b2,b1 ) )
proof end;

theorem Th51: :: YELLOW_0:51
for b1 being non empty RelStr
for b2 being set holds
( ( ex_sup_of b2,b1 or ex_sup_of b2 /\ the carrier of b1,b1 ) implies "\/" b2,b1 = "\/" (b2 /\ the carrier of b1),b1 )
proof end;

theorem Th52: :: YELLOW_0:52
for b1 being non empty RelStr
for b2 being set holds
( ( ex_inf_of b2,b1 or ex_inf_of b2 /\ the carrier of b1,b1 ) implies "/\" b2,b1 = "/\" (b2 /\ the carrier of b1),b1 )
proof end;

theorem Th53: :: YELLOW_0:53
for b1 being non empty RelStr holds
( ( for b2 being Subset of b1 holds ex_sup_of b2,b1 ) implies b1 is complete )
proof end;

theorem Th54: :: YELLOW_0:54
for b1 being non empty Poset holds
( b1 is with_suprema iff for b2 being non empty finite Subset of b1 holds ex_sup_of b2,b1 )
proof end;

theorem Th55: :: YELLOW_0:55
for b1 being non empty Poset holds
( b1 is with_infima iff for b2 being non empty finite Subset of b1 holds ex_inf_of b2,b1 )
proof end;

theorem Th56: :: YELLOW_0:56
for b1 being set
for b2 being Relation of b1 holds b2 = b2 |_2 b1 by XBOOLE_1:28;

definition
let c1 be RelStr ;
mode SubRelStr of c1 -> RelStr means :Def13: :: YELLOW_0:def 13
( the carrier of a2 c= the carrier of a1 & the InternalRel of a2 c= the InternalRel of a1 );
existence
ex b1 being RelStr st
( the carrier of b1 c= the carrier of c1 & the InternalRel of b1 c= the InternalRel of c1 )
;
end;

:: deftheorem Def13 defines SubRelStr YELLOW_0:def 13 :
for b1, b2 being RelStr holds
( b2 is SubRelStr of b1 iff ( the carrier of b2 c= the carrier of b1 & the InternalRel of b2 c= the InternalRel of b1 ) );

definition
let c1 be RelStr ;
let c2 be SubRelStr of c1;
attr a2 is full means :Def14: :: YELLOW_0:def 14
the InternalRel of a2 = the InternalRel of a1 |_2 the carrier of a2;
end;

:: deftheorem Def14 defines full YELLOW_0:def 14 :
for b1 being RelStr
for b2 being SubRelStr of b1 holds
( b2 is full iff the InternalRel of b2 = the InternalRel of b1 |_2 the carrier of b2 );

registration
let c1 be RelStr ;
cluster strict full SubRelStr of a1;
existence
ex b1 being SubRelStr of c1 st
( b1 is strict & b1 is full )
proof end;
end;

registration
let c1 be non empty RelStr ;
cluster non empty strict full SubRelStr of a1;
existence
ex b1 being SubRelStr of c1 st
( not b1 is empty & b1 is full & b1 is strict )
proof end;
end;

theorem Th57: :: YELLOW_0:57
for b1 being RelStr
for b2 being Subset of b1 holds
RelStr(# b2,(the InternalRel of b1 |_2 b2) #) is full SubRelStr of b1
proof end;

theorem Th58: :: YELLOW_0:58
for b1 being RelStr
for b2, b3 being full SubRelStr of b1 holds
( the carrier of b2 = the carrier of b3 implies RelStr(# the carrier of b2,the InternalRel of b2 #) = RelStr(# the carrier of b3,the InternalRel of b3 #) )
proof end;

definition
let c1 be RelStr ;
let c2 be Subset of c1;
func subrelstr c2 -> strict full SubRelStr of a1 means :: YELLOW_0:def 15
the carrier of a3 = a2;
uniqueness
for b1, b2 being strict full SubRelStr of c1 holds
( the carrier of b1 = c2 & the carrier of b2 = c2 implies b1 = b2 )
by Th58;
existence
ex b1 being strict full SubRelStr of c1 st the carrier of b1 = c2
proof end;
end;

:: deftheorem Def15 defines subrelstr YELLOW_0:def 15 :
for b1 being RelStr
for b2 being Subset of b1
for b3 being strict full SubRelStr of b1 holds
( b3 = subrelstr b2 iff the carrier of b3 = b2 );

theorem Th59: :: YELLOW_0:59
for b1 being non empty RelStr
for b2 being non empty SubRelStr of b1
for b3 being Element of b2 holds
b3 is Element of b1
proof end;

theorem Th60: :: YELLOW_0:60
for b1 being RelStr
for b2 being SubRelStr of b1
for b3, b4 being Element of b1
for b5, b6 being Element of b2 holds
( b5 = b3 & b6 = b4 & b5 <= b6 implies b3 <= b4 )
proof end;

theorem Th61: :: YELLOW_0:61
for b1 being RelStr
for b2 being full SubRelStr of b1
for b3, b4 being Element of b1
for b5, b6 being Element of b2 holds
( b5 = b3 & b6 = b4 & b3 <= b4 & b5 in the carrier of b2 & b6 in the carrier of b2 implies b5 <= b6 )
proof end;

theorem Th62: :: YELLOW_0:62
for b1 being non empty RelStr
for b2 being non empty full SubRelStr of b1
for b3 being set
for b4 being Element of b1
for b5 being Element of b2 holds
( b5 = b4 implies ( ( b4 is_<=_than b3 implies b5 is_<=_than b3 ) & ( b4 is_>=_than b3 implies b5 is_>=_than b3 ) ) )
proof end;

theorem Th63: :: YELLOW_0:63
for b1 being non empty RelStr
for b2 being non empty SubRelStr of b1
for b3 being Subset of b2
for b4 being Element of b1
for b5 being Element of b2 holds
( b5 = b4 implies ( ( b5 is_<=_than b3 implies b4 is_<=_than b3 ) & ( b5 is_>=_than b3 implies b4 is_>=_than b3 ) ) )
proof end;

registration
let c1 be reflexive RelStr ;
cluster full -> reflexive full SubRelStr of a1;
coherence
for b1 being full SubRelStr of c1 holds b1 is reflexive
proof end;
end;

registration
let c1 be transitive RelStr ;
cluster full -> transitive full SubRelStr of a1;
coherence
for b1 being full SubRelStr of c1 holds b1 is transitive
proof end;
end;

registration
let c1 be antisymmetric RelStr ;
cluster full -> antisymmetric full SubRelStr of a1;
coherence
for b1 being full SubRelStr of c1 holds b1 is antisymmetric
proof end;
end;

definition
let c1 be non empty RelStr ;
let c2 be SubRelStr of c1;
attr a2 is meet-inheriting means :Def16: :: YELLOW_0:def 16
for b1, b2 being Element of a1 holds
( b1 in the carrier of a2 & b2 in the carrier of a2 & ex_inf_of {b1,b2},a1 implies inf {b1,b2} in the carrier of a2 );
attr a2 is join-inheriting means :Def17: :: YELLOW_0:def 17
for b1, b2 being Element of a1 holds
( b1 in the carrier of a2 & b2 in the carrier of a2 & ex_sup_of {b1,b2},a1 implies sup {b1,b2} in the carrier of a2 );
end;

:: deftheorem Def16 defines meet-inheriting YELLOW_0:def 16 :
for b1 being non empty RelStr
for b2 being SubRelStr of b1 holds
( b2 is meet-inheriting iff for b3, b4 being Element of b1 holds
( b3 in the carrier of b2 & b4 in the carrier of b2 & ex_inf_of {b3,b4},b1 implies inf {b3,b4} in the carrier of b2 ) );

:: deftheorem Def17 defines join-inheriting YELLOW_0:def 17 :
for b1 being non empty RelStr
for b2 being SubRelStr of b1 holds
( b2 is join-inheriting iff for b3, b4 being Element of b1 holds
( b3 in the carrier of b2 & b4 in the carrier of b2 & ex_sup_of {b3,b4},b1 implies sup {b3,b4} in the carrier of b2 ) );

definition
let c1 be non empty RelStr ;
let c2 be SubRelStr of c1;
attr a2 is infs-inheriting means :: YELLOW_0:def 18
for b1 being Subset of a2 holds
( ex_inf_of b1,a1 implies "/\" b1,a1 in the carrier of a2 );
attr a2 is sups-inheriting means :: YELLOW_0:def 19
for b1 being Subset of a2 holds
( ex_sup_of b1,a1 implies "\/" b1,a1 in the carrier of a2 );
end;

:: deftheorem Def18 defines infs-inheriting YELLOW_0:def 18 :
for b1 being non empty RelStr
for b2 being SubRelStr of b1 holds
( b2 is infs-inheriting iff for b3 being Subset of b2 holds
( ex_inf_of b3,b1 implies "/\" b3,b1 in the carrier of b2 ) );

:: deftheorem Def19 defines sups-inheriting YELLOW_0:def 19 :
for b1 being non empty RelStr
for b2 being SubRelStr of b1 holds
( b2 is sups-inheriting iff for b3 being Subset of b2 holds
( ex_sup_of b3,b1 implies "\/" b3,b1 in the carrier of b2 ) );

registration
let c1 be non empty RelStr ;
cluster infs-inheriting -> meet-inheriting SubRelStr of a1;
coherence
for b1 being SubRelStr of c1 holds
( b1 is infs-inheriting implies b1 is meet-inheriting )
proof end;
cluster sups-inheriting -> join-inheriting SubRelStr of a1;
coherence
for b1 being SubRelStr of c1 holds
( b1 is sups-inheriting implies b1 is join-inheriting )
proof end;
end;

registration
let c1 be non empty RelStr ;
cluster non empty strict full meet-inheriting join-inheriting infs-inheriting sups-inheriting SubRelStr of a1;
existence
ex b1 being SubRelStr of c1 st
( b1 is infs-inheriting & b1 is sups-inheriting & not b1 is empty & b1 is full & b1 is strict )
proof end;
end;

theorem Th64: :: YELLOW_0:64
for b1 being non empty transitive RelStr
for b2 being non empty full SubRelStr of b1
for b3 being Subset of b2 holds
( ex_inf_of b3,b1 & "/\" b3,b1 in the carrier of b2 implies ( ex_inf_of b3,b2 & "/\" b3,b2 = "/\" b3,b1 ) )
proof end;

theorem Th65: :: YELLOW_0:65
for b1 being non empty transitive RelStr
for b2 being non empty full SubRelStr of b1
for b3 being Subset of b2 holds
( ex_sup_of b3,b1 & "\/" b3,b1 in the carrier of b2 implies ( ex_sup_of b3,b2 & "\/" b3,b2 = "\/" b3,b1 ) )
proof end;

theorem Th66: :: YELLOW_0:66
for b1 being non empty transitive RelStr
for b2 being non empty full SubRelStr of b1
for b3, b4 being Element of b2 holds
( ex_inf_of {b3,b4},b1 & "/\" {b3,b4},b1 in the carrier of b2 implies ( ex_inf_of {b3,b4},b2 & "/\" {b3,b4},b2 = "/\" {b3,b4},b1 ) ) by Th64;

theorem Th67: :: YELLOW_0:67
for b1 being non empty transitive RelStr
for b2 being non empty full SubRelStr of b1
for b3, b4 being Element of b2 holds
( ex_sup_of {b3,b4},b1 & "\/" {b3,b4},b1 in the carrier of b2 implies ( ex_sup_of {b3,b4},b2 & "\/" {b3,b4},b2 = "\/" {b3,b4},b1 ) ) by Th65;

registration
let c1 be transitive antisymmetric with_infima RelStr ;
cluster non empty full meet-inheriting -> non empty transitive antisymmetric with_infima full meet-inheriting SubRelStr of a1;
coherence
for b1 being non empty full meet-inheriting SubRelStr of c1 holds b1 is with_infima
proof end;
end;

registration
let c1 be transitive antisymmetric with_suprema RelStr ;
cluster non empty full join-inheriting -> non empty transitive antisymmetric with_suprema full join-inheriting SubRelStr of a1;
coherence
for b1 being non empty full join-inheriting SubRelStr of c1 holds b1 is with_suprema
proof end;
end;

theorem Th68: :: YELLOW_0:68
for b1 being non empty complete Poset
for b2 being non empty full SubRelStr of b1
for b3 being Subset of b2 holds
( "/\" b3,b1 in the carrier of b2 implies "/\" b3,b2 = "/\" b3,b1 )
proof end;

theorem Th69: :: YELLOW_0:69
for b1 being non empty complete Poset
for b2 being non empty full SubRelStr of b1
for b3 being Subset of b2 holds
( "\/" b3,b1 in the carrier of b2 implies "\/" b3,b2 = "\/" b3,b1 )
proof end;

theorem Th70: :: YELLOW_0:70
for b1 being with_infima Poset
for b2 being non empty full meet-inheriting SubRelStr of b1
for b3, b4 being Element of b2
for b5, b6 being Element of b1 holds
( b5 = b3 & b6 = b4 implies b3 "/\" b4 = b5 "/\" b6 )
proof end;

theorem Th71: :: YELLOW_0:71
for b1 being with_suprema Poset
for b2 being non empty full join-inheriting SubRelStr of b1
for b3, b4 being Element of b2
for b5, b6 being Element of b1 holds
( b5 = b3 & b6 = b4 implies b3 "\/" b4 = b5 "\/" b6 )
proof end;