:: CLOSURE3 semantic presentation

registration
let c1 be non empty 1-sorted ;
cluster 1-sorted(# the carrier of a1 #) -> non empty ;
coherence
not 1-sorted(# the carrier of c1 #) is empty
by STRUCT_0:def 1;
end;

theorem Th1: :: CLOSURE3:1
for b1 being non empty set
for b2, b3 being ManySortedSet of b1 holds b2 +* b3 = b3
proof end;

theorem Th2: :: CLOSURE3:2
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being SubsetFamily of b2 holds
( b3 in b4 implies meet |:b4:| c=' b3 )
proof end;

theorem Th3: :: CLOSURE3:3
for b1 being non empty non void ManySortedSign
for b2 being strict non-empty MSAlgebra of b1
for b3 being SubsetFamily of the Sorts of b2 holds
( b3 c= SubSort b2 implies for b4 being MSSubset of b2 holds
( b4 = meet |:b3:| implies b4 is opers_closed ) )
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3, c4 be SubsetFamily of c2;
pred c4 is_finer_than c3 means :Def1: :: CLOSURE3:def 1
for b1 being set holds
not ( b1 in a4 & ( for b2 being set holds
not ( b2 in a3 & b1 c= b2 ) ) );
reflexivity
for b1 being SubsetFamily of c2
for b2 being set holds
not ( b2 in b1 & ( for b3 being set holds
not ( b3 in b1 & b2 c= b3 ) ) )
;
pred c3 is_coarser_than c4 means :Def2: :: CLOSURE3:def 2
for b1 being set holds
not ( b1 in a3 & ( for b2 being set holds
not ( b2 in a4 & b2 c= b1 ) ) );
reflexivity
for b1 being SubsetFamily of c2
for b2 being set holds
not ( b2 in b1 & ( for b3 being set holds
not ( b3 in b1 & b3 c= b2 ) ) )
;
end;

:: deftheorem Def1 defines is_finer_than CLOSURE3:def 1 :
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being SubsetFamily of b2 holds
( b4 is_finer_than b3 iff for b5 being set holds
not ( b5 in b4 & ( for b6 being set holds
not ( b6 in b3 & b5 c= b6 ) ) ) );

:: deftheorem Def2 defines is_coarser_than CLOSURE3:def 2 :
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being SubsetFamily of b2 holds
( b3 is_coarser_than b4 iff for b5 being set holds
not ( b5 in b3 & ( for b6 being set holds
not ( b6 in b4 & b6 c= b5 ) ) ) );

theorem Th4: :: CLOSURE3:4
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4, b5 being SubsetFamily of b2 holds
( b3 is_finer_than b4 & b4 is_finer_than b5 implies b3 is_finer_than b5 )
proof end;

theorem Th5: :: CLOSURE3:5
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4, b5 being SubsetFamily of b2 holds
( b3 is_coarser_than b4 & b4 is_coarser_than b5 implies b3 is_coarser_than b5 )
proof end;

definition
let c1 be non empty set ;
let c2 be ManySortedSet of c1;
func supp c2 -> set means :Def3: :: CLOSURE3:def 3
a3 = { b1 where B is Element of a1 : a2 . b1 <> {} } ;
correctness
existence
ex b1 being set st b1 = { b2 where B is Element of c1 : c2 . b2 <> {} }
;
uniqueness
for b1, b2 being set holds
( b1 = { b3 where B is Element of c1 : c2 . b3 <> {} } & b2 = { b3 where B is Element of c1 : c2 . b3 <> {} } implies b1 = b2 )
;
;
end;

:: deftheorem Def3 defines supp CLOSURE3:def 3 :
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being set holds
( b3 = supp b2 iff b3 = { b4 where B is Element of b1 : b2 . b4 <> {} } );

theorem Th6: :: CLOSURE3:6
for b1 being non empty set
for b2 being V5 ManySortedSet of b1 holds b2 = ([0] b1) +* (b2 | (supp b2))
proof end;

theorem Th7: :: CLOSURE3:7
for b1 being non empty set
for b2, b3 being V5 ManySortedSet of b1 holds
( supp b2 = supp b3 & b2 | (supp b2) = b3 | (supp b3) implies b2 = b3 )
proof end;

theorem Th8: :: CLOSURE3:8
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being Element of b1 holds
( not b3 in supp b2 implies b2 . b3 = {} )
proof end;

theorem Th9: :: CLOSURE3:9
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being Element of Bool b2
for b4 being Element of b1
for b5 being set holds
not ( b5 in b3 . b4 & ( for b6 being Element of Bool b2 holds
not ( b5 in b6 . b4 & b6 is locally-finite & supp b6 is finite & b6 c= b3 ) ) )
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be SubsetFamily of c2;
func MSUnion c3 -> ManySortedSubset of a2 means :Def4: :: CLOSURE3:def 4
for b1 being set holds
( b1 in a1 implies a4 . b1 = union { (b2 . b1) where B is Element of Bool a2 : b2 in a3 } );
existence
ex b1 being ManySortedSubset of c2 st
for b2 being set holds
( b2 in c1 implies b1 . b2 = union { (b3 . b2) where B is Element of Bool c2 : b3 in c3 } )
proof end;
uniqueness
for b1, b2 being ManySortedSubset of c2 holds
( ( for b3 being set holds
( b3 in c1 implies b1 . b3 = union { (b4 . b3) where B is Element of Bool c2 : b4 in c3 } ) ) & ( for b3 being set holds
( b3 in c1 implies b2 . b3 = union { (b4 . b3) where B is Element of Bool c2 : b4 in c3 } ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def4 defines MSUnion CLOSURE3:def 4 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being SubsetFamily of b2
for b4 being ManySortedSubset of b2 holds
( b4 = MSUnion b3 iff for b5 being set holds
( b5 in b1 implies b4 . b5 = union { (b6 . b5) where B is Element of Bool b2 : b6 in b3 } ) );

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be non empty SubsetFamily of c2;
redefine mode Element as Element of c3 -> ManySortedSet of a1;
coherence
for b1 being Element of c3 holds
b1 is ManySortedSet of c1
proof end;
end;

registration
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be empty SubsetFamily of c2;
cluster MSUnion a3 -> V6 ;
coherence
MSUnion c3 is empty-yielding
proof end;
end;

theorem Th10: :: CLOSURE3:10
for b1 being set
for b2 being ManySortedSet of b1
for b3 being SubsetFamily of b2 holds MSUnion b3 = union |:b3:|
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3, c4 be SubsetFamily of c2;
redefine func \/ as c3 \/ c4 -> SubsetFamily of a2;
correctness
coherence
c3 \/ c4 is SubsetFamily of c2
;
by CLOSURE2:4;
end;

theorem Th11: :: CLOSURE3:11
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being SubsetFamily of b2 holds MSUnion (b3 \/ b4) = (MSUnion b3) \/ (MSUnion b4)
proof end;

theorem Th12: :: CLOSURE3:12
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being SubsetFamily of b2 holds
( b3 c= b4 implies MSUnion b3 c= MSUnion b4 )
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3, c4 be SubsetFamily of c2;
redefine func /\ as c3 /\ c4 -> SubsetFamily of a2;
correctness
coherence
c3 /\ c4 is SubsetFamily of c2
;
by CLOSURE2:5;
end;

theorem Th13: :: CLOSURE3:13
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being SubsetFamily of b2 holds MSUnion (b3 /\ b4) c= (MSUnion b3) /\ (MSUnion b4)
proof end;

theorem Th14: :: CLOSURE3:14
for b1 being set
for b2 being ManySortedSet of b1
for b3 being set holds
( ( for b4 being set holds
( b4 in b3 implies b4 is SubsetFamily of b2 ) ) implies for b4, b5 being SubsetFamily of b2 holds
( b5 = { (MSUnion b6) where B is SubsetFamily of b2 : b6 in b3 } & b4 = union b3 implies MSUnion b5 = MSUnion b4 ) )
proof end;

definition
let c1 be non empty set ;
let c2 be ManySortedSet of c1;
let c3 be SetOp of c2;
attr a3 is algebraic means :: CLOSURE3:def 5
for b1 being Element of Bool a2 holds
not ( b1 = a3 . b1 & ( for b2 being SubsetFamily of a2 holds
not ( b2 = { (a3 . b3) where B is Element of Bool a2 : ( b3 is locally-finite & supp b3 is finite & b3 c= b1 ) } & b1 = MSUnion b2 ) ) );
end;

:: deftheorem Def5 defines algebraic CLOSURE3:def 5 :
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being SetOp of b2 holds
( b3 is algebraic iff for b4 being Element of Bool b2 holds
not ( b4 = b3 . b4 & ( for b5 being SubsetFamily of b2 holds
not ( b5 = { (b3 . b6) where B is Element of Bool b2 : ( b6 is locally-finite & supp b6 is finite & b6 c= b4 ) } & b4 = MSUnion b5 ) ) ) );

registration
let c1 be non empty set ;
let c2 be ManySortedSet of c1;
cluster reflexive monotonic idempotent algebraic M4( Bool a2, Bool a2);
existence
ex b1 being SetOp of c2 st
( b1 is algebraic & b1 is reflexive & b1 is monotonic & b1 is idempotent )
proof end;
end;

definition
let c1 be non empty 1-sorted ;
let c2 be ClosureSystem of c1;
attr a2 is algebraic means :: CLOSURE3:def 6
ClSys->ClOp a2 is algebraic;
end;

:: deftheorem Def6 defines algebraic CLOSURE3:def 6 :
for b1 being non empty 1-sorted
for b2 being ClosureSystem of b1 holds
( b2 is algebraic iff ClSys->ClOp b2 is algebraic );

definition
let c1 be non empty non void ManySortedSign ;
let c2 be non-empty MSAlgebra of c1;
func SubAlgCl c2 -> strict ClosureStr of 1-sorted(# the carrier of a1 #) means :Def7: :: CLOSURE3:def 7
( the Sorts of a3 = the Sorts of a2 & the Family of a3 = SubSort a2 );
existence
ex b1 being strict ClosureStr of 1-sorted(# the carrier of c1 #) st
( the Sorts of b1 = the Sorts of c2 & the Family of b1 = SubSort c2 )
proof end;
uniqueness
for b1, b2 being strict ClosureStr of 1-sorted(# the carrier of c1 #) holds
( the Sorts of b1 = the Sorts of c2 & the Family of b1 = SubSort c2 & the Sorts of b2 = the Sorts of c2 & the Family of b2 = SubSort c2 implies b1 = b2 )
;
end;

:: deftheorem Def7 defines SubAlgCl CLOSURE3:def 7 :
for b1 being non empty non void ManySortedSign
for b2 being non-empty MSAlgebra of b1
for b3 being strict ClosureStr of 1-sorted(# the carrier of b1 #) holds
( b3 = SubAlgCl b2 iff ( the Sorts of b3 = the Sorts of b2 & the Family of b3 = SubSort b2 ) );

theorem Th15: :: CLOSURE3:15
canceled;

theorem Th16: :: CLOSURE3:16
for b1 being non empty non void ManySortedSign
for b2 being strict non-empty MSAlgebra of b1 holds
SubSort b2 is absolutely-multiplicative SubsetFamily of the Sorts of b2
proof end;

registration
let c1 be non empty non void ManySortedSign ;
let c2 be strict non-empty MSAlgebra of c1;
cluster SubAlgCl a2 -> strict absolutely-multiplicative ;
coherence
SubAlgCl c2 is absolutely-multiplicative
proof end;
end;

registration
let c1 be non empty non void ManySortedSign ;
let c2 be strict non-empty MSAlgebra of c1;
cluster SubAlgCl a2 -> strict absolutely-multiplicative algebraic ;
coherence
SubAlgCl c2 is algebraic
proof end;
end;