:: ORDINAL4 semantic presentation

registration
let c1 be Ordinal-Sequence;
cluster last a1 -> ordinal ;
coherence
last c1 is ordinal
;
end;

theorem Th1: :: ORDINAL4:1
for b1 being Ordinal-Sequence
for b2 being Ordinal st dom b1 = succ b2 holds
( last b1 is_limes_of b1 & lim b1 = last b1 )
proof end;

definition
let c1, c2 be T-Sequence;
func c1 ^ c2 -> T-Sequence means :Def1: :: ORDINAL4:def 1
( dom a3 = (dom a1) +^ (dom a2) & ( for b1 being Ordinal st b1 in dom a1 holds
a3 . b1 = a1 . b1 ) & ( for b1 being Ordinal st b1 in dom a2 holds
a3 . ((dom a1) +^ b1) = a2 . b1 ) );
existence
ex b1 being T-Sequence st
( dom b1 = (dom c1) +^ (dom c2) & ( for b2 being Ordinal st b2 in dom c1 holds
b1 . b2 = c1 . b2 ) & ( for b2 being Ordinal st b2 in dom c2 holds
b1 . ((dom c1) +^ b2) = c2 . b2 ) )
proof end;
uniqueness
for b1, b2 being T-Sequence st dom b1 = (dom c1) +^ (dom c2) & ( for b3 being Ordinal st b3 in dom c1 holds
b1 . b3 = c1 . b3 ) & ( for b3 being Ordinal st b3 in dom c2 holds
b1 . ((dom c1) +^ b3) = c2 . b3 ) & dom b2 = (dom c1) +^ (dom c2) & ( for b3 being Ordinal st b3 in dom c1 holds
b2 . b3 = c1 . b3 ) & ( for b3 being Ordinal st b3 in dom c2 holds
b2 . ((dom c1) +^ b3) = c2 . b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def1 defines ^ ORDINAL4:def 1 :
for b1, b2, b3 being T-Sequence holds
( b3 = b1 ^ b2 iff ( dom b3 = (dom b1) +^ (dom b2) & ( for b4 being Ordinal st b4 in dom b1 holds
b3 . b4 = b1 . b4 ) & ( for b4 being Ordinal st b4 in dom b2 holds
b3 . ((dom b1) +^ b4) = b2 . b4 ) ) );

registration
let c1, c2 be Ordinal-Sequence;
cluster a1 ^ a2 -> Ordinal-yielding ;
coherence
c1 ^ c2 is Ordinal-yielding
proof end;
end;

theorem Th2: :: ORDINAL4:2
canceled;

theorem Th3: :: ORDINAL4:3
for b1, b2 being Ordinal-Sequence
for b3 being Ordinal st b3 is_limes_of b1 holds
b3 is_limes_of b2 ^ b1
proof end;

theorem Th4: :: ORDINAL4:4
for b1 being Ordinal-Sequence
for b2, b3 being Ordinal st b2 is_limes_of b1 holds
b3 +^ b2 is_limes_of b3 +^ b1
proof end;

Lemma3: for b1 being Ordinal-Sequence
for b2 being Ordinal st b2 is_limes_of b1 holds
dom b1 <> {}
proof end;

theorem Th5: :: ORDINAL4:5
for b1 being Ordinal-Sequence
for b2, b3 being Ordinal st b2 is_limes_of b1 holds
b2 *^ b3 is_limes_of b1 *^ b3
proof end;

theorem Th6: :: ORDINAL4:6
for b1, b2 being Ordinal-Sequence
for b3, b4 being Ordinal st dom b1 = dom b2 & b3 is_limes_of b1 & b4 is_limes_of b2 & ( for b5 being Ordinal st b5 in dom b1 holds
b1 . b5 c= b2 . b5 or for b5 being Ordinal st b5 in dom b1 holds
b1 . b5 in b2 . b5 ) holds
b3 c= b4
proof end;

theorem Th7: :: ORDINAL4:7
for b1 being Ordinal-Sequence
for b2 being Ordinal
for b3, b4 being Ordinal-Sequence st dom b3 = dom b1 & dom b1 = dom b4 & b2 is_limes_of b3 & b2 is_limes_of b4 & ( for b5 being Ordinal st b5 in dom b1 holds
( b3 . b5 c= b1 . b5 & b1 . b5 c= b4 . b5 ) ) holds
b2 is_limes_of b1
proof end;

theorem Th8: :: ORDINAL4:8
for b1 being Ordinal-Sequence st dom b1 <> {} & dom b1 is_limit_ordinal & b1 is increasing holds
( sup b1 is_limes_of b1 & lim b1 = sup b1 )
proof end;

theorem Th9: :: ORDINAL4:9
for b1 being Ordinal-Sequence
for b2, b3 being Ordinal st b1 is increasing & b2 c= b3 & b3 in dom b1 holds
b1 . b2 c= b1 . b3
proof end;

theorem Th10: :: ORDINAL4:10
for b1 being Ordinal-Sequence
for b2 being Ordinal st b1 is increasing & b2 in dom b1 holds
b2 c= b1 . b2
proof end;

theorem Th11: :: ORDINAL4:11
for b1 being Ordinal-Sequence
for b2 being Ordinal st b1 is increasing holds
b1 " b2 is Ordinal
proof end;

theorem Th12: :: ORDINAL4:12
for b1, b2 being Ordinal-Sequence st b1 is increasing holds
b2 * b1 is Ordinal-Sequence
proof end;

theorem Th13: :: ORDINAL4:13
for b1, b2 being Ordinal-Sequence st b1 is increasing & b2 is increasing holds
ex b3 being Ordinal-Sequence st
( b3 = b1 * b2 & b3 is increasing )
proof end;

theorem Th14: :: ORDINAL4:14
for b1 being Ordinal-Sequence
for b2 being Ordinal
for b3, b4 being Ordinal-Sequence st b3 is increasing & b2 is_limes_of b4 & sup (rng b3) = dom b4 & b1 = b4 * b3 holds
b2 is_limes_of b1
proof end;

theorem Th15: :: ORDINAL4:15
for b1 being Ordinal-Sequence
for b2 being Ordinal st b1 is increasing holds
b1 | b2 is increasing
proof end;

theorem Th16: :: ORDINAL4:16
for b1 being Ordinal-Sequence st b1 is increasing & dom b1 is_limit_ordinal holds
sup b1 is_limit_ordinal
proof end;

Lemma14: for b1, b2 being Function
for b3 being set st rng b1 c= b3 holds
(b2 | b3) * b1 = b2 * b1
proof end;

theorem Th17: :: ORDINAL4:17
for b1, b2, b3 being Ordinal-Sequence st b1 is increasing & b1 is continuous & b2 is continuous & b3 = b2 * b1 holds
b3 is continuous
proof end;

theorem Th18: :: ORDINAL4:18
for b1 being Ordinal-Sequence
for b2 being Ordinal st ( for b3 being Ordinal st b3 in dom b1 holds
b1 . b3 = b2 +^ b3 ) holds
b1 is increasing
proof end;

theorem Th19: :: ORDINAL4:19
for b1 being Ordinal-Sequence
for b2 being Ordinal st b2 <> {} & ( for b3 being Ordinal st b3 in dom b1 holds
b1 . b3 = b3 *^ b2 ) holds
b1 is increasing
proof end;

theorem Th20: :: ORDINAL4:20
for b1 being Ordinal st b1 <> {} holds
exp {} ,b1 = {}
proof end;

Lemma17: for b1 being Ordinal st b1 <> {} & b1 is_limit_ordinal holds
for b2 being Ordinal-Sequence st dom b2 = b1 & ( for b3 being Ordinal st b3 in b1 holds
b2 . b3 = exp {} ,b3 ) holds
{} is_limes_of b2
proof end;

Lemma18: for b1 being Ordinal st b1 <> {} & b1 is_limit_ordinal holds
for b2 being Ordinal-Sequence st dom b2 = b1 & ( for b3 being Ordinal st b3 in b1 holds
b2 . b3 = exp one ,b3 ) holds
one is_limes_of b2
proof end;

Lemma19: for b1, b2 being Ordinal st b2 <> {} & b2 is_limit_ordinal holds
ex b3 being Ordinal-Sequence st
( dom b3 = b2 & ( for b4 being Ordinal st b4 in b2 holds
b3 . b4 = exp b1,b4 ) & ex b4 being Ordinal st b4 is_limes_of b3 )
proof end;

theorem Th21: :: ORDINAL4:21
for b1, b2 being Ordinal st b1 <> {} & b1 is_limit_ordinal holds
for b3 being Ordinal-Sequence st dom b3 = b1 & ( for b4 being Ordinal st b4 in b1 holds
b3 . b4 = exp b2,b4 ) holds
exp b2,b1 is_limes_of b3
proof end;

theorem Th22: :: ORDINAL4:22
for b1, b2 being Ordinal st b1 <> {} holds
exp b1,b2 <> {}
proof end;

theorem Th23: :: ORDINAL4:23
for b1, b2 being Ordinal st one in b1 holds
exp b1,b2 in exp b1,(succ b2)
proof end;

theorem Th24: :: ORDINAL4:24
for b1, b2, b3 being Ordinal st one in b1 & b2 in b3 holds
exp b1,b2 in exp b1,b3
proof end;

theorem Th25: :: ORDINAL4:25
for b1 being Ordinal-Sequence
for b2 being Ordinal st one in b2 & ( for b3 being Ordinal st b3 in dom b1 holds
b1 . b3 = exp b2,b3 ) holds
b1 is increasing
proof end;

theorem Th26: :: ORDINAL4:26
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 = exp b1,b4 ) holds
exp b1,b2 = sup b3
proof end;

