:: PBOOLE semantic presentation

registration
cluster empty-yielding set ;
existence
ex b1 being Function st b1 is empty-yielding
by RELAT_1:60;
end;

theorem Th1: :: PBOOLE:1
for b1 being Function st b1 is non-empty holds
rng b1 is with_non-empty_elements
proof end;

theorem Th2: :: PBOOLE:2
for b1 being Function holds
( b1 is empty-yielding iff ( b1 = {} or rng b1 = {{} } ) )
proof end;

definition
let c1 be set ;
canceled;
canceled;
mode ManySortedSet of c1 -> Function means :Def3: :: PBOOLE:def 3
dom a2 = a1;
existence
ex b1 being Function st dom b1 = c1
proof end;
end;

:: deftheorem Def1 PBOOLE:def 1 :
canceled;

:: deftheorem Def2 PBOOLE:def 2 :
canceled;

:: deftheorem Def3 defines ManySortedSet PBOOLE:def 3 :
for b1 being set
for b2 being Function holds
( b2 is ManySortedSet of b1 iff dom b2 = b1 );

scheme :: PBOOLE:sch 1
s1{ F1() -> set , F2( set ) -> set } :
ex b1 being ManySortedSet of F1() st
for b2 being set st b2 in F1() holds
b1 . b2 in F2(b2)
provided
E2: for b1 being set st b1 in F1() holds
F2(b1) <> {}
proof end;

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
pred c2 in c3 means :Def4: :: PBOOLE:def 4
for b1 being set st b1 in a1 holds
a2 . b1 in a3 . b1;
pred c2 c= c3 means :Def5: :: PBOOLE:def 5
for b1 being set st b1 in a1 holds
a2 . b1 c= a3 . b1;
reflexivity
for b1 being ManySortedSet of c1
for b2 being set st b2 in c1 holds
b1 . b2 c= b1 . b2
;
end;

:: deftheorem Def4 defines in PBOOLE:def 4 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 in b3 iff for b4 being set st b4 in b1 holds
b2 . b4 in b3 . b4 );

:: deftheorem Def5 defines c= PBOOLE:def 5 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 c= b3 iff for b4 being set st b4 in b1 holds
b2 . b4 c= b3 . b4 );

definition
let c1 be non empty set ;
let c2, c3 be ManySortedSet of c1;
redefine pred in as c2 in c3;
asymmetry
for b1, b2 being ManySortedSet of c1 st b1 in b2 holds
not b2 in b1
proof end;
end;

scheme :: PBOOLE:sch 2
s2{ F1() -> set , F2() -> ManySortedSet of F1(), P1[ set , set ] } :
ex b1 being ManySortedSet of F1() st
for b2 being set st b2 in F1() holds
for b3 being set holds
( b3 in b1 . b2 iff ( b3 in F2() . b2 & P1[b2,b3] ) )
proof end;

theorem Th3: :: PBOOLE:3
for b1 being set
for b2, b3 being ManySortedSet of b1 st ( for b4 being set st b4 in b1 holds
b2 . b4 = b3 . b4 ) holds
b2 = b3
proof end;

definition
let c1 be set ;
func [0] c1 -> ManySortedSet of a1 equals :: PBOOLE:def 6
a1 --> {} ;
coherence
c1 --> {} is ManySortedSet of c1
proof end;
correctness
;
let c2, c3 be ManySortedSet of c1;
func c2 \/ c3 -> ManySortedSet of a1 means :Def7: :: PBOOLE:def 7
for b1 being set st b1 in a1 holds
a4 . b1 = (a2 . b1) \/ (a3 . b1);
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 = (c2 . b2) \/ (c3 . b2)
proof end;
uniqueness
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 = (c2 . b3) \/ (c3 . b3) ) & ( for b3 being set st b3 in c1 holds
b2 . b3 = (c2 . b3) \/ (c3 . b3) ) holds
b1 = b2
proof end;
commutativity
for b1, b2, b3 being ManySortedSet of c1 st ( for b4 being set st b4 in c1 holds
b1 . b4 = (b2 . b4) \/ (b3 . b4) ) holds
for b4 being set st b4 in c1 holds
b1 . b4 = (b3 . b4) \/ (b2 . b4)
;
idempotence
for b1 being ManySortedSet of c1
for b2 being set st b2 in c1 holds
b1 . b2 = (b1 . b2) \/ (b1 . b2)
;
func c2 /\ c3 -> ManySortedSet of a1 means :Def8: :: PBOOLE:def 8
for b1 being set st b1 in a1 holds
a4 . b1 = (a2 . b1) /\ (a3 . b1);
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 = (c2 . b2) /\ (c3 . b2)
proof end;
uniqueness
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 = (c2 . b3) /\ (c3 . b3) ) & ( for b3 being set st b3 in c1 holds
b2 . b3 = (c2 . b3) /\ (c3 . b3) ) holds
b1 = b2
proof end;
commutativity
for b1, b2, b3 being ManySortedSet of c1 st ( for b4 being set st b4 in c1 holds
b1 . b4 = (b2 . b4) /\ (b3 . b4) ) holds
for b4 being set st b4 in c1 holds
b1 . b4 = (b3 . b4) /\ (b2 . b4)
;
idempotence
for b1 being ManySortedSet of c1
for b2 being set st b2 in c1 holds
b1 . b2 = (b1 . b2) /\ (b1 . b2)
;
func c2 \ c3 -> ManySortedSet of a1 means :Def9: :: PBOOLE:def 9
for b1 being set st b1 in a1 holds
a4 . b1 = (a2 . b1) \ (a3 . b1);
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 = (c2 . b2) \ (c3 . b2)
proof end;
uniqueness
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 = (c2 . b3) \ (c3 . b3) ) & ( for b3 being set st b3 in c1 holds
b2 . b3 = (c2 . b3) \ (c3 . b3) ) holds
b1 = b2
proof end;
pred c2 overlaps c3 means :Def10: :: PBOOLE:def 10
for b1 being set st b1 in a1 holds
a2 . b1 meets a3 . b1;
symmetry
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 meets b2 . b3 ) holds
for b3 being set st b3 in c1 holds
b2 . b3 meets b1 . b3
;
pred c2 misses c3 means :Def11: :: PBOOLE:def 11
for b1 being set st b1 in a1 holds
a2 . b1 misses a3 . b1;
symmetry
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 misses b2 . b3 ) holds
for b3 being set st b3 in c1 holds
b2 . b3 misses b1 . b3
;
end;

