:: SUBSTLAT semantic presentation

definition
let c1, c2 be set ;
func SubstitutionSet c1,c2 -> Subset of (Fin (PFuncs a1,a2)) equals :: SUBSTLAT:def 1
{ b1 where B is Element of Fin (PFuncs a1,a2) : ( ( for b1 being set st b2 in b1 holds
b2 is finite ) & ( for b1, b2 being Element of PFuncs a1,a2 st b2 in b1 & b3 in b1 & b2 c= b3 holds
b2 = b3 ) )
}
;
coherence
{ b1 where B is Element of Fin (PFuncs c1,c2) : ( ( for b1 being set st b2 in b1 holds
b2 is finite ) & ( for b1, b2 being Element of PFuncs c1,c2 st b2 in b1 & b3 in b1 & b2 c= b3 holds
b2 = b3 ) )
}
is Subset of (Fin (PFuncs c1,c2))
proof end;
end;

:: deftheorem Def1 defines SubstitutionSet SUBSTLAT:def 1 :
for b1, b2 being set holds SubstitutionSet b1,b2 = { b3 where B is Element of Fin (PFuncs b1,b2) : ( ( for b1 being set st b4 in b3 holds
b4 is finite ) & ( for b1, b2 being Element of PFuncs b1,b2 st b4 in b3 & b5 in b3 & b4 c= b5 holds
b4 = b5 ) )
}
;

Lemma1: for b1, b2, b3, b4 being set st b4 in SubstitutionSet b1,b2 & b3 in b4 holds
b3 is finite
proof end;

theorem Th1: :: SUBSTLAT:1
for b1, b2 being set holds {} in SubstitutionSet b1,b2
proof end;

theorem Th2: :: SUBSTLAT:2
for b1, b2 being set holds {{} } in SubstitutionSet b1,b2
proof end;

registration
let c1, c2 be set ;
cluster SubstitutionSet a1,a2 -> non empty ;
coherence
not SubstitutionSet c1,c2 is empty
by Th2;
end;

definition
let c1, c2 be set ;
let c3, c4 be Element of SubstitutionSet c1,c2;
redefine func \/ as c3 \/ c4 -> Element of Fin (PFuncs a1,a2);
coherence
c3 \/ c4 is Element of Fin (PFuncs c1,c2)
proof end;
end;

registration
let c1, c2 be set ;
cluster non empty Element of SubstitutionSet a1,a2;
existence
not for b1 being Element of SubstitutionSet c1,c2 holds b1 is empty
proof end;
end;

registration
let c1, c2 be set ;
cluster -> finite Element of SubstitutionSet a1,a2;
coherence
for b1 being Element of SubstitutionSet c1,c2 holds b1 is finite
by FINSUB_1:def 5;
end;

definition
let c1, c2 be set ;
let c3 be Element of Fin (PFuncs c1,c2);
func mi c3 -> Element of SubstitutionSet a1,a2 equals :: SUBSTLAT:def 2
{ b1 where B is Element of PFuncs a1,a2 : ( b1 is finite & ( for b1 being Element of PFuncs a1,a2 holds
( ( b2 in a3 & b2 c= b1 ) iff b2 = b1 ) ) )
}
;
coherence
{ b1 where B is Element of PFuncs c1,c2 : ( b1 is finite & ( for b1 being Element of PFuncs c1,c2 holds
( ( b2 in c3 & b2 c= b1 ) iff b2 = b1 ) ) )
}
is Element of SubstitutionSet c1,c2
proof end;
end;

:: deftheorem Def2 defines mi SUBSTLAT:def 2 :
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2) holds mi b3 = { b4 where B is Element of PFuncs b1,b2 : ( b4 is finite & ( for b1 being Element of PFuncs b1,b2 holds
( ( b5 in b3 & b5 c= b4 ) iff b5 = b4 ) ) )
}
;

registration
let c1, c2 be set ;
cluster -> finite functional Element of SubstitutionSet a1,a2;
coherence
for b1 being Element of SubstitutionSet c1,c2 holds b1 is functional
proof end;
end;

definition
let c1, c2 be set ;
let c3, c4 be Element of Fin (PFuncs c1,c2);
func c3 ^ c4 -> Element of Fin (PFuncs a1,a2) equals :: SUBSTLAT:def 3
{ (b1 \/ b2) where B is Element of PFuncs a1,a2, B is Element of PFuncs a1,a2 : ( b1 in a3 & b2 in a4 & b1 tolerates b2 ) } ;
coherence
{ (b1 \/ b2) where B is Element of PFuncs c1,c2, B is Element of PFuncs c1,c2 : ( b1 in c3 & b2 in c4 & b1 tolerates b2 ) } is Element of Fin (PFuncs c1,c2)
proof end;
end;

:: deftheorem Def3 defines ^ SUBSTLAT:def 3 :
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds b3 ^ b4 = { (b5 \/ b6) where B is Element of PFuncs b1,b2, B is Element of PFuncs b1,b2 : ( b5 in b3 & b6 in b4 & b5 tolerates b6 ) } ;

