:: ORDINAL3 semantic presentation

theorem Th1: :: ORDINAL3:1
for b1 being set holds b1 c= succ b1
proof end;

theorem Th2: :: ORDINAL3:2
for b1, b2 being set st succ b1 c= b2 holds
b1 c= b2
proof end;

theorem Th3: :: ORDINAL3:3
canceled;

theorem Th4: :: ORDINAL3:4
canceled;

theorem Th5: :: ORDINAL3:5
for b1, b2 being Ordinal holds
( b1 in b2 iff succ b1 in succ b2 )
proof end;

theorem Th6: :: ORDINAL3:6
for b1 being Ordinal
for b2 being set st b2 c= b1 holds
union b2 is Ordinal
proof end;

theorem Th7: :: ORDINAL3:7
for b1 being set holds union (On b1) is Ordinal
proof end;

theorem Th8: :: ORDINAL3:8
for b1 being Ordinal
for b2 being set st b2 c= b1 holds
On b2 = b2
proof end;

theorem Th9: :: ORDINAL3:9
for b1 being Ordinal holds On {b1} = {b1}
proof end;

theorem Th10: :: ORDINAL3:10
for b1 being Ordinal st b1 <> {} holds
{} in b1
proof end;

theorem Th11: :: ORDINAL3:11
for b1 being Ordinal holds inf b1 = {}
proof end;

theorem Th12: :: ORDINAL3:12
for b1 being Ordinal holds inf {b1} = b1
proof end;

theorem Th13: :: ORDINAL3:13
for b1 being Ordinal
for b2 being set st b2 c= b1 holds
meet b2 is Ordinal
proof end;

registration
let c1, c2 be Ordinal;
cluster a1 \/ a2 -> ordinal ;
coherence
c1 \/ c2 is ordinal
proof end;
cluster a1 /\ a2 -> ordinal ;
coherence
c1 /\ c2 is ordinal
proof end;
end;

theorem Th14: :: ORDINAL3:14
canceled;

theorem Th15: :: ORDINAL3:15
for b1, b2 being Ordinal holds
( b1 \/ b2 = b1 or b1 \/ b2 = b2 )
proof end;

theorem Th16: :: ORDINAL3:16
for b1, b2 being Ordinal holds
( b1 /\ b2 = b1 or b1 /\ b2 = b2 )
proof end;

theorem Th17: :: ORDINAL3:17
for b1 being Ordinal st b1 in one holds
b1 = {}
proof end;

theorem Th18: :: ORDINAL3:18
one = {{} }
proof end;

theorem Th19: :: ORDINAL3:19
for b1 being Ordinal holds
( not b1 c= one or b1 = {} or b1 = one )
proof end;

theorem Th20: :: ORDINAL3:20
for b1, b2, b3, b4 being Ordinal st ( b1 c= b2 or b1 in b2 ) & b3 in b4 holds
b1 +^ b3 in b2 +^ b4
proof end;

theorem Th21: :: ORDINAL3:21
for b1, b2, b3, b4 being Ordinal st b1 c= b2 & b3 c= b4 holds
b1 +^ b3 c= b2 +^ b4
proof end;

theorem Th22: :: ORDINAL3:22
for b1, b2, b3, b4 being Ordinal st b1 in b2 & ( ( b3 c= b4 & b4 <> {} ) or b3 in b4 ) holds
b1 *^ b3 in b2 *^ b4
proof end;

theorem Th23: :: ORDINAL3:23
for b1, b2, b3, b4 being Ordinal st b1 c= b2 & b3 c= b4 holds
b1 *^ b3 c= b2 *^ b4
proof end;

theorem Th24: :: ORDINAL3:24
for b1, b2, b3 being Ordinal st b1 +^ b2 = b1 +^ b3 holds
b2 = b3
proof end;

theorem Th25: :: ORDINAL3:25
for b1, b2, b3 being Ordinal st b1 +^ b2 in b1 +^ b3 holds
b2 in b3
proof end;

theorem Th26: :: ORDINAL3:26
for b1, b2, b3 being Ordinal st b1 +^ b2 c= b1 +^ b3 holds
b2 c= b3
proof end;

theorem Th27: :: ORDINAL3:27
for b1, b2 being Ordinal holds
( b1 c= b1 +^ b2 & b2 c= b1 +^ b2 )
proof end;

theorem Th28: :: ORDINAL3:28
for b1, b2, b3 being Ordinal st b1 in b2 holds
( b1 in b2 +^ b3 & b1 in b3 +^ b2 )
proof end;