theorem Th27: :: ORDINAL4:27
for b1, b2, b3 being Ordinal st b1 <> {} & b2 c= b3 holds
exp b1,b2 c= exp b1,b3
proof end;

theorem Th28: :: ORDINAL4:28
for b1, b2, b3 being Ordinal st b1 c= b2 holds
exp b1,b3 c= exp b2,b3
proof end;

theorem Th29: :: ORDINAL4:29
for b1, b2 being Ordinal st one in b1 & b2 <> {} holds
one in exp b1,b2
proof end;

theorem Th30: :: ORDINAL4:30
for b1, b2, b3 being Ordinal holds exp b1,(b2 +^ b3) = (exp b1,b3) *^ (exp b1,b2)
proof end;

theorem Th31: :: ORDINAL4:31
for b1, b2, b3 being Ordinal holds exp (exp b1,b2),b3 = exp b1,(b3 *^ b2)
proof end;

theorem Th32: :: ORDINAL4:32
for b1, b2 being Ordinal st one in b1 holds
b2 c= exp b1,b2
proof end;

scheme :: ORDINAL4:sch 1
s1{ F1( Ordinal) -> Ordinal } :
ex b1 being Ordinal st F1(b1) = b1
provided
E26: for b1, b2 being Ordinal st b1 in b2 holds
F1(b1) in F1(b2) and
E27: for b1 being Ordinal-Sequence
for b2 being Ordinal st b2 <> {} & b2 is_limit_ordinal holds
for b3 being Ordinal-Sequence st dom b1 = b2 & ( for b4 being Ordinal st b4 in b2 holds
b3 . b4 = F1(b4) ) holds
F1(b2) is_limes_of b3
proof end;