:: deftheorem Def6 defines [0] PBOOLE:def 6 :
for b1 being set holds [0] b1 = b1 --> {} ;

:: deftheorem Def7 defines \/ PBOOLE:def 7 :
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b4 = b2 \/ b3 iff for b5 being set st b5 in b1 holds
b4 . b5 = (b2 . b5) \/ (b3 . b5) );

:: deftheorem Def8 defines /\ PBOOLE:def 8 :
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b4 = b2 /\ b3 iff for b5 being set st b5 in b1 holds
b4 . b5 = (b2 . b5) /\ (b3 . b5) );

:: deftheorem Def9 defines \ PBOOLE:def 9 :
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b4 = b2 \ b3 iff for b5 being set st b5 in b1 holds
b4 . b5 = (b2 . b5) \ (b3 . b5) );

:: deftheorem Def10 defines overlaps PBOOLE:def 10 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 overlaps b3 iff for b4 being set st b4 in b1 holds
b2 . b4 meets b3 . b4 );

:: deftheorem Def11 defines misses PBOOLE:def 11 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 misses b3 iff for b4 being set st b4 in b1 holds
b2 . b4 misses b3 . b4 );

notation
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
antonym c2 does_not_overlap c3 for c2 overlaps c3;
antonym c2 meets c3 for c2 misses c3;
end;

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
func c2 \+\ c3 -> ManySortedSet of a1 equals :: PBOOLE:def 12
(a2 \ a3) \/ (a3 \ a2);
correctness
coherence
(c2 \ c3) \/ (c3 \ c2) is ManySortedSet of c1
;
;
commutativity
for b1, b2, b3 being ManySortedSet of c1 st b1 = (b2 \ b3) \/ (b3 \ b2) holds
b1 = (b3 \ b2) \/ (b2 \ b3)
;
end;

:: deftheorem Def12 defines \+\ PBOOLE:def 12 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \+\ b3 = (b2 \ b3) \/ (b3 \ b2);

theorem Th4: :: PBOOLE:4
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being set st b4 in b1 holds
(b2 \+\ b3) . b4 = (b2 . b4) \+\ (b3 . b4)
proof end;

theorem Th5: :: PBOOLE:5
for b1, b2 being set holds ([0] b2) . b1 = {}
proof end;

theorem Th6: :: PBOOLE:6
for b1 being set
for b2 being ManySortedSet of b1 st ( for b3 being set st b3 in b1 holds
b2 . b3 = {} ) holds
b2 = [0] b1
proof end;

theorem Th7: :: PBOOLE:7
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st ( b2 in b3 or b2 in b4 ) holds
b2 in b3 \/ b4
proof end;

theorem Th8: :: PBOOLE:8
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b2 in b3 /\ b4 iff ( b2 in b3 & b2 in b4 ) )
proof end;

theorem Th9: :: PBOOLE:9
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 in b3 & b3 c= b4 holds
b2 in b4
proof end;

theorem Th10: :: PBOOLE:10
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 in b3 & b2 in b4 holds
b3 overlaps b4
proof end;

theorem Th11: :: PBOOLE:11
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 overlaps b3 holds
ex b4 being ManySortedSet of b1 st
( b4 in b2 & b4 in b3 )
proof end;

theorem Th12: :: PBOOLE:12
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 in b3 \ b4 holds
b2 in b3
proof end;

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
redefine pred = as c2 = c3 means :: PBOOLE:def 13
( a2 c= a3 & a3 c= a2 );
compatibility
( c2 = c3 iff ( c2 c= c3 & c3 c= c2 ) )
proof end;
end;

:: deftheorem Def13 defines = PBOOLE:def 13 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 = b3 iff ( b2 c= b3 & b3 c= b2 ) );

theorem Th13: :: PBOOLE:13
canceled;

theorem Th14: :: PBOOLE:14
canceled;

theorem Th15: :: PBOOLE:15
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 & b3 c= b4 holds
b2 c= b4
proof end;

theorem Th16: :: PBOOLE:16
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 c= b2 \/ b3 & b3 c= b2 \/ b3 )
proof end;

theorem Th17: :: PBOOLE:17
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 /\ b3 c= b2 & b2 /\ b3 c= b3 )
proof end;

theorem Th18: :: PBOOLE:18
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 & b4 c= b3 holds
b2 \/ b4 c= b3
proof end;

theorem Th19: :: PBOOLE:19
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 & b2 c= b4 holds
b2 c= b3 /\ b4
proof end;

theorem Th20: :: PBOOLE:20
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 holds
( b2 \/ b4 c= b3 \/ b4 & b4 \/ b2 c= b4 \/ b3 )
proof end;

theorem Th21: :: PBOOLE:21
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 holds
( b2 /\ b4 c= b3 /\ b4 & b4 /\ b2 c= b4 /\ b3 )
proof end;