theorem Th29: :: ORDINAL3:29
for b1, b2 being Ordinal st b1 +^ b2 = {} holds
( b1 = {} & b2 = {} )
proof end;

theorem Th30: :: ORDINAL3:30
for b1, b2 being Ordinal st b1 c= b2 holds
ex b3 being Ordinal st b2 = b1 +^ b3
proof end;

theorem Th31: :: ORDINAL3:31
for b1, b2 being Ordinal st b1 in b2 holds
ex b3 being Ordinal st
( b2 = b1 +^ b3 & b3 <> {} )
proof end;

theorem Th32: :: ORDINAL3:32
for b1, b2 being Ordinal st b1 <> {} & b1 is_limit_ordinal holds
b2 +^ b1 is_limit_ordinal
proof end;

theorem Th33: :: ORDINAL3:33
for b1, b2, b3 being Ordinal holds (b1 +^ b2) +^ b3 = b1 +^ (b2 +^ b3)
proof end;

theorem Th34: :: ORDINAL3:34
for b1, b2 being Ordinal holds
( not b1 *^ b2 = {} or b1 = {} or b2 = {} )
proof end;

theorem Th35: :: ORDINAL3:35
for b1, b2, b3 being Ordinal st b1 in b2 & b3 <> {} holds
( b1 in b2 *^ b3 & b1 in b3 *^ b2 )
proof end;

theorem Th36: :: ORDINAL3:36
for b1, b2, b3 being Ordinal st b1 *^ b2 = b3 *^ b2 & b2 <> {} holds
b1 = b3
proof end;

theorem Th37: :: ORDINAL3:37
for b1, b2, b3 being Ordinal st b1 *^ b2 in b3 *^ b2 holds
b1 in b3
proof end;

theorem Th38: :: ORDINAL3:38
for b1, b2, b3 being Ordinal st b1 *^ b2 c= b3 *^ b2 & b2 <> {} holds
b1 c= b3
proof end;

theorem Th39: :: ORDINAL3:39
for b1, b2 being Ordinal st b1 <> {} holds
( b2 c= b2 *^ b1 & b2 c= b1 *^ b2 )
proof end;

theorem Th40: :: ORDINAL3:40
canceled;

theorem Th41: :: ORDINAL3:41
for b1, b2 being Ordinal st b1 *^ b2 = one holds
( b1 = one & b2 = one )
proof end;

theorem Th42: :: ORDINAL3:42
for b1, b2, b3 being Ordinal holds
( not b1 in b2 +^ b3 or b1 in b2 or ex b4 being Ordinal st
( b4 in b3 & b1 = b2 +^ b4 ) )
proof end;