definition
let c1 be Universe;
mode Ordinal of c1 -> Ordinal means :Def2: :: ORDINAL4:def 2
a2 in a1;
existence
ex b1 being Ordinal st b1 in c1
proof end;
mode Ordinal-Sequence of c1 -> Ordinal-Sequence means :Def3: :: ORDINAL4:def 3
( dom a2 = On a1 & rng a2 c= On a1 );
existence
ex b1 being Ordinal-Sequence st
( dom b1 = On c1 & rng b1 c= On c1 )
proof end;
end;

:: deftheorem Def2 defines Ordinal ORDINAL4:def 2 :
for b1 being Universe
for b2 being Ordinal holds
( b2 is Ordinal of b1 iff b2 in b1 );

:: deftheorem Def3 defines Ordinal-Sequence ORDINAL4:def 3 :
for b1 being Universe
for b2 being Ordinal-Sequence holds
( b2 is Ordinal-Sequence of b1 iff ( dom b2 = On b1 & rng b2 c= On b1 ) );

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

scheme :: ORDINAL4:sch 2
s2{ F1() -> Universe, F2( set ) -> Ordinal of F1() } :
ex b1 being Ordinal-Sequence of F1() st
for b2 being Ordinal of F1() holds b1 . b2 = F2(b2)
proof end;

