:: CLASSES2 semantic presentation

Lemma1: for b1 being set holds Tarski-Class b1 is_Tarski-Class
proof end;

registration
cluster being_Tarski-Class -> subset-closed set ;
coherence
for b1 being set st b1 is being_Tarski-Class holds
b1 is subset-closed
by CLASSES1:def 2;
end;

registration
let c1 be set ;
cluster Tarski-Class a1 -> subset-closed being_Tarski-Class ;
coherence
Tarski-Class c1 is being_Tarski-Class
by Lemma1;
end;

theorem Th1: :: CLASSES2:1
for b1, b2 being set st b1 is subset-closed & b2 in b1 holds
( not b2,b1 are_equipotent & Card b2 <` Card b1 )
proof end;

theorem Th2: :: CLASSES2:2
canceled;

theorem Th3: :: CLASSES2:3
for b1, b2, b3 being set st b1 is_Tarski-Class & b2 in b1 & b3 in b1 holds
( {b2} in b1 & {b2,b3} in b1 )
proof end;

theorem Th4: :: CLASSES2:4
for b1, b2, b3 being set st b1 is_Tarski-Class & b2 in b1 & b3 in b1 holds
[b2,b3] in b1
proof end;

theorem Th5: :: CLASSES2:5
for b1, b2 being set st b1 is_Tarski-Class & b2 in b1 holds
Tarski-Class b2 c= b1
proof end;

theorem Th6: :: CLASSES2:6
for b1 being Ordinal
for b2 being set st b2 is_Tarski-Class & b1 in b2 holds
( succ b1 in b2 & b1 c= b2 )
proof end;

theorem Th7: :: CLASSES2:7
for b1 being Ordinal
for b2 being set st b1 in Tarski-Class b2 holds
( succ b1 in Tarski-Class b2 & b1 c= Tarski-Class b2 ) by Th6;

theorem Th8: :: CLASSES2:8
for b1, b2 being set st b1 is subset-closed & b2 is epsilon-transitive & b2 in b1 holds
b2 c= b1
proof end;

theorem Th9: :: CLASSES2:9
for b1, b2 being set st b1 is epsilon-transitive & b1 in Tarski-Class b2 holds
b1 c= Tarski-Class b2 by Th8;

theorem Th10: :: CLASSES2:10
for b1 being set st b1 is_Tarski-Class holds
On b1 = Card b1
proof end;

theorem Th11: :: CLASSES2:11
for b1 being set holds On (Tarski-Class b1) = Card (Tarski-Class b1) by Th10;

theorem Th12: :: CLASSES2:12
for b1, b2 being set st b1 is_Tarski-Class & b2 in b1 holds
Card b2 in b1
proof end;

theorem Th13: :: CLASSES2:13
for b1, b2 being set st b1 in Tarski-Class b2 holds
Card b1 in Tarski-Class b2 by Th12;

theorem Th14: :: CLASSES2:14
for b1, b2 being set st b1 is_Tarski-Class & b2 in Card b1 holds
b2 in b1
proof end;

theorem Th15: :: CLASSES2:15
for b1, b2 being set st b1 in Card (Tarski-Class b2) holds
b1 in Tarski-Class b2 by Th14;

theorem Th16: :: CLASSES2:16
for b1 being Cardinal
for b2 being set st b2 is_Tarski-Class & b1 <` Card b2 holds
b1 in b2
proof end;

theorem Th17: :: CLASSES2:17
for b1 being Cardinal
for b2 being set st b1 <` Card (Tarski-Class b2) holds
b1 in Tarski-Class b2
proof end;

theorem Th18: :: CLASSES2:18
for b1 being Cardinal
for b2 being set st b2 is_Tarski-Class & b1 in b2 holds
b1 c= b2 by Th6;

theorem Th19: :: CLASSES2:19
for b1 being Cardinal
for b2 being set st b1 in Tarski-Class b2 holds
b1 c= Tarski-Class b2 by Th6;

theorem Th20: :: CLASSES2:20
for b1 being set st b1 is_Tarski-Class holds
Card b1 is_limit_ordinal
proof end;

theorem Th21: :: CLASSES2:21
for b1 being set st b1 is_Tarski-Class & b1 <> {} holds
( Card b1 <> 0 & Card b1 <> {} & Card b1 is_limit_ordinal )
proof end;

theorem Th22: :: CLASSES2:22
for b1 being set holds
( Card (Tarski-Class b1) <> 0 & Card (Tarski-Class b1) <> {} & Card (Tarski-Class b1) is_limit_ordinal )
proof end;

theorem Th23: :: CLASSES2:23
for b1, b2 being set st b1 is_Tarski-Class & ( ( b2 in b1 & b1 is epsilon-transitive ) or ( b2 in b1 & b2 c= b1 ) or ( Card b2 <` Card b1 & b2 c= b1 ) ) holds
Funcs b2,b1 c= b1
proof end;

