:: PARTIT1 semantic presentation

theorem Th1: :: PARTIT1:1
for b1 being non empty set
for b2 being a_partition of b1
for b3, b4 being set st b3 in b2 & b4 in b2 & b3 c= b4 holds
b3 = b4
proof end;

notation
let c1, c2 be set ;
synonym c1 '<' c2 for c1 is_finer_than c2;
synonym c2 '>' c1 for c1 is_finer_than c2;
end;

theorem Th2: :: PARTIT1:2
canceled;

theorem Th3: :: PARTIT1:3
for b1 being set holds union (b1 \ {{} }) = union b1
proof end;

theorem Th4: :: PARTIT1:4
for b1 being non empty set
for b2, b3 being a_partition of b1 st b2 '>' b3 & b3 '>' b2 holds
b3 c= b2
proof end;

theorem Th5: :: PARTIT1:5
for b1 being non empty set
for b2, b3 being a_partition of b1 st b2 '>' b3 & b3 '>' b2 holds
b2 = b3
proof end;

theorem Th6: :: PARTIT1:6
canceled;

theorem Th7: :: PARTIT1:7
for b1 being non empty set
for b2, b3 being a_partition of b1 st b2 '>' b3 holds
b2 is_coarser_than b3
proof end;

definition
let c1 be non empty set ;
let c2 be a_partition of c1;
let c3 be set ;
pred c3 is_a_dependent_set_of c2 means :Def1: :: PARTIT1:def 1
ex b1 being set st
( b1 c= a2 & b1 <> {} & a3 = union b1 );
end;

:: deftheorem Def1 defines is_a_dependent_set_of PARTIT1:def 1 :
for b1 being non empty set
for b2 being a_partition of b1
for b3 being set holds
( b3 is_a_dependent_set_of b2 iff ex b4 being set st
( b4 c= b2 & b4 <> {} & b3 = union b4 ) );

definition
let c1 be non empty set ;
let c2, c3 be a_partition of c1;
let c4 be set ;
pred c4 is_min_depend c2,c3 means :Def2: :: PARTIT1:def 2
( a4 is_a_dependent_set_of a2 & a4 is_a_dependent_set_of a3 & ( for b1 being set st b1 c= a4 & b1 is_a_dependent_set_of a2 & b1 is_a_dependent_set_of a3 holds
b1 = a4 ) );
end;

:: deftheorem Def2 defines is_min_depend PARTIT1:def 2 :
for b1 being non empty set
for b2, b3 being a_partition of b1
for b4 being set holds
( b4 is_min_depend b2,b3 iff ( b4 is_a_dependent_set_of b2 & b4 is_a_dependent_set_of b3 & ( for b5 being set st b5 c= b4 & b5 is_a_dependent_set_of b2 & b5 is_a_dependent_set_of b3 holds
b5 = b4 ) ) );

theorem Th8: :: PARTIT1:8
for b1 being non empty set
for b2, b3 being a_partition of b1 st b2 '>' b3 holds
for b4 being set st b4 in b2 holds
b4 is_a_dependent_set_of b3
proof end;

theorem Th9: :: PARTIT1:9
for b1 being non empty set
for b2 being a_partition of b1 holds b1 is_a_dependent_set_of b2
proof end;

theorem Th10: :: PARTIT1:10
for b1 being non empty set
for b2 being a_partition of b1
for b3 being Subset-Family of b1 st Intersect b3 <> {} & ( for b4 being set st b4 in b3 holds
b4 is_a_dependent_set_of b2 ) holds
Intersect b3 is_a_dependent_set_of b2
proof end;

theorem Th11: :: PARTIT1:11
for b1 being non empty set
for b2 being a_partition of b1
for b3, b4 being Subset of b1 st b3 is_a_dependent_set_of b2 & b4 is_a_dependent_set_of b2 & b3 meets b4 holds
b3 /\ b4 is_a_dependent_set_of b2
proof end;