theorem Th3: :: SUBSTLAT:3
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds b3 ^ b4 = b4 ^ b3
proof end;

theorem Th4: :: SUBSTLAT:4
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) st b3 = {{} } holds
b4 ^ b3 = b4
proof end;

theorem Th5: :: SUBSTLAT:5
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2)
for b4, b5 being set st b3 in SubstitutionSet b1,b2 & b4 in b3 & b5 in b3 & b4 c= b5 holds
b4 = b5
proof end;

theorem Th6: :: SUBSTLAT:6
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2)
for b4 being set st b4 in mi b3 holds
( b4 in b3 & ( for b5 being set st b5 in b3 & b5 c= b4 holds
b5 = b4 ) )
proof end;

Lemma8: for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) st ( for b5 being set st b5 in b3 holds
b5 in b4 ) holds
b3 c= b4
proof end;

registration
let c1, c2 be set ;
cluster finite Element of PFuncs a1,a2;
existence
ex b1 being Element of PFuncs c1,c2 st b1 is finite
proof end;
end;

theorem Th7: :: SUBSTLAT:7
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2)
for b4 being finite set st b4 in b3 & ( for b5 being finite set st b5 in b3 & b5 c= b4 holds
b5 = b4 ) holds
b4 in mi b3
proof end;

theorem Th8: :: SUBSTLAT:8
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2) holds mi b3 c= b3
proof end;

theorem Th9: :: SUBSTLAT:9
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2) st b3 = {} holds
mi b3 = {}
proof end;

theorem Th10: :: SUBSTLAT:10
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2)
for b4 being finite set st b4 in b3 holds
ex b5 being set st
( b5 c= b4 & b5 in mi b3 )
proof end;

theorem Th11: :: SUBSTLAT:11
for b1, b2 being set
for b3 being Element of SubstitutionSet b1,b2 holds mi b3 = b3
proof end;

theorem Th12: :: SUBSTLAT:12
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds mi (b3 \/ b4) c= (mi b3) \/ b4
proof end;

theorem Th13: :: SUBSTLAT:13
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds mi ((mi b3) \/ b4) = mi (b3 \/ b4)
proof end;

theorem Th14: :: SUBSTLAT:14
for b1, b2 being set
for b3, b4, b5 being Element of Fin (PFuncs b1,b2) st b3 c= b4 holds
b3 ^ b5 c= b4 ^ b5
proof end;

theorem Th15: :: SUBSTLAT:15
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2)
for b5 being set st b5 in b3 ^ b4 holds
ex b6, b7 being set st
( b6 in b3 & b7 in b4 & b5 = b6 \/ b7 )
proof end;

theorem Th16: :: SUBSTLAT:16
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2)
for b5, b6 being Element of PFuncs b1,b2 st b5 in b3 & b6 in b4 & b5 tolerates b6 holds
b5 \/ b6 in b3 ^ b4 ;

Lemma17: for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2)
for b5 being finite set st b5 in b3 ^ b4 holds
ex b6 being finite set st
( b6 c= b5 & b6 in (mi b3) ^ b4 )
proof end;

theorem Th17: :: SUBSTLAT:17
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds mi (b3 ^ b4) c= (mi b3) ^ b4
proof end;

theorem Th18: :: SUBSTLAT:18
for b1, b2 being set
for b3, b4, b5 being Element of Fin (PFuncs b1,b2) st b3 c= b4 holds
b5 ^ b3 c= b5 ^ b4
proof end;

theorem Th19: :: SUBSTLAT:19
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds mi ((mi b3) ^ b4) = mi (b3 ^ b4)
proof end;

theorem Th20: :: SUBSTLAT:20
for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds mi (b3 ^ (mi b4)) = mi (b3 ^ b4)
proof end;

theorem Th21: :: SUBSTLAT:21
for b1, b2 being set
for b3, b4, b5 being Element of Fin (PFuncs b1,b2) holds b3 ^ (b4 ^ b5) = (b3 ^ b4) ^ b5
proof end;

theorem Th22: :: SUBSTLAT:22
for b1, b2 being set
for b3, b4, b5 being Element of Fin (PFuncs b1,b2) holds b3 ^ (b4 \/ b5) = (b3 ^ b4) \/ (b3 ^ b5)
proof end;

Lemma24: for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2)
for b5 being set st b5 in b3 ^ b4 holds
ex b6 being set st
( b6 in b4 & b6 c= b5 )
proof end;

Lemma25: for b1, b2 being set
for b3, b4 being Element of Fin (PFuncs b1,b2) holds mi ((b3 ^ b4) \/ b4) = mi b4
proof end;

theorem Th23: :: SUBSTLAT:23
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2) holds b3 c= b3 ^ b3
proof end;

