:: WAYBEL_1 semantic presentation

definition
let c1, c2 be non empty 1-sorted ;
let c3 be Function of c1,c2;
redefine attr one-to-one as a3 is one-to-one means :: WAYBEL_1:def 1
for b1, b2 being Element of a1 st a3 . b1 = a3 . b2 holds
b1 = b2;
compatibility
( c3 is one-to-one iff for b1, b2 being Element of c1 st c3 . b1 = c3 . b2 holds
b1 = b2 )
proof end;
end;

:: deftheorem Def1 defines one-to-one WAYBEL_1:def 1 :
for b1, b2 being non empty 1-sorted
for b3 being Function of b1,b2 holds
( b3 is one-to-one iff for b4, b5 being Element of b1 st b3 . b4 = b3 . b5 holds
b4 = b5 );

definition
let c1, c2 be non empty RelStr ;
let c3 be Function of c1,c2;
redefine attr a3 is monotone means :Def2: :: WAYBEL_1:def 2
for b1, b2 being Element of a1 st b1 <= b2 holds
a3 . b1 <= a3 . b2;
compatibility
( c3 is monotone iff for b1, b2 being Element of c1 st b1 <= b2 holds
c3 . b1 <= c3 . b2 )
proof end;
end;

:: deftheorem Def2 defines monotone WAYBEL_1:def 2 :
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 holds
( b3 is monotone iff for b4, b5 being Element of b1 st b4 <= b5 holds
b3 . b4 <= b3 . b5 );

theorem Th1: :: WAYBEL_1:1
canceled;

theorem Th2: :: WAYBEL_1:2
for b1 being transitive antisymmetric with_infima RelStr
for b2, b3, b4 being Element of b1 st b2 <= b3 holds
b2 "/\" b4 <= b3 "/\" b4
proof end;

theorem Th3: :: WAYBEL_1:3
for b1 being transitive antisymmetric with_suprema RelStr
for b2, b3, b4 being Element of b1 st b2 <= b3 holds
b2 "\/" b4 <= b3 "\/" b4
proof end;