theorem Th22: :: PBOOLE:22
for b1 being set
for b2, b3, b4, b5 being ManySortedSet of b1 st b2 c= b3 & b4 c= b5 holds
b2 \/ b4 c= b3 \/ b5
proof end;

theorem Th23: :: PBOOLE:23
for b1 being set
for b2, b3, b4, b5 being ManySortedSet of b1 st b2 c= b3 & b4 c= b5 holds
b2 /\ b4 c= b3 /\ b5
proof end;

theorem Th24: :: PBOOLE:24
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 c= b3 holds
( b2 \/ b3 = b3 & b3 \/ b2 = b3 )
proof end;

theorem Th25: :: PBOOLE:25
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 c= b3 holds
( b2 /\ b3 = b2 & b3 /\ b2 = b2 )
proof end;

theorem Th26: :: PBOOLE:26
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 /\ b3 c= b2 \/ b4
proof end;

theorem Th27: :: PBOOLE:27
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 holds
b2 \/ (b4 /\ b3) = (b2 \/ b4) /\ b3
proof end;

theorem Th28: :: PBOOLE:28
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b2 = b3 \/ b4 iff ( b3 c= b2 & b4 c= b2 & ( for b5 being ManySortedSet of b1 st b3 c= b5 & b4 c= b5 holds
b2 c= b5 ) ) )
proof end;

theorem Th29: :: PBOOLE:29
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b2 = b3 /\ b4 iff ( b2 c= b3 & b2 c= b4 & ( for b5 being ManySortedSet of b1 st b5 c= b3 & b5 c= b4 holds
b5 c= b2 ) ) )
proof end;

theorem Th30: :: PBOOLE:30
canceled;

theorem Th31: :: PBOOLE:31
canceled;

theorem Th32: :: PBOOLE:32
canceled;

theorem Th33: :: PBOOLE:33
canceled;

theorem Th34: :: PBOOLE:34
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds (b2 \/ b3) \/ b4 = b2 \/ (b3 \/ b4)
proof end;

theorem Th35: :: PBOOLE:35
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds (b2 /\ b3) /\ b4 = b2 /\ (b3 /\ b4)
proof end;

theorem Th36: :: PBOOLE:36
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 /\ (b2 \/ b3) = b2 & (b2 \/ b3) /\ b2 = b2 & b2 /\ (b3 \/ b2) = b2 & (b3 \/ b2) /\ b2 = b2 )
proof end;

theorem Th37: :: PBOOLE:37
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 \/ (b2 /\ b3) = b2 & (b2 /\ b3) \/ b2 = b2 & b2 \/ (b3 /\ b2) = b2 & (b3 /\ b2) \/ b2 = b2 )
proof end;

theorem Th38: :: PBOOLE:38
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 /\ (b3 \/ b4) = (b2 /\ b3) \/ (b2 /\ b4)
proof end;

theorem Th39: :: PBOOLE:39
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b2 \/ (b3 /\ b4) = (b2 \/ b3) /\ (b2 \/ b4) & (b3 /\ b4) \/ b2 = (b3 \/ b2) /\ (b4 \/ b2) )
proof end;

theorem Th40: :: PBOOLE:40
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st (b2 /\ b3) \/ (b2 /\ b4) = b2 holds
b2 c= b3 \/ b4
proof end;

theorem Th41: :: PBOOLE:41
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st (b2 \/ b3) /\ (b2 \/ b4) = b2 holds
b3 /\ b4 c= b2
proof end;

theorem Th42: :: PBOOLE:42
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds ((b2 /\ b3) \/ (b3 /\ b4)) \/ (b4 /\ b2) = ((b2 \/ b3) /\ (b3 \/ b4)) /\ (b4 \/ b2)
proof end;

theorem Th43: :: PBOOLE:43
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 \/ b3 c= b4 holds
( b2 c= b4 & b3 c= b4 )
proof end;

theorem Th44: :: PBOOLE:44
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 /\ b4 holds
( b2 c= b3 & b2 c= b4 )
proof end;

theorem Th45: :: PBOOLE:45
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( (b2 \/ b3) \/ b4 = (b2 \/ b4) \/ (b3 \/ b4) & b2 \/ (b3 \/ b4) = (b2 \/ b3) \/ (b2 \/ b4) )
proof end;

theorem Th46: :: PBOOLE:46
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( (b2 /\ b3) /\ b4 = (b2 /\ b4) /\ (b3 /\ b4) & b2 /\ (b3 /\ b4) = (b2 /\ b3) /\ (b2 /\ b4) )
proof end;

theorem Th47: :: PBOOLE:47
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 \/ (b2 \/ b3) = b2 \/ b3 & (b2 \/ b3) \/ b3 = b2 \/ b3 )
proof end;

theorem Th48: :: PBOOLE:48
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 /\ (b2 /\ b3) = b2 /\ b3 & (b2 /\ b3) /\ b3 = b2 /\ b3 )
proof end;

theorem Th49: :: PBOOLE:49
for b1 being set
for b2 being ManySortedSet of b1 holds [0] b1 c= b2
proof end;

theorem Th50: :: PBOOLE:50
for b1 being set
for b2 being ManySortedSet of b1 st b2 c= [0] b1 holds
b2 = [0] b1
proof end;

theorem Th51: :: PBOOLE:51
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 & b2 c= b4 & b3 /\ b4 = [0] b1 holds
b2 = [0] b1
proof end;

theorem Th52: :: PBOOLE:52
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 & b3 /\ b4 = [0] b1 holds
b2 /\ b4 = [0] b1
proof end;