theorem Th24: :: CLASSES2:24
for b1, b2 being set st ( ( b1 in Tarski-Class b2 & b2 is epsilon-transitive ) or ( b1 in Tarski-Class b2 & b1 c= Tarski-Class b2 ) or ( Card b1 <` Card (Tarski-Class b2) & b1 c= Tarski-Class b2 ) ) holds
Funcs b1,(Tarski-Class b2) c= Tarski-Class b2
proof end;

theorem Th25: :: CLASSES2:25
for b1 being T-Sequence st dom b1 is_limit_ordinal & ( for b2 being Ordinal st b2 in dom b1 holds
b1 . b2 = Rank b2 ) holds
Rank (dom b1) = Union b1
proof end;

defpred S1[ Ordinal] means for b1 being set st b1 is_Tarski-Class & a1 in On b1 holds
( Card (Rank a1) <` Card b1 & Rank a1 in b1 );

Lemma16: S1[ {} ]
by Th10, CARD_1:47, CLASSES1:33, ORDINAL2:def 2;

Lemma17: for b1 being Ordinal st S1[b1] holds
S1[ succ b1]
proof end;

Lemma18: for b1 being Ordinal st b1 <> {} & b1 is_limit_ordinal & ( for b2 being Ordinal st b2 in b1 holds
S1[b2] ) holds
S1[b1]
proof end;

theorem Th26: :: CLASSES2:26
for b1 being Ordinal
for b2 being set st b2 is_Tarski-Class & b1 in On b2 holds
( Card (Rank b1) <` Card b2 & Rank b1 in b2 )
proof end;

theorem Th27: :: CLASSES2:27
for b1 being Ordinal
for b2 being set st b1 in On (Tarski-Class b2) holds
( Card (Rank b1) <` Card (Tarski-Class b2) & Rank b1 in Tarski-Class b2 ) by Th26;

theorem Th28: :: CLASSES2:28
for b1 being set st b1 is_Tarski-Class holds
Rank (Card b1) c= b1
proof end;

theorem Th29: :: CLASSES2:29
for b1 being set holds Rank (Card (Tarski-Class b1)) c= Tarski-Class b1
proof end;

deffunc H1( set ) -> set = the_rank_of a1;

deffunc H2( set ) -> set = Card (bool a1);

theorem Th30: :: CLASSES2:30
for b1, b2 being set st b1 is_Tarski-Class & b1 is epsilon-transitive & b2 in b1 holds
the_rank_of b2 in b1
proof end;

theorem Th31: :: CLASSES2:31
for b1 being set st b1 is_Tarski-Class & b1 is epsilon-transitive holds
b1 c= Rank (Card b1)
proof end;

theorem Th32: :: CLASSES2:32
for b1 being set st b1 is_Tarski-Class & b1 is epsilon-transitive holds
Rank (Card b1) = b1
proof end;

theorem Th33: :: CLASSES2:33
for b1 being Ordinal
for b2 being set st b2 is_Tarski-Class & b1 in On b2 holds
Card (Rank b1) <=` Card b2
proof end;

theorem Th34: :: CLASSES2:34
for b1 being Ordinal
for b2 being set st b1 in On (Tarski-Class b2) holds
Card (Rank b1) <=` Card (Tarski-Class b2)
proof end;

theorem Th35: :: CLASSES2:35
for b1 being set st b1 is_Tarski-Class holds
Card b1 = Card (Rank (Card b1))
proof end;

theorem Th36: :: CLASSES2:36
for b1 being set holds Card (Tarski-Class b1) = Card (Rank (Card (Tarski-Class b1))) by Th35;

theorem Th37: :: CLASSES2:37
for b1, b2 being set st b1 is_Tarski-Class & b2 c= Rank (Card b1) & not b2, Rank (Card b1) are_equipotent holds
b2 in Rank (Card b1)
proof end;

theorem Th38: :: CLASSES2:38
for b1, b2 being set holds
( not b1 c= Rank (Card (Tarski-Class b2)) or b1, Rank (Card (Tarski-Class b2)) are_equipotent or b1 in Rank (Card (Tarski-Class b2)) ) by Th37;

theorem Th39: :: CLASSES2:39
for b1 being set st b1 is_Tarski-Class holds
Rank (Card b1) is_Tarski-Class
proof end;

theorem Th40: :: CLASSES2:40
for b1 being set holds Rank (Card (Tarski-Class b1)) is_Tarski-Class by Th39;

theorem Th41: :: CLASSES2:41
for b1 being Ordinal
for b2 being set st b2 is epsilon-transitive & b1 in the_rank_of b2 holds
ex b3 being set st
( b3 in b2 & the_rank_of b3 = b1 )
proof end;

theorem Th42: :: CLASSES2:42
for b1 being set st b1 is epsilon-transitive holds
Card (the_rank_of b1) <=` Card b1
proof end;

theorem Th43: :: CLASSES2:43
for b1, b2 being set st b1 is_Tarski-Class & b2 is epsilon-transitive & b2 in b1 holds
b2 in Rank (Card b1)
proof end;

theorem Th44: :: CLASSES2:44
for b1, b2 being set st b1 is epsilon-transitive & b1 in Tarski-Class b2 holds
b1 in Rank (Card (Tarski-Class b2)) by Th43;

theorem Th45: :: CLASSES2:45
for b1 being set st b1 is epsilon-transitive holds
Rank (Card (Tarski-Class b1)) is_Tarski-Class_of b1
proof end;

theorem Th46: :: CLASSES2:46
for b1 being set st b1 is epsilon-transitive holds
Rank (Card (Tarski-Class b1)) = Tarski-Class b1
proof end;

definition
let c1 be set ;
attr a1 is universal means :Def1: :: CLASSES2:def 1
( a1 is epsilon-transitive & a1 is_Tarski-Class );
end;

:: deftheorem Def1 defines universal CLASSES2:def 1 :
for b1 being set holds
( b1 is universal iff ( b1 is epsilon-transitive & b1 is_Tarski-Class ) );

registration
cluster universal -> epsilon-transitive subset-closed being_Tarski-Class set ;
coherence
for b1 being set st b1 is universal holds
( b1 is epsilon-transitive & b1 is being_Tarski-Class )
by Def1;
cluster epsilon-transitive being_Tarski-Class -> universal set ;
coherence
for b1 being set st b1 is epsilon-transitive & b1 is being_Tarski-Class holds
b1 is universal
by Def1;
end;

registration
cluster epsilon-transitive non empty subset-closed being_Tarski-Class universal set ;
existence
ex b1 being set st
( b1 is universal & not b1 is empty )
proof end;
end;

definition
mode Universe is non empty universal set ;
end;

theorem Th47: :: CLASSES2:47
canceled;

theorem Th48: :: CLASSES2:48
canceled;

theorem Th49: :: CLASSES2:49
canceled;

theorem Th50: :: CLASSES2:50
for b1 being Universe holds On b1 is Ordinal
proof end;

theorem Th51: :: CLASSES2:51
for b1 being set st b1 is epsilon-transitive holds
Tarski-Class b1 is universal
proof end;

theorem Th52: :: CLASSES2:52
for b1 being Universe holds Tarski-Class b1 is Universe by Th51;

registration
let c1 be Universe;
cluster On a1 -> ordinal ;
coherence
On c1 is ordinal
by Th50;
cluster Tarski-Class a1 -> epsilon-transitive subset-closed being_Tarski-Class universal ;
coherence
Tarski-Class c1 is universal
by Th51;
end;

theorem Th53: :: CLASSES2:53
for b1 being Ordinal holds Tarski-Class b1 is universal
proof end;

registration
let c1 be Ordinal;
cluster Tarski-Class a1 -> epsilon-transitive subset-closed being_Tarski-Class universal ;
coherence
Tarski-Class c1 is universal
by Th53;
end;

theorem Th54: :: CLASSES2:54
for b1 being Universe holds b1 = Rank (On b1)
proof end;

theorem Th55: :: CLASSES2:55
for b1 being Universe holds
( On b1 <> {} & On b1 is_limit_ordinal )
proof end;

theorem Th56: :: CLASSES2:56
for b1, b2 being Universe holds
( b1 in b2 or b1 = b2 or b2 in b1 )
proof end;

theorem Th57: :: CLASSES2:57
for b1, b2 being Universe holds
( b1 c= b2 or b2 in b1 )
proof end;

theorem Th58: :: CLASSES2:58
for b1, b2 being Universe holds b1,b2 are_c=-comparable
proof end;

theorem Th59: :: CLASSES2:59
for b1, b2, b3 being Universe st b1 in b2 & b2 in b3 holds
b1 in b3
proof end;

theorem Th60: :: CLASSES2:60
canceled;

theorem Th61: :: CLASSES2:61
for b1, b2 being Universe holds
( b1 \/ b2 is Universe & b1 /\ b2 is Universe )
proof end;

theorem Th62: :: CLASSES2:62
for b1 being Universe holds {} in b1
proof end;

theorem Th63: :: CLASSES2:63
for b1 being set
for b2 being Universe st b1 in b2 holds
{b1} in b2 by Th3;

theorem Th64: :: CLASSES2:64
for b1, b2 being set
for b3 being Universe st b1 in b3 & b2 in b3 holds
( {b1,b2} in b3 & [b1,b2] in b3 ) by Th3, Th4;

theorem Th65: :: CLASSES2:65
for b1 being set
for b2 being Universe st b1 in b2 holds
( bool b1 in b2 & union b1 in b2 & meet b1 in b2 )
proof end;

theorem Th66: :: CLASSES2:66
for b1, b2 being set
for b3 being Universe st b1 in b3 & b2 in b3 holds
( b1 \/ b2 in b3 & b1 /\ b2 in b3 & b1 \ b2 in b3 & b1 \+\ b2 in b3 )
proof end;

theorem Th67: :: CLASSES2:67
for b1, b2 being set
for b3 being Universe st b1 in b3 & b2 in b3 holds
( [:b1,b2:] in b3 & Funcs b1,b2 in b3 )
proof end;

registration
let c1 be Universe;
cluster non empty Element of a1;
existence
not for b1 being Element of c1 holds b1 is empty
proof end;
end;

definition
let c1 be Universe;
let c2 be Element of c1;
redefine func { as {c2} -> Element of a1;
coherence
{c2} is Element of c1
by Th3;
redefine func bool as bool c2 -> non empty Element of a1;
coherence
bool c2 is non empty Element of c1
by Th65;
redefine func union as union c2 -> Element of a1;
coherence
union c2 is Element of c1
by Th65;
redefine func meet as meet c2 -> Element of a1;
coherence
meet c2 is Element of c1
by Th65;
let c3 be Element of c1;
redefine func { as {c2,c3} -> Element of a1;
coherence
{c2,c3} is Element of c1
by Th3;
redefine func [ as [c2,c3] -> Element of a1;
coherence
[c2,c3] is Element of c1
by Th4;
redefine func \/ as c2 \/ c3 -> Element of a1;
coherence
c2 \/ c3 is Element of c1
by Th66;
redefine func /\ as c2 /\ c3 -> Element of a1;
coherence
c2 /\ c3 is Element of c1
by Th66;
redefine func \ as c2 \ c3 -> Element of a1;
coherence
c2 \ c3 is Element of c1
by Th66;
redefine func \+\ as c2 \+\ c3 -> Element of a1;
coherence
c2 \+\ c3 is Element of c1
by Th66;
redefine func [: as [:c2,c3:] -> Element of a1;
coherence
[:c2,c3:] is Element of c1
by Th67;
redefine func Funcs as Funcs c2,c3 -> Element of a1;
coherence
Funcs c2,c3 is Element of c1
by Th67;
end;

definition
func FinSETS -> Universe equals :: CLASSES2:def 2
Tarski-Class {} ;
correctness
coherence
Tarski-Class {} is Universe
;
;
end;

:: deftheorem Def2 defines FinSETS CLASSES2:def 2 :
FinSETS = Tarski-Class {} ;

theorem Th68: :: CLASSES2:68
canceled;

theorem Th69: :: CLASSES2:69
Card (Rank omega ) = Card omega
proof end;

theorem Th70: :: CLASSES2:70
Rank omega is_Tarski-Class
proof end;

theorem Th71: :: CLASSES2:71
FinSETS = Rank omega
proof end;

definition
func SETS -> Universe equals :: CLASSES2:def 3
Tarski-Class FinSETS ;
correctness
coherence
Tarski-Class FinSETS is Universe
;
;
end;

:: deftheorem Def3 defines SETS CLASSES2:def 3 :
SETS = Tarski-Class FinSETS ;

registration
let c1 be set ;
cluster the_transitive-closure_of a1 -> epsilon-transitive ;
coherence
the_transitive-closure_of c1 is epsilon-transitive
by CLASSES1:58;
end;

registration
let c1 be epsilon-transitive set ;
cluster Tarski-Class a1 -> epsilon-transitive subset-closed being_Tarski-Class universal ;
coherence
Tarski-Class c1 is epsilon-transitive
by CLASSES1:27;
end;

registration
let c1 be Ordinal;
cluster Rank a1 -> epsilon-transitive ;
coherence
Rank c1 is epsilon-transitive
by CLASSES1:37;
end;

definition
let c1 be set ;
func Universe_closure c1 -> Universe means :Def4: :: CLASSES2:def 4
( a1 c= a2 & ( for b1 being Universe st a1 c= b1 holds
a2 c= b1 ) );
uniqueness
for b1, b2 being Universe st c1 c= b1 & ( for b3 being Universe st c1 c= b3 holds
b1 c= b3 ) & c1 c= b2 & ( for b3 being Universe st c1 c= b3 holds
b2 c= b3 ) holds
b1 = b2
proof end;
existence
ex b1 being Universe st
( c1 c= b1 & ( for b2 being Universe st c1 c= b2 holds
b1 c= b2 ) )
proof end;
end;

:: deftheorem Def4 defines Universe_closure CLASSES2:def 4 :
for b1 being set
for b2 being Universe holds
( b2 = Universe_closure b1 iff ( b1 c= b2 & ( for b3 being Universe st b1 c= b3 holds
b2 c= b3 ) ) );

deffunc H3( Ordinal, set ) -> set = Tarski-Class a2;

deffunc H4( Ordinal, T-Sequence) -> Universe = Universe_closure (Union a2);

definition
mode FinSet is Element of FinSETS ;
mode Set is Element of SETS ;
let c1 be Ordinal;
func UNIVERSE c1 -> set means :Def5: :: CLASSES2:def 5
ex b1 being T-Sequence st
( a2 = last b1 & dom b1 = succ a1 & b1 . {} = FinSETS & ( for b2 being Ordinal st succ b2 in succ a1 holds
b1 . (succ b2) = Tarski-Class (b1 . b2) ) & ( for b2 being Ordinal st b2 in succ a1 & b2 <> {} & b2 is_limit_ordinal holds
b1 . b2 = Universe_closure (Union (b1 | b2)) ) );
correctness
existence
ex b1 being set ex b2 being T-Sequence st
( b1 = last b2 & dom b2 = succ c1 & b2 . {} = FinSETS & ( for b3 being Ordinal st succ b3 in succ c1 holds
b2 . (succ b3) = Tarski-Class (b2 . b3) ) & ( for b3 being Ordinal st b3 in succ c1 & b3 <> {} & b3 is_limit_ordinal holds
b2 . b3 = Universe_closure (Union (b2 | b3)) ) )
;
uniqueness
for b1, b2 being set st ex b3 being T-Sequence st
( b1 = last b3 & dom b3 = succ c1 & b3 . {} = FinSETS & ( for b4 being Ordinal st succ b4 in succ c1 holds
b3 . (succ b4) = Tarski-Class (b3 . b4) ) & ( for b4 being Ordinal st b4 in succ c1 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = Universe_closure (Union (b3 | b4)) ) ) & ex b3 being T-Sequence st
( b2 = last b3 & dom b3 = succ c1 & b3 . {} = FinSETS & ( for b4 being Ordinal st succ b4 in succ c1 holds
b3 . (succ b4) = Tarski-Class (b3 . b4) ) & ( for b4 being Ordinal st b4 in succ c1 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = Universe_closure (Union (b3 | b4)) ) ) holds
b1 = b2
;
proof end;
end;

:: deftheorem Def5 defines UNIVERSE CLASSES2:def 5 :
for b1 being Ordinal
for b2 being set holds
( b2 = UNIVERSE b1 iff ex b3 being T-Sequence st
( b2 = last b3 & dom b3 = succ b1 & b3 . {} = FinSETS & ( for b4 being Ordinal st succ b4 in succ b1 holds
b3 . (succ b4) = Tarski-Class (b3 . b4) ) & ( for b4 being Ordinal st b4 in succ b1 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = Universe_closure (Union (b3 | b4)) ) ) );

deffunc H5( Ordinal) -> set = UNIVERSE a1;

E49: now
E50: for b1 being Ordinal
for b2 being set holds
( b2 = H5(b1) iff ex b3 being T-Sequence st
( b2 = last b3 & dom b3 = succ b1 & b3 . {} = FinSETS & ( for b4 being Ordinal st succ b4 in succ b1 holds
b3 . (succ b4) = H3(b4,b3 . b4) ) & ( for b4 being Ordinal st b4 in succ b1 & b4 <> {} & b4 is_limit_ordinal holds
b3 . b4 = H4(b4,b3 | b4) ) ) ) by Def5;
thus H5( {} ) = FinSETS from ORDINAL2:sch 8(E50);
thus for b1 being Ordinal holds H5( succ b1) = H3(b1,H5(b1)) from ORDINAL2:sch 9(E50);
let c1 be Ordinal;
let c2 be T-Sequence;
assume that
E51: ( c1 <> {} & c1 is_limit_ordinal ) and
E52: dom c2 = c1 and
E53: for b1 being Ordinal st b1 in c1 holds
c2 . b1 = H5(b1) ;
thus H5(c1) = H4(c1,c2) from ORDINAL2:sch 10(E50, E51, E52, E53);
end;

registration
let c1 be Ordinal;
cluster UNIVERSE a1 -> epsilon-transitive non empty subset-closed being_Tarski-Class universal ;
coherence
( UNIVERSE c1 is universal & not UNIVERSE c1 is empty )
proof end;
end;

theorem Th72: :: CLASSES2:72
canceled;

theorem Th73: :: CLASSES2:73
canceled;

theorem Th74: :: CLASSES2:74
canceled;

theorem Th75: :: CLASSES2:75
UNIVERSE {} = FinSETS by Lemma49;

theorem Th76: :: CLASSES2:76
for b1 being Ordinal holds UNIVERSE (succ b1) = Tarski-Class (UNIVERSE b1) by Lemma49;

theorem Th77: :: CLASSES2:77
UNIVERSE one = SETS by Lemma49, ORDINAL2:def 4;

theorem Th78: :: CLASSES2:78
for b1 being Ordinal
for b2 being T-Sequence st b1 <> {} & b1 is_limit_ordinal & dom b2 = b1 & ( for b3 being Ordinal st b3 in b1 holds
b2 . b3 = UNIVERSE b3 ) holds
UNIVERSE b1 = Universe_closure (Union b2) by Lemma49;

theorem Th79: :: CLASSES2:79
for b1 being Universe holds
( FinSETS c= b1 & Tarski-Class {} c= b1 & UNIVERSE {} c= b1 )
proof end;

theorem Th80: :: CLASSES2:80
for b1, b2 being Ordinal holds
( b1 in b2 iff UNIVERSE b1 in UNIVERSE b2 )
proof end;

theorem Th81: :: CLASSES2:81
for b1, b2 being Ordinal st UNIVERSE b1 = UNIVERSE b2 holds
b1 = b2
proof end;

theorem Th82: :: CLASSES2:82
for b1, b2 being Ordinal holds
( b1 c= b2 iff UNIVERSE b1 c= UNIVERSE b2 )
proof end;