:: CLOSURE1 semantic presentation

scheme :: CLOSURE1:sch 1
s1{ F1() -> set , F2() -> V5 ManySortedSet of F1(), F3() -> ManySortedSet of F1(), P1[ set ] } :
( ( for b1 being ManySortedSet of F1() holds
( b1 in F2() iff ( b1 in F3() & P1[b1] ) ) ) implies F2() c= F3() )
proof end;

theorem Th1: :: CLOSURE1:1
for b1 being non empty set
for b2, b3 being set holds
( b2 c= b3 implies { b4 where B is Element of b1 : b3 c= b4 } c= { b4 where B is Element of b1 : b2 c= b4 } )
proof end;

theorem Th2: :: CLOSURE1:2
for b1 being set
for b2 being ManySortedSet of b1 holds
( ex b3 being ManySortedSet of b1 st b3 in b2 implies b2 is non-empty )
proof end;

definition
let c1 be set ;
let c2 be ManySortedFunction of c1;
let c3 be ManySortedSet of c1;
redefine func .. as c2 .. c3 -> ManySortedSet of a1;
coherence
c2 .. c3 is ManySortedSet of c1
proof end;
end;

E2: now
let c1 be set ;
let c2, c3 be V5 ManySortedSet of c1;
let c4 be ManySortedFunction of c2,c3;
let c5 be Element of c2;
thus c4 .. c5 is Element of c3
proof
let c6 be set ; :: according to PBOOLE:def 17
assume E3: c6 in c1 ;
E4: dom c4 = c1 by PBOOLE:def 3;
reconsider c7 = c4 . c6 as Function ;
E5: c7 is Function of c2 . c6,c3 . c6 by E3, PBOOLE:def 18;
E6: c2 . c6 <> {} by E3, PBOOLE:def 16;
E7: c3 . c6 <> {} by E3, PBOOLE:def 16;
c5 . c6 is Element of c2 . c6 by E3, PBOOLE:def 17;
then c7 . (c5 . c6) in c3 . c6 by E5, E6, E7, FUNCT_2:7;
hence (c4 .. c5) . c6 is Element of c3 . c6 by E3, E4, PRALG_1:def 17;
end;
end;

definition
let c1 be set ;
let c2, c3 be V5 ManySortedSet of c1;
let c4 be ManySortedFunction of c2,c3;
let c5 be Element of c2;
redefine func .. as c4 .. c5 -> Element of a3;
coherence
c4 .. c5 is Element of c3
by Lemma2;
end;

theorem Th3: :: CLOSURE1:3
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being V5 ManySortedSet of b1
for b5 being ManySortedFunction of b2,b4 holds
( b3 in b2 implies b5 .. b3 in b4 )
proof end;

theorem Th4: :: CLOSURE1:4
for b1 being set
for b2, b3 being ManySortedFunction of b1
for b4 being ManySortedSet of b1 holds
( b4 in doms b3 implies b2 .. (b3 .. b4) = (b2 ** b3) .. b4 )
proof end;

theorem Th5: :: CLOSURE1:5
for b1 being set
for b2 being ManySortedFunction of b1 holds
( b2 is "1-1" implies for b3, b4 being ManySortedSet of b1 holds
( b3 in doms b2 & b4 in doms b2 & b2 .. b3 = b2 .. b4 implies b3 = b4 ) )
proof end;

theorem Th6: :: CLOSURE1:6
for b1 being set
for b2 being ManySortedFunction of b1 holds
( doms b2 is non-empty & ( for b3, b4 being ManySortedSet of b1 holds
( b3 in doms b2 & b4 in doms b2 & b2 .. b3 = b2 .. b4 implies b3 = b4 ) ) implies b2 is "1-1" )
proof end;

theorem Th7: :: CLOSURE1:7
for b1 being set
for b2, b3 being V5 ManySortedSet of b1
for b4, b5 being ManySortedFunction of b2,b3 holds
( ( for b6 being ManySortedSet of b1 holds
( b6 in b2 implies b4 .. b6 = b5 .. b6 ) ) implies b4 = b5 )
proof end;

registration
let c1 be set ;
let c2 be ManySortedSet of c1;
cluster V6 locally-finite Element of bool a2;
existence
ex b1 being Element of bool c2 st
( b1 is empty-yielding & b1 is locally-finite )
proof end;
end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
mode MSSetOp is ManySortedFunction of bool a2, bool a2;
end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be MSSetOp of c2;
let c4 be Element of bool c2;
redefine func .. as c3 .. c4 -> Element of bool a2;
coherence
c3 .. c4 is Element of bool c2
by Lemma2;
end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be MSSetOp of c2;
canceled;
attr a3 is reflexive means :Def2: :: CLOSURE1:def 2
for b1 being Element of bool a2 holds b1 c= a3 .. b1;
attr a3 is monotonic means :Def3: :: CLOSURE1:def 3
for b1, b2 being Element of bool a2 holds
( b1 c= b2 implies a3 .. b1 c= a3 .. b2 );
attr a3 is idempotent means :Def4: :: CLOSURE1:def 4
for b1 being Element of bool a2 holds a3 .. b1 = a3 .. (a3 .. b1);
attr a3 is topological means :Def5: :: CLOSURE1:def 5
for b1, b2 being Element of bool a2 holds a3 .. (b1 \/ b2) = (a3 .. b1) \/ (a3 .. b2);
end;

:: deftheorem Def1 CLOSURE1:def 1 :
canceled;

:: deftheorem Def2 defines reflexive CLOSURE1:def 2 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2 holds
( b3 is reflexive iff for b4 being Element of bool b2 holds b4 c= b3 .. b4 );

:: deftheorem Def3 defines monotonic CLOSURE1:def 3 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2 holds
( b3 is monotonic iff for b4, b5 being Element of bool b2 holds
( b4 c= b5 implies b3 .. b4 c= b3 .. b5 ) );

:: deftheorem Def4 defines idempotent CLOSURE1:def 4 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2 holds
( b3 is idempotent iff for b4 being Element of bool b2 holds b3 .. b4 = b3 .. (b3 .. b4) );

:: deftheorem Def5 defines topological CLOSURE1:def 5 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2 holds
( b3 is topological iff for b4, b5 being Element of bool b2 holds b3 .. (b4 \/ b5) = (b3 .. b4) \/ (b3 .. b5) );

theorem Th8: :: CLOSURE1:8
for b1 being set
for b2 being V5 ManySortedSet of b1
for b3 being Element of b2 holds b3 = (id b2) .. b3
proof end;

theorem Th9: :: CLOSURE1:9
for b1 being set
for b2 being V5 ManySortedSet of b1
for b3, b4 being Element of b2 holds
( b3 c= b4 implies (id b2) .. b3 c= (id b2) .. b4 )
proof end;

theorem Th10: :: CLOSURE1:10
for b1 being set
for b2 being V5 ManySortedSet of b1
for b3, b4 being Element of b2 holds
( b3 \/ b4 is Element of b2 implies (id b2) .. (b3 \/ b4) = ((id b2) .. b3) \/ ((id b2) .. b4) )
proof end;

theorem Th11: :: CLOSURE1:11
for b1 being set
for b2 being ManySortedSet of b1
for b3 being Element of bool b2
for b4, b5 being set holds
not ( b4 in b1 & b5 in ((id (bool b2)) .. b3) . b4 & ( for b6 being locally-finite Element of bool b2 holds
not ( b6 c= b3 & b5 in ((id (bool b2)) .. b6) . b4 ) ) )
proof end;

registration
let c1 be set ;
let c2 be ManySortedSet of c1;
cluster reflexive monotonic idempotent topological ManySortedFunction of bool a2, bool a2;
existence
ex b1 being MSSetOp of c2 st
( b1 is reflexive & b1 is monotonic & b1 is idempotent & b1 is topological )
proof end;
end;

theorem Th12: :: CLOSURE1:12
for b1 being set
for b2 being ManySortedSet of b1 holds
id (bool b2) is reflexive MSSetOp of b2
proof end;

theorem Th13: :: CLOSURE1:13
for b1 being set
for b2 being ManySortedSet of b1 holds
id (bool b2) is monotonic MSSetOp of b2
proof end;

theorem Th14: :: CLOSURE1:14
for b1 being set
for b2 being ManySortedSet of b1 holds
id (bool b2) is idempotent MSSetOp of b2
proof end;

theorem Th15: :: CLOSURE1:15
for b1 being set
for b2 being ManySortedSet of b1 holds
id (bool b2) is topological MSSetOp of b2
proof end;

theorem Th16: :: CLOSURE1:16
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2
for b4 being Element of bool b2 holds
( b4 = b2 & b3 is reflexive implies b4 = b3 .. b4 )
proof end;

theorem Th17: :: CLOSURE1:17
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2 holds
( b3 is reflexive & ( for b4 being Element of bool b2 holds b3 .. b4 c= b4 ) implies b3 is idempotent )
proof end;

theorem Th18: :: CLOSURE1:18
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2
for b4, b5 being Element of bool b2 holds
( b3 is monotonic implies b3 .. (b4 /\ b5) c= (b3 .. b4) /\ (b3 .. b5) )
proof end;

registration
let c1 be set ;
let c2 be ManySortedSet of c1;
cluster topological -> monotonic ManySortedFunction of bool a2, bool a2;
coherence
for b1 being MSSetOp of c2 holds
( b1 is topological implies b1 is monotonic )
proof end;
end;

theorem Th19: :: CLOSURE1:19
for b1 being set
for b2 being ManySortedSet of b1
for b3 being MSSetOp of b2
for b4, b5 being Element of bool b2 holds
( b3 is topological implies (b3 .. b4) \ (b3 .. b5) c= b3 .. (b4 \ b5) )
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3, c4 be MSSetOp of c2;
redefine func ** as c4 ** c3 -> MSSetOp of a2;
coherence
c4 ** c3 is MSSetOp of c2
proof end;
end;

theorem Th20: :: CLOSURE1:20
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being MSSetOp of b2 holds
( b3 is reflexive & b4 is reflexive implies b3 ** b4 is reflexive )
proof end;

theorem Th21: :: CLOSURE1:21
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being MSSetOp of b2 holds
( b3 is monotonic & b4 is monotonic implies b3 ** b4 is monotonic )
proof end;

theorem Th22: :: CLOSURE1:22
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being MSSetOp of b2 holds
( b3 is idempotent & b4 is idempotent & b3 ** b4 = b4 ** b3 implies b3 ** b4 is idempotent )
proof end;

theorem Th23: :: CLOSURE1:23
for b1 being set
for b2 being ManySortedSet of b1
for b3, b4 being MSSetOp of b2 holds
( b3 is topological & b4 is topological implies b3 ** b4 is topological )
proof end;

E12: now
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be set ;
let c4 be ManySortedSet of c1;
let c5 be Element of bool (c2 . c3);
assume that
c3 in c1 and
E13: c4 = ([0] c1) +* (c3 .--> c5) ;
[0] c1 c= c2 by MBOOLEAN:5;
then E14: [0] c1 in bool c2 by MBOOLEAN:1;
E15: dom (c3 .--> c5) = {c3} by CQC_LANG:5;
thus c4 in bool c2
proof
let c6 be set ; :: according to PBOOLE:def 4
assume E16: c6 in c1 ;
c3 in {c3} by TARSKI:def 1;
then E17: c4 . c3 = (c3 .--> c5) . c3 by E13, E15, FUNCT_4:14
.= c5 by CQC_LANG:6 ;
now
per cases not ( not c6 = c3 & not c6 <> c3 ) ;
case E18: c6 = c3 ;
then c5 in bool (c2 . c6) ;
hence c4 . c6 in (bool c2) . c6 by E16, E17, E18, MBOOLEAN:def 1;
end;
case c6 <> c3 ;
then not c6 in dom (c3 .--> c5) by E15, TARSKI:def 1;
then c4 . c6 = ([0] c1) . c6 by E13, FUNCT_4:12;
hence c4 . c6 in (bool c2) . c6 by E14, E16, PBOOLE:def 4;
end;
end;
end;
hence c4 . c6 in (bool c2) . c6 ;
end;
end;

theorem Th24: :: CLOSURE1:24
for b1, b2 being set
for b3 being ManySortedSet of b2
for b4 being Function
for b5 being MSSetOp of b3 holds
( b5 is reflexive & b1 in b2 & b4 = b5 . b1 implies for b6 being Element of bool (b3 . b1) holds b6 c= b4 . b6 )
proof end;

theorem Th25: :: CLOSURE1:25
for b1, b2 being set
for b3 being ManySortedSet of b2
for b4 being Function
for b5 being MSSetOp of b3 holds
( b5 is monotonic & b1 in b2 & b4 = b5 . b1 implies for b6, b7 being Element of bool (b3 . b1) holds
( b6 c= b7 implies b4 . b6 c= b4 . b7 ) )
proof end;

theorem Th26: :: CLOSURE1:26
for b1, b2 being set
for b3 being ManySortedSet of b2
for b4 being Function
for b5 being MSSetOp of b3 holds
( b5 is idempotent & b1 in b2 & b4 = b5 . b1 implies for b6 being Element of bool (b3 . b1) holds b4 . b6 = b4 . (b4 . b6) )
proof end;

theorem Th27: :: CLOSURE1:27
for b1, b2 being set
for b3 being ManySortedSet of b2
for b4 being Function
for b5 being MSSetOp of b3 holds
( b5 is topological & b1 in b2 & b4 = b5 . b1 implies for b6, b7 being Element of bool (b3 . b1) holds b4 . (b6 \/ b7) = (b4 . b6) \/ (b4 . b7) )
proof end;

definition
let c1 be 1-sorted ;
attr a2 is strict;
struct MSClosureStr of c1 -> many-sorted of a1;
aggr MSClosureStr(# Sorts, Family #) -> MSClosureStr of a1;
sel Family c2 -> MSSubsetFamily of the Sorts of a2;
end;

definition
let c1 be 1-sorted ;
let c2 be MSClosureStr of c1;
attr a2 is additive means :Def6: :: CLOSURE1:def 6
the Family of a2 is additive;
attr a2 is absolutely-additive means :Def7: :: CLOSURE1:def 7
the Family of a2 is absolutely-additive;
attr a2 is multiplicative means :Def8: :: CLOSURE1:def 8
the Family of a2 is multiplicative;
attr a2 is absolutely-multiplicative means :Def9: :: CLOSURE1:def 9
the Family of a2 is absolutely-multiplicative;
attr a2 is properly-upper-bound means :Def10: :: CLOSURE1:def 10
the Family of a2 is properly-upper-bound;
attr a2 is properly-lower-bound means :Def11: :: CLOSURE1:def 11
the Family of a2 is properly-lower-bound;
end;

:: deftheorem Def6 defines additive CLOSURE1:def 6 :
for b1 being 1-sorted
for b2 being MSClosureStr of b1 holds
( b2 is additive iff the Family of b2 is additive );

:: deftheorem Def7 defines absolutely-additive CLOSURE1:def 7 :
for b1 being 1-sorted
for b2 being MSClosureStr of b1 holds
( b2 is absolutely-additive iff the Family of b2 is absolutely-additive );

:: deftheorem Def8 defines multiplicative CLOSURE1:def 8 :
for b1 being 1-sorted
for b2 being MSClosureStr of b1 holds
( b2 is multiplicative iff the Family of b2 is multiplicative );

:: deftheorem Def9 defines absolutely-multiplicative CLOSURE1:def 9 :
for b1 being 1-sorted
for b2 being MSClosureStr of b1 holds
( b2 is absolutely-multiplicative iff the Family of b2 is absolutely-multiplicative );

:: deftheorem Def10 defines properly-upper-bound CLOSURE1:def 10 :
for b1 being 1-sorted
for b2 being MSClosureStr of b1 holds
( b2 is properly-upper-bound iff the Family of b2 is properly-upper-bound );

:: deftheorem Def11 defines properly-lower-bound CLOSURE1:def 11 :
for b1 being 1-sorted
for b2 being MSClosureStr of b1 holds
( b2 is properly-lower-bound iff the Family of b2 is properly-lower-bound );

definition
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
func MSFull c2 -> MSClosureStr of a1 equals :: CLOSURE1:def 12
MSClosureStr(# the Sorts of a2,(bool the Sorts of a2) #);
correctness
coherence
MSClosureStr(# the Sorts of c2,(bool the Sorts of c2) #) is MSClosureStr of c1
;
;
end;

:: deftheorem Def12 defines MSFull CLOSURE1:def 12 :
for b1 being 1-sorted
for b2 being many-sorted of b1 holds MSFull b2 = MSClosureStr(# the Sorts of b2,(bool the Sorts of b2) #);

registration
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
cluster MSFull a2 -> strict additive absolutely-additive multiplicative absolutely-multiplicative properly-upper-bound properly-lower-bound ;
coherence
( MSFull c2 is strict & MSFull c2 is additive & MSFull c2 is absolutely-additive & MSFull c2 is multiplicative & MSFull c2 is absolutely-multiplicative & MSFull c2 is properly-upper-bound & MSFull c2 is properly-lower-bound )
proof end;
end;

registration
let c1 be 1-sorted ;
let c2 be non-empty many-sorted of c1;
cluster MSFull a2 -> non-empty strict additive absolutely-additive multiplicative absolutely-multiplicative properly-upper-bound properly-lower-bound ;
coherence
MSFull c2 is non-empty
by MSUALG_1:def 8;
end;

registration
let c1 be 1-sorted ;
cluster non-empty strict additive absolutely-additive multiplicative absolutely-multiplicative properly-upper-bound properly-lower-bound MSClosureStr of a1;
existence
ex b1 being MSClosureStr of c1 st
( b1 is strict & b1 is non-empty & b1 is additive & b1 is absolutely-additive & b1 is multiplicative & b1 is absolutely-multiplicative & b1 is properly-upper-bound & b1 is properly-lower-bound )
proof end;
end;

registration
let c1 be 1-sorted ;
let c2 be additive MSClosureStr of c1;
cluster the Family of a2 -> additive ;
coherence
the Family of c2 is additive
by Def6;
end;

registration
let c1 be 1-sorted ;
let c2 be absolutely-additive MSClosureStr of c1;
cluster the Family of a2 -> absolutely-additive ;
coherence
the Family of c2 is absolutely-additive
by Def7;
end;

registration
let c1 be 1-sorted ;
let c2 be multiplicative MSClosureStr of c1;
cluster the Family of a2 -> multiplicative ;
coherence
the Family of c2 is multiplicative
by Def8;
end;

registration
let c1 be 1-sorted ;
let c2 be absolutely-multiplicative MSClosureStr of c1;
cluster the Family of a2 -> absolutely-multiplicative ;
coherence
the Family of c2 is absolutely-multiplicative
by Def9;
end;

registration
let c1 be 1-sorted ;
let c2 be properly-upper-bound MSClosureStr of c1;
cluster the Family of a2 -> properly-upper-bound ;
coherence
the Family of c2 is properly-upper-bound
by Def10;
end;

registration
let c1 be 1-sorted ;
let c2 be properly-lower-bound MSClosureStr of c1;
cluster the Family of a2 -> properly-lower-bound ;
coherence
the Family of c2 is properly-lower-bound
by Def11;
end;

registration
let c1 be 1-sorted ;
let c2 be V5 ManySortedSet of the carrier of c1;
let c3 be MSSubsetFamily of c2;
cluster MSClosureStr(# a2,a3 #) -> non-empty ;
coherence
MSClosureStr(# c2,c3 #) is non-empty
proof end;
end;

registration
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
let c3 be additive MSSubsetFamily of the Sorts of c2;
cluster MSClosureStr(# the Sorts of a2,a3 #) -> additive ;
coherence
MSClosureStr(# the Sorts of c2,c3 #) is additive
by Def6;
end;

registration
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
let c3 be absolutely-additive MSSubsetFamily of the Sorts of c2;
cluster MSClosureStr(# the Sorts of a2,a3 #) -> additive absolutely-additive ;
coherence
MSClosureStr(# the Sorts of c2,c3 #) is absolutely-additive
by Def7;
end;

registration
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
let c3 be multiplicative MSSubsetFamily of the Sorts of c2;
cluster MSClosureStr(# the Sorts of a2,a3 #) -> multiplicative ;
coherence
MSClosureStr(# the Sorts of c2,c3 #) is multiplicative
by Def8;
end;

registration
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
let c3 be absolutely-multiplicative MSSubsetFamily of the Sorts of c2;
cluster MSClosureStr(# the Sorts of a2,a3 #) -> multiplicative absolutely-multiplicative ;
coherence
MSClosureStr(# the Sorts of c2,c3 #) is absolutely-multiplicative
by Def9;
end;

registration
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
let c3 be properly-upper-bound MSSubsetFamily of the Sorts of c2;
cluster MSClosureStr(# the Sorts of a2,a3 #) -> properly-upper-bound ;
coherence
MSClosureStr(# the Sorts of c2,c3 #) is properly-upper-bound
by Def10;
end;

registration
let c1 be 1-sorted ;
let c2 be many-sorted of c1;
let c3 be properly-lower-bound MSSubsetFamily of the Sorts of c2;
cluster MSClosureStr(# the Sorts of a2,a3 #) -> properly-lower-bound ;
coherence
MSClosureStr(# the Sorts of c2,c3 #) is properly-lower-bound
by Def11;
end;

registration
let c1 be 1-sorted ;
cluster absolutely-additive -> additive MSClosureStr of a1;
coherence
for b1 being MSClosureStr of c1 holds
( b1 is absolutely-additive implies b1 is additive )
proof end;
end;

registration
let c1 be 1-sorted ;
cluster absolutely-multiplicative -> multiplicative MSClosureStr of a1;
coherence
for b1 being MSClosureStr of c1 holds
( b1 is absolutely-multiplicative implies b1 is multiplicative )
proof end;
end;

registration
let c1 be 1-sorted ;
cluster absolutely-multiplicative -> properly-upper-bound MSClosureStr of a1;
coherence
for b1 being MSClosureStr of c1 holds
( b1 is absolutely-multiplicative implies b1 is properly-upper-bound )
proof end;
end;

registration
let c1 be 1-sorted ;
cluster absolutely-additive -> properly-lower-bound MSClosureStr of a1;
coherence
for b1 being MSClosureStr of c1 holds
( b1 is absolutely-additive implies b1 is properly-lower-bound )
proof end;
end;

definition
let c1 be 1-sorted ;
mode MSClosureSystem is absolutely-multiplicative MSClosureStr of a1;
end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
mode MSClosureOperator is reflexive monotonic idempotent MSSetOp of a2;
end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be ManySortedFunction of c2,c2;
func MSFixPoints c3 -> ManySortedSubset of a2 means :Def13: :: CLOSURE1:def 13
for b1, b2 being set holds
( b2 in a1 implies ( b1 in a4 . b2 iff ex b3 being Function st
( b3 = a3 . b2 & b1 in dom b3 & b3 . b1 = b1 ) ) );
existence
ex b1 being ManySortedSubset of c2 st
for b2, b3 being set holds
( b3 in c1 implies ( b2 in b1 . b3 iff ex b4 being Function st
( b4 = c3 . b3 & b2 in dom b4 & b4 . b2 = b2 ) ) )
proof end;
uniqueness
for b1, b2 being ManySortedSubset of c2 holds
( ( for b3, b4 being set holds
( b4 in c1 implies ( b3 in b1 . b4 iff ex b5 being Function st
( b5 = c3 . b4 & b3 in dom b5 & b5 . b3 = b3 ) ) ) ) & ( for b3, b4 being set holds
( b4 in c1 implies ( b3 in b2 . b4 iff ex b5 being Function st
( b5 = c3 . b4 & b3 in dom b5 & b5 . b3 = b3 ) ) ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def13 defines MSFixPoints CLOSURE1:def 13 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being ManySortedFunction of b2,b2
for b4 being ManySortedSubset of b2 holds
( b4 = MSFixPoints b3 iff for b5, b6 being set holds
( b6 in b1 implies ( b5 in b4 . b6 iff ex b7 being Function st
( b7 = b3 . b6 & b5 in dom b7 & b7 . b5 = b5 ) ) ) );

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

theorem Th28: :: CLOSURE1:28
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being ManySortedFunction of b2,b2 holds
( ( b3 in b2 & b4 .. b3 = b3 ) iff b3 in MSFixPoints b4 )
proof end;

theorem Th29: :: CLOSURE1:29
for b1 being set
for b2 being ManySortedSet of b1 holds MSFixPoints (id b2) = b2
proof end;

theorem Th30: :: CLOSURE1:30
for b1 being 1-sorted
for b2 being ManySortedSet of the carrier of b1
for b3 being reflexive monotonic MSSetOp of b2
for b4 being MSSubsetFamily of b2 holds
( b4 = MSFixPoints b3 implies MSClosureStr(# b2,b4 #) is MSClosureSystem of b1 )
proof end;

theorem Th31: :: CLOSURE1:31
for b1 being set
for b2 being ManySortedSet of b1
for b3 being properly-upper-bound MSSubsetFamily of b2
for b4 being Element of bool b2 holds
ex b5 being V5 MSSubsetFamily of b2 st
for b6 being ManySortedSet of b1 holds
( b6 in b5 iff ( b6 in b3 & b4 c= b6 ) )
proof end;

theorem Th32: :: CLOSURE1:32
for b1 being set
for b2 being ManySortedSet of b1
for b3 being properly-upper-bound MSSubsetFamily of b2
for b4 being Element of bool b2
for b5 being V5 MSSubsetFamily of b2 holds
( ( for b6 being ManySortedSet of b1 holds
( b6 in b5 iff ( b6 in b3 & b4 c= b6 ) ) ) implies for b6 being set
for b7 being non empty set holds
( b6 in b1 & b7 = b3 . b6 implies b5 . b6 = { b8 where B is Element of b7 : b4 . b6 c= b8 } ) )
proof end;

theorem Th33: :: CLOSURE1:33
for b1 being set
for b2 being ManySortedSet of b1
for b3 being properly-upper-bound MSSubsetFamily of b2 holds
ex b4 being MSSetOp of b2 st
for b5 being Element of bool b2
for b6 being V5 MSSubsetFamily of b2 holds
( ( for b7 being ManySortedSet of b1 holds
( b7 in b6 iff ( b7 in b3 & b5 c= b7 ) ) ) implies b4 .. b5 = meet b6 )
proof end;

theorem Th34: :: CLOSURE1:34
for b1 being set
for b2 being ManySortedSet of b1
for b3 being properly-upper-bound MSSubsetFamily of b2
for b4 being Element of bool b2
for b5 being MSSetOp of b2 holds
( b4 in b3 & ( for b6 being Element of bool b2
for b7 being V5 MSSubsetFamily of b2 holds
( ( for b8 being ManySortedSet of b1 holds
( b8 in b7 iff ( b8 in b3 & b6 c= b8 ) ) ) implies b5 .. b6 = meet b7 ) ) implies b5 .. b4 = b4 )
proof end;

theorem Th35: :: CLOSURE1:35
for b1 being set
for b2 being ManySortedSet of b1
for b3 being absolutely-multiplicative MSSubsetFamily of b2
for b4 being Element of bool b2
for b5 being MSSetOp of b2 holds
( b5 .. b4 = b4 & ( for b6 being Element of bool b2
for b7 being V5 MSSubsetFamily of b2 holds
( ( for b8 being ManySortedSet of b1 holds
( b8 in b7 iff ( b8 in b3 & b6 c= b8 ) ) ) implies b5 .. b6 = meet b7 ) ) implies b4 in b3 )
proof end;

theorem Th36: :: CLOSURE1:36
for b1 being set
for b2 being ManySortedSet of b1
for b3 being properly-upper-bound MSSubsetFamily of b2
for b4 being MSSetOp of b2 holds
( ( for b5 being Element of bool b2
for b6 being V5 MSSubsetFamily of b2 holds
( ( for b7 being ManySortedSet of b1 holds
( b7 in b6 iff ( b7 in b3 & b5 c= b7 ) ) ) implies b4 .. b5 = meet b6 ) ) implies ( b4 is reflexive & b4 is monotonic ) )
proof end;

theorem Th37: :: CLOSURE1:37
for b1 being set
for b2 being ManySortedSet of b1
for b3 being absolutely-multiplicative MSSubsetFamily of b2
for b4 being MSSetOp of b2 holds
( ( for b5 being Element of bool b2
for b6 being V5 MSSubsetFamily of b2 holds
( ( for b7 being ManySortedSet of b1 holds
( b7 in b6 iff ( b7 in b3 & b5 c= b7 ) ) ) implies b4 .. b5 = meet b6 ) ) implies b4 is idempotent )
proof end;

theorem Th38: :: CLOSURE1:38
for b1 being 1-sorted
for b2 being MSClosureSystem of b1
for b3 being MSSetOp of the Sorts of b2 holds
( ( for b4 being Element of bool the Sorts of b2
for b5 being V5 MSSubsetFamily of the Sorts of b2 holds
( ( for b6 being ManySortedSet of the carrier of b1 holds
( b6 in b5 iff ( b6 in the Family of b2 & b4 c= b6 ) ) ) implies b3 .. b4 = meet b5 ) ) implies b3 is MSClosureOperator of the Sorts of b2 ) by Th36, Th37;

definition
let c1 be 1-sorted ;
let c2 be ManySortedSet of the carrier of c1;
let c3 be MSClosureOperator of c2;
func ClOp->ClSys c3 -> MSClosureSystem of a1 means :Def14: :: CLOSURE1:def 14
ex b1 being MSSubsetFamily of a2 st
( b1 = MSFixPoints a3 & a4 = MSClosureStr(# a2,b1 #) );
existence
ex b1 being MSClosureSystem of c1ex b2 being MSSubsetFamily of c2 st
( b2 = MSFixPoints c3 & b1 = MSClosureStr(# c2,b2 #) )
proof end;
uniqueness
for b1, b2 being MSClosureSystem of c1 holds
( ex b3 being MSSubsetFamily of c2 st
( b3 = MSFixPoints c3 & b1 = MSClosureStr(# c2,b3 #) ) & ex b3 being MSSubsetFamily of c2 st
( b3 = MSFixPoints c3 & b2 = MSClosureStr(# c2,b3 #) ) implies b1 = b2 )
;
end;

:: deftheorem Def14 defines ClOp->ClSys CLOSURE1:def 14 :
for b1 being 1-sorted
for b2 being ManySortedSet of the carrier of b1
for b3 being MSClosureOperator of b2
for b4 being MSClosureSystem of b1 holds
( b4 = ClOp->ClSys b3 iff ex b5 being MSSubsetFamily of b2 st
( b5 = MSFixPoints b3 & b4 = MSClosureStr(# b2,b5 #) ) );

registration
let c1 be 1-sorted ;
let c2 be ManySortedSet of the carrier of c1;
let c3 be MSClosureOperator of c2;
cluster ClOp->ClSys a3 -> strict ;
coherence
ClOp->ClSys c3 is strict
proof end;
end;

registration
let c1 be 1-sorted ;
let c2 be V5 ManySortedSet of the carrier of c1;
let c3 be MSClosureOperator of c2;
cluster ClOp->ClSys a3 -> non-empty strict ;
coherence
ClOp->ClSys c3 is non-empty
proof end;
end;

definition
let c1 be 1-sorted ;
let c2 be MSClosureSystem of c1;
func ClSys->ClOp c2 -> MSClosureOperator of the Sorts of a2 means :Def15: :: CLOSURE1:def 15
for b1 being Element of bool the Sorts of a2
for b2 being V5 MSSubsetFamily of the Sorts of a2 holds
( ( for b3 being ManySortedSet of the carrier of a1 holds
( b3 in b2 iff ( b3 in the Family of a2 & b1 c= b3 ) ) ) implies a3 .. b1 = meet b2 );
existence
ex b1 being MSClosureOperator of the Sorts of c2 st
for b2 being Element of bool the Sorts of c2
for b3 being V5 MSSubsetFamily of the Sorts of c2 holds
( ( for b4 being ManySortedSet of the carrier of c1 holds
( b4 in b3 iff ( b4 in the Family of c2 & b2 c= b4 ) ) ) implies b1 .. b2 = meet b3 )
proof end;
uniqueness
for b1, b2 being MSClosureOperator of the Sorts of c2 holds
( ( for b3 being Element of bool the Sorts of c2
for b4 being V5 MSSubsetFamily of the Sorts of c2 holds
( ( for b5 being ManySortedSet of the carrier of c1 holds
( b5 in b4 iff ( b5 in the Family of c2 & b3 c= b5 ) ) ) implies b1 .. b3 = meet b4 ) ) & ( for b3 being Element of bool the Sorts of c2
for b4 being V5 MSSubsetFamily of the Sorts of c2 holds
( ( for b5 being ManySortedSet of the carrier of c1 holds
( b5 in b4 iff ( b5 in the Family of c2 & b3 c= b5 ) ) ) implies b2 .. b3 = meet b4 ) ) implies b1 = b2 )
proof end;
end;

:: deftheorem Def15 defines ClSys->ClOp CLOSURE1:def 15 :
for b1 being 1-sorted
for b2 being MSClosureSystem of b1
for b3 being MSClosureOperator of the Sorts of b2 holds
( b3 = ClSys->ClOp b2 iff for b4 being Element of bool the Sorts of b2
for b5 being V5 MSSubsetFamily of the Sorts of b2 holds
( ( for b6 being ManySortedSet of the carrier of b1 holds
( b6 in b5 iff ( b6 in the Family of b2 & b4 c= b6 ) ) ) implies b3 .. b4 = meet b5 ) );

theorem Th39: :: CLOSURE1:39
for b1 being 1-sorted
for b2 being ManySortedSet of the carrier of b1
for b3 being MSClosureOperator of b2 holds ClSys->ClOp (ClOp->ClSys b3) = b3
proof end;

theorem Th40: :: CLOSURE1:40
for b1 being 1-sorted
for b2 being MSClosureSystem of b1 holds ClOp->ClSys (ClSys->ClOp b2) = MSClosureStr(# the Sorts of b2,the Family of b2 #)
proof end;