theorem Th24: :: SUBSTLAT:24
for b1, b2 being set
for b3 being Element of Fin (PFuncs b1,b2) holds mi (b3 ^ b3) = mi b3
proof end;

theorem Th25: :: SUBSTLAT:25
for b1, b2 being set
for b3 being Element of SubstitutionSet b1,b2 holds mi (b3 ^ b3) = b3
proof end;

definition
let c1, c2 be set ;
func SubstLatt c1,c2 -> strict LattStr means :Def4: :: SUBSTLAT:def 4
( the carrier of a3 = SubstitutionSet a1,a2 & ( for b1, b2 being Element of SubstitutionSet a1,a2 holds
( the L_join of a3 . b1,b2 = mi (b1 \/ b2) & the L_meet of a3 . b1,b2 = mi (b1 ^ b2) ) ) );
existence
ex b1 being strict LattStr st
( the carrier of b1 = SubstitutionSet c1,c2 & ( for b2, b3 being Element of SubstitutionSet c1,c2 holds
( the L_join of b1 . b2,b3 = mi (b2 \/ b3) & the L_meet of b1 . b2,b3 = mi (b2 ^ b3) ) ) )
proof end;
uniqueness
for b1, b2 being strict LattStr st the carrier of b1 = SubstitutionSet c1,c2 & ( for b3, b4 being Element of SubstitutionSet c1,c2 holds
( the L_join of b1 . b3,b4 = mi (b3 \/ b4) & the L_meet of b1 . b3,b4 = mi (b3 ^ b4) ) ) & the carrier of b2 = SubstitutionSet c1,c2 & ( for b3, b4 being Element of SubstitutionSet c1,c2 holds
( the L_join of b2 . b3,b4 = mi (b3 \/ b4) & the L_meet of b2 . b3,b4 = mi (b3 ^ b4) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def4 defines SubstLatt SUBSTLAT:def 4 :
for b1, b2 being set
for b3 being strict LattStr holds
( b3 = SubstLatt b1,b2 iff ( the carrier of b3 = SubstitutionSet b1,b2 & ( for b4, b5 being Element of SubstitutionSet b1,b2 holds
( the L_join of b3 . b4,b5 = mi (b4 \/ b5) & the L_meet of b3 . b4,b5 = mi (b4 ^ b5) ) ) ) );

registration
let c1, c2 be set ;
cluster SubstLatt a1,a2 -> non empty strict ;
coherence
not SubstLatt c1,c2 is empty
proof end;
end;

Lemma29: for b1, b2 being set
for b3, b4 being Element of (SubstLatt b1,b2) holds b3 "\/" b4 = b4 "\/" b3
proof end;

Lemma30: for b1, b2 being set
for b3, b4, b5 being Element of (SubstLatt b1,b2) holds b3 "\/" (b4 "\/" b5) = (b3 "\/" b4) "\/" b5
proof end;

Lemma31: for b1, b2 being set
for b3, b4 being Element of SubstitutionSet b1,b2 holds the L_join of (SubstLatt b1,b2) . (the L_meet of (SubstLatt b1,b2) . b3,b4),b4 = b4
proof end;

Lemma32: for b1, b2 being set
for b3, b4 being Element of (SubstLatt b1,b2) holds (b3 "/\" b4) "\/" b4 = b4
proof end;

Lemma33: for b1, b2 being set
for b3, b4 being Element of (SubstLatt b1,b2) holds b3 "/\" b4 = b4 "/\" b3
proof end;

Lemma34: for b1, b2 being set
for b3, b4, b5 being Element of (SubstLatt b1,b2) holds b3 "/\" (b4 "/\" b5) = (b3 "/\" b4) "/\" b5
proof end;

Lemma35: for b1, b2 being set
for b3, b4, b5 being Element of SubstitutionSet b1,b2 holds the L_meet of (SubstLatt b1,b2) . b3,(the L_join of (SubstLatt b1,b2) . b4,b5) = the L_join of (SubstLatt b1,b2) . (the L_meet of (SubstLatt b1,b2) . b3,b4),(the L_meet of (SubstLatt b1,b2) . b3,b5)
proof end;

Lemma36: for b1, b2 being set
for b3, b4 being Element of (SubstLatt b1,b2) holds b3 "/\" (b3 "\/" b4) = b3
proof end;

registration
let c1, c2 be set ;
cluster SubstLatt a1,a2 -> non empty strict Lattice-like ;
coherence
SubstLatt c1,c2 is Lattice-like
proof end;
end;

registration
let c1, c2 be set ;
cluster SubstLatt a1,a2 -> non empty strict Lattice-like distributive bounded ;
coherence
( SubstLatt c1,c2 is distributive & SubstLatt c1,c2 is bounded )
proof end;
end;

theorem Th26: :: SUBSTLAT:26
for b1, b2 being set holds Bottom (SubstLatt b1,b2) = {}
proof end;

theorem Th27: :: SUBSTLAT:27
for b1, b2 being set holds Top (SubstLatt b1,b2) = {{} }
proof end;