:: LATTICE4 semantic presentation

theorem Th1: :: LATTICE4:1
canceled;

theorem Th2: :: LATTICE4:2
canceled;

theorem Th3: :: LATTICE4:3
for b1 being set holds
not ( b1 <> {} & ( for b2 being set holds
not ( b2 <> {} & b2 c= b1 & b2 is c=-linear & ( for b3 being set holds
not ( b3 in b1 & ( for b4 being set holds
( b4 in b2 implies b4 c= b3 ) ) ) ) ) ) & ( for b2 being set holds
not ( b2 in b1 & ( for b3 being set holds
not ( b3 in b1 & b3 <> b2 & b2 c= b3 ) ) ) ) )
proof end;

theorem Th4: :: LATTICE4:4
for b1 being Lattice holds <.b1.) is prime
proof end;

theorem Th5: :: LATTICE4:5
for b1 being Lattice
for b2, b3 being Filter of b1 holds
( b2 c= <.(b2 \/ b3).) & b3 c= <.(b2 \/ b3).) )
proof end;

theorem Th6: :: LATTICE4:6
for b1 being Lattice
for b2 being Filter of b1
for b3, b4 being Element of b1 holds
not ( b3 in <.(<.b4.) \/ b2).) & ( for b5 being Element of b1 holds
not ( b5 in b2 & b4 "/\" b5 [= b3 ) ) )
proof end;

definition
let c1, c2 be Lattice;
mode Homomorphism of c1,c2 -> Function of the carrier of a1,the carrier of a2 means :Def1: :: LATTICE4:def 1
for b1, b2 being Element of a1 holds
( a3 . (b1 "\/" b2) = (a3 . b1) "\/" (a3 . b2) & a3 . (b1 "/\" b2) = (a3 . b1) "/\" (a3 . b2) );
existence
ex b1 being Function of the carrier of c1,the carrier of c2 st
for b2, b3 being Element of c1 holds
( b1 . (b2 "\/" b3) = (b1 . b2) "\/" (b1 . b3) & b1 . (b2 "/\" b3) = (b1 . b2) "/\" (b1 . b3) )
proof end;
end;

:: deftheorem Def1 defines Homomorphism LATTICE4:def 1 :
for b1, b2 being Lattice
for b3 being Function of the carrier of b1,the carrier of b2 holds
( b3 is Homomorphism of b1,b2 iff for b4, b5 being Element of b1 holds
( b3 . (b4 "\/" b5) = (b3 . b4) "\/" (b3 . b5) & b3 . (b4 "/\" b5) = (b3 . b4) "/\" (b3 . b5) ) );

theorem Th7: :: LATTICE4:7
for b1, b2 being Lattice
for b3, b4 being Element of b1
for b5 being Homomorphism of b1,b2 holds
( b3 [= b4 implies b5 . b3 [= b5 . b4 )
proof end;

definition
let c1, c2 be Lattice;
let c3 be Function of the carrier of c1,the carrier of c2;
attr a3 is monomorphism means :Def2: :: LATTICE4:def 2
a3 is one-to-one;
attr a3 is epimorphism means :Def3: :: LATTICE4:def 3
rng a3 = the carrier of a2;
end;

:: deftheorem Def2 defines monomorphism LATTICE4:def 2 :
for b1, b2 being Lattice
for b3 being Function of the carrier of b1,the carrier of b2 holds
( b3 is monomorphism iff b3 is one-to-one );

:: deftheorem Def3 defines epimorphism LATTICE4:def 3 :
for b1, b2 being Lattice
for b3 being Function of the carrier of b1,the carrier of b2 holds
( b3 is epimorphism iff rng b3 = the carrier of b2 );

theorem Th8: :: LATTICE4:8
for b1, b2 being Lattice
for b3, b4 being Element of b1
for b5 being Homomorphism of b1,b2 holds
( b5 is monomorphism implies ( b3 [= b4 iff b5 . b3 [= b5 . b4 ) )
proof end;

theorem Th9: :: LATTICE4:9
for b1, b2 being Lattice
for b3 being Function of the carrier of b1,the carrier of b2 holds
( b3 is epimorphism implies for b4 being Element of b2 holds
ex b5 being Element of b1 st b4 = b3 . b5 )
proof end;

definition
let c1, c2 be Lattice;
let c3 be Homomorphism of c1,c2;
attr a3 is isomorphism means :Def4: :: LATTICE4:def 4
( a3 is monomorphism & a3 is epimorphism );
end;

:: deftheorem Def4 defines isomorphism LATTICE4:def 4 :
for b1, b2 being Lattice
for b3 being Homomorphism of b1,b2 holds
( b3 is isomorphism iff ( b3 is monomorphism & b3 is epimorphism ) );

definition
let c1, c2 be Lattice;
redefine pred c1,c2 are_isomorphic means :: LATTICE4:def 5
ex b1 being Homomorphism of a1,a2 st b1 is isomorphism;
compatibility
( c1,c2 are_isomorphic iff ex b1 being Homomorphism of c1,c2 st b1 is isomorphism )
proof end;
end;

:: deftheorem Def5 defines are_isomorphic LATTICE4:def 5 :
for b1, b2 being Lattice holds
( b1,b2 are_isomorphic iff ex b3 being Homomorphism of b1,b2 st b3 is isomorphism );

definition
let c1, c2 be Lattice;
let c3 be Homomorphism of c1,c2;
pred c3 preserves_implication means :Def6: :: LATTICE4:def 6
for b1, b2 being Element of a1 holds a3 . (b1 => b2) = (a3 . b1) => (a3 . b2);
pred c3 preserves_top means :Def7: :: LATTICE4:def 7
a3 . (Top a1) = Top a2;
pred c3 preserves_bottom means :Def8: :: LATTICE4:def 8
a3 . (Bottom a1) = Bottom a2;
pred c3 preserves_complement means :Def9: :: LATTICE4:def 9
for b1 being Element of a1 holds a3 . (b1 ` ) = (a3 . b1) ` ;
end;

:: deftheorem Def6 defines preserves_implication LATTICE4:def 6 :
for b1, b2 being Lattice
for b3 being Homomorphism of b1,b2 holds
( b3 preserves_implication iff for b4, b5 being Element of b1 holds b3 . (b4 => b5) = (b3 . b4) => (b3 . b5) );

:: deftheorem Def7 defines preserves_top LATTICE4:def 7 :
for b1, b2 being Lattice
for b3 being Homomorphism of b1,b2 holds
( b3 preserves_top iff b3 . (Top b1) = Top b2 );

:: deftheorem Def8 defines preserves_bottom LATTICE4:def 8 :
for b1, b2 being Lattice
for b3 being Homomorphism of b1,b2 holds
( b3 preserves_bottom iff b3 . (Bottom b1) = Bottom b2 );

:: deftheorem Def9 defines preserves_complement LATTICE4:def 9 :
for b1, b2 being Lattice
for b3 being Homomorphism of b1,b2 holds
( b3 preserves_complement iff for b4 being Element of b1 holds b3 . (b4 ` ) = (b3 . b4) ` );

definition
let c1 be Lattice;
mode ClosedSubset of c1 -> Subset of a1 means :Def10: :: LATTICE4:def 10
for b1, b2 being Element of a1 holds
( b1 in a2 & b2 in a2 implies ( b1 "/\" b2 in a2 & b1 "\/" b2 in a2 ) );
existence
ex b1 being Subset of c1 st
for b2, b3 being Element of c1 holds
( b2 in b1 & b3 in b1 implies ( b2 "/\" b3 in b1 & b2 "\/" b3 in b1 ) )
proof end;
end;

:: deftheorem Def10 defines ClosedSubset LATTICE4:def 10 :
for b1 being Lattice
for b2 being Subset of b1 holds
( b2 is ClosedSubset of b1 iff for b3, b4 being Element of b1 holds
( b3 in b2 & b4 in b2 implies ( b3 "/\" b4 in b2 & b3 "\/" b4 in b2 ) ) );

theorem Th10: :: LATTICE4:10
for b1 being Lattice holds
the carrier of b1 is ClosedSubset of b1
proof end;

registration
let c1 be Lattice;
cluster non empty ClosedSubset of a1;
existence
not for b1 being ClosedSubset of c1 holds b1 is empty
proof end;
end;

theorem Th11: :: LATTICE4:11
for b1 being Lattice
for b2 being Filter of b1 holds
b2 is ClosedSubset of b1
proof end;

definition
let c1 be Lattice;
let c2 be Finite_Subset of the carrier of c1;
canceled;
func FinJoin c2 -> Element of a1 equals :: LATTICE4:def 12
FinJoin a2,(id a1);
coherence
FinJoin c2,(id c1) is Element of c1
;
func FinMeet c2 -> Element of a1 equals :: LATTICE4:def 13
FinMeet a2,(id a1);
coherence
FinMeet c2,(id c1) is Element of c1
;
end;

:: deftheorem Def11 LATTICE4:def 11 :
canceled;

:: deftheorem Def12 defines FinJoin LATTICE4:def 12 :
for b1 being Lattice
for b2 being Finite_Subset of the carrier of b1 holds FinJoin b2 = FinJoin b2,(id b1);

:: deftheorem Def13 defines FinMeet LATTICE4:def 13 :
for b1 being Lattice
for b2 being Finite_Subset of the carrier of b1 holds FinMeet b2 = FinMeet b2,(id b1);

theorem Th12: :: LATTICE4:12
canceled;

theorem Th13: :: LATTICE4:13
canceled;

theorem Th14: :: LATTICE4:14
for b1 being Lattice
for b2 being Finite_Subset of the carrier of b1 holds FinMeet b2 = the L_meet of b1 $$ b2,(id b1) by LATTICE2:def 4;

theorem Th15: :: LATTICE4:15
for b1 being Lattice
for b2 being Finite_Subset of the carrier of b1 holds FinJoin b2 = the L_join of b1 $$ b2,(id b1) by LATTICE2:def 3;

theorem Th16: :: LATTICE4:16
for b1 being Lattice
for b2 being Element of b1 holds FinJoin {.b2.} = b2
proof end;

theorem Th17: :: LATTICE4:17
for b1 being Lattice
for b2 being Element of b1 holds FinMeet {.b2.} = b2
proof end;

theorem Th18: :: LATTICE4:18
for b1 being Lattice
for b2 being distributive Lattice
for b3 being Homomorphism of b2,b1 holds
( b3 is epimorphism implies b1 is distributive )
proof end;

theorem Th19: :: LATTICE4:19
for b1 being Lattice
for b2 being lower-bounded Lattice
for b3 being Homomorphism of b2,b1 holds
( b3 is epimorphism implies ( b1 is lower-bounded & b3 preserves_bottom ) )
proof end;

theorem Th20: :: LATTICE4:20
for b1 being lower-bounded Lattice
for b2 being Finite_Subset of the carrier of b1
for b3 being Element of b1
for b4 being UnOp of the carrier of b1 holds FinJoin (b2 \/ {.b3.}),b4 = (FinJoin b2,b4) "\/" (b4 . b3)
proof end;

theorem Th21: :: LATTICE4:21
for b1 being lower-bounded Lattice
for b2 being Finite_Subset of the carrier of b1
for b3 being Element of b1 holds FinJoin (b2 \/ {.b3.}) = (FinJoin b2) "\/" b3
proof end;

theorem Th22: :: LATTICE4:22
for b1 being lower-bounded Lattice
for b2, b3 being Finite_Subset of the carrier of b1 holds (FinJoin b2) "\/" (FinJoin b3) = FinJoin (b2 \/ b3)
proof end;

Lemma22: for b1 being lower-bounded Lattice
for b2 being Function of the carrier of b1,the carrier of b1 holds FinJoin ({}. the carrier of b1),b2 = Bottom b1
proof end;

theorem Th23: :: LATTICE4:23
for b1 being lower-bounded Lattice holds FinJoin ({}. the carrier of b1) = Bottom b1 by Lemma22;

theorem Th24: :: LATTICE4:24
for b1 being lower-bounded Lattice
for b2 being ClosedSubset of b1 holds
( Bottom b1 in b2 implies for b3 being Finite_Subset of the carrier of b1 holds
( b3 c= b2 implies FinJoin b3 in b2 ) )
proof end;

theorem Th25: :: LATTICE4:25
for b1 being Lattice
for b2 being upper-bounded Lattice
for b3 being Homomorphism of b2,b1 holds
( b3 is epimorphism implies ( b1 is upper-bounded & b3 preserves_top ) )
proof end;

Lemma26: for b1 being upper-bounded Lattice
for b2 being Function of the carrier of b1,the carrier of b1 holds FinMeet ({}. the carrier of b1),b2 = Top b1
proof end;

theorem Th26: :: LATTICE4:26
for b1 being upper-bounded Lattice holds FinMeet ({}. the carrier of b1) = Top b1 by Lemma26;

theorem Th27: :: LATTICE4:27
for b1 being upper-bounded Lattice
for b2 being Finite_Subset of the carrier of b1
for b3 being Element of b1
for b4 being UnOp of the carrier of b1 holds FinMeet (b2 \/ {.b3.}),b4 = (FinMeet b2,b4) "/\" (b4 . b3)
proof end;

theorem Th28: :: LATTICE4:28
for b1 being upper-bounded Lattice
for b2 being Finite_Subset of the carrier of b1
for b3 being Element of b1 holds FinMeet (b2 \/ {.b3.}) = (FinMeet b2) "/\" b3
proof end;

theorem Th29: :: LATTICE4:29
for b1 being upper-bounded Lattice
for b2 being Finite_Subset of the carrier of b1
for b3, b4 being UnOp of the carrier of b1 holds FinMeet (b3 .: b2),b4 = FinMeet b2,(b4 * b3)
proof end;

theorem Th30: :: LATTICE4:30
for b1 being upper-bounded Lattice
for b2, b3 being Finite_Subset of the carrier of b1 holds (FinMeet b2) "/\" (FinMeet b3) = FinMeet (b2 \/ b3)
proof end;

theorem Th31: :: LATTICE4:31
for b1 being upper-bounded Lattice
for b2 being ClosedSubset of b1 holds
( Top b1 in b2 implies for b3 being Finite_Subset of the carrier of b1 holds
( b3 c= b2 implies FinMeet b3 in b2 ) )
proof end;

Lemma33: for b1 being distributive upper-bounded Lattice
for b2 being Finite_Subset of the carrier of b1
for b3 being Element of b1
for b4 being UnOp of the carrier of b1 holds the L_join of b1 . (the L_meet of b1 $$ b2,b4),b3 = the L_meet of b1 $$ b2,(the L_join of b1 [:] b4,b3)
proof end;

theorem Th32: :: LATTICE4:32
for b1 being distributive upper-bounded Lattice
for b2 being Finite_Subset of the carrier of b1
for b3 being Element of b1 holds (FinMeet b2) "\/" b3 = FinMeet ((the L_join of b1 [:] (id b1),b3) .: b2)
proof end;

theorem Th33: :: LATTICE4:33
for b1 being C_Lattice
for b2 being implicative Lattice
for b3 being Homomorphism of b2,b1
for b4, b5 being Element of b2 holds (b3 . b4) "/\" (b3 . (b4 => b5)) [= b3 . b5
proof end;

theorem Th34: :: LATTICE4:34
for b1 being C_Lattice
for b2 being implicative Lattice
for b3 being Homomorphism of b2,b1
for b4, b5, b6 being Element of b2 holds
( b3 is monomorphism & (b3 . b4) "/\" (b3 . b5) [= b3 . b6 implies b3 . b5 [= b3 . (b4 => b6) )
proof end;

theorem Th35: :: LATTICE4:35
for b1 being C_Lattice
for b2 being implicative Lattice
for b3 being Homomorphism of b2,b1 holds
( b3 is isomorphism implies ( b1 is implicative & b3 preserves_implication ) )
proof end;

theorem Th36: :: LATTICE4:36
for b1 being Boolean Lattice holds (Top b1) ` = Bottom b1
proof end;

theorem Th37: :: LATTICE4:37
for b1 being Boolean Lattice holds (Bottom b1) ` = Top b1
proof end;

theorem Th38: :: LATTICE4:38
for b1 being C_Lattice
for b2 being Boolean Lattice
for b3 being Homomorphism of b2,b1 holds
( b3 is epimorphism implies ( b1 is Boolean & b3 preserves_complement ) )
proof end;

definition
let c1 be Boolean Lattice;
mode Field of c1 -> non empty Subset of a1 means :Def14: :: LATTICE4:def 14
for b1, b2 being Element of a1 holds
( b1 in a2 & b2 in a2 implies ( b1 "/\" b2 in a2 & b1 ` in a2 ) );
existence
ex b1 being non empty Subset of c1 st
for b2, b3 being Element of c1 holds
( b2 in b1 & b3 in b1 implies ( b2 "/\" b3 in b1 & b2 ` in b1 ) )
proof end;
end;

:: deftheorem Def14 defines Field LATTICE4:def 14 :
for b1 being Boolean Lattice
for b2 being non empty Subset of b1 holds
( b2 is Field of b1 iff for b3, b4 being Element of b1 holds
( b3 in b2 & b4 in b2 implies ( b3 "/\" b4 in b2 & b3 ` in b2 ) ) );

theorem Th39: :: LATTICE4:39
for b1 being Boolean Lattice
for b2, b3 being Element of b1
for b4 being Field of b1 holds
( b2 in b4 & b3 in b4 implies b2 "\/" b3 in b4 )
proof end;

theorem Th40: :: LATTICE4:40
for b1 being Boolean Lattice
for b2, b3 being Element of b1
for b4 being Field of b1 holds
( b2 in b4 & b3 in b4 implies b2 => b3 in b4 )
proof end;

theorem Th41: :: LATTICE4:41
for b1 being Boolean Lattice holds
the carrier of b1 is Field of b1
proof end;

theorem Th42: :: LATTICE4:42
for b1 being Boolean Lattice
for b2 being Field of b1 holds
b2 is ClosedSubset of b1
proof end;

definition
let c1 be Boolean Lattice;
let c2 be non empty Subset of c1;
func field_by c2 -> Field of a1 means :Def15: :: LATTICE4:def 15
( a2 c= a3 & ( for b1 being Field of a1 holds
( a2 c= b1 implies a3 c= b1 ) ) );
existence
ex b1 being Field of c1 st
( c2 c= b1 & ( for b2 being Field of c1 holds
( c2 c= b2 implies b1 c= b2 ) ) )
proof end;
uniqueness
for b1, b2 being Field of c1 holds
( c2 c= b1 & ( for b3 being Field of c1 holds
( c2 c= b3 implies b1 c= b3 ) ) & c2 c= b2 & ( for b3 being Field of c1 holds
( c2 c= b3 implies b2 c= b3 ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def15 defines field_by LATTICE4:def 15 :
for b1 being Boolean Lattice
for b2 being non empty Subset of b1
for b3 being Field of b1 holds
( b3 = field_by b2 iff ( b2 c= b3 & ( for b4 being Field of b1 holds
( b2 c= b4 implies b3 c= b4 ) ) ) );

definition
let c1 be Boolean Lattice;
let c2 be non empty Subset of c1;
func SetImp c2 -> Subset of a1 equals :: LATTICE4:def 16
{ (b1 => b2) where B is Element of a1, B is Element of a1 : ( b1 in a2 & b2 in a2 ) } ;
coherence
{ (b1 => b2) where B is Element of c1, B is Element of c1 : ( b1 in c2 & b2 in c2 ) } is Subset of c1
proof end;
end;

:: deftheorem Def16 defines SetImp LATTICE4:def 16 :
for b1 being Boolean Lattice
for b2 being non empty Subset of b1 holds SetImp b2 = { (b3 => b4) where B is Element of b1, B is Element of b1 : ( b3 in b2 & b4 in b2 ) } ;

registration
let c1 be Boolean Lattice;
let c2 be non empty Subset of c1;
cluster SetImp a2 -> non empty ;
coherence
not SetImp c2 is empty
proof end;
end;

theorem Th43: :: LATTICE4:43
for b1 being set
for b2 being Boolean Lattice
for b3 being non empty Subset of b2 holds
( b1 in SetImp b3 iff ex b4, b5 being Element of b2 st
( b1 = b4 => b5 & b4 in b3 & b5 in b3 ) ) ;

theorem Th44: :: LATTICE4:44
for b1 being Boolean Lattice
for b2 being non empty Subset of b1
for b3 being Element of b1 holds
( b3 in SetImp b2 iff ex b4, b5 being Element of b1 st
( b3 = (b4 ` ) "\/" b5 & b4 in b2 & b5 in b2 ) )
proof end;

definition
let c1 be Boolean Lattice;
deffunc H1( Element of c1) -> Element of the carrier of c1 = a1 ` ;
func comp c1 -> Function of the carrier of a1,the carrier of a1 means :Def17: :: LATTICE4:def 17
for b1 being Element of a1 holds a2 . b1 = b1 ` ;
existence
ex b1 being Function of the carrier of c1,the carrier of c1 st
for b2 being Element of c1 holds b1 . b2 = b2 `
proof end;
uniqueness
for b1, b2 being Function of the carrier of c1,the carrier of c1 holds
( ( for b3 being Element of c1 holds b1 . b3 = b3 ` ) & ( for b3 being Element of c1 holds b2 . b3 = b3 ` ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def17 defines comp LATTICE4:def 17 :
for b1 being Boolean Lattice
for b2 being Function of the carrier of b1,the carrier of b1 holds
( b2 = comp b1 iff for b3 being Element of b1 holds b2 . b3 = b3 ` );

theorem Th45: :: LATTICE4:45
for b1 being Boolean Lattice
for b2 being Element of b1
for b3 being Finite_Subset of the carrier of b1 holds FinJoin (b3 \/ {.b2.}),(comp b1) = (FinJoin b3,(comp b1)) "\/" (b2 ` )
proof end;

theorem Th46: :: LATTICE4:46
for b1 being Boolean Lattice
for b2 being Finite_Subset of the carrier of b1 holds (FinJoin b2) ` = FinMeet b2,(comp b1)
proof end;

theorem Th47: :: LATTICE4:47
for b1 being Boolean Lattice
for b2 being Element of b1
for b3 being Finite_Subset of the carrier of b1 holds FinMeet (b3 \/ {.b2.}),(comp b1) = (FinMeet b3,(comp b1)) "/\" (b2 ` )
proof end;

theorem Th48: :: LATTICE4:48
for b1 being Boolean Lattice
for b2 being Finite_Subset of the carrier of b1 holds (FinMeet b2) ` = FinJoin b2,(comp b1)
proof end;

theorem Th49: :: LATTICE4:49
for b1 being Boolean Lattice
for b2 being non empty ClosedSubset of b1 holds
( Bottom b1 in b2 & Top b1 in b2 implies for b3 being Finite_Subset of the carrier of b1 holds
not ( b3 c= SetImp b2 & ( for b4 being Finite_Subset of the carrier of b1 holds
not ( b4 c= SetImp b2 & FinJoin b3,(comp b1) = FinMeet b4 ) ) ) )
proof end;

theorem Th50: :: LATTICE4:50
for b1 being Boolean Lattice
for b2 being non empty ClosedSubset of b1 holds
( Bottom b1 in b2 & Top b1 in b2 implies { (FinMeet b3) where B is Finite_Subset of the carrier of b1 : b3 c= SetImp b2 } = field_by b2 )
proof end;