theorem Th53: :: PBOOLE:53
for b1 being set
for b2 being ManySortedSet of b1 holds
( b2 \/ ([0] b1) = b2 & ([0] b1) \/ b2 = b2 )
proof end;

theorem Th54: :: PBOOLE:54
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 \/ b3 = [0] b1 holds
( b2 = [0] b1 & b3 = [0] b1 )
proof end;

theorem Th55: :: PBOOLE:55
for b1 being set
for b2 being ManySortedSet of b1 holds
( b2 /\ ([0] b1) = [0] b1 & ([0] b1) /\ b2 = [0] b1 )
proof end;

theorem Th56: :: PBOOLE:56
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 \/ b4 & b2 /\ b4 = [0] b1 holds
b2 c= b3
proof end;

theorem Th57: :: PBOOLE:57
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 c= b3 & b3 /\ b2 = [0] b1 holds
b2 = [0] b1 by Th25;

theorem Th58: :: PBOOLE:58
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 \ b3 = [0] b1 iff b2 c= b3 )
proof end;

theorem Th59: :: PBOOLE:59
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 holds
b2 \ b4 c= b3 \ b4
proof end;

theorem Th60: :: PBOOLE:60
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 holds
b4 \ b3 c= b4 \ b2
proof end;

theorem Th61: :: PBOOLE:61
for b1 being set
for b2, b3, b4, b5 being ManySortedSet of b1 st b2 c= b3 & b4 c= b5 holds
b2 \ b5 c= b3 \ b4
proof end;

theorem Th62: :: PBOOLE:62
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \ b3 c= b2
proof end;

theorem Th63: :: PBOOLE:63
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 c= b3 \ b2 holds
b2 = [0] b1
proof end;

theorem Th64: :: PBOOLE:64
for b1 being set
for b2 being ManySortedSet of b1 holds b2 \ b2 = [0] b1 by Th58;

theorem Th65: :: PBOOLE:65
for b1 being set
for b2 being ManySortedSet of b1 holds b2 \ ([0] b1) = b2
proof end;

theorem Th66: :: PBOOLE:66
for b1 being set
for b2 being ManySortedSet of b1 holds ([0] b1) \ b2 = [0] b1
proof end;

theorem Th67: :: PBOOLE:67
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 \ (b2 \/ b3) = [0] b1 & b2 \ (b3 \/ b2) = [0] b1 )
proof end;

theorem Th68: :: PBOOLE:68
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 /\ (b3 \ b4) = (b2 /\ b3) \ b4
proof end;

theorem Th69: :: PBOOLE:69
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( (b2 \ b3) /\ b3 = [0] b1 & b3 /\ (b2 \ b3) = [0] b1 )
proof end;

theorem Th70: :: PBOOLE:70
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 \ (b3 \ b4) = (b2 \ b3) \/ (b2 /\ b4)
proof end;

theorem Th71: :: PBOOLE:71
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( (b2 \ b3) \/ (b2 /\ b3) = b2 & (b2 /\ b3) \/ (b2 \ b3) = b2 )
proof end;

theorem Th72: :: PBOOLE:72
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 c= b3 holds
( b3 = b2 \/ (b3 \ b2) & b3 = (b3 \ b2) \/ b2 )
proof end;

theorem Th73: :: PBOOLE:73
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 \/ (b3 \ b2) = b2 \/ b3 & (b3 \ b2) \/ b2 = b3 \/ b2 )
proof end;

theorem Th74: :: PBOOLE:74
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \ (b2 \ b3) = b2 /\ b3
proof end;

theorem Th75: :: PBOOLE:75
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 \ (b3 /\ b4) = (b2 \ b3) \/ (b2 \ b4)
proof end;

theorem Th76: :: PBOOLE:76
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 \ (b2 /\ b3) = b2 \ b3 & b2 \ (b3 /\ b2) = b2 \ b3 )
proof end;

theorem Th77: :: PBOOLE:77
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 /\ b3 = [0] b1 iff b2 \ b3 = b2 )
proof end;

theorem Th78: :: PBOOLE:78
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds (b2 \/ b3) \ b4 = (b2 \ b4) \/ (b3 \ b4)
proof end;

theorem Th79: :: PBOOLE:79
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds (b2 \ b3) \ b4 = b2 \ (b3 \/ b4)
proof end;

theorem Th80: :: PBOOLE:80
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds (b2 /\ b3) \ b4 = (b2 \ b4) /\ (b3 \ b4)
proof end;

theorem Th81: :: PBOOLE:81
for b1 being set
for b2, b3 being ManySortedSet of b1 holds (b2 \/ b3) \ b3 = b2 \ b3
proof end;

theorem Th82: :: PBOOLE:82
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 \/ b4 holds
( b2 \ b3 c= b4 & b2 \ b4 c= b3 )
proof end;

theorem Th83: :: PBOOLE:83
for b1 being set
for b2, b3 being ManySortedSet of b1 holds (b2 \/ b3) \ (b2 /\ b3) = (b2 \ b3) \/ (b3 \ b2)
proof end;

theorem Th84: :: PBOOLE:84
for b1 being set
for b2, b3 being ManySortedSet of b1 holds (b2 \ b3) \ b3 = b2 \ b3
proof end;

theorem Th85: :: PBOOLE:85
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 \ (b3 \/ b4) = (b2 \ b3) /\ (b2 \ b4)
proof end;

theorem Th86: :: PBOOLE:86
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 \ b3 = b3 \ b2 holds
b2 = b3
proof end;

theorem Th87: :: PBOOLE:87
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 /\ (b3 \ b4) = (b2 /\ b3) \ (b2 /\ b4)
proof end;