theorem Th4: :: WAYBEL_1:4
for b1 being non empty antisymmetric lower-bounded RelStr
for b2 being Element of b1 holds
( ( b1 is with_infima implies (Bottom b1) "/\" b2 = Bottom b1 ) & ( b1 is with_suprema & b1 is reflexive & b1 is transitive implies (Bottom b1) "\/" b2 = b2 ) )
proof end;

theorem Th5: :: WAYBEL_1:5
for b1 being non empty antisymmetric upper-bounded RelStr
for b2 being Element of b1 holds
( ( b1 is with_infima & b1 is transitive & b1 is reflexive implies (Top b1) "/\" b2 = b2 ) & ( b1 is with_suprema implies (Top b1) "\/" b2 = Top b1 ) )
proof end;

definition
let c1 be non empty RelStr ;
attr a1 is distributive means :Def3: :: WAYBEL_1:def 3
for b1, b2, b3 being Element of a1 holds b1 "/\" (b2 "\/" b3) = (b1 "/\" b2) "\/" (b1 "/\" b3);
end;

:: deftheorem Def3 defines distributive WAYBEL_1:def 3 :
for b1 being non empty RelStr holds
( b1 is distributive iff for b2, b3, b4 being Element of b1 holds b2 "/\" (b3 "\/" b4) = (b2 "/\" b3) "\/" (b2 "/\" b4) );

theorem Th6: :: WAYBEL_1:6
for b1 being LATTICE holds
( b1 is distributive iff for b2, b3, b4 being Element of b1 holds b2 "\/" (b3 "/\" b4) = (b2 "\/" b3) "/\" (b2 "\/" b4) )
proof end;

registration
let c1 be set ;
cluster BoolePoset a1 -> distributive ;
coherence
BoolePoset c1 is distributive
proof end;
end;

definition
let c1 be non empty RelStr ;
let c2 be set ;
pred ex_min_of c2,c1 means :: WAYBEL_1:def 4
( ex_inf_of a2,a1 & "/\" a2,a1 in a2 );
pred ex_max_of c2,c1 means :Def5: :: WAYBEL_1:def 5
( ex_sup_of a2,a1 & "\/" a2,a1 in a2 );
end;

:: deftheorem Def4 defines ex_min_of WAYBEL_1:def 4 :
for b1 being non empty RelStr
for b2 being set holds
( ex_min_of b2,b1 iff ( ex_inf_of b2,b1 & "/\" b2,b1 in b2 ) );

:: deftheorem Def5 defines ex_max_of WAYBEL_1:def 5 :
for b1 being non empty RelStr
for b2 being set holds
( ex_max_of b2,b1 iff ( ex_sup_of b2,b1 & "\/" b2,b1 in b2 ) );

notation
let c1 be non empty RelStr ;
let c2 be set ;
synonym c2 has_the_min_in c1 for ex_min_of c2,c1;
synonym c2 has_the_max_in c1 for ex_max_of c2,c1;
end;

definition
let c1 be non empty RelStr ;
let c2 be Element of c1;
let c3 be set ;
pred c2 is_minimum_of c3 means :Def6: :: WAYBEL_1:def 6
( ex_inf_of a3,a1 & a2 = "/\" a3,a1 & "/\" a3,a1 in a3 );
pred c2 is_maximum_of c3 means :Def7: :: WAYBEL_1:def 7
( ex_sup_of a3,a1 & a2 = "\/" a3,a1 & "\/" a3,a1 in a3 );
end;

:: deftheorem Def6 defines is_minimum_of WAYBEL_1:def 6 :
for b1 being non empty RelStr
for b2 being Element of b1
for b3 being set holds
( b2 is_minimum_of b3 iff ( ex_inf_of b3,b1 & b2 = "/\" b3,b1 & "/\" b3,b1 in b3 ) );

:: deftheorem Def7 defines is_maximum_of WAYBEL_1:def 7 :
for b1 being non empty RelStr
for b2 being Element of b1
for b3 being set holds
( b2 is_maximum_of b3 iff ( ex_sup_of b3,b1 & b2 = "\/" b3,b1 & "\/" b3,b1 in b3 ) );

registration
let c1 be RelStr ;
cluster id a1 -> isomorphic ;
coherence
id c1 is isomorphic
proof end;
end;

definition
let c1, c2 be RelStr ;
pred c1,c2 are_isomorphic means :Def8: :: WAYBEL_1:def 8
ex b1 being Function of a1,a2 st b1 is isomorphic;
reflexivity
for b1 being RelStr ex b2 being Function of b1,b1 st b2 is isomorphic
proof end;
end;

:: deftheorem Def8 defines are_isomorphic WAYBEL_1:def 8 :
for b1, b2 being RelStr holds
( b1,b2 are_isomorphic iff ex b3 being Function of b1,b2 st b3 is isomorphic );

theorem Th7: :: WAYBEL_1:7
for b1, b2 being non empty RelStr st b1,b2 are_isomorphic holds
b2,b1 are_isomorphic
proof end;

theorem Th8: :: WAYBEL_1:8
for b1, b2, b3 being RelStr st b1,b2 are_isomorphic & b2,b3 are_isomorphic holds
b1,b3 are_isomorphic
proof end;

definition
let c1, c2 be RelStr ;
mode Connection of c1,c2 -> set means :Def9: :: WAYBEL_1:def 9
ex b1 being Function of a1,a2ex b2 being Function of a2,a1 st a3 = [b1,b2];
existence
ex b1 being set ex b2 being Function of c1,c2ex b3 being Function of c2,c1 st b1 = [b2,b3]
proof end;
end;

:: deftheorem Def9 defines Connection WAYBEL_1:def 9 :
for b1, b2 being RelStr
for b3 being set holds
( b3 is Connection of b1,b2 iff ex b4 being Function of b1,b2ex b5 being Function of b2,b1 st b3 = [b4,b5] );

definition
let c1, c2 be RelStr ;
let c3 be Function of c1,c2;
let c4 be Function of c2,c1;
redefine func [ as [c3,c4] -> Connection of a1,a2;
coherence
[c3,c4] is Connection of c1,c2
by Def9;
end;

definition
let c1, c2 be non empty RelStr ;
let c3 be Connection of c1,c2;
attr a3 is Galois means :Def10: :: WAYBEL_1:def 10
ex b1 being Function of a1,a2ex b2 being Function of a2,a1 st
( a3 = [b1,b2] & b1 is monotone & b2 is monotone & ( for b3 being Element of a2
for b4 being Element of a1 holds
( b3 <= b1 . b4 iff b2 . b3 <= b4 ) ) );
end;

:: deftheorem Def10 defines Galois WAYBEL_1:def 10 :
for b1, b2 being non empty RelStr
for b3 being Connection of b1,b2 holds
( b3 is Galois iff ex b4 being Function of b1,b2ex b5 being Function of b2,b1 st
( b3 = [b4,b5] & b4 is monotone & b5 is monotone & ( for b6 being Element of b2
for b7 being Element of b1 holds
( b6 <= b4 . b7 iff b5 . b6 <= b7 ) ) ) );

theorem Th9: :: WAYBEL_1:9
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 holds
( [b3,b4] is Galois iff ( b3 is monotone & b4 is monotone & ( for b5 being Element of b2
for b6 being Element of b1 holds
( b5 <= b3 . b6 iff b4 . b5 <= b6 ) ) ) )
proof end;

definition
let c1, c2 be non empty RelStr ;
let c3 be Function of c1,c2;
attr a3 is upper_adjoint means :Def11: :: WAYBEL_1:def 11
ex b1 being Function of a2,a1 st [a3,b1] is Galois;
end;

:: deftheorem Def11 defines upper_adjoint WAYBEL_1:def 11 :
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 holds
( b3 is upper_adjoint iff ex b4 being Function of b2,b1 st [b3,b4] is Galois );

notation
let c1, c2 be non empty RelStr ;
let c3 be Function of c1,c2;
synonym c3 has_a_lower_adjoint for upper_adjoint c3;
end;

definition
let c1, c2 be non empty RelStr ;
let c3 be Function of c2,c1;
attr a3 is lower_adjoint means :Def12: :: WAYBEL_1:def 12
ex b1 being Function of a1,a2 st [b1,a3] is Galois;
end;

:: deftheorem Def12 defines lower_adjoint WAYBEL_1:def 12 :
for b1, b2 being non empty RelStr
for b3 being Function of b2,b1 holds
( b3 is lower_adjoint iff ex b4 being Function of b1,b2 st [b4,b3] is Galois );

notation
let c1, c2 be non empty RelStr ;
let c3 be Function of c2,c1;
synonym c3 has_an_upper_adjoint for lower_adjoint c3;
end;

theorem Th10: :: WAYBEL_1:10
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st [b3,b4] is Galois holds
( b3 is upper_adjoint & b4 is lower_adjoint )
proof end;

theorem Th11: :: WAYBEL_1:11
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 holds
( [b3,b4] is Galois iff ( b3 is monotone & ( for b5 being Element of b2 holds b4 . b5 is_minimum_of b3 " (uparrow b5) ) ) )
proof end;

theorem Th12: :: WAYBEL_1:12
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 holds
( [b3,b4] is Galois iff ( b4 is monotone & ( for b5 being Element of b1 holds b3 . b5 is_maximum_of b4 " (downarrow b5) ) ) )
proof end;

theorem Th13: :: WAYBEL_1:13
for b1, b2 being non empty Poset
for b3 being Function of b1,b2 st b3 is upper_adjoint holds
b3 is infs-preserving
proof end;

registration
let c1, c2 be non empty Poset;
cluster upper_adjoint -> infs-preserving M4(the carrier of a1,the carrier of a2);
coherence
for b1 being Function of c1,c2 st b1 is upper_adjoint holds
b1 is infs-preserving
by Th13;
end;

theorem Th14: :: WAYBEL_1:14
for b1, b2 being non empty Poset
for b3 being Function of b2,b1 st b3 is lower_adjoint holds
b3 is sups-preserving
proof end;

registration
let c1, c2 be non empty Poset;
cluster lower_adjoint -> sups-preserving M4(the carrier of a1,the carrier of a2);
coherence
for b1 being Function of c1,c2 st b1 is lower_adjoint holds
b1 is sups-preserving
by Th14;
end;

theorem Th15: :: WAYBEL_1:15
for b1, b2 being non empty Poset
for b3 being Function of b1,b2 st b1 is complete & b3 is infs-preserving holds
ex b4 being Function of b2,b1 st
( [b3,b4] is Galois & ( for b5 being Element of b2 holds b4 . b5 is_minimum_of b3 " (uparrow b5) ) )
proof end;

theorem Th16: :: WAYBEL_1:16
for b1, b2 being non empty Poset
for b3 being Function of b2,b1 st b2 is complete & b3 is sups-preserving holds
ex b4 being Function of b1,b2 st
( [b4,b3] is Galois & ( for b5 being Element of b1 holds b4 . b5 is_maximum_of b3 " (downarrow b5) ) )
proof end;

theorem Th17: :: WAYBEL_1:17
for b1, b2 being non empty Poset
for b3 being Function of b1,b2 st b1 is complete holds
( b3 is infs-preserving iff ( b3 is monotone & b3 has_a_lower_adjoint ) )
proof end;

theorem Th18: :: WAYBEL_1:18
for b1, b2 being non empty Poset
for b3 being Function of b2,b1 st b2 is complete holds
( b3 is sups-preserving iff ( b3 is monotone & b3 has_an_upper_adjoint ) )
proof end;

theorem Th19: :: WAYBEL_1:19
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st [b3,b4] is Galois holds
( b4 * b3 <= id b1 & id b2 <= b3 * b4 )
proof end;

theorem Th20: :: WAYBEL_1:20
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st b3 is monotone & b4 is monotone & b4 * b3 <= id b1 & id b2 <= b3 * b4 holds
[b3,b4] is Galois
proof end;

theorem Th21: :: WAYBEL_1:21
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st b3 is monotone & b4 is monotone & b4 * b3 <= id b1 & id b2 <= b3 * b4 holds
( b4 = (b4 * b3) * b4 & b3 = (b3 * b4) * b3 )
proof end;

theorem Th22: :: WAYBEL_1:22
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st b4 = (b4 * b3) * b4 & b3 = (b3 * b4) * b3 holds
( b3 * b4 is idempotent & b4 * b3 is idempotent )
proof end;

theorem Th23: :: WAYBEL_1:23
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st [b3,b4] is Galois & b3 is onto holds
for b5 being Element of b2 holds b4 . b5 is_minimum_of b3 " {b5}
proof end;

theorem Th24: :: WAYBEL_1:24
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st ( for b5 being Element of b2 holds b4 . b5 is_minimum_of b3 " {b5} ) holds
b3 * b4 = id b2
proof end;

theorem Th25: :: WAYBEL_1:25
for b1, b2 being non empty 1-sorted
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st b4 * b3 = id b1 holds
( b3 is one-to-one & b4 is onto )
proof end;

theorem Th26: :: WAYBEL_1:26
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st [b3,b4] is Galois holds
( b3 is onto iff b4 is one-to-one )
proof end;

theorem Th27: :: WAYBEL_1:27
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st [b3,b4] is Galois & b4 is onto holds
for b5 being Element of b1 holds b3 . b5 is_maximum_of b4 " {b5}
proof end;

theorem Th28: :: WAYBEL_1:28
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st ( for b5 being Element of b1 holds b3 . b5 is_maximum_of b4 " {b5} ) holds
b4 * b3 = id b1
proof end;

theorem Th29: :: WAYBEL_1:29
for b1, b2 being non empty Poset
for b3 being Function of b1,b2
for b4 being Function of b2,b1 st [b3,b4] is Galois holds
( b3 is one-to-one iff b4 is onto )
proof end;

definition
let c1 be non empty RelStr ;
let c2 be Function of c1,c1;
attr a2 is projection means :Def13: :: WAYBEL_1:def 13
( a2 is idempotent & a2 is monotone );
end;

:: deftheorem Def13 defines projection WAYBEL_1:def 13 :
for b1 being non empty RelStr
for b2 being Function of b1,b1 holds
( b2 is projection iff ( b2 is idempotent & b2 is monotone ) );

notation
let c1 be non empty RelStr ;
let c2 be Function of c1,c1;
synonym c2 is_a_projection_operator for projection c2;
end;

registration
let c1 be non empty RelStr ;
cluster id a1 -> isomorphic projection ;
coherence
id c1 is projection
proof end;
end;

registration
let c1 be non empty RelStr ;
cluster projection M4(the carrier of a1,the carrier of a1);
existence
ex b1 being Function of c1,c1 st b1 is projection
proof end;
end;

definition
let c1 be non empty RelStr ;
let c2 be Function of c1,c1;
attr a2 is closure means :Def14: :: WAYBEL_1:def 14
( a2 is projection & id a1 <= a2 );
end;

:: deftheorem Def14 defines closure WAYBEL_1:def 14 :
for b1 being non empty RelStr
for b2 being Function of b1,b1 holds
( b2 is closure iff ( b2 is projection & id b1 <= b2 ) );

notation
let c1 be non empty RelStr ;
let c2 be Function of c1,c1;
synonym c2 is_a_closure_operator for closure c2;
end;

registration
let c1 be non empty RelStr ;
cluster closure -> projection M4(the carrier of a1,the carrier of a1);
coherence
for b1 being Function of c1,c1 st b1 is closure holds
b1 is projection
by Def14;
end;

Lemma36: for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 st b2 is reflexive holds
b3 <= b3
proof end;

registration
let c1 be non empty reflexive RelStr ;
cluster projection closure M4(the carrier of a1,the carrier of a1);
existence
ex b1 being Function of c1,c1 st b1 is closure
proof end;
end;

registration
let c1 be non empty reflexive RelStr ;
cluster id a1 -> isomorphic projection closure ;
coherence
id c1 is closure
proof end;
end;

definition
let c1 be non empty RelStr ;
let c2 be Function of c1,c1;
attr a2 is kernel means :Def15: :: WAYBEL_1:def 15
( a2 is projection & a2 <= id a1 );
end;

:: deftheorem Def15 defines kernel WAYBEL_1:def 15 :
for b1 being non empty RelStr
for b2 being Function of b1,b1 holds
( b2 is kernel iff ( b2 is projection & b2 <= id b1 ) );

notation
let c1 be non empty RelStr ;
let c2 be Function of c1,c1;
synonym c2 is_a_kernel_operator for kernel c2;
end;

registration
let c1 be non empty RelStr ;
cluster kernel -> projection M4(the carrier of a1,the carrier of a1);
coherence
for b1 being Function of c1,c1 st b1 is kernel holds
b1 is projection
by Def15;
end;

registration
let c1 be non empty reflexive RelStr ;
cluster projection kernel M4(the carrier of a1,the carrier of a1);
existence
ex b1 being Function of c1,c1 st b1 is kernel
proof end;
end;

registration
let c1 be non empty reflexive RelStr ;
cluster id a1 -> isomorphic projection closure kernel ;
coherence
id c1 is kernel
proof end;
end;

Lemma38: for b1 being non empty 1-sorted
for b2 being Function of b1,b1 st b2 is idempotent holds
for b3 being set st b3 in rng b2 holds
b2 . b3 = b3
proof end;

theorem Th30: :: WAYBEL_1:30
for b1 being non empty Poset
for b2 being Function of b1,b1
for b3 being Subset of b1 st b2 is_a_closure_operator & ex_inf_of b3,b1 & b3 c= rng b2 holds
inf b3 = b2 . (inf b3)
proof end;

theorem Th31: :: WAYBEL_1:31
for b1 being non empty Poset
for b2 being Function of b1,b1
for b3 being Subset of b1 st b2 is_a_kernel_operator & ex_sup_of b3,b1 & b3 c= rng b2 holds
sup b3 = b2 . (sup b3)
proof end;

definition
let c1, c2 be non empty RelStr ;
let c3 be Function of c1,c2;
func corestr c3 -> Function of a1,(Image a3) equals :: WAYBEL_1:def 16
the carrier of (Image a3) | a3;
coherence
the carrier of (Image c3) | c3 is Function of c1,(Image c3)
proof end;
end;

:: deftheorem Def16 defines corestr WAYBEL_1:def 16 :
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 holds corestr b3 = the carrier of (Image b3) | b3;

theorem Th32: :: WAYBEL_1:32
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 holds corestr b3 = b3
proof end;

Lemma42: for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 holds corestr b3 is onto
proof end;

registration
let c1, c2 be non empty RelStr ;
let c3 be Function of c1,c2;
cluster corestr a3 -> onto ;
coherence
corestr c3 is onto
by Lemma42;
end;

theorem Th33: :: WAYBEL_1:33
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 st b3 is monotone holds
corestr b3 is monotone
proof end;

definition
let c1, c2 be non empty RelStr ;
let c3 be Function of c1,c2;
func inclusion c3 -> Function of (Image a3),a2 equals :: WAYBEL_1:def 17
id (Image a3);
coherence
id (Image c3) is Function of (Image c3),c2
proof end;
end;

:: deftheorem Def17 defines inclusion WAYBEL_1:def 17 :
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 holds inclusion b3 = id (Image b3);

theorem Th34: :: WAYBEL_1:34
for b1, b2 being non empty RelStr
for b3 being Function of b1,b2
for b4 being Element of (Image b3) holds (inclusion b3) . b4 = b4 by TMAP_1:91;

Lemma45: for b1, b2 being non empty RelStr
for b3 being Function of b1,b2 holds inclusion b3 is monotone
proof end;

registration
let c1, c2 be non empty RelStr ;
let c3 be Function of c1,c2;
cluster inclusion a3 -> V5 monotone ;
coherence
( inclusion c3 is one-to-one & inclusion c3 is monotone )
by Lemma45;
end;

theorem Th35: :: WAYBEL_1:35
for b1 being non empty RelStr
for b2 being Function of b1,b1 holds (inclusion b2) * (corestr b2) = b2
proof end;

theorem Th36: :: WAYBEL_1:36
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is idempotent holds
(corestr b2) * (inclusion b2) = id (Image b2)
proof end;

theorem Th37: :: WAYBEL_1:37
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
ex b3 being non empty Posetex b4 being Function of b1,b3ex b5 being Function of b3,b1 st
( b4 is monotone & b4 is onto & b5 is monotone & b5 is one-to-one & b2 = b5 * b4 & id b3 = b4 * b5 )
proof end;

theorem Th38: :: WAYBEL_1:38
for b1 being non empty Poset
for b2 being Function of b1,b1 st ex b3 being non empty Posetex b4 being Function of b1,b3ex b5 being Function of b3,b1 st
( b4 is monotone & b5 is monotone & b2 = b5 * b4 & id b3 = b4 * b5 ) holds
b2 is_a_projection_operator
proof end;

theorem Th39: :: WAYBEL_1:39
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_closure_operator holds
[(inclusion b2),(corestr b2)] is Galois
proof end;

theorem Th40: :: WAYBEL_1:40
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_closure_operator holds
ex b3 being non empty Posetex b4 being Function of b3,b1ex b5 being Function of b1,b3 st
( [b4,b5] is Galois & b2 = b4 * b5 )
proof end;

theorem Th41: :: WAYBEL_1:41
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is monotone & ex b3 being non empty Posetex b4 being Function of b3,b1ex b5 being Function of b1,b3 st
( [b4,b5] is Galois & b2 = b4 * b5 ) holds
b2 is_a_closure_operator
proof end;

theorem Th42: :: WAYBEL_1:42
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_kernel_operator holds
[(corestr b2),(inclusion b2)] is Galois
proof end;

theorem Th43: :: WAYBEL_1:43
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_kernel_operator holds
ex b3 being non empty Posetex b4 being Function of b1,b3ex b5 being Function of b3,b1 st
( [b4,b5] is Galois & b2 = b5 * b4 )
proof end;

theorem Th44: :: WAYBEL_1:44
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is monotone & ex b3 being non empty Posetex b4 being Function of b1,b3ex b5 being Function of b3,b1 st
( [b4,b5] is Galois & b2 = b5 * b4 ) holds
b2 is_a_kernel_operator
proof end;

theorem Th45: :: WAYBEL_1:45
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
rng b2 = { b3 where B is Element of b1 : b3 <= b2 . b3 } /\ { b3 where B is Element of b1 : b2 . b3 <= b3 }
proof end;

theorem Th46: :: WAYBEL_1:46
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
( { b3 where B is Element of b1 : b3 <= b2 . b3 } is non empty Subset of b1 & { b3 where B is Element of b1 : b2 . b3 <= b3 } is non empty Subset of b1 )
proof end;

theorem Th47: :: WAYBEL_1:47
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
( rng (b2 | { b3 where B is Element of b1 : b3 <= b2 . b3 } ) = rng b2 & rng (b2 | { b3 where B is Element of b1 : b2 . b3 <= b3 } ) = rng b2 )
proof end;

theorem Th48: :: WAYBEL_1:48
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
for b3, b4 being non empty Subset of b1 st b3 = { b5 where B is Element of b1 : b5 <= b2 . b5 } holds
b2 | b3 is Function of (subrelstr b3),(subrelstr b3)
proof end;

theorem Th49: :: WAYBEL_1:49
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
for b3 being non empty Subset of b1 st b3 = { b4 where B is Element of b1 : b2 . b4 <= b4 } holds
b2 | b3 is Function of (subrelstr b3),(subrelstr b3)
proof end;

theorem Th50: :: WAYBEL_1:50
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
for b3 being non empty Subset of b1 st b3 = { b4 where B is Element of b1 : b4 <= b2 . b4 } holds
for b4 being Function of (subrelstr b3),(subrelstr b3) st b4 = b2 | b3 holds
b4 is_a_closure_operator
proof end;

theorem Th51: :: WAYBEL_1:51
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
for b3 being non empty Subset of b1 st b3 = { b4 where B is Element of b1 : b2 . b4 <= b4 } holds
for b4 being Function of (subrelstr b3),(subrelstr b3) st b4 = b2 | b3 holds
b4 is_a_kernel_operator
proof end;

theorem Th52: :: WAYBEL_1:52
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is monotone holds
for b3 being Subset of b1 st b3 = { b4 where B is Element of b1 : b4 <= b2 . b4 } holds
subrelstr b3 is sups-inheriting
proof end;

theorem Th53: :: WAYBEL_1:53
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is monotone holds
for b3 being Subset of b1 st b3 = { b4 where B is Element of b1 : b2 . b4 <= b4 } holds
subrelstr b3 is infs-inheriting
proof end;

theorem Th54: :: WAYBEL_1:54
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
for b3 being non empty Subset of b1 st b3 = { b4 where B is Element of b1 : b4 <= b2 . b4 } holds
( ( b2 is infs-preserving implies ( subrelstr b3 is infs-inheriting & Image b2 is infs-inheriting ) ) & ( b2 is filtered-infs-preserving implies ( subrelstr b3 is filtered-infs-inheriting & Image b2 is filtered-infs-inheriting ) ) )
proof end;

theorem Th55: :: WAYBEL_1:55
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
for b3 being non empty Subset of b1 st b3 = { b4 where B is Element of b1 : b2 . b4 <= b4 } holds
( ( b2 is sups-preserving implies ( subrelstr b3 is sups-inheriting & Image b2 is sups-inheriting ) ) & ( b2 is directed-sups-preserving implies ( subrelstr b3 is directed-sups-inheriting & Image b2 is directed-sups-inheriting ) ) )
proof end;

theorem Th56: :: WAYBEL_1:56
for b1 being non empty Poset
for b2 being Function of b1,b1 holds
( ( b2 is_a_closure_operator implies Image b2 is infs-inheriting ) & ( b2 is_a_kernel_operator implies Image b2 is sups-inheriting ) )
proof end;

theorem Th57: :: WAYBEL_1:57
for b1 being non empty complete Poset
for b2 being Function of b1,b1 st b2 is_a_projection_operator holds
Image b2 is complete
proof end;

theorem Th58: :: WAYBEL_1:58
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_closure_operator holds
( corestr b2 is sups-preserving & ( for b3 being Subset of b1 st b3 c= the carrier of (Image b2) & ex_sup_of b3,b1 holds
( ex_sup_of b3, Image b2 & "\/" b3,(Image b2) = b2 . ("\/" b3,b1) ) ) )
proof end;

theorem Th59: :: WAYBEL_1:59
for b1 being non empty Poset
for b2 being Function of b1,b1 st b2 is_a_kernel_operator holds
( corestr b2 is infs-preserving & ( for b3 being Subset of b1 st b3 c= the carrier of (Image b2) & ex_inf_of b3,b1 holds
( ex_inf_of b3, Image b2 & "/\" b3,(Image b2) = b2 . ("/\" b3,b1) ) ) )
proof end;

theorem Th60: :: WAYBEL_1:60
for b1 being non empty complete Poset holds
( [(IdsMap b1),(SupMap b1)] is Galois & SupMap b1 is sups-preserving )
proof end;

theorem Th61: :: WAYBEL_1:61
for b1 being non empty complete Poset holds
( (IdsMap b1) * (SupMap b1) is_a_closure_operator & Image ((IdsMap b1) * (SupMap b1)),b1 are_isomorphic )
proof end;

definition
let c1 be non empty RelStr ;
let c2 be Element of c1;
func c2 "/\" -> Function of a1,a1 means :Def18: :: WAYBEL_1:def 18
for b1 being Element of a1 holds a3 . b1 = a2 "/\" b1;
existence
ex b1 being Function of c1,c1 st
for b2 being Element of c1 holds b1 . b2 = c2 "/\" b2
proof end;
uniqueness
for b1, b2 being Function of c1,c1 st ( for b3 being Element of c1 holds b1 . b3 = c2 "/\" b3 ) & ( for b3 being Element of c1 holds b2 . b3 = c2 "/\" b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def18 defines "/\" WAYBEL_1:def 18 :
for b1 being non empty RelStr
for b2 being Element of b1
for b3 being Function of b1,b1 holds
( b3 = b2 "/\" iff for b4 being Element of b1 holds b3 . b4 = b2 "/\" b4 );

theorem Th62: :: WAYBEL_1:62
for b1 being non empty RelStr
for b2, b3 being Element of b1 holds { b4 where B is Element of b1 : b2 "/\" b4 <= b3 } = (b2 "/\" ) " (downarrow b3)
proof end;

theorem Th63: :: WAYBEL_1:63
for b1 being Semilattice
for b2 being Element of b1 holds b2 "/\" is monotone
proof end;

registration
let c1 be Semilattice;
let c2 be Element of c1;
cluster a2 "/\" -> monotone ;
coherence
c2 "/\" is monotone
by Th63;
end;

theorem Th64: :: WAYBEL_1:64
for b1 being non empty RelStr
for b2 being Element of b1
for b3 being Subset of b1 holds (b2 "/\" ) .: b3 = { (b2 "/\" b4) where B is Element of b1 : b4 in b3 }
proof end;

theorem Th65: :: WAYBEL_1:65
for b1 being Semilattice holds
( ( for b2 being Element of b1 holds b2 "/\" has_an_upper_adjoint ) iff for b2, b3 being Element of b1 holds ex_max_of { b4 where B is Element of b1 : b2 "/\" b4 <= b3 } ,b1 )
proof end;

theorem Th66: :: WAYBEL_1:66
for b1 being Semilattice st ( for b2 being Element of b1 holds b2 "/\" has_an_upper_adjoint ) holds
for b2 being Subset of b1 st ex_sup_of b2,b1 holds
for b3 being Element of b1 holds b3 "/\" ("\/" b2,b1) = "\/" { (b3 "/\" b4) where B is Element of b1 : b4 in b2 } ,b1
proof end;

theorem Th67: :: WAYBEL_1:67
for b1 being non empty complete Poset holds
( ( for b2 being Element of b1 holds b2 "/\" has_an_upper_adjoint ) iff for b2 being Subset of b1
for b3 being Element of b1 holds b3 "/\" ("\/" b2,b1) = "\/" { (b3 "/\" b4) where B is Element of b1 : b4 in b2 } ,b1 )
proof end;

theorem Th68: :: WAYBEL_1:68
for b1 being LATTICE st ( for b2 being Subset of b1 st ex_sup_of b2,b1 holds
for b3 being Element of b1 holds b3 "/\" ("\/" b2,b1) = "\/" { (b3 "/\" b4) where B is Element of b1 : b4 in b2 } ,b1 ) holds
b1 is distributive
proof end;

definition
let c1 be non empty RelStr ;
attr a1 is Heyting means :Def19: :: WAYBEL_1:def 19
( a1 is LATTICE & ( for b1 being Element of a1 holds b1 "/\" has_an_upper_adjoint ) );
end;

:: deftheorem Def19 defines Heyting WAYBEL_1:def 19 :
for b1 being non empty RelStr holds
( b1 is Heyting iff ( b1 is LATTICE & ( for b2 being Element of b1 holds b2 "/\" has_an_upper_adjoint ) ) );

notation
let c1 be non empty RelStr ;
synonym c1 is_a_Heyting_algebra for Heyting c1;
end;

registration
cluster non empty Heyting -> non empty reflexive transitive antisymmetric with_suprema with_infima RelStr ;
coherence
for b1 being non empty RelStr st b1 is Heyting holds
( b1 is with_infima & b1 is with_suprema & b1 is reflexive & b1 is transitive & b1 is antisymmetric )
by Def19;
end;

definition
let c1 be non empty RelStr ;
let c2 be Element of c1;
assume E68: c1 is Heyting ;
func c2 => -> Function of a1,a1 means :Def20: :: WAYBEL_1:def 20
[a3,(a2 "/\" )] is Galois;
existence
ex b1 being Function of c1,c1 st [b1,(c2 "/\" )] is Galois
proof end;
uniqueness
for b1, b2 being Function of c1,c1 st [b1,(c2 "/\" )] is Galois & [b2,(c2 "/\" )] is Galois holds
b1 = b2
proof end;
end;

:: deftheorem Def20 defines => WAYBEL_1:def 20 :
for b1 being non empty RelStr
for b2 being Element of b1 st b1 is Heyting holds
for b3 being Function of b1,b1 holds
( b3 = b2 => iff [b3,(b2 "/\" )] is Galois );

theorem Th69: :: WAYBEL_1:69
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
b1 is distributive
proof end;

registration
cluster non empty Heyting -> non empty distributive RelStr ;
coherence
for b1 being non empty RelStr st b1 is Heyting holds
b1 is distributive
by Th69;
end;

definition
let c1 be non empty RelStr ;
let c2, c3 be Element of c1;
func c2 => c3 -> Element of a1 equals :: WAYBEL_1:def 21
(a2 => ) . a3;
correctness
coherence
(c2 => ) . c3 is Element of c1
;
;
end;

:: deftheorem Def21 defines => WAYBEL_1:def 21 :
for b1 being non empty RelStr
for b2, b3 being Element of b1 holds b2 => b3 = (b2 => ) . b3;

theorem Th70: :: WAYBEL_1:70
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3, b4 being Element of b1 holds
( b2 >= b3 "/\" b4 iff b3 => b2 >= b4 )
proof end;

theorem Th71: :: WAYBEL_1:71
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
b1 is upper-bounded
proof end;

registration
cluster non empty Heyting -> non empty upper-bounded RelStr ;
coherence
for b1 being non empty RelStr st b1 is Heyting holds
b1 is upper-bounded
by Th71;
end;

theorem Th72: :: WAYBEL_1:72
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds
( Top b1 = b2 => b3 iff b2 <= b3 )
proof end;

theorem Th73: :: WAYBEL_1:73
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2 being Element of b1 holds Top b1 = b2 => b2
proof end;

theorem Th74: :: WAYBEL_1:74
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 st Top b1 = b2 => b3 & Top b1 = b3 => b2 holds
b2 = b3
proof end;

theorem Th75: :: WAYBEL_1:75
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds b3 <= b2 => b3
proof end;

theorem Th76: :: WAYBEL_1:76
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2 being Element of b1 holds Top b1 = b2 => (Top b1)
proof end;

theorem Th77: :: WAYBEL_1:77
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2 being Element of b1 holds b2 = (Top b1) => b2
proof end;

Lemma74: for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds b2 "/\" (b2 => b3) <= b3
proof end;

theorem Th78: :: WAYBEL_1:78
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3, b4 being Element of b1 st b2 <= b3 holds
b3 => b4 <= b2 => b4
proof end;

theorem Th79: :: WAYBEL_1:79
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3, b4 being Element of b1 st b3 <= b4 holds
b2 => b3 <= b2 => b4
proof end;

theorem Th80: :: WAYBEL_1:80
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds b2 "/\" (b2 => b3) = b2 "/\" b3
proof end;

theorem Th81: :: WAYBEL_1:81
for b1 being non empty RelStr st b1 is_a_Heyting_algebra holds
for b2, b3, b4 being Element of b1 holds (b2 "\/" b3) => b4 = (b2 => b4) "/\" (b3 => b4)
proof end;

definition
let c1 be non empty RelStr ;
let c2 be Element of c1;
func 'not' c2 -> Element of a1 equals :: WAYBEL_1:def 22
a2 => (Bottom a1);
correctness
coherence
c2 => (Bottom c1) is Element of c1
;
;
end;

:: deftheorem Def22 defines 'not' WAYBEL_1:def 22 :
for b1 being non empty RelStr
for b2 being Element of b1 holds 'not' b2 = b2 => (Bottom b1);

theorem Th82: :: WAYBEL_1:82
for b1 being non empty RelStr st b1 is_a_Heyting_algebra & b1 is lower-bounded holds
for b2 being Element of b1 holds 'not' b2 is_maximum_of { b3 where B is Element of b1 : b2 "/\" b3 = Bottom b1 }
proof end;

theorem Th83: :: WAYBEL_1:83
for b1 being non empty RelStr st b1 is_a_Heyting_algebra & b1 is lower-bounded holds
( 'not' (Bottom b1) = Top b1 & 'not' (Top b1) = Bottom b1 )
proof end;

theorem Th84: :: WAYBEL_1:84
for b1 being non empty lower-bounded RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds
( 'not' b2 >= b3 iff 'not' b3 >= b2 )
proof end;

theorem Th85: :: WAYBEL_1:85
for b1 being non empty lower-bounded RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds
( 'not' b2 >= b3 iff b2 "/\" b3 = Bottom b1 )
proof end;

theorem Th86: :: WAYBEL_1:86
for b1 being non empty lower-bounded RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 st b2 <= b3 holds
'not' b3 <= 'not' b2
proof end;

theorem Th87: :: WAYBEL_1:87
for b1 being non empty lower-bounded RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds 'not' (b2 "\/" b3) = ('not' b2) "/\" ('not' b3) by Th81;

theorem Th88: :: WAYBEL_1:88
for b1 being non empty lower-bounded RelStr st b1 is_a_Heyting_algebra holds
for b2, b3 being Element of b1 holds 'not' (b2 "/\" b3) >= ('not' b2) "\/" ('not' b3)
proof end;

definition
let c1 be non empty RelStr ;
let c2, c3 be Element of c1;
pred c3 is_a_complement_of c2 means :Def23: :: WAYBEL_1:def 23
( a2 "\/" a3 = Top a1 & a2 "/\" a3 = Bottom a1 );
end;

:: deftheorem Def23 defines is_a_complement_of WAYBEL_1:def 23 :
for b1 being non empty RelStr
for b2, b3 being Element of b1 holds
( b3 is_a_complement_of b2 iff ( b2 "\/" b3 = Top b1 & b2 "/\" b3 = Bottom b1 ) );

definition
let c1 be non empty RelStr ;
attr a1 is complemented means :Def24: :: WAYBEL_1:def 24
for b1 being Element of a1 ex b2 being Element of a1 st b2 is_a_complement_of b1;
end;

:: deftheorem Def24 defines complemented WAYBEL_1:def 24 :
for b1 being non empty RelStr holds
( b1 is complemented iff for b2 being Element of b1 ex b3 being Element of b1 st b3 is_a_complement_of b2 );

registration
let c1 be set ;
cluster BoolePoset a1 -> distributive complemented ;
coherence
BoolePoset c1 is complemented
proof end;
end;

Lemma83: for b1 being bounded LATTICE st b1 is distributive & b1 is complemented holds
for b2 being Element of b1 ex b3 being Element of b1 st
for b4 being Element of b1 holds
( (b4 "\/" b3) "/\" b2 <= b4 & b4 <= (b4 "/\" b2) "\/" b3 )
proof end;

Lemma84: for b1 being bounded LATTICE st ( for b2 being Element of b1 ex b3 being Element of b1 st
for b4 being Element of b1 holds
( (b4 "\/" b3) "/\" b2 <= b4 & b4 <= (b4 "/\" b2) "\/" b3 ) ) holds
( b1 is_a_Heyting_algebra & ( for b2 being Element of b1 holds 'not' ('not' b2) = b2 ) )
proof end;

theorem Th89: :: WAYBEL_1:89
for b1 being bounded LATTICE st b1 is_a_Heyting_algebra & ( for b2 being Element of b1 holds 'not' ('not' b2) = b2 ) holds
for b2 being Element of b1 holds 'not' b2 is_a_complement_of b2
proof end;

theorem Th90: :: WAYBEL_1:90
for b1 being bounded LATTICE holds
( b1 is distributive & b1 is complemented iff ( b1 is_a_Heyting_algebra & ( for b2 being Element of b1 holds 'not' ('not' b2) = b2 ) ) )
proof end;

definition
let c1 be non empty RelStr ;
attr a1 is Boolean means :Def25: :: WAYBEL_1:def 25
( a1 is LATTICE & a1 is bounded & a1 is distributive & a1 is complemented );
end;

:: deftheorem Def25 defines Boolean WAYBEL_1:def 25 :
for b1 being non empty RelStr holds
( b1 is Boolean iff ( b1 is LATTICE & b1 is bounded & b1 is distributive & b1 is complemented ) );

notation
let c1 be non empty RelStr ;
synonym c1 is_a_Boolean_algebra for Boolean c1;
synonym c1 is_a_Boolean_lattice for Boolean c1;
end;

registration
cluster non empty Boolean -> non empty reflexive transitive antisymmetric with_suprema with_infima bounded distributive complemented RelStr ;
coherence
for b1 being non empty RelStr st b1 is Boolean holds
( b1 is reflexive & b1 is transitive & b1 is antisymmetric & b1 is with_infima & b1 is with_suprema & b1 is bounded & b1 is distributive & b1 is complemented )
by Def25;
end;

registration
cluster non empty reflexive transitive antisymmetric with_suprema with_infima bounded distributive complemented -> non empty reflexive transitive antisymmetric with_suprema with_infima bounded distributive complemented Boolean RelStr ;
coherence
for b1 being non empty RelStr st b1 is reflexive & b1 is transitive & b1 is antisymmetric & b1 is with_infima & b1 is with_suprema & b1 is bounded & b1 is distributive & b1 is complemented holds
b1 is Boolean
by Def25;
end;

registration
cluster non empty Boolean -> non empty reflexive transitive antisymmetric with_suprema with_infima upper-bounded distributive Heyting RelStr ;
coherence
for b1 being non empty RelStr st b1 is Boolean holds
b1 is Heyting
proof end;
end;

registration
cluster non empty strict upper-bounded bounded distributive Heyting complemented Boolean RelStr ;
existence
ex b1 being LATTICE st
( b1 is strict & b1 is Boolean & not b1 is empty )
proof end;
end;

registration
cluster non empty strict upper-bounded distributive Heyting RelStr ;
existence
ex b1 being LATTICE st
( b1 is strict & b1 is Heyting & not b1 is empty )
proof end;
end;