theorem Th12: :: PARTIT1:12
for b1 being non empty set
for b2 being a_partition of b1
for b3 being Subset of b1 st b3 is_a_dependent_set_of b2 & b3 <> b1 holds
b3 ` is_a_dependent_set_of b2
proof end;

theorem Th13: :: PARTIT1:13
for b1 being non empty set
for b2, b3 being a_partition of b1
for b4 being Element of b1 ex b5 being Subset of b1 st
( b4 in b5 & b5 is_min_depend b2,b3 )
proof end;

theorem Th14: :: PARTIT1:14
for b1 being non empty set
for b2 being a_partition of b1
for b3 being Element of b1 ex b4 being Subset of b1 st
( b3 in b4 & b4 in b2 )
proof end;

definition
let c1 be set ;
func PARTITIONS c1 -> set means :Def3: :: PARTIT1:def 3
for b1 being set holds
( b1 in a2 iff b1 is a_partition of a1 );
existence
ex b1 being set st
for b2 being set holds
( b2 in b1 iff b2 is a_partition of c1 )
proof end;
uniqueness
for b1, b2 being set st ( for b3 being set holds
( b3 in b1 iff b3 is a_partition of c1 ) ) & ( for b3 being set holds
( b3 in b2 iff b3 is a_partition of c1 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def3 defines PARTITIONS PARTIT1:def 3 :
for b1 being set
for b2 being set holds
( b2 = PARTITIONS b1 iff for b3 being set holds
( b3 in b2 iff b3 is a_partition of b1 ) );

registration
let c1 be set ;
cluster PARTITIONS a1 -> non empty ;
coherence
not PARTITIONS c1 is empty
proof end;
end;

definition
let c1 be non empty set ;
let c2, c3 be a_partition of c1;
func c2 '/\' c3 -> a_partition of a1 equals :: PARTIT1:def 4
(INTERSECTION a2,a3) \ {{} };
correctness
coherence
(INTERSECTION c2,c3) \ {{} } is a_partition of c1
;
proof end;
commutativity
for b1, b2, b3 being a_partition of c1 st b1 = (INTERSECTION b2,b3) \ {{} } holds
b1 = (INTERSECTION b3,b2) \ {{} }
;
end;

:: deftheorem Def4 defines '/\' PARTIT1:def 4 :
for b1 being non empty set
for b2, b3 being a_partition of b1 holds b2 '/\' b3 = (INTERSECTION b2,b3) \ {{} };

theorem Th15: :: PARTIT1:15
for b1 being non empty set
for b2 being a_partition of b1 holds b2 '/\' b2 = b2
proof end;

theorem Th16: :: PARTIT1:16
for b1 being non empty set
for b2, b3, b4 being a_partition of b1 holds (b2 '/\' b3) '/\' b4 = b2 '/\' (b3 '/\' b4)
proof end;

theorem Th17: :: PARTIT1:17
for b1 being non empty set
for b2, b3 being a_partition of b1 holds b2 '>' b2 '/\' b3
proof end;

definition
let c1 be non empty set ;
let c2, c3 be a_partition of c1;
func c2 '\/' c3 -> a_partition of a1 means :Def5: :: PARTIT1:def 5
for b1 being set holds
( b1 in a4 iff b1 is_min_depend a2,a3 );
existence
ex b1 being a_partition of c1 st
for b2 being set holds
( b2 in b1 iff b2 is_min_depend c2,c3 )
proof end;
uniqueness
for b1, b2 being a_partition of c1 st ( for b3 being set holds
( b3 in b1 iff b3 is_min_depend c2,c3 ) ) & ( for b3 being set holds
( b3 in b2 iff b3 is_min_depend c2,c3 ) ) holds
b1 = b2
proof end;
commutativity
for b1, b2, b3 being a_partition of c1 st ( for b4 being set holds
( b4 in b1 iff b4 is_min_depend b2,b3 ) ) holds
for b4 being set holds
( b4 in b1 iff b4 is_min_depend b3,b2 )
proof end;
end;

:: deftheorem Def5 defines '\/' PARTIT1:def 5 :
for b1 being non empty set
for b2, b3, b4 being a_partition of b1 holds
( b4 = b2 '\/' b3 iff for b5 being set holds
( b5 in b4 iff b5 is_min_depend b2,b3 ) );

theorem Th18: :: PARTIT1:18
canceled;

theorem Th19: :: PARTIT1:19
for b1 being non empty set
for b2, b3 being a_partition of b1 holds b2 '<' b2 '\/' b3
proof end;

theorem Th20: :: PARTIT1:20
for b1 being non empty set
for b2 being a_partition of b1 holds b2 '\/' b2 = b2
proof end;

theorem Th21: :: PARTIT1:21
for b1 being non empty set
for b2, b3, b4 being set
for b5, b6 being a_partition of b1 st b5 '<' b6 & b2 in b6 & b3 in b5 & b4 in b2 & b4 in b3 holds
b3 c= b2
proof end;

theorem Th22: :: PARTIT1:22
for b1 being non empty set
for b2, b3, b4 being set
for b5, b6 being a_partition of b1 st b2 in b5 '\/' b6 & b3 in b5 & b4 in b2 & b4 in b3 holds
b3 c= b2
proof end;

theorem Th23: :: PARTIT1:23
for b1 being non empty set
for b2 being a_partition of b1 ex b3 being Equivalence_Relation of b1 st
for b4, b5 being set holds
( [b4,b5] in b3 iff ex b6 being Subset of b1 st
( b6 in b2 & b4 in b6 & b5 in b6 ) )
proof end;

definition
let c1 be non empty set ;
let c2 be a_partition of c1;
func ERl c2 -> Equivalence_Relation of a1 means :Def6: :: PARTIT1:def 6
for b1, b2 being set holds
( [b1,b2] in a3 iff ex b3 being Subset of a1 st
( b3 in a2 & b1 in b3 & b2 in b3 ) );
existence
ex b1 being Equivalence_Relation of c1 st
for b2, b3 being set holds
( [b2,b3] in b1 iff ex b4 being Subset of c1 st
( b4 in c2 & b2 in b4 & b3 in b4 ) )
by Th23;
uniqueness
for b1, b2 being Equivalence_Relation of c1 st ( for b3, b4 being set holds
( [b3,b4] in b1 iff ex b5 being Subset of c1 st
( b5 in c2 & b3 in b5 & b4 in b5 ) ) ) & ( for b3, b4 being set holds
( [b3,b4] in b2 iff ex b5 being Subset of c1 st
( b5 in c2 & b3 in b5 & b4 in b5 ) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def6 defines ERl PARTIT1:def 6 :
for b1 being non empty set
for b2 being a_partition of b1
for b3 being Equivalence_Relation of b1 holds
( b3 = ERl b2 iff for b4, b5 being set holds
( [b4,b5] in b3 iff ex b6 being Subset of b1 st
( b6 in b2 & b4 in b6 & b5 in b6 ) ) );

definition
let c1 be non empty set ;
defpred S1[ set , set ] means ex b1 being a_partition of c1 st
( b1 = a1 & a2 = ERl b1 );
E21: for b1 being set st b1 in PARTITIONS c1 holds
ex b2 being set st S1[b1,b2]
proof end;
func Rel c1 -> Function means :: PARTIT1:def 7
( dom a2 = PARTITIONS a1 & ( for b1 being set st b1 in PARTITIONS a1 holds
ex b2 being a_partition of a1 st
( b2 = b1 & a2 . b1 = ERl b2 ) ) );
existence
ex b1 being Function st
( dom b1 = PARTITIONS c1 & ( for b2 being set st b2 in PARTITIONS c1 holds
ex b3 being a_partition of c1 st
( b3 = b2 & b1 . b2 = ERl b3 ) ) )
proof end;
uniqueness
for b1, b2 being Function st dom b1 = PARTITIONS c1 & ( for b3 being set st b3 in PARTITIONS c1 holds
ex b4 being a_partition of c1 st
( b4 = b3 & b1 . b3 = ERl b4 ) ) & dom b2 = PARTITIONS c1 & ( for b3 being set st b3 in PARTITIONS c1 holds
ex b4 being a_partition of c1 st
( b4 = b3 & b2 . b3 = ERl b4 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def7 defines Rel PARTIT1:def 7 :
for b1 being non empty set
for b2 being Function holds
( b2 = Rel b1 iff ( dom b2 = PARTITIONS b1 & ( for b3 being set st b3 in PARTITIONS b1 holds
ex b4 being a_partition of b1 st
( b4 = b3 & b2 . b3 = ERl b4 ) ) ) );

theorem Th24: :: PARTIT1:24
for b1 being non empty set
for b2, b3 being a_partition of b1 holds
( b2 '<' b3 iff ERl b2 c= ERl b3 )
proof end;

theorem Th25: :: PARTIT1:25
for b1 being non empty set
for b2, b3 being a_partition of b1
for b4, b5, b6 being set
for b7 being FinSequence of b1 st b4 c= b1 & b5 in b4 & b7 . 1 = b5 & b7 . (len b7) = b6 & 1 <= len b7 & ( for b8 being Nat st 1 <= b8 & b8 < len b7 holds
ex b9, b10, b11 being set st
( b9 in b2 & b10 in b3 & b7 . b8 in b9 & b11 in b9 & b11 in b10 & b7 . (b8 + 1) in b10 ) ) & b4 is_a_dependent_set_of b2 & b4 is_a_dependent_set_of b3 holds
b6 in b4
proof end;

theorem Th26: :: PARTIT1:26
for b1 being non empty set
for b2, b3 being Equivalence_Relation of b1
for b4 being FinSequence of b1
for b5, b6 being set st b5 in b1 & b6 in b1 & b4 . 1 = b5 & b4 . (len b4) = b6 & 1 <= len b4 & ( for b7 being Nat st 1 <= b7 & b7 < len b4 holds
ex b8 being set st
( b8 in b1 & [(b4 . b7),b8] in b2 \/ b3 & [b8,(b4 . (b7 + 1))] in b2 \/ b3 ) ) holds
[b5,b6] in b2 "\/" b3
proof end;

theorem Th27: :: PARTIT1:27
for b1 being non empty set
for b2, b3 being a_partition of b1 holds ERl (b2 '\/' b3) = (ERl b2) "\/" (ERl b3)
proof end;

theorem Th28: :: PARTIT1:28
for b1 being non empty set
for b2, b3 being a_partition of b1 holds ERl (b2 '/\' b3) = (ERl b2) /\ (ERl b3)
proof end;

theorem Th29: :: PARTIT1:29
for b1 being non empty set
for b2, b3 being a_partition of b1 st ERl b2 = ERl b3 holds
b2 = b3
proof end;

theorem Th30: :: PARTIT1:30
for b1 being non empty set
for b2, b3, b4 being a_partition of b1 holds (b2 '\/' b3) '\/' b4 = b2 '\/' (b3 '\/' b4)
proof end;

theorem Th31: :: PARTIT1:31
for b1 being non empty set
for b2, b3 being a_partition of b1 holds b2 '/\' (b2 '\/' b3) = b2
proof end;

theorem Th32: :: PARTIT1:32
for b1 being non empty set
for b2, b3 being a_partition of b1 holds b2 '\/' (b2 '/\' b3) = b2
proof end;

theorem Th33: :: PARTIT1:33
for b1 being non empty set
for b2, b3, b4 being a_partition of b1 st b2 '<' b4 & b3 '<' b4 holds
b2 '\/' b3 '<' b4
proof end;

theorem Th34: :: PARTIT1:34
for b1 being non empty set
for b2, b3, b4 being a_partition of b1 st b2 '>' b4 & b3 '>' b4 holds
b2 '/\' b3 '>' b4
proof end;

notation
let c1 be non empty set ;
synonym %I c1 for SmallestPartition c1;
end;

definition
let c1 be non empty set ;
canceled;
func %O c1 -> a_partition of a1 equals :: PARTIT1:def 9
{a1};
correctness
coherence
{c1} is a_partition of c1
;
proof end;
end;

:: deftheorem Def8 PARTIT1:def 8 :
canceled;

:: deftheorem Def9 defines %O PARTIT1:def 9 :
for b1 being non empty set holds %O b1 = {b1};

theorem Th35: :: PARTIT1:35
for b1 being non empty set holds %I b1 = { b2 where B is Subset of b1 : ex b1 being set st
( b2 = {b3} & b3 in b1 )
}
proof end;

theorem Th36: :: PARTIT1:36
for b1 being non empty set
for b2 being a_partition of b1 holds
( %O b1 '>' b2 & b2 '>' %I b1 )
proof end;

theorem Th37: :: PARTIT1:37
for b1 being non empty set holds ERl (%O b1) = nabla b1
proof end;

theorem Th38: :: PARTIT1:38
for b1 being non empty set holds ERl (%I b1) = id b1
proof end;

theorem Th39: :: PARTIT1:39
for b1 being non empty set holds %I b1 '<' %O b1
proof end;

theorem Th40: :: PARTIT1:40
for b1 being non empty set
for b2 being a_partition of b1 holds
( (%O b1) '\/' b2 = %O b1 & (%O b1) '/\' b2 = b2 )
proof end;

theorem Th41: :: PARTIT1:41
for b1 being non empty set
for b2 being a_partition of b1 holds
( (%I b1) '\/' b2 = b2 & (%I b1) '/\' b2 = %I b1 )
proof end;