definition
let c1 be Ordinal;
let c2 be Ordinal-Sequence;
canceled;
func c1 +^ c2 -> Ordinal-Sequence means :Def2: :: ORDINAL3:def 2
( dom a3 = dom a2 & ( for b1 being Ordinal st b1 in dom a2 holds
a3 . b1 = a1 +^ (a2 . b1) ) );
existence
ex b1 being Ordinal-Sequence st
( dom b1 = dom c2 & ( for b2 being Ordinal st b2 in dom c2 holds
b1 . b2 = c1 +^ (c2 . b2) ) )
proof end;
uniqueness
for b1, b2 being Ordinal-Sequence st dom b1 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b1 . b3 = c1 +^ (c2 . b3) ) & dom b2 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b2 . b3 = c1 +^ (c2 . b3) ) holds
b1 = b2
proof end;
func c2 +^ c1 -> Ordinal-Sequence means :: ORDINAL3:def 3
( dom a3 = dom a2 & ( for b1 being Ordinal st b1 in dom a2 holds
a3 . b1 = (a2 . b1) +^ a1 ) );
existence
ex b1 being Ordinal-Sequence st
( dom b1 = dom c2 & ( for b2 being Ordinal st b2 in dom c2 holds
b1 . b2 = (c2 . b2) +^ c1 ) )
proof end;
uniqueness
for b1, b2 being Ordinal-Sequence st dom b1 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b1 . b3 = (c2 . b3) +^ c1 ) & dom b2 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b2 . b3 = (c2 . b3) +^ c1 ) holds
b1 = b2
proof end;
func c1 *^ c2 -> Ordinal-Sequence means :: ORDINAL3:def 4
( dom a3 = dom a2 & ( for b1 being Ordinal st b1 in dom a2 holds
a3 . b1 = a1 *^ (a2 . b1) ) );
existence
ex b1 being Ordinal-Sequence st
( dom b1 = dom c2 & ( for b2 being Ordinal st b2 in dom c2 holds
b1 . b2 = c1 *^ (c2 . b2) ) )
proof end;
uniqueness
for b1, b2 being Ordinal-Sequence st dom b1 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b1 . b3 = c1 *^ (c2 . b3) ) & dom b2 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b2 . b3 = c1 *^ (c2 . b3) ) holds
b1 = b2
proof end;
func c2 *^ c1 -> Ordinal-Sequence means :Def5: :: ORDINAL3:def 5
( dom a3 = dom a2 & ( for b1 being Ordinal st b1 in dom a2 holds
a3 . b1 = (a2 . b1) *^ a1 ) );
existence
ex b1 being Ordinal-Sequence st
( dom b1 = dom c2 & ( for b2 being Ordinal st b2 in dom c2 holds
b1 . b2 = (c2 . b2) *^ c1 ) )
proof end;
uniqueness
for b1, b2 being Ordinal-Sequence st dom b1 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b1 . b3 = (c2 . b3) *^ c1 ) & dom b2 = dom c2 & ( for b3 being Ordinal st b3 in dom c2 holds
b2 . b3 = (c2 . b3) *^ c1 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 ORDINAL3:def 1 :
canceled;

:: deftheorem Def2 defines +^ ORDINAL3:def 2 :
for b1 being Ordinal
for b2, b3 being Ordinal-Sequence holds
( b3 = b1 +^ b2 iff ( dom b3 = dom b2 & ( for b4 being Ordinal st b4 in dom b2 holds
b3 . b4 = b1 +^ (b2 . b4) ) ) );

:: deftheorem Def3 defines +^ ORDINAL3:def 3 :
for b1 being Ordinal
for b2, b3 being Ordinal-Sequence holds
( b3 = b2 +^ b1 iff ( dom b3 = dom b2 & ( for b4 being Ordinal st b4 in dom b2 holds
b3 . b4 = (b2 . b4) +^ b1 ) ) );

:: deftheorem Def4 defines *^ ORDINAL3:def 4 :
for b1 being Ordinal
for b2, b3 being Ordinal-Sequence holds
( b3 = b1 *^ b2 iff ( dom b3 = dom b2 & ( for b4 being Ordinal st b4 in dom b2 holds
b3 . b4 = b1 *^ (b2 . b4) ) ) );

:: deftheorem Def5 defines *^ ORDINAL3:def 5 :
for b1 being Ordinal
for b2, b3 being Ordinal-Sequence holds
( b3 = b2 *^ b1 iff ( dom b3 = dom b2 & ( for b4 being Ordinal st b4 in dom b2 holds
b3 . b4 = (b2 . b4) *^ b1 ) ) );

theorem Th43: :: ORDINAL3:43
canceled;

theorem Th44: :: ORDINAL3:44
canceled;

theorem Th45: :: ORDINAL3:45
canceled;

theorem Th46: :: ORDINAL3:46
canceled;

theorem Th47: :: ORDINAL3:47
for b1, b2 being Ordinal-Sequence
for b3 being Ordinal st {} <> dom b1 & dom b1 = dom b2 & ( for b4, b5 being Ordinal st b4 in dom b1 & b5 = b1 . b4 holds
b2 . b4 = b3 +^ b5 ) holds
sup b2 = b3 +^ (sup b1)
proof end;

theorem Th48: :: ORDINAL3:48
for b1, b2 being Ordinal st b1 is_limit_ordinal holds
b1 *^ b2 is_limit_ordinal
proof end;

theorem Th49: :: ORDINAL3:49
for b1, b2, b3 being Ordinal st b1 in b2 *^ b3 & b2 is_limit_ordinal holds
ex b4 being Ordinal st
( b4 in b2 & b1 in b4 *^ b3 )
proof end;

theorem Th50: :: ORDINAL3:50
for b1, b2 being Ordinal-Sequence
for b3 being Ordinal st {} <> dom b1 & dom b1 = dom b2 & b3 <> {} & sup b1 is_limit_ordinal & ( for b4, b5 being Ordinal st b4 in dom b1 & b5 = b1 . b4 holds
b2 . b4 = b5 *^ b3 ) holds
sup b2 = (sup b1) *^ b3
proof end;

theorem Th51: :: ORDINAL3:51
for b1 being Ordinal-Sequence
for b2 being Ordinal st {} <> dom b1 holds
sup (b2 +^ b1) = b2 +^ (sup b1)
proof end;

theorem Th52: :: ORDINAL3:52
for b1 being Ordinal-Sequence
for b2 being Ordinal st {} <> dom b1 & b2 <> {} & sup b1 is_limit_ordinal holds
sup (b1 *^ b2) = (sup b1) *^ b2
proof end;

theorem Th53: :: ORDINAL3:53
for b1, b2 being Ordinal st b1 <> {} holds
union (b2 +^ b1) = b2 +^ (union b1)
proof end;

theorem Th54: :: ORDINAL3:54
for b1, b2, b3 being Ordinal holds (b1 +^ b2) *^ b3 = (b1 *^ b3) +^ (b2 *^ b3)
proof end;

theorem Th55: :: ORDINAL3:55
for b1, b2 being Ordinal st b1 <> {} holds
ex b3, b4 being Ordinal st
( b2 = (b3 *^ b1) +^ b4 & b4 in b1 )
proof end;

theorem Th56: :: ORDINAL3:56
for b1, b2, b3, b4, b5 being Ordinal st (b2 *^ b1) +^ b3 = (b4 *^ b1) +^ b5 & b3 in b1 & b5 in b1 holds
( b2 = b4 & b3 = b5 )
proof end;

theorem Th57: :: ORDINAL3:57
for b1, b2 being Ordinal st one in b1 & b2 <> {} & b2 is_limit_ordinal holds
for b3 being Ordinal-Sequence st dom b3 = b2 & ( for b4 being Ordinal st b4 in b2 holds
b3 . b4 = b4 *^ b1 ) holds
b2 *^ b1 = sup b3
proof end;

theorem Th58: :: ORDINAL3:58
for b1, b2, b3 being Ordinal holds (b1 *^ b2) *^ b3 = b1 *^ (b2 *^ b3)
proof end;

definition
let c1, c2 be Ordinal;
func c1 -^ c2 -> Ordinal means :Def6: :: ORDINAL3:def 6
a1 = a2 +^ a3 if a2 c= a1
otherwise a3 = {} ;
existence
( ( c2 c= c1 implies ex b1 being Ordinal st c1 = c2 +^ b1 ) & ( not c2 c= c1 implies ex b1 being Ordinal st b1 = {} ) )
by Th30;
uniqueness
for b1, b2 being Ordinal holds
( ( c2 c= c1 & c1 = c2 +^ b1 & c1 = c2 +^ b2 implies b1 = b2 ) & ( not c2 c= c1 & b1 = {} & b2 = {} implies b1 = b2 ) )
by Th24;
consistency
for b1 being Ordinal holds verum
;
func c1 div^ c2 -> Ordinal means :Def7: :: ORDINAL3:def 7
ex b1 being Ordinal st
( a1 = (a3 *^ a2) +^ b1 & b1 in a2 ) if a2 <> {}
otherwise a3 = {} ;
consistency
for b1 being Ordinal holds verum
;
existence
( ( c2 <> {} implies ex b1, b2 being Ordinal st
( c1 = (b1 *^ c2) +^ b2 & b2 in c2 ) ) & ( not c2 <> {} implies ex b1 being Ordinal st b1 = {} ) )
by Th55;
uniqueness
for b1, b2 being Ordinal holds
( ( c2 <> {} & ex b3 being Ordinal st
( c1 = (b1 *^ c2) +^ b3 & b3 in c2 ) & ex b3 being Ordinal st
( c1 = (b2 *^ c2) +^ b3 & b3 in c2 ) implies b1 = b2 ) & ( not c2 <> {} & b1 = {} & b2 = {} implies b1 = b2 ) )
by Th56;
end;

:: deftheorem Def6 defines -^ ORDINAL3:def 6 :
for b1, b2, b3 being Ordinal holds
( ( b2 c= b1 implies ( b3 = b1 -^ b2 iff b1 = b2 +^ b3 ) ) & ( not b2 c= b1 implies ( b3 = b1 -^ b2 iff b3 = {} ) ) );

:: deftheorem Def7 defines div^ ORDINAL3:def 7 :
for b1, b2, b3 being Ordinal holds
( ( b2 <> {} implies ( b3 = b1 div^ b2 iff ex b4 being Ordinal st
( b1 = (b3 *^ b2) +^ b4 & b4 in b2 ) ) ) & ( not b2 <> {} implies ( b3 = b1 div^ b2 iff b3 = {} ) ) );

definition
let c1, c2 be Ordinal;
func c1 mod^ c2 -> Ordinal equals :: ORDINAL3:def 8
a1 -^ ((a1 div^ a2) *^ a2);
correctness
coherence
c1 -^ ((c1 div^ c2) *^ c2) is Ordinal
;
;
end;

:: deftheorem Def8 defines mod^ ORDINAL3:def 8 :
for b1, b2 being Ordinal holds b1 mod^ b2 = b1 -^ ((b1 div^ b2) *^ b2);

theorem Th59: :: ORDINAL3:59
canceled;

theorem Th60: :: ORDINAL3:60
for b1, b2 being Ordinal st b1 in b2 holds
b2 = b1 +^ (b2 -^ b1)
proof end;

theorem Th61: :: ORDINAL3:61
canceled;

theorem Th62: :: ORDINAL3:62
canceled;

theorem Th63: :: ORDINAL3:63
canceled;

theorem Th64: :: ORDINAL3:64
canceled;

theorem Th65: :: ORDINAL3:65
for b1, b2 being Ordinal holds (b1 +^ b2) -^ b1 = b2
proof end;

theorem Th66: :: ORDINAL3:66
for b1, b2, b3 being Ordinal st b1 in b2 & ( b3 c= b1 or b3 in b1 ) holds
b1 -^ b3 in b2 -^ b3
proof end;

theorem Th67: :: ORDINAL3:67
for b1 being Ordinal holds b1 -^ b1 = {}
proof end;

theorem Th68: :: ORDINAL3:68
for b1, b2 being Ordinal st b1 in b2 holds
( b2 -^ b1 <> {} & {} in b2 -^ b1 )
proof end;

theorem Th69: :: ORDINAL3:69
for b1 being Ordinal holds
( b1 -^ {} = b1 & {} -^ b1 = {} )
proof end;

theorem Th70: :: ORDINAL3:70
for b1, b2, b3 being Ordinal holds b1 -^ (b2 +^ b3) = (b1 -^ b2) -^ b3
proof end;

theorem Th71: :: ORDINAL3:71
for b1, b2, b3 being Ordinal st b1 c= b2 holds
b3 -^ b2 c= b3 -^ b1
proof end;

theorem Th72: :: ORDINAL3:72
for b1, b2, b3 being Ordinal st b1 c= b2 holds
b1 -^ b3 c= b2 -^ b3
proof end;

theorem Th73: :: ORDINAL3:73
for b1, b2, b3 being Ordinal st b1 <> {} & b2 in b3 +^ b1 holds
b2 -^ b3 in b1
proof end;

theorem Th74: :: ORDINAL3:74
for b1, b2, b3 being Ordinal st b1 +^ b2 in b3 holds
b2 in b3 -^ b1
proof end;

theorem Th75: :: ORDINAL3:75
for b1, b2 being Ordinal holds b1 c= b2 +^ (b1 -^ b2)
proof end;

theorem Th76: :: ORDINAL3:76
for b1, b2, b3 being Ordinal holds (b1 *^ b2) -^ (b3 *^ b2) = (b1 -^ b3) *^ b2
proof end;

theorem Th77: :: ORDINAL3:77
for b1, b2 being Ordinal holds (b1 div^ b2) *^ b2 c= b1
proof end;

theorem Th78: :: ORDINAL3:78
for b1, b2 being Ordinal holds b1 = ((b1 div^ b2) *^ b2) +^ (b1 mod^ b2)
proof end;

theorem Th79: :: ORDINAL3:79
for b1, b2, b3, b4 being Ordinal st b1 = (b2 *^ b3) +^ b4 & b4 in b3 holds
( b2 = b1 div^ b3 & b4 = b1 mod^ b3 )
proof end;

theorem Th80: :: ORDINAL3:80
for b1, b2, b3 being Ordinal st b1 in b2 *^ b3 holds
( b1 div^ b3 in b2 & b1 mod^ b3 in b3 )
proof end;

theorem Th81: :: ORDINAL3:81
for b1, b2 being Ordinal st b1 <> {} holds
(b2 *^ b1) div^ b1 = b2
proof end;

theorem Th82: :: ORDINAL3:82
for b1, b2 being Ordinal holds (b1 *^ b2) mod^ b2 = {}
proof end;

theorem Th83: :: ORDINAL3:83
for b1 being Ordinal holds
( {} div^ b1 = {} & {} mod^ b1 = {} & b1 mod^ {} = b1 )
proof end;

theorem Th84: :: ORDINAL3:84
for b1 being Ordinal holds
( b1 div^ one = b1 & b1 mod^ one = {} )
proof end;