definition
let c1 be Universe;
func 0-element_of c1 -> Ordinal of a1 equals :: ORDINAL4:def 4
{} ;
correctness
coherence
{} is Ordinal of c1
;
proof end;
func 1-element_of c1 -> non empty Ordinal of a1 equals :: ORDINAL4:def 5
one ;
correctness
coherence
one is non empty Ordinal of c1
;
proof end;
let c2 be Ordinal-Sequence of c1;
let c3 be Ordinal of c1;
redefine func . as c2 . c3 -> Ordinal of a1;
coherence
c2 . c3 is Ordinal of c1
proof end;
end;

:: deftheorem Def4 defines 0-element_of ORDINAL4:def 4 :
for b1 being Universe holds 0-element_of b1 = {} ;

:: deftheorem Def5 defines 1-element_of ORDINAL4:def 5 :
for b1 being Universe holds 1-element_of b1 = one ;

definition
let c1 be Universe;
let c2, c3 be Ordinal-Sequence of c1;
redefine func * as c3 * c2 -> Ordinal-Sequence of a1;
coherence
c2 * c3 is Ordinal-Sequence of c1
proof end;
end;

theorem Th33: :: ORDINAL4:33
canceled;

theorem Th34: :: ORDINAL4:34
canceled;

theorem Th35: :: ORDINAL4:35
for b1 being Universe holds
( 0-element_of b1 = {} & 1-element_of b1 = one ) ;

definition
let c1 be Universe;
let c2 be Ordinal of c1;
redefine func succ as succ c2 -> non empty Ordinal of a1;
coherence
succ c2 is non empty Ordinal of c1
proof end;
let c3 be Ordinal of c1;
redefine func +^ as c2 +^ c3 -> Ordinal of a1;
coherence
c2 +^ c3 is Ordinal of c1
proof end;
end;

definition
let c1 be Universe;
let c2, c3 be Ordinal of c1;
redefine func *^ as c2 *^ c3 -> Ordinal of a1;
coherence
c2 *^ c3 is Ordinal of c1
proof end;
end;

theorem Th36: :: ORDINAL4:36
for b1 being Universe
for b2 being Ordinal of b1
for b3 being Ordinal-Sequence of b1 holds b2 in dom b3
proof end;

theorem Th37: :: ORDINAL4:37
for b1 being Ordinal-Sequence
for b2 being Universe st dom b1 in b2 & rng b1 c= b2 holds
sup b1 in b2
proof end;

theorem Th38: :: ORDINAL4:38
for b1 being Universe
for b2 being Ordinal-Sequence of b1 st b2 is increasing & b2 is continuous & omega in b1 holds
ex b3 being Ordinal st
( b3 in dom b2 & b2 . b3 = b3 )
proof end;