theorem Th88: :: PBOOLE:88
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 \ b3 c= b4 holds
b2 c= b3 \/ b4
proof end;

theorem Th89: :: PBOOLE:89
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \ b3 c= b2 \+\ b3 by Th16;

theorem Th90: :: PBOOLE:90
canceled;

theorem Th91: :: PBOOLE:91
for b1 being set
for b2 being ManySortedSet of b1 holds
( b2 \+\ ([0] b1) = b2 & ([0] b1) \+\ b2 = b2 )
proof end;

theorem Th92: :: PBOOLE:92
for b1 being set
for b2 being ManySortedSet of b1 holds b2 \+\ b2 = [0] b1 by Th58;

theorem Th93: :: PBOOLE:93
canceled;

theorem Th94: :: PBOOLE:94
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \/ b3 = (b2 \+\ b3) \/ (b2 /\ b3)
proof end;

theorem Th95: :: PBOOLE:95
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \+\ b3 = (b2 \/ b3) \ (b2 /\ b3)
proof end;

theorem Th96: :: PBOOLE:96
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds (b2 \+\ b3) \ b4 = (b2 \ (b3 \/ b4)) \/ (b3 \ (b2 \/ b4))
proof end;

theorem Th97: :: PBOOLE:97
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds b2 \ (b3 \+\ b4) = (b2 \ (b3 \/ b4)) \/ ((b2 /\ b3) /\ b4)
proof end;

theorem Th98: :: PBOOLE:98
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds (b2 \+\ b3) \+\ b4 = b2 \+\ (b3 \+\ b4)
proof end;

theorem Th99: :: PBOOLE:99
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 \ b3 c= b4 & b3 \ b2 c= b4 holds
b2 \+\ b3 c= b4 by Th18;

theorem Th100: :: PBOOLE:100
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \/ b3 = b2 \+\ (b3 \ b2)
proof end;

theorem Th101: :: PBOOLE:101
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 /\ b3 = b2 \+\ (b2 \ b3)
proof end;

theorem Th102: :: PBOOLE:102
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \ b3 = b2 \+\ (b2 /\ b3)
proof end;

theorem Th103: :: PBOOLE:103
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \ b3 = b3 \+\ (b3 \/ b2)
proof end;

theorem Th104: :: PBOOLE:104
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \/ b3 = (b2 \+\ b3) \+\ (b2 /\ b3)
proof end;

theorem Th105: :: PBOOLE:105
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 /\ b3 = (b2 \+\ b3) \+\ (b2 \/ b3)
proof end;

theorem Th106: :: PBOOLE:106
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st ( b2 overlaps b3 or b2 overlaps b4 ) holds
b2 overlaps b3 \/ b4
proof end;

theorem Th107: :: PBOOLE:107
canceled;

theorem Th108: :: PBOOLE:108
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 overlaps b3 & b3 c= b4 holds
b2 overlaps b4
proof end;

theorem Th109: :: PBOOLE:109
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 overlaps b3 & b2 c= b4 holds
b4 overlaps b3
proof end;

theorem Th110: :: PBOOLE:110
for b1 being set
for b2, b3, b4, b5 being ManySortedSet of b1 st b2 c= b3 & b4 c= b5 & b2 overlaps b4 holds
b3 overlaps b5
proof end;

theorem Th111: :: PBOOLE:111
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 overlaps b3 /\ b4 holds
( b2 overlaps b3 & b2 overlaps b4 )
proof end;

theorem Th112: :: PBOOLE:112
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 overlaps b3 & b2 c= b4 holds
b2 overlaps b3 /\ b4
proof end;

theorem Th113: :: PBOOLE:113
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 overlaps b3 \ b4 holds
b2 overlaps b3
proof end;

theorem Th114: :: PBOOLE:114
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 does_not_overlap b3 holds
b4 /\ b2 does_not_overlap b4 /\ b3
proof end;

theorem Th115: :: PBOOLE:115
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 overlaps b3 \ b4 holds
b3 overlaps b2 \ b4
proof end;

theorem Th116: :: PBOOLE:116
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 meets b3 & b3 c= b4 holds
b2 meets b4
proof end;

theorem Th117: :: PBOOLE:117
canceled;

theorem Th118: :: PBOOLE:118
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 misses b3 \ b2
proof end;

theorem Th119: :: PBOOLE:119
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 /\ b3 misses b2 \ b3
proof end;

theorem Th120: :: PBOOLE:120
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 /\ b3 misses b2 \+\ b3
proof end;

theorem Th121: :: PBOOLE:121
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 misses b3 holds
b2 /\ b3 = [0] b1
proof end;

theorem Th122: :: PBOOLE:122
for b1 being set
for b2 being ManySortedSet of b1 st b2 <> [0] b1 holds
b2 meets b2
proof end;

theorem Th123: :: PBOOLE:123
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 c= b3 & b2 c= b4 & b3 misses b4 holds
b2 = [0] b1
proof end;

theorem Th124: :: PBOOLE:124
for b1 being set
for b2, b3, b4, b5 being ManySortedSet of b1 st b2 \/ b3 = b4 \/ b5 & b4 misses b2 & b5 misses b3 holds
( b4 = b3 & b5 = b2 )
proof end;

theorem Th125: :: PBOOLE:125
canceled;

theorem Th126: :: PBOOLE:126
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 misses b3 holds
b2 \ b3 = b2
proof end;

theorem Th127: :: PBOOLE:127
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 misses b3 holds
(b2 \/ b3) \ b3 = b2
proof end;

theorem Th128: :: PBOOLE:128
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 \ b3 = b2 holds
b2 misses b3
proof end;

theorem Th129: :: PBOOLE:129
for b1 being set
for b2, b3 being ManySortedSet of b1 holds b2 \ b3 misses b3 \ b2
proof end;

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
pred c2 [= c3 means :Def14: :: PBOOLE:def 14
for b1 being ManySortedSet of a1 st b1 in a2 holds
b1 in a3;
reflexivity
for b1, b2 being ManySortedSet of c1 st b2 in b1 holds
b2 in b1
;
end;

:: deftheorem Def14 defines [= PBOOLE:def 14 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b2 [= b3 iff for b4 being ManySortedSet of b1 st b4 in b2 holds
b4 in b3 );

theorem Th130: :: PBOOLE:130
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 c= b3 holds
b2 [= b3
proof end;

theorem Th131: :: PBOOLE:131
canceled;

theorem Th132: :: PBOOLE:132
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 st b2 [= b3 & b3 [= b4 holds
b2 [= b4
proof end;

theorem Th133: :: PBOOLE:133
[0] {} in [0] {}
proof end;

theorem Th134: :: PBOOLE:134
for b1 being ManySortedSet of {} holds b1 = {}
proof end;

theorem Th135: :: PBOOLE:135
for b1 being non empty set
for b2, b3 being ManySortedSet of b1 st b2 overlaps b3 holds
b2 meets b3
proof end;

theorem Th136: :: PBOOLE:136
for b1 being non empty set
for b2 being ManySortedSet of b1 holds not b2 in [0] b1
proof end;

theorem Th137: :: PBOOLE:137
for b1 being non empty set
for b2, b3, b4 being ManySortedSet of b1 st b2 in b3 & b2 in b4 holds
b3 /\ b4 <> [0] b1
proof end;

theorem Th138: :: PBOOLE:138
for b1 being non empty set
for b2 being ManySortedSet of b1 holds
( b2 does_not_overlap [0] b1 & [0] b1 does_not_overlap b2 )
proof end;

theorem Th139: :: PBOOLE:139
for b1 being non empty set
for b2, b3 being ManySortedSet of b1 st b2 /\ b3 = [0] b1 holds
b2 does_not_overlap b3
proof end;

theorem Th140: :: PBOOLE:140
for b1 being non empty set
for b2 being ManySortedSet of b1 st b2 overlaps b2 holds
b2 <> [0] b1
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
redefine attr empty-yielding as a2 is empty-yielding means :Def15: :: PBOOLE:def 15
for b1 being set st b1 in a1 holds
a2 . b1 is empty;
compatibility
( c2 is empty-yielding iff for b1 being set st b1 in c1 holds
c2 . b1 is empty )
proof end;
redefine attr non-empty as a2 is non-empty means :Def16: :: PBOOLE:def 16
for b1 being set st b1 in a1 holds
not a2 . b1 is empty;
compatibility
( c2 is non-empty iff for b1 being set st b1 in c1 holds
not c2 . b1 is empty )
proof end;
end;

:: deftheorem Def15 defines empty-yielding PBOOLE:def 15 :
for b1 being set
for b2 being ManySortedSet of b1 holds
( b2 is empty-yielding iff for b3 being set st b3 in b1 holds
b2 . b3 is empty );

:: deftheorem Def16 defines non-empty PBOOLE:def 16 :
for b1 being set
for b2 being ManySortedSet of b1 holds
( b2 is non-empty iff for b3 being set st b3 in b1 holds
not b2 . b3 is empty );

registration
let c1 be set ;
cluster V4 ManySortedSet of a1;
existence
ex b1 being ManySortedSet of c1 st b1 is empty-yielding
proof end;
cluster V3 ManySortedSet of a1;
existence
ex b1 being ManySortedSet of c1 st b1 is non-empty
proof end;
end;

registration
let c1 be non empty set ;
cluster V3 -> V4 ManySortedSet of a1;
coherence
for b1 being ManySortedSet of c1 st b1 is non-empty holds
not b1 is empty-yielding
proof end;
cluster V4 -> V3 ManySortedSet of a1;
coherence
for b1 being ManySortedSet of c1 st b1 is empty-yielding holds
not b1 is non-empty
proof end;
end;

theorem Th141: :: PBOOLE:141
for b1 being set
for b2 being ManySortedSet of b1 holds
( b2 is empty-yielding iff b2 = [0] b1 )
proof end;

theorem Th142: :: PBOOLE:142
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is empty-yielding & b3 c= b2 holds
b3 is empty-yielding
proof end;

theorem Th143: :: PBOOLE:143
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is non-empty & b2 c= b3 holds
b3 is non-empty
proof end;

theorem Th144: :: PBOOLE:144
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is non-empty & b2 [= b3 holds
b2 c= b3
proof end;

theorem Th145: :: PBOOLE:145
for b1 being set
for b2, b3 being ManySortedSet of b1 st b2 is non-empty & b2 [= b3 holds
b3 is non-empty
proof end;

theorem Th146: :: PBOOLE:146
for b1 being set
for b2 being V3 ManySortedSet of b1 ex b3 being ManySortedSet of b1 st b3 in b2
proof end;

theorem Th147: :: PBOOLE:147
for b1 being set
for b2 being ManySortedSet of b1
for b3 being V3 ManySortedSet of b1 st ( for b4 being ManySortedSet of b1 holds
( b4 in b3 iff b4 in b2 ) ) holds
b3 = b2
proof end;

theorem Th148: :: PBOOLE:148
for b1 being set
for b2, b3 being ManySortedSet of b1
for b4 being V3 ManySortedSet of b1 st ( for b5 being ManySortedSet of b1 holds
( b5 in b4 iff ( b5 in b2 & b5 in b3 ) ) ) holds
b4 = b2 /\ b3
proof end;

scheme :: PBOOLE:sch 3
s3{ F1() -> set , P1[ set , set ] } :
ex b1 being ManySortedSet of F1() st
for b2 being set st b2 in F1() holds
P1[b2,b1 . b2]
provided
E77: for b1 being set st b1 in F1() holds
ex b2 being set st P1[b1,b2]
proof end;

scheme :: PBOOLE:sch 4
s4{ F1() -> set , F2( set ) -> set } :
ex b1 being ManySortedSet of F1() st
for b2 being set st b2 in F1() holds
b1 . b2 = F2(b2)
proof end;

registration
let c1 be set ;
cluster Function-yielding ManySortedSet of a1;
existence
ex b1 being ManySortedSet of c1 st b1 is Function-yielding
proof end;
end;

definition
let c1 be set ;
mode ManySortedFunction of a1 is Function-yielding ManySortedSet of a1;
end;

theorem Th149: :: PBOOLE:149
for b1 being set
for b2 being V3 ManySortedSet of b1 holds not {} in rng b2
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
mode Component of a2 is Element of rng a2;
end;

theorem Th150: :: PBOOLE:150
for b1 being non empty set
for b2 being ManySortedSet of b1
for b3 being Component of b2 ex b4 being set st
( b4 in b1 & b3 = b2 . b4 )
proof end;

theorem Th151: :: PBOOLE:151
for b1 being set
for b2 being ManySortedSet of b1
for b3 being set st b3 in b1 holds
b2 . b3 is Component of b2
proof end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
mode Element of c2 -> ManySortedSet of a1 means :: PBOOLE:def 17
for b1 being set st b1 in a1 holds
a3 . b1 is Element of a2 . b1;
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 is Element of c2 . b2
proof end;
end;

:: deftheorem Def17 defines Element PBOOLE:def 17 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b3 is Element of b2 iff for b4 being set st b4 in b1 holds
b3 . b4 is Element of b2 . b4 );

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
mode ManySortedFunction of c2,c3 -> ManySortedSet of a1 means :Def18: :: PBOOLE:def 18
for b1 being set st b1 in a1 holds
a4 . b1 is Function of a2 . b1,a3 . b1;
correctness
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 is Function of c2 . b2,c3 . b2
;
proof end;
end;

:: deftheorem Def18 defines ManySortedFunction PBOOLE:def 18 :
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b4 is ManySortedFunction of b2,b3 iff for b5 being set st b5 in b1 holds
b4 . b5 is Function of b2 . b5,b3 . b5 );

registration
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
cluster -> Function-yielding ManySortedFunction of a2,a3;
coherence
for b1 being ManySortedFunction of c2,c3 holds b1 is Function-yielding
proof end;
end;

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
func c2 # -> ManySortedSet of a1 * means :Def19: :: PBOOLE:def 19
for b1 being Element of a1 * holds a3 . b1 = product (a2 * b1);
existence
ex b1 being ManySortedSet of c1 * st
for b2 being Element of c1 * holds b1 . b2 = product (c2 * b2)
proof end;
uniqueness
for b1, b2 being ManySortedSet of c1 * st ( for b3 being Element of c1 * holds b1 . b3 = product (c2 * b3) ) & ( for b3 being Element of c1 * holds b2 . b3 = product (c2 * b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def19 defines # PBOOLE:def 19 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being ManySortedSet of b1 * holds
( b3 = b2 # iff for b4 being Element of b1 * holds b3 . b4 = product (b2 * b4) );

registration
let c1 be set ;
let c2 be V3 ManySortedSet of c1;
cluster a2 # -> V3 V4 ;
coherence
c2 # is non-empty
proof end;
end;

definition
let c1 be set ;
let c2 be non empty set ;
let c3 be Function of c1,c2;
let c4 be ManySortedSet of c2;
redefine func * as c4 * c3 -> ManySortedSet of a1;
coherence
c3 * c4 is ManySortedSet of c1
proof end;
end;

definition
let c1 be set ;
let c2 be non empty set ;
let c3 be Function of c1,c2;
let c4 be V3 ManySortedSet of c2;
redefine func * as c4 * c3 -> V3 ManySortedSet of a1;
coherence
c3 * c4 is V3 ManySortedSet of c1
proof end;
end;

definition
let c1 be set ;
func *--> c1 -> Function of NAT ,{a1} * means :Def20: :: PBOOLE:def 20
for b1 being Nat holds a2 . b1 = b1 |-> a1;
existence
ex b1 being Function of NAT ,{c1} * st
for b2 being Nat holds b1 . b2 = b2 |-> c1
proof end;
uniqueness
for b1, b2 being Function of NAT ,{c1} * st ( for b3 being Nat holds b1 . b3 = b3 |-> c1 ) & ( for b3 being Nat holds b2 . b3 = b3 |-> c1 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def20 defines *--> PBOOLE:def 20 :
for b1 being set
for b2 being Function of NAT ,{b1} * holds
( b2 = *--> b1 iff for b3 being Nat holds b2 . b3 = b3 |-> b1 );

theorem Th152: :: PBOOLE:152
for b1 being Nat
for b2, b3 being set holds ({b2} --> b3) * (b1 |-> b2) = b1 |-> b3
proof end;

theorem Th153: :: PBOOLE:153
for b1 being non empty set
for b2 being Nat
for b3 being set
for b4 being ManySortedSet of {b3} st b4 = {b3} --> b1 holds
((b4 # ) * (*--> b3)) . b2 = Funcs (Seg b2),b1
proof end;

definition
let c1, c2 be set ;
redefine func --> as c1 --> c2 -> Function of a1,{a2};
coherence
c1 --> c2 is Function of c1,{c2}
proof end;
end;

scheme :: PBOOLE:sch 5
s5{ F1() -> non empty set , F2( set ) -> set } :
ex b1 being ManySortedSet of F1() st
for b2 being Element of F1() holds b1 . b2 = F2(b2)
proof end;

registration
let c1 be non empty set ;
let c2 be V3 ManySortedSet of c1;
let c3 be Element of c1;
cluster a2 . a3 -> non empty ;
coherence
not c2 . c3 is empty
by Def16;
end;

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
func [|c2,c3|] -> ManySortedSet of a1 means :: PBOOLE:def 21
for b1 being set st b1 in a1 holds
a4 . b1 = [:(a2 . b1),(a3 . b1):];
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 = [:(c2 . b2),(c3 . b2):]
proof end;
uniqueness
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 = [:(c2 . b3),(c3 . b3):] ) & ( for b3 being set st b3 in c1 holds
b2 . b3 = [:(c2 . b3),(c3 . b3):] ) holds
b1 = b2
proof end;
end;

:: deftheorem Def21 defines [| PBOOLE:def 21 :
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b4 = [|b2,b3|] iff for b5 being set st b5 in b1 holds
b4 . b5 = [:(b2 . b5),(b3 . b5):] );

definition
let c1 be set ;
let c2, c3 be ManySortedSet of c1;
deffunc H1( set ) -> set = Funcs (c2 . a1),(c3 . a1);
func MSFuncs c2,c3 -> ManySortedSet of a1 means :: PBOOLE:def 22
for b1 being set st b1 in a1 holds
a4 . b1 = Funcs (a2 . b1),(a3 . b1);
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 = Funcs (c2 . b2),(c3 . b2)
proof end;
uniqueness
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 = Funcs (c2 . b3),(c3 . b3) ) & ( for b3 being set st b3 in c1 holds
b2 . b3 = Funcs (c2 . b3),(c3 . b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def22 defines MSFuncs PBOOLE:def 22 :
for b1 being set
for b2, b3, b4 being ManySortedSet of b1 holds
( b4 = MSFuncs b2,b3 iff for b5 being set st b5 in b1 holds
b4 . b5 = Funcs (b2 . b5),(b3 . b5) );

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
mode ManySortedSubset of c2 -> ManySortedSet of a1 means :Def23: :: PBOOLE:def 23
a3 c= a2;
existence
ex b1 being ManySortedSet of c1 st b1 c= c2
;
end;

:: deftheorem Def23 defines ManySortedSubset PBOOLE:def 23 :
for b1 being set
for b2, b3 being ManySortedSet of b1 holds
( b3 is ManySortedSubset of b2 iff b3 c= b2 );

registration
let c1 be set ;
let c2 be V3 ManySortedSet of c1;
cluster V3 ManySortedSubset of a2;
existence
ex b1 being ManySortedSubset of c2 st b1 is non-empty
proof end;
end;

definition
let c1, c2 be Function-yielding Function;
func c2 ** c1 -> Function-yielding Function means :: PBOOLE:def 24
( dom a3 = (dom a1) /\ (dom a2) & ( for b1 being set st b1 in dom a3 holds
a3 . b1 = (a2 . b1) * (a1 . b1) ) );
existence
ex b1 being Function-yielding Function st
( dom b1 = (dom c1) /\ (dom c2) & ( for b2 being set st b2 in dom b1 holds
b1 . b2 = (c2 . b2) * (c1 . b2) ) )
proof end;
uniqueness
for b1, b2 being Function-yielding Function st dom b1 = (dom c1) /\ (dom c2) & ( for b3 being set st b3 in dom b1 holds
b1 . b3 = (c2 . b3) * (c1 . b3) ) & dom b2 = (dom c1) /\ (dom c2) & ( for b3 being set st b3 in dom b2 holds
b2 . b3 = (c2 . b3) * (c1 . b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def24 defines ** PBOOLE:def 24 :
for b1, b2, b3 being Function-yielding Function holds
( b3 = b2 ** b1 iff ( dom b3 = (dom b1) /\ (dom b2) & ( for b4 being set st b4 in dom b3 holds
b3 . b4 = (b2 . b4) * (b1 . b4) ) ) );

definition
let c1 be set ;
let c2 be ManySortedSet of c1;
let c3 be ManySortedFunction of c1;
func c3 .:.: c2 -> ManySortedSet of a1 means :: PBOOLE:def 25
for b1 being set st b1 in a1 holds
a4 . b1 = (a3 . b1) .: (a2 . b1);
existence
ex b1 being ManySortedSet of c1 st
for b2 being set st b2 in c1 holds
b1 . b2 = (c3 . b2) .: (c2 . b2)
proof end;
uniqueness
for b1, b2 being ManySortedSet of c1 st ( for b3 being set st b3 in c1 holds
b1 . b3 = (c3 . b3) .: (c2 . b3) ) & ( for b3 being set st b3 in c1 holds
b2 . b3 = (c3 . b3) .: (c2 . b3) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def25 defines .:.: PBOOLE:def 25 :
for b1 being set
for b2 being ManySortedSet of b1
for b3 being ManySortedFunction of b1
for b4 being ManySortedSet of b1 holds
( b4 = b3 .:.: b2 iff for b5 being set st b5 in b1 holds
b4 . b5 = (b3 . b5) .: (b2 . b5) );

registration
let c1 be set ;
cluster [0] a1 -> V4 ;
coherence
[0] c1 is empty-yielding
proof end;
end;