:: SURREALN semantic presentation

definition
func uInt -> ManySortedSet of INT means :Def1: :: SURREALN:def 1
for n being Nat holds
( it . 0 = 0_No & it . (n + 1) = [{(it . n)},{}] & it . (- (n + 1)) = [{},{(it . (- n))}] );
existence
ex b1 being ManySortedSet of INT st
for n being Nat holds
( b1 . 0 = 0_No & b1 . (n + 1) = [{(b1 . n)},{}] & b1 . (- (n + 1)) = [{},{(b1 . (- n))}] )
proof
deffunc H1( object , object ) -> object = [{$2},{}];
consider f1 being Function such that
A1: ( dom f1 = NAT & f1 . 0 = 0_No ) and
A2: for n being Nat holds f1 . (n + 1) = H1(n,f1 . n) from NAT_1:sch 11();
deffunc H2( object , object ) -> object = [{},{$2}];
consider f2 being Function such that
A3: ( dom f2 = NAT & f2 . 0 = 0_No ) and
A4: for n being Nat holds f2 . (n + 1) = H2(n,f2 . n) from NAT_1:sch 11();
defpred S1[ object , object ] means for i being Integer st i = $1 holds
( ( i >= 0 implies $2 = f1 . i ) & ( i < 0 implies $2 = f2 . (- i) ) );
A5: for i being object st i in INT holds
ex j being object st S1[i,j]
proof
let i be object ; :: thesis: ( i in INT implies ex j being object st S1[i,j] )
assume i in INT ; :: thesis: ex j being object st S1[i,j]
then reconsider x = i as Integer ;
per cases ( x >= 0 or x < 0 ) ;
suppose A6: x >= 0 ; :: thesis: ex j being object st S1[i,j]
take f1 . x ; :: thesis: S1[i,f1 . x]
thus S1[i,f1 . x] by A6; :: thesis: verum
end;
suppose A7: x < 0 ; :: thesis: ex j being object st S1[i,j]
take f2 . (- x) ; :: thesis: S1[i,f2 . (- x)]
thus S1[i,f2 . (- x)] by A7; :: thesis: verum
end;
end;
end;
consider f being ManySortedSet of INT such that
A8: for i being object st i in INT holds
S1[i,f . i]
from PBOOLE:sch 3(A5);
take f ; :: thesis: for n being Nat holds
( f . 0 = 0_No & f . (n + 1) = [{(f . n)},{}] & f . (- (n + 1)) = [{},{(f . (- n))}] )

let n be Nat; :: thesis: ( f . 0 = 0_No & f . (n + 1) = [{(f . n)},{}] & f . (- (n + 1)) = [{},{(f . (- n))}] )
0 in INT by INT_1:def 2;
hence f . 0 = 0_No by A1, A8; :: thesis: ( f . (n + 1) = [{(f . n)},{}] & f . (- (n + 1)) = [{},{(f . (- n))}] )
A9: ( n + 1 in INT & n in INT ) by INT_1:def 2;
then ( f . (n + 1) = f1 . (n + 1) & f1 . (n + 1) = H1(n,f1 . n) ) by A2, A8;
hence f . (n + 1) = [{(f . n)},{}] by A9, A8; :: thesis: f . (- (n + 1)) = [{},{(f . (- n))}]
A10: ( - (n + 1) in INT & - n in INT ) by INT_1:def 2;
then A11: ( f . (- (n + 1)) = f2 . (- (- (n + 1))) & f2 . (- (- (n + 1))) = H2(n,f2 . n) ) by A4, A8;
f . (- n) = f2 . (- (- n))
proof
per cases ( n > 0 or n = 0 ) ;
suppose n > 0 ; :: thesis: f . (- n) = f2 . (- (- n))
hence f . (- n) = f2 . (- (- n)) by A10, A8; :: thesis: verum
end;
suppose n = 0 ; :: thesis: f . (- n) = f2 . (- (- n))
hence f . (- n) = f2 . (- (- n)) by A10, A1, A3, A8; :: thesis: verum
end;
end;
end;
hence f . (- (n + 1)) = [{},{(f . (- n))}] by A11; :: thesis: verum
end;
uniqueness
for b1, b2 being ManySortedSet of INT st ( for n being Nat holds
( b1 . 0 = 0_No & b1 . (n + 1) = [{(b1 . n)},{}] & b1 . (- (n + 1)) = [{},{(b1 . (- n))}] ) ) & ( for n being Nat holds
( b2 . 0 = 0_No & b2 . (n + 1) = [{(b2 . n)},{}] & b2 . (- (n + 1)) = [{},{(b2 . (- n))}] ) ) holds
b1 = b2
proof
let it1, it2 be ManySortedSet of INT ; :: thesis: ( ( for n being Nat holds
( it1 . 0 = 0_No & it1 . (n + 1) = [{(it1 . n)},{}] & it1 . (- (n + 1)) = [{},{(it1 . (- n))}] ) ) & ( for n being Nat holds
( it2 . 0 = 0_No & it2 . (n + 1) = [{(it2 . n)},{}] & it2 . (- (n + 1)) = [{},{(it2 . (- n))}] ) ) implies it1 = it2 )

assume that
A12: for n being Nat holds
( it1 . 0 = 0_No & it1 . (n + 1) = [{(it1 . n)},{}] & it1 . (- (n + 1)) = [{},{(it1 . (- n))}] )
and
A13: for n being Nat holds
( it2 . 0 = 0_No & it2 . (n + 1) = [{(it2 . n)},{}] & it2 . (- (n + 1)) = [{},{(it2 . (- n))}] )
; :: thesis: it1 = it2
defpred S1[ Nat] means ( it1 . $1 = it2 . $1 & it1 . (- $1) = it2 . (- $1) );
A14: S1[ 0 ] by A12, A13;
A15: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A16: S1[n] ; :: thesis: S1[n + 1]
thus it1 . (n + 1) = [{(it1 . n)},{}] by A12
.= it2 . (n + 1) by A16, A13 ; :: thesis: it1 . (- (n + 1)) = it2 . (- (n + 1))
thus it1 . (- (n + 1)) = [{},{(it1 . (- n))}] by A12
.= it2 . (- (n + 1)) by A16, A13 ; :: thesis: verum
end;
A17: for n being Nat holds S1[n] from NAT_1:sch 2(A14, A15);
A18: ( dom it1 = INT & INT = dom it2 ) by PARTFUN1:def 2;
for o being object st o in INT holds
it1 . o = it2 . o
proof
let o be object ; :: thesis: ( o in INT implies it1 . o = it2 . o )
assume o in INT ; :: thesis: it1 . o = it2 . o
then ex n being Nat st
( o = n or o = - n )
by INT_1:2;
hence it1 . o = it2 . o by A17; :: thesis: verum
end;
hence it1 = it2 by A18, FUNCT_1:2; :: thesis: verum
end;
end;

:: deftheorem Def1 defines uInt SURREALN:def 1 :
for b1 being ManySortedSet of INT holds
( b1 = uInt iff for n being Nat holds
( b1 . 0 = 0_No & b1 . (n + 1) = [{(b1 . n)},{}] & b1 . (- (n + 1)) = [{},{(b1 . (- n))}] ) );

theorem Th1: :: SURREALN:1
for n being Nat holds
( uInt . n in Day n & uInt . (- n) in Day n )
proof
let n be Nat; :: thesis: ( uInt . n in Day n & uInt . (- n) in Day n )
defpred S1[ Nat] means ( uInt . $1 in Day $1 & uInt . (- $1) in Day $1 );
A1: uInt . 0 = 0_No by Def1;
born 0_No = {} by SURREAL0:37;
then A2: S1[ 0 ] by A1, SURREAL0:def 18;
A3: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A4: S1[n] ; :: thesis: S1[n + 1]
A5: {(uInt . n)} << {} ;
A6: ( n in succ (Segm n) & succ (Segm n) = Segm (n + 1) ) by ORDINAL1:6, NAT_1:38;
A7: {} << {(uInt . (- n))} ;
A8: for o being object st o in {(uInt . (- n))} \/ {} holds
ex O being Ordinal st
( O in n + 1 & o in Day O )
proof
let o be object ; :: thesis: ( o in {(uInt . (- n))} \/ {} implies ex O being Ordinal st
( O in n + 1 & o in Day O ) )

assume o in {(uInt . (- n))} \/ {} ; :: thesis: ex O being Ordinal st
( O in n + 1 & o in Day O )

then o = uInt . (- n) by TARSKI:def 1;
hence ex O being Ordinal st
( O in n + 1 & o in Day O )
by A6, A4; :: thesis: verum
end;
for o being object st o in {(uInt . n)} \/ {} holds
ex O being Ordinal st
( O in n + 1 & o in Day O )
proof
let o be object ; :: thesis: ( o in {(uInt . n)} \/ {} implies ex O being Ordinal st
( O in n + 1 & o in Day O ) )

assume o in {(uInt . n)} \/ {} ; :: thesis: ex O being Ordinal st
( O in n + 1 & o in Day O )

then o = uInt . n by TARSKI:def 1;
hence ex O being Ordinal st
( O in n + 1 & o in Day O )
by A6, A4; :: thesis: verum
end;
then ( [{(uInt . n)},{}] in Day (n + 1) & [{},{(uInt . (- n))}] in Day (n + 1) ) by A8, A5, A7, SURREAL0:46;
hence S1[n + 1] by Def1; :: thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch 2(A2, A3);
hence ( uInt . n in Day n & uInt . (- n) in Day n ) ; :: thesis: verum
end;

registration
let i be Integer;
cluster uInt . i -> surreal ;
coherence
uInt . i is surreal
proof
i in INT by INT_1:def 2;
then consider k being Nat such that
A1: ( i = k or i = - k ) by INT_1:def 1;
uInt . i in Day k by A1, Th1;
hence uInt . i is surreal ; :: thesis: verum
end;
end;

Lm1: for n being Nat holds uInt . n < uInt . (n + 1)
proof
let n be Nat; :: thesis: uInt . n < uInt . (n + 1)
A1: uInt . (n + 1) = [{(uInt . n)},{}] by Def1;
assume uInt . (n + 1) <= uInt . n ; :: thesis: contradiction
then L_ (uInt . (n + 1)) << {(uInt . n)} by SURREAL0:43;
then ( uInt . n in {(uInt . n)} & {(uInt . n)} << {(uInt . n)} ) by A1, TARSKI:def 1;
hence contradiction by SURREALO:3; :: thesis: verum
end;

Lm2: for n being Nat holds uInt . (- (n + 1)) < uInt . (- n)
proof
let n be Nat; :: thesis: uInt . (- (n + 1)) < uInt . (- n)
A1: uInt . (- (n + 1)) = [{},{(uInt . (- n))}] by Def1;
assume uInt . (- n) <= uInt . (- (n + 1)) ; :: thesis: contradiction
then {(uInt . (- n))} << R_ (uInt . (- (n + 1))) by SURREAL0:43;
then ( uInt . (- n) in {(uInt . (- n))} & {(uInt . (- n))} << {(uInt . (- n))} ) by A1, TARSKI:def 1;
hence contradiction by SURREALO:3; :: thesis: verum
end;

theorem Th2: :: SURREALN:2
for x being Surreal
for n being Nat st x in Day n holds
( uInt . (- n) <= x & x <= uInt . n )
proof
let x be Surreal; :: thesis: for n being Nat st x in Day n holds
( uInt . (- n) <= x & x <= uInt . n )

let n be Nat; :: thesis: ( x in Day n implies ( uInt . (- n) <= x & x <= uInt . n ) )
defpred S1[ Nat] means for x being Surreal st x in Day $1 holds
( uInt . (- $1) <= x & x <= uInt . $1 );
A1: S1[ 0 ]
proof
A2: uInt . 0 = 0_No by Def1;
let x be Surreal; :: thesis: ( x in Day 0 implies ( uInt . (- 0) <= x & x <= uInt . 0 ) )
assume x in Day 0 ; :: thesis: ( uInt . (- 0) <= x & x <= uInt . 0 )
then born x c= 0 by SURREAL0:def 18;
then born x = 0 ;
hence ( uInt . (- 0) <= x & x <= uInt . 0 ) by A2, SURREAL0:37; :: thesis: verum
end;
A3: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
A4: succ (Segm n) = Segm (n + 1) by NAT_1:38;
assume A5: S1[n] ; :: thesis: S1[n + 1]
let x be Surreal; :: thesis: ( x in Day (n + 1) implies ( uInt . (- (n + 1)) <= x & x <= uInt . (n + 1) ) )
assume A6: x in Day (n + 1) ; :: thesis: ( uInt . (- (n + 1)) <= x & x <= uInt . (n + 1) )
uInt . (n + 1) = [{(uInt . n)},{}] by Def1;
then A7: R_ (uInt . (n + 1)) = {} ;
A8: L_ x << {(uInt . (n + 1))}
proof
let l, r be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in L_ x or not r in {(uInt . (n + 1))} or not r <= l )
assume A9: ( l in L_ x & r in {(uInt . (n + 1))} ) ; :: thesis: not r <= l
l in (L_ x) \/ (R_ x) by A9, XBOOLE_0:def 3;
then ( born l in born x & born x c= n + 1 ) by A6, SURREALO:1, SURREAL0:def 18;
then ( l in Day (born l) & Day (born l) c= Day n ) by A4, SURREAL0:35, SURREAL0:def 18, ORDINAL1:22;
then ( l <= uInt . n & uInt . n < uInt . (n + 1) ) by A5, Lm1;
then l < uInt . (n + 1) by SURREALO:4;
hence not r <= l by A9, TARSKI:def 1; :: thesis: verum
end;
A10: {x} << {} ;
uInt . (- (n + 1)) = [{},{(uInt . (- n))}] by Def1;
then A11: L_ (uInt . (- (n + 1))) = {} ;
A12: {} << {x} ;
{(uInt . (- (n + 1)))} << R_ x
proof
let r, l be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not r in {(uInt . (- (n + 1)))} or not l in R_ x or not l <= r )
assume A13: ( r in {(uInt . (- (n + 1)))} & l in R_ x ) ; :: thesis: not l <= r
l in (L_ x) \/ (R_ x) by A13, XBOOLE_0:def 3;
then ( born l in born x & born x c= n + 1 ) by A6, SURREALO:1, SURREAL0:def 18;
then ( l in Day (born l) & Day (born l) c= Day n ) by A4, ORDINAL1:22, SURREAL0:35, SURREAL0:def 18;
then ( uInt . (- (n + 1)) < uInt . (- n) & uInt . (- n) <= l ) by A5, Lm2;
then uInt . (- (n + 1)) < l by SURREALO:4;
hence not l <= r by A13, TARSKI:def 1; :: thesis: verum
end;
hence ( uInt . (- (n + 1)) <= x & x <= uInt . (n + 1) ) by A7, A8, SURREAL0:43, A10, A11, A12; :: thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch 2(A1, A3);
hence ( x in Day n implies ( uInt . (- n) <= x & x <= uInt . n ) ) ; :: thesis: verum
end;

theorem Th3: :: SURREALN:3
for i, j being Integer st i < j holds
uInt . i < uInt . j
proof
A1: for n, k being Nat st k >= 1 holds
uInt . n < uInt . (n + k)
proof
let n be Nat; :: thesis: for k being Nat st k >= 1 holds
uInt . n < uInt . (n + k)

defpred S1[ Nat] means uInt . n < uInt . (n + $1);
A2: S1[1] by Lm1;
A3: for j being Nat st 1 <= j & S1[j] holds
S1[j + 1]
proof
let j be Nat; :: thesis: ( 1 <= j & S1[j] implies S1[j + 1] )
assume A4: ( 1 <= j & S1[j] ) ; :: thesis: S1[j + 1]
uInt . (n + j) <= uInt . ((n + j) + 1) by Lm1;
hence S1[j + 1] by A4, SURREALO:4; :: thesis: verum
end;
for j being Nat st 1 <= j holds
S1[j]
from NAT_1:sch 8(A2, A3);
hence for k being Nat st k >= 1 holds
uInt . n < uInt . (n + k)
; :: thesis: verum
end;
A5: for n, k being Nat st k >= 1 holds
uInt . (- (n + k)) < uInt . (- n)
proof
let n be Nat; :: thesis: for k being Nat st k >= 1 holds
uInt . (- (n + k)) < uInt . (- n)

defpred S1[ Nat] means uInt . (- (n + $1)) < uInt . (- n);
A6: S1[1] by Lm2;
A7: for j being Nat st 1 <= j & S1[j] holds
S1[j + 1]
proof
let j be Nat; :: thesis: ( 1 <= j & S1[j] implies S1[j + 1] )
assume A8: ( 1 <= j & S1[j] ) ; :: thesis: S1[j + 1]
uInt . (- ((n + j) + 1)) <= uInt . (- (n + j)) by Lm2;
hence S1[j + 1] by A8, SURREALO:4; :: thesis: verum
end;
for j being Nat st 1 <= j holds
S1[j]
from NAT_1:sch 8(A6, A7);
hence for k being Nat st k >= 1 holds
uInt . (- (n + k)) < uInt . (- n)
; :: thesis: verum
end;
let i, j be Integer; :: thesis: ( i < j implies uInt . i < uInt . j )
assume A9: i < j ; :: thesis: uInt . i < uInt . j
i in INT by INT_1:def 2;
then consider I being Nat such that
A10: ( i = I or i = - I ) by INT_1:def 1;
j in INT by INT_1:def 2;
then consider J being Nat such that
A11: ( j = J or j = - J ) by INT_1:def 1;
per cases ( ( i = I & j = J ) or ( i = I & j = - J ) or ( i = - I & j = J ) or ( i = - I & j = - J ) ) by A10, A11;
suppose A12: ( i = I & j = J ) ; :: thesis: uInt . i < uInt . j
then reconsider JI = J - I as Nat by A9, NAT_1:21;
JI <> 0 by A12, A9;
then uInt . I < uInt . (I + JI) by A1, NAT_1:14;
hence uInt . i < uInt . j by A12; :: thesis: verum
end;
suppose ( i = I & j = - J ) ; :: thesis: uInt . i < uInt . j
hence uInt . i < uInt . j by A9; :: thesis: verum
end;
suppose A13: ( i = - I & j = J ) ; :: thesis: uInt . i < uInt . j
per cases ( i = 0 or j = 0 or ( i <> 0 & j <> 0 ) ) ;
suppose A14: i = 0 ; :: thesis: uInt . i < uInt . j
then uInt . 0 < uInt . (0 + j) by A9, A1, NAT_1:14;
hence uInt . i < uInt . j by A14; :: thesis: verum
end;
suppose A15: j = 0 ; :: thesis: uInt . i < uInt . j
then uInt . (- (0 + I)) < uInt . (- 0) by A9, A13, A5, NAT_1:14;
hence uInt . i < uInt . j by A15, A13; :: thesis: verum
end;
suppose ( i <> 0 & j <> 0 ) ; :: thesis: uInt . i < uInt . j
then ( uInt . (- (0 + I)) < uInt . (- 0) & uInt . (- 0) <= uInt . (0 + J) ) by A13, NAT_1:14, A1, A5;
hence uInt . i < uInt . j by A13, SURREALO:4; :: thesis: verum
end;
end;
end;
suppose A16: ( i = - I & j = - J ) ; :: thesis: uInt . i < uInt . j
then reconsider IJ = I - J as Nat by A9, XREAL_1:24, NAT_1:21;
IJ <> 0 by A16, A9;
then uInt . (- (J + IJ)) < uInt . (- J) by A5, NAT_1:14;
hence uInt . i < uInt . j by A16; :: thesis: verum
end;
end;
end;

registration
let n be positive Nat;
cluster uInt . n -> positive ;
coherence
uInt . n is positive
proof
( 0_No = uInt . 0 & uInt . 0 < uInt . n ) by Def1, Th3;
hence uInt . n is positive ; :: thesis: verum
end;
end;

theorem Th4: :: SURREALN:4
for n being Nat holds
( n = born (uInt . n) & n = born (uInt . (- n)) )
proof
let n be Nat; :: thesis: ( n = born (uInt . n) & n = born (uInt . (- n)) )
A1: uInt . n in Day n by Th1;
for O being Ordinal st uInt . n in Day O holds
n c= O
proof
let O be Ordinal; :: thesis: ( uInt . n in Day O implies n c= O )
assume that
A2: uInt . n in Day O and
A3: not n c= O ; :: thesis: contradiction
A4: O in Segm n by A3, ORDINAL1:16;
reconsider O = O as Nat by A3;
( uInt . n <= uInt . O & uInt . O < uInt . n ) by A2, Th2, A4, NAT_1:44, Th3;
hence contradiction ; :: thesis: verum
end;
hence n = born (uInt . n) by A1, SURREAL0:def 18; :: thesis: n = born (uInt . (- n))
A5: uInt . (- n) in Day n by Th1;
for O being Ordinal st uInt . (- n) in Day O holds
n c= O
proof
let O be Ordinal; :: thesis: ( uInt . (- n) in Day O implies n c= O )
assume that
A6: uInt . (- n) in Day O and
A7: not n c= O ; :: thesis: contradiction
A8: O in Segm n by A7, ORDINAL1:16;
reconsider O = O as Nat by A7;
A9: - n < - O by XREAL_1:24, A8, NAT_1:44;
( uInt . (- n) <= uInt . (- O) & uInt . (- O) < uInt . (- n) ) by A6, Th2, A9, Th3;
hence contradiction ; :: thesis: verum
end;
hence n = born (uInt . (- n)) by A5, SURREAL0:def 18; :: thesis: verum
end;

theorem Th5: :: SURREALN:5
for n being Nat holds
( born_eq (uInt . n) = n & born_eq (uInt . (- n)) = n )
proof
let n be Nat; :: thesis: ( born_eq (uInt . n) = n & born_eq (uInt . (- n)) = n )
A1: born (uInt . n) = n by Th4;
for y being Surreal st y == uInt . n holds
born (uInt . n) c= born y
proof
let y be Surreal; :: thesis: ( y == uInt . n implies born (uInt . n) c= born y )
assume A2: y == uInt . n ; :: thesis: born (uInt . n) c= born y
assume not born (uInt . n) c= born y ; :: thesis: contradiction
then A3: not n c= born y by Th4;
then reconsider O = born y as Nat ;
( y in Day O & Day O c= Day n ) by SURREAL0:35, SURREAL0:def 18, A3;
then y <= uInt . O by Th2;
then A4: uInt . n <= uInt . O by A2, SURREALO:4;
O in Segm n by A3, ORDINAL1:16;
hence contradiction by A4, Th3, NAT_1:44; :: thesis: verum
end;
hence born_eq (uInt . n) = n by A1, SURREALO:def 5; :: thesis: born_eq (uInt . (- n)) = n
A5: born (uInt . (- n)) = n by Th4;
for y being Surreal st y == uInt . (- n) holds
born (uInt . (- n)) c= born y
proof
let y be Surreal; :: thesis: ( y == uInt . (- n) implies born (uInt . (- n)) c= born y )
assume A6: y == uInt . (- n) ; :: thesis: born (uInt . (- n)) c= born y
assume not born (uInt . (- n)) c= born y ; :: thesis: contradiction
then A7: not n c= born y by Th4;
then reconsider O = born y as Nat ;
( y in Day O & Day O c= Day n ) by SURREAL0:35, SURREAL0:def 18, A7;
then A8: uInt . (- O) <= y by Th2;
O in Segm n by A7, ORDINAL1:16;
then - n < - O by NAT_1:44, XREAL_1:24;
hence contradiction by A8, A6, SURREALO:4, Th3; :: thesis: verum
end;
hence born_eq (uInt . (- n)) = n by A5, SURREALO:def 5; :: thesis: verum
end;

theorem :: SURREALN:6
for n being Nat holds 0_No <= uInt . n
proof
let n be Nat; :: thesis: 0_No <= uInt . n
( 0 = n or 0 < n ) ;
then ( uInt . 0 = uInt . n or uInt . 0 < uInt . n ) by Th3;
hence 0_No <= uInt . n by Def1; :: thesis: verum
end;

theorem Th7: :: SURREALN:7
for n being Nat holds
( L_ (uInt . (- n)) = {} & {} = R_ (uInt . n) )
proof
let n be Nat; :: thesis: ( L_ (uInt . (- n)) = {} & {} = R_ (uInt . n) )
A1: uInt . 0 = 0_No by Def1;
thus L_ (uInt . (- n)) = {} :: thesis: {} = R_ (uInt . n)
proof
assume A2: L_ (uInt . (- n)) <> {} ; :: thesis: contradiction
then n <> 0 by A1;
then reconsider N = n - 1 as Nat by NAT_1:20;
uInt . (- (N + 1)) = [{},{(uInt . (- N))}] by Def1;
hence contradiction by A2; :: thesis: verum
end;
assume A3: R_ (uInt . n) <> {} ; :: thesis: contradiction
then n <> 0 by A1;
then reconsider N = n - 1 as Nat by NAT_1:20;
uInt . (N + 1) = [{(uInt . N)},{}] by Def1;
hence contradiction by A3; :: thesis: verum
end;

registration
let i be Integer;
cluster uInt . i -> uniq-surreal ;
coherence
uInt . i is uniq-surreal
proof
i in INT by INT_1:def 2;
then consider o being Nat such that
A1: ( i = o or i = - o ) by INT_1:def 1;
per cases ( i = o or i = - o ) by A1;
suppose A2: i = o ; :: thesis: uInt . i is uniq-surreal
defpred S1[ Nat] means uInt . i is uniq-surreal ;
A3: S1[ 0 ] by Def1;
A4: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume S1[n] ; :: thesis: S1[n + 1]
then reconsider sn = uInt . n as uSurreal ;
set n1 = n + 1;
set x = uInt . (n + 1);
A5: uInt . (n + 1) in Day (born (uInt . (n + 1))) by SURREAL0:def 18;
A6: ( born_eq (uInt . (n + 1)) = n + 1 & n + 1 = born (uInt . (n + 1)) ) by Th5, Th4;
then A7: uInt . (n + 1) in born_eq_set (uInt . (n + 1)) by A5, SURREALO:def 6;
A8: uInt . (n + 1) = [{sn},{}] by Def1;
then A9: (L_ (uInt . (n + 1))) \/ (R_ (uInt . (n + 1))) is uniq-surreal-membered ;
for z being Surreal st z in born_eq_set (uInt . (n + 1)) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uInt . (n + 1) <> z holds
(card (L_ (uInt . (n + 1)))) (+) (card (R_ (uInt . (n + 1)))) in (card (L_ z)) (+) (card (R_ z))
proof
let z be Surreal; :: thesis: ( z in born_eq_set (uInt . (n + 1)) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uInt . (n + 1) <> z implies (card (L_ (uInt . (n + 1)))) (+) (card (R_ (uInt . (n + 1)))) in (card (L_ z)) (+) (card (R_ z)) )
assume that
A10: ( z in born_eq_set (uInt . (n + 1)) & (L_ z) \/ (R_ z) is uniq-surreal-membered ) and
A11: uInt . (n + 1) <> z and
A12: not (card (L_ (uInt . (n + 1)))) (+) (card (R_ (uInt . (n + 1)))) in (card (L_ z)) (+) (card (R_ z)) ; :: thesis: contradiction
A13: z == uInt . (n + 1) by A10, SURREALO:def 6;
A14: (card (L_ (uInt . (n + 1)))) (+) (card (R_ (uInt . (n + 1)))) = 1 by A8, SURREALO:47;
then (card (L_ z)) (+) (card (R_ z)) c= 1 by A12, ORDINAL1:16;
then reconsider cz = (card (L_ z)) (+) (card (R_ z)) as Nat ;
cz <> 0
proof
assume cz = 0 ; :: thesis: contradiction
then A15: z = 0_No by SURREALO:46;
uInt . 0 < uInt . (n + 1) by Th3;
hence contradiction by A13, A15, Def1; :: thesis: verum
end;
then A16: 1 <= cz by NAT_1:14;
Segm cz c= Segm 1 by A14, A12, ORDINAL1:16;
then cz <= 1 by NAT_1:39;
then consider r being Surreal such that
A17: ( z = [{},{r}] or z = [{r},{}] ) by SURREALO:47, A16, XXREAL_0:1;
A18: r in (L_ z) \/ (R_ z) by A17, TARSKI:def 1;
then reconsider r = r as uSurreal by A10;
A19: ( born z = born_eq z & born_eq z = born_eq (uInt . (n + 1)) ) by A10, SURREALO:35;
A20: born r in n + 1 by A19, A6, SURREALO:1, A18;
then A21: ( r in Day (born r) & Day (born r) c= Day (n + 1) ) by SURREAL0:35, SURREAL0:def 18, ORDINAL1:def 2;
per cases ( z = [{},{r}] or z = [{r},{}] ) by A17;
suppose A22: z = [{},{r}] ; :: thesis: contradiction
A23: ( L_ (uInt . (n + 1)) << {z} & {(uInt . (n + 1))} << R_ z & L_ z << {(uInt . (n + 1))} ) by A13, SURREAL0:43;
( uInt . (n + 1) in {(uInt . (n + 1))} & r in {r} ) by TARSKI:def 1;
hence contradiction by A21, Th2, A23, A22; :: thesis: verum
end;
suppose A24: z = [{r},{}] ; :: thesis: contradiction
then A25: not r == sn by A11, A8, SURREALO:50;
n + 1 = Segm (n + 1) ;
then born r in succ (Segm n) by A20, NAT_1:38;
then A26: ( r in Day (born r) & Day (born r) c= Day n ) by ORDINAL1:22, SURREAL0:35, SURREAL0:def 18;
( L_ z << {sn} & {z} << R_ sn ) by Th7, A24, SURREALO:21, A26, Th2, A25;
then not L_ (uInt . (n + 1)) << {z} by SURREAL0:43, A8, SURREALO:21;
hence contradiction by A13, SURREAL0:43; :: thesis: verum
end;
end;
end;
hence S1[n + 1] by A7, A9, SURREALO:49; :: thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch 2(A3, A4);
hence uInt . i is uniq-surreal by A2; :: thesis: verum
end;
suppose A27: i = - o ; :: thesis: uInt . i is uniq-surreal
defpred S1[ Nat] means uInt . (- i) is uniq-surreal ;
A28: S1[ 0 ] by Def1;
A29: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume S1[n] ; :: thesis: S1[n + 1]
then reconsider sn = uInt . (- n) as uSurreal ;
set n1 = n + 1;
set x = uInt . (- (n + 1));
A30: uInt . (- (n + 1)) in Day (born (uInt . (- (n + 1)))) by SURREAL0:def 18;
A31: ( born_eq (uInt . (- (n + 1))) = n + 1 & n + 1 = born (uInt . (- (n + 1))) ) by Th5, Th4;
then A32: uInt . (- (n + 1)) in born_eq_set (uInt . (- (n + 1))) by A30, SURREALO:def 6;
A33: uInt . (- (n + 1)) = [{},{sn}] by Def1;
then A34: (L_ (uInt . (- (n + 1)))) \/ (R_ (uInt . (- (n + 1)))) is uniq-surreal-membered ;
for z being Surreal st z in born_eq_set (uInt . (- (n + 1))) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uInt . (- (n + 1)) <> z holds
(card (L_ (uInt . (- (n + 1))))) (+) (card (R_ (uInt . (- (n + 1))))) in (card (L_ z)) (+) (card (R_ z))
proof
let z be Surreal; :: thesis: ( z in born_eq_set (uInt . (- (n + 1))) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uInt . (- (n + 1)) <> z implies (card (L_ (uInt . (- (n + 1))))) (+) (card (R_ (uInt . (- (n + 1))))) in (card (L_ z)) (+) (card (R_ z)) )
assume that
A35: ( z in born_eq_set (uInt . (- (n + 1))) & (L_ z) \/ (R_ z) is uniq-surreal-membered ) and
A36: uInt . (- (n + 1)) <> z and
A37: not (card (L_ (uInt . (- (n + 1))))) (+) (card (R_ (uInt . (- (n + 1))))) in (card (L_ z)) (+) (card (R_ z)) ; :: thesis: contradiction
A38: z == uInt . (- (n + 1)) by A35, SURREALO:def 6;
A39: (card (L_ (uInt . (- (n + 1))))) (+) (card (R_ (uInt . (- (n + 1))))) = 1 by A33, SURREALO:47;
then (card (L_ z)) (+) (card (R_ z)) c= 1 by A37, ORDINAL1:16;
then reconsider cz = (card (L_ z)) (+) (card (R_ z)) as Nat ;
cz <> 0
proof
assume cz = 0 ; :: thesis: contradiction
then A40: z = 0_No by SURREALO:46;
uInt . (- (n + 1)) < uInt . 0 by Th3;
hence contradiction by A38, A40, Def1; :: thesis: verum
end;
then A41: 1 <= cz by NAT_1:14;
Segm cz c= Segm 1 by A39, A37, ORDINAL1:16;
then cz <= 1 by NAT_1:39;
then consider r being Surreal such that
A42: ( z = [{},{r}] or z = [{r},{}] ) by SURREALO:47, A41, XXREAL_0:1;
A43: r in (L_ z) \/ (R_ z) by A42, TARSKI:def 1;
then reconsider r = r as uSurreal by A35;
A44: ( born z = born_eq z & born_eq z = born_eq (uInt . (- (n + 1))) ) by A35, SURREALO:35;
A45: born r in n + 1 by A44, A31, SURREALO:1, A43;
then A46: ( r in Day (born r) & Day (born r) c= Day (n + 1) ) by SURREAL0:35, SURREAL0:def 18, ORDINAL1:def 2;
per cases ( z = [{r},{}] or z = [{},{r}] ) by A42;
suppose A47: z = [{r},{}] ; :: thesis: contradiction
A48: ( L_ (uInt . (- (n + 1))) << {z} & {(uInt . (- (n + 1)))} << R_ z & L_ z << {(uInt . (- (n + 1)))} ) by A38, SURREAL0:43;
( uInt . (- (n + 1)) in {(uInt . (- (n + 1)))} & r in {r} ) by TARSKI:def 1;
hence contradiction by A46, A47, A48, Th2; :: thesis: verum
end;
suppose A49: z = [{},{r}] ; :: thesis: contradiction
then A50: not r == sn by A36, A33, SURREALO:50;
n + 1 = Segm (n + 1) ;
then born r in succ (Segm n) by A45, NAT_1:38;
then A51: ( r in Day (born r) & Day (born r) c= Day n ) by ORDINAL1:22, SURREAL0:35, SURREAL0:def 18;
( R_ z >> {sn} & {z} >> L_ sn ) by Th7, A49, A51, Th2, A50, SURREALO:21;
then not R_ (uInt . (- (n + 1))) >> {z} by SURREAL0:43, A33, SURREALO:21;
hence contradiction by A38, SURREAL0:43; :: thesis: verum
end;
end;
end;
hence S1[n + 1] by A32, A34, SURREALO:49; :: thesis: verum
end;
for n being Nat holds S1[n] from NAT_1:sch 2(A28, A29);
hence uInt . i is uniq-surreal by A27; :: thesis: verum
end;
end;
end;
end;

Lm3: for n being Nat
for i being Integer st - n < i & i < n holds
( uInt . (- n) < uInt . i & uInt . i < uInt . n )

proof
let n be Nat; :: thesis: for i being Integer st - n < i & i < n holds
( uInt . (- n) < uInt . i & uInt . i < uInt . n )

let i be Integer; :: thesis: ( - n < i & i < n implies ( uInt . (- n) < uInt . i & uInt . i < uInt . n ) )
assume A1: ( - n < i & i < n ) ; :: thesis: ( uInt . (- n) < uInt . i & uInt . i < uInt . n )
i in INT by INT_1:def 2;
then consider k being Nat such that
A2: ( i = k or i = - k ) by INT_1:def 1;
Segm k c= Segm n by A2, A1, XREAL_1:24, NAT_1:39;
then A3: Day k c= Day n by SURREAL0:35;
A4: ( born_eq (uInt . n) = n & n = born_eq (uInt . (- n)) ) by Th5;
born_eq (uInt . i) = k by A2, Th5;
then A5: ( not uInt . n == uInt . i & not uInt . i == uInt . (- n) ) by A4, SURREALO:50, A2, A1;
born (uInt . i) = k by A2, Th4;
then uInt . i in Day k by SURREAL0:def 18;
hence ( uInt . (- n) < uInt . i & uInt . i < uInt . n ) by Th2, A5, A3; :: thesis: verum
end;

Lm4: for i, j being Integer st i < j holds
uInt . i < uInt . j

proof
let i, j be Integer; :: thesis: ( i < j implies uInt . i < uInt . j )
assume A1: i < j ; :: thesis: uInt . i < uInt . j
i in INT by INT_1:def 2;
then consider k being Nat such that
A2: ( i = k or i = - k ) by INT_1:def 1;
j in INT by INT_1:def 2;
then consider n being Nat such that
A3: ( j = n or j = - n ) by INT_1:def 1;
per cases ( k < n or k > n or k = n ) by XXREAL_0:1;
suppose k < n ; :: thesis: uInt . i < uInt . j
then ( - n < k & - n < - k & - k < n ) by XREAL_1:24;
hence uInt . i < uInt . j by A2, A3, A1, Lm3; :: thesis: verum
end;
suppose k > n ; :: thesis: uInt . i < uInt . j
hence uInt . i < uInt . j by Lm3, A2, A3, A1; :: thesis: verum
end;
suppose k = n ; :: thesis: uInt . i < uInt . j
then ( i = - n & j = n & - n < 0 & 0 < n ) by A2, A3, A1;
then ( uInt . i < uInt . 0 & uInt . 0 <= uInt . j ) by Lm3;
hence uInt . i < uInt . j by SURREALO:4; :: thesis: verum
end;
end;
end;

theorem :: SURREALN:8
for i, j being Integer st uInt . i = uInt . j holds
i = j
proof
let i, j be Integer; :: thesis: ( uInt . i = uInt . j implies i = j )
assume uInt . i = uInt . j ; :: thesis: i = j
then ( i <= j & j <= i ) by Lm4, SURREALO:3;
hence i = j by XXREAL_0:1; :: thesis: verum
end;

theorem Th9: :: SURREALN:9
for i, j being Integer holds
( i < j iff uInt . i < uInt . j )
proof
let i, j be Integer; :: thesis: ( i < j iff uInt . i < uInt . j )
thus ( i < j implies uInt . i < uInt . j ) by Lm4; :: thesis: ( uInt . i < uInt . j implies i < j )
assume A1: ( uInt . i < uInt . j & j <= i ) ; :: thesis: contradiction
then j <> i by SURREALO:3;
then j < i by A1, XXREAL_0:1;
then uInt . j <= uInt . i by Lm4;
hence contradiction by A1; :: thesis: verum
end;

theorem Th10: :: SURREALN:10
for i being Integer
for x being Surreal holds
( [{(uInt . (i - 1))},{(uInt . (i + 1))}] is Surreal & ( x = [{(uInt . (i - 1))},{(uInt . (i + 1))}] implies x == uInt . i ) )
proof
let i be Integer; :: thesis: for x being Surreal holds
( [{(uInt . (i - 1))},{(uInt . (i + 1))}] is Surreal & ( x = [{(uInt . (i - 1))},{(uInt . (i + 1))}] implies x == uInt . i ) )

let x be Surreal; :: thesis: ( [{(uInt . (i - 1))},{(uInt . (i + 1))}] is Surreal & ( x = [{(uInt . (i - 1))},{(uInt . (i + 1))}] implies x == uInt . i ) )
set S = uInt . i;
i + (- 1) < i + 1 by XREAL_1:6;
hence [{(uInt . (i - 1))},{(uInt . (i + 1))}] is Surreal by Th9, SURREALO:22; :: thesis: ( x = [{(uInt . (i - 1))},{(uInt . (i + 1))}] implies x == uInt . i )
assume A1: x = [{(uInt . (i - 1))},{(uInt . (i + 1))}] ; :: thesis: x == uInt . i
uInt . (i - 1) < uInt . i by XREAL_1:44, Th9;
then A2: L_ x << {(uInt . i)} by A1, SURREALO:21;
A3: ( L_ (uInt . i) << {x} & {x} << R_ (uInt . i) )
proof
per cases ( i = 0 or i > 0 or 0 > i ) ;
suppose i = 0 ; :: thesis: ( L_ (uInt . i) << {x} & {x} << R_ (uInt . i) )
then uInt . i = 0_No by Def1;
hence ( L_ (uInt . i) << {x} & {x} << R_ (uInt . i) ) ; :: thesis: verum
end;
suppose A4: i > 0 ; :: thesis: ( L_ (uInt . i) << {x} & {x} << R_ (uInt . i) )
then reconsider I = i as Element of NAT by INT_1:3;
reconsider i1 = I - 1 as Nat by NAT_1:20, A4;
i = i1 + 1 ;
then A5: uInt . i = [{(uInt . i1)},{}] by Def1;
uInt . i1 <= uInt . (i - 1) ;
then not L_ x << {(uInt . i1)} by A1, SURREALO:21;
then uInt . i1 < x by SURREAL0:43;
hence ( L_ (uInt . i) << {x} & {x} << R_ (uInt . i) ) by SURREALO:21, A5; :: thesis: verum
end;
suppose A6: 0 > i ; :: thesis: ( L_ (uInt . i) << {x} & {x} << R_ (uInt . i) )
then reconsider I = - i as Element of NAT by INT_1:3;
reconsider i1 = I - 1 as Nat by NAT_1:20, A6;
i = - (i1 + 1) ;
then A7: uInt . i = [{},{(uInt . (- i1))}] by Def1;
( not L_ (uInt . (- i1)) << {x} or not {(uInt . (- i1))} << R_ x ) by SURREALO:3, SURREALO:21, A1;
then not uInt . (- i1) <= x by SURREAL0:43;
hence ( L_ (uInt . i) << {x} & {x} << R_ (uInt . i) ) by SURREALO:21, A7; :: thesis: verum
end;
end;
end;
uInt . i < uInt . (i + 1) by Th9, XREAL_1:29;
then {(uInt . i)} << R_ x by A1, SURREALO:21;
hence x == uInt . i by A2, A3, SURREAL0:43; :: thesis: verum
end;

theorem Th11: :: SURREALN:11
uInt . 1 = 1_No
proof
uInt . (1 + 0) = [{(uInt . 0)},{}] by Def1
.= [{0_No},{}] by Def1 ;
hence uInt . 1 = 1_No ; :: thesis: verum
end;

theorem Th12: :: SURREALN:12
for i being Integer holds - (uInt . i) = uInt . (- i)
proof
defpred S1[ Nat] means - (uInt . $1) = uInt . (- $1);
uInt . 0 = 0_No by Def1;
then A1: S1[ 0 ] ;
A2: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A3: S1[n] ; :: thesis: S1[n + 1]
uInt . (n + 1) = [{(uInt . n)},{}] by Def1;
then ( L_ (uInt . (n + 1)) = {(uInt . n)} & R_ (uInt . (n + 1)) = {} ) ;
then - (uInt . (n + 1)) = [{},(-- {(uInt . n)})] by SURREALR:22, SURREALR:7
.= [{},{(uInt . (- n))}] by A3, SURREALR:21
.= uInt . (- (n + 1)) by Def1 ;
hence S1[n + 1] ; :: thesis: verum
end;
A4: for n being Nat holds S1[n] from NAT_1:sch 2(A1, A2);
let i be Integer; :: thesis: - (uInt . i) = uInt . (- i)
i in INT by INT_1:def 2;
then consider o being Nat such that
A5: ( i = o or i = - o ) by INT_1:def 1;
S1[o] by A4;
hence - (uInt . i) = uInt . (- i) by A5; :: thesis: verum
end;

theorem Th13: :: SURREALN:13
for n, m being Nat holds (uInt . n) + (uInt . m) = uInt . (n + m)
proof
let n, m be Nat; :: thesis: (uInt . n) + (uInt . m) = uInt . (n + m)
defpred S1[ Nat] means (uInt . $1) + 1_No = uInt . ($1 + 1);
A1: ( uInt . 0 = 0_No & uInt . 1 = 1_No ) by Def1, Th11;
then A2: S1[ 0 ] ;
A3: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
set s = uInt . (n + 1);
assume A4: S1[n] ; :: thesis: S1[n + 1]
A5: {(uInt . (n + 1))} ++ (L_ 1_No) = {((uInt . (n + 1)) + 0_No)} by SURREALR:36;
R_ (uInt . (n + 1)) = {} by Th7;
then A6: (R_ (uInt . (n + 1))) ++ {1_No} = {} by SURREALR:27;
uInt . (n + 1) = [{(uInt . n)},{}] by Def1;
then A7: (L_ (uInt . (n + 1))) ++ {1_No} = {(uInt . (n + 1))} by A4, SURREALR:36;
thus (uInt . (n + 1)) + 1_No = [(((L_ (uInt . (n + 1))) ++ {1_No}) \/ ({(uInt . (n + 1))} ++ (L_ 1_No))),(((R_ (uInt . (n + 1))) ++ {1_No}) \/ ({(uInt . (n + 1))} ++ (R_ 1_No)))] by SURREALR:28
.= [({(uInt . (n + 1))} \/ {(uInt . (n + 1))}),({} \/ {})] by A5, SURREALR:27, A6, A7
.= uInt . ((n + 1) + 1) by Def1 ; :: thesis: verum
end;
A8: for n being Nat holds S1[n] from NAT_1:sch 2(A2, A3);
defpred S2[ Nat] means (uInt . n) + (uInt . $1) = uInt . (n + $1);
A9: S2[ 0 ] by A1;
A10: for m being Nat st S2[m] holds
S2[m + 1]
proof
let m be Nat; :: thesis: ( S2[m] implies S2[m + 1] )
assume A11: S2[m] ; :: thesis: S2[m + 1]
(uInt . n) + (uInt . (m + 1)) = (uInt . n) + ((uInt . m) + (uInt . 1)) by Th11, A8
.= (uInt . (n + m)) + 1_No by Th11, A11, SURREALR:37
.= uInt . ((n + m) + 1) by A8 ;
hence S2[m + 1] ; :: thesis: verum
end;
for m being Nat holds S2[m] from NAT_1:sch 2(A9, A10);
hence (uInt . n) + (uInt . m) = uInt . (n + m) ; :: thesis: verum
end;

theorem Th14: :: SURREALN:14
for i, j being Integer holds (uInt . i) + (uInt . j) == uInt . (i + j)
proof
A1: uInt . 0 = 0_No by Def1;
defpred S1[ Nat] means for n, m being Nat st n + m = $1 holds
(uInt . n) + (uInt . (- m)) == uInt . (n - m);
A2: S1[ 0 ]
proof
let n, m be Nat; :: thesis: ( n + m = 0 implies (uInt . n) + (uInt . (- m)) == uInt . (n - m) )
assume n + m = 0 ; :: thesis: (uInt . n) + (uInt . (- m)) == uInt . (n - m)
then ( n = 0 & m = 0 ) ;
hence (uInt . n) + (uInt . (- m)) == uInt . (n - m) by A1; :: thesis: verum
end;
A3: for k being Nat st S1[k] holds
S1[k + 1]
proof
let k be Nat; :: thesis: ( S1[k] implies S1[k + 1] )
assume A4: S1[k] ; :: thesis: S1[k + 1]
let n, m be Nat; :: thesis: ( n + m = k + 1 implies (uInt . n) + (uInt . (- m)) == uInt . (n - m) )
assume A5: n + m = k + 1 ; :: thesis: (uInt . n) + (uInt . (- m)) == uInt . (n - m)
per cases ( n = 0 or m = 0 or ( n <> 0 & m <> 0 ) ) ;
suppose ( n = 0 or m = 0 ) ; :: thesis: (uInt . n) + (uInt . (- m)) == uInt . (n - m)
hence (uInt . n) + (uInt . (- m)) == uInt . (n - m) by A1; :: thesis: verum
end;
suppose ( n <> 0 & m <> 0 ) ; :: thesis: (uInt . n) + (uInt . (- m)) == uInt . (n - m)
then reconsider n1 = n - 1, m1 = m - 1 as Nat by NAT_1:20;
A6: ( uInt . (n1 + 1) = [{(uInt . n1)},{}] & uInt . (- (m1 + 1)) = [{},{(uInt . (- m1))}] ) by Def1;
then A7: ( {(uInt . n)} ++ (L_ (uInt . (- m))) = {} & {} = (R_ (uInt . n)) ++ {(uInt . (- m))} ) by SURREALR:27;
n1 + m = k by A5;
then A8: (uInt . n1) + (uInt . (- m)) == uInt . (n1 - m) by A4;
(L_ (uInt . n)) ++ {(uInt . (- m))} = {((uInt . n1) + (uInt . (- m)))} by SURREALR:36, A6;
then A9: (L_ (uInt . n)) ++ {(uInt . (- m))} <==> {(uInt . ((n - m) - 1))} by A8, SURREALO:32;
n + m1 = k by A5;
then A10: (uInt . n) + (uInt . (- m1)) == uInt . (n - m1) by A4;
{(uInt . n)} ++ (R_ (uInt . (- m))) = {((uInt . n) + (uInt . (- m1)))} by A6, SURREALR:36;
then A11: {(uInt . n)} ++ (R_ (uInt . (- m))) <==> {(uInt . ((n - m) + 1))} by A10, SURREALO:32;
reconsider ss = [{(uInt . ((n - m) - 1))},{(uInt . ((n - m) + 1))}] as Surreal by Th10;
A12: ss == uInt . (n - m) by Th10;
(uInt . n) + (uInt . (- m)) = [(((L_ (uInt . n)) ++ {(uInt . (- m))}) \/ {}),({} \/ ({(uInt . n)} ++ (R_ (uInt . (- m)))))] by A7, SURREALR:28
.= [((L_ (uInt . n)) ++ {(uInt . (- m))}),({(uInt . n)} ++ (R_ (uInt . (- m))))] ;
then (uInt . n) + (uInt . (- m)) == ss by A9, A11, SURREALO:29;
hence (uInt . n) + (uInt . (- m)) == uInt . (n - m) by A12, SURREALO:4; :: thesis: verum
end;
end;
end;
A13: for k being Nat holds S1[k] from NAT_1:sch 2(A2, A3);
let i, j be Integer; :: thesis: (uInt . i) + (uInt . j) == uInt . (i + j)
i in INT by INT_1:def 2;
then consider k being Nat such that
A14: ( i = k or i = - k ) by INT_1:def 1;
j in INT by INT_1:def 2;
then consider n being Nat such that
A15: ( j = n or j = - n ) by INT_1:def 1;
per cases ( ( i = k & j = n ) or ( i = - k & j = n ) or ( i = k & j = - n ) or ( i = - k & j = - n ) ) by A14, A15;
suppose ( i = k & j = n ) ; :: thesis: (uInt . i) + (uInt . j) == uInt . (i + j)
hence (uInt . i) + (uInt . j) == uInt . (i + j) by Th13; :: thesis: verum
end;
suppose A16: ( i = - k & j = n ) ; :: thesis: (uInt . i) + (uInt . j) == uInt . (i + j)
S1[n + k] by A13;
then (uInt . n) + (uInt . (- k)) == uInt . (n - k) ;
hence (uInt . i) + (uInt . j) == uInt . (i + j) by A16; :: thesis: verum
end;
suppose A17: ( i = k & j = - n ) ; :: thesis: (uInt . i) + (uInt . j) == uInt . (i + j)
S1[k + n] by A13;
then (uInt . k) + (uInt . (- n)) == uInt . (k - n) ;
hence (uInt . i) + (uInt . j) == uInt . (i + j) by A17; :: thesis: verum
end;
suppose A18: ( i = - k & j = - n ) ; :: thesis: (uInt . i) + (uInt . j) == uInt . (i + j)
then (uInt . i) + (uInt . j) = (- (uInt . k)) + (uInt . (- n)) by Th12
.= (- (uInt . k)) + (- (uInt . n)) by Th12
.= - ((uInt . k) + (uInt . n)) by SURREALR:40
.= - (uInt . (k + n)) by Th13
.= uInt . (- (k + n)) by Th12 ;
hence (uInt . i) + (uInt . j) == uInt . (i + j) by A18; :: thesis: verum
end;
end;
end;

theorem Th15: :: SURREALN:15
for i, j being Integer holds (uInt . i) * (uInt . j) == uInt . (i * j)
proof
A1: uInt . 0 = 0_No by Def1;
defpred S1[ Nat] means for n, m being Nat st n + m = $1 holds
(uInt . n) * (uInt . m) == uInt . (n * m);
A2: for k being Nat st ( for n being Nat st n < k holds
S1[n] ) holds
S1[k]
proof
let k be Nat; :: thesis: ( ( for n being Nat st n < k holds
S1[n] ) implies S1[k] )

assume A3: for n being Nat st n < k holds
S1[n]
; :: thesis: S1[k]
let n, m be Nat; :: thesis: ( n + m = k implies (uInt . n) * (uInt . m) == uInt . (n * m) )
assume A4: n + m = k ; :: thesis: (uInt . n) * (uInt . m) == uInt . (n * m)
per cases ( n = 0 or m = 0 or ( n <> 0 & m <> 0 ) ) ;
suppose ( n = 0 or m = 0 ) ; :: thesis: (uInt . n) * (uInt . m) == uInt . (n * m)
hence (uInt . n) * (uInt . m) == uInt . (n * m) by A1; :: thesis: verum
end;
suppose ( n <> 0 & m <> 0 ) ; :: thesis: (uInt . n) * (uInt . m) == uInt . (n * m)
then reconsider n1 = n - 1, m1 = m - 1, nm1 = (n * m) - 1 as Nat by NAT_1:20;
A5: ( uInt . (n1 + 1) = [{(uInt . n1)},{}] & uInt . (m1 + 1) = [{(uInt . m1)},{}] ) by Def1;
A6: uInt . (nm1 + 1) = [{(uInt . nm1)},{}] by Def1;
set x = uInt . n;
set y = uInt . m;
reconsider nm1 = (n * m) - 1 as Nat by A6;
comp ((R_ (uInt . n)),(uInt . n),(uInt . m),(L_ (uInt . m))) = comp ((L_ (uInt . m)),(uInt . m),(uInt . n),(R_ (uInt . n))) by SURREALR:53;
then A7: comp ((R_ (uInt . n)),(uInt . n),(uInt . m),(L_ (uInt . m))) = {} by A5, SURREALR:49;
A8: ( comp ((L_ (uInt . n)),(uInt . n),(uInt . m),(R_ (uInt . m))) = {} & {} = comp ((R_ (uInt . n)),(uInt . n),(uInt . m),(R_ (uInt . m))) ) by A5, SURREALR:49;
A9: ( n1 < n1 + 1 & m1 < m1 + 1 ) by NAT_1:13;
then A10: ( n1 + m < n + m & n1 + m1 < n + m1 & n + m1 < n + m ) by XREAL_1:8;
n1 + m1 < n + m by A9, XREAL_1:8;
then ( (uInt . n1) * (uInt . m) == uInt . (n1 * m) & (uInt . n1) * (uInt . m1) == uInt . (n1 * m1) & (uInt . n) * (uInt . m1) == uInt . (n * m1) ) by A4, A3, A10;
then ( ((uInt . n1) * (uInt . m)) + ((uInt . n) * (uInt . m1)) == (uInt . (n1 * m)) + (uInt . (n * m1)) & (uInt . (n1 * m)) + (uInt . (n * m1)) = uInt . ((n1 * m) + (n * m1)) & - ((uInt . n1) * (uInt . m1)) == - (uInt . (n1 * m1)) & - (uInt . (n1 * m1)) = uInt . (- (n1 * m1)) ) by Th13, SURREALR:10, SURREALR:43, Th12;
then ( (((uInt . n1) * (uInt . m)) + ((uInt . n) * (uInt . m1))) + (- ((uInt . n1) * (uInt . m1))) == (uInt . ((n1 * m) + (n * m1))) + (uInt . (- (n1 * m1))) & (uInt . ((n1 * m) + (n * m1))) + (uInt . (- (n1 * m1))) == uInt . (((n1 * m) + (n * m1)) + (- (n1 * m1))) ) by Th14, SURREALR:43;
then (((uInt . n1) * (uInt . m)) + ((uInt . n) * (uInt . m1))) + (- ((uInt . n1) * (uInt . m1))) == uInt . nm1 by SURREALO:4;
then {((((uInt . n1) * (uInt . m)) + ((uInt . n) * (uInt . m1))) - ((uInt . n1) * (uInt . m1)))} <==> {(uInt . nm1)} by SURREALO:32;
then A11: comp ((L_ (uInt . n)),(uInt . n),(uInt . m),(L_ (uInt . m))) <==> {(uInt . nm1)} by A5, SURREALR:52;
(uInt . n) * (uInt . m) = [((comp ((L_ (uInt . n)),(uInt . n),(uInt . m),(L_ (uInt . m)))) \/ {}),({} \/ {})] by A7, A8, SURREALR:50
.= [(comp ((L_ (uInt . n)),(uInt . n),(uInt . m),(L_ (uInt . m)))),{}] ;
hence (uInt . n) * (uInt . m) == uInt . (n * m) by A6, A11, SURREALO:29; :: thesis: verum
end;
end;
end;
A12: for k being Nat holds S1[k] from NAT_1:sch 4(A2);
let i, j be Integer; :: thesis: (uInt . i) * (uInt . j) == uInt . (i * j)
i in INT by INT_1:def 2;
then consider k being Nat such that
A13: ( i = k or i = - k ) by INT_1:def 1;
j in INT by INT_1:def 2;
then consider n being Nat such that
A14: ( j = n or j = - n ) by INT_1:def 1;
A15: S1[n + k] by A12;
then A16: (uInt . n) * (uInt . k) == uInt . (n * k) ;
per cases ( ( i = k & j = n ) or ( i = - k & j = n ) or ( i = k & j = - n ) or ( i = - k & j = - n ) ) by A13, A14;
suppose ( i = k & j = n ) ; :: thesis: (uInt . i) * (uInt . j) == uInt . (i * j)
hence (uInt . i) * (uInt . j) == uInt . (i * j) by A15; :: thesis: verum
end;
suppose A17: ( i = - k & j = n ) ; :: thesis: (uInt . i) * (uInt . j) == uInt . (i * j)
(uInt . n) * (uInt . (- k)) = (uInt . n) * (- (uInt . k)) by Th12
.= - ((uInt . n) * (uInt . k)) by SURREALR:58 ;
then (uInt . n) * (uInt . (- k)) == - (uInt . (n * k)) by A16, SURREALR:10;
then (uInt . n) * (uInt . (- k)) == uInt . (- (n * k)) by Th12;
hence (uInt . i) * (uInt . j) == uInt . (i * j) by A17; :: thesis: verum
end;
suppose A18: ( i = k & j = - n ) ; :: thesis: (uInt . i) * (uInt . j) == uInt . (i * j)
(uInt . (- n)) * (uInt . k) = (- (uInt . n)) * (uInt . k) by Th12
.= - ((uInt . n) * (uInt . k)) by SURREALR:58 ;
then (uInt . (- n)) * (uInt . k) == - (uInt . (n * k)) by A16, SURREALR:10;
then (uInt . (- n)) * (uInt . k) == uInt . (- (n * k)) by Th12;
hence (uInt . i) * (uInt . j) == uInt . (i * j) by A18; :: thesis: verum
end;
suppose A19: ( i = - k & j = - n ) ; :: thesis: (uInt . i) * (uInt . j) == uInt . (i * j)
(uInt . (- n)) * (uInt . (- k)) = (- (uInt . n)) * (uInt . (- k)) by Th12
.= (- (uInt . n)) * (- (uInt . k)) by Th12
.= - (- ((uInt . n) * (uInt . k))) by SURREALR:58
.= (uInt . n) * (uInt . k) ;
hence (uInt . i) * (uInt . j) == uInt . (i * j) by A19, A16; :: thesis: verum
end;
end;
end;

theorem Th16: :: SURREALN:16
for x, y being Surreal st x = [{y},{}] & y < 0_No holds
x == 0_No
proof
let x, y be Surreal; :: thesis: ( x = [{y},{}] & y < 0_No implies x == 0_No )
assume ( x = [{y},{}] & y < 0_No ) ; :: thesis: x == 0_No
then A1: ( L_ x << {0_No} & {0_No} << R_ x ) by SURREALO:21;
born 0_No = {} by SURREAL0:37;
then for z being Surreal st L_ x << {z} & {z} << R_ x holds
born 0_No c= born z
;
hence x == 0_No by SURREALO:16, A1; :: thesis: verum
end;

theorem Th17: :: SURREALN:17
for x, y being Surreal st x = [{y},{}] & born x is finite & 0_No <= y holds
ex n being Nat st
( x == uInt . (n + 1) & uInt . n <= y & y < uInt . (n + 1) & n in born x )
proof
let x, y be Surreal; :: thesis: ( x = [{y},{}] & born x is finite & 0_No <= y implies ex n being Nat st
( x == uInt . (n + 1) & uInt . n <= y & y < uInt . (n + 1) & n in born x ) )

assume A1: ( x = [{y},{}] & born x is finite & 0_No <= y ) ; :: thesis: ex n being Nat st
( x == uInt . (n + 1) & uInt . n <= y & y < uInt . (n + 1) & n in born x )

reconsider a = born x as Nat by A1;
defpred S1[ Nat] means L_ x << {(uInt . $1)};
A2: x in Day a by SURREAL0:def 18;
L_ x << {x} by SURREALO:11;
then S1[a] by A2, Th2, SURREALO:17;
then A3: ex k being Nat st S1[k] ;
consider k being Nat such that
A4: ( S1[k] & ( for n being Nat st S1[n] holds
k <= n ) )
from NAT_1:sch 5(A3);
k <> 0
proof
assume k = 0 ; :: thesis: contradiction
then {y} << {0_No} by Def1, A1, A4;
hence contradiction by A1, SURREALO:21; :: thesis: verum
end;
then reconsider k1 = k - 1 as Nat by NAT_1:20;
take k1 ; :: thesis: ( x == uInt . (k1 + 1) & uInt . k1 <= y & y < uInt . (k1 + 1) & k1 in born x )
A5: ( L_ x << {(uInt . k)} & {(uInt . k)} << R_ x ) by A4, A1;
for z being Surreal st L_ x << {z} & {z} << R_ x holds
born (uInt . k) c= born z
proof
let z be Surreal; :: thesis: ( L_ x << {z} & {z} << R_ x implies born (uInt . k) c= born z )
assume that
A6: ( L_ x << {z} & {z} << R_ x ) and
A7: not born (uInt . k) c= born z ; :: thesis: contradiction
A8: ( born z in born (uInt . k) & born (uInt . k) = k & k = Segm k ) by Th4, A7, ORDINAL1:16;
then reconsider bz = born z as Nat ;
( bz < k & k = k1 + 1 ) by A8, NAT_1:44;
then bz <= k1 by NAT_1:13;
then Segm bz c= Segm k1 by NAT_1:39;
then ( z in Day bz & Day bz c= Day k1 ) by SURREAL0:35, SURREAL0:def 18;
then L_ x << {(uInt . k1)} by Th2, A6, SURREALO:17;
then k1 + 1 <= k1 by A4;
hence contradiction by NAT_1:13; :: thesis: verum
end;
hence x == uInt . (k1 + 1) by A5, SURREALO:16; :: thesis: ( uInt . k1 <= y & y < uInt . (k1 + 1) & k1 in born x )
A9: uInt . k1 <= y
proof
assume y < uInt . k1 ; :: thesis: contradiction
then L_ x << {(uInt . k1)} by SURREALO:21, A1;
then k1 + 1 <= k1 by A4;
hence contradiction by NAT_1:13; :: thesis: verum
end;
hence ( uInt . k1 <= y & y < uInt . (k1 + 1) ) by SURREALO:21, A4, A1; :: thesis: k1 in born x
A10: k1 c= born y
proof
assume A11: not k1 c= born y ; :: thesis: contradiction
then k1 <> 0 ;
then reconsider k2 = k1 - 1 as Nat by NAT_1:20;
k1 = k2 + 1 ;
then Segm k1 = succ (Segm k2) by NAT_1:38;
then born y c= k2 by A11, ORDINAL1:16, ORDINAL1:22;
then ( y in Day (born y) & Day (born y) c= Day k2 ) by SURREAL0:35, SURREAL0:def 18;
then ( y <= uInt . k2 & uInt . k2 < uInt . (k2 + 1) ) by Th2, Lm1;
hence contradiction by A9, SURREALO:4; :: thesis: verum
end;
y in (L_ x) \/ (R_ x) by A1, TARSKI:def 1;
hence k1 in born x by SURREALO:1, A10, ORDINAL1:12; :: thesis: verum
end;

definition
let r be Rational;
attr r is dyadic-like means :: SURREALN:def 2
ex n being Nat st denominator r = 2 |^ n;
end;

:: deftheorem defines dyadic-like SURREALN:def 2 :
for r being Rational holds
( r is dyadic-like iff ex n being Nat st denominator r = 2 |^ n );

theorem Th18: :: SURREALN:18
for r being Rational holds
( r is dyadic-like iff ex i being Integer ex n being Nat st r = i / (2 |^ n) )
proof
let r be Rational; :: thesis: ( r is dyadic-like iff ex i being Integer ex n being Nat st r = i / (2 |^ n) )
thus ( r is dyadic-like implies ex i being Integer ex n being Nat st r = i / (2 |^ n) ) :: thesis: ( ex i being Integer ex n being Nat st r = i / (2 |^ n) implies r is dyadic-like )
proof
assume r is dyadic-like ; :: thesis: ex i being Integer ex n being Nat st r = i / (2 |^ n)
then consider n being Nat such that
A1: denominator r = 2 |^ n ;
take numerator r ; :: thesis: ex n being Nat st r = (numerator r) / (2 |^ n)
take n ; :: thesis: r = (numerator r) / (2 |^ n)
thus r = (numerator r) / (2 |^ n) by A1, RAT_1:15; :: thesis: verum
end;
given i being Integer, n being Nat such that A2: r = i / (2 |^ n) ; :: thesis: r is dyadic-like
consider w being Nat such that
A3: ( i = (numerator r) * w & 2 |^ n = (denominator r) * w ) by A2, RAT_1:27;
consider t being Element of NAT such that
A4: ( w = 2 |^ t & t <= n ) by INT_2:28, A3, INT_1:def 3, PEPIN:34;
reconsider nt = n - t as Nat by A4, NAT_1:21;
n = t + nt ;
then (denominator r) * (2 |^ t) = (2 |^ nt) * (2 |^ t) by A4, A3, NEWTON:8;
hence r is dyadic-like by XCMPLX_1:5; :: thesis: verum
end;

registration
let i be Integer;
let n be Nat;
cluster i / (2 |^ n) -> dyadic-like ;
coherence
i / (2 |^ n) is dyadic-like
by Th18;
end;

registration
cluster integer -> dyadic-like for object ;
coherence
for b1 being Integer holds b1 is dyadic-like
proof
let i be Integer; :: thesis: i is dyadic-like
2 |^ 0 = 1 by NEWTON:4;
then i = i / (2 |^ 0) ;
hence i is dyadic-like ; :: thesis: verum
end;
end;

registration
let x be dyadic-like Rational;
cluster - x -> dyadic-like ;
coherence
- x is dyadic-like
proof
consider ix being Integer, nx being Nat such that
A1: x = ix / (2 |^ nx) by Th18;
- x = (- ix) / (2 |^ nx) by A1, XCMPLX_1:187;
hence - x is dyadic-like ; :: thesis: verum
end;
let y be dyadic-like Rational;
cluster x + y -> dyadic-like ;
coherence
x + y is dyadic-like
proof
consider ix being Integer, nx being Nat such that
A2: x = ix / (2 |^ nx) by Th18;
consider iy being Integer, ny being Nat such that
A3: y = iy / (2 |^ ny) by Th18;
( x + y = ((ix * (2 |^ ny)) + (iy * (2 |^ nx))) / ((2 |^ nx) * (2 |^ ny)) & (2 |^ nx) * (2 |^ ny) = 2 |^ (nx + ny) ) by A2, A3, XCMPLX_1:116, NEWTON:8;
hence x + y is dyadic-like ; :: thesis: verum
end;
cluster x + y -> dyadic-like ;
coherence
x + y is dyadic-like
;
cluster x * y -> dyadic-like ;
coherence
x * y is dyadic-like
proof
consider ix being Integer, nx being Nat such that
A4: x = ix / (2 |^ nx) by Th18;
consider iy being Integer, ny being Nat such that
A5: y = iy / (2 |^ ny) by Th18;
( x * y = (ix * iy) / ((2 |^ nx) * (2 |^ ny)) & (2 |^ nx) * (2 |^ ny) = 2 |^ (nx + ny) ) by A4, A5, XCMPLX_1:76, NEWTON:8;
hence x * y is dyadic-like ; :: thesis: verum
end;
end;

definition
func DYADIC -> set means :Def3: :: SURREALN:def 3
for o being object holds
( o in it iff o is dyadic-like Rational );
existence
ex b1 being set st
for o being object holds
( o in b1 iff o is dyadic-like Rational )
proof
defpred S1[ object ] means $1 is dyadic-like Rational;
consider X being set such that
A1: for o being object holds
( o in X iff ( o in RAT & S1[o] ) )
from XBOOLE_0:sch 1();
take X ; :: thesis: for o being object holds
( o in X iff o is dyadic-like Rational )

let o be object ; :: thesis: ( o in X iff o is dyadic-like Rational )
thus ( o in X implies o is dyadic-like Rational ) by A1; :: thesis: ( o is dyadic-like Rational implies o in X )
assume o is dyadic-like Rational ; :: thesis: o in X
hence o in X by A1, RAT_1:def 2; :: thesis: verum
end;
uniqueness
for b1, b2 being set st ( for o being object holds
( o in b1 iff o is dyadic-like Rational ) ) & ( for o being object holds
( o in b2 iff o is dyadic-like Rational ) ) holds
b1 = b2
proof
let D1, D2 be set ; :: thesis: ( ( for o being object holds
( o in D1 iff o is dyadic-like Rational ) ) & ( for o being object holds
( o in D2 iff o is dyadic-like Rational ) ) implies D1 = D2 )

assume that
A2: for o being object holds
( o in D1 iff o is dyadic-like Rational )
and
A3: for o being object holds
( o in D2 iff o is dyadic-like Rational )
; :: thesis: D1 = D2
now :: thesis: for o being object holds
( o in D1 iff o in D2 )
let o be object ; :: thesis: ( o in D1 iff o in D2 )
( o in D1 iff o is dyadic-like Rational ) by A2;
hence ( o in D1 iff o in D2 ) by A3; :: thesis: verum
end;
hence D1 = D2 by TARSKI:2; :: thesis: verum
end;
end;

:: deftheorem Def3 defines DYADIC SURREALN:def 3 :
for b1 being set holds
( b1 = DYADIC iff for o being object holds
( o in b1 iff o is dyadic-like Rational ) );

registration
cluster DYADIC -> non empty rational-membered ;
coherence
( DYADIC is rational-membered & not DYADIC is empty )
proof
for o being object st o in DYADIC holds
o is rational
by Def3;
hence ( DYADIC is rational-membered & not DYADIC is empty ) by Def3, MEMBERED:def 4; :: thesis: verum
end;
end;

registration
cluster -> dyadic-like for Element of DYADIC ;
coherence
for b1 being Element of DYADIC holds b1 is dyadic-like
by Def3;
end;

definition
mode Dyadic is dyadic-like Rational;
end;

definition
let n be Nat;
func DYADIC n -> Subset of DYADIC means :Def4: :: SURREALN:def 4
for d being Dyadic holds
( d in it iff ex i being Integer st d = i / (2 |^ n) );
existence
ex b1 being Subset of DYADIC st
for d being Dyadic holds
( d in b1 iff ex i being Integer st d = i / (2 |^ n) )
proof
defpred S1[ object ] means ex i being Integer st $1 = i / (2 |^ n);
consider IT being set such that
A1: for o being object holds
( o in IT iff ( o in DYADIC & S1[o] ) )
from XBOOLE_0:sch 1();
IT c= DYADIC
proof
let o be object ; :: according to TARSKI:def 3 :: thesis: ( not o in IT or o in DYADIC )
assume o in IT ; :: thesis: o in DYADIC
hence o in DYADIC by A1; :: thesis: verum
end;
then reconsider IT = IT as Subset of DYADIC ;
take IT ; :: thesis: for d being Dyadic holds
( d in IT iff ex i being Integer st d = i / (2 |^ n) )

let d be Dyadic; :: thesis: ( d in IT iff ex i being Integer st d = i / (2 |^ n) )
thus ( d in IT implies ex i being Integer st d = i / (2 |^ n) ) by A1; :: thesis: ( ex i being Integer st d = i / (2 |^ n) implies d in IT )
given i being Integer such that A2: d = i / (2 |^ n) ; :: thesis: d in IT
d in DYADIC by Def3;
hence d in IT by A2, A1; :: thesis: verum
end;
uniqueness
for b1, b2 being Subset of DYADIC st ( for d being Dyadic holds
( d in b1 iff ex i being Integer st d = i / (2 |^ n) ) ) & ( for d being Dyadic holds
( d in b2 iff ex i being Integer st d = i / (2 |^ n) ) ) holds
b1 = b2
proof
let D1, D2 be Subset of DYADIC; :: thesis: ( ( for d being Dyadic holds
( d in D1 iff ex i being Integer st d = i / (2 |^ n) ) ) & ( for d being Dyadic holds
( d in D2 iff ex i being Integer st d = i / (2 |^ n) ) ) implies D1 = D2 )

assume that
A3: for d being Dyadic holds
( d in D1 iff ex i being Integer st d = i / (2 |^ n) )
and
A4: for d being Dyadic holds
( d in D2 iff ex i being Integer st d = i / (2 |^ n) )
; :: thesis: D1 = D2
thus D1 c= D2 :: according to XBOOLE_0:def 10 :: thesis: D2 c= D1
proof
let o be object ; :: according to TARSKI:def 3 :: thesis: ( not o in D1 or o in D2 )
assume o in D1 ; :: thesis: o in D2
then ex i being Integer st o = i / (2 |^ n) by A3;
hence o in D2 by A4; :: thesis: verum
end;
let o be object ; :: according to TARSKI:def 3 :: thesis: ( not o in D2 or o in D1 )
assume o in D2 ; :: thesis: o in D1
then ex i being Integer st o = i / (2 |^ n) by A4;
hence o in D1 by A3; :: thesis: verum
end;
end;

:: deftheorem Def4 defines DYADIC SURREALN:def 4 :
for n being Nat
for b2 being Subset of DYADIC holds
( b2 = DYADIC n iff for d being Dyadic holds
( d in b2 iff ex i being Integer st d = i / (2 |^ n) ) );

theorem Th19: :: SURREALN:19
for n, m being Nat st n <= m holds
DYADIC n c= DYADIC m
proof
let n, m be Nat; :: thesis: ( n <= m implies DYADIC n c= DYADIC m )
assume n <= m ; :: thesis: DYADIC n c= DYADIC m
then reconsider mn = m - n as Nat by NAT_1:21;
let o be object ; :: according to TARSKI:def 3 :: thesis: ( not o in DYADIC n or o in DYADIC m )
assume A1: o in DYADIC n ; :: thesis: o in DYADIC m
then reconsider o = o as Dyadic ;
consider i being Integer such that
A2: o = i / (2 |^ n) by A1, Def4;
A3: (2 |^ n) * (2 |^ mn) = 2 |^ (n + mn) by NEWTON:8;
o = (i * (2 |^ mn)) / ((2 |^ n) * (2 |^ mn)) by A2, XCMPLX_1:91;
hence o in DYADIC m by A3, Def4; :: thesis: verum
end;

theorem Th20: :: SURREALN:20
for d being Dyadic
for n being Nat holds
( d in (DYADIC (n + 1)) \ (DYADIC n) iff ex i being Integer st d = ((2 * i) + 1) / (2 |^ (n + 1)) )
proof
let d be Dyadic; :: thesis: for n being Nat holds
( d in (DYADIC (n + 1)) \ (DYADIC n) iff ex i being Integer st d = ((2 * i) + 1) / (2 |^ (n + 1)) )

let n be Nat; :: thesis: ( d in (DYADIC (n + 1)) \ (DYADIC n) iff ex i being Integer st d = ((2 * i) + 1) / (2 |^ (n + 1)) )
thus ( d in (DYADIC (n + 1)) \ (DYADIC n) implies ex i being Integer st d = ((2 * i) + 1) / (2 |^ (n + 1)) ) :: thesis: ( ex i being Integer st d = ((2 * i) + 1) / (2 |^ (n + 1)) implies d in (DYADIC (n + 1)) \ (DYADIC n) )
proof
assume A1: d in (DYADIC (n + 1)) \ (DYADIC n) ; :: thesis: ex i being Integer st d = ((2 * i) + 1) / (2 |^ (n + 1))
then d in DYADIC (n + 1) by XBOOLE_0:def 5;
then consider i being Integer such that
A2: d = i / (2 |^ (n + 1)) by Def4;
i is odd
proof
assume i is even ; :: thesis: contradiction
then consider j being Integer such that
A3: i = 2 * j by ABIAN:11;
d = (j * 2) / (2 * (2 |^ n)) by A3, A2, NEWTON:6;
then d = j / (2 |^ n) by XCMPLX_1:91;
then d in DYADIC n by Def4;
hence contradiction by A1, XBOOLE_0:def 5; :: thesis: verum
end;
then consider j being Integer such that
A4: i = (2 * j) + 1 by ABIAN:1;
take j ; :: thesis: d = ((2 * j) + 1) / (2 |^ (n + 1))
thus d = ((2 * j) + 1) / (2 |^ (n + 1)) by A2, A4; :: thesis: verum
end;
given i being Integer such that A5: d = ((2 * i) + 1) / (2 |^ (n + 1)) ; :: thesis: d in (DYADIC (n + 1)) \ (DYADIC n)
A6: d in DYADIC (n + 1) by Def4, A5;
not d in DYADIC n
proof
assume d in DYADIC n ; :: thesis: contradiction
then consider j being Integer such that
A7: d = j / (2 |^ n) by Def4;
A8: 2 |^ (n + 1) = 2 * (2 |^ n) by NEWTON:6;
j * (2 |^ (n + 1)) = ((2 * i) + 1) * (2 |^ n) by A7, A5, XCMPLX_1:95;
then (j * 2) * (2 |^ n) = ((2 * i) + 1) * (2 |^ n) by A8;
hence contradiction by XCMPLX_1:5; :: thesis: verum
end;
hence d in (DYADIC (n + 1)) \ (DYADIC n) by A6, XBOOLE_0:def 5; :: thesis: verum
end;

theorem Th21: :: SURREALN:21
INT = DYADIC 0
proof
A1: 2 |^ 0 = 1 by NEWTON:4;
thus INT c= DYADIC 0 :: according to XBOOLE_0:def 10 :: thesis: DYADIC 0 c= INT
proof
let o be object ; :: according to TARSKI:def 3 :: thesis: ( not o in INT or o in DYADIC 0 )
assume o in INT ; :: thesis: o in DYADIC 0
then reconsider o = o as Integer ;
o = o / (2 |^ 0) by A1;
hence o in DYADIC 0 by Def4; :: thesis: verum
end;
let o be object ; :: according to TARSKI:def 3 :: thesis: ( not o in DYADIC 0 or o in INT )
assume o in DYADIC 0 ; :: thesis: o in INT
then ex i being Integer st o = i / (2 |^ 0) by Def4;
hence o in INT by A1, INT_1:def 2; :: thesis: verum
end;

theorem Th22: :: SURREALN:22
rng uInt c= Day NAT
proof
let y be object ; :: according to TARSKI:def 3 :: thesis: ( not y in rng uInt or y in Day NAT )
assume y in rng uInt ; :: thesis: y in Day NAT
then consider x being object such that
A1: ( x in dom uInt & uInt . x = y ) by FUNCT_1:def 3;
reconsider x = x as Integer by A1;
consider k being Nat such that
A2: ( x = k or x = - k ) by A1, INT_1:def 1;
k c= NAT ;
then A3: Day k c= Day NAT by SURREAL0:35;
y in Day k by A1, A2, Th1;
hence y in Day NAT by A3; :: thesis: verum
end;

theorem Th23: :: SURREALN:23
for d being Dyadic holds
( d is Integer or ex p being Nat ex i being Integer st d = ((2 * i) + 1) / (2 |^ (p + 1)) )
proof
let d be Dyadic; :: thesis: ( d is Integer or ex p being Nat ex i being Integer st d = ((2 * i) + 1) / (2 |^ (p + 1)) )
assume A1: d is not Integer ; :: thesis: ex p being Nat ex i being Integer st d = ((2 * i) + 1) / (2 |^ (p + 1))
then A2: not d in INT ;
consider i being Integer, n being Nat such that
A3: d = i / (2 |^ n) by Th18;
defpred S1[ Nat] means d in DYADIC ($1 + 1);
n <> 0 by A2, Th21, A3, Def4;
then reconsider n1 = n - 1 as Nat by NAT_1:20;
d in DYADIC (n1 + 1) by A3, Def4;
then A4: ex n being Nat st S1[n] ;
consider m being Nat such that
A5: ( S1[m] & ( for n being Nat st S1[n] holds
m <= n ) )
from NAT_1:sch 5(A4);
not d in DYADIC m
proof
assume A6: d in DYADIC m ; :: thesis: contradiction
then m <> 0 by A1, Th21;
then reconsider m1 = m - 1 as Nat by NAT_1:20;
m1 + 1 <= m1 by A6, A5;
hence contradiction by NAT_1:13; :: thesis: verum
end;
then d in (DYADIC (m + 1)) \ (DYADIC m) by A5, XBOOLE_0:def 5;
then ex i being Integer st d = ((2 * i) + 1) / (2 |^ (m + 1)) by Th20;
hence ex p being Nat ex i being Integer st d = ((2 * i) + 1) / (2 |^ (p + 1)) ; :: thesis: verum
end;

definition
func uDyadic -> ManySortedSet of DYADIC means :Def5: :: SURREALN:def 5
for i, j being Integer
for p being Nat holds
( it . i = uInt . i & it . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(it . (j / (2 |^ p)))},{(it . ((j + 1) / (2 |^ p)))}] );
existence
ex b1 being ManySortedSet of DYADIC st
for i, j being Integer
for p being Nat holds
( b1 . i = uInt . i & b1 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(b1 . (j / (2 |^ p)))},{(b1 . ((j + 1) / (2 |^ p)))}] )
proof
defpred S1[ object , object ] means for n being Nat st $1 = n holds
( $2 is Function of (Funcs ((DYADIC n),(Games (NAT (+) n)))),(Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1))))) & ( for T being Function of (Funcs ((DYADIC n),(Games (NAT (+) n)))),(Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1))))) st T = $2 holds
for f being Function of (DYADIC n),(Games (NAT (+) n)) holds
( ( for d being Dyadic st d in DYADIC n holds
(T . f) . d = f . d ) & ( for i being Integer holds (T . f) . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] ) ) ) );
A1: for e being object st e in NAT holds
ex u being object st S1[e,u]
proof
let e be object ; :: thesis: ( e in NAT implies ex u being object st S1[e,u] )
assume A2: e in NAT ; :: thesis: ex u being object st S1[e,u]
reconsider n = e as Nat by A2;
set n1 = n + 1;
defpred S2[ object , object ] means ( $2 is Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))) & ( for f being Function of (DYADIC n),(Games (NAT (+) n)) st f = $1 holds
for g being Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))) st g = $2 holds
( ( for d being Dyadic st d in DYADIC n holds
g . d = f . d ) & ( for i being Integer holds g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] ) ) ) );
A3: for c being object st c in Funcs ((DYADIC n),(Games (NAT (+) n))) holds
ex u being object st S2[c,u]
proof
let c be object ; :: thesis: ( c in Funcs ((DYADIC n),(Games (NAT (+) n))) implies ex u being object st S2[c,u] )
assume A4: c in Funcs ((DYADIC n),(Games (NAT (+) n))) ; :: thesis: ex u being object st S2[c,u]
reconsider C = c as Function of (DYADIC n),(Games (NAT (+) n)) by A4, FUNCT_2:66;
defpred S3[ object , object ] means ( ( $1 in DYADIC n implies $2 = C . $1 ) & ( not $1 in DYADIC n implies for i being Integer st $1 = ((2 * i) + 1) / (2 |^ (n + 1)) holds
$2 = [{(C . (i / (2 |^ n)))},{(C . ((i + 1) / (2 |^ n)))}] ) );
A5: for e being object st e in DYADIC (n + 1) holds
ex u being object st S3[e,u]
proof
let e be object ; :: thesis: ( e in DYADIC (n + 1) implies ex u being object st S3[e,u] )
assume A6: e in DYADIC (n + 1) ; :: thesis: ex u being object st S3[e,u]
reconsider d = e as Dyadic by A6;
per cases ( e in DYADIC n or not e in DYADIC n ) ;
suppose A7: e in DYADIC n ; :: thesis: ex u being object st S3[e,u]
take C . e ; :: thesis: S3[e,C . e]
thus S3[e,C . e] by A7; :: thesis: verum
end;
suppose A8: not e in DYADIC n ; :: thesis: ex u being object st S3[e,u]
then d in (DYADIC (n + 1)) \ (DYADIC n) by A6, XBOOLE_0:def 5;
then consider i being Integer such that
A9: d = ((2 * i) + 1) / (2 |^ (n + 1)) by Th20;
take X = [{(C . (i / (2 |^ n)))},{(C . ((i + 1) / (2 |^ n)))}]; :: thesis: S3[e,X]
thus ( e in DYADIC n implies X = C . e ) by A8; :: thesis: ( not e in DYADIC n implies for i being Integer st e = ((2 * i) + 1) / (2 |^ (n + 1)) holds
X = [{(C . (i / (2 |^ n)))},{(C . ((i + 1) / (2 |^ n)))}] )

assume not e in DYADIC n ; :: thesis: for i being Integer st e = ((2 * i) + 1) / (2 |^ (n + 1)) holds
X = [{(C . (i / (2 |^ n)))},{(C . ((i + 1) / (2 |^ n)))}]

let j be Integer; :: thesis: ( e = ((2 * j) + 1) / (2 |^ (n + 1)) implies X = [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}] )
assume A10: e = ((2 * j) + 1) / (2 |^ (n + 1)) ; :: thesis: X = [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}]
((2 * i) + 1) * (2 |^ (n + 1)) = ((2 * j) + 1) * (2 |^ (n + 1)) by A10, A9, XCMPLX_1:95;
then (2 * i) + 1 = (2 * j) + 1 by XCMPLX_1:5;
hence X = [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}] ; :: thesis: verum
end;
end;
end;
consider d being Function such that
A11: dom d = DYADIC (n + 1) and
A12: for e being object st e in DYADIC (n + 1) holds
S3[e,d . e]
from CLASSES1:sch 1(A5);
take d ; :: thesis: S2[c,d]
A13: dom C = DYADIC n by FUNCT_2:def 1;
rng d c= Games (NAT (+) (n + 1))
proof
let y be object ; :: according to TARSKI:def 3 :: thesis: ( not y in rng d or y in Games (NAT (+) (n + 1)) )
assume y in rng d ; :: thesis: y in Games (NAT (+) (n + 1))
then consider x being object such that
A14: ( x in dom d & d . x = y ) by FUNCT_1:def 3;
reconsider x = x as Dyadic by A14, A11;
per cases ( x in DYADIC n or not x in DYADIC n ) ;
suppose A15: x in DYADIC n ; :: thesis: y in Games (NAT (+) (n + 1))
then C . x in rng C by A13, FUNCT_1:def 3;
then A16: C . x in Games (NAT (+) n) ;
A17: d . x = C . x by A11, A12, A14, A15;
n < n + 1 by NAT_1:13;
then Segm n c= Segm (n + 1) by NAT_1:39;
then Games (NAT (+) n) c= Games (NAT (+) (n + 1)) by SURREAL0:1, ORDINAL7:95;
hence y in Games (NAT (+) (n + 1)) by A17, A14, A16; :: thesis: verum
end;
suppose A18: not x in DYADIC n ; :: thesis: y in Games (NAT (+) (n + 1))
then x in (DYADIC (n + 1)) \ (DYADIC n) by A14, A11, XBOOLE_0:def 5;
then consider j being Integer such that
A19: x = ((2 * j) + 1) / (2 |^ (n + 1)) by Th20;
set O = [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}];
A20: d . x = [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}] by A19, A18, A14, A11, A12;
( j / (2 |^ n) in DYADIC n & (j + 1) / (2 |^ n) in DYADIC n ) by Def4;
then ( C . (j / (2 |^ n)) in rng C & C . ((j + 1) / (2 |^ n)) in rng C ) by A13, FUNCT_1:def 3;
then A21: ( C . (j / (2 |^ n)) in Games (NAT (+) n) & C . ((j + 1) / (2 |^ n)) in Games (NAT (+) n) ) ;
for a being object st a in (L_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}]) \/ (R_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}]) holds
ex A being Ordinal st
( A in NAT (+) (n + 1) & a in Games A )
proof
let a be object ; :: thesis: ( a in (L_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}]) \/ (R_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}]) implies ex A being Ordinal st
( A in NAT (+) (n + 1) & a in Games A ) )

assume a in (L_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}]) \/ (R_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}]) ; :: thesis: ex A being Ordinal st
( A in NAT (+) (n + 1) & a in Games A )

then A22: ( a in L_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}] or a in R_ [{(C . (j / (2 |^ n)))},{(C . ((j + 1) / (2 |^ n)))}] ) by XBOOLE_0:def 3;
take A = NAT (+) n; :: thesis: ( A in NAT (+) (n + 1) & a in Games A )
n < n + 1 by NAT_1:13;
then n in Segm (n + 1) by NAT_1:44;
hence ( A in NAT (+) (n + 1) & a in Games A ) by A22, A21, TARSKI:def 1, ORDINAL7:94; :: thesis: verum
end;
hence y in Games (NAT (+) (n + 1)) by A20, A14, SURREAL0:4; :: thesis: verum
end;
end;
end;
hence d is Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))) by A11, FUNCT_2:2; :: thesis: for f being Function of (DYADIC n),(Games (NAT (+) n)) st f = c holds
for g being Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))) st g = d holds
( ( for d being Dyadic st d in DYADIC n holds
g . d = f . d ) & ( for i being Integer holds g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] ) )

let f be Function of (DYADIC n),(Games (NAT (+) n)); :: thesis: ( f = c implies for g being Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))) st g = d holds
( ( for d being Dyadic st d in DYADIC n holds
g . d = f . d ) & ( for i being Integer holds g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] ) ) )

assume A23: f = c ; :: thesis: for g being Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))) st g = d holds
( ( for d being Dyadic st d in DYADIC n holds
g . d = f . d ) & ( for i being Integer holds g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] ) )

let g be Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))); :: thesis: ( g = d implies ( ( for d being Dyadic st d in DYADIC n holds
g . d = f . d ) & ( for i being Integer holds g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] ) ) )

assume A24: g = d ; :: thesis: ( ( for d being Dyadic st d in DYADIC n holds
g . d = f . d ) & ( for i being Integer holds g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] ) )

DYADIC n c= DYADIC (n + 1) by Th19, NAT_1:11;
hence for z being Dyadic st z in DYADIC n holds
g . z = f . z
by A12, A23, A24; :: thesis: for i being Integer holds g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}]
let i be Integer; :: thesis: g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}]
set I = ((2 * i) + 1) / (2 |^ (n + 1));
((2 * i) + 1) / (2 |^ (n + 1)) in (DYADIC (n + 1)) \ (DYADIC n) by Th20;
then ( ((2 * i) + 1) / (2 |^ (n + 1)) in DYADIC (n + 1) & not ((2 * i) + 1) / (2 |^ (n + 1)) in DYADIC n ) by XBOOLE_0:def 5;
hence g . (((2 * i) + 1) / (2 |^ (n + 1))) = [{(f . (i / (2 |^ n)))},{(f . ((i + 1) / (2 |^ n)))}] by A12, A23, A24; :: thesis: verum
end;
consider H being Function such that
A25: dom H = Funcs ((DYADIC n),(Games (NAT (+) n))) and
A26: for e being object st e in Funcs ((DYADIC n),(Games (NAT (+) n))) holds
S2[e,H . e]
from CLASSES1:sch 1(A3);
take H ; :: thesis: S1[e,H]
let k be Nat; :: thesis: ( e = k implies ( H is Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))) & ( for T being Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))) st T = H holds
for f being Function of (DYADIC k),(Games (NAT (+) k)) holds
( ( for d being Dyadic st d in DYADIC k holds
(T . f) . d = f . d ) & ( for i being Integer holds (T . f) . (((2 * i) + 1) / (2 |^ (k + 1))) = [{(f . (i / (2 |^ k)))},{(f . ((i + 1) / (2 |^ k)))}] ) ) ) ) )

assume A27: e = k ; :: thesis: ( H is Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))) & ( for T being Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))) st T = H holds
for f being Function of (DYADIC k),(Games (NAT (+) k)) holds
( ( for d being Dyadic st d in DYADIC k holds
(T . f) . d = f . d ) & ( for i being Integer holds (T . f) . (((2 * i) + 1) / (2 |^ (k + 1))) = [{(f . (i / (2 |^ k)))},{(f . ((i + 1) / (2 |^ k)))}] ) ) ) )

rng H c= Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1))))
proof
let y be object ; :: according to TARSKI:def 3 :: thesis: ( not y in rng H or y in Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1)))) )
assume y in rng H ; :: thesis: y in Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1))))
then consider x being object such that
A28: ( x in dom H & H . x = y ) by FUNCT_1:def 3;
reconsider hx = H . x as Function of (DYADIC (n + 1)),(Games (NAT (+) (n + 1))) by A28, A25, A26;
hx in Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1)))) by FUNCT_2:8;
hence y in Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1)))) by A28; :: thesis: verum
end;
then reconsider h = H as Function of (Funcs ((DYADIC n),(Games (NAT (+) n)))),(Funcs ((DYADIC (n + 1)),(Games (NAT (+) (n + 1))))) by A25, FUNCT_2:2;
h = H ;
hence H is Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))) by A27; :: thesis: for T being Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))) st T = H holds
for f being Function of (DYADIC k),(Games (NAT (+) k)) holds
( ( for d being Dyadic st d in DYADIC k holds
(T . f) . d = f . d ) & ( for i being Integer holds (T . f) . (((2 * i) + 1) / (2 |^ (k + 1))) = [{(f . (i / (2 |^ k)))},{(f . ((i + 1) / (2 |^ k)))}] ) )

let G be Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))); :: thesis: ( G = H implies for f being Function of (DYADIC k),(Games (NAT (+) k)) holds
( ( for d being Dyadic st d in DYADIC k holds
(G . f) . d = f . d ) & ( for i being Integer holds (G . f) . (((2 * i) + 1) / (2 |^ (k + 1))) = [{(f . (i / (2 |^ k)))},{(f . ((i + 1) / (2 |^ k)))}] ) ) )

assume A29: G = H ; :: thesis: for f being Function of (DYADIC k),(Games (NAT (+) k)) holds
( ( for d being Dyadic st d in DYADIC k holds
(G . f) . d = f . d ) & ( for i being Integer holds (G . f) . (((2 * i) + 1) / (2 |^ (k + 1))) = [{(f . (i / (2 |^ k)))},{(f . ((i + 1) / (2 |^ k)))}] ) )

let f be Function of (DYADIC k),(Games (NAT (+) k)); :: thesis: ( ( for d being Dyadic st d in DYADIC k holds
(G . f) . d = f . d ) & ( for i being Integer holds (G . f) . (((2 * i) + 1) / (2 |^ (k + 1))) = [{(f . (i / (2 |^ k)))},{(f . ((i + 1) / (2 |^ k)))}] ) )

f in dom H by A27, A25, FUNCT_2:8;
then S2[f,H . f] by A25, A26;
hence ( ( for d being Dyadic st d in DYADIC k holds
(G . f) . d = f . d ) & ( for i being Integer holds (G . f) . (((2 * i) + 1) / (2 |^ (k + 1))) = [{(f . (i / (2 |^ k)))},{(f . ((i + 1) / (2 |^ k)))}] ) )
by A27, A29; :: thesis: verum
end;
consider P being Function such that
A30: dom P = NAT and
A31: for e being object st e in NAT holds
S1[e,P . e]
from CLASSES1:sch 1(A1);
P is Function-yielding
proof
let o be object ; :: according to FUNCOP_1:def 6 :: thesis: ( not o in dom P or P . o is set )
thus ( not o in dom P or P . o is set ) by A30, A31; :: thesis: verum
end;
then reconsider P = P as Function-yielding Function ;
A32: dom uInt = INT by PARTFUN1:def 2;
A33: ( rng uInt c= Games NAT & NAT = NAT (+) 0 ) by Th22, XBOOLE_1:1, ORDINAL7:69;
deffunc H1( object , object ) -> set = (P . $1) . $2;
consider f1 being Function such that
A34: ( dom f1 = NAT & f1 . 0 = uInt ) and
A35: for n being Nat holds f1 . (n + 1) = H1(n,f1 . n) from NAT_1:sch 11();
defpred S2[ Nat] means f1 . $1 is Function of (DYADIC $1),(Games (NAT (+) $1));
A36: S2[ 0 ] by A33, A32, FUNCT_2:2, Th21, A34;
A37: for k being Nat st S2[k] holds
S2[k + 1]
proof
let k be Nat; :: thesis: ( S2[k] implies S2[k + 1] )
assume A38: S2[k] ; :: thesis: S2[k + 1]
reconsider f1k = f1 . k as Function of (DYADIC k),(Games (NAT (+) k)) by A38;
set k1 = k + 1;
k in NAT by ORDINAL1:def 12;
then reconsider Pk = P . k as Function of (Funcs ((DYADIC k),(Games (NAT (+) k)))),(Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1))))) by A31;
dom Pk = Funcs ((DYADIC k),(Games (NAT (+) k))) by FUNCT_2:def 1;
then A39: f1k in dom Pk by FUNCT_2:8;
f1 . (k + 1) = Pk . f1k by A35;
then ( f1 . (k + 1) in rng Pk & rng Pk c= Funcs ((DYADIC (k + 1)),(Games (NAT (+) (k + 1)))) ) by A39, FUNCT_1:def 3;
hence S2[k + 1] by FUNCT_2:66; :: thesis: verum
end;
A40: for k being Nat holds S2[k] from NAT_1:sch 2(A36, A37);
f1 is Function-yielding
proof
let o be object ; :: according to FUNCOP_1:def 6 :: thesis: ( not o in dom f1 or f1 . o is set )
assume o in dom f1 ; :: thesis: f1 . o is set
then reconsider n = o as Nat by A34;
S2[n] by A40;
hence f1 . o is set ; :: thesis: verum
end;
then reconsider f1 = f1 as Function-yielding Function ;
defpred S3[ object , object ] means for n being Nat st $1 in DYADIC n holds
$2 = (f1 . n) . $1;
A41: for d being Dyadic
for n being Nat st d in DYADIC n holds
for m being Nat holds (f1 . n) . d = (f1 . (n + m)) . d
proof
let d be Dyadic; :: thesis: for n being Nat st d in DYADIC n holds
for m being Nat holds (f1 . n) . d = (f1 . (n + m)) . d

let n be Nat; :: thesis: ( d in DYADIC n implies for m being Nat holds (f1 . n) . d = (f1 . (n + m)) . d )
assume A42: d in DYADIC n ; :: thesis: for m being Nat holds (f1 . n) . d = (f1 . (n + m)) . d
defpred S4[ Nat] means (f1 . n) . d = (f1 . (n + $1)) . d;
A43: S4[ 0 ] ;
A44: for m being Nat st S4[m] holds
S4[m + 1]
proof
let m be Nat; :: thesis: ( S4[m] implies S4[m + 1] )
assume A45: S4[m] ; :: thesis: S4[m + 1]
set nm = n + m;
A46: n + m in NAT by ORDINAL1:def 12;
then reconsider Pnm = P . (n + m) as Function of (Funcs ((DYADIC (n + m)),(Games (NAT (+) (n + m))))),(Funcs ((DYADIC ((n + m) + 1)),(Games (NAT (+) ((n + m) + 1))))) by A31;
reconsider f1nm = f1 . (n + m) as Function of (DYADIC (n + m)),(Games (NAT (+) (n + m))) by A40;
DYADIC n c= DYADIC (n + m) by NAT_1:11, Th19;
then (Pnm . f1nm) . d = f1nm . d by A46, A31, A42;
hence S4[m + 1] by A45, A35; :: thesis: verum
end;
for m being Nat holds S4[m] from NAT_1:sch 2(A43, A44);
hence for m being Nat holds (f1 . n) . d = (f1 . (n + m)) . d ; :: thesis: verum
end;
A47: for e being object st e in DYADIC holds
ex u being object st S3[e,u]
proof
let e be object ; :: thesis: ( e in DYADIC implies ex u being object st S3[e,u] )
assume A48: e in DYADIC ; :: thesis: ex u being object st S3[e,u]
reconsider d = e as Dyadic by A48;
per cases ( d is Integer or ex p being Nat ex i being Integer st d = ((2 * i) + 1) / (2 |^ (p + 1)) ) by Th23;
suppose A49: d is Integer ; :: thesis: ex u being object st S3[e,u]
take sd = uInt . d; :: thesis: S3[e,sd]
let m be Nat; :: thesis: ( e in DYADIC m implies sd = (f1 . m) . e )
assume e in DYADIC m ; :: thesis: sd = (f1 . m) . e
(f1 . 0) . d = (f1 . (0 + m)) . d by A49, A41, INT_1:def 2, Th21;
hence sd = (f1 . m) . e by A34; :: thesis: verum
end;
suppose ex p being Nat ex i being Integer st d = ((2 * i) + 1) / (2 |^ (p + 1)) ; :: thesis: ex u being object st S3[e,u]
then consider p being Nat, i being Integer such that
A50: d = ((2 * i) + 1) / (2 |^ (p + 1)) ;
A51: d in (DYADIC (p + 1)) \ (DYADIC p) by A50, Th20;
then A52: ( d in DYADIC (p + 1) & not d in DYADIC p ) by XBOOLE_0:def 5;
take sd = (f1 . (p + 1)) . d; :: thesis: S3[e,sd]
let m be Nat; :: thesis: ( e in DYADIC m implies sd = (f1 . m) . e )
assume A53: e in DYADIC m ; :: thesis: sd = (f1 . m) . e
p + 1 <= m
proof
assume m < p + 1 ; :: thesis: contradiction
then m <= p by NAT_1:13;
then DYADIC m c= DYADIC p by Th19;
hence contradiction by A53, A51, XBOOLE_0:def 5; :: thesis: verum
end;
then reconsider r = m - (p + 1) as Nat by NAT_1:21;
(p + 1) + r = m ;
hence sd = (f1 . m) . e by A41, A52; :: thesis: verum
end;
end;
end;
consider K being Function such that
A54: dom K = DYADIC and
A55: for e being object st e in DYADIC holds
S3[e,K . e]
from CLASSES1:sch 1(A47);
reconsider K = K as ManySortedSet of DYADIC by PARTFUN1:def 2, A54, RELAT_1:def 18;
take K ; :: thesis: for i, j being Integer
for p being Nat holds
( K . i = uInt . i & K . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(K . (j / (2 |^ p)))},{(K . ((j + 1) / (2 |^ p)))}] )

let i, j be Integer; :: thesis: for p being Nat holds
( K . i = uInt . i & K . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(K . (j / (2 |^ p)))},{(K . ((j + 1) / (2 |^ p)))}] )

let p be Nat; :: thesis: ( K . i = uInt . i & K . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(K . (j / (2 |^ p)))},{(K . ((j + 1) / (2 |^ p)))}] )
set p1 = p + 1;
( i in INT & INT = DYADIC 0 ) by INT_1:def 2, Th21;
hence K . i = uInt . i by A34, A55; :: thesis: K . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(K . (j / (2 |^ p)))},{(K . ((j + 1) / (2 |^ p)))}]
set D = ((2 * j) + 1) / (2 |^ (p + 1));
((2 * j) + 1) / (2 |^ (p + 1)) in (DYADIC (p + 1)) \ (DYADIC p) by Th20;
then ( ((2 * j) + 1) / (2 |^ (p + 1)) in DYADIC (p + 1) & not ((2 * j) + 1) / (2 |^ (p + 1)) in DYADIC p ) by XBOOLE_0:def 5;
then A56: K . (((2 * j) + 1) / (2 |^ (p + 1))) = (f1 . (p + 1)) . (((2 * j) + 1) / (2 |^ (p + 1))) by A55;
A57: p in NAT by ORDINAL1:def 12;
then reconsider Pp = P . p as Function of (Funcs ((DYADIC p),(Games (NAT (+) p)))),(Funcs ((DYADIC (p + 1)),(Games (NAT (+) (p + 1))))) by A31;
reconsider f1p = f1 . p as Function of (DYADIC p),(Games (NAT (+) p)) by A40;
A58: (Pp . f1p) . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(f1p . (j / (2 |^ p)))},{(f1p . ((j + 1) / (2 |^ p)))}] by A57, A31;
( j / (2 |^ p) in DYADIC p & (j + 1) / (2 |^ p) in DYADIC p ) by Def4;
then ( K . (j / (2 |^ p)) = f1p . (j / (2 |^ p)) & K . ((j + 1) / (2 |^ p)) = f1p . ((j + 1) / (2 |^ p)) ) by A55;
hence K . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(K . (j / (2 |^ p)))},{(K . ((j + 1) / (2 |^ p)))}] by A56, A58, A35; :: thesis: verum
end;
uniqueness
for b1, b2 being ManySortedSet of DYADIC st ( for i, j being Integer
for p being Nat holds
( b1 . i = uInt . i & b1 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(b1 . (j / (2 |^ p)))},{(b1 . ((j + 1) / (2 |^ p)))}] ) ) & ( for i, j being Integer
for p being Nat holds
( b2 . i = uInt . i & b2 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(b2 . (j / (2 |^ p)))},{(b2 . ((j + 1) / (2 |^ p)))}] ) ) holds
b1 = b2
proof
let M1, M2 be ManySortedSet of DYADIC ; :: thesis: ( ( for i, j being Integer
for p being Nat holds
( M1 . i = uInt . i & M1 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(M1 . (j / (2 |^ p)))},{(M1 . ((j + 1) / (2 |^ p)))}] ) ) & ( for i, j being Integer
for p being Nat holds
( M2 . i = uInt . i & M2 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(M2 . (j / (2 |^ p)))},{(M2 . ((j + 1) / (2 |^ p)))}] ) ) implies M1 = M2 )

assume that
A59: for i, j being Integer
for p being Nat holds
( M1 . i = uInt . i & M1 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(M1 . (j / (2 |^ p)))},{(M1 . ((j + 1) / (2 |^ p)))}] )
and
A60: for i, j being Integer
for p being Nat holds
( M2 . i = uInt . i & M2 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(M2 . (j / (2 |^ p)))},{(M2 . ((j + 1) / (2 |^ p)))}] )
; :: thesis: M1 = M2
defpred S1[ Nat] means for d being Dyadic st d in DYADIC $1 holds
M1 . d = M2 . d;
A61: S1[ 0 ]
proof
let d be Dyadic; :: thesis: ( d in DYADIC 0 implies M1 . d = M2 . d )
assume d in DYADIC 0 ; :: thesis: M1 . d = M2 . d
then ( M1 . d = uInt . d & uInt . d = M2 . d ) by Th21, A59, A60;
hence M1 . d = M2 . d ; :: thesis: verum
end;
A62: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A63: S1[n] ; :: thesis: S1[n + 1]
let d be Dyadic; :: thesis: ( d in DYADIC (n + 1) implies M1 . d = M2 . d )
assume A64: d in DYADIC (n + 1) ; :: thesis: M1 . d = M2 . d
per cases ( d in DYADIC n or not d in DYADIC n ) ;
suppose d in DYADIC n ; :: thesis: M1 . d = M2 . d
hence M1 . d = M2 . d by A63; :: thesis: verum
end;
suppose not d in DYADIC n ; :: thesis: M1 . d = M2 . d
then d in (DYADIC (n + 1)) \ (DYADIC n) by A64, XBOOLE_0:def 5;
then consider i being Integer such that
A65: d = ((2 * i) + 1) / (2 |^ (n + 1)) by Th20;
( i / (2 |^ n) in DYADIC n & (i + 1) / (2 |^ n) in DYADIC n ) by Def4;
then ( M1 . (i / (2 |^ n)) = M2 . (i / (2 |^ n)) & M1 . ((i + 1) / (2 |^ n)) = M2 . ((i + 1) / (2 |^ n)) ) by A63;
then M1 . d = [{(M2 . (i / (2 |^ n)))},{(M2 . ((i + 1) / (2 |^ n)))}] by A65, A59;
hence M1 . d = M2 . d by A65, A60; :: thesis: verum
end;
end;
end;
A66: for n being Nat holds S1[n] from NAT_1:sch 2(A61, A62);
A67: ( dom M1 = DYADIC & DYADIC = dom M2 ) by PARTFUN1:def 2;
for o being object st o in DYADIC holds
M1 . o = M2 . o
proof
let o be object ; :: thesis: ( o in DYADIC implies M1 . o = M2 . o )
assume o in DYADIC ; :: thesis: M1 . o = M2 . o
then consider i being Integer, n being Nat such that
A68: o = i / (2 |^ n) by Th18;
o in DYADIC n by A68, Def4;
hence M1 . o = M2 . o by A66; :: thesis: verum
end;
hence M1 = M2 by A67, FUNCT_1:2; :: thesis: verum
end;
end;

:: deftheorem Def5 defines uDyadic SURREALN:def 5 :
for b1 being ManySortedSet of DYADIC holds
( b1 = uDyadic iff for i, j being Integer
for p being Nat holds
( b1 . i = uInt . i & b1 . (((2 * j) + 1) / (2 |^ (p + 1))) = [{(b1 . (j / (2 |^ p)))},{(b1 . ((j + 1) / (2 |^ p)))}] ) );

Lm5: for p being Nat holds
( ( for d being Dyadic holds uDyadic . d is Surreal ) & ( for i, j being Integer
for si, sj being Surreal st si = uDyadic . (i / (2 |^ p)) & sj = uDyadic . (j / (2 |^ p)) holds
( i < j iff si < sj ) ) )

proof
let p be Nat; :: thesis: ( ( for d being Dyadic holds uDyadic . d is Surreal ) & ( for i, j being Integer
for si, sj being Surreal st si = uDyadic . (i / (2 |^ p)) & sj = uDyadic . (j / (2 |^ p)) holds
( i < j iff si < sj ) ) )

defpred S1[ Nat] means ( ( for d being Dyadic st d in DYADIC $1 holds
uDyadic . d is Surreal ) & ( for i, j being Integer
for si, sj being Surreal st si = uDyadic . (i / (2 |^ $1)) & sj = uDyadic . (j / (2 |^ $1)) holds
( i < j iff si < sj ) ) );
A1: S1[ 0 ]
proof
A2: 2 |^ 0 = 1 by NEWTON:4;
thus for d being Dyadic st d in DYADIC 0 holds
uDyadic . d is Surreal
:: thesis: for i, j being Integer
for si, sj being Surreal st si = uDyadic . (i / (2 |^ 0)) & sj = uDyadic . (j / (2 |^ 0)) holds
( i < j iff si < sj )
proof
let d be Dyadic; :: thesis: ( d in DYADIC 0 implies uDyadic . d is Surreal )
assume d in DYADIC 0 ; :: thesis: uDyadic . d is Surreal
then reconsider i = d as Integer by Th21;
uDyadic . d = uInt . i by Def5;
hence uDyadic . d is Surreal ; :: thesis: verum
end;
let i, j be Integer; :: thesis: for si, sj being Surreal st si = uDyadic . (i / (2 |^ 0)) & sj = uDyadic . (j / (2 |^ 0)) holds
( i < j iff si < sj )

let si, sj be Surreal; :: thesis: ( si = uDyadic . (i / (2 |^ 0)) & sj = uDyadic . (j / (2 |^ 0)) implies ( i < j iff si < sj ) )
assume A3: ( si = uDyadic . (i / (2 |^ 0)) & sj = uDyadic . (j / (2 |^ 0)) ) ; :: thesis: ( i < j iff si < sj )
( si = uInt . i & sj = uInt . j ) by A2, A3, Def5;
hence ( i < j iff si < sj ) by Th9; :: thesis: verum
end;
A4: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A5: S1[n] ; :: thesis: S1[n + 1]
set n1 = n + 1;
thus for d being Dyadic st d in DYADIC (n + 1) holds
uDyadic . d is Surreal
:: thesis: for i, j being Integer
for si, sj being Surreal st si = uDyadic . (i / (2 |^ (n + 1))) & sj = uDyadic . (j / (2 |^ (n + 1))) holds
( i < j iff si < sj )
proof
let d be Dyadic; :: thesis: ( d in DYADIC (n + 1) implies uDyadic . d is Surreal )
assume A6: d in DYADIC (n + 1) ; :: thesis: uDyadic . d is Surreal
per cases ( d in DYADIC n or not d in DYADIC n ) ;
suppose d in DYADIC n ; :: thesis: uDyadic . d is Surreal
hence uDyadic . d is Surreal by A5; :: thesis: verum
end;
suppose not d in DYADIC n ; :: thesis: uDyadic . d is Surreal
then d in (DYADIC (n + 1)) \ (DYADIC n) by A6, XBOOLE_0:def 5;
then consider i being Integer such that
A7: d = ((2 * i) + 1) / (2 |^ (n + 1)) by Th20;
( i / (2 |^ n) in DYADIC n & (i + 1) / (2 |^ n) in DYADIC n ) by Def4;
then reconsider si = uDyadic . (i / (2 |^ n)), si1 = uDyadic . ((i + 1) / (2 |^ n)) as Surreal by A5;
i + 0 < i + 1 by XREAL_1:6;
then A8: si < si1 by A5;
uDyadic . d = [{si},{si1}] by Def5, A7;
hence uDyadic . d is Surreal by A8, SURREALO:22; :: thesis: verum
end;
end;
end;
let i, j be Integer; :: thesis: for si, sj being Surreal st si = uDyadic . (i / (2 |^ (n + 1))) & sj = uDyadic . (j / (2 |^ (n + 1))) holds
( i < j iff si < sj )

let si, sj be Surreal; :: thesis: ( si = uDyadic . (i / (2 |^ (n + 1))) & sj = uDyadic . (j / (2 |^ (n + 1))) implies ( i < j iff si < sj ) )
assume A9: ( si = uDyadic . (i / (2 |^ (n + 1))) & sj = uDyadic . (j / (2 |^ (n + 1))) ) ; :: thesis: ( i < j iff si < sj )
A10: 2 |^ (n + 1) = 2 * (2 |^ n) by NEWTON:6;
per cases ( i is even or i is odd ) ;
suppose i is even ; :: thesis: ( i < j iff si < sj )
then consider i1 being Integer such that
A11: i = 2 * i1 by ABIAN:11;
A12: i / (2 |^ (n + 1)) = i1 / (2 |^ n) by A11, A10, XCMPLX_1:91;
per cases ( j is even or j is odd ) ;
suppose j is even ; :: thesis: ( i < j iff si < sj )
then consider j1 being Integer such that
A13: j = 2 * j1 by ABIAN:11;
A14: j / (2 |^ (n + 1)) = j1 / (2 |^ n) by A13, A10, XCMPLX_1:91;
( i1 < j1 iff si < sj ) by A12, A14, A9, A5;
hence ( i < j iff si < sj ) by A11, A13, XREAL_1:64, XREAL_1:68; :: thesis: verum
end;
suppose j is odd ; :: thesis: ( i < j iff si < sj )
then consider j1 being Integer such that
A15: j = (2 * j1) + 1 by ABIAN:1;
( j1 / (2 |^ n) in DYADIC n & (j1 + 1) / (2 |^ n) in DYADIC n ) by Def4;
then reconsider Dn = uDyadic . (j1 / (2 |^ n)), D1n = uDyadic . ((j1 + 1) / (2 |^ n)) as Surreal by A5;
A16: sj = [{Dn},{D1n}] by A15, A9, Def5;
A17: ( L_ sj << {sj} & {sj} << R_ sj ) by SURREALO:11;
thus ( i < j implies si < sj ) :: thesis: ( si < sj implies i < j )
proof
assume i < j ; :: thesis: si < sj
then i1 <= j1 by XREAL_1:68, A11, A15, INT_1:7;
then not Dn < si by A5, A12, A9;
hence si < sj by A16, SURREALO:4, SURREALO:21, A17; :: thesis: verum
end;
assume A18: ( si < sj & j <= i ) ; :: thesis: contradiction
then (2 * j1) + 1 < 2 * i1 by A11, A15, XXREAL_0:1;
then ( 2 * (j1 + 1) = ((2 * j1) + 1) + 1 & ((2 * j1) + 1) + 1 <= 2 * i1 ) by INT_1:7;
then not i1 < j1 + 1 by XREAL_1:68;
then D1n <= si by A5, A12, A9;
then D1n <= sj by A18, SURREALO:4;
hence contradiction by A16, SURREALO:21, A17; :: thesis: verum
end;
end;
end;
suppose i is odd ; :: thesis: ( i < j iff si < sj )
then consider i1 being Integer such that
A19: i = (2 * i1) + 1 by ABIAN:1;
( i1 / (2 |^ n) in DYADIC n & (i1 + 1) / (2 |^ n) in DYADIC n ) by Def4;
then reconsider Sn = uDyadic . (i1 / (2 |^ n)), S1n = uDyadic . ((i1 + 1) / (2 |^ n)) as Surreal by A5;
A20: si = [{Sn},{S1n}] by A19, A9, Def5;
A21: ( L_ si << {si} & {si} << R_ si ) by SURREALO:11;
per cases ( j is even or j is odd ) ;
suppose j is even ; :: thesis: ( i < j iff si < sj )
then consider j1 being Integer such that
A22: j = 2 * j1 by ABIAN:11;
A23: j / (2 |^ (n + 1)) = j1 / (2 |^ n) by A22, A10, XCMPLX_1:91;
thus ( i < j implies si < sj ) :: thesis: ( si < sj implies i < j )
proof
assume i < j ; :: thesis: si < sj
then ( 2 * (i1 + 1) = ((2 * i1) + 1) + 1 & ((2 * i1) + 1) + 1 <= 2 * j1 ) by A19, A22, INT_1:7;
then not j1 < i1 + 1 by XREAL_1:68;
then not sj < S1n by A5, A9, A23;
hence si < sj by A21, A20, SURREALO:4, SURREALO:21; :: thesis: verum
end;
assume A24: ( si < sj & j <= i ) ; :: thesis: contradiction
then 2 * j1 < (2 * i1) + 1 by A19, A22, XXREAL_0:1;
then j1 <= i1 by XREAL_1:68, INT_1:7;
then sj <= Sn by A5, A9, A23;
then sj <= si by A21, A20, SURREALO:21, SURREALO:4;
hence contradiction by A24; :: thesis: verum
end;
suppose j is odd ; :: thesis: ( i < j iff si < sj )
then consider j1 being Integer such that
A25: j = (2 * j1) + 1 by ABIAN:1;
( j1 / (2 |^ n) in DYADIC n & (j1 + 1) / (2 |^ n) in DYADIC n ) by Def4;
then reconsider Dn = uDyadic . (j1 / (2 |^ n)), D1n = uDyadic . ((j1 + 1) / (2 |^ n)) as Surreal by A5;
A26: sj = [{Dn},{D1n}] by A25, A9, Def5;
A27: ( L_ sj << {sj} & {sj} << R_ sj ) by SURREALO:11;
thus ( i < j implies si < sj ) :: thesis: ( si < sj implies i < j )
proof
assume i < j ; :: thesis: si < sj
then ( 2 * (i1 + 1) = ((2 * i1) + 1) + 1 & ((2 * i1) + 1) + 1 <= (2 * j1) + 1 ) by A19, A25, INT_1:7;
then 2 * (i1 + 1) < (2 * j1) + 1 by XXREAL_0:1;
then i1 + 1 <= j1 by XREAL_1:68, INT_1:7;
then S1n <= Dn by A5;
then S1n <= sj by A26, SURREALO:4, SURREALO:21, A27;
hence si < sj by A21, A20, SURREALO:4, SURREALO:21; :: thesis: verum
end;
assume A28: ( si < sj & j <= i ) ; :: thesis: contradiction
then 2 * j1 <= 2 * i1 by A19, A25, XREAL_1:6;
then A29: j1 <= i1 by XREAL_1:68;
j <> i by A9, A28, SURREALO:3;
then j1 < i1 by A25, A19, A29, XXREAL_0:1;
then j1 + 1 <= i1 by INT_1:7;
then D1n <= Sn by A5;
then D1n <= si by A21, A20, SURREALO:4, SURREALO:21;
then sj <= si by A27, A26, SURREALO:21, SURREALO:4;
hence contradiction by A28; :: thesis: verum
end;
end;
end;
end;
end;
A30: for n being Nat holds S1[n] from NAT_1:sch 2(A1, A4);
thus for d being Dyadic holds uDyadic . d is Surreal :: thesis: for i, j being Integer
for si, sj being Surreal st si = uDyadic . (i / (2 |^ p)) & sj = uDyadic . (j / (2 |^ p)) holds
( i < j iff si < sj )
proof
let d be Dyadic; :: thesis: uDyadic . d is Surreal
consider i being Integer, n being Nat such that
A31: d = i / (2 |^ n) by Th18;
d in DYADIC n by A31, Def4;
hence uDyadic . d is Surreal by A30; :: thesis: verum
end;
thus for i, j being Integer
for si, sj being Surreal st si = uDyadic . (i / (2 |^ p)) & sj = uDyadic . (j / (2 |^ p)) holds
( i < j iff si < sj )
by A30; :: thesis: verum
end;

registration
let d be Dyadic;
cluster uDyadic . d -> surreal ;
coherence
uDyadic . d is surreal
by Lm5;
end;

theorem Th24: :: SURREALN:24
for d1, d2 being Dyadic holds
( d1 < d2 iff uDyadic . d1 < uDyadic . d2 )
proof
let d1, d2 be Dyadic; :: thesis: ( d1 < d2 iff uDyadic . d1 < uDyadic . d2 )
consider i1 being Integer, n1 being Nat such that
A1: d1 = i1 / (2 |^ n1) by Th18;
consider i2 being Integer, n2 being Nat such that
A2: d2 = i2 / (2 |^ n2) by Th18;
(2 |^ n1) * (2 |^ n2) = 2 |^ (n1 + n2) by NEWTON:8;
then A3: ( d1 = (i1 * (2 |^ n2)) / (2 |^ (n1 + n2)) & d2 = (i2 * (2 |^ n1)) / (2 |^ (n1 + n2)) ) by A1, A2, XCMPLX_1:91;
thus ( d1 < d2 implies uDyadic . d1 < uDyadic . d2 ) :: thesis: ( uDyadic . d1 < uDyadic . d2 implies d1 < d2 )
proof
assume d1 < d2 ; :: thesis: uDyadic . d1 < uDyadic . d2
then i1 * (2 |^ n2) < i2 * (2 |^ n1) by A3, XREAL_1:72;
hence uDyadic . d1 < uDyadic . d2 by A3, Lm5; :: thesis: verum
end;
assume uDyadic . d1 < uDyadic . d2 ; :: thesis: d1 < d2
then i1 * (2 |^ n2) < i2 * (2 |^ n1) by A3, Lm5;
hence d1 < d2 by A3, XREAL_1:74; :: thesis: verum
end;

theorem Th25: :: SURREALN:25
for z being Surreal
for n being Nat holds
( ( 0_No <= z & z in Day n & not z == uDyadic . n implies ex x, y, p being Nat st
( z == uDyadic . (x + (y / (2 |^ p))) & y < 2 |^ p & x + p < n ) ) & ( for x, y, p being Nat st y < 2 |^ p & x + p < n holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day n ) ) )
proof
let z be Surreal; :: thesis: for n being Nat holds
( ( 0_No <= z & z in Day n & not z == uDyadic . n implies ex x, y, p being Nat st
( z == uDyadic . (x + (y / (2 |^ p))) & y < 2 |^ p & x + p < n ) ) & ( for x, y, p being Nat st y < 2 |^ p & x + p < n holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day n ) ) )

let n be Nat; :: thesis: ( ( 0_No <= z & z in Day n & not z == uDyadic . n implies ex x, y, p being Nat st
( z == uDyadic . (x + (y / (2 |^ p))) & y < 2 |^ p & x + p < n ) ) & ( for x, y, p being Nat st y < 2 |^ p & x + p < n holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day n ) ) )

defpred S1[ Nat] means ( ( for s being Surreal st s in Day $1 & 0_No <= s & not s == uDyadic . $1 holds
ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < $1 ) ) & ( for x, y, p being Nat st y < 2 |^ p & x + p < $1 holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day $1 ) ) );
A1: S1[ 0 ]
proof
A2: ( 0_No = uInt . 0 & uInt . 0 = uDyadic . 0 ) by Def1, Def5;
thus for s being Surreal st s in Day 0 & 0_No <= s & not s == uDyadic . 0 holds
ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < 0 )
by A2, SURREAL0:2, TARSKI:def 1; :: thesis: for x, y, p being Nat st y < 2 |^ p & x + p < 0 holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day 0 )

let x, y, p be Nat; :: thesis: ( y < 2 |^ p & x + p < 0 implies ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day 0 ) )
assume A3: ( y < 2 |^ p & x + p < 0 ) ; :: thesis: ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day 0 )
thus ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day 0 ) by A3; :: thesis: verum
end;
A4: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A5: S1[n] ; :: thesis: S1[n + 1]
set n1 = n + 1;
A6: ( 0_No = uInt . 0 & uInt . 0 = uDyadic . 0 ) by Def1, Def5;
n < n + 1 by NAT_1:13;
then A7: ( Segm n c= Segm (n + 1) & n in Segm (n + 1) ) by NAT_1:39, NAT_1:44;
then A8: Day n c= Day (n + 1) by SURREAL0:35;
thus for s being Surreal st s in Day (n + 1) & 0_No <= s & not s == uDyadic . (n + 1) holds
ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )
:: thesis: for x, y, p being Nat st y < 2 |^ p & x + p < n + 1 holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) )
proof
let s be Surreal; :: thesis: ( s in Day (n + 1) & 0_No <= s & not s == uDyadic . (n + 1) implies ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )

assume A9: ( s in Day (n + 1) & 0_No <= s ) ; :: thesis: ( s == uDyadic . (n + 1) or ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )

set c = Unique_No s;
A10: Unique_No s == s by SURREALO:def 10;
then A11: 0_No <= Unique_No s by A9, SURREALO:4;
per cases ( Unique_No s in Day n or not Unique_No s in Day n ) ;
suppose Unique_No s in Day n ; :: thesis: ( s == uDyadic . (n + 1) or ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )

per cases then ( Unique_No s == uDyadic . n or ex d being Dyadic ex x, y, p being Nat st
( Unique_No s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n ) )
by A10, A9, SURREALO:4, A5;
suppose A12: Unique_No s == uDyadic . n ; :: thesis: ( s == uDyadic . (n + 1) or ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )

ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )
proof
take d = n; :: thesis: ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

take x = n; :: thesis: ex y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

take y = 0 ; :: thesis: ex p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

take p = 0 ; :: thesis: ( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )
thus ( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) by A12, A10, SURREALO:4, NAT_1:13; :: thesis: verum
end;
hence ( s == uDyadic . (n + 1) or ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )
; :: thesis: verum
end;
suppose ex d being Dyadic ex x, y, p being Nat st
( Unique_No s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n )
; :: thesis: ( s == uDyadic . (n + 1) or ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )

then consider d being Dyadic, x, y, p being Nat such that
A13: ( Unique_No s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n ) ;
( x + p < n + 1 & s == uDyadic . d ) by SURREALO:4, A10, A13, NAT_1:13;
hence ( s == uDyadic . (n + 1) or ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )
by A13; :: thesis: verum
end;
end;
end;
suppose A14: not Unique_No s in Day n ; :: thesis: ( s == uDyadic . (n + 1) or ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) )

A15: born_eq (Unique_No s) = born (Unique_No s) by SURREALO:48;
A16: ( born_eq (Unique_No s) = born_eq s & born_eq s c= born s & born s c= n + 1 ) by A9, SURREAL0:def 18, SURREALO:def 5, SURREALO:33, SURREALO:def 10;
then A17: born_eq (Unique_No s) c= n + 1 by XBOOLE_1:1;
A18: Unique_No s in Day (born (Unique_No s)) by SURREAL0:def 18;
A19: n + 1 c= born_eq (Unique_No s)
proof
assume not n + 1 c= born_eq (Unique_No s) ; :: thesis: contradiction
then ( born_eq (Unique_No s) in Segm (n + 1) & Segm (n + 1) = succ (Segm n) ) by ORDINAL1:16, NAT_1:38;
then Day (born (Unique_No s)) c= Day n by SURREAL0:35, A15, ORDINAL1:22;
hence contradiction by A14, A18; :: thesis: verum
end;
then A20: n + 1 = born (Unique_No s) by A15, A17, XBOOLE_0:def 10;
assume A21: not s == uDyadic . (n + 1) ; :: thesis: ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

per cases ( Unique_No s = 0_No or Unique_No s <> 0_No ) ;
suppose A22: Unique_No s = 0_No ; :: thesis: ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

take d = 0 ; :: thesis: ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

take x = 0 ; :: thesis: ex y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

take y = 0 ; :: thesis: ex p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

take p = 0 ; :: thesis: ( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )
thus ( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 ) by A22, SURREALO:def 10, A6; :: thesis: verum
end;
suppose A23: Unique_No s <> 0_No ; :: thesis: ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

R_ (Unique_No s) <> {}
proof
assume A24: R_ (Unique_No s) = {} ; :: thesis: contradiction
then L_ (Unique_No s) <> {} by A23;
then card (L_ (Unique_No s)) = 1 by SURREALO:8, SURREALO:44, A15, A16;
then consider y being object such that
A25: L_ (Unique_No s) = {y} by CARD_2:42;
y in L_ (Unique_No s) by A25, TARSKI:def 1;
then reconsider y = y as Surreal by SURREAL0:def 16;
A26: not Unique_No s == 0_No by A23, SURREALO:50;
Unique_No s = [{y},{}] by A24, A25;
then consider k being Nat such that
A27: ( Unique_No s == uInt . (k + 1) & uInt . k <= y & y < uInt . (k + 1) & k in born (Unique_No s) ) by A26, Th16, A15, A16, Th17;
Unique_No s = uInt . (k + 1) by A27, SURREALO:50;
then ( Unique_No s = uInt . (n + 1) & uInt . (n + 1) = uDyadic . (n + 1) ) by A20, Th4, Def5;
hence contradiction by SURREALO:def 10, A21; :: thesis: verum
end;
then card (R_ (Unique_No s)) = 1 by A15, A16, SURREALO:8, SURREALO:45;
then consider c2 being object such that
A28: R_ (Unique_No s) = {c2} by CARD_2:42;
c2 in R_ (Unique_No s) by A28, TARSKI:def 1;
then reconsider c2 = c2 as Surreal by SURREAL0:def 16;
L_ (Unique_No s) <> {}
proof
assume A29: L_ (Unique_No s) = {} ; :: thesis: contradiction
- (Unique_No s) = [(-- (R_ (Unique_No s))),(-- (L_ (Unique_No s)))] by SURREALR:7;
then A30: - (Unique_No s) = [{(- c2)},{}] by A29, A28, SURREALR:21, SURREALR:22;
not Unique_No s == 0_No by A23, SURREALO:50;
then not - (Unique_No s) == 0_No by SURREALR:23, SURREALR:10;
then c2 <= 0_No by A30, Th16, SURREALR:23, SURREALR:10;
then ( not L_ 0_No << {(Unique_No s)} or not {0_No} << R_ (Unique_No s) ) by A28, SURREALO:21;
hence contradiction by A11, SURREAL0:43; :: thesis: verum
end;
then card (L_ (Unique_No s)) = 1 by A15, A16, SURREALO:8, SURREALO:44;
then consider c1 being object such that
A31: L_ (Unique_No s) = {c1} by CARD_2:42;
c1 in L_ (Unique_No s) by A31, TARSKI:def 1;
then reconsider c1 = c1 as Surreal by SURREAL0:def 16;
A32: Unique_No s = [{c1},{c2}] by A28, A31;
not Unique_No s == 0_No by A23, SURREALO:50;
then A33: ( not L_ (Unique_No s) << {0_No} or not {(Unique_No s)} << R_ 0_No ) by A10, A9, SURREAL0:43, SURREALO:4;
then 0_No <= c1 by A31, SURREALO:21;
then A34: 0_No <= c2 by A32, SURREALO:4, SURREALO:22;
( c1 in L_ (Unique_No s) & c2 in R_ (Unique_No s) ) by A28, A31, TARSKI:def 1;
then ( c1 in (L_ (Unique_No s)) \/ (R_ (Unique_No s)) & c2 in (L_ (Unique_No s)) \/ (R_ (Unique_No s)) ) by XBOOLE_0:def 3;
then A35: ( born c1 in n + 1 & born c2 in n + 1 & n + 1 = Segm (n + 1) ) by A20, SURREALO:1;
then reconsider b1 = born c1, b2 = born c2 as Nat ;
( b1 < n + 1 & b2 < n + 1 ) by A35, NAT_1:44;
then ( b1 <= n & b2 <= n & n = Segm n ) by NAT_1:13;
then ( Segm b1 c= n & Segm b2 c= n ) by NAT_1:39;
then A36: ( c1 in Day b1 & Day b1 c= Day n & c2 in Day b2 & Day b2 c= Day n ) by SURREAL0:35, SURREAL0:def 18;
A37: uDyadic . n = uInt . n by Def5;
not c1 == uDyadic . n
proof
assume c1 == uDyadic . n ; :: thesis: contradiction
then uInt . n < c2 by A37, A32, SURREALO:4, SURREALO:22;
hence contradiction by Th2, A36; :: thesis: verum
end;
then consider d1 being Dyadic, x1, y1, p1 being Nat such that
A38: ( c1 == uDyadic . d1 & y1 < 2 |^ p1 & d1 = x1 + (y1 / (2 |^ p1)) & x1 + p1 < n ) by A36, A33, A31, SURREALO:21, A5;
y1 / (2 |^ p1) < 1 by A38, XREAL_1:189;
then A39: d1 < x1 + 1 by A38, XREAL_1:6;
A40: born (Unique_No s) = born_eq (Unique_No s) by SURREALO:48;
per cases ( c2 == uDyadic . n or ex d being Dyadic ex x, y, p being Nat st
( c2 == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n ) )
by A5, A34, A36;
suppose A41: c2 == uDyadic . n ; :: thesis: ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

A42: x1 + 1 = n
proof
assume A43: x1 + 1 <> n ; :: thesis: contradiction
x1 <= x1 + p1 by NAT_1:11;
then x1 < n by A38, XXREAL_0:2;
then x1 + 1 <= n by NAT_1:13;
then x1 + 1 < n by A43, XXREAL_0:1;
then A44: ( 2 <= x1 + 2 & x1 + 2 = (x1 + 1) + 1 & (x1 + 1) + 1 <= n ) by NAT_1:11, NAT_1:13;
then reconsider N2 = n - 2 as Nat by NAT_1:21, XXREAL_0:2;
x1 + 2 <= N2 + 2 by A44;
then x1 <= N2 by XREAL_1:6;
then x1 + 1 <= N2 + 1 by XREAL_1:6;
then d1 < N2 + 1 by A39, XXREAL_0:2;
then c1 < uDyadic . (N2 + 1) by A38, SURREALO:4, Th24;
then A45: {c1} << {(uDyadic . (N2 + 1))} by SURREALO:21;
N2 + 1 < (N2 + 1) + 1 by NAT_1:13;
then uDyadic . (N2 + 1) < c2 by A41, SURREALO:4, Th24;
then {(uDyadic . (N2 + 1))} << {c2} by SURREALO:21;
then A46: born (Unique_No s) c= born (uDyadic . (N2 + 1)) by A45, A28, A31, A40, SURREALO:51;
uDyadic . (N2 + 1) = uInt . (N2 + 1) by Def5;
then Segm (n + 1) c= Segm (N2 + 1) by A46, A20, Th4;
then n + 1 <= N2 + 1 by NAT_1:39;
then n + 1 <= (N2 + 1) + 1 by NAT_1:13;
hence contradiction by NAT_1:13; :: thesis: verum
end;
(x1 + p1) + 1 <= n by A38, NAT_1:13;
then n + p1 <= n + 0 by A42;
then A47: ( p1 = 0 & 2 |^ 0 = 1 ) by XREAL_1:6, NEWTON:4;
then c1 == uDyadic . x1 by A38, NAT_1:14;
then A48: {c1} <==> {(uDyadic . x1)} by SURREALO:32;
A49: {c2} <==> {(uDyadic . (x1 + 1))} by A41, A42, SURREALO:32;
( uDyadic . x1 = uDyadic . (x1 / (2 |^ 0)) & uDyadic . (x1 + 1) = uDyadic . ((x1 + 1) / (2 |^ 0)) ) by A47;
then uDyadic . (((2 * x1) + 1) / (2 |^ (0 + 1))) = [{(uDyadic . x1)},{(uDyadic . (x1 + 1))}] by Def5;
then Unique_No s == uDyadic . (((2 * x1) + 1) / (2 |^ (0 + 1))) by SURREALO:29, A48, A49, A32;
then A50: s == uDyadic . (((2 * x1) + 1) / (2 |^ 1)) by SURREALO:4, A10;
A51: ((2 * x1) + 1) / (2 |^ 1) = x1 + (1 / (2 |^ 1)) ;
x1 + 1 < n + 1 by A42, NAT_1:13;
hence ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )
by A50, A51; :: thesis: verum
end;
suppose ex d being Dyadic ex x, y, p being Nat st
( c2 == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n )
; :: thesis: ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

then consider d2 being Dyadic, x2, y2, p2 being Nat such that
A52: ( c2 == uDyadic . d2 & y2 < 2 |^ p2 & d2 = x2 + (y2 / (2 |^ p2)) & x2 + p2 < n ) ;
c1 < uDyadic . d2 by A32, SURREALO:4, SURREALO:22, A52;
then A53: uDyadic . d1 < uDyadic . d2 by A38, SURREALO:4;
y2 / (2 |^ p2) < 1 by A52, XREAL_1:189;
then A54: d2 < x2 + 1 by A52, XREAL_1:6;
A55: x1 + 0 <= d1 by A38, XREAL_1:6;
per cases ( x1 <> x2 or x1 = x2 ) ;
suppose A56: x1 <> x2 ; :: thesis: ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

x1 < x2
proof
assume x2 <= x1 ; :: thesis: contradiction
then x2 < x1 by A56, XXREAL_0:1;
then x2 + 1 <= x1 by NAT_1:13;
then d2 < x1 by A54, XXREAL_0:2;
hence contradiction by A53, Th24, A55, XXREAL_0:2; :: thesis: verum
end;
then A57: x1 + 1 <= x2 by NAT_1:13;
x2 + 0 <= d2 by A52, XREAL_1:6;
then A58: x1 + 1 <= d2 by A57, XXREAL_0:2;
A59: d2 = x1 + 1
proof
assume d2 <> x1 + 1 ; :: thesis: contradiction
then x1 + 1 < d2 by A58, XXREAL_0:1;
then ( c1 < uDyadic . (x1 + 1) & uDyadic . (x1 + 1) < c2 ) by A38, SURREALO:4, A52, A39, Th24;
then ( {c1} << {(uDyadic . (x1 + 1))} & {(uDyadic . (x1 + 1))} << {c2} ) by SURREALO:21;
then ( born (Unique_No s) c= born (uDyadic . (x1 + 1)) & born (uDyadic . (x1 + 1)) = born (uInt . (x1 + 1)) & born (uInt . (x1 + 1)) = x1 + 1 ) by A40, SURREALO:51, A28, A31, Def5, Th4;
then Segm (n + 1) c= Segm (x1 + 1) by A19, A15, XBOOLE_1:1;
then n + 1 <= x1 + 1 by NAT_1:39;
then ( n + 1 <= x2 & x2 <= x2 + p2 ) by NAT_1:11, A57, XXREAL_0:2;
then n + 1 <= x2 + p2 by XXREAL_0:2;
hence contradiction by NAT_1:13, A52; :: thesis: verum
end;
y1 + 1 = 2 |^ p1
proof
A60: y1 + 1 <= 2 |^ p1 by A38, NAT_1:13;
assume y1 + 1 <> 2 |^ p1 ; :: thesis: contradiction
then A61: ( y1 < y1 + 1 & y1 + 1 < 2 |^ p1 ) by NAT_1:13, A60, XXREAL_0:1;
then ( y1 / (2 |^ p1) < (y1 + 1) / (2 |^ p1) & (y1 + 1) / (2 |^ p1) < (2 |^ p1) / (2 |^ p1) & (2 |^ p1) / (2 |^ p1) = 1 ) by XREAL_1:74, XCMPLX_1:60;
then ( d1 < x1 + ((y1 + 1) / (2 |^ p1)) & x1 + ((y1 + 1) / (2 |^ p1)) < x1 + 1 ) by A38, XREAL_1:6;
then ( d1 < x1 + ((y1 + 1) / (2 |^ p1)) & x1 + ((y1 + 1) / (2 |^ p1)) < d2 ) by A58, XXREAL_0:2;
then ( c1 < uDyadic . (x1 + ((y1 + 1) / (2 |^ p1))) & uDyadic . (x1 + ((y1 + 1) / (2 |^ p1))) < c2 ) by Th24, A52, A38, SURREALO:4;
then ( {c1} << {(uDyadic . (x1 + ((y1 + 1) / (2 |^ p1))))} & {(uDyadic . (x1 + ((y1 + 1) / (2 |^ p1))))} << {c2} ) by SURREALO:21;
then A62: n + 1 c= born (uDyadic . (x1 + ((y1 + 1) / (2 |^ p1)))) by A40, SURREALO:51, A20, A28, A31;
uDyadic . (x1 + ((y1 + 1) / (2 |^ p1))) in Day n by A38, A5, A61;
then born (uDyadic . (x1 + ((y1 + 1) / (2 |^ p1)))) c= n by SURREAL0:def 18;
then Segm (n + 1) c= Segm n by XBOOLE_1:1, A62;
then n + 1 <= n by NAT_1:39;
hence contradiction by NAT_1:13; :: thesis: verum
end;
then A63: (((x1 * (2 |^ p1)) + y1) + 1) / (2 |^ p1) = ((x1 + 1) * (2 |^ p1)) / (2 |^ p1)
.= (x1 + 1) * ((2 |^ p1) / (2 |^ p1)) by XCMPLX_1:74
.= d2 by A59, XCMPLX_1:88 ;
A64: d1 = ((x1 * (2 |^ p1)) + y1) / (2 |^ p1) by A38, XCMPLX_1:113;
A65: ( {c1} <==> {(uDyadic . d1)} & {c2} <==> {(uDyadic . d2)} ) by A52, A38, SURREALO:32;
uDyadic . (((((x1 * (2 |^ p1)) + y1) * 2) + 1) / (2 |^ (p1 + 1))) = [{(uDyadic . d1)},{(uDyadic . d2)}] by Def5, A64, A63;
then Unique_No s == uDyadic . (((((x1 * (2 |^ p1)) + y1) * 2) + 1) / (2 |^ (p1 + 1))) by A65, SURREALO:29, A32;
then A66: s == uDyadic . (((((x1 * (2 |^ p1)) + y1) * 2) + 1) / (2 |^ (p1 + 1))) by A10, SURREALO:4;
A67: 2 |^ (p1 + 1) = 2 * (2 |^ p1) by NEWTON:6;
then A68: ((((x1 * (2 |^ p1)) + y1) * 2) + 1) / (2 |^ (p1 + 1)) = ((x1 * (2 |^ (p1 + 1))) + ((y1 * 2) + 1)) / (2 |^ (p1 + 1))
.= x1 + (((y1 * 2) + 1) / (2 |^ (p1 + 1))) by XCMPLX_1:113 ;
y1 + 1 <= 2 |^ p1 by A38, NAT_1:13;
then ( ((2 * y1) + 1) + 1 = 2 * (y1 + 1) & 2 * (y1 + 1) <= 2 * (2 |^ p1) ) by XREAL_1:64;
then A69: (2 * y1) + 1 < 2 |^ (p1 + 1) by A67, NAT_1:13;
(x1 + p1) + 1 < n + 1 by A38, XREAL_1:6;
then x1 + (p1 + 1) < n + 1 ;
hence ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )
by A66, A68, A69; :: thesis: verum
end;
suppose A70: x1 = x2 ; :: thesis: ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )

then A71: y1 / (2 |^ p1) < y2 / (2 |^ p2) by A38, A52, A53, Th24, XREAL_1:6;
ex Y1, Y2, p3 being Nat st
( Y1 < Y2 & Y1 < 2 |^ p3 & Y2 < 2 |^ p3 & d1 = x1 + (Y1 / (2 |^ p3)) & d2 = x2 + (Y2 / (2 |^ p3)) & x2 + p3 < n )
proof
per cases ( p2 < p1 or p1 <= p2 ) ;
suppose p2 < p1 ; :: thesis: ex Y1, Y2, p3 being Nat st
( Y1 < Y2 & Y1 < 2 |^ p3 & Y2 < 2 |^ p3 & d1 = x1 + (Y1 / (2 |^ p3)) & d2 = x2 + (Y2 / (2 |^ p3)) & x2 + p3 < n )

then reconsider p = p1 - p2 as Nat by NAT_1:21;
take y1 ; :: thesis: ex Y2, p3 being Nat st
( y1 < Y2 & y1 < 2 |^ p3 & Y2 < 2 |^ p3 & d1 = x1 + (y1 / (2 |^ p3)) & d2 = x2 + (Y2 / (2 |^ p3)) & x2 + p3 < n )

take y3 = y2 * (2 |^ p); :: thesis: ex p3 being Nat st
( y1 < y3 & y1 < 2 |^ p3 & y3 < 2 |^ p3 & d1 = x1 + (y1 / (2 |^ p3)) & d2 = x2 + (y3 / (2 |^ p3)) & x2 + p3 < n )

take p3 = p1; :: thesis: ( y1 < y3 & y1 < 2 |^ p3 & y3 < 2 |^ p3 & d1 = x1 + (y1 / (2 |^ p3)) & d2 = x2 + (y3 / (2 |^ p3)) & x2 + p3 < n )
A72: 2 |^ (p2 + p) = (2 |^ p2) * (2 |^ p) by NEWTON:8;
y2 / (2 |^ p2) = y3 / (2 |^ p3) by A72, XCMPLX_1:91;
hence ( y1 < y3 & y1 < 2 |^ p3 & y3 < 2 |^ p3 & d1 = x1 + (y1 / (2 |^ p3)) & d2 = x2 + (y3 / (2 |^ p3)) & x2 + p3 < n ) by A70, A71, XREAL_1:72, A72, A52, XREAL_1:68, A38; :: thesis: verum
end;
suppose p1 <= p2 ; :: thesis: ex Y1, Y2, p3 being Nat st
( Y1 < Y2 & Y1 < 2 |^ p3 & Y2 < 2 |^ p3 & d1 = x1 + (Y1 / (2 |^ p3)) & d2 = x2 + (Y2 / (2 |^ p3)) & x2 + p3 < n )

then reconsider p = p2 - p1 as Nat by NAT_1:21;
take y3 = y1 * (2 |^ p); :: thesis: ex Y2, p3 being Nat st
( y3 < Y2 & y3 < 2 |^ p3 & Y2 < 2 |^ p3 & d1 = x1 + (y3 / (2 |^ p3)) & d2 = x2 + (Y2 / (2 |^ p3)) & x2 + p3 < n )

take y2 ; :: thesis: ex p3 being Nat st
( y3 < y2 & y3 < 2 |^ p3 & y2 < 2 |^ p3 & d1 = x1 + (y3 / (2 |^ p3)) & d2 = x2 + (y2 / (2 |^ p3)) & x2 + p3 < n )

take p3 = p2; :: thesis: ( y3 < y2 & y3 < 2 |^ p3 & y2 < 2 |^ p3 & d1 = x1 + (y3 / (2 |^ p3)) & d2 = x2 + (y2 / (2 |^ p3)) & x2 + p3 < n )
A73: 2 |^ (p1 + p) = (2 |^ p1) * (2 |^ p) by NEWTON:8;
y1 / (2 |^ p1) = y3 / (2 |^ p3) by A73, XCMPLX_1:91;
hence ( y3 < y2 & y3 < 2 |^ p3 & y2 < 2 |^ p3 & d1 = x1 + (y3 / (2 |^ p3)) & d2 = x2 + (y2 / (2 |^ p3)) & x2 + p3 < n ) by A73, A38, XREAL_1:68, A71, XREAL_1:72, A52; :: thesis: verum
end;
end;
end;
then consider Y1, Y2, p3 being Nat such that
A74: ( Y1 < Y2 & Y1 < 2 |^ p3 & Y2 < 2 |^ p3 & d1 = x1 + (Y1 / (2 |^ p3)) & d2 = x2 + (Y2 / (2 |^ p3)) & x2 + p3 < n ) ;
Y2 - Y1 > 0 by A74, XREAL_1:50;
then reconsider y = Y2 - Y1 as Nat ;
A75: y >= 1 + 0 by A74, XREAL_1:50, NAT_1:13;
A76: y = 1
proof
assume y <> 1 ; :: thesis: contradiction
then A77: y > 1 by A75, XXREAL_0:1;
( Y1 < Y1 + 1 & Y1 + 1 < Y1 + y & Y1 + y = Y2 ) by A77, NAT_1:13, XREAL_1:6;
then ( Y1 / (2 |^ p3) < (Y1 + 1) / (2 |^ p3) & (Y1 + 1) / (2 |^ p3) < Y2 / (2 |^ p3) ) by XREAL_1:74;
then ( uDyadic . d1 < uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3))) & uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3))) < uDyadic . d2 ) by Th24, A74, A70, XREAL_1:6;
then ( c1 < uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3))) & uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3))) < c2 ) by A52, A38, SURREALO:4;
then ( {c1} << {(uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3))))} & {(uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3))))} << {c2} ) by SURREALO:21;
then A78: n + 1 c= born (uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3)))) by A40, SURREALO:51, A20, A28, A31;
Y1 + 1 <= Y2 by A74, NAT_1:13;
then Y1 + 1 < 2 |^ p3 by A74, XXREAL_0:2;
then uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3))) in Day n by A5, A74, A70;
then born (uDyadic . (x1 + ((Y1 + 1) / (2 |^ p3)))) c= n by SURREAL0:def 18;
then Segm (n + 1) c= Segm n by A78, XBOOLE_1:1;
then n + 1 <= n by NAT_1:39;
hence contradiction by NAT_1:13; :: thesis: verum
end;
A79: ( {c1} <==> {(uDyadic . d1)} & {c2} <==> {(uDyadic . d2)} ) by A52, A38, SURREALO:32;
A80: ((x1 * (2 |^ p3)) + Y1) / (2 |^ p3) = d1 by A74, XCMPLX_1:113;
A81: d2 = ((x1 * (2 |^ p3)) + Y2) / (2 |^ p3) by A70, A74, XCMPLX_1:113
.= (((x1 * (2 |^ p3)) + Y1) + 1) / (2 |^ p3) by A76 ;
uDyadic . (((((x1 * (2 |^ p3)) + Y1) * 2) + 1) / (2 |^ (p3 + 1))) = [{(uDyadic . d1)},{(uDyadic . d2)}] by Def5, A80, A81;
then Unique_No s == uDyadic . (((((x1 * (2 |^ p3)) + Y1) * 2) + 1) / (2 |^ (p3 + 1))) by A79, SURREALO:29, A32;
then A82: s == uDyadic . (((((x1 * (2 |^ p3)) + Y1) * 2) + 1) / (2 |^ (p3 + 1))) by A10, SURREALO:4;
A83: 2 |^ (p3 + 1) = 2 * (2 |^ p3) by NEWTON:6;
then A84: ((((x1 * (2 |^ p3)) + Y1) * 2) + 1) / (2 |^ (p3 + 1)) = ((x1 * (2 |^ (p3 + 1))) + ((Y1 * 2) + 1)) / (2 |^ (p3 + 1))
.= x1 + (((Y1 * 2) + 1) / (2 |^ (p3 + 1))) by XCMPLX_1:113 ;
Y1 + 1 <= 2 |^ p3 by A74, NAT_1:13;
then ( ((2 * Y1) + 1) + 1 = 2 * (Y1 + 1) & 2 * (Y1 + 1) <= 2 * (2 |^ p3) ) by XREAL_1:64;
then A85: (2 * Y1) + 1 < 2 |^ (p3 + 1) by A83, NAT_1:13;
(x1 + p3) + 1 < n + 1 by A70, A74, XREAL_1:6;
then x1 + (p3 + 1) < n + 1 ;
hence ex d being Dyadic ex x, y, p being Nat st
( s == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n + 1 )
by A82, A84, A85; :: thesis: verum
end;
end;
end;
end;
end;
end;
end;
end;
end;
let x, y, p be Nat; :: thesis: ( y < 2 |^ p & x + p < n + 1 implies ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) ) )
assume A86: ( y < 2 |^ p & x + p < n + 1 ) ; :: thesis: ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) )
set d = x + (y / (2 |^ p));
A87: x + p <= n by A86, NAT_1:13;
per cases ( p = 0 or ( y is even & p <> 0 ) or ( y is odd & p <> 0 ) ) ;
suppose A88: p = 0 ; :: thesis: ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) )
then 2 |^ p = 1 by NEWTON:4;
then y = 0 by A86, NAT_1:14;
then A89: uDyadic . (x + (y / (2 |^ p))) = uInt . x by Def5;
( 0 < x or 0 = x ) ;
then A90: ( uInt . 0 < uInt . x or uInt . 0 = uInt . x ) by Lm4;
Segm x c= Segm (n + 1) by A88, A86, NAT_1:39;
then ( uInt . x in Day x & Day x c= Day (n + 1) ) by Th1, SURREAL0:35;
hence ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) ) by A90, Def1, A89; :: thesis: verum
end;
suppose A91: ( y is even & p <> 0 ) ; :: thesis: ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) )
then consider z being Nat such that
A92: y = 2 * z by ABIAN:def 2;
reconsider p1 = p - 1 as Nat by NAT_1:20, A91;
p = p1 + 1 ;
then A93: 2 |^ p = 2 * (2 |^ p1) by NEWTON:6;
then A94: y / (2 |^ p) = z / (2 |^ p1) by A92, XCMPLX_1:91;
A95: z < 2 |^ p1 by A93, A92, A86, XREAL_1:64;
(x + p1) + 1 <= n by A86, NAT_1:13;
then x + p1 < n by NAT_1:13;
then ( 0_No <= uDyadic . (x + (z / (2 |^ p1))) & uDyadic . (x + (z / (2 |^ p1))) in Day n ) by A5, A95;
hence ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) ) by A8, A94; :: thesis: verum
end;
suppose A96: ( y is odd & p <> 0 ) ; :: thesis: ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) )
then consider z being Nat such that
A97: y = (2 * z) + 1 by ABIAN:9;
reconsider p1 = p - 1 as Nat by NAT_1:20, A96;
set SD = uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1));
set SD1 = uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1));
p = p1 + 1 ;
then A98: 2 |^ p = 2 * (2 |^ p1) by NEWTON:6;
then A99: (x * (2 |^ p)) + y = (2 * ((x * (2 |^ p1)) + z)) + 1 by A97;
x + (y / (2 |^ p)) = ((2 * ((x * (2 |^ p1)) + z)) + 1) / (2 |^ (p1 + 1)) by A99, XCMPLX_1:113;
then A100: uDyadic . (x + (y / (2 |^ p))) = [{(uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1)))},{(uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)))}] by Def5;
A101: z < 2 |^ p1 by XREAL_1:64, A98, A97, A86, NAT_1:13;
(x + p1) + 1 <= n by A86, NAT_1:13;
then A102: x + p1 < n by NAT_1:13;
((x * (2 |^ p1)) + z) / (2 |^ p1) = x + (z / (2 |^ p1)) by XCMPLX_1:113;
then A103: uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1)) in Day n by A5, A101, A102;
((2 * z) + 1) + 1 <= 2 * (2 |^ p1) by A98, A97, A86, NAT_1:13;
then 2 * (z + 1) <= 2 * (2 |^ p1) ;
then A104: z + 1 <= 2 |^ p1 by XREAL_1:68;
A105: uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)) in Day n
proof
((x * (2 |^ p1)) + z) + 1 = (x * (2 |^ p1)) + (z + 1) ;
then A106: (((x * (2 |^ p1)) + z) + 1) / (2 |^ p1) = x + ((z + 1) / (2 |^ p1)) by XCMPLX_1:113;
per cases ( z + 1 = 2 |^ p1 or z + 1 < 2 |^ p1 ) by A104, XXREAL_0:1;
suppose z + 1 = 2 |^ p1 ; :: thesis: uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)) in Day n
then (((x * (2 |^ p1)) + z) + 1) / (2 |^ p1) = x + 1 by A106, XCMPLX_1:60;
then A107: uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)) = uInt . (x + 1) by Def5;
( x + 1 <= (x + 1) + p1 & (x + 1) + p1 = x + p ) by NAT_1:11;
then Segm (x + 1) c= Segm n by NAT_1:39, A87, XXREAL_0:2;
then ( uInt . (x + 1) in Day (x + 1) & Day (x + 1) c= Day n ) by SURREAL0:35, Th1;
hence uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)) in Day n by A107; :: thesis: verum
end;
suppose z + 1 < 2 |^ p1 ; :: thesis: uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)) in Day n
hence uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)) in Day n by A102, A5, A106; :: thesis: verum
end;
end;
end;
A108: {(uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1)))} << {(uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)))} by SURREALO:21, SURREALO:22, A100;
for o being object st o in {(uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1)))} \/ {(uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)))} holds
ex O being Ordinal st
( O in n + 1 & o in Day O )
proof
let o be object ; :: thesis: ( o in {(uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1)))} \/ {(uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)))} implies ex O being Ordinal st
( O in n + 1 & o in Day O ) )

assume o in {(uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1)))} \/ {(uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)))} ; :: thesis: ex O being Ordinal st
( O in n + 1 & o in Day O )

then ( o in {(uDyadic . (((x * (2 |^ p1)) + z) / (2 |^ p1)))} or o in {(uDyadic . ((((x * (2 |^ p1)) + z) + 1) / (2 |^ p1)))} ) by XBOOLE_0:def 3;
then o in Day n by A103, A105, TARSKI:def 1;
hence ex O being Ordinal st
( O in n + 1 & o in Day O )
by A7; :: thesis: verum
end;
hence ( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day (n + 1) ) by A6, Th24, A100, SURREAL0:46, A108; :: thesis: verum
end;
end;
end;
A109: for n being Nat holds S1[n] from NAT_1:sch 2(A1, A4);
thus ( 0_No <= z & z in Day n & not z == uDyadic . n implies ex x, y, p being Nat st
( z == uDyadic . (x + (y / (2 |^ p))) & y < 2 |^ p & x + p < n ) )
:: thesis: for x, y, p being Nat st y < 2 |^ p & x + p < n holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day n )
proof
assume ( 0_No <= z & z in Day n & not z == uDyadic . n ) ; :: thesis: ex x, y, p being Nat st
( z == uDyadic . (x + (y / (2 |^ p))) & y < 2 |^ p & x + p < n )

then ex d being Dyadic ex x, y, p being Nat st
( z == uDyadic . d & y < 2 |^ p & d = x + (y / (2 |^ p)) & x + p < n )
by A109;
hence ex x, y, p being Nat st
( z == uDyadic . (x + (y / (2 |^ p))) & y < 2 |^ p & x + p < n )
; :: thesis: verum
end;
thus for x, y, p being Nat st y < 2 |^ p & x + p < n holds
( 0_No <= uDyadic . (x + (y / (2 |^ p))) & uDyadic . (x + (y / (2 |^ p))) in Day n )
by A109; :: thesis: verum
end;

theorem Th26: :: SURREALN:26
for n, m, p being Nat st (2 * m) + 1 < 2 |^ p holds
born (uDyadic . (n + (((2 * m) + 1) / (2 |^ p)))) = (n + p) + 1
proof
let n, m, p be Nat; :: thesis: ( (2 * m) + 1 < 2 |^ p implies born (uDyadic . (n + (((2 * m) + 1) / (2 |^ p)))) = (n + p) + 1 )
set d = n + (((2 * m) + 1) / (2 |^ p));
assume A1: ( (2 * m) + 1 < 2 |^ p & born (uDyadic . (n + (((2 * m) + 1) / (2 |^ p)))) <> (n + p) + 1 ) ; :: thesis: contradiction
A2: not uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) == uDyadic . (n + p)
proof
assume uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) == uDyadic . (n + p) ; :: thesis: contradiction
then ( n + (((2 * m) + 1) / (2 |^ p)) <= n + p & n + p <= n + (((2 * m) + 1) / (2 |^ p)) ) by Th24;
then n + (((2 * m) + 1) / (2 |^ p)) = n + p by XXREAL_0:1;
then p * (2 |^ p) < 1 * (2 |^ p) by A1, XCMPLX_1:87;
then p = 0 by NAT_1:14, XREAL_1:64;
then 2 |^ p = 1 + 0 by NEWTON:4;
hence contradiction by A1, NAT_1:13; :: thesis: verum
end;
n + p < (n + p) + 1 by NAT_1:13;
then A3: ( 0_No <= uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) & uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) in Day ((n + p) + 1) ) by A1, Th25;
for O being Ordinal st uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) in Day O holds
(n + p) + 1 c= O
proof
let O be Ordinal; :: thesis: ( uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) in Day O implies (n + p) + 1 c= O )
assume that
A4: uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) in Day O and
A5: not (n + p) + 1 c= O ; :: thesis: contradiction
A6: ( O in (n + p) + 1 & (n + p) + 1 = Segm ((n + p) + 1) ) by A5, ORDINAL1:16;
reconsider O = O as Nat by A5;
O < (n + p) + 1 by A6, NAT_1:44;
then ( Segm O = O & O <= n + p & n + p = Segm (n + p) ) by NAT_1:13;
then Day O c= Day (n + p) by NAT_1:39, SURREAL0:35;
then consider x, y, p1 being Nat such that
A7: ( uDyadic . (n + (((2 * m) + 1) / (2 |^ p))) == uDyadic . (x + (y / (2 |^ p1))) & y < 2 |^ p1 & x + p1 < n + p ) by A4, Th25, A2, A3;
( n + (((2 * m) + 1) / (2 |^ p)) <= x + (y / (2 |^ p1)) & x + (y / (2 |^ p1)) <= n + (((2 * m) + 1) / (2 |^ p)) ) by A7, Th24;
then A8: n + (((2 * m) + 1) / (2 |^ p)) = x + (y / (2 |^ p1)) by XXREAL_0:1;
( 0 <= ((2 * m) + 1) / (2 |^ p) & ((2 * m) + 1) / (2 |^ p) < 1 & 0 <= y / (2 |^ p1) & y / (2 |^ p1) < 1 ) by A1, A7, XREAL_1:191;
then ( n + 0 <= n + (((2 * m) + 1) / (2 |^ p)) & n + (((2 * m) + 1) / (2 |^ p)) < n + 1 & x + 0 <= x + (y / (2 |^ p1)) & x + (y / (2 |^ p1)) < x + 1 ) by XREAL_1:6;
then ( n < x + 1 & x < n + 1 ) by A8, XXREAL_0:2;
then ( n <= x & x <= n ) by NAT_1:13;
then A9: x = n by XXREAL_0:1;
then p1 < p by A7, XREAL_1:6;
then p1 + 1 <= p by NAT_1:13;
then reconsider P = p - (p1 + 1) as Nat by NAT_1:21;
p = (p1 + 1) + P ;
then A10: ( 2 |^ p = (2 |^ (p1 + 1)) * (2 |^ P) & 2 |^ (p1 + 1) = 2 * (2 |^ p1) ) by NEWTON:6, NEWTON:8;
((2 * m) + 1) * (2 |^ p1) = y * (2 |^ p) by A8, A9, XCMPLX_1:95
.= ((y * (2 |^ P)) * 2) * (2 |^ p1) by A10 ;
hence contradiction by XCMPLX_1:5; :: thesis: verum
end;
hence contradiction by A1, SURREAL0:def 18, A3; :: thesis: verum
end;

theorem Th27: :: SURREALN:27
for d being Dyadic holds uDyadic . (- d) = - (uDyadic . d)
proof
let d be Dyadic; :: thesis: uDyadic . (- d) = - (uDyadic . d)
defpred S1[ Nat] means for d being Dyadic st d in DYADIC $1 holds
uDyadic . (- d) = - (uDyadic . d);
A1: S1[ 0 ]
proof
let d be Dyadic; :: thesis: ( d in DYADIC 0 implies uDyadic . (- d) = - (uDyadic . d) )
assume d in DYADIC 0 ; :: thesis: uDyadic . (- d) = - (uDyadic . d)
then reconsider i = d as Integer by Th21;
( uDyadic . (- d) = uInt . (- i) & uInt . (- i) = - (uInt . i) ) by Def5, Th12;
hence uDyadic . (- d) = - (uDyadic . d) by Def5; :: thesis: verum
end;
A2: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A3: S1[n] ; :: thesis: S1[n + 1]
let d be Dyadic; :: thesis: ( d in DYADIC (n + 1) implies uDyadic . (- d) = - (uDyadic . d) )
assume A4: d in DYADIC (n + 1) ; :: thesis: uDyadic . (- d) = - (uDyadic . d)
per cases ( d in DYADIC n or not d in DYADIC n ) ;
suppose d in DYADIC n ; :: thesis: uDyadic . (- d) = - (uDyadic . d)
hence uDyadic . (- d) = - (uDyadic . d) by A3; :: thesis: verum
end;
suppose not d in DYADIC n ; :: thesis: uDyadic . (- d) = - (uDyadic . d)
then d in (DYADIC (n + 1)) \ (DYADIC n) by A4, XBOOLE_0:def 5;
then consider i being Integer such that
A5: d = ((2 * i) + 1) / (2 |^ (n + 1)) by Th20;
set j = - (i + 1);
(2 * (- (i + 1))) + 1 = - ((2 * i) + 1) ;
then A6: - d = ((2 * (- (i + 1))) + 1) / (2 |^ (n + 1)) by A5, XCMPLX_1:187;
A7: - (i / (2 |^ n)) = (- i) / (2 |^ n) by XCMPLX_1:187
.= ((- (i + 1)) + 1) / (2 |^ n) ;
A8: - ((i + 1) / (2 |^ n)) = (- (i + 1)) / (2 |^ n) by XCMPLX_1:187;
( i / (2 |^ n) in DYADIC n & (i + 1) / (2 |^ n) in DYADIC n ) by Def4;
then A9: ( - (uDyadic . (i / (2 |^ n))) = uDyadic . (((- (i + 1)) + 1) / (2 |^ n)) & - (uDyadic . ((i + 1) / (2 |^ n))) = uDyadic . ((- (i + 1)) / (2 |^ n)) ) by A3, A7, A8;
uDyadic . d = [{(uDyadic . (i / (2 |^ n)))},{(uDyadic . ((i + 1) / (2 |^ n)))}] by A5, Def5;
then ( L_ (uDyadic . d) = {(uDyadic . (i / (2 |^ n)))} & R_ (uDyadic . d) = {(uDyadic . ((i + 1) / (2 |^ n)))} ) ;
hence - (uDyadic . d) = [(-- {(uDyadic . ((i + 1) / (2 |^ n)))}),(-- {(uDyadic . (i / (2 |^ n)))})] by SURREALR:7
.= [{(- (uDyadic . ((i + 1) / (2 |^ n))))},(-- {(uDyadic . (i / (2 |^ n)))})] by SURREALR:21
.= [{(- (uDyadic . ((i + 1) / (2 |^ n))))},{(- (uDyadic . (i / (2 |^ n))))}] by SURREALR:21
.= uDyadic . (- d) by A9, A6, Def5 ;
:: thesis: verum
end;
end;
end;
A10: for n being Nat holds S1[n] from NAT_1:sch 2(A1, A2);
consider i being Integer, n being Nat such that
A11: d = i / (2 |^ n) by Th18;
d in DYADIC n by A11, Def4;
hence uDyadic . (- d) = - (uDyadic . d) by A10; :: thesis: verum
end;

theorem Th28: :: SURREALN:28
for d being Dyadic st 0 <= d & d is not Integer holds
ex n, m, p being Nat st
( d = n + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) )
proof
let d be Dyadic; :: thesis: ( 0 <= d & d is not Integer implies ex n, m, p being Nat st
( d = n + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) ) )

assume A1: ( 0 <= d & d is not Integer ) ; :: thesis: ex n, m, p being Nat st
( d = n + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) )

then consider p being Nat, i being Integer such that
A2: d = ((2 * i) + 1) / (2 |^ (p + 1)) by Th23;
i >= 0
proof
assume i < 0 ; :: thesis: contradiction
then i + 1 <= 0 by INT_1:7;
then (i + 1) + i < 0 + 0 by XREAL_1:6;
hence contradiction by A1, A2; :: thesis: verum
end;
then reconsider i = i as Element of NAT by INT_1:3;
set DV = ((2 * i) + 1) div (2 |^ (p + 1));
set MD = ((2 * i) + 1) mod (2 |^ (p + 1));
A3: 2 |^ (p + 1) = 2 * (2 |^ p) by NEWTON:6;
A4: (2 * i) + 1 = ((((2 * i) + 1) div (2 |^ (p + 1))) * (2 |^ (p + 1))) + (((2 * i) + 1) mod (2 |^ (p + 1))) by INT_1:59;
then (2 * i) + 1 >= ((((2 * i) + 1) div (2 |^ (p + 1))) * (2 |^ p)) * 2 by A3, NAT_1:11;
then (2 * i) + 1 > ((((2 * i) + 1) div (2 |^ (p + 1))) * (2 |^ p)) * 2 by XXREAL_0:1;
then i >= (((2 * i) + 1) div (2 |^ (p + 1))) * (2 |^ p) by XREAL_1:68, NAT_1:13;
then reconsider M = i - ((((2 * i) + 1) div (2 |^ (p + 1))) * (2 |^ p)) as Nat by NAT_1:21;
take ((2 * i) + 1) div (2 |^ (p + 1)) ; :: thesis: ex m, p being Nat st
( d = (((2 * i) + 1) div (2 |^ (p + 1))) + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) )

take M ; :: thesis: ex p being Nat st
( d = (((2 * i) + 1) div (2 |^ (p + 1))) + (((2 * M) + 1) / (2 |^ (p + 1))) & (2 * M) + 1 < 2 |^ (p + 1) )

take p ; :: thesis: ( d = (((2 * i) + 1) div (2 |^ (p + 1))) + (((2 * M) + 1) / (2 |^ (p + 1))) & (2 * M) + 1 < 2 |^ (p + 1) )
A5: ((2 * i) + 1) mod (2 |^ (p + 1)) = ((2 * i) + 1) - ((((2 * i) + 1) div (2 |^ (p + 1))) * (2 |^ (p + 1))) by A4
.= (2 * M) + 1 by A3 ;
thus d = (((((2 * i) + 1) div (2 |^ (p + 1))) * (2 |^ (p + 1))) + (((2 * i) + 1) mod (2 |^ (p + 1)))) / (2 |^ (p + 1)) by INT_1:59, A2
.= (((2 * i) + 1) div (2 |^ (p + 1))) + (((2 * M) + 1) / (2 |^ (p + 1))) by A5, XCMPLX_1:113 ; :: thesis: (2 * M) + 1 < 2 |^ (p + 1)
thus (2 * M) + 1 < 2 |^ (p + 1) by A5, INT_1:58; :: thesis: verum
end;

theorem Th29: :: SURREALN:29
for d being Dyadic holds
( 0 <= d iff 0_No <= uDyadic . d )
proof
let d be Dyadic; :: thesis: ( 0 <= d iff 0_No <= uDyadic . d )
( 0_No = uInt . 0 & uInt . 0 = uDyadic . 0 ) by Def1, Def5;
hence ( 0 <= d iff 0_No <= uDyadic . d ) by Th24; :: thesis: verum
end;

theorem Th30: :: SURREALN:30
for d being Dyadic holds uDyadic . d in born_eq_set (uDyadic . d)
proof
let d be Dyadic; :: thesis: uDyadic . d in born_eq_set (uDyadic . d)
A1: - (- d) = d ;
per cases ( d is Integer or ( d < 0 & d is not Integer ) or ( 0 <= d & d is not Integer ) ) ;
suppose d is Integer ; :: thesis: uDyadic . d in born_eq_set (uDyadic . d)
then reconsider i = d as Integer ;
A2: uDyadic . d = uInt . i by Def5;
born (uInt . i) = born_eq (uInt . i) by SURREALO:48;
then uInt . i in Day (born_eq (uInt . i)) by SURREAL0:def 18;
hence uDyadic . d in born_eq_set (uDyadic . d) by A2, SURREALO:def 6; :: thesis: verum
end;
suppose A3: ( d < 0 & d is not Integer ) ; :: thesis: uDyadic . d in born_eq_set (uDyadic . d)
then ( 0 < - d & - d is not Integer ) by A1;
then consider n, m, p being Nat such that
A4: ( - d = n + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) ) by Th28;
set D = uDyadic . (- d);
A5: 0_No <= uDyadic . (- d) by A3, Th29;
A6: born (uDyadic . (- d)) = (n + (p + 1)) + 1 by A4, Th26;
A7: uDyadic . (- d) = - (uDyadic . d) by Th27;
then A8: born (uDyadic . (- d)) = born (uDyadic . d) by SURREALR:12;
for y being Surreal st y == uDyadic . (- d) holds
born (uDyadic . (- d)) c= born y
proof
let y be Surreal; :: thesis: ( y == uDyadic . (- d) implies born (uDyadic . (- d)) c= born y )
assume A9: ( y == uDyadic . (- d) & not born (uDyadic . (- d)) c= born y ) ; :: thesis: contradiction
A10: born y in Segm ((n + (p + 1)) + 1) by A6, A9, ORDINAL1:16;
reconsider By = born y as Nat by A6, A9;
By < (n + (p + 1)) + 1 by A10, NAT_1:44;
then By <= (n + p) + 1 by NAT_1:13;
then Segm By c= Segm ((n + p) + 1) by NAT_1:39;
then A11: ( y in Day By & Day By c= Day ((n + p) + 1) ) by SURREAL0:def 18, SURREAL0:35;
not y == uDyadic . ((n + p) + 1)
proof
assume y == uDyadic . ((n + p) + 1) ; :: thesis: contradiction
then ( - d <= (n + p) + 1 & (n + p) + 1 <= - d ) by Th24, A9, SURREALO:4;
then - d = n + (p + 1) by XXREAL_0:1;
hence contradiction by NAT_1:14, A4, XREAL_1:189; :: thesis: verum
end;
then consider x1, y1, p1 being Nat such that
A12: ( y == uDyadic . (x1 + (y1 / (2 |^ p1))) & y1 < 2 |^ p1 & x1 + p1 < (n + p) + 1 ) by A5, A9, SURREALO:4, A11, Th25;
( - d <= x1 + (y1 / (2 |^ p1)) & x1 + (y1 / (2 |^ p1)) <= - d ) by Th24, A9, A12, SURREALO:4;
then A13: n + (((2 * m) + 1) / (2 |^ (p + 1))) = x1 + (y1 / (2 |^ p1)) by A4, XXREAL_0:1;
( 0 <= ((2 * m) + 1) / (2 |^ (p + 1)) & ((2 * m) + 1) / (2 |^ (p + 1)) < 1 & 0 <= y1 / (2 |^ p1) & y1 / (2 |^ p1) < 1 ) by A4, A12, XREAL_1:191;
then ( n + 0 <= n + (((2 * m) + 1) / (2 |^ (p + 1))) & n + (((2 * m) + 1) / (2 |^ (p + 1))) < n + 1 & x1 + 0 <= x1 + (y1 / (2 |^ p1)) & x1 + (y1 / (2 |^ p1)) < x1 + 1 ) by XREAL_1:6;
then ( n < x1 + 1 & x1 < n + 1 ) by A13, XXREAL_0:2;
then ( n <= x1 & x1 <= n ) by NAT_1:13;
then A14: x1 = n by XXREAL_0:1;
x1 + p1 < n + (p + 1) by A12;
then p1 < p + 1 by A14, XREAL_1:6;
then p1 <= p by NAT_1:13;
then reconsider P = p - p1 as Nat by NAT_1:21;
p = p1 + P ;
then A15: ( 2 |^ p = (2 |^ p1) * (2 |^ P) & 2 |^ (p + 1) = 2 * (2 |^ p) ) by NEWTON:6, NEWTON:8;
((2 * m) + 1) * (2 |^ p1) = y1 * (2 |^ (p + 1)) by A13, A14, XCMPLX_1:95
.= ((y1 * (2 |^ P)) * 2) * (2 |^ p1) by A15 ;
hence contradiction by XCMPLX_1:5; :: thesis: verum
end;
then ( born_eq (uDyadic . d) = born_eq (uDyadic . (- d)) & born_eq (uDyadic . (- d)) = born (uDyadic . (- d)) ) by A7, SURREALO:def 5, SURREALR:13;
then uDyadic . d in Day (born_eq (uDyadic . d)) by A8, SURREAL0:def 18;
hence uDyadic . d in born_eq_set (uDyadic . d) by SURREALO:def 6; :: thesis: verum
end;
suppose A16: ( 0 <= d & d is not Integer ) ; :: thesis: uDyadic . d in born_eq_set (uDyadic . d)
then consider n, m, p being Nat such that
A17: ( d = n + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) ) by Th28;
set D = uDyadic . d;
A18: 0_No <= uDyadic . d by A16, Th29;
A19: born (uDyadic . d) = (n + (p + 1)) + 1 by A17, Th26;
for y being Surreal st y == uDyadic . d holds
born (uDyadic . d) c= born y
proof
let y be Surreal; :: thesis: ( y == uDyadic . d implies born (uDyadic . d) c= born y )
assume A20: ( y == uDyadic . d & not born (uDyadic . d) c= born y ) ; :: thesis: contradiction
A21: born y in Segm ((n + (p + 1)) + 1) by A19, A20, ORDINAL1:16;
reconsider By = born y as Nat by A19, A20;
By < (n + (p + 1)) + 1 by A21, NAT_1:44;
then By <= (n + p) + 1 by NAT_1:13;
then Segm By c= Segm ((n + p) + 1) by NAT_1:39;
then A22: ( y in Day By & Day By c= Day ((n + p) + 1) ) by SURREAL0:def 18, SURREAL0:35;
not y == uDyadic . ((n + p) + 1)
proof
assume y == uDyadic . ((n + p) + 1) ; :: thesis: contradiction
then ( d <= (n + p) + 1 & (n + p) + 1 <= d ) by Th24, A20, SURREALO:4;
then d = n + (p + 1) by XXREAL_0:1;
hence contradiction by NAT_1:14, A17, XREAL_1:189; :: thesis: verum
end;
then consider x1, y1, p1 being Nat such that
A23: ( y == uDyadic . (x1 + (y1 / (2 |^ p1))) & y1 < 2 |^ p1 & x1 + p1 < (n + p) + 1 ) by A18, A20, SURREALO:4, A22, Th25;
( d <= x1 + (y1 / (2 |^ p1)) & x1 + (y1 / (2 |^ p1)) <= d ) by Th24, A20, A23, SURREALO:4;
then A24: n + (((2 * m) + 1) / (2 |^ (p + 1))) = x1 + (y1 / (2 |^ p1)) by A17, XXREAL_0:1;
( 0 <= ((2 * m) + 1) / (2 |^ (p + 1)) & ((2 * m) + 1) / (2 |^ (p + 1)) < 1 & 0 <= y1 / (2 |^ p1) & y1 / (2 |^ p1) < 1 ) by A17, A23, XREAL_1:191;
then ( n + 0 <= n + (((2 * m) + 1) / (2 |^ (p + 1))) & n + (((2 * m) + 1) / (2 |^ (p + 1))) < n + 1 & x1 + 0 <= x1 + (y1 / (2 |^ p1)) & x1 + (y1 / (2 |^ p1)) < x1 + 1 ) by XREAL_1:6;
then ( n < x1 + 1 & x1 < n + 1 ) by A24, XXREAL_0:2;
then ( n <= x1 & x1 <= n ) by NAT_1:13;
then A25: x1 = n by XXREAL_0:1;
x1 + p1 < n + (p + 1) by A23;
then p1 < p + 1 by A25, XREAL_1:6;
then p1 <= p by NAT_1:13;
then reconsider P = p - p1 as Nat by NAT_1:21;
p = p1 + P ;
then A26: ( 2 |^ p = (2 |^ p1) * (2 |^ P) & 2 |^ (p + 1) = 2 * (2 |^ p) ) by NEWTON:6, NEWTON:8;
((2 * m) + 1) * (2 |^ p1) = y1 * (2 |^ (p + 1)) by A24, A25, XCMPLX_1:95
.= ((y1 * (2 |^ P)) * 2) * (2 |^ p1) by A26 ;
hence contradiction by XCMPLX_1:5; :: thesis: verum
end;
then born_eq (uDyadic . d) = born (uDyadic . d) by SURREALO:def 5;
then uDyadic . d in Day (born_eq (uDyadic . d)) by SURREAL0:def 18;
hence uDyadic . d in born_eq_set (uDyadic . d) by SURREALO:def 6; :: thesis: verum
end;
end;
end;

theorem Th31: :: SURREALN:31
for x being Surreal st born x is finite & (card (L_ x)) (+) (card (R_ x)) c= 1 holds
ex i being Integer st x == uInt . i
proof
let x be Surreal; :: thesis: ( born x is finite & (card (L_ x)) (+) (card (R_ x)) c= 1 implies ex i being Integer st x == uInt . i )
assume A1: ( born x is finite & (card (L_ x)) (+) (card (R_ x)) c= 1 ) ; :: thesis: ex i being Integer st x == uInt . i
A2: born x = born (- x) by SURREALR:12;
per cases ( (card (L_ x)) (+) (card (R_ x)) = 1 or (card (L_ x)) (+) (card (R_ x)) <> 1 ) ;
suppose (card (L_ x)) (+) (card (R_ x)) = 1 ; :: thesis: ex i being Integer st x == uInt . i
then consider y being Surreal such that
A3: ( x = [{},{y}] or x = [{y},{}] ) by SURREALO:47;
per cases ( x = [{},{y}] or x = [{y},{}] ) by A3;
suppose x = [{},{y}] ; :: thesis: ex i being Integer st x == uInt . i
then ( -- (R_ x) = -- {y} & -- {y} = {(- y)} & -- (L_ x) = -- {} & -- {} = {} ) by SURREALR:21, SURREALR:22;
then A4: - x = [{(- y)},{}] by SURREALR:7;
per cases ( - y < 0_No or 0_No <= - y ) ;
suppose - y < 0_No ; :: thesis: ex i being Integer st x == uInt . i
then - x == 0_No by A4, Th16;
then ( x = - (- x) & - (- x) == 0_No & 0_No = uInt . 0 ) by Def1, SURREALR:23, SURREALR:10;
hence ex i being Integer st x == uInt . i ; :: thesis: verum
end;
suppose 0_No <= - y ; :: thesis: ex i being Integer st x == uInt . i
then consider n being Nat such that
A5: ( - x == uInt . (n + 1) & uInt . n <= - y & - y < uInt . (n + 1) & n in born x ) by A4, A1, A2, Th17;
( x = - (- x) & - (- x) == - (uInt . (n + 1)) & - (uInt . (n + 1)) = uInt . (- (n + 1)) ) by A5, SURREALR:10, Th12;
hence ex i being Integer st x == uInt . i ; :: thesis: verum
end;
end;
end;
suppose A6: x = [{y},{}] ; :: thesis: ex i being Integer st x == uInt . i
per cases ( y < 0_No or 0_No <= y ) ;
suppose y < 0_No ; :: thesis: ex i being Integer st x == uInt . i
then ( x == 0_No & 0_No = uInt . 0 ) by Def1, A6, Th16;
hence ex i being Integer st x == uInt . i ; :: thesis: verum
end;
suppose 0_No <= y ; :: thesis: ex i being Integer st x == uInt . i
then ex n being Nat st
( x == uInt . (n + 1) & uInt . n <= y & y < uInt . (n + 1) & n in born x )
by A6, A1, Th17;
hence ex i being Integer st x == uInt . i ; :: thesis: verum
end;
end;
end;
end;
end;
suppose (card (L_ x)) (+) (card (R_ x)) <> 1 ; :: thesis: ex i being Integer st x == uInt . i
then ( (card (L_ x)) (+) (card (R_ x)) in 1 & 1 = succ 0 ) by A1, XBOOLE_0:def 8, ORDINAL1:11;
then (card (L_ x)) (+) (card (R_ x)) = 0 ;
then x = 0_No by SURREALO:46;
then x = uInt . 0 by Def1;
hence ex i being Integer st x == uInt . i ; :: thesis: verum
end;
end;
end;

theorem Th32: :: SURREALN:32
for x1, x2, y1, y2, p1, p2 being Nat st x1 + (y1 / (2 |^ p1)) = x2 + (y2 / (2 |^ p2)) & y1 < 2 |^ p1 & y2 < 2 |^ p2 holds
x1 = x2
proof
let x1, x2, y1, y2, p1, p2 be Nat; :: thesis: ( x1 + (y1 / (2 |^ p1)) = x2 + (y2 / (2 |^ p2)) & y1 < 2 |^ p1 & y2 < 2 |^ p2 implies x1 = x2 )
assume A1: ( x1 + (y1 / (2 |^ p1)) = x2 + (y2 / (2 |^ p2)) & y1 < 2 |^ p1 & y2 < 2 |^ p2 ) ; :: thesis: x1 = x2
( 0 <= y1 / (2 |^ p1) & y1 / (2 |^ p1) < 1 & 0 <= y2 / (2 |^ p2) & y2 / (2 |^ p2) < 1 ) by A1, XREAL_1:189;
then ( x1 + 0 <= x1 + (y1 / (2 |^ p1)) & x1 + (y1 / (2 |^ p1)) < x1 + 1 & x2 + 0 <= x2 + (y2 / (2 |^ p2)) & x2 + (y2 / (2 |^ p2)) < x2 + 1 ) by XREAL_1:6;
then ( x1 < x2 + 1 & x2 < x1 + 1 ) by A1, XXREAL_0:2;
then ( x1 <= x2 & x2 <= x1 ) by NAT_1:13;
hence x1 = x2 by XXREAL_0:1; :: thesis: verum
end;

theorem Th33: :: SURREALN:33
for x1, x2, y1, y2, p1, p2 being Nat st x1 + (y1 / (2 |^ p1)) < x2 + (y2 / (2 |^ p2)) & y1 < 2 |^ p1 & y2 < 2 |^ p2 holds
x1 <= x2
proof
let x1, x2, y1, y2, p1, p2 be Nat; :: thesis: ( x1 + (y1 / (2 |^ p1)) < x2 + (y2 / (2 |^ p2)) & y1 < 2 |^ p1 & y2 < 2 |^ p2 implies x1 <= x2 )
assume that
A1: ( x1 + (y1 / (2 |^ p1)) < x2 + (y2 / (2 |^ p2)) & y1 < 2 |^ p1 & y2 < 2 |^ p2 ) and
A2: x2 < x1 ; :: thesis: contradiction
A3: x2 + 1 <= x1 by A2, NAT_1:13;
( 0 <= y1 / (2 |^ p1) & y2 / (2 |^ p2) < 1 ) by A1, XREAL_1:189;
then A4: ( x1 + 0 <= x1 + (y1 / (2 |^ p1)) & x2 + (y2 / (2 |^ p2)) < x2 + 1 ) by XREAL_1:6;
then x2 + (y2 / (2 |^ p2)) < x1 by A3, XXREAL_0:2;
hence contradiction by A4, A1, XXREAL_0:2; :: thesis: verum
end;

theorem Th34: :: SURREALN:34
for x1, x2, p1, p2 being Nat st ((2 * x1) + 1) / (2 |^ p1) = x2 / (2 |^ p2) holds
p1 <= p2
proof
let x1, x2, p1, p2 be Nat; :: thesis: ( ((2 * x1) + 1) / (2 |^ p1) = x2 / (2 |^ p2) implies p1 <= p2 )
assume A1: ((2 * x1) + 1) / (2 |^ p1) = x2 / (2 |^ p2) ; :: thesis: p1 <= p2
assume p2 < p1 ; :: thesis: contradiction
then p2 + 1 <= p1 by NAT_1:13;
then reconsider P = p1 - (p2 + 1) as Nat by NAT_1:21;
p1 = P + (p2 + 1) ;
then ( 2 |^ p1 = (2 |^ P) * (2 |^ (p2 + 1)) & 2 |^ (p2 + 1) = 2 * (2 |^ p2) ) by NEWTON:6, NEWTON:8;
then ( ((2 * x1) + 1) * (2 |^ p2) = x2 * ((2 |^ P) * (2 * (2 |^ p2))) & x2 * ((2 |^ P) * (2 * (2 |^ p2))) = ((x2 * (2 |^ P)) * 2) * (2 |^ p2) ) by A1, XCMPLX_1:95;
hence contradiction by XCMPLX_1:5; :: thesis: verum
end;

theorem Th35: :: SURREALN:35
for x being Surreal
for n being Nat st x in Day n holds
ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )
proof
let x be Surreal; :: thesis: for n being Nat st x in Day n holds
ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )

let n be Nat; :: thesis: ( x in Day n implies ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n ) )

assume A1: x in Day n ; :: thesis: ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )

then A2: born x c= n by SURREAL0:def 18;
per cases ( ex i being Integer st x == uDyadic . i or for i being Integer holds not x == uDyadic . i ) ;
suppose ex i being Integer st x == uDyadic . i ; :: thesis: ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )

then consider i being Integer such that
A3: x == uDyadic . i ;
take i ; :: thesis: ( x == uDyadic . i & uDyadic . i in Day n )
born_eq_set x = born_eq_set (uDyadic . i) by A3, SURREALO:34;
then uDyadic . i in born_eq_set x by Th30;
then uDyadic . i in Day (born_eq x) by SURREALO:def 6;
then ( born (uDyadic . i) c= born_eq x & born_eq x c= born x ) by SURREAL0:def 18, SURREALO:def 5;
then born (uDyadic . i) c= born x by XBOOLE_1:1;
then born (uDyadic . i) c= n by A2, XBOOLE_1:1;
then ( uDyadic . i in Day (born (uDyadic . i)) & Day (born (uDyadic . i)) c= Day n ) by SURREAL0:def 18, SURREAL0:35;
hence ( x == uDyadic . i & uDyadic . i in Day n ) by A3; :: thesis: verum
end;
suppose A4: for i being Integer holds not x == uDyadic . i ; :: thesis: ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )

per cases ( 0_No <= x or x < 0_No ) ;
suppose A5: 0_No <= x ; :: thesis: ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )

not x == uDyadic . n by A4;
then consider x1, y1, p1 being Nat such that
A6: ( x == uDyadic . (x1 + (y1 / (2 |^ p1))) & y1 < 2 |^ p1 & x1 + p1 < n ) by A1, A5, Th25;
x1 + (y1 / (2 |^ p1)) is not Integer by A6, A4;
then consider n2, m2, p2 being Nat such that
A7: ( x1 + (y1 / (2 |^ p1)) = n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))) & (2 * m2) + 1 < 2 |^ (p2 + 1) ) by Th28;
take d = n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))); :: thesis: ( x == uDyadic . d & uDyadic . d in Day n )
A8: x1 = n2 by A6, A7, Th32;
then A9: n2 + (p2 + 1) <= n2 + p1 by Th34, A7, XREAL_1:6;
n2 + (p2 + 1) < n by A6, A8, A9, XXREAL_0:2;
then (n2 + (p2 + 1)) + 1 <= n by NAT_1:13;
then Segm ((n2 + (p2 + 1)) + 1) c= Segm n by NAT_1:39;
then A10: Day ((n2 + (p2 + 1)) + 1) c= Day n by SURREAL0:35;
born (uDyadic . d) = (n2 + (p2 + 1)) + 1 by Th26, A7;
then uDyadic . d in Day ((n2 + (p2 + 1)) + 1) by SURREAL0:def 18;
hence ( x == uDyadic . d & uDyadic . d in Day n ) by A10, A6, A7; :: thesis: verum
end;
suppose x < 0_No ; :: thesis: ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )

then A11: ( 0_No = - 0_No & - 0_No <= - x ) by SURREALR:10;
( born (- x) = born x & born x c= n ) by SURREAL0:def 18, A1, SURREALR:12;
then A12: ( - x in Day (born x) & Day (born x) c= Day n ) by SURREAL0:def 18, SURREAL0:35;
not - x == uDyadic . n
proof
assume - x == uDyadic . n ; :: thesis: contradiction
then ( - (- x) == - (uDyadic . n) & - (uDyadic . n) = uDyadic . (- n) ) by SURREALR:10, Th27;
hence contradiction by A4; :: thesis: verum
end;
then consider x1, y1, p1 being Nat such that
A13: ( - x == uDyadic . (x1 + (y1 / (2 |^ p1))) & y1 < 2 |^ p1 & x1 + p1 < n ) by A12, A11, Th25;
- (- x) == - (uDyadic . (x1 + (y1 / (2 |^ p1)))) by A13, SURREALR:10;
then x == uDyadic . (- (x1 + (y1 / (2 |^ p1)))) by Th27;
then - (- (x1 + (y1 / (2 |^ p1)))) is not Integer by A4;
then consider n2, m2, p2 being Nat such that
A14: ( x1 + (y1 / (2 |^ p1)) = n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))) & (2 * m2) + 1 < 2 |^ (p2 + 1) ) by Th28;
set d = n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1)));
A15: ( x = - (- x) & - (- x) == - (uDyadic . (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))))) & - (uDyadic . (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))))) = uDyadic . (- (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))))) ) by A13, A14, SURREALR:10, Th27;
A16: x1 = n2 by A13, A14, Th32;
then A17: n2 + (p2 + 1) <= n2 + p1 by A14, Th34, XREAL_1:6;
n2 + (p2 + 1) < n by A13, A16, A17, XXREAL_0:2;
then (n2 + (p2 + 1)) + 1 <= n by NAT_1:13;
then Segm ((n2 + (p2 + 1)) + 1) c= Segm n by NAT_1:39;
then A18: Day ((n2 + (p2 + 1)) + 1) c= Day n by SURREAL0:35;
( born (uDyadic . (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))))) = born (- (uDyadic . (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1)))))) & born (- (uDyadic . (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1)))))) = born (uDyadic . (- (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1)))))) ) by SURREALR:12, Th27;
then born (uDyadic . (- (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1)))))) = (n2 + (p2 + 1)) + 1 by Th26, A14;
then uDyadic . (- (n2 + (((2 * m2) + 1) / (2 |^ (p2 + 1))))) in Day ((n2 + (p2 + 1)) + 1) by SURREAL0:def 18;
hence ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day n )
by A15, A18; :: thesis: verum
end;
end;
end;
end;
end;

Lm6: for d being Dyadic st d >= 0 holds
ex n being Nat st uDyadic . d in Day n

proof
let d be Dyadic; :: thesis: ( d >= 0 implies ex n being Nat st uDyadic . d in Day n )
assume A1: d >= 0 ; :: thesis: ex n being Nat st uDyadic . d in Day n
per cases ( d is Integer or not d is Integer ) ;
suppose d is Integer ; :: thesis: ex n being Nat st uDyadic . d in Day n
then reconsider n = d as Element of NAT by A1, INT_1:3;
( uDyadic . d = uInt . n & uInt . n in Day n ) by Def5, Th1;
hence ex n being Nat st uDyadic . d in Day n ; :: thesis: verum
end;
suppose d is not Integer ; :: thesis: ex n being Nat st uDyadic . d in Day n
then consider n, m, p being Nat such that
A2: ( d = n + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) ) by A1, Th28;
born (uDyadic . d) = (n + (p + 1)) + 1 by A2, Th26;
then uDyadic . d in Day ((n + (p + 1)) + 1) by SURREAL0:def 18;
hence ex n being Nat st uDyadic . d in Day n ; :: thesis: verum
end;
end;
end;

theorem Th36: :: SURREALN:36
for d being Dyadic ex n being Nat st uDyadic . d in Day n
proof
let d be Dyadic; :: thesis: ex n being Nat st uDyadic . d in Day n
per cases ( d >= 0 or d < 0 ) ;
suppose d >= 0 ; :: thesis: ex n being Nat st uDyadic . d in Day n
hence ex n being Nat st uDyadic . d in Day n by Lm6; :: thesis: verum
end;
suppose d < 0 ; :: thesis: ex n being Nat st uDyadic . d in Day n
then consider n being Nat such that
A1: uDyadic . (- d) in Day n by Lm6;
take n ; :: thesis: uDyadic . d in Day n
uDyadic . (- d) = - (uDyadic . d) by Th27;
then - (- (uDyadic . d)) in Day n by A1, SURREALR:11;
hence uDyadic . d in Day n ; :: thesis: verum
end;
end;
end;

registration
let d be Dyadic;
cluster uDyadic . d -> uniq-surreal ;
coherence
uDyadic . d is uniq-surreal
proof
defpred S1[ Nat] means ( ( for d being Dyadic st uDyadic . d in Day d holds
uDyadic . d is uniq-surreal ) & ( for x being Surreal st x in Day d & x is uniq-surreal holds
- x is uniq-surreal ) );
A1: S1[ 0 ] by SURREALR:23, SURREAL0:2, TARSKI:def 1;
A2: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A3: S1[n] ; :: thesis: S1[n + 1]
set n1 = n + 1;
thus A4: for d being Dyadic st uDyadic . d in Day (n + 1) holds
uDyadic . d is uniq-surreal
:: thesis: for x being Surreal st x in Day (n + 1) & x is uniq-surreal holds
- x is uniq-surreal
proof
A5: for d being Dyadic st 0 <= d & d is not Integer & uDyadic . d in (Day (n + 1)) \ (Day n) holds
( ( for z being Surreal st z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z holds
(card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) ) & uDyadic . d in born_eq_set (uDyadic . d) & (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) is uniq-surreal-membered )
proof
let d be Dyadic; :: thesis: ( 0 <= d & d is not Integer & uDyadic . d in (Day (n + 1)) \ (Day n) implies ( ( for z being Surreal st z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z holds
(card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) ) & uDyadic . d in born_eq_set (uDyadic . d) & (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) is uniq-surreal-membered ) )

set D = uDyadic . d;
assume that
A6: ( 0 <= d & d is not Integer ) and
A7: uDyadic . d in (Day (n + 1)) \ (Day n) ; :: thesis: ( ( for z being Surreal st z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z holds
(card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) ) & uDyadic . d in born_eq_set (uDyadic . d) & (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) is uniq-surreal-membered )

A8: ( uDyadic . d in Day (n + 1) & not uDyadic . d in Day n ) by A7, XBOOLE_0:def 5;
not born (uDyadic . d) c= n
proof
assume born (uDyadic . d) c= n ; :: thesis: contradiction
then ( uDyadic . d in Day (born (uDyadic . d)) & Day (born (uDyadic . d)) c= Day n ) by SURREAL0:def 18, SURREAL0:35;
hence contradiction by A7, XBOOLE_0:def 5; :: thesis: verum
end;
then A9: ( Segm (n + 1) = succ (Segm n) & succ (Segm n) c= born (uDyadic . d) & born (uDyadic . d) c= n + 1 ) by A8, ORDINAL1:16, ORDINAL1:21, SURREAL0:def 18, NAT_1:38;
consider k, m, p being Nat such that
A10: ( d = k + (((2 * m) + 1) / (2 |^ (p + 1))) & (2 * m) + 1 < 2 |^ (p + 1) ) by A6, Th28;
set p1 = p + 1;
A11: 2 |^ (p + 1) = 2 * (2 |^ p) by NEWTON:6;
then (k * (2 |^ (p + 1))) + ((2 * m) + 1) = (2 * ((k * (2 |^ p)) + m)) + 1 ;
then d = ((2 * ((k * (2 |^ p)) + m)) + 1) / (2 |^ (p + 1)) by A10, XCMPLX_1:113;
then A12: uDyadic . d = [{(uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)))},{(uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)))}] by Def5;
then ( card (L_ (uDyadic . d)) = 1 & card (R_ (uDyadic . d)) = 1 ) by CARD_1:30;
then A13: (card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) = 1 + 1 by ORDINAL7:76;
A14: born (uDyadic . d) = (k + (p + 1)) + 1 by A10, Th26;
A15: m < 2 |^ p by XREAL_1:64, NAT_1:13, A11, A10;
A16: ((k * (2 |^ p)) + m) / (2 |^ p) = k + (m / (2 |^ p)) by XCMPLX_1:113;
A17: ( (((k * (2 |^ p)) + m) + 1) / (2 |^ p) = ((k * (2 |^ p)) + (m + 1)) / (2 |^ p) & ((k * (2 |^ p)) + (m + 1)) / (2 |^ p) = k + ((m + 1) / (2 |^ p)) ) by XCMPLX_1:113;
set sD1 = uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p));
set sD2 = uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p));
A18: 0_No <= uDyadic . d by A6, Th29;
A19: for y being Surreal st y == uDyadic . d holds
born (uDyadic . d) c= born y
proof
let y be Surreal; :: thesis: ( y == uDyadic . d implies born (uDyadic . d) c= born y )
assume A20: ( y == uDyadic . d & not born (uDyadic . d) c= born y ) ; :: thesis: contradiction
A21: born y in Segm ((k + (p + 1)) + 1) by A14, A20, ORDINAL1:16;
reconsider By = born y as Nat by A14, A20;
By < (k + (p + 1)) + 1 by A21, NAT_1:44;
then By <= k + (p + 1) by NAT_1:13;
then Segm By c= Segm (k + (p + 1)) by NAT_1:39;
then A22: ( y in Day By & Day By c= Day (k + (p + 1)) ) by SURREAL0:def 18, SURREAL0:35;
A23: not y == uDyadic . (k + (p + 1))
proof
assume y == uDyadic . (k + (p + 1)) ; :: thesis: contradiction
then ( d <= k + (p + 1) & k + (p + 1) <= d ) by Th24, A20, SURREALO:4;
hence contradiction by A6, XXREAL_0:1; :: thesis: verum
end;
consider x2, y2, p2 being Nat such that
A24: ( y == uDyadic . (x2 + (y2 / (2 |^ p2))) & y2 < 2 |^ p2 & x2 + p2 < k + (p + 1) ) by Th25, A22, A20, A18, SURREALO:4, A23;
( d <= x2 + (y2 / (2 |^ p2)) & x2 + (y2 / (2 |^ p2)) <= d ) by Th24, A20, A24, SURREALO:4;
then A25: k + (((2 * m) + 1) / (2 |^ (p + 1))) = x2 + (y2 / (2 |^ p2)) by A10, XXREAL_0:1;
then k = x2 by Th32, A10, A24;
hence contradiction by A25, Th34, A24, XREAL_1:6; :: thesis: verum
end;
then A26: born (uDyadic . d) = born_eq (uDyadic . d) by SURREALO:def 5;
then A27: uDyadic . d in Day (born_eq (uDyadic . d)) by SURREAL0:def 18;
( uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) in L_ (uDyadic . d) & uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) in R_ (uDyadic . d) ) by TARSKI:def 1, A12;
then ( uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) in (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) & uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) in (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) ) by XBOOLE_0:def 3;
then A28: ( born (uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p))) in born (uDyadic . d) & born (uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p))) in born (uDyadic . d) ) by SURREALO:1;
( uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) in Day (born (uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)))) & Day (born (uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)))) c= Day n & uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) in Day (born (uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)))) & Day (born (uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)))) c= Day n ) by SURREAL0:def 18, SURREAL0:35, A28, A9, ORDINAL1:22;
then A29: ( uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) is uniq-surreal & uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) is uniq-surreal ) by A3;
for z being Surreal st z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z holds
(card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z))
proof
let z be Surreal; :: thesis: ( z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z implies (card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) )
assume that
A30: ( z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z ) and
A31: not (card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) ; :: thesis: contradiction
A32: (card (L_ z)) (+) (card (R_ z)) c= (card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) by A31, ORDINAL1:16;
A33: z == uDyadic . d by A30, SURREALO:def 6;
z in Day (born_eq (uDyadic . d)) by A30, SURREALO:def 6;
then A34: ( born z c= born_eq (uDyadic . d) & born_eq (uDyadic . d) c= born (uDyadic . d) ) by SURREAL0:def 18, SURREALO:def 5;
then A35: born z c= Segm ((k + (p + 1)) + 1) by A14, XBOOLE_1:1;
0_No <= uDyadic . d by A6, Th29;
then A36: 0_No <= z by A33, SURREALO:4;
per cases ( (card (L_ z)) (+) (card (R_ z)) <> 2 or (card (L_ z)) (+) (card (R_ z)) = 2 ) ;
suppose (card (L_ z)) (+) (card (R_ z)) <> 2 ; :: thesis: contradiction
then (card (L_ z)) (+) (card (R_ z)) in succ 1 by ORDINAL1:11, A32, A13, XBOOLE_0:def 8;
then consider i being Integer such that
A37: z == uInt . i by A34, A14, Th31, ORDINAL1:22;
( uDyadic . d == uInt . i & uInt . i = uDyadic . i ) by A33, A37, SURREALO:4, Def5;
then ( d <= i & i <= d ) by Th24;
hence contradiction by XXREAL_0:1, A6; :: thesis: verum
end;
suppose A38: (card (L_ z)) (+) (card (R_ z)) = 2 ; :: thesis: contradiction
( L_ z is finite & R_ z is finite ) by A34, A14, SURREALO:8;
then reconsider cz1 = card (L_ z), cz2 = card (R_ z) as Nat ;
A39: cz1 + cz2 = 2 by A38, ORDINAL7:76;
A40: cz1 = 1
proof
assume A41: cz1 <> 1 ; :: thesis: contradiction
per cases ( cz1 <> 0 or card (L_ z) = 0 ) ;
suppose A42: cz1 <> 0 ; :: thesis: contradiction
then 0 + 1 <= cz1 by NAT_1:13;
then 1 < cz1 by A41, XXREAL_0:1;
then ( 1 + 1 <= cz1 & cz1 <= cz1 + cz2 ) by NAT_1:13, NAT_1:11;
then A43: cz1 = 2 by A39, XXREAL_0:1;
( not L_ z is empty & L_ z is surreal-membered & L_ z is finite ) by A42;
then consider Min, Max being Surreal such that
A44: ( Min in L_ z & Max in L_ z & ( for x being Surreal st x in L_ z holds
( Min <= x & x <= Max ) ) )
by SURREALO:12;
A45: for x being Surreal st x in L_ z holds
x <= Max
by A44;
then reconsider zM = [{Max},(R_ z)] as Surreal by A44, SURREALO:23;
A46: born zM c= born z by A44, A45, SURREALO:23;
A47: zM == z by A44, SURREALO:23, A45;
( (card (L_ zM)) (+) (card (R_ zM)) = 1 (+) 0 & 1 (+) 0 = 1 ) by A39, A43, CARD_1:30;
then consider i being Integer such that
A48: zM == uInt . i by A46, A34, A14, Th31;
z == uDyadic . d by A30, SURREALO:def 6;
then uDyadic . d == zM by A47, SURREALO:4;
then ( uDyadic . d == uInt . i & uInt . i = uDyadic . i ) by A48, SURREALO:4, Def5;
then ( d <= i & i <= d ) by Th24;
hence contradiction by A6, XXREAL_0:1; :: thesis: verum
end;
suppose A49: card (L_ z) = 0 ; :: thesis: contradiction
then ( not R_ z is empty & R_ z is surreal-membered & R_ z is finite ) by A38, ORDINAL7:69;
then consider Min, Max being Surreal such that
A50: ( Min in R_ z & Max in R_ z & ( for x being Surreal st x in R_ z holds
( Min <= x & x <= Max ) ) )
by SURREALO:12;
A51: for x being Surreal st x in R_ z holds
Min <= x
by A50;
then reconsider zM = [(L_ z),{Min}] as Surreal by A50, SURREALO:24;
A52: born zM c= born z by A50, A51, SURREALO:24;
A53: zM == z by A50, SURREALO:24, A51;
( (card (L_ zM)) (+) (card (R_ zM)) = 0 (+) 1 & 0 (+) 1 = 1 ) by CARD_1:30, A49;
then consider i being Integer such that
A54: zM == uInt . i by A52, A34, A14, Th31;
z == uDyadic . d by A30, SURREALO:def 6;
then uDyadic . d == zM by A53, SURREALO:4;
then ( uDyadic . d == uInt . i & uInt . i = uDyadic . i ) by A54, SURREALO:4, Def5;
then ( d <= i & i <= d ) by Th24;
hence contradiction by A6, XXREAL_0:1; :: thesis: verum
end;
end;
end;
then consider Z1 being object such that
A55: L_ z = {Z1} by CARD_2:42;
consider Z2 being object such that
A56: R_ z = {Z2} by A40, A39, CARD_2:42;
A57: ( Z1 in L_ z & Z2 in R_ z ) by A55, A56, TARSKI:def 1;
then reconsider Z1 = Z1, Z2 = Z2 as Surreal by SURREAL0:def 16;
A58: ( Z1 in (L_ z) \/ (R_ z) & Z2 in (L_ z) \/ (R_ z) ) by A57, XBOOLE_0:def 3;
then reconsider Z1 = Z1, Z2 = Z2 as uSurreal by A30;
A59: ( {Z1} << {(uDyadic . d)} & {(uDyadic . d)} << {Z2} ) by A33, A55, A56, SURREAL0:43;
( born Z1 in born z & born Z2 in born z ) by A58, SURREALO:1;
then ( born Z1 in Segm ((k + (p + 1)) + 1) & born Z2 in Segm ((k + (p + 1)) + 1) & Segm ((k + (p + 1)) + 1) = succ (Segm (k + (p + 1))) ) by A35, NAT_1:38;
then A60: ( Z1 in Day (born Z1) & Z2 in Day (born Z2) & Day (born Z1) c= Day (k + (p + 1)) & Day (born Z2) c= Day (k + (p + 1)) ) by ORDINAL1:22, SURREAL0:35, SURREAL0:def 18;
A61: ( born z = born_eq z & born_eq z = born_eq (uDyadic . d) ) by A30, SURREALO:35;
A62: not Z1 == uDyadic . (k + (p + 1))
proof
assume Z1 == uDyadic . (k + (p + 1)) ; :: thesis: contradiction
then uDyadic . (k + (p + 1)) < uDyadic . d by A59, SURREALO:21, SURREALO:4;
then ( p + 1 < ((2 * m) + 1) / (2 |^ (p + 1)) & ((2 * m) + 1) / (2 |^ (p + 1)) < 1 ) by A10, Th24, XREAL_1:6, XREAL_1:189;
then p + 1 < 1 by XXREAL_0:2;
hence contradiction by NAT_1:11; :: thesis: verum
end;
A63: {0_No} << R_ z by A36, SURREAL0:43;
0_No <= Z1
proof
assume A64: not 0_No <= Z1 ; :: thesis: contradiction
born 0_No = {} by SURREAL0:37;
then for x being Surreal st L_ z << {x} & {x} << R_ z holds
born 0_No c= born x
;
then z == 0_No by A63, A64, A55, SURREALO:21, SURREALO:16;
then ( uDyadic . d == 0_No & 0_No = uInt . 0 & uInt . 0 = uDyadic . 0 ) by A33, SURREALO:4, Def1, Def5;
then ( 0 <= d & d <= 0 ) by Th24;
hence contradiction by A6; :: thesis: verum
end;
then consider x3, y3, p3 being Nat such that
A65: ( Z1 == uDyadic . (x3 + (y3 / (2 |^ p3))) & y3 < 2 |^ p3 & x3 + p3 < k + (p + 1) ) by Th25, A60, A62;
A66: ( L_ (uDyadic . d) << {(uDyadic . d)} & {(uDyadic . d)} << R_ (uDyadic . d) ) by SURREALO:11;
A67: uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) == Z1
proof
assume not uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) == Z1 ; :: thesis: contradiction
per cases then ( uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) < Z1 or Z1 < uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) ) ;
suppose uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) < Z1 ; :: thesis: contradiction
then A68: ( uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) < uDyadic . (x3 + (y3 / (2 |^ p3))) & uDyadic . (x3 + (y3 / (2 |^ p3))) < uDyadic . d ) by A59, A65, SURREALO:4, SURREALO:21;
then ( k + (m / (2 |^ p)) < x3 + (y3 / (2 |^ p3)) & x3 + (y3 / (2 |^ p3)) < k + (((2 * m) + 1) / (2 |^ (p + 1))) ) by Th24, A10, A16;
then ( k <= x3 & x3 <= k ) by Th33, A65, A15, A10;
then A69: k = x3 by XXREAL_0:1;
then p3 < p + 1 by A65, XREAL_1:6;
then p3 <= p by NAT_1:13;
then reconsider P = p - p3 as Nat by NAT_1:21;
p = p3 + P ;
then 2 |^ p = (2 |^ p3) * (2 |^ P) by NEWTON:8;
then 2 |^ (p + 1) = (2 |^ p3) * (2 * (2 |^ P)) by A11;
then A70: y3 / (2 |^ p3) = (y3 * (2 * (2 |^ P))) / (2 |^ (p + 1)) by XCMPLX_1:91;
A71: m / (2 |^ p) = (2 * m) / (2 |^ (p + 1)) by A11, XCMPLX_1:91;
( (2 * m) / (2 |^ (p + 1)) < (y3 * (2 * (2 |^ P))) / (2 |^ (p + 1)) & (y3 * (2 * (2 |^ P))) / (2 |^ (p + 1)) < ((2 * m) + 1) / (2 |^ (p + 1)) ) by A70, A71, A68, A69, XREAL_1:6, Th24, A10, A16;
then ( 2 * m < y3 * (2 * (2 |^ P)) & y3 * (2 * (2 |^ P)) < (2 * m) + 1 ) by XREAL_1:72;
hence contradiction by NAT_1:13; :: thesis: verum
end;
suppose A72: Z1 < uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) ; :: thesis: contradiction
uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) <= uDyadic . d by A66, SURREALO:21, A12;
then uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) < Z2 by A59, SURREALO:21, SURREALO:4;
then ( L_ z << {(uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)))} & {(uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)))} << R_ z ) by A72, A55, A56, SURREALO:21;
then born z c= born (uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p))) by SURREALO:51, A61;
hence contradiction by A26, A61, A28, ORDINAL1:12; :: thesis: verum
end;
end;
end;
A73: uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) == Z2
proof
assume A74: not uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) == Z2 ; :: thesis: contradiction
A75: 0_No <= Z2 by A63, A56, SURREALO:21;
not Z2 == uDyadic . (k + (p + 1))
proof
assume A76: Z2 == uDyadic . (k + (p + 1)) ; :: thesis: contradiction
A77: k + p < (k + p) + 1 by NAT_1:13;
A78: p = 0
proof
assume p <> 0 ; :: thesis: contradiction
then ( ((2 * m) + 1) / (2 |^ (p + 1)) < 1 & 1 <= p ) by NAT_1:14, A10, XREAL_1:189;
then ((2 * m) + 1) / (2 |^ (p + 1)) < p by XXREAL_0:2;
then uDyadic . d <= uDyadic . (k + p) by Th24, A10, XREAL_1:6;
then ( Z1 < uDyadic . (k + p) & uDyadic . (k + p) < Z2 ) by A76, A77, SURREALO:4, SURREALO:21, A59, Th24;
then ( {Z1} << {(uDyadic . (k + p))} & {(uDyadic . (k + p))} << {Z2} ) by SURREALO:21;
then A79: ( born z c= born (uDyadic . (k + p)) & born (uDyadic . (k + p)) = born (uInt . (k + p)) & born (uInt . (k + p)) = k + p ) by Def5, A61, A55, A56, SURREALO:51, Th4;
Segm ((k + (p + 1)) + 1) c= Segm (k + p) by A61, A19, A14, A79, SURREALO:def 5;
then ( (k + p) + 2 = (k + (p + 1)) + 1 & (k + (p + 1)) + 1 <= (k + p) + 0 ) by NAT_1:39;
hence contradiction by XREAL_1:6; :: thesis: verum
end;
then (2 * m) + 1 < 1 + 1 by A10;
then A80: m = 0 by NAT_1:14, XREAL_1:6;
2 |^ p = 1 by A78, NEWTON:4;
hence contradiction by A80, A76, A78, A74; :: thesis: verum
end;
then consider x4, y4, p4 being Nat such that
A81: ( Z2 == uDyadic . (x4 + (y4 / (2 |^ p4))) & y4 < 2 |^ p4 & x4 + p4 < k + (p + 1) ) by Th25, A60, A75;
per cases ( Z2 < uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) or uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) < Z2 ) by A74;
suppose Z2 < uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) ; :: thesis: contradiction
then ( uDyadic . d < uDyadic . (x4 + (y4 / (2 |^ p4))) & uDyadic . (x4 + (y4 / (2 |^ p4))) < uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) ) by A59, SURREALO:21, A81, SURREALO:4;
then A82: ( k + (((2 * m) + 1) / (2 |^ (p + 1))) < x4 + (y4 / (2 |^ p4)) & x4 + (y4 / (2 |^ p4)) < k + ((m + 1) / (2 |^ p)) ) by Th24, A10, A17;
then k <= x4 by A10, A81, Th33;
then k + (p + 1) <= x4 + (p + 1) by XREAL_1:6;
then x4 + p4 < x4 + (p + 1) by A81, XXREAL_0:2;
then reconsider P = (p + 1) - p4 as Nat by NAT_1:21, XREAL_1:6;
p + 1 = p4 + P ;
then 2 |^ (p + 1) = (2 |^ p4) * (2 |^ P) by NEWTON:8;
then A83: y4 / (2 |^ p4) = (y4 * (2 |^ P)) / (2 |^ (p + 1)) by XCMPLX_1:91;
A84: ( k + (((2 * m) + 1) / (2 |^ (p + 1))) = ((k * (2 |^ (p + 1))) + ((2 * m) + 1)) / (2 |^ (p + 1)) & x4 + ((y4 * (2 |^ P)) / (2 |^ (p + 1))) = ((x4 * (2 |^ (p + 1))) + (y4 * (2 |^ P))) / (2 |^ (p + 1)) & k + ((2 * (m + 1)) / (2 |^ (p + 1))) = ((k * (2 |^ (p + 1))) + (2 * (m + 1))) / (2 |^ (p + 1)) ) by XCMPLX_1:113;
( ((k * (2 |^ (p + 1))) + ((2 * m) + 1)) / (2 |^ (p + 1)) < ((x4 * (2 |^ (p + 1))) + (y4 * (2 |^ P))) / (2 |^ (p + 1)) & ((x4 * (2 |^ (p + 1))) + (y4 * (2 |^ P))) / (2 |^ (p + 1)) < ((k * (2 |^ (p + 1))) + (2 * (m + 1))) / (2 |^ (p + 1)) ) by A82, A83, A84, A11, XCMPLX_1:91;
then ( (k * (2 |^ (p + 1))) + ((2 * m) + 1) < (x4 * (2 |^ (p + 1))) + (y4 * (2 |^ P)) & (x4 * (2 |^ (p + 1))) + (y4 * (2 |^ P)) < (k * (2 |^ (p + 1))) + (2 * (m + 1)) ) by XREAL_1:72;
then ((k * (2 |^ (p + 1))) + ((2 * m) + 1)) + 1 < (k * (2 |^ (p + 1))) + (2 * (m + 1)) by NAT_1:13;
hence contradiction ; :: thesis: verum
end;
suppose A85: uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) < Z2 ; :: thesis: contradiction
uDyadic . d <= uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) by A66, SURREALO:21, A12;
then Z1 < uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) by A59, SURREALO:21, SURREALO:4;
then ( L_ z << {(uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)))} & {(uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)))} << R_ z ) by A85, A55, A56, SURREALO:21;
then born z c= born (uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p))) by SURREALO:51, A61;
hence contradiction by A26, A61, A28, ORDINAL1:12; :: thesis: verum
end;
end;
end;
( uDyadic . (((k * (2 |^ p)) + m) / (2 |^ p)) = Z1 & uDyadic . ((((k * (2 |^ p)) + m) + 1) / (2 |^ p)) = Z2 ) by A67, A73, A29, SURREALO:50;
hence contradiction by A30, A12, A55, A56; :: thesis: verum
end;
end;
end;
hence ( ( for z being Surreal st z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z holds
(card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) ) & uDyadic . d in born_eq_set (uDyadic . d) & (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) is uniq-surreal-membered )
by A29, A12, A27, SURREALO:def 6; :: thesis: verum
end;
let d be Dyadic; :: thesis: ( uDyadic . d in Day (n + 1) implies uDyadic . d is uniq-surreal )
set D = uDyadic . d;
assume A86: uDyadic . d in Day (n + 1) ; :: thesis: uDyadic . d is uniq-surreal
per cases ( uDyadic . d in Day n or not uDyadic . d in Day n ) ;
suppose A87: not uDyadic . d in Day n ; :: thesis: uDyadic . d is uniq-surreal
not born (uDyadic . d) c= n
proof
assume born (uDyadic . d) c= n ; :: thesis: contradiction
then ( uDyadic . d in Day (born (uDyadic . d)) & Day (born (uDyadic . d)) c= Day n ) by SURREAL0:def 18, SURREAL0:35;
hence contradiction by A87; :: thesis: verum
end;
then A88: ( Segm (n + 1) = succ (Segm n) & succ (Segm n) c= born (uDyadic . d) & born (uDyadic . d) c= n + 1 ) by A86, ORDINAL1:16, ORDINAL1:21, SURREAL0:def 18, NAT_1:38;
then A89: born (uDyadic . d) = n + 1 by XBOOLE_0:def 10;
per cases ( d is Integer or ( 0 <= d & d is not Integer ) or ( not 0 <= d & d is not Integer ) ) ;
suppose d is Integer ; :: thesis: uDyadic . d is uniq-surreal
then reconsider i = d as Integer ;
uDyadic . d = uInt . i by Def5;
hence uDyadic . d is uniq-surreal ; :: thesis: verum
end;
suppose A90: ( 0 <= d & d is not Integer ) ; :: thesis: uDyadic . d is uniq-surreal
uDyadic . d in (Day (n + 1)) \ (Day n) by A87, A86, XBOOLE_0:def 5;
then ( ( for z being Surreal st z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z holds
(card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) ) & uDyadic . d in born_eq_set (uDyadic . d) & (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) is uniq-surreal-membered )
by A90, A5;
hence uDyadic . d is uniq-surreal by SURREALO:49; :: thesis: verum
end;
suppose A91: ( not 0 <= d & d is not Integer ) ; :: thesis: uDyadic . d is uniq-surreal
- (- d) = d ;
then A92: - d is not Integer by A91;
set E = uDyadic . (- d);
A93: uDyadic . (- d) = - (uDyadic . d) by Th27;
A94: uDyadic . (- d) in Day (n + 1) by A93, SURREALR:11, A86;
A95: - (uDyadic . (- d)) = uDyadic . d by A93;
then not uDyadic . (- d) in Day n by SURREALR:11, A87;
then uDyadic . (- d) in (Day (n + 1)) \ (Day n) by A94, XBOOLE_0:def 5;
then A96: ( ( for z being Surreal st z in born_eq_set (uDyadic . (- d)) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . (- d) <> z holds
(card (L_ (uDyadic . (- d)))) (+) (card (R_ (uDyadic . (- d)))) in (card (L_ z)) (+) (card (R_ z)) ) & uDyadic . (- d) in born_eq_set (uDyadic . (- d)) & (L_ (uDyadic . (- d))) \/ (R_ (uDyadic . (- d))) is uniq-surreal-membered )
by A92, A91, A5;
A97: for z being Surreal st z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z holds
(card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z))
proof
let z be Surreal; :: thesis: ( z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z implies (card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) )
assume A98: ( z in born_eq_set (uDyadic . d) & (L_ z) \/ (R_ z) is uniq-surreal-membered & uDyadic . d <> z ) ; :: thesis: (card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z))
set Z = - z;
A99: ( L_ (- (uDyadic . d)) = -- (R_ (uDyadic . d)) & R_ (- (uDyadic . d)) = -- (L_ (uDyadic . d)) ) by SURREALR:8;
A100: ( L_ (- z) = -- (R_ z) & R_ (- z) = -- (L_ z) ) by SURREALR:8;
A101: - z <> uDyadic . (- d) by A98, A95;
A102: (L_ (- z)) \/ (R_ (- z)) is uniq-surreal-membered
proof
let o be object ; :: according to SURREALO:def 12 :: thesis: ( not o in (L_ (- z)) \/ (R_ (- z)) or o is set )
assume o in (L_ (- z)) \/ (R_ (- z)) ; :: thesis: o is set
then o in -- ((L_ z) \/ (R_ z)) by A100, SURREALR:20;
then consider x being Surreal such that
A103: ( x in (L_ z) \/ (R_ z) & o = - x ) by SURREALR:def 4;
A104: x is uSurreal by A98, A103;
A105: Segm (n + 1) = succ (Segm n) by NAT_1:38;
( born z = born_eq z & born_eq z = born_eq (uDyadic . d) & born_eq (uDyadic . d) c= born (uDyadic . d) ) by A98, SURREALO:35, SURREALO:def 5;
then ( born x in born z & born z c= n + 1 ) by A103, A88, SURREALO:1, XBOOLE_0:def 10;
then ( x in Day (born x) & Day (born x) c= Day n ) by SURREAL0:def 18, SURREAL0:35, A105, ORDINAL1:22;
hence o is set by A103, A104, A3; :: thesis: verum
end;
A106: ( card (L_ (- z)) = card (R_ z) & card (R_ (- z)) = card (L_ z) ) by A100, SURREALR:17;
( card (L_ (uDyadic . (- d))) = card (R_ (uDyadic . d)) & card (R_ (uDyadic . (- d))) = card (L_ (uDyadic . d)) ) by A99, A93, SURREALR:17;
hence (card (L_ (uDyadic . d))) (+) (card (R_ (uDyadic . d))) in (card (L_ z)) (+) (card (R_ z)) by A102, A106, A96, A101, A98, A93, SURREALR:14; :: thesis: verum
end;
(L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) is uniq-surreal-membered
proof
A107: ( L_ (uDyadic . d) = -- (R_ (uDyadic . (- d))) & R_ (uDyadic . d) = -- (L_ (uDyadic . (- d))) ) by A95, SURREALR:8;
let o be object ; :: according to SURREALO:def 12 :: thesis: ( not o in (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) or o is set )
assume o in (L_ (uDyadic . d)) \/ (R_ (uDyadic . d)) ; :: thesis: o is set
then o in -- ((L_ (uDyadic . (- d))) \/ (R_ (uDyadic . (- d)))) by A107, SURREALR:20;
then consider x being Surreal such that
A108: ( x in (L_ (uDyadic . (- d))) \/ (R_ (uDyadic . (- d))) & o = - x ) by SURREALR:def 4;
A109: x is uSurreal by A96, A108;
A110: Segm (n + 1) = succ (Segm n) by NAT_1:38;
born (uDyadic . (- d)) = born (uDyadic . d) by A93, SURREALR:12;
then born x c= Segm n by A108, A89, SURREALO:1, A110, ORDINAL1:22;
then ( x in Day (born x) & Day (born x) c= Day n ) by SURREAL0:def 18, SURREAL0:35;
hence o is set by A108, A109, A3; :: thesis: verum
end;
hence uDyadic . d is uniq-surreal by SURREALO:49, A97, Th30; :: thesis: verum
end;
end;
end;
end;
end;
let x be Surreal; :: thesis: ( x in Day (n + 1) & x is uniq-surreal implies - x is uniq-surreal )
assume A111: ( x in Day (n + 1) & x is uniq-surreal ) ; :: thesis: - x is uniq-surreal
consider d being Dyadic such that
A112: ( x == uDyadic . d & uDyadic . d in Day (n + 1) ) by A111, Th35;
A113: uDyadic . (- d) = - (uDyadic . d) by Th27;
then A114: uDyadic . (- d) is uniq-surreal by A4, A112, SURREALR:11;
uDyadic . d is uniq-surreal by A112, A4;
hence - x is uniq-surreal by A113, A114, A112, A111, SURREALO:41; :: thesis: verum
end;
A115: for n being Nat holds S1[n] from NAT_1:sch 2(A1, A2);
consider n being Nat such that
A116: uDyadic . d in Day n by Th36;
thus uDyadic . d is uniq-surreal by A115, A116; :: thesis: verum
end;
end;

theorem Th37: :: SURREALN:37
for x being Surreal holds
( ( x is uSurreal & born x is finite ) iff ex d being Dyadic st x = uDyadic . d )
proof
let x be Surreal; :: thesis: ( ( x is uSurreal & born x is finite ) iff ex d being Dyadic st x = uDyadic . d )
hereby :: thesis: ( ex d being Dyadic st x = uDyadic . d implies ( x is uSurreal & born x is finite ) )
assume A1: ( x is uSurreal & born x is finite ) ; :: thesis: ex d being Dyadic st x = uDyadic . d
then reconsider b = born x as Nat ;
x in Day b by SURREAL0:def 18;
then ex d being Dyadic st
( x == uDyadic . d & uDyadic . d in Day b )
by Th35;
hence ex d being Dyadic st x = uDyadic . d by A1, SURREALO:50; :: thesis: verum
end;
given d being Dyadic such that A2: x = uDyadic . d ; :: thesis: ( x is uSurreal & born x is finite )
consider n being Nat such that
A3: uDyadic . d in Day n by Th36;
born (uDyadic . d) c= n by A3, SURREAL0:def 18;
hence ( x is uSurreal & born x is finite ) by A2; :: thesis: verum
end;

Lm7: for n, p being Nat
for x being Surreal st p > 0 holds
( [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] implies x == uDyadic . ((n + 1) / (2 |^ p)) ) )

proof
let n, p be Nat; :: thesis: for x being Surreal st p > 0 holds
( [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] implies x == uDyadic . ((n + 1) / (2 |^ p)) ) )

let x be Surreal; :: thesis: ( p > 0 implies ( [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] implies x == uDyadic . ((n + 1) / (2 |^ p)) ) ) )
assume A1: p > 0 ; :: thesis: ( [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] implies x == uDyadic . ((n + 1) / (2 |^ p)) ) )
reconsider P = p - 1 as Nat by A1, NAT_1:20;
set p1 = P + 1;
n + 0 < n + 2 by XREAL_1:6;
then n / (2 |^ p) < (n + 2) / (2 |^ p) by XREAL_1:74;
hence [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] is Surreal by SURREALO:22, Th24; :: thesis: ( x = [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] implies x == uDyadic . ((n + 1) / (2 |^ p)) )
assume A2: x = [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] ; :: thesis: x == uDyadic . ((n + 1) / (2 |^ p))
A3: 2 * (2 |^ P) = 2 |^ (P + 1) by NEWTON:6;
per cases ( n is even or n is odd ) ;
suppose n is even ; :: thesis: x == uDyadic . ((n + 1) / (2 |^ p))
then consider k being Nat such that
A4: n = 2 * k by ABIAN:def 2;
( k / (2 |^ P) = n / (2 |^ (P + 1)) & (k + 1) / (2 |^ P) = (2 * (k + 1)) / (2 |^ (P + 1)) ) by A4, XCMPLX_1:91, A3;
hence x == uDyadic . ((n + 1) / (2 |^ p)) by A4, A2, Def5; :: thesis: verum
end;
suppose n is odd ; :: thesis: x == uDyadic . ((n + 1) / (2 |^ p))
then consider k being Nat such that
A5: n = (2 * k) + 1 by ABIAN:9;
set D = uDyadic . ((n + 1) / (2 |^ p));
( n + 0 < n + 1 & (n + 1) + 0 < (n + 1) + 1 ) by XREAL_1:6;
then ( n / (2 |^ p) < (n + 1) / (2 |^ p) & (n + 1) / (2 |^ p) < ((n + 1) + 1) / (2 |^ p) ) by XREAL_1:74;
then A6: ( L_ x << {(uDyadic . ((n + 1) / (2 |^ p)))} & {(uDyadic . ((n + 1) / (2 |^ p)))} << R_ x ) by A2, SURREALO:21, Th24;
per cases ( (n + 1) / (2 |^ p) is Integer or not (n + 1) / (2 |^ p) is Integer ) ;
suppose (n + 1) / (2 |^ p) is Integer ; :: thesis: x == uDyadic . ((n + 1) / (2 |^ p))
then reconsider N = (n + 1) / (2 |^ p) as Integer ;
N <> 0 ;
then reconsider N1 = N - 1 as Nat by NAT_1:20;
A7: ( (N * (2 |^ P)) * 2 = N * (2 |^ p) & N * (2 |^ p) = n + 1 & n + 1 = 2 * (k + 1) ) by A3, XCMPLX_1:87, A5;
N = N1 + 1 ;
then A8: ( uDyadic . ((n + 1) / (2 |^ p)) = uInt . N & uInt . N = [{(uInt . N1)},{}] ) by Def1, Def5;
then A9: {x} << R_ (uDyadic . ((n + 1) / (2 |^ p))) ;
(N * (2 |^ p)) - (1 * (2 |^ p)) <= (N * (2 |^ p)) - 1 by XREAL_1:10, NAT_1:14;
then ( N1 * (2 |^ p) <= n & n = (N * (2 |^ p)) - 1 ) by A7;
then N1 <= n / (2 |^ p) by XREAL_1:77;
then ( uInt . N1 = uDyadic . N1 & uDyadic . N1 <= uDyadic . (n / (2 |^ p)) ) by Def5, Th24;
then ( not L_ x << {(uInt . N1)} or not {x} << R_ (uInt . N1) ) by A2, SURREALO:21;
then not x <= uInt . N1 by SURREAL0:43;
then L_ (uDyadic . ((n + 1) / (2 |^ p))) << {x} by A8, SURREALO:21;
hence x == uDyadic . ((n + 1) / (2 |^ p)) by A9, A6, SURREAL0:43; :: thesis: verum
end;
suppose (n + 1) / (2 |^ p) is not Integer ; :: thesis: x == uDyadic . ((n + 1) / (2 |^ p))
then consider n3, m3, p3 being Nat such that
A10: ( (n + 1) / (2 |^ p) = n3 + (((2 * m3) + 1) / (2 |^ (p3 + 1))) & (2 * m3) + 1 < 2 |^ (p3 + 1) ) by Th28;
set i3 = m3 + (n3 * (2 |^ p3));
A11: 2 |^ (p3 + 1) = 2 * (2 |^ p3) by NEWTON:6;
then A12: (n + 1) / (2 |^ p) = ((n3 * (2 * (2 |^ p3))) + ((2 * m3) + 1)) / (2 |^ (p3 + 1)) by A10, XCMPLX_1:113
.= ((2 * (m3 + (n3 * (2 |^ p3)))) + 1) / (2 |^ (p3 + 1)) ;
(((2 * k) + 1) + 1) * (2 |^ (p3 + 1)) = ((2 * (m3 + (n3 * (2 |^ p3)))) + 1) * (2 |^ p) by A12, A5, XCMPLX_1:95;
then ((k + 1) * (2 |^ (p3 + 1))) * 2 = (((2 * (m3 + (n3 * (2 |^ p3)))) + 1) * (2 |^ P)) * 2 by A3;
then 2 |^ (p3 + 1) divides 2 |^ P by NEWTON02:67, INT_1:def 3;
then reconsider pp = P - (p3 + 1) as Nat by NAT_1:21, PEPIN:31;
set M = 2 |^ pp;
P = pp + (p3 + 1) ;
then A13: 2 |^ P = (2 |^ pp) * (2 |^ (p3 + 1)) by NEWTON:8;
(n + 1) / (2 |^ p) = ((2 * (2 |^ pp)) * ((2 * (m3 + (n3 * (2 |^ p3)))) + 1)) / ((2 * (2 |^ pp)) * (2 |^ (p3 + 1))) by A12, XCMPLX_1:91
.= ((2 * (2 |^ pp)) * ((2 * (m3 + (n3 * (2 |^ p3)))) + 1)) / (2 |^ p) by A13, A3 ;
then A14: n + 1 = (2 * (2 |^ pp)) * ((2 * (m3 + (n3 * (2 |^ p3)))) + 1) by XCMPLX_1:53;
set D = uDyadic . ((n + 1) / (2 |^ p));
A15: (m3 + (n3 * (2 |^ p3))) / (2 |^ p3) = (((2 * 2) * (2 |^ pp)) * (m3 + (n3 * (2 |^ p3)))) / (((2 * 2) * (2 |^ pp)) * (2 |^ p3)) by XCMPLX_1:91
.= (((2 * 2) * (2 |^ pp)) * (m3 + (n3 * (2 |^ p3)))) / (2 |^ p) by A13, A3, A11 ;
0 <= ((2 |^ pp) + (2 |^ pp)) - 1 by XREAL_1:48, NAT_1:14;
then (((2 * 2) * (2 |^ pp)) * (m3 + (n3 * (2 |^ p3)))) + 0 <= (((2 * 2) * (2 |^ pp)) * (m3 + (n3 * (2 |^ p3)))) + ((2 * (2 |^ pp)) - 1) by XREAL_1:6;
then not uDyadic . (n / (2 |^ p)) < uDyadic . ((m3 + (n3 * (2 |^ p3))) / (2 |^ p3)) by A14, A15, Th24, XREAL_1:72;
then ( not L_ x << {(uDyadic . ((m3 + (n3 * (2 |^ p3))) / (2 |^ p3)))} or not {x} << R_ (uDyadic . ((m3 + (n3 * (2 |^ p3))) / (2 |^ p3))) ) by A2, SURREALO:21;
then A16: not x <= uDyadic . ((m3 + (n3 * (2 |^ p3))) / (2 |^ p3)) by SURREAL0:43;
A17: ((m3 + (n3 * (2 |^ p3))) + 1) / (2 |^ p3) = (((2 * 2) * (2 |^ pp)) * ((m3 + (n3 * (2 |^ p3))) + 1)) / (((2 * 2) * (2 |^ pp)) * (2 |^ p3)) by XCMPLX_1:91
.= (((2 * 2) * (2 |^ pp)) * ((m3 + (n3 * (2 |^ p3))) + 1)) / (2 |^ p) by A13, A3, A11 ;
((((2 * (2 |^ pp)) * 2) * (m3 + (n3 * (2 |^ p3)))) + (2 * (2 |^ pp))) + 1 <= ((((2 * 2) * (2 |^ pp)) * (m3 + (n3 * (2 |^ p3)))) + (2 * (2 |^ pp))) + (2 * (2 |^ pp)) by NAT_1:14, XREAL_1:6;
then not uDyadic . (((m3 + (n3 * (2 |^ p3))) + 1) / (2 |^ p3)) < uDyadic . ((n + 2) / (2 |^ p)) by A14, A17, Th24, XREAL_1:72;
then ( not L_ (uDyadic . (((m3 + (n3 * (2 |^ p3))) + 1) / (2 |^ p3))) << {x} or not {(uDyadic . (((m3 + (n3 * (2 |^ p3))) + 1) / (2 |^ p3)))} << R_ x ) by A2, SURREALO:21;
then A18: x < uDyadic . (((m3 + (n3 * (2 |^ p3))) + 1) / (2 |^ p3)) by SURREAL0:43;
uDyadic . ((n + 1) / (2 |^ p)) = [{(uDyadic . ((m3 + (n3 * (2 |^ p3))) / (2 |^ p3)))},{(uDyadic . (((m3 + (n3 * (2 |^ p3))) + 1) / (2 |^ p3)))}] by A12, Def5;
then ( L_ (uDyadic . ((n + 1) / (2 |^ p))) << {x} & {x} << R_ (uDyadic . ((n + 1) / (2 |^ p))) ) by A16, A18, SURREALO:21;
hence x == uDyadic . ((n + 1) / (2 |^ p)) by A6, SURREAL0:43; :: thesis: verum
end;
end;
end;
end;
end;

theorem Th38: :: SURREALN:38
for i being Integer
for p being Nat
for x being Surreal holds
( [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] implies x == uDyadic . ((i + 1) / (2 |^ p)) ) )
proof
let i be Integer; :: thesis: for p being Nat
for x being Surreal holds
( [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] implies x == uDyadic . ((i + 1) / (2 |^ p)) ) )

let p be Nat; :: thesis: for x being Surreal holds
( [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] implies x == uDyadic . ((i + 1) / (2 |^ p)) ) )

let x be Surreal; :: thesis: ( [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] is Surreal & ( x = [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] implies x == uDyadic . ((i + 1) / (2 |^ p)) ) )
i + 0 < i + 2 by XREAL_1:6;
then i / (2 |^ p) < (i + 2) / (2 |^ p) by XREAL_1:74;
hence [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] is Surreal by SURREALO:22, Th24; :: thesis: ( x = [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] implies x == uDyadic . ((i + 1) / (2 |^ p)) )
assume A1: x = [{(uDyadic . (i / (2 |^ p)))},{(uDyadic . ((i + 2) / (2 |^ p)))}] ; :: thesis: x == uDyadic . ((i + 1) / (2 |^ p))
per cases ( p = 0 or p > 0 ) ;
suppose p = 0 ; :: thesis: x == uDyadic . ((i + 1) / (2 |^ p))
then A2: 2 |^ p = 1 by NEWTON:4;
set j = i + 1;
A3: ( (i + 1) - 1 = i & (i + 1) + 1 = i + 2 ) ;
( uDyadic . (i / (2 |^ p)) = uInt . i & uDyadic . ((i + 1) / (2 |^ p)) = uInt . (i + 1) & uDyadic . ((i + 2) / (2 |^ p)) = uInt . (i + 2) ) by A2, Def5;
hence x == uDyadic . ((i + 1) / (2 |^ p)) by A1, Th10, A3; :: thesis: verum
end;
suppose A4: p > 0 ; :: thesis: x == uDyadic . ((i + 1) / (2 |^ p))
per cases ( i + 1 > 0 or i + 1 = 0 or i + 1 < 0 ) ;
suppose i + 1 > 0 ; :: thesis: x == uDyadic . ((i + 1) / (2 |^ p))
then i is Element of NAT by INT_1:3, INT_1:7;
hence x == uDyadic . ((i + 1) / (2 |^ p)) by A1, A4, Lm7; :: thesis: verum
end;
suppose A5: i + 1 = 0 ; :: thesis: x == uDyadic . ((i + 1) / (2 |^ p))
A6: ( 0_No = uInt . 0 & uInt . 0 = uDyadic . 0 ) by Def1, Def5;
(- 1) / (2 |^ p) < 0 ;
then A7: ( L_ x << {0_No} & {x} << R_ 0_No ) by A1, A6, SURREALO:21, A5, Th24;
( L_ 0_No << {x} & {0_No} << R_ x ) by A5, A1, A6, SURREALO:21, Th24;
hence x == uDyadic . ((i + 1) / (2 |^ p)) by A6, A5, A7, SURREAL0:43; :: thesis: verum
end;
suppose i + 1 < 0 ; :: thesis: x == uDyadic . ((i + 1) / (2 |^ p))
then i + 1 <= - 1 by INT_1:8;
then (i + 1) + 1 <= (- 1) + 1 by XREAL_1:6;
then reconsider n = - (i + 2) as Element of NAT by INT_1:3;
(n + 2) / (2 |^ p) = - ((- (n + 2)) / (2 |^ p)) by XCMPLX_1:190;
then uDyadic . ((n + 2) / (2 |^ p)) = - (uDyadic . (i / (2 |^ p))) by Th27;
then A8: -- (L_ x) = {(uDyadic . ((n + 2) / (2 |^ p)))} by A1, SURREALR:21;
n / (2 |^ p) = - ((i + 2) / (2 |^ p)) by XCMPLX_1:187;
then uDyadic . (n / (2 |^ p)) = - (uDyadic . ((i + 2) / (2 |^ p))) by Th27;
then -- (R_ x) = {(uDyadic . (n / (2 |^ p)))} by A1, SURREALR:21;
then - x = [{(uDyadic . (n / (2 |^ p)))},{(uDyadic . ((n + 2) / (2 |^ p)))}] by A8, SURREALR:7;
then - x == uDyadic . ((n + 1) / (2 |^ p)) by A4, Lm7;
then ( x = - (- x) & - (- x) == - (uDyadic . ((n + 1) / (2 |^ p))) ) by SURREALR:10;
then A9: x == uDyadic . (- ((n + 1) / (2 |^ p))) by Th27;
- (n + 1) = i + 1 ;
hence x == uDyadic . ((i + 1) / (2 |^ p)) by A9, XCMPLX_1:187; :: thesis: verum
end;
end;
end;
end;
end;

Lm8: for d being Dyadic
for i being Integer holds (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)

proof
let d be Dyadic; :: thesis: for i being Integer holds (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
let i be Integer; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
A1: ( uDyadic . 0 = uInt . 0 & uInt . 0 = 0_No ) by Def1, Def5;
defpred S1[ Nat] means for i, j being Nat st i + j <= $1 holds
for d being Dyadic st d in DYADIC j holds
(uDyadic . i) + (uDyadic . d) == uDyadic . (i + d);
A2: S1[ 0 ]
proof
let i, j be Nat; :: thesis: ( i + j <= 0 implies for d being Dyadic st d in DYADIC j holds
(uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) )

assume A3: i + j <= 0 ; :: thesis: for d being Dyadic st d in DYADIC j holds
(uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)

let d be Dyadic; :: thesis: ( d in DYADIC j implies (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) )
assume d in DYADIC j ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
i = 0 by A3;
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by A1; :: thesis: verum
end;
A4: for m being Nat st S1[m] holds
S1[m + 1]
proof
let m be Nat; :: thesis: ( S1[m] implies S1[m + 1] )
assume A5: S1[m] ; :: thesis: S1[m + 1]
set m1 = m + 1;
let i, j be Nat; :: thesis: ( i + j <= m + 1 implies for d being Dyadic st d in DYADIC j holds
(uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) )

assume A6: i + j <= m + 1 ; :: thesis: for d being Dyadic st d in DYADIC j holds
(uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)

let d be Dyadic; :: thesis: ( d in DYADIC j implies (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) )
assume A7: d in DYADIC j ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
per cases ( i + j < m + 1 or i = 0 or j = 0 or ( i + j = m + 1 & i <> 0 & j <> 0 ) ) by A6, XXREAL_0:1;
suppose i + j < m + 1 ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
then i + j <= m by NAT_1:13;
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by A5, A7; :: thesis: verum
end;
suppose i = 0 ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by A1; :: thesis: verum
end;
suppose j = 0 ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
then reconsider dd = d as Integer by A7, Th21;
uDyadic . i = uInt . i by Def5;
then (uDyadic . i) + (uDyadic . d) = (uInt . i) + (uInt . dd) by Def5;
then (uDyadic . i) + (uDyadic . d) == uInt . (i + dd) by Th14;
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by Def5; :: thesis: verum
end;
suppose A8: ( i + j = m + 1 & i <> 0 & j <> 0 ) ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
then reconsider i1 = i - 1, j1 = j - 1 as Nat by NAT_1:20;
per cases ( d in DYADIC j1 or not d in DYADIC j1 ) ;
suppose A9: d in DYADIC j1 ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
m + 1 = (i + j1) + 1 by A8;
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by A9, A5; :: thesis: verum
end;
suppose not d in DYADIC j1 ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
then d in (DYADIC (j1 + 1)) \ (DYADIC j1) by A7, XBOOLE_0:def 5;
then consider k being Integer such that
A10: d = ((2 * k) + 1) / (2 |^ (j1 + 1)) by Th20;
A11: uDyadic . d = [{(uDyadic . (k / (2 |^ j1)))},{(uDyadic . ((k + 1) / (2 |^ j1)))}] by A10, Def5;
uDyadic . i = uInt . (i1 + 1) by Def5;
then A12: uDyadic . i = [{(uInt . i1)},{}] by Def1;
i1 + j = m by A8;
then A13: (uDyadic . i1) + (uDyadic . d) == uDyadic . (i1 + d) by A7, A5;
(L_ (uDyadic . i)) ++ {(uDyadic . d)} = {((uInt . i1) + (uDyadic . d))} by A12, SURREALR:36
.= {((uDyadic . i1) + (uDyadic . d))} by Def5 ;
then A14: (L_ (uDyadic . i)) ++ {(uDyadic . d)} <==> {(uDyadic . (i1 + d))} by SURREALO:32, A13;
A15: k / (2 |^ j1) in DYADIC j1 by Def4;
m = i + j1 by A8;
then A16: (uDyadic . i) + (uDyadic . (k / (2 |^ j1))) == uDyadic . (i + (k / (2 |^ j1))) by A15, A5;
{(uDyadic . i)} ++ (L_ (uDyadic . d)) = {((uDyadic . i) + (uDyadic . (k / (2 |^ j1))))} by A11, SURREALR:36;
then {(uDyadic . i)} ++ (L_ (uDyadic . d)) <==> {(uDyadic . (i + (k / (2 |^ j1))))} by SURREALO:32, A16;
then A17: ((L_ (uDyadic . i)) ++ {(uDyadic . d)}) \/ ({(uDyadic . i)} ++ (L_ (uDyadic . d))) <==> {(uDyadic . (i1 + d))} \/ {(uDyadic . (i + (k / (2 |^ j1))))} by A14, SURREALO:31;
A18: (R_ (uDyadic . i)) ++ {(uDyadic . d)} = {} by SURREALR:27, A12;
A19: (k + 1) / (2 |^ j1) in DYADIC j1 by Def4;
m = i + j1 by A8;
then A20: (uDyadic . i) + (uDyadic . ((k + 1) / (2 |^ j1))) == uDyadic . (i + ((k + 1) / (2 |^ j1))) by A19, A5;
{(uDyadic . i)} ++ (R_ (uDyadic . d)) = {((uDyadic . i) + (uDyadic . ((k + 1) / (2 |^ j1))))} by SURREALR:36, A11;
then A21: ((R_ (uDyadic . i)) ++ {(uDyadic . d)}) \/ ({(uDyadic . i)} ++ (R_ (uDyadic . d))) <==> {(uDyadic . (i + ((k + 1) / (2 |^ j1))))} by A18, SURREALO:32, A20;
A22: (uDyadic . i) + (uDyadic . d) = [(((L_ (uDyadic . i)) ++ {(uDyadic . d)}) \/ ({(uDyadic . i)} ++ (L_ (uDyadic . d)))),(((R_ (uDyadic . i)) ++ {(uDyadic . d)}) \/ ({(uDyadic . i)} ++ (R_ (uDyadic . d))))] by SURREALR:28;
then [({(uDyadic . (i1 + d))} \/ {(uDyadic . (i + (k / (2 |^ j1))))}),{(uDyadic . (i + ((k + 1) / (2 |^ j1))))}] is surreal by A17, A21, SURREALI:37;
then reconsider DD = [({(uDyadic . (i1 + d))} \/ {(uDyadic . (i + (k / (2 |^ j1))))}),{(uDyadic . (i + ((k + 1) / (2 |^ j1))))}] as Surreal ;
A23: {(uDyadic . (i1 + d))} \/ {(uDyadic . (i + (k / (2 |^ j1))))} = {(uDyadic . (i1 + d)),(uDyadic . (i + (k / (2 |^ j1))))} by ENUMSET1:1;
(i * (2 |^ j1)) + (k + 1) = ((i * (2 |^ j1)) + k) + 1 ;
then A24: ( ((i * (2 |^ j1)) + k) / (2 |^ j1) = i + (k / (2 |^ j1)) & (((i * (2 |^ j1)) + k) + 1) / (2 |^ j1) = i + ((k + 1) / (2 |^ j1)) ) by XCMPLX_1:113;
A25: 2 |^ (j1 + 1) = 2 * (2 |^ j1) by NEWTON:6;
i + d = ((i * (2 * (2 |^ j1))) + ((2 * k) + 1)) / (2 |^ (j1 + 1)) by A10, A25, XCMPLX_1:113
.= ((2 * ((i * (2 |^ j1)) + k)) + 1) / (2 |^ (j1 + 1)) ;
then A26: uDyadic . (i + d) = [{(uDyadic . (i + (k / (2 |^ j1))))},{(uDyadic . (i + ((k + 1) / (2 |^ j1))))}] by A24, Def5;
(2 * k) + 1 <= (2 * k) + ((2 |^ j1) * 2) by NAT_1:14, XREAL_1:6;
then ((2 * k) + 1) * (2 |^ j1) <= (((1 * (2 |^ j1)) + k) * 2) * (2 |^ j1) by XREAL_1:64;
then ((2 * k) + 1) * (2 |^ j1) <= ((1 * (2 |^ j1)) + k) * (2 |^ (j1 + 1)) by A25;
then ((2 * k) + 1) / (2 |^ (j1 + 1)) <= ((1 * (2 |^ j1)) + k) / (2 |^ j1) by XREAL_1:102;
then d <= (k / (2 |^ j1)) + 1 by A10, XCMPLX_1:113;
then d + i1 <= ((k / (2 |^ j1)) + 1) + i1 by XREAL_1:6;
then A27: DD == uDyadic . (i + d) by A26, SURREALO:25, A23, Th24;
(uDyadic . i) + (uDyadic . d) == DD by A22, A17, A21, SURREALO:29;
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by A27, SURREALO:4; :: thesis: verum
end;
end;
end;
end;
end;
A28: for m being Nat holds S1[m] from NAT_1:sch 2(A2, A4);
consider n being Nat such that
A29: ( i = n or i = - n ) by INT_1:2;
per cases ( i = n or i = - n ) by A29;
suppose A30: i = n ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
consider j being Integer, m being Nat such that
A31: d = j / (2 |^ m) by Th18;
A32: d in DYADIC m by A31, Def4;
S1[n + m] by A28;
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by A30, A32; :: thesis: verum
end;
suppose A33: i = - n ; :: thesis: (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d)
consider j being Integer, m being Nat such that
A34: - d = j / (2 |^ m) by Th18;
A35: - d in DYADIC m by A34, Def4;
S1[n + m] by A28;
then A36: - ((uDyadic . n) + (uDyadic . (- d))) == - (uDyadic . (n + (- d))) by A35, SURREALR:65;
A37: - (uDyadic . (n + (- d))) = uDyadic . (- (n + (- d))) by Th27;
d = - (- d) ;
then ( - (uDyadic . n) = uDyadic . i & - (uDyadic . (- d)) = uDyadic . d ) by A33, Th27;
hence (uDyadic . i) + (uDyadic . d) == uDyadic . (i + d) by A37, A33, A36, SURREALR:40; :: thesis: verum
end;
end;
end;

theorem Th39: :: SURREALN:39
for d1, d2 being Dyadic holds (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
proof
let d1, d2 be Dyadic; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
defpred S1[ Nat] means for n1, n2 being Nat st n1 + n2 <= $1 & n1 <= n2 holds
for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2);
A1: S1[ 0 ]
proof
let n1, n2 be Nat; :: thesis: ( n1 + n2 <= 0 & n1 <= n2 implies for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) )

assume A2: ( n1 + n2 <= 0 & n1 <= n2 ) ; :: thesis: for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)

A3: ( n1 = 0 & 0 = n2 ) by A2;
let d1, d2 be Dyadic; :: thesis: ( d1 in DYADIC n1 & d2 in DYADIC n2 implies (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) )
assume A4: ( d1 in DYADIC n1 & d2 in DYADIC n2 ) ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
reconsider i1 = d1, i2 = d2 as Integer by A4, A3, Th21;
( uDyadic . d1 = uInt . i1 & uDyadic . d2 = uInt . i2 & uDyadic . (d1 + d2) = uInt . (i1 + i2) ) by Def5;
hence (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) by Th14; :: thesis: verum
end;
A5: for m being Nat st S1[m] holds
S1[m + 1]
proof
let m be Nat; :: thesis: ( S1[m] implies S1[m + 1] )
assume A6: S1[m] ; :: thesis: S1[m + 1]
set m1 = m + 1;
let n1, n2 be Nat; :: thesis: ( n1 + n2 <= m + 1 & n1 <= n2 implies for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) )

assume A7: ( n1 + n2 <= m + 1 & n1 <= n2 ) ; :: thesis: for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)

let d1, d2 be Dyadic; :: thesis: ( d1 in DYADIC n1 & d2 in DYADIC n2 implies (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) )
assume A8: ( d1 in DYADIC n1 & d2 in DYADIC n2 ) ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
per cases ( n1 = 0 or n1 <> 0 ) ;
suppose n1 = 0 ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
then reconsider i1 = d1 as Integer by A8, Th21;
(uDyadic . i1) + (uDyadic . d2) == uDyadic . (i1 + d2) by Lm8;
hence (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) ; :: thesis: verum
end;
suppose A9: n1 <> 0 ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
then reconsider N1 = n1 - 1 as Nat by NAT_1:20;
(N1 + n2) + 1 <= m + 1 by A7;
then A10: N1 + n2 <= m by XREAL_1:6;
n2 <> 0 by A7, A9;
then reconsider N2 = n2 - 1 as Nat by NAT_1:20;
A11: N1 + n2 = n1 + N2 ;
A12: ( ( N1 <= n2 or n2 <= N1 ) & ( n1 <= N2 or N2 <= n1 ) ) ;
per cases ( d1 in DYADIC N1 or d2 in DYADIC N2 or ( not d1 in DYADIC N1 & not d2 in DYADIC N2 ) ) ;
suppose ( d1 in DYADIC N1 or d2 in DYADIC N2 ) ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
hence (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) by A11, A10, A8, A6, A12; :: thesis: verum
end;
suppose A13: ( not d1 in DYADIC N1 & not d2 in DYADIC N2 ) ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
then d1 in (DYADIC (N1 + 1)) \ (DYADIC N1) by A8, XBOOLE_0:def 5;
then consider i1 being Integer such that
A14: d1 = ((2 * i1) + 1) / (2 |^ (N1 + 1)) by Th20;
d2 in (DYADIC (N2 + 1)) \ (DYADIC N2) by A8, A13, XBOOLE_0:def 5;
then consider i2 being Integer such that
A15: d2 = ((2 * i2) + 1) / (2 |^ (N2 + 1)) by Th20;
A16: uDyadic . d1 = [{(uDyadic . (i1 / (2 |^ N1)))},{(uDyadic . ((i1 + 1) / (2 |^ N1)))}] by A14, Def5;
A17: uDyadic . d2 = [{(uDyadic . (i2 / (2 |^ N2)))},{(uDyadic . ((i2 + 1) / (2 |^ N2)))}] by A15, Def5;
i1 / (2 |^ N1) in DYADIC N1 by Def4;
then A18: (uDyadic . (i1 / (2 |^ N1))) + (uDyadic . d2) == uDyadic . ((i1 / (2 |^ N1)) + d2) by A10, A8, A6, A12;
(L_ (uDyadic . d1)) ++ {(uDyadic . d2)} = {((uDyadic . (i1 / (2 |^ N1))) + (uDyadic . d2))} by A16, SURREALR:36;
then A19: (L_ (uDyadic . d1)) ++ {(uDyadic . d2)} <==> {(uDyadic . ((i1 / (2 |^ N1)) + d2))} by A18, SURREALO:32;
i2 / (2 |^ N2) in DYADIC N2 by Def4;
then A20: (uDyadic . d1) + (uDyadic . (i2 / (2 |^ N2))) == uDyadic . (d1 + (i2 / (2 |^ N2))) by A11, A10, A8, A6, A12;
{(uDyadic . d1)} ++ (L_ (uDyadic . d2)) = {((uDyadic . d1) + (uDyadic . (i2 / (2 |^ N2))))} by A17, SURREALR:36;
then A21: {(uDyadic . d1)} ++ (L_ (uDyadic . d2)) <==> {(uDyadic . (d1 + (i2 / (2 |^ N2))))} by A20, SURREALO:32;
(i1 + 1) / (2 |^ N1) in DYADIC N1 by Def4;
then A22: (uDyadic . ((i1 + 1) / (2 |^ N1))) + (uDyadic . d2) == uDyadic . (((i1 + 1) / (2 |^ N1)) + d2) by A10, A8, A6, A12;
(R_ (uDyadic . d1)) ++ {(uDyadic . d2)} = {((uDyadic . ((i1 + 1) / (2 |^ N1))) + (uDyadic . d2))} by A16, SURREALR:36;
then A23: (R_ (uDyadic . d1)) ++ {(uDyadic . d2)} <==> {(uDyadic . (((i1 + 1) / (2 |^ N1)) + d2))} by A22, SURREALO:32;
(i2 + 1) / (2 |^ N2) in DYADIC N2 by Def4;
then A24: (uDyadic . d1) + (uDyadic . ((i2 + 1) / (2 |^ N2))) == uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))) by A11, A10, A8, A6, A12;
{(uDyadic . d1)} ++ (R_ (uDyadic . d2)) = {((uDyadic . d1) + (uDyadic . ((i2 + 1) / (2 |^ N2))))} by A17, SURREALR:36;
then A25: {(uDyadic . d1)} ++ (R_ (uDyadic . d2)) <==> {(uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))))} by A24, SURREALO:32;
A26: ( ((L_ (uDyadic . d1)) ++ {(uDyadic . d2)}) \/ ({(uDyadic . d1)} ++ (L_ (uDyadic . d2))) <==> {(uDyadic . ((i1 / (2 |^ N1)) + d2))} \/ {(uDyadic . (d1 + (i2 / (2 |^ N2))))} & {(uDyadic . ((i1 / (2 |^ N1)) + d2))} \/ {(uDyadic . (d1 + (i2 / (2 |^ N2))))} = {(uDyadic . ((i1 / (2 |^ N1)) + d2)),(uDyadic . (d1 + (i2 / (2 |^ N2))))} ) by A19, A21, SURREALO:31, ENUMSET1:1;
A27: ( ((R_ (uDyadic . d1)) ++ {(uDyadic . d2)}) \/ ({(uDyadic . d1)} ++ (R_ (uDyadic . d2))) <==> {(uDyadic . (((i1 + 1) / (2 |^ N1)) + d2))} \/ {(uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))))} & {(uDyadic . (((i1 + 1) / (2 |^ N1)) + d2))} \/ {(uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))))} = {(uDyadic . (((i1 + 1) / (2 |^ N1)) + d2)),(uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))))} ) by A23, A25, SURREALO:31, ENUMSET1:1;
A28: (uDyadic . d1) + (uDyadic . d2) = [(((L_ (uDyadic . d1)) ++ {(uDyadic . d2)}) \/ ({(uDyadic . d1)} ++ (L_ (uDyadic . d2)))),(((R_ (uDyadic . d1)) ++ {(uDyadic . d2)}) \/ ({(uDyadic . d1)} ++ (R_ (uDyadic . d2))))] by SURREALR:28;
reconsider DD = [{(uDyadic . ((i1 / (2 |^ N1)) + d2)),(uDyadic . (d1 + (i2 / (2 |^ N2))))},{(uDyadic . (((i1 + 1) / (2 |^ N1)) + d2)),(uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))))}] as Surreal by A28, TARSKI:1, A26, A27, SURREALI:37;
DD = DD ;
then reconsider DD1 = [{(uDyadic . (d1 + (i2 / (2 |^ N2))))},{(uDyadic . (((i1 + 1) / (2 |^ N1)) + d2)),(uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))))}] as Surreal by SURREALO:26;
DD1 = DD1 ;
then reconsider DD2 = [{(uDyadic . (d1 + (i2 / (2 |^ N2))))},{(uDyadic . (d1 + ((i2 + 1) / (2 |^ N2))))}] as Surreal by SURREALO:28;
N1 + 1 <= n2 by A7;
then ( N1 < n2 & n2 = N2 + 1 ) by NAT_1:13;
then N1 <= N2 by NAT_1:13;
then reconsider N = N2 - N1 as Nat by NAT_1:21;
set 2N1 = 2 |^ N1;
set 2N2 = 2 |^ N2;
set P = 2 |^ N;
A29: ( 2 |^ (N1 + 1) = 2 * (2 |^ N1) & 2 |^ (N2 + 1) = 2 * (2 |^ N2) ) by NEWTON:6;
N2 = N1 + N ;
then A30: 2 |^ N2 = (2 |^ N1) * (2 |^ N) by NEWTON:8;
A31: (i1 / (2 |^ N1)) + d2 = ((i1 * ((2 |^ N) * 2)) / ((2 |^ N1) * ((2 |^ N) * 2))) + (((2 * i2) + 1) / (2 * (2 |^ N2))) by A15, A29, XCMPLX_1:91
.= ((i1 * ((2 |^ N) * 2)) + ((2 * i2) + 1)) / (2 * (2 |^ N2)) by XCMPLX_1:62, A30
.= ((2 * (((2 |^ N) * i1) + i2)) + 1) / (2 * (2 |^ N2)) ;
A32: d1 + (i2 / (2 |^ N2)) = ((((2 * i1) + 1) * (2 |^ N)) / (((2 |^ N1) * 2) * (2 |^ N))) + (i2 / (2 |^ N2)) by A14, A29, XCMPLX_1:91
.= ((((2 * i1) + 1) * (2 |^ N)) / ((2 |^ N2) * 2)) + ((i2 * 2) / ((2 |^ N2) * 2)) by A30, XCMPLX_1:91
.= ((((2 * i1) + 1) * (2 |^ N)) + (i2 * 2)) / ((2 |^ N2) * 2) by XCMPLX_1:62
.= ((2 * (((2 |^ N) * i1) + i2)) + (2 |^ N)) / (2 * (2 |^ N2)) ;
(2 * (((2 |^ N) * i1) + i2)) + 1 <= (2 * (((2 |^ N) * i1) + i2)) + (2 |^ N) by NAT_1:14, XREAL_1:6;
then (i1 / (2 |^ N1)) + d2 <= d1 + (i2 / (2 |^ N2)) by A31, A32, XREAL_1:72;
then A33: DD == DD1 by Th24, SURREALO:25;
A34: ((i1 + 1) / (2 |^ N1)) + d2 = (((i1 + 1) * ((2 |^ N) * 2)) / ((2 |^ N1) * ((2 |^ N) * 2))) + (((2 * i2) + 1) / (2 * (2 |^ N2))) by A15, A29, XCMPLX_1:91
.= (((i1 + 1) * ((2 |^ N) * 2)) + ((2 * i2) + 1)) / (2 * (2 |^ N2)) by XCMPLX_1:62, A30
.= ((2 * (((2 |^ N) * i1) + i2)) + ((2 * (2 |^ N)) + 1)) / (2 * (2 |^ N2)) ;
A35: d1 + ((i2 + 1) / (2 |^ N2)) = ((((2 * i1) + 1) * (2 |^ N)) / (((2 |^ N1) * 2) * (2 |^ N))) + ((i2 + 1) / (2 |^ N2)) by A29, XCMPLX_1:91, A14
.= ((((2 * i1) + 1) * (2 |^ N)) / ((2 |^ N2) * 2)) + (((i2 + 1) * 2) / ((2 |^ N2) * 2)) by A30, XCMPLX_1:91
.= ((((2 * i1) + 1) * (2 |^ N)) + ((i2 + 1) * 2)) / ((2 |^ N2) * 2) by XCMPLX_1:62
.= ((2 * (((2 |^ N) * i1) + i2)) + ((2 |^ N) + 2)) / (2 * (2 |^ N2)) ;
1 + ((2 |^ N) + 1) <= (2 |^ N) + ((2 |^ N) + 1) by NAT_1:14, XREAL_1:6;
then (2 * (((2 |^ N) * i1) + i2)) + ((2 |^ N) + 2) <= (2 * (((2 |^ N) * i1) + i2)) + ((2 * (2 |^ N)) + 1) by XREAL_1:6;
then d1 + ((i2 + 1) / (2 |^ N2)) <= ((i1 + 1) / (2 |^ N1)) + d2 by A34, A35, XREAL_1:72;
then A36: DD1 == DD2 by Th24, SURREALO:27;
(uDyadic . d1) + (uDyadic . d2) == DD by A28, A26, A27, SURREALO:29;
then (uDyadic . d1) + (uDyadic . d2) == DD1 by A33, SURREALO:4;
then A37: (uDyadic . d1) + (uDyadic . d2) == DD2 by A36, SURREALO:4;
d1 = (((2 * i1) + 1) * (2 |^ N)) / ((2 * (2 |^ N1)) * (2 |^ N)) by A29, XCMPLX_1:91, A14;
then A38: d1 + d2 = ((((2 * i1) + 1) * (2 |^ N)) + ((2 * i2) + 1)) / (2 * (2 |^ N2)) by XCMPLX_1:62, A29, A30, A15
.= ((2 * ((i1 * (2 |^ N)) + i2)) + ((2 |^ N) + 1)) / (2 * (2 |^ N2)) ;
per cases ( N1 <> N2 or N1 = N2 ) ;
suppose N1 <> N2 ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
then N <> 0 ;
then reconsider nn = N - 1 as Nat by NAT_1:14, NAT_1:21;
set 2n = 2 |^ nn;
N = nn + 1 ;
then A39: 2 |^ N = 2 * (2 |^ nn) by NEWTON:6;
A40: d1 + (i2 / (2 |^ N2)) = (2 * ((((2 |^ N) * i1) + i2) + (2 |^ nn))) / (2 * (2 |^ N2)) by A39, A32
.= ((((2 |^ N) * i1) + i2) + (2 |^ nn)) / (2 |^ N2) by XCMPLX_1:91 ;
A41: d1 + ((i2 + 1) / (2 |^ N2)) = (2 * (((((2 |^ N) * i1) + i2) + (2 |^ nn)) + 1)) / (2 * (2 |^ N2)) by A35, A39
.= (((((2 |^ N) * i1) + i2) + (2 |^ nn)) + 1) / (2 |^ N2) by XCMPLX_1:91 ;
d1 + d2 = ((2 * (((i1 * (2 |^ N)) + i2) + (2 |^ nn))) + 1) / (2 |^ (N2 + 1)) by NEWTON:6, A39, A38;
hence (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) by A37, A40, A41, Def5; :: thesis: verum
end;
suppose N1 = N2 ; :: thesis: (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2)
then A42: 2 |^ N = 1 by NEWTON:4;
then A43: d1 + d2 = (((2 * (i1 + i2)) + 1) + 1) / (2 |^ (N2 + 1)) by NEWTON:6, A38;
A44: d1 + (i2 / (2 |^ N2)) = ((2 * (i1 + i2)) + 1) / (2 |^ (N2 + 1)) by A42, A32, NEWTON:6;
d1 + ((i2 + 1) / (2 |^ N2)) = (((2 * (i1 + i2)) + 1) + 2) / (2 |^ (N2 + 1)) by NEWTON:6, A42, A35;
then DD2 == uDyadic . (d1 + d2) by A43, A44, Th38;
hence (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) by A37, SURREALO:4; :: thesis: verum
end;
end;
end;
end;
end;
end;
end;
A45: for m being Nat holds S1[m] from NAT_1:sch 2(A1, A5);
consider i1 being Integer, n1 being Nat such that
A46: d1 = i1 / (2 |^ n1) by Th18;
consider i2 being Integer, n2 being Nat such that
A47: d2 = i2 / (2 |^ n2) by Th18;
A48: ( d2 in DYADIC n2 & DYADIC n2 c= DYADIC (n1 + n2) ) by A47, Def4, Th19, NAT_1:11;
A49: d1 in DYADIC n1 by A46, Def4;
A50: n1 <= n1 + n2 by NAT_1:11;
S1[n1 + (n1 + n2)] by A45;
hence (uDyadic . d1) + (uDyadic . d2) == uDyadic . (d1 + d2) by A48, A49, A50; :: thesis: verum
end;

Lm9: for d being Dyadic
for i being Integer holds (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)

proof
let d be Dyadic; :: thesis: for i being Integer holds (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
let i be Integer; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
A1: ( uDyadic . 0 = uInt . 0 & uInt . 0 = 0_No ) by Def1, Def5;
defpred S1[ Nat] means for i, j being Nat st i + j <= $1 holds
for d being Dyadic st d in DYADIC j holds
(uDyadic . i) * (uDyadic . d) == uDyadic . (i * d);
A2: S1[ 0 ]
proof
let i, j be Nat; :: thesis: ( i + j <= 0 implies for d being Dyadic st d in DYADIC j holds
(uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) )

assume A3: i + j <= 0 ; :: thesis: for d being Dyadic st d in DYADIC j holds
(uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)

let d be Dyadic; :: thesis: ( d in DYADIC j implies (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) )
assume d in DYADIC j ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
i = 0 by A3;
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by A1; :: thesis: verum
end;
A4: for m being Nat st S1[m] holds
S1[m + 1]
proof
let m be Nat; :: thesis: ( S1[m] implies S1[m + 1] )
assume A5: S1[m] ; :: thesis: S1[m + 1]
set m1 = m + 1;
let i, j be Nat; :: thesis: ( i + j <= m + 1 implies for d being Dyadic st d in DYADIC j holds
(uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) )

assume A6: i + j <= m + 1 ; :: thesis: for d being Dyadic st d in DYADIC j holds
(uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)

let d be Dyadic; :: thesis: ( d in DYADIC j implies (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) )
assume A7: d in DYADIC j ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
per cases ( i + j < m + 1 or i = 0 or j = 0 or ( i + j = m + 1 & i <> 0 & j <> 0 ) ) by A6, XXREAL_0:1;
suppose i + j < m + 1 ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
then i + j <= m by NAT_1:13;
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by A5, A7; :: thesis: verum
end;
suppose i = 0 ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by A1; :: thesis: verum
end;
suppose j = 0 ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
then reconsider dd = d as Integer by A7, Th21;
uDyadic . i = uInt . i by Def5;
then (uDyadic . i) * (uDyadic . d) = (uInt . i) * (uInt . dd) by Def5;
then (uDyadic . i) * (uDyadic . d) == uInt . (i * dd) by Th15;
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by Def5; :: thesis: verum
end;
suppose A8: ( i + j = m + 1 & i <> 0 & j <> 0 ) ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
then reconsider i1 = i - 1, j1 = j - 1 as Nat by NAT_1:20;
per cases ( d in DYADIC j1 or not d in DYADIC j1 ) ;
suppose A9: d in DYADIC j1 ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
m + 1 = (i + j1) + 1 by A8;
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by A9, A5; :: thesis: verum
end;
suppose not d in DYADIC j1 ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
then d in (DYADIC (j1 + 1)) \ (DYADIC j1) by A7, XBOOLE_0:def 5;
then consider k being Integer such that
A10: d = ((2 * k) + 1) / (2 |^ (j1 + 1)) by Th20;
set x = uDyadic . i;
set y = uDyadic . d;
A11: uDyadic . d = [{(uDyadic . (k / (2 |^ j1)))},{(uDyadic . ((k + 1) / (2 |^ j1)))}] by A10, Def5;
uDyadic . i = uInt . (i1 + 1) by Def5;
then A12: uDyadic . i = [{(uInt . i1)},{}] by Def1
.= [{(uDyadic . i1)},{}] by Def5 ;
( comp ((R_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(R_ (uDyadic . d))) = comp ((R_ (uDyadic . d)),(uDyadic . d),(uDyadic . i),(R_ (uDyadic . i))) & comp ((R_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(L_ (uDyadic . d))) = comp ((L_ (uDyadic . d)),(uDyadic . d),(uDyadic . i),(R_ (uDyadic . i))) ) by SURREALR:53;
then A13: ( comp ((R_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(L_ (uDyadic . d))) = {} & {} = comp ((R_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(R_ (uDyadic . d))) ) by A12, SURREALR:49;
(i1 + j1) + 1 = m by A8;
then A14: i1 + j1 < m by NAT_1:13;
A15: ( i1 + j = m & i + j1 = m ) by A8;
A16: k / (2 |^ j1) in DYADIC j1 by Def4;
set M = 2 |^ (j1 + 1);
A17: 2 * (2 |^ j1) = 2 |^ (j1 + 1) by NEWTON:6;
A18: i1 * (k / (2 |^ j1)) = i1 * ((2 * k) / (2 |^ (j1 + 1))) by A17, XCMPLX_1:91
.= (i1 * (2 * k)) / (2 |^ (j1 + 1)) by XCMPLX_1:74 ;
(i1 * d) + (i * (k / (2 |^ j1))) = (i1 * (((2 * k) + 1) / (2 |^ (j1 + 1)))) + (i * ((2 * k) / (2 |^ (j1 + 1)))) by A10, A17, XCMPLX_1:91
.= ((i1 * ((2 * k) + 1)) / (2 |^ (j1 + 1))) + (i * ((2 * k) / (2 |^ (j1 + 1)))) by XCMPLX_1:74
.= ((i1 * ((2 * k) + 1)) / (2 |^ (j1 + 1))) + ((i * (2 * k)) / (2 |^ (j1 + 1))) by XCMPLX_1:74
.= ((i1 * ((2 * k) + 1)) + (i * (2 * k))) / (2 |^ (j1 + 1)) by XCMPLX_1:62 ;
then A19: ((i1 * d) + (i * (k / (2 |^ j1)))) + (- (i1 * (k / (2 |^ j1)))) = (((i1 * ((2 * k) + 1)) + (i * (2 * k))) / (2 |^ (j1 + 1))) - ((i1 * (2 * k)) / (2 |^ (j1 + 1))) by A18
.= (((i1 * ((2 * k) + 1)) + (i * (2 * k))) - (i1 * (2 * k))) / (2 |^ (j1 + 1)) by XCMPLX_1:120
.= ((i * ((2 * k) + 1)) - 1) / (2 |^ (j1 + 1)) ;
( (uDyadic . i1) * (uDyadic . d) == uDyadic . (i1 * d) & (uDyadic . i) * (uDyadic . (k / (2 |^ j1))) == uDyadic . (i * (k / (2 |^ j1))) & (uDyadic . i1) * (uDyadic . (k / (2 |^ j1))) == uDyadic . (i1 * (k / (2 |^ j1))) ) by A14, A15, A16, A7, A5;
then A20: ( - ((uDyadic . i1) * (uDyadic . (k / (2 |^ j1)))) == - (uDyadic . (i1 * (k / (2 |^ j1)))) & - (uDyadic . (i1 * (k / (2 |^ j1)))) = uDyadic . (- (i1 * (k / (2 |^ j1)))) & ((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . (k / (2 |^ j1)))) == (uDyadic . (i1 * d)) + (uDyadic . (i * (k / (2 |^ j1)))) & (uDyadic . (i1 * d)) + (uDyadic . (i * (k / (2 |^ j1)))) == uDyadic . ((i1 * d) + (i * (k / (2 |^ j1)))) ) by SURREALR:10, SURREALR:43, Th27, Th39;
then ((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . (k / (2 |^ j1)))) == uDyadic . ((i1 * d) + (i * (k / (2 |^ j1)))) by SURREALO:4;
then ( (((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . (k / (2 |^ j1))))) + (- ((uDyadic . i1) * (uDyadic . (k / (2 |^ j1))))) == (uDyadic . ((i1 * d) + (i * (k / (2 |^ j1))))) + (uDyadic . (- (i1 * (k / (2 |^ j1))))) & (uDyadic . ((i1 * d) + (i * (k / (2 |^ j1))))) + (uDyadic . (- (i1 * (k / (2 |^ j1))))) == uDyadic . (((i1 * d) + (i * (k / (2 |^ j1)))) + (- (i1 * (k / (2 |^ j1))))) ) by A20, SURREALR:43, Th39;
then (((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . (k / (2 |^ j1))))) + (- ((uDyadic . i1) * (uDyadic . (k / (2 |^ j1))))) == uDyadic . (((i * ((2 * k) + 1)) - 1) / (2 |^ (j1 + 1))) by A19, SURREALO:4;
then A21: {((((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . (k / (2 |^ j1))))) + (- ((uDyadic . i1) * (uDyadic . (k / (2 |^ j1))))))} <==> {(uDyadic . (((i * ((2 * k) + 1)) - 1) / (2 |^ (j1 + 1))))} by SURREALO:32;
A22: comp ((L_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(L_ (uDyadic . d))) = {((((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . (k / (2 |^ j1))))) - ((uDyadic . i1) * (uDyadic . (k / (2 |^ j1)))))} by SURREALR:52, A11, A12;
A23: (k + 1) / (2 |^ j1) in DYADIC j1 by Def4;
A24: i1 * ((k + 1) / (2 |^ j1)) = i1 * ((2 * (k + 1)) / (2 |^ (j1 + 1))) by A17, XCMPLX_1:91
.= (i1 * (2 * (k + 1))) / (2 |^ (j1 + 1)) by XCMPLX_1:74 ;
(i1 * d) + (i * ((k + 1) / (2 |^ j1))) = (i1 * (((2 * k) + 1) / (2 |^ (j1 + 1)))) + (i * ((2 * (k + 1)) / (2 |^ (j1 + 1)))) by A10, A17, XCMPLX_1:91
.= ((i1 * ((2 * k) + 1)) / (2 |^ (j1 + 1))) + (i * ((2 * (k + 1)) / (2 |^ (j1 + 1)))) by XCMPLX_1:74
.= ((i1 * ((2 * k) + 1)) / (2 |^ (j1 + 1))) + ((i * (2 * (k + 1))) / (2 |^ (j1 + 1))) by XCMPLX_1:74
.= ((i1 * ((2 * k) + 1)) + (i * (2 * (k + 1)))) / (2 |^ (j1 + 1)) by XCMPLX_1:62 ;
then A25: ((i1 * d) + (i * ((k + 1) / (2 |^ j1)))) + (- (i1 * ((k + 1) / (2 |^ j1)))) = (((i1 * ((2 * k) + 1)) + (i * (2 * (k + 1)))) / (2 |^ (j1 + 1))) - ((i1 * (2 * (k + 1))) / (2 |^ (j1 + 1))) by A24
.= ((((i * ((2 * k) + 1)) - ((2 * k) + 1)) + (i * (2 * (k + 1)))) - ((i * (2 * (k + 1))) - (2 * (k + 1)))) / (2 |^ (j1 + 1)) by XCMPLX_1:120
.= (((i * ((2 * k) + 1)) - 1) + 2) / (2 |^ (j1 + 1)) ;
( (uDyadic . i1) * (uDyadic . d) == uDyadic . (i1 * d) & (uDyadic . i) * (uDyadic . ((k + 1) / (2 |^ j1))) == uDyadic . (i * ((k + 1) / (2 |^ j1))) & (uDyadic . i1) * (uDyadic . ((k + 1) / (2 |^ j1))) == uDyadic . (i1 * ((k + 1) / (2 |^ j1))) ) by A14, A15, A23, A7, A5;
then A26: ( - ((uDyadic . i1) * (uDyadic . ((k + 1) / (2 |^ j1)))) == - (uDyadic . (i1 * ((k + 1) / (2 |^ j1)))) & - (uDyadic . (i1 * ((k + 1) / (2 |^ j1)))) = uDyadic . (- (i1 * ((k + 1) / (2 |^ j1)))) & ((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . ((k + 1) / (2 |^ j1)))) == (uDyadic . (i1 * d)) + (uDyadic . (i * ((k + 1) / (2 |^ j1)))) & (uDyadic . (i1 * d)) + (uDyadic . (i * ((k + 1) / (2 |^ j1)))) == uDyadic . ((i1 * d) + (i * ((k + 1) / (2 |^ j1)))) ) by SURREALR:10, SURREALR:43, Th27, Th39;
then ((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . ((k + 1) / (2 |^ j1)))) == uDyadic . ((i1 * d) + (i * ((k + 1) / (2 |^ j1)))) by SURREALO:4;
then ( (((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . ((k + 1) / (2 |^ j1))))) + (- ((uDyadic . i1) * (uDyadic . ((k + 1) / (2 |^ j1))))) == (uDyadic . ((i1 * d) + (i * ((k + 1) / (2 |^ j1))))) + (uDyadic . (- (i1 * ((k + 1) / (2 |^ j1))))) & (uDyadic . ((i1 * d) + (i * ((k + 1) / (2 |^ j1))))) + (uDyadic . (- (i1 * ((k + 1) / (2 |^ j1))))) == uDyadic . (((i1 * d) + (i * ((k + 1) / (2 |^ j1)))) + (- (i1 * ((k + 1) / (2 |^ j1))))) ) by A26, SURREALR:43, Th39;
then (((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . ((k + 1) / (2 |^ j1))))) + (- ((uDyadic . i1) * (uDyadic . ((k + 1) / (2 |^ j1))))) == uDyadic . ((((i * ((2 * k) + 1)) - 1) + 2) / (2 |^ (j1 + 1))) by A25, SURREALO:4;
then A27: {((((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . ((k + 1) / (2 |^ j1))))) + (- ((uDyadic . i1) * (uDyadic . ((k + 1) / (2 |^ j1))))))} <==> {(uDyadic . ((((i * ((2 * k) + 1)) - 1) + 2) / (2 |^ (j1 + 1))))} by SURREALO:32;
A28: comp ((L_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(R_ (uDyadic . d))) = {((((uDyadic . i1) * (uDyadic . d)) + ((uDyadic . i) * (uDyadic . ((k + 1) / (2 |^ j1))))) - ((uDyadic . i1) * (uDyadic . ((k + 1) / (2 |^ j1)))))} by SURREALR:52, A11, A12;
reconsider DD = [{(uDyadic . (((i * ((2 * k) + 1)) - 1) / (2 |^ (j1 + 1))))},{(uDyadic . ((((i * ((2 * k) + 1)) - 1) + 2) / (2 |^ (j1 + 1))))}] as Surreal by Th38;
(uDyadic . i) * (uDyadic . d) = [((comp ((L_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(L_ (uDyadic . d)))) \/ (comp ((R_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(R_ (uDyadic . d))))),((comp ((L_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(R_ (uDyadic . d)))) \/ (comp ((R_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(L_ (uDyadic . d)))))] by SURREALR:50
.= [(comp ((L_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(L_ (uDyadic . d)))),(comp ((L_ (uDyadic . i)),(uDyadic . i),(uDyadic . d),(R_ (uDyadic . d))))] by A13 ;
then A29: ( (uDyadic . i) * (uDyadic . d) == DD & DD == uDyadic . ((((i * ((2 * k) + 1)) - 1) + 1) / (2 |^ (j1 + 1))) ) by A22, A28, A21, A27, SURREALO:29, Th38;
(((i * ((2 * k) + 1)) - 1) + 1) / (2 |^ (j1 + 1)) = i * d by A10, XCMPLX_1:74;
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by A29, SURREALO:4; :: thesis: verum
end;
end;
end;
end;
end;
A30: for m being Nat holds S1[m] from NAT_1:sch 2(A2, A4);
consider n being Nat such that
A31: ( i = n or i = - n ) by INT_1:2;
per cases ( i = n or i = - n ) by A31;
suppose A32: i = n ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
consider j being Integer, m being Nat such that
A33: d = j / (2 |^ m) by Th18;
A34: d in DYADIC m by A33, Def4;
S1[n + m] by A30;
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by A34, A32; :: thesis: verum
end;
suppose A35: i = - n ; :: thesis: (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d)
consider j being Integer, m being Nat such that
A36: - d = j / (2 |^ m) by Th18;
A37: - d in DYADIC m by A36, Def4;
S1[n + m] by A30;
then A38: ( (uDyadic . n) * (uDyadic . (- d)) == uDyadic . (n * (- d)) & uDyadic . (n * (- d)) = uDyadic . (i * d) ) by A35, A37;
( uDyadic . i = - (uDyadic . n) & - (uDyadic . (- d)) = uDyadic . (- (- d)) ) by A35, Th27;
hence (uDyadic . i) * (uDyadic . d) == uDyadic . (i * d) by A38, SURREALR:58; :: thesis: verum
end;
end;
end;

theorem Th40: :: SURREALN:40
for d1, d2 being Dyadic holds (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
proof
let d1, d2 be Dyadic; :: thesis: (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
defpred S1[ Nat] means for n1, n2 being Nat st n1 + n2 <= $1 & n1 <= n2 holds
for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2);
A1: S1[ 0 ]
proof
let n1, n2 be Nat; :: thesis: ( n1 + n2 <= 0 & n1 <= n2 implies for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) )

assume A2: ( n1 + n2 <= 0 & n1 <= n2 ) ; :: thesis: for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)

A3: ( n1 = 0 & 0 = n2 ) by A2;
let d1, d2 be Dyadic; :: thesis: ( d1 in DYADIC n1 & d2 in DYADIC n2 implies (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) )
assume A4: ( d1 in DYADIC n1 & d2 in DYADIC n2 ) ; :: thesis: (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
reconsider i1 = d1, i2 = d2 as Integer by A4, A3, Th21;
( uDyadic . d1 = uInt . i1 & uDyadic . d2 = uInt . i2 & uDyadic . (d1 * d2) = uInt . (i1 * i2) ) by Def5;
hence (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) by Th15; :: thesis: verum
end;
A5: for m being Nat st S1[m] holds
S1[m + 1]
proof
let m be Nat; :: thesis: ( S1[m] implies S1[m + 1] )
assume A6: S1[m] ; :: thesis: S1[m + 1]
set m1 = m + 1;
let n1, n2 be Nat; :: thesis: ( n1 + n2 <= m + 1 & n1 <= n2 implies for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) )

assume A7: ( n1 + n2 <= m + 1 & n1 <= n2 ) ; :: thesis: for d1, d2 being Dyadic st d1 in DYADIC n1 & d2 in DYADIC n2 holds
(uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)

let d1, d2 be Dyadic; :: thesis: ( d1 in DYADIC n1 & d2 in DYADIC n2 implies (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) )
assume A8: ( d1 in DYADIC n1 & d2 in DYADIC n2 ) ; :: thesis: (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
per cases ( n1 = 0 or n1 <> 0 ) ;
suppose n1 = 0 ; :: thesis: (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
then reconsider i1 = d1 as Integer by A8, Th21;
(uDyadic . i1) * (uDyadic . d2) == uDyadic . (i1 * d2) by Lm9;
hence (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) ; :: thesis: verum
end;
suppose A9: n1 <> 0 ; :: thesis: (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
then reconsider N1 = n1 - 1 as Nat by NAT_1:20;
A10: (N1 + n2) + 1 <= m + 1 by A7;
then A11: N1 + n2 <= m by XREAL_1:6;
n2 <> 0 by A7, A9;
then reconsider N2 = n2 - 1 as Nat by NAT_1:20;
A12: N1 + n2 = n1 + N2 ;
(N1 + N2) + 1 <= m by A10, XREAL_1:6;
then A13: N1 + N2 < m by NAT_1:13;
N1 + 1 <= n2 by A7;
then ( N1 < n2 & n2 = N2 + 1 ) by NAT_1:13;
then A14: N1 <= N2 by NAT_1:13;
A15: ( ( N1 <= n2 or n2 <= N1 ) & ( n1 <= N2 or N2 <= n1 ) ) ;
per cases ( d1 in DYADIC N1 or d2 in DYADIC N2 or ( not d1 in DYADIC N1 & not d2 in DYADIC N2 ) ) ;
suppose ( d1 in DYADIC N1 or d2 in DYADIC N2 ) ; :: thesis: (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
hence (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) by A12, A11, A8, A6, A15; :: thesis: verum
end;
suppose A16: ( not d1 in DYADIC N1 & not d2 in DYADIC N2 ) ; :: thesis: (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2)
then d1 in (DYADIC (N1 + 1)) \ (DYADIC N1) by A8, XBOOLE_0:def 5;
then consider i1 being Integer such that
A17: d1 = ((2 * i1) + 1) / (2 |^ (N1 + 1)) by Th20;
d2 in (DYADIC (N2 + 1)) \ (DYADIC N2) by A8, A16, XBOOLE_0:def 5;
then consider i2 being Integer such that
A18: d2 = ((2 * i2) + 1) / (2 |^ (N2 + 1)) by Th20;
A19: uDyadic . d1 = [{(uDyadic . (i1 / (2 |^ N1)))},{(uDyadic . ((i1 + 1) / (2 |^ N1)))}] by A17, Def5;
A20: uDyadic . d2 = [{(uDyadic . (i2 / (2 |^ N2)))},{(uDyadic . ((i2 + 1) / (2 |^ N2)))}] by A18, Def5;
set x = uDyadic . d1;
set y = uDyadic . d2;
A21: ( i1 / (2 |^ N1) in DYADIC N1 & (i1 + 1) / (2 |^ N1) in DYADIC N1 & i2 / (2 |^ N2) in DYADIC N2 & (i2 + 1) / (2 |^ N2) in DYADIC N2 ) by Def4;
A22: (uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2) == uDyadic . ((i1 / (2 |^ N1)) * d2) by A21, A11, A8, A6, A15;
A23: (uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))) == uDyadic . (d1 * (i2 / (2 |^ N2))) by A21, A12, A11, A8, A6, A15;
A24: (uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2) == uDyadic . (((i1 + 1) / (2 |^ N1)) * d2) by A21, A11, A8, A6, A15;
A25: (uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))) == uDyadic . (d1 * ((i2 + 1) / (2 |^ N2))) by A21, A12, A11, A8, A6, A15;
A26: ( 2 |^ (N1 + 1) = 2 * (2 |^ N1) & 2 |^ (N2 + 1) = 2 * (2 |^ N2) ) by NEWTON:6;
set M = 2 |^ ((N1 + N2) + 1);
A27: 2 |^ ((N1 + N2) + 1) = (2 |^ (N1 + N2)) * 2 by NEWTON:6
.= ((2 |^ N1) * (2 |^ N2)) * 2 by NEWTON:8 ;
A28: (i1 / (2 |^ N1)) * d2 = (i1 * ((2 * i2) + 1)) / ((2 |^ N1) * (2 |^ (N2 + 1))) by XCMPLX_1:76, A18
.= (((2 * i1) * i2) + i1) / (2 |^ ((N1 + N2) + 1)) by A27, A26 ;
A29: d1 * (i2 / (2 |^ N2)) = (((2 * i1) + 1) * i2) / ((2 |^ (N1 + 1)) * (2 |^ N2)) by XCMPLX_1:76, A17
.= (((2 * i1) * i2) + i2) / (2 |^ ((N1 + N2) + 1)) by A27, A26 ;
A30: (i1 / (2 |^ N1)) * (i2 / (2 |^ N2)) = (i1 * i2) / ((2 |^ N1) * (2 |^ N2)) by XCMPLX_1:76
.= ((i1 * i2) * 2) / (2 |^ ((N1 + N2) + 1)) by A27, XCMPLX_1:91 ;
A31: ((i1 + 1) / (2 |^ N1)) * d2 = ((i1 + 1) * ((2 * i2) + 1)) / ((2 |^ N1) * (2 |^ (N2 + 1))) by XCMPLX_1:76, A18
.= (((((2 * i1) * i2) + i1) + (2 * i2)) + 1) / (2 |^ ((N1 + N2) + 1)) by A27, A26 ;
A32: d1 * ((i2 + 1) / (2 |^ N2)) = (((2 * i1) + 1) * (i2 + 1)) / ((2 |^ (N1 + 1)) * (2 |^ N2)) by XCMPLX_1:76, A17
.= (((((2 * i1) * i2) + i2) + (2 * i1)) + 1) / (2 |^ ((N1 + N2) + 1)) by A27, A26 ;
A33: ((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)) = ((i1 + 1) * (i2 + 1)) / ((2 |^ N1) * (2 |^ N2)) by XCMPLX_1:76
.= (((((i1 * i2) + i1) + i2) + 1) * 2) / (2 |^ ((N1 + N2) + 1)) by A27, XCMPLX_1:91 ;
A34: (i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)) = (i1 * (i2 + 1)) / ((2 |^ N1) * (2 |^ N2)) by XCMPLX_1:76
.= (((i1 * i2) + i1) * 2) / (2 |^ ((N1 + N2) + 1)) by A27, XCMPLX_1:91 ;
A35: ((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2)) = ((i1 + 1) * i2) / ((2 |^ N1) * (2 |^ N2)) by XCMPLX_1:76
.= (((i1 * i2) + i2) * 2) / (2 |^ ((N1 + N2) + 1)) by A27, XCMPLX_1:91 ;
A36: (((i1 / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) + (- ((i1 / (2 |^ N1)) * (i2 / (2 |^ N2)))) = (((((2 * i1) * i2) + i1) + (((2 * i1) * i2) + i2)) / (2 |^ ((N1 + N2) + 1))) + (- (((i1 * i2) * 2) / (2 |^ ((N1 + N2) + 1)))) by A28, A29, A30, XCMPLX_1:62
.= (((((2 * i1) * i2) + i1) + (((2 * i1) * i2) + i2)) / (2 |^ ((N1 + N2) + 1))) - (((i1 * i2) * 2) / (2 |^ ((N1 + N2) + 1)))
.= (((((2 * i1) * i2) + i1) + (((2 * i1) * i2) + i2)) - ((i1 * i2) * 2)) / (2 |^ ((N1 + N2) + 1)) by XCMPLX_1:120
.= (((2 * i1) * i2) + (i1 + i2)) / (2 |^ ((N1 + N2) + 1)) ;
A37: ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) + (- (((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) = (((((((2 * i1) * i2) + i1) + (2 * i2)) + 1) + (((((2 * i1) * i2) + i2) + (2 * i1)) + 1)) / (2 |^ ((N1 + N2) + 1))) + (- ((((((i1 * i2) + i1) + i2) + 1) * 2) / (2 |^ ((N1 + N2) + 1)))) by A31, A32, A33, XCMPLX_1:62
.= ((((((4 * i1) * i2) + (3 * i1)) + (3 * i2)) + 2) / (2 |^ ((N1 + N2) + 1))) - ((((((i1 * i2) + i1) + i2) + 1) * 2) / (2 |^ ((N1 + N2) + 1)))
.= ((((((4 * i1) * i2) + (3 * i1)) + (3 * i2)) + 2) - (((((i1 * i2) + i1) + i2) + 1) * 2)) / (2 |^ ((N1 + N2) + 1)) by XCMPLX_1:120
.= ((((2 * i1) * i2) + i1) + i2) / (2 |^ ((N1 + N2) + 1)) ;
A38: (((i1 / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) + (- ((i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) = (((((2 * i1) * i2) + i1) + (((((2 * i1) * i2) + i2) + (2 * i1)) + 1)) / (2 |^ ((N1 + N2) + 1))) + (- ((((i1 * i2) + i1) * 2) / (2 |^ ((N1 + N2) + 1)))) by A34, A28, A32, XCMPLX_1:62
.= ((((((4 * i1) * i2) + (3 * i1)) + i2) + 1) / (2 |^ ((N1 + N2) + 1))) - ((((i1 * i2) + i1) * 2) / (2 |^ ((N1 + N2) + 1)))
.= ((((((4 * i1) * i2) + (3 * i1)) + i2) + 1) - (((i1 * i2) + i1) * 2)) / (2 |^ ((N1 + N2) + 1)) by XCMPLX_1:120
.= (((((2 * i1) * i2) + i1) + i2) + 1) / (2 |^ ((N1 + N2) + 1)) ;
A39: ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) + (- (((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2)))) = (((((((2 * i1) * i2) + i1) + (2 * i2)) + 1) + (((2 * i1) * i2) + i2)) / (2 |^ ((N1 + N2) + 1))) + (- ((((i1 * i2) + i2) * 2) / (2 |^ ((N1 + N2) + 1)))) by A35, A29, A31, XCMPLX_1:62
.= ((((((4 * i1) * i2) + i1) + (3 * i2)) + 1) / (2 |^ ((N1 + N2) + 1))) - ((((i1 * i2) + i2) * 2) / (2 |^ ((N1 + N2) + 1)))
.= ((((((4 * i1) * i2) + i1) + (3 * i2)) + 1) - (((i1 * i2) + i2) * 2)) / (2 |^ ((N1 + N2) + 1)) by XCMPLX_1:120
.= (((((2 * i1) * i2) + i1) + i2) + 1) / (2 |^ ((N1 + N2) + 1)) ;
( ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2)))) == (uDyadic . ((i1 / (2 |^ N1)) * d2)) + (uDyadic . (d1 * (i2 / (2 |^ N2)))) & (uDyadic . ((i1 / (2 |^ N1)) * d2)) + (uDyadic . (d1 * (i2 / (2 |^ N2)))) == uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) ) by SURREALR:43, Th39, A22, A23;
then A40: ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2)))) == uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) by SURREALO:4;
( - ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2)))) == - (uDyadic . ((i1 / (2 |^ N1)) * (i2 / (2 |^ N2)))) & - (uDyadic . ((i1 / (2 |^ N1)) * (i2 / (2 |^ N2)))) = uDyadic . (- ((i1 / (2 |^ N1)) * (i2 / (2 |^ N2)))) ) by A14, A13, A21, A6, SURREALR:65, Th27;
then ( (((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2))))) == (uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2))))) + (uDyadic . (- ((i1 / (2 |^ N1)) * (i2 / (2 |^ N2))))) & (uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2))))) + (uDyadic . (- ((i1 / (2 |^ N1)) * (i2 / (2 |^ N2))))) == uDyadic . ((((i1 / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) + (- ((i1 / (2 |^ N1)) * (i2 / (2 |^ N2))))) ) by A40, SURREALR:43, Th39;
then A41: (((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2))))) == uDyadic . ((((2 * i1) * i2) + (i1 + i2)) / (2 |^ ((N1 + N2) + 1))) by SURREALO:4, A36;
then A42: {((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2))))))} <==> {(uDyadic . ((((2 * i1) * i2) + (i1 + i2)) / (2 |^ ((N1 + N2) + 1))))} by SURREALO:32;
A43: comp ((L_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(L_ (uDyadic . d2))) = {((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) - ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2)))))} by A19, A20, SURREALR:52;
( ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2)))) == (uDyadic . (((i1 + 1) / (2 |^ N1)) * d2)) + (uDyadic . (d1 * ((i2 + 1) / (2 |^ N2)))) & (uDyadic . (((i1 + 1) / (2 |^ N1)) * d2)) + (uDyadic . (d1 * ((i2 + 1) / (2 |^ N2)))) == uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) ) by SURREALR:43, Th39, A24, A25;
then A44: ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2)))) == uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) by SURREALO:4;
( - ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2)))) == - (uDyadic . (((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) & - (uDyadic . (((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) = uDyadic . (- (((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) ) by A14, A13, A21, A6, SURREALR:65, Th27;
then ( (((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) == (uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2))))) + (uDyadic . (- (((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2))))) & (uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2))))) + (uDyadic . (- (((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2))))) == uDyadic . (((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) + (- (((i1 + 1) / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2))))) ) by A44, SURREALR:43, Th39;
then A45: (((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) == uDyadic . (((((2 * i1) * i2) + i1) + i2) / (2 |^ ((N1 + N2) + 1))) by SURREALO:4, A37;
A46: comp ((R_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(R_ (uDyadic . d2))) = {((((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) - ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2)))))} by A19, A20, SURREALR:52;
( ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2)))) == (uDyadic . ((i1 / (2 |^ N1)) * d2)) + (uDyadic . (d1 * ((i2 + 1) / (2 |^ N2)))) & (uDyadic . ((i1 / (2 |^ N1)) * d2)) + (uDyadic . (d1 * ((i2 + 1) / (2 |^ N2)))) == uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) ) by SURREALR:43, Th39, A22, A25;
then A47: ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2)))) == uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) by SURREALO:4;
( - ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2)))) == - (uDyadic . ((i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) & - (uDyadic . ((i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) = uDyadic . (- ((i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2)))) ) by A14, A13, A21, A6, SURREALR:65, Th27;
then ( (((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) == (uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2))))) + (uDyadic . (- ((i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2))))) & (uDyadic . (((i1 / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2))))) + (uDyadic . (- ((i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2))))) == uDyadic . ((((i1 / (2 |^ N1)) * d2) + (d1 * ((i2 + 1) / (2 |^ N2)))) + (- ((i1 / (2 |^ N1)) * ((i2 + 1) / (2 |^ N2))))) ) by A47, SURREALR:43, Th39;
then A48: (((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) == uDyadic . ((((((2 * i1) * i2) + i1) + i2) + 1) / (2 |^ ((N1 + N2) + 1))) by SURREALO:4, A38;
then A49: {((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2))))))} <==> {(uDyadic . ((((((2 * i1) * i2) + i1) + i2) + 1) / (2 |^ ((N1 + N2) + 1))))} by SURREALO:32;
A50: comp ((L_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(R_ (uDyadic . d2))) = {((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) - ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2)))))} by SURREALR:52, A19, A20;
( ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2)))) == (uDyadic . (((i1 + 1) / (2 |^ N1)) * d2)) + (uDyadic . (d1 * (i2 / (2 |^ N2)))) & (uDyadic . (((i1 + 1) / (2 |^ N1)) * d2)) + (uDyadic . (d1 * (i2 / (2 |^ N2)))) == uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) ) by SURREALR:43, Th39, A23, A24;
then A51: ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2)))) == uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) by SURREALO:4;
( - ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2)))) == - (uDyadic . (((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2)))) & - (uDyadic . (((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2)))) = uDyadic . (- (((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2)))) ) by A14, A13, A21, A6, SURREALR:65, Th27;
then ( (((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2))))) == (uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2))))) + (uDyadic . (- (((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2))))) & (uDyadic . ((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2))))) + (uDyadic . (- (((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2))))) == uDyadic . (((((i1 + 1) / (2 |^ N1)) * d2) + (d1 * (i2 / (2 |^ N2)))) + (- (((i1 + 1) / (2 |^ N1)) * (i2 / (2 |^ N2))))) ) by A51, SURREALR:43, Th39;
then A52: (((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2))))) == uDyadic . ((((((2 * i1) * i2) + i1) + i2) + 1) / (2 |^ ((N1 + N2) + 1))) by SURREALO:4, A39;
A53: comp ((R_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(L_ (uDyadic . d2))) = {((((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) - ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2)))))} by SURREALR:52, A19, A20;
A54: (uDyadic . d1) * (uDyadic . d2) = [((comp ((L_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(L_ (uDyadic . d2)))) \/ (comp ((R_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(R_ (uDyadic . d2))))),((comp ((L_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(R_ (uDyadic . d2)))) \/ (comp ((R_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(L_ (uDyadic . d2)))))] by SURREALR:50
.= [{((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2)))))),((((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2))))))},((comp ((L_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(R_ (uDyadic . d2)))) \/ (comp ((R_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(L_ (uDyadic . d2)))))] by A43, A46, ENUMSET1:1 ;
then reconsider DD1 = [{((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2))))))},((comp ((L_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(R_ (uDyadic . d2)))) \/ (comp ((R_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(L_ (uDyadic . d2)))))] as Surreal by SURREALO:26;
A55: (uDyadic . d1) * (uDyadic . d2) == DD1 by A54, SURREALO:4, SURREALO:25, A41, A45;
then reconsider DD2 = [{(uDyadic . (((((2 * i1) * i2) + i1) + i2) / (2 |^ ((N1 + N2) + 1))))},((comp ((L_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(R_ (uDyadic . d2)))) \/ (comp ((R_ (uDyadic . d1)),(uDyadic . d1),(uDyadic . d2),(L_ (uDyadic . d2)))))] as Surreal by A42, SURREALI:37, TARSKI:1;
A56: DD1 == DD2 by A42, SURREALO:29;
A57: DD2 = [{(uDyadic . (((((2 * i1) * i2) + i1) + i2) / (2 |^ ((N1 + N2) + 1))))},{((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2)))))),((((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . (i2 / (2 |^ N2))))) + (- ((uDyadic . ((i1 + 1) / (2 |^ N1))) * (uDyadic . (i2 / (2 |^ N2))))))}] by A50, A53, ENUMSET1:1;
then reconsider DD3 = [{(uDyadic . (((((2 * i1) * i2) + i1) + i2) / (2 |^ ((N1 + N2) + 1))))},{((((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . d2)) + ((uDyadic . d1) * (uDyadic . ((i2 + 1) / (2 |^ N2))))) + (- ((uDyadic . (i1 / (2 |^ N1))) * (uDyadic . ((i2 + 1) / (2 |^ N2))))))}] as Surreal by SURREALO:28;
A58: DD2 == DD3 by A57, SURREALO:4, SURREALO:27, A48, A52;
then reconsider DD4 = [{(uDyadic . (((((2 * i1) * i2) + i1) + i2) / (2 |^ ((N1 + N2) + 1))))},{(uDyadic . ((((((2 * i1) * i2) + i1) + i2) + 1) / (2 |^ ((N1 + N2) + 1))))}] as Surreal by A49, SURREALI:37, TARSKI:1;
(uDyadic . d1) * (uDyadic . d2) == DD2 by A55, A56, SURREALO:4;
then A59: (uDyadic . d1) * (uDyadic . d2) == DD3 by A58, SURREALO:4;
DD3 == DD4 by A49, SURREALO:29;
then A60: (uDyadic . d1) * (uDyadic . d2) == DD4 by A59, SURREALO:4;
A61: 2 * (2 |^ ((N1 + N2) + 1)) = 2 |^ (((N1 + N2) + 1) + 1) by NEWTON:6;
A62: ((((2 * i1) * i2) + i1) + i2) / (2 |^ ((N1 + N2) + 1)) = (((((2 * i1) * i2) + i1) + i2) * 2) / (2 * (2 |^ ((N1 + N2) + 1))) by XCMPLX_1:91;
(((((2 * i1) * i2) + i1) + i2) + 1) / (2 |^ ((N1 + N2) + 1)) = ((((((2 * i1) * i2) + i1) + i2) + 1) * 2) / (2 * (2 |^ ((N1 + N2) + 1))) by XCMPLX_1:91
.= ((((((2 * i1) * i2) + i1) + i2) * 2) + 2) / (2 * (2 |^ ((N1 + N2) + 1))) ;
then A63: DD4 == uDyadic . (((((((2 * i1) * i2) + i1) + i2) * 2) + 1) / (2 |^ (((N1 + N2) + 1) + 1))) by A61, A62, Th38;
A64: 2 |^ (((N1 + N2) + 1) + 1) = 2 |^ ((N1 + 1) + (N2 + 1))
.= (2 |^ (N1 + 1)) * (2 |^ (N2 + 1)) by NEWTON:8 ;
(((((2 * i1) * i2) + i1) + i2) * 2) + 1 = ((2 * i1) + 1) * ((2 * i2) + 1) ;
then ((((((2 * i1) * i2) + i1) + i2) * 2) + 1) / (2 |^ (((N1 + N2) + 1) + 1)) = d1 * d2 by A17, A18, A64, XCMPLX_1:76;
hence (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) by A60, A63, SURREALO:4; :: thesis: verum
end;
end;
end;
end;
end;
A65: for m being Nat holds S1[m] from NAT_1:sch 2(A1, A5);
consider i1 being Integer, n1 being Nat such that
A66: d1 = i1 / (2 |^ n1) by Th18;
consider i2 being Integer, n2 being Nat such that
A67: d2 = i2 / (2 |^ n2) by Th18;
A68: ( d2 in DYADIC n2 & DYADIC n2 c= DYADIC (n1 + n2) ) by A67, Def4, Th19, NAT_1:11;
A69: d1 in DYADIC n1 by A66, Def4;
A70: n1 <= n1 + n2 by NAT_1:11;
S1[n1 + (n1 + n2)] by A65;
hence (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) by A68, A69, A70; :: thesis: verum
end;

definition
func sReal -> ManySortedSet of REAL means :Def6: :: SURREALN:def 6
for r being Real holds it . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ];
existence
ex b1 being ManySortedSet of REAL st
for r being Real holds b1 . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ]
proof
deffunc H1( Element of REAL ) -> object = [ { (uDyadic . ([/(($1 * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\(($1 * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ];
consider R being Function such that
A1: dom R = REAL and
A2: for x being Element of REAL holds R . x = H1(x) from FUNCT_1:sch 4();
reconsider R = R as ManySortedSet of REAL by PARTFUN1:def 2, A1, RELAT_1:def 18;
take R ; :: thesis: for r being Real holds R . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ]
let r be Real; :: thesis: R . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ]
r in REAL by XREAL_0:def 1;
hence R . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] by A2; :: thesis: verum
end;
uniqueness
for b1, b2 being ManySortedSet of REAL st ( for r being Real holds b1 . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] ) & ( for r being Real holds b2 . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] ) holds
b1 = b2
proof
deffunc H1( Real) -> object = [ { (uDyadic . ([/(($1 * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\(($1 * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ];
let M1, M2 be ManySortedSet of REAL ; :: thesis: ( ( for r being Real holds M1 . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] ) & ( for r being Real holds M2 . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] ) implies M1 = M2 )
assume that
A3: for r being Real holds M1 . r = H1(r) and
A4: for r being Real holds M2 . r = H1(r) ; :: thesis: M1 = M2
A5: ( dom M1 = REAL & REAL = dom M2 ) by PARTFUN1:def 2;
for o being object st o in REAL holds
M1 . o = M2 . o
proof
let o be object ; :: thesis: ( o in REAL implies M1 . o = M2 . o )
assume o in REAL ; :: thesis: M1 . o = M2 . o
then reconsider r = o as Real ;
M1 . o = H1(r) by A3;
hence M1 . o = M2 . o by A4; :: thesis: verum
end;
hence M1 = M2 by A5, FUNCT_1:2; :: thesis: verum
end;
end;

:: deftheorem Def6 defines sReal SURREALN:def 6 :
for b1 being ManySortedSet of REAL holds
( b1 = sReal iff for r being Real holds b1 . r = [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] );

theorem Th41: :: SURREALN:41
for n being Nat
for r being Real holds
( [/((r * (2 |^ n)) - 1)\] / (2 |^ n) < r & r < [\((r * (2 |^ n)) + 1)/] / (2 |^ n) )
proof
let n be Nat; :: thesis: for r being Real holds
( [/((r * (2 |^ n)) - 1)\] / (2 |^ n) < r & r < [\((r * (2 |^ n)) + 1)/] / (2 |^ n) )

let r be Real; :: thesis: ( [/((r * (2 |^ n)) - 1)\] / (2 |^ n) < r & r < [\((r * (2 |^ n)) + 1)/] / (2 |^ n) )
[/((r * (2 |^ n)) - 1)\] < ((r * (2 |^ n)) - 1) + 1 by INT_1:def 7;
then A1: [/((r * (2 |^ n)) - 1)\] / (2 |^ n) < (r * (2 |^ n)) / (2 |^ n) by XREAL_1:74;
((r * (2 |^ n)) + 1) - 1 < [\((r * (2 |^ n)) + 1)/] by INT_1:def 6;
then (r * (2 |^ n)) / (2 |^ n) < [\((r * (2 |^ n)) + 1)/] / (2 |^ n) by XREAL_1:74;
hence ( [/((r * (2 |^ n)) - 1)\] / (2 |^ n) < r & r < [\((r * (2 |^ n)) + 1)/] / (2 |^ n) ) by A1, XCMPLX_1:89; :: thesis: verum
end;

Lm10: for r being Real holds sReal . r in Day omega
proof
let r be Real; :: thesis: sReal . r in Day omega
set X1 = { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } ;
set X2 = { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } ;
A1: for o being object st o in { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } \/ { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } holds
ex O being Ordinal st
( O in NAT & o in Day O )
proof
let o be object ; :: thesis: ( o in { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } \/ { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } implies ex O being Ordinal st
( O in NAT & o in Day O ) )

assume o in { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } \/ { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } ; :: thesis: ex O being Ordinal st
( O in NAT & o in Day O )

then ( o in { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } or o in { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } ) by XBOOLE_0:def 3;
then consider n being Nat such that
A2: ( o = uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) or o = uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) ) ;
reconsider o = o as Surreal by A2;
take born o ; :: thesis: ( born o in NAT & o in Day (born o) )
born o is finite by Th37, A2;
hence ( born o in NAT & o in Day (born o) ) by SURREAL0:def 18, ORDINAL1:def 12; :: thesis: verum
end;
{ (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } << { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum }
proof
let L, R be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not L in { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } or not R in { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } or not R <= L )
assume A3: ( L in { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } & R in { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } ) ; :: thesis: not R <= L
consider n being Nat such that
A4: L = uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) by A3;
consider m being Nat such that
A5: R = uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m)) by A3;
( [/((r * (2 |^ n)) - 1)\] / (2 |^ n) < r & r < [\((r * (2 |^ m)) + 1)/] / (2 |^ m) ) by Th41;
then [/((r * (2 |^ n)) - 1)\] / (2 |^ n) < [\((r * (2 |^ m)) + 1)/] / (2 |^ m) by XXREAL_0:2;
hence not R <= L by A4, A5, Th24; :: thesis: verum
end;
then [ { (uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n))) where n is Nat : verum } , { (uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n))) where n is Nat : verum } ] in Day omega by A1, SURREAL0:46;
hence sReal . r in Day omega by Def6; :: thesis: verum
end;

registration
let r be Real;
cluster sReal . r -> surreal ;
coherence
sReal . r is surreal
by Lm10;
end;

definition
func uReal -> ManySortedSet of REAL means :Def7: :: SURREALN:def 7
for r being Real holds it . r = Unique_No (sReal . r);
existence
ex b1 being ManySortedSet of REAL st
for r being Real holds b1 . r = Unique_No (sReal . r)
proof
deffunc H1( Element of REAL ) -> set = Unique_No (sReal . $1);
consider R being Function such that
A1: dom R = REAL and
A2: for x being Element of REAL holds R . x = H1(x) from FUNCT_1:sch 4();
reconsider R = R as ManySortedSet of REAL by PARTFUN1:def 2, A1, RELAT_1:def 18;
take R ; :: thesis: for r being Real holds R . r = Unique_No (sReal . r)
let r be Real; :: thesis: R . r = Unique_No (sReal . r)
r in REAL by XREAL_0:def 1;
hence R . r = Unique_No (sReal . r) by A2; :: thesis: verum
end;
uniqueness
for b1, b2 being ManySortedSet of REAL st ( for r being Real holds b1 . r = Unique_No (sReal . r) ) & ( for r being Real holds b2 . r = Unique_No (sReal . r) ) holds
b1 = b2
proof
deffunc H1( Real) -> set = Unique_No (sReal . $1);
let M1, M2 be ManySortedSet of REAL ; :: thesis: ( ( for r being Real holds M1 . r = Unique_No (sReal . r) ) & ( for r being Real holds M2 . r = Unique_No (sReal . r) ) implies M1 = M2 )
assume that
A3: for r being Real holds M1 . r = H1(r) and
A4: for r being Real holds M2 . r = H1(r) ; :: thesis: M1 = M2
A5: ( dom M1 = REAL & REAL = dom M2 ) by PARTFUN1:def 2;
for o being object st o in REAL holds
M1 . o = M2 . o
proof
let o be object ; :: thesis: ( o in REAL implies M1 . o = M2 . o )
assume o in REAL ; :: thesis: M1 . o = M2 . o
then reconsider r = o as Real ;
M1 . o = H1(r) by A3;
hence M1 . o = M2 . o by A4; :: thesis: verum
end;
hence M1 = M2 by A5, FUNCT_1:2; :: thesis: verum
end;
end;

:: deftheorem Def7 defines uReal SURREALN:def 7 :
for b1 being ManySortedSet of REAL holds
( b1 = uReal iff for r being Real holds b1 . r = Unique_No (sReal . r) );

registration
let r be Real;
cluster uReal . r -> surreal ;
coherence
uReal . r is surreal
proof
uReal . r = Unique_No (sReal . r) by Def7;
hence uReal . r is surreal ; :: thesis: verum
end;
end;

registration
let r be Real;
cluster uReal . r -> uniq-surreal ;
coherence
uReal . r is uniq-surreal
proof
uReal . r = Unique_No (sReal . r) by Def7;
hence uReal . r is uniq-surreal ; :: thesis: verum
end;
end;

theorem Th42: :: SURREALN:42
for x being Surreal
for r being Real holds
( x in L_ (sReal . r) iff ex n being Nat st x = uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) )
proof
let x be Surreal; :: thesis: for r being Real holds
( x in L_ (sReal . r) iff ex n being Nat st x = uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) )

let r be Real; :: thesis: ( x in L_ (sReal . r) iff ex n being Nat st x = uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) )
sReal . r = [ { (uDyadic . ([/((r * (2 |^ k)) - 1)\] / (2 |^ k))) where k is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] by Def6;
hence ( x in L_ (sReal . r) iff ex n being Nat st x = uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) ) ; :: thesis: verum
end;

theorem Th43: :: SURREALN:43
for x being Surreal
for r being Real holds
( x in R_ (sReal . r) iff ex n being Nat st x = uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) )
proof
let x be Surreal; :: thesis: for r being Real holds
( x in R_ (sReal . r) iff ex n being Nat st x = uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) )

let r be Real; :: thesis: ( x in R_ (sReal . r) iff ex n being Nat st x = uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) )
sReal . r = [ { (uDyadic . ([/((r * (2 |^ k)) - 1)\] / (2 |^ k))) where k is Nat : verum } , { (uDyadic . ([\((r * (2 |^ m)) + 1)/] / (2 |^ m))) where m is Nat : verum } ] by Def6;
hence ( x in R_ (sReal . r) iff ex n being Nat st x = uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) ) ; :: thesis: verum
end;

theorem Th44: :: SURREALN:44
for n being Nat
for r being Real holds
( uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) < sReal . r & sReal . r < uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) )
proof
let n be Nat; :: thesis: for r being Real holds
( uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) < sReal . r & sReal . r < uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) )

let r be Real; :: thesis: ( uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) < sReal . r & sReal . r < uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) )
set R = sReal . r;
( L_ (sReal . r) << {(sReal . r)} & {(sReal . r)} << R_ (sReal . r) & sReal . r in {(sReal . r)} ) by SURREALO:11, TARSKI:def 1;
hence ( uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) < sReal . r & sReal . r < uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) ) by Th42, Th43; :: thesis: verum
end;

theorem Th45: :: SURREALN:45
for i1, i2 being Integer
for n1, n2 being Nat st i1 / (2 |^ n1) < i2 / (2 |^ n2) holds
( i1 / (2 |^ n1) < (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) & (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) <= (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) & (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) < i2 / (2 |^ n2) )
proof
let i1, i2 be Integer; :: thesis: for n1, n2 being Nat st i1 / (2 |^ n1) < i2 / (2 |^ n2) holds
( i1 / (2 |^ n1) < (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) & (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) <= (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) & (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) < i2 / (2 |^ n2) )

let n1, n2 be Nat; :: thesis: ( i1 / (2 |^ n1) < i2 / (2 |^ n2) implies ( i1 / (2 |^ n1) < (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) & (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) <= (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) & (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) < i2 / (2 |^ n2) ) )
assume i1 / (2 |^ n1) < i2 / (2 |^ n2) ; :: thesis: ( i1 / (2 |^ n1) < (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) & (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) <= (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) & (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) < i2 / (2 |^ n2) )
then (i1 * (2 |^ n2)) + 1 <= i2 * (2 |^ n1) by INT_1:7, XREAL_1:102;
then A1: ((i1 * (2 |^ n2)) + 1) * 2 <= (i2 * (2 |^ n1)) * 2 by XREAL_1:64;
2 |^ ((n1 + n2) + 1) = 2 |^ (n1 + (n2 + 1))
.= (2 |^ n1) * (2 |^ (n2 + 1)) by NEWTON:8
.= (2 |^ n1) * (2 * (2 |^ n2)) by NEWTON:6 ;
then ((i1 * (2 |^ n2)) * 2) / (2 |^ ((n1 + n2) + 1)) = (i1 * ((2 |^ n2) * 2)) / ((2 |^ n1) * (2 * (2 |^ n2)))
.= i1 / (2 |^ n1) by XCMPLX_1:91 ;
hence i1 / (2 |^ n1) < (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) by XREAL_1:29, XREAL_1:74; :: thesis: ( (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) <= (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) & (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) < i2 / (2 |^ n2) )
(((i1 * (2 |^ n2)) * 2) + 1) + 1 <= (i2 * (2 |^ n1)) * 2 by A1;
then ((i1 * (2 |^ n2)) * 2) + 1 <= ((i2 * (2 |^ n1)) * 2) - 1 by XREAL_1:19;
hence (((i1 * (2 |^ n2)) * 2) + 1) / (2 |^ ((n1 + n2) + 1)) <= (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) by XREAL_1:72; :: thesis: (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) < i2 / (2 |^ n2)
A2: ((i2 * (2 |^ n1)) * 2) - 1 < (((i2 * (2 |^ n1)) * 2) - 1) + 1 by XREAL_1:29;
2 |^ ((n1 + n2) + 1) = 2 |^ (n2 + (n1 + 1))
.= (2 |^ n2) * (2 |^ (n1 + 1)) by NEWTON:8
.= (2 |^ n2) * (2 * (2 |^ n1)) by NEWTON:6 ;
then ((i2 * (2 |^ n1)) * 2) / (2 |^ ((n1 + n2) + 1)) = (i2 * ((2 |^ n1) * 2)) / ((2 |^ n2) * (2 * (2 |^ n1)))
.= i2 / (2 |^ n2) by XCMPLX_1:91 ;
hence (((i2 * (2 |^ n1)) * 2) - 1) / (2 |^ ((n1 + n2) + 1)) < i2 / (2 |^ n2) by A2, XREAL_1:74; :: thesis: verum
end;

theorem Th46: :: SURREALN:46
for d being Dyadic holds
( sReal . d == uDyadic . d & uDyadic . d = uReal . d )
proof
let d be Dyadic; :: thesis: ( sReal . d == uDyadic . d & uDyadic . d = uReal . d )
set Rd = sReal . d;
set Dd = uDyadic . d;
consider i being Integer, k being Nat such that
A1: d = i / (2 |^ k) by Th18;
A2: ( L_ (sReal . d) << {(uDyadic . d)} & {(uDyadic . d)} << R_ (sReal . d) )
proof
thus L_ (sReal . d) << {(uDyadic . d)} :: thesis: {(uDyadic . d)} << R_ (sReal . d)
proof
let l, r be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in L_ (sReal . d) or not r in {(uDyadic . d)} or not r <= l )
assume A3: ( l in L_ (sReal . d) & r in {(uDyadic . d)} ) ; :: thesis: not r <= l
consider n being Nat such that
A4: l = uDyadic . ([/((d * (2 |^ n)) - 1)\] / (2 |^ n)) by A3, Th42;
l < uDyadic . d by Th41, A4, Th24;
hence not r <= l by A3, TARSKI:def 1; :: thesis: verum
end;
let l, r be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in {(uDyadic . d)} or not r in R_ (sReal . d) or not r <= l )
assume A5: ( l in {(uDyadic . d)} & r in R_ (sReal . d) ) ; :: thesis: not r <= l
consider n being Nat such that
A6: r = uDyadic . ([\((d * (2 |^ n)) + 1)/] / (2 |^ n)) by A5, Th43;
uDyadic . d < r by Th41, A6, Th24;
hence not r <= l by A5, TARSKI:def 1; :: thesis: verum
end;
for z being Surreal st L_ (sReal . d) << {z} & {z} << R_ (sReal . d) holds
born (uDyadic . d) c= born z
proof
born (uDyadic . d) is finite by Th37;
then reconsider B = born (uDyadic . d) as Nat ;
let z be Surreal; :: thesis: ( L_ (sReal . d) << {z} & {z} << R_ (sReal . d) implies born (uDyadic . d) c= born z )
assume A7: ( L_ (sReal . d) << {z} & {z} << R_ (sReal . d) ) ; :: thesis: born (uDyadic . d) c= born z
assume A8: not born (uDyadic . d) c= born z ; :: thesis: contradiction
then born z in Segm B by ORDINAL1:16;
then reconsider Z = born z as Nat ;
z in Day Z by SURREAL0:def 18;
then consider f being Dyadic such that
A9: ( z == uDyadic . f & uDyadic . f in Day Z ) by Th35;
consider j being Integer, m being Nat such that
A10: f = j / (2 |^ m) by Th18;
set F = uDyadic . f;
A11: ( L_ (sReal . d) << {(uDyadic . f)} & uDyadic . f in {(uDyadic . f)} & {(uDyadic . f)} << R_ (sReal . d) ) by A7, A9, SURREALO:17, SURREALO:18, TARSKI:def 1;
(m + k) + 1 = k + (m + 1) ;
then 2 |^ ((m + k) + 1) = (2 |^ k) * (2 |^ (m + 1)) by NEWTON:8
.= (2 |^ k) * (2 * (2 |^ m)) by NEWTON:6 ;
then A12: d * (2 |^ ((m + k) + 1)) = (d * (2 |^ k)) * (2 * (2 |^ m))
.= i * (2 * (2 |^ m)) by A1, XCMPLX_1:87 ;
per cases ( f < d or d < f or d = f ) by XXREAL_0:1;
suppose f < d ; :: thesis: contradiction
then ( f < (((j * (2 |^ k)) * 2) + 1) / (2 |^ ((m + k) + 1)) & (((j * (2 |^ k)) * 2) + 1) / (2 |^ ((m + k) + 1)) <= (((i * (2 |^ m)) * 2) - 1) / (2 |^ ((m + k) + 1)) ) by Th45, A10, A1;
then A13: f < (((i * (2 |^ m)) * 2) - 1) / (2 |^ ((m + k) + 1)) by XXREAL_0:2;
[/((d * (2 |^ ((m + k) + 1))) - 1)\] = (i * (2 * (2 |^ m))) - 1 by A12, INT_1:30;
then uDyadic . ((((i * (2 |^ m)) * 2) - 1) / (2 |^ ((m + k) + 1))) <= uDyadic . f by A11, Th42;
hence contradiction by A13, Th24; :: thesis: verum
end;
suppose d < f ; :: thesis: contradiction
then ( (((i * (2 |^ m)) * 2) + 1) / (2 |^ ((m + k) + 1)) <= (((j * (2 |^ k)) * 2) - 1) / (2 |^ ((m + k) + 1)) & (((j * (2 |^ k)) * 2) - 1) / (2 |^ ((m + k) + 1)) < f ) by Th45, A10, A1;
then A14: (((i * (2 |^ m)) * 2) + 1) / (2 |^ ((m + k) + 1)) < f by XXREAL_0:2;
[\((d * (2 |^ ((m + k) + 1))) + 1)/] = (i * (2 * (2 |^ m))) + 1 by A12, INT_1:25;
then uDyadic . f <= uDyadic . ((((i * (2 |^ m)) * 2) + 1) / (2 |^ ((m + k) + 1))) by A11, Th43;
hence contradiction by A14, Th24; :: thesis: verum
end;
suppose d = f ; :: thesis: contradiction
hence contradiction by A9, SURREAL0:def 18, A8; :: thesis: verum
end;
end;
end;
hence A15: sReal . d == uDyadic . d by A2, SURREALO:16; :: thesis: uDyadic . d = uReal . d
uReal . d = Unique_No (sReal . d) by Def7;
then sReal . d == uReal . d by SURREALO:def 10;
then uReal . d == uDyadic . d by A15, SURREALO:4;
hence uDyadic . d = uReal . d by SURREALO:50; :: thesis: verum
end;

theorem Th47: :: SURREALN:47
uReal . 0 = 0_No
proof
thus uReal . 0 = uDyadic . 0 by Th46
.= uInt . 0 by Def5
.= 0_No by Def1 ; :: thesis: verum
end;

theorem Th48: :: SURREALN:48
uReal . 1 = 1_No
proof
thus uReal . 1 = uDyadic . 1 by Th46
.= 1_No by Th11, Def5 ; :: thesis: verum
end;

theorem Th49: :: SURREALN:49
for r being Real holds born (sReal . r) c= omega
proof
let r be Real; :: thesis: born (sReal . r) c= omega
sReal . r in Day omega by Lm10;
hence born (sReal . r) c= omega by SURREAL0:def 18; :: thesis: verum
end;

theorem Th50: :: SURREALN:50
for r1, r2 being Real holds
( sReal . r1 < sReal . r2 iff r1 < r2 )
proof
let r1, r2 be Real; :: thesis: ( sReal . r1 < sReal . r2 iff r1 < r2 )
set R1 = sReal . r1;
set R2 = sReal . r2;
A1: ( L_ (sReal . r1) << {(sReal . r1)} & {(sReal . r1)} << R_ (sReal . r1) & sReal . r1 in {(sReal . r1)} & L_ (sReal . r2) << {(sReal . r2)} & {(sReal . r2)} << R_ (sReal . r2) & sReal . r2 in {(sReal . r2)} ) by SURREALO:11, TARSKI:def 1;
thus ( sReal . r1 < sReal . r2 implies r1 < r2 ) :: thesis: ( r1 < r2 implies sReal . r1 < sReal . r2 )
proof
assume A2: sReal . r1 < sReal . r2 ; :: thesis: r1 < r2
then A3: r1 <> r2 by SURREALO:3;
assume not r1 < r2 ; :: thesis: contradiction
then r2 < r1 by A3, XXREAL_0:1;
then 0 < r1 - r2 by XREAL_1:50;
then consider k being Nat such that
A4: 1 / (2 |^ k) <= r1 - r2 by PREPOWER:92;
set K2 = 2 |^ (k + 1);
2 |^ (k + 1) = 2 * (2 |^ k) by NEWTON:6;
then A5: (2 |^ (k + 1)) * (1 / (2 |^ k)) = 2 * ((2 |^ k) * (1 / (2 |^ k)))
.= 2 * 1 by XCMPLX_1:106 ;
A6: (2 |^ (k + 1)) * (r2 + (1 / (2 |^ k))) <= r1 * (2 |^ (k + 1)) by A4, XREAL_1:19, XREAL_1:64;
A7: uDyadic . ([/((r1 * (2 |^ (k + 1))) - 1)\] / (2 |^ (k + 1))) <= sReal . r1 by A1, Th42;
sReal . r2 <= uDyadic . ([\((r2 * (2 |^ (k + 1))) + 1)/] / (2 |^ (k + 1))) by A1, Th43;
then sReal . r1 < uDyadic . ([\((r2 * (2 |^ (k + 1))) + 1)/] / (2 |^ (k + 1))) by A2, SURREALO:4;
then uDyadic . ([/((r1 * (2 |^ (k + 1))) - 1)\] / (2 |^ (k + 1))) < uDyadic . ([\((r2 * (2 |^ (k + 1))) + 1)/] / (2 |^ (k + 1))) by A7, SURREALO:4;
then ( (r1 * (2 |^ (k + 1))) - 1 <= [/((r1 * (2 |^ (k + 1))) - 1)\] & [/((r1 * (2 |^ (k + 1))) - 1)\] < [\((r2 * (2 |^ (k + 1))) + 1)/] ) by Th24, XREAL_1:72, INT_1:def 7;
then ( (r1 * (2 |^ (k + 1))) - 1 < [\((r2 * (2 |^ (k + 1))) + 1)/] & [\((r2 * (2 |^ (k + 1))) + 1)/] <= (r2 * (2 |^ (k + 1))) + 1 ) by XXREAL_0:2, INT_1:def 6;
then (r1 * (2 |^ (k + 1))) - 1 < (r2 * (2 |^ (k + 1))) + 1 by XXREAL_0:2;
then ( ((r1 * (2 |^ (k + 1))) - 1) + 1 < ((r2 * (2 |^ (k + 1))) + 1) + 1 & ((r2 * (2 |^ (k + 1))) + 1) + 1 = (r2 * (2 |^ (k + 1))) + 2 ) by XREAL_1:6;
hence contradiction by A6, A5; :: thesis: verum
end;
assume r1 < r2 ; :: thesis: sReal . r1 < sReal . r2
then 0 < r2 - r1 by XREAL_1:50;
then consider k being Nat such that
A8: 1 / (2 |^ k) <= r2 - r1 by PREPOWER:92;
set K2 = 2 |^ (k + 1);
2 |^ (k + 1) = 2 * (2 |^ k) by NEWTON:6;
then A9: (2 |^ (k + 1)) * (1 / (2 |^ k)) = 2 * ((2 |^ k) * (1 / (2 |^ k)))
.= 2 * 1 by XCMPLX_1:106 ;
(2 |^ (k + 1)) * (r1 + (1 / (2 |^ k))) <= r2 * (2 |^ (k + 1)) by A8, XREAL_1:19, XREAL_1:64;
then (((2 |^ (k + 1)) * r1) + 2) - 1 <= (r2 * (2 |^ (k + 1))) - 1 by A9, XREAL_1:9;
then ( [\(((2 |^ (k + 1)) * r1) + 1)/] <= ((2 |^ (k + 1)) * r1) + 1 & ((2 |^ (k + 1)) * r1) + 1 <= (r2 * (2 |^ (k + 1))) - 1 ) by INT_1:def 6;
then ( [\(((2 |^ (k + 1)) * r1) + 1)/] <= (r2 * (2 |^ (k + 1))) - 1 & (r2 * (2 |^ (k + 1))) - 1 <= [/((r2 * (2 |^ (k + 1))) - 1)\] ) by XXREAL_0:2, INT_1:def 7;
then [\(((2 |^ (k + 1)) * r1) + 1)/] <= [/((r2 * (2 |^ (k + 1))) - 1)\] by XXREAL_0:2;
then A10: uDyadic . ([\(((2 |^ (k + 1)) * r1) + 1)/] / (2 |^ (k + 1))) <= uDyadic . ([/((r2 * (2 |^ (k + 1))) - 1)\] / (2 |^ (k + 1))) by XREAL_1:72, Th24;
sReal . r1 < uDyadic . ([\(((2 |^ (k + 1)) * r1) + 1)/] / (2 |^ (k + 1))) by A1, Th43;
then A11: sReal . r1 < uDyadic . ([/((r2 * (2 |^ (k + 1))) - 1)\] / (2 |^ (k + 1))) by A10, SURREALO:4;
uDyadic . ([/((r2 * (2 |^ (k + 1))) - 1)\] / (2 |^ (k + 1))) <= sReal . r2 by A1, Th42;
hence sReal . r1 < sReal . r2 by A11, SURREALO:4; :: thesis: verum
end;

theorem Th51: :: SURREALN:51
for r1, r2 being Real holds
( uReal . r1 < uReal . r2 iff r1 < r2 )
proof
let r1, r2 be Real; :: thesis: ( uReal . r1 < uReal . r2 iff r1 < r2 )
( uReal . r1 = Unique_No (sReal . r1) & uReal . r2 = Unique_No (sReal . r2) ) by Def7;
then A1: ( uReal . r1 == sReal . r1 & uReal . r2 == sReal . r2 ) by SURREALO:def 10;
thus ( uReal . r1 < uReal . r2 implies r1 < r2 ) :: thesis: ( r1 < r2 implies uReal . r1 < uReal . r2 )
proof
assume uReal . r1 < uReal . r2 ; :: thesis: r1 < r2
then uReal . r1 < sReal . r2 by A1, SURREALO:4;
then sReal . r1 < sReal . r2 by A1, SURREALO:4;
hence r1 < r2 by Th50; :: thesis: verum
end;
assume r1 < r2 ; :: thesis: uReal . r1 < uReal . r2
then uReal . r1 < sReal . r2 by A1, SURREALO:4, Th50;
hence uReal . r1 < uReal . r2 by A1, SURREALO:4; :: thesis: verum
end;

registration
let r be positive Real;
cluster uReal . r -> positive ;
coherence
uReal . r is positive
by Th51, Th47;
end;

theorem :: SURREALN:52
for r being Real holds
( born (uReal . r) = omega iff r is not Dyadic )
proof
let r be Real; :: thesis: ( born (uReal . r) = omega iff r is not Dyadic )
uReal . r = Unique_No (sReal . r) by Def7;
then A1: born_eq (sReal . r) = born_eq (uReal . r) by SURREALO:def 10, SURREALO:33;
A2: born_eq (uReal . r) = born (uReal . r) by SURREALO:48;
thus ( born (uReal . r) = omega implies not r is Dyadic ) :: thesis: ( r is not Dyadic implies born (uReal . r) = omega )
proof
assume A3: ( born (uReal . r) = omega & r is Dyadic ) ; :: thesis: contradiction
then reconsider r = r as Dyadic ;
born (uDyadic . r) is finite by Th37;
hence contradiction by Th46, A3; :: thesis: verum
end;
assume that
A4: r is not Dyadic and
A5: born (uReal . r) <> omega ; :: thesis: contradiction
( born_eq (sReal . r) c= born (sReal . r) & born (sReal . r) c= omega ) by SURREALO:def 5, Th49;
then born_eq (uReal . r) c< omega by A1, A2, A5, XBOOLE_0:def 8, XBOOLE_1:1;
then born_eq (uReal . r) in omega by ORDINAL1:11;
then reconsider B = born_eq (uReal . r) as Nat ;
consider x being Surreal such that
A6: ( born x = B & uReal . r == x ) by SURREALO:def 5;
x in Day B by A6, SURREAL0:def 18;
then consider d being Dyadic such that
A7: ( x == uDyadic . d & uDyadic . d in Day B ) by Th35;
( uReal . r == uDyadic . d & uDyadic . d == uReal . d ) by A7, A6, SURREALO:4, Th46;
then ( r <= d & d <= r ) by SURREALO:4, Th51;
hence contradiction by XXREAL_0:1, A4; :: thesis: verum
end;

theorem Th53: :: SURREALN:53
for r1, r2 being Real st r1 < r2 holds
ex n being Nat st [\((r1 * (2 |^ n)) + 1)/] / (2 |^ n) < r2
proof
let r1, r2 be Real; :: thesis: ( r1 < r2 implies ex n being Nat st [\((r1 * (2 |^ n)) + 1)/] / (2 |^ n) < r2 )
assume r1 < r2 ; :: thesis: ex n being Nat st [\((r1 * (2 |^ n)) + 1)/] / (2 |^ n) < r2
then 0 < r2 - r1 by XREAL_1:50;
then consider k being Nat such that
A1: 1 / (2 |^ k) <= r2 - r1 by PREPOWER:92;
take k + 1 ; :: thesis: [\((r1 * (2 |^ (k + 1))) + 1)/] / (2 |^ (k + 1)) < r2
set K2 = 2 |^ (k + 1);
2 |^ (k + 1) = 2 * (2 |^ k) by NEWTON:6;
then A2: (2 |^ (k + 1)) * (1 / (2 |^ k)) = 2 * ((2 |^ k) * (1 / (2 |^ k)))
.= 2 * 1 by XCMPLX_1:106 ;
(2 |^ (k + 1)) * (r1 + (1 / (2 |^ k))) <= r2 * (2 |^ (k + 1)) by A1, XREAL_1:19, XREAL_1:64;
then ( [\(((2 |^ (k + 1)) * r1) + 1)/] <= (((2 |^ (k + 1)) * r1) + 2) - 1 & (((2 |^ (k + 1)) * r1) + 2) - 1 < (r2 * (2 |^ (k + 1))) - 0 ) by A2, XREAL_1:15, INT_1:def 6;
then [\(((2 |^ (k + 1)) * r1) + 1)/] < (2 |^ (k + 1)) * r2 by XXREAL_0:2;
then ( [\(((2 |^ (k + 1)) * r1) + 1)/] / (2 |^ (k + 1)) < (r2 * (2 |^ (k + 1))) / (2 |^ (k + 1)) & (r2 * (2 |^ (k + 1))) / (2 |^ (k + 1)) = r2 ) by XREAL_1:74, XCMPLX_1:89;
hence [\((r1 * (2 |^ (k + 1))) + 1)/] / (2 |^ (k + 1)) < r2 ; :: thesis: verum
end;

theorem Th54: :: SURREALN:54
for r1, r2 being Real st r1 < r2 holds
ex n being Nat st r1 < [/((r2 * (2 |^ n)) - 1)\] / (2 |^ n)
proof
let r1, r2 be Real; :: thesis: ( r1 < r2 implies ex n being Nat st r1 < [/((r2 * (2 |^ n)) - 1)\] / (2 |^ n) )
assume r1 < r2 ; :: thesis: ex n being Nat st r1 < [/((r2 * (2 |^ n)) - 1)\] / (2 |^ n)
then 0 < r2 - r1 by XREAL_1:50;
then consider k being Nat such that
A1: 1 / (2 |^ k) <= r2 - r1 by PREPOWER:92;
take k + 1 ; :: thesis: r1 < [/((r2 * (2 |^ (k + 1))) - 1)\] / (2 |^ (k + 1))
set K2 = 2 |^ (k + 1);
2 |^ (k + 1) = 2 * (2 |^ k) by NEWTON:6;
then A2: (2 |^ (k + 1)) * (1 / (2 |^ k)) = 2 * ((2 |^ k) * (1 / (2 |^ k)))
.= 2 * 1 by XCMPLX_1:106 ;
(2 |^ (k + 1)) * (r1 + (1 / (2 |^ k))) <= r2 * (2 |^ (k + 1)) by A1, XREAL_1:19, XREAL_1:64;
then ( (((2 |^ (k + 1)) * r1) + 2) - 2 < (r2 * (2 |^ (k + 1))) - 1 & (r2 * (2 |^ (k + 1))) - 1 <= [/(((2 |^ (k + 1)) * r2) - 1)\] ) by A2, XREAL_1:15, INT_1:def 7;
then (2 |^ (k + 1)) * r1 < [/(((2 |^ (k + 1)) * r2) - 1)\] by XXREAL_0:2;
then ( r1 = (r1 * (2 |^ (k + 1))) / (2 |^ (k + 1)) & (r1 * (2 |^ (k + 1))) / (2 |^ (k + 1)) < [/(((2 |^ (k + 1)) * r2) - 1)\] / (2 |^ (k + 1)) ) by XREAL_1:74, XCMPLX_1:89;
hence r1 < [/((r2 * (2 |^ (k + 1))) - 1)\] / (2 |^ (k + 1)) ; :: thesis: verum
end;

Lm11: for r1, r2 being Real holds (L_ (sReal . r1)) ++ {(sReal . r2)} << {(sReal . (r1 + r2))}
proof
let r1, r2 be Real; :: thesis: (L_ (sReal . r1)) ++ {(sReal . r2)} << {(sReal . (r1 + r2))}
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in (L_ (sReal . r1)) ++ {(sReal . r2)} or not b in {(sReal . (r1 + r2))} or not b <= a )
assume A1: ( a in (L_ (sReal . r1)) ++ {(sReal . r2)} & b in {(sReal . (r1 + r2))} ) ; :: thesis: not b <= a
consider a1, a2 being Surreal such that
A2: ( a1 in L_ (sReal . r1) & a2 in {(sReal . r2)} & a = a1 + a2 ) by A1, SURREALR:def 8;
A3: a2 = sReal . r2 by A2, TARSKI:def 1;
consider n being Nat such that
A4: a1 = uDyadic . ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) by A2, Th42;
set d = [/((r1 * (2 |^ n)) - 1)\] / (2 |^ n);
0 < r1 - ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) by Th41, XREAL_1:50;
then r2 + 0 < (r1 - ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n))) + r2 by XREAL_1:8;
then consider k being Nat such that
A5: [\((r2 * (2 |^ k)) + 1)/] / (2 |^ k) < (r1 - ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n))) + r2 by Th53;
A6: a < a1 + (uDyadic . ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) by A3, Th44, A2, SURREALR:44;
( a1 + (uDyadic . ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) == uDyadic . (([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) & uDyadic . (([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) == sReal . (([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) ) by A4, Th39, Th46;
then a1 + (uDyadic . ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) == sReal . (([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) by SURREALO:4;
then A7: a <= sReal . (([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k))) by A6, SURREALO:4;
( ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ([\((r2 * (2 |^ k)) + 1)/] / (2 |^ k)) < ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ((r1 - ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n))) + r2) & ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n)) + ((r1 - ([/((r1 * (2 |^ n)) - 1)\] / (2 |^ n))) + r2) = r1 + r2 ) by A5, XREAL_1:6;
then a < sReal . (r1 + r2) by Th50, A7, SURREALO:4;
hence not b <= a by A1, TARSKI:def 1; :: thesis: verum
end;

Lm12: for r1, r2 being Real holds {(sReal . (r1 + r2))} << (R_ (sReal . r1)) ++ {(sReal . r2)}
proof
let r1, r2 be Real; :: thesis: {(sReal . (r1 + r2))} << (R_ (sReal . r1)) ++ {(sReal . r2)}
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in {(sReal . (r1 + r2))} or not b in (R_ (sReal . r1)) ++ {(sReal . r2)} or not b <= a )
assume A1: ( a in {(sReal . (r1 + r2))} & b in (R_ (sReal . r1)) ++ {(sReal . r2)} ) ; :: thesis: not b <= a
consider b1, b2 being Surreal such that
A2: ( b1 in R_ (sReal . r1) & b2 in {(sReal . r2)} & b = b1 + b2 ) by A1, SURREALR:def 8;
A3: b2 = sReal . r2 by A2, TARSKI:def 1;
consider n being Nat such that
A4: b1 = uDyadic . ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) by A2, Th43;
set d = [\((r1 * (2 |^ n)) + 1)/] / (2 |^ n);
0 < ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) - r1 by Th41, XREAL_1:50;
then ( ((r1 + r2) - ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n))) + 0 < (([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) - r1) + ((r1 + r2) - ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n))) & (([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) - r1) + ((r1 + r2) - ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n))) = r2 ) by XREAL_1:8;
then consider k being Nat such that
A5: (r1 + r2) - ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) < [/((r2 * (2 |^ k)) - 1)\] / (2 |^ k) by Th54;
A6: b1 + (uDyadic . ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) < b by A3, Th44, A2, SURREALR:44;
( b1 + (uDyadic . ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) == uDyadic . (([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) & uDyadic . (([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) == sReal . (([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) ) by A4, Th39, Th46;
then b1 + (uDyadic . ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) == sReal . (([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) by SURREALO:4;
then A7: sReal . (([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k))) <= b by A6, SURREALO:4;
( r1 + r2 = ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ((r1 + r2) - ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n))) & ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ((r1 + r2) - ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n))) < ([\((r1 * (2 |^ n)) + 1)/] / (2 |^ n)) + ([/((r2 * (2 |^ k)) - 1)\] / (2 |^ k)) ) by A5, XREAL_1:6;
then sReal . (r1 + r2) < b by Th50, A7, SURREALO:4;
hence not b <= a by A1, TARSKI:def 1; :: thesis: verum
end;

Lm13: for r1, r2 being Real holds (sReal . r1) + (sReal . r2) == sReal . (r1 + r2)
proof
let r1, r2 be Real; :: thesis: (sReal . r1) + (sReal . r2) == sReal . (r1 + r2)
set r12 = r1 + r2;
set R1 = sReal . r1;
set R2 = sReal . r2;
set R12 = sReal . (r1 + r2);
A1: (sReal . r1) + (sReal . r2) = [(((L_ (sReal . r1)) ++ {(sReal . r2)}) \/ ({(sReal . r1)} ++ (L_ (sReal . r2)))),(((R_ (sReal . r1)) ++ {(sReal . r2)}) \/ ({(sReal . r1)} ++ (R_ (sReal . r2))))] by SURREALR:28;
( (L_ (sReal . r1)) ++ {(sReal . r2)} << {(sReal . (r1 + r2))} & {(sReal . r1)} ++ (L_ (sReal . r2)) = (L_ (sReal . r2)) ++ {(sReal . r1)} & (L_ (sReal . r2)) ++ {(sReal . r1)} << {(sReal . (r1 + r2))} ) by Lm11;
then A2: L_ ((sReal . r1) + (sReal . r2)) << {(sReal . (r1 + r2))} by A1, SURREAL0:41;
{((sReal . r1) + (sReal . r2))} << R_ (sReal . (r1 + r2))
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in {((sReal . r1) + (sReal . r2))} or not b in R_ (sReal . (r1 + r2)) or not b <= a )
assume A3: ( a in {((sReal . r1) + (sReal . r2))} & b in R_ (sReal . (r1 + r2)) ) ; :: thesis: not b <= a
A4: a = (sReal . r1) + (sReal . r2) by A3, TARSKI:def 1;
consider n being Nat such that
A5: b = uDyadic . ([\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n)) by A3, Th43;
set d = [\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n);
set r = (([\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 + r2)) / 2;
A6: 0 < ([\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 + r2) by Th41, XREAL_1:50;
then consider n1 being Nat such that
A7: [\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1) < r1 + ((([\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 + r2)) / 2) by Th53, XREAL_1:29;
consider n2 being Nat such that
A8: [\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2) < r2 + ((([\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 + r2)) / 2) by A6, XREAL_1:29, Th53;
( sReal . r1 <= uDyadic . ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) & sReal . r2 < uDyadic . ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) ) by Th44;
then A9: (sReal . r1) + (sReal . r2) < (uDyadic . ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1))) + (uDyadic . ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) by SURREALR:44;
A10: (uDyadic . ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1))) + (uDyadic . ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) == uDyadic . (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) + ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) by Th39;
(r1 + ((([\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 + r2)) / 2)) + (r2 + ((([\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 + r2)) / 2)) = [\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n) ;
then ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) + ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) < [\(((r1 + r2) * (2 |^ n)) + 1)/] / (2 |^ n) by A7, A8, XREAL_1:8;
then (uDyadic . ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1))) + (uDyadic . ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) <= b by SURREALO:4, A10, A5, Th24;
hence not b <= a by A4, SURREALO:4, A9; :: thesis: verum
end;
hence (sReal . r1) + (sReal . r2) <= sReal . (r1 + r2) by SURREAL0:43, A2; :: according to SURREALO:def 2 :: thesis: sReal . (r1 + r2) <= (sReal . r1) + (sReal . r2)
A11: L_ (sReal . (r1 + r2)) << {((sReal . r1) + (sReal . r2))}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in L_ (sReal . (r1 + r2)) or not b in {((sReal . r1) + (sReal . r2))} or not b <= a )
assume A12: ( a in L_ (sReal . (r1 + r2)) & b in {((sReal . r1) + (sReal . r2))} ) ; :: thesis: not b <= a
A13: b = (sReal . r1) + (sReal . r2) by A12, TARSKI:def 1;
consider n being Nat such that
A14: a = uDyadic . ([/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n)) by A12, Th42;
set d = [/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n);
set r = ((r1 + r2) - ([/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n))) / 2;
A15: 0 < (r1 + r2) - ([/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n)) by Th41, XREAL_1:50;
then consider n1 being Nat such that
A16: r1 - (((r1 + r2) - ([/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n))) / 2) < [/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1) by XREAL_1:44, Th54;
consider n2 being Nat such that
A17: r2 - (((r1 + r2) - ([/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n))) / 2) < [/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2) by A15, XREAL_1:44, Th54;
( uDyadic . ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) <= sReal . r1 & uDyadic . ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) < sReal . r2 ) by Th44;
then A18: (uDyadic . ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1))) + (uDyadic . ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) < (sReal . r1) + (sReal . r2) by SURREALR:44;
A19: (uDyadic . ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1))) + (uDyadic . ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) == uDyadic . (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) + ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) by Th39;
(r1 - (((r1 + r2) - ([/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n))) / 2)) + (r2 - (((r1 + r2) - ([/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n))) / 2)) = [/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n) ;
then [/(((r1 + r2) * (2 |^ n)) - 1)\] / (2 |^ n) < ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) + ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) by A16, A17, XREAL_1:8;
then a <= (uDyadic . ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1))) + (uDyadic . ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) by A14, Th24, SURREALO:4, A19;
hence not b <= a by A13, SURREALO:4, A18; :: thesis: verum
end;
( {(sReal . (r1 + r2))} << (R_ (sReal . r1)) ++ {(sReal . r2)} & {(sReal . (r1 + r2))} << {(sReal . r1)} ++ (R_ (sReal . r2)) ) by Lm12;
then {(sReal . (r1 + r2))} << R_ ((sReal . r1) + (sReal . r2)) by A1, SURREAL0:42;
hence sReal . (r1 + r2) <= (sReal . r1) + (sReal . r2) by A11, SURREAL0:43; :: thesis: verum
end;

theorem Th55: :: SURREALN:55
for r1, r2 being Real holds (uReal . r1) + (uReal . r2) == uReal . (r1 + r2)
proof
let r1, r2 be Real; :: thesis: (uReal . r1) + (uReal . r2) == uReal . (r1 + r2)
( uReal . r1 = Unique_No (sReal . r1) & uReal . r2 = Unique_No (sReal . r2) ) by Def7;
then ( sReal . r1 == uReal . r1 & sReal . r2 == uReal . r2 ) by SURREALO:def 10;
then ( (uReal . r1) + (uReal . r2) == (sReal . r1) + (sReal . r2) & (sReal . r1) + (sReal . r2) == sReal . (r1 + r2) ) by SURREALR:43, Lm13;
then A1: (uReal . r1) + (uReal . r2) == sReal . (r1 + r2) by SURREALO:4;
uReal . (r1 + r2) = Unique_No (sReal . (r1 + r2)) by Def7;
then sReal . (r1 + r2) == uReal . (r1 + r2) by SURREALO:def 10;
hence (uReal . r1) + (uReal . r2) == uReal . (r1 + r2) by A1, SURREALO:4; :: thesis: verum
end;

Lm14: for r being Real holds - (sReal . r) == sReal . (- r)
proof
let r be Real; :: thesis: - (sReal . r) == sReal . (- r)
( (sReal . r) + (sReal . (- r)) == sReal . (r + (- r)) & sReal . (r + (- r)) == uDyadic . 0 ) by Lm13, Th46;
then ( (sReal . r) + (sReal . (- r)) == uDyadic . 0 & uDyadic . 0 = uInt . 0 ) by SURREALO:4, Def5;
then 0_No == (sReal . r) + (sReal . (- r)) by Def1;
then ( - (sReal . r) = (- (sReal . r)) + 0_No & (- (sReal . r)) + 0_No == ((sReal . r) + (sReal . (- r))) + (- (sReal . r)) ) by SURREALR:43;
then A1: - (sReal . r) == (sReal . (- r)) + ((sReal . r) + (- (sReal . r))) by SURREALR:37;
(sReal . r) - (sReal . r) == 0_No by SURREALR:39;
then (sReal . (- r)) + ((sReal . r) + (- (sReal . r))) == (sReal . (- r)) + 0_No by SURREALR:43;
hence - (sReal . r) == sReal . (- r) by A1, SURREALO:4; :: thesis: verum
end;

theorem Th56: :: SURREALN:56
for r being Real holds - (uReal . r) == uReal . (- r)
proof
let r be Real; :: thesis: - (uReal . r) == uReal . (- r)
A1: ( uReal . r = Unique_No (sReal . r) & uReal . (- r) = Unique_No (sReal . (- r)) ) by Def7;
then A2: ( sReal . r == uReal . r & sReal . (- r) == uReal . (- r) & - (sReal . r) == sReal . (- r) ) by Lm14, SURREALO:def 10;
- (uReal . r) == - (sReal . r) by A1, SURREALR:65, SURREALO:def 10;
then - (uReal . r) == sReal . (- r) by A2, SURREALO:4;
hence - (uReal . r) == uReal . (- r) by A2, SURREALO:4; :: thesis: verum
end;

Lm15: for i being Integer
for r being Real holds sReal . (r * i) == (sReal . r) * (uDyadic . i)

proof
let i be Integer; :: thesis: for r being Real holds sReal . (r * i) == (sReal . r) * (uDyadic . i)
let r be Real; :: thesis: sReal . (r * i) == (sReal . r) * (uDyadic . i)
defpred S1[ Nat] means sReal . ($1 * r) == (sReal . r) * (uDyadic . $1);
A1: uDyadic . 1 = 1_No by Th11, Def5;
A2: ( uDyadic . 0 = uInt . 0 & uInt . 0 = 0_No ) by Def5, Def1;
A3: S1[ 0 ] by A2, Th46;
A4: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A5: S1[n] ; :: thesis: S1[n + 1]
(n + 1) * r = (n * r) + r ;
then A6: sReal . ((n + 1) * r) == (sReal . (n * r)) + (sReal . r) by Lm13;
( (sReal . (n * r)) + (sReal . r) == ((sReal . r) * (uDyadic . n)) + ((sReal . r) * 1_No) & ((sReal . r) * (uDyadic . n)) + ((sReal . r) * 1_No) == (sReal . r) * ((uDyadic . n) + 1_No) ) by A5, SURREALR:66, SURREALR:67;
then (sReal . (n * r)) + (sReal . r) == (sReal . r) * ((uDyadic . n) + 1_No) by SURREALO:4;
then A7: sReal . ((n + 1) * r) == (sReal . r) * ((uDyadic . n) + 1_No) by A6, SURREALO:4;
(sReal . r) * ((uDyadic . n) + 1_No) == (sReal . r) * (uDyadic . (n + 1)) by SURREALR:51, A1, Th39;
then sReal . ((n + 1) * r) == (sReal . r) * (uDyadic . (n + 1)) by A7, SURREALO:4;
hence S1[n + 1] ; :: thesis: verum
end;
A8: for n being Nat holds S1[n] from NAT_1:sch 2(A3, A4);
consider n being Nat such that
A9: ( n = i or i = - n ) by INT_1:2;
per cases ( n = i or i = - n ) by A9;
suppose n = i ; :: thesis: sReal . (r * i) == (sReal . r) * (uDyadic . i)
hence sReal . (r * i) == (sReal . r) * (uDyadic . i) by A8; :: thesis: verum
end;
suppose A10: i = - n ; :: thesis: sReal . (r * i) == (sReal . r) * (uDyadic . i)
then A11: - (uDyadic . n) = uDyadic . i by Th27;
A12: ( - (sReal . (n * r)) == - ((sReal . r) * (uDyadic . n)) & - ((sReal . r) * (uDyadic . n)) = (sReal . r) * (- (uDyadic . n)) ) by A8, SURREALR:58, SURREALR:65;
- (sReal . (n * r)) == sReal . (- (n * r)) by Lm14;
hence sReal . (r * i) == (sReal . r) * (uDyadic . i) by A10, A11, A12, SURREALO:4; :: thesis: verum
end;
end;
end;

Lm16: for r being Real holds sReal . (r / 2) == (sReal . r) * (uDyadic . (1 / (2 |^ 1)))
proof
let r be Real; :: thesis: sReal . (r / 2) == (sReal . r) * (uDyadic . (1 / (2 |^ 1)))
set r2 = r / 2;
(r / 2) + (r / 2) = r ;
then A1: (sReal . (r / 2)) + (sReal . (r / 2)) == sReal . r by Lm13;
1_No * (sReal . (r / 2)) = sReal . (r / 2) ;
then A2: (sReal . (r / 2)) + (sReal . (r / 2)) == (sReal . (r / 2)) * (1_No + 1_No) by SURREALR:67;
( 1_No + 1_No = uInt . (1 + 1) & uInt . (1 + 1) = uDyadic . 2 ) by Th11, Def5, Th13;
then sReal . r == (sReal . (r / 2)) * (uDyadic . 2) by A1, A2, SURREALO:4;
then ( (sReal . r) * (uDyadic . (1 / (2 |^ 1))) == ((sReal . (r / 2)) * (uDyadic . 2)) * (uDyadic . (1 / (2 |^ 1))) & ((sReal . (r / 2)) * (uDyadic . 2)) * (uDyadic . (1 / (2 |^ 1))) == (sReal . (r / 2)) * ((uDyadic . 2) * (uDyadic . (1 / (2 |^ 1)))) ) by SURREALR:51, SURREALR:69;
then A3: (sReal . r) * (uDyadic . (1 / (2 |^ 1))) == (sReal . (r / 2)) * ((uDyadic . 2) * (uDyadic . (1 / (2 |^ 1)))) by SURREALO:4;
2 * (1 / (2 |^ 1)) = 1 ;
then ( (uDyadic . 2) * (uDyadic . (1 / (2 |^ 1))) == uDyadic . 1 & uDyadic . 1 = uInt . 1 ) by Th40, Def5;
then ( (sReal . (r / 2)) * ((uDyadic . 2) * (uDyadic . (1 / (2 |^ 1)))) == (sReal . (r / 2)) * 1_No & (sReal . (r / 2)) * 1_No = sReal . (r / 2) ) by Th11, SURREALR:51;
hence sReal . (r / 2) == (sReal . r) * (uDyadic . (1 / (2 |^ 1))) by A3, SURREALO:4; :: thesis: verum
end;

Lm17: for d being Dyadic
for r being Real holds sReal . (r * d) == (sReal . r) * (uDyadic . d)

proof
let d be Dyadic; :: thesis: for r being Real holds sReal . (r * d) == (sReal . r) * (uDyadic . d)
let r be Real; :: thesis: sReal . (r * d) == (sReal . r) * (uDyadic . d)
defpred S1[ Nat] means for r being Real
for d being Dyadic st d in DYADIC $1 holds
sReal . (r * d) == (sReal . r) * (uDyadic . d);
A1: S1[ 0 ] by Lm15, Th21;
A2: for n being Nat st S1[n] holds
S1[n + 1]
proof
let n be Nat; :: thesis: ( S1[n] implies S1[n + 1] )
assume A3: S1[n] ; :: thesis: S1[n + 1]
let r be Real; :: thesis: for d being Dyadic st d in DYADIC (n + 1) holds
sReal . (r * d) == (sReal . r) * (uDyadic . d)

let d be Dyadic; :: thesis: ( d in DYADIC (n + 1) implies sReal . (r * d) == (sReal . r) * (uDyadic . d) )
assume A4: d in DYADIC (n + 1) ; :: thesis: sReal . (r * d) == (sReal . r) * (uDyadic . d)
consider i being Integer such that
A5: d = i / (2 |^ (n + 1)) by A4, Def4;
A6: i * 1 = i ;
A7: i / (2 |^ n) in DYADIC n by Def4;
2 |^ (n + 1) = 2 * (2 |^ n) by NEWTON:6;
then A8: d = (i / (2 |^ n)) * (1 / 2) by A6, A5, XCMPLX_1:76;
then r * d = (r / 2) * (i / (2 |^ n)) ;
then A9: sReal . (r * d) == (sReal . (r / 2)) * (uDyadic . (i / (2 |^ n))) by A7, A3;
( (sReal . (r / 2)) * (uDyadic . (i / (2 |^ n))) == ((sReal . r) * (uDyadic . (1 / (2 |^ 1)))) * (uDyadic . (i / (2 |^ n))) & ((sReal . r) * (uDyadic . (1 / (2 |^ 1)))) * (uDyadic . (i / (2 |^ n))) == (sReal . r) * ((uDyadic . (1 / (2 |^ 1))) * (uDyadic . (i / (2 |^ n)))) ) by Lm16, SURREALR:51, SURREALR:69;
then A10: (sReal . (r / 2)) * (uDyadic . (i / (2 |^ n))) == (sReal . r) * ((uDyadic . (1 / (2 |^ 1))) * (uDyadic . (i / (2 |^ n)))) by SURREALO:4;
(sReal . r) * ((uDyadic . (1 / (2 |^ 1))) * (uDyadic . (i / (2 |^ n)))) == (sReal . r) * (uDyadic . d) by A8, Th40, SURREALR:51;
then (sReal . (r / 2)) * (uDyadic . (i / (2 |^ n))) == (sReal . r) * (uDyadic . d) by A10, SURREALO:4;
hence sReal . (r * d) == (sReal . r) * (uDyadic . d) by A9, SURREALO:4; :: thesis: verum
end;
A11: for n being Nat holds S1[n] from NAT_1:sch 2(A1, A2);
consider i being Integer, n being Nat such that
A12: d = i / (2 |^ n) by Th18;
d in DYADIC n by A12, Def4;
hence sReal . (r * d) == (sReal . r) * (uDyadic . d) by A11; :: thesis: verum
end;

Lm18: for r1, r2 being Real
for d1, d2 being Dyadic holds (((uDyadic . d1) * (sReal . r2)) + ((sReal . r1) * (uDyadic . d2))) + (- ((uDyadic . d1) * (uDyadic . d2))) == sReal . (((d1 * r2) + (r1 * d2)) - (d1 * d2))

proof
let r1, r2 be Real; :: thesis: for d1, d2 being Dyadic holds (((uDyadic . d1) * (sReal . r2)) + ((sReal . r1) * (uDyadic . d2))) + (- ((uDyadic . d1) * (uDyadic . d2))) == sReal . (((d1 * r2) + (r1 * d2)) - (d1 * d2))
let d1, d2 be Dyadic; :: thesis: (((uDyadic . d1) * (sReal . r2)) + ((sReal . r1) * (uDyadic . d2))) + (- ((uDyadic . d1) * (uDyadic . d2))) == sReal . (((d1 * r2) + (r1 * d2)) - (d1 * d2))
( (uDyadic . d1) * (sReal . r2) == sReal . (d1 * r2) & (sReal . r1) * (uDyadic . d2) == sReal . (r1 * d2) ) by Lm17;
then ( ((uDyadic . d1) * (sReal . r2)) + ((sReal . r1) * (uDyadic . d2)) == (sReal . (d1 * r2)) + (sReal . (r1 * d2)) & (sReal . (d1 * r2)) + (sReal . (r1 * d2)) == sReal . ((d1 * r2) + (r1 * d2)) ) by SURREALR:43, Lm13;
then A1: ((uDyadic . d1) * (sReal . r2)) + ((sReal . r1) * (uDyadic . d2)) == sReal . ((d1 * r2) + (r1 * d2)) by SURREALO:4;
( (uDyadic . d1) * (uDyadic . d2) == uDyadic . (d1 * d2) & uDyadic . (d1 * d2) == sReal . (d1 * d2) ) by Th40, Th46;
then (uDyadic . d1) * (uDyadic . d2) == sReal . (d1 * d2) by SURREALO:4;
then ( - ((uDyadic . d1) * (uDyadic . d2)) == - (sReal . (d1 * d2)) & - (sReal . (d1 * d2)) == sReal . (- (d1 * d2)) ) by Lm14, SURREALR:10;
then - ((uDyadic . d1) * (uDyadic . d2)) == sReal . (- (d1 * d2)) by SURREALO:4;
then ( (((uDyadic . d1) * (sReal . r2)) + ((sReal . r1) * (uDyadic . d2))) + (- ((uDyadic . d1) * (uDyadic . d2))) == (sReal . ((d1 * r2) + (r1 * d2))) + (sReal . (- (d1 * d2))) & (sReal . ((d1 * r2) + (r1 * d2))) + (sReal . (- (d1 * d2))) == sReal . (((d1 * r2) + (r1 * d2)) + (- (d1 * d2))) ) by A1, SURREALR:43, Lm13;
hence (((uDyadic . d1) * (sReal . r2)) + ((sReal . r1) * (uDyadic . d2))) + (- ((uDyadic . d1) * (uDyadic . d2))) == sReal . (((d1 * r2) + (r1 * d2)) - (d1 * d2)) by SURREALO:4; :: thesis: verum
end;

Lm19: for r1, r2 being Real holds (sReal . r1) * (sReal . r2) == sReal . (r1 * r2)
proof
let r1, r2 be Real; :: thesis: (sReal . r1) * (sReal . r2) == sReal . (r1 * r2)
set r12 = r1 * r2;
set R1 = sReal . r1;
set R2 = sReal . r2;
set R12 = sReal . (r1 * r2);
A1: (sReal . r1) * (sReal . r2) = [((comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2)))) \/ (comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2))))),((comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2)))) \/ (comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2)))))] by SURREALR:50;
A2: comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2))) << {(sReal . (r1 * r2))}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2))) or not b in {(sReal . (r1 * r2))} or not b <= a )
assume A3: ( a in comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2))) & b in {(sReal . (r1 * r2))} ) ; :: thesis: not b <= a
consider x1, y1 being Surreal such that
A4: ( a = ((x1 * (sReal . r2)) + ((sReal . r1) * y1)) - (x1 * y1) & x1 in L_ (sReal . r1) & y1 in L_ (sReal . r2) ) by A3, SURREALR:def 15;
consider n1 being Nat such that
A5: x1 = uDyadic . ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) by Th42, A4;
set d1 = [/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1);
consider n2 being Nat such that
A6: y1 = uDyadic . ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) by Th42, A4;
set d2 = [/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2);
A7: a == sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) by A4, A5, A6, Lm18;
( 0 < r1 - ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) & 0 < r2 - ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) ) by Th41, XREAL_1:50;
then 0 < (r1 - ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1))) * (r2 - ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) ;
then 0 < (r1 * r2) - (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) * r1)) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) ;
then consider k being Nat such that
A8: ((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) * r1)) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) < [/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k) by Th54, XREAL_1:47;
set d = [/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k);
( sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) < sReal . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) & sReal . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) == uDyadic . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) ) by A8, Th50, Th46;
then ( sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) <= uDyadic . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) & uDyadic . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) < sReal . (r1 * r2) ) by Th44, SURREALO:4;
then ( sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) < sReal . (r1 * r2) & sReal . (r1 * r2) = b ) by SURREALO:4, A3, TARSKI:def 1;
hence not b <= a by A7, SURREALO:4; :: thesis: verum
end;
comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2))) << {(sReal . (r1 * r2))}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2))) or not b in {(sReal . (r1 * r2))} or not b <= a )
assume A9: ( a in comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2))) & b in {(sReal . (r1 * r2))} ) ; :: thesis: not b <= a
consider x1, y1 being Surreal such that
A10: ( a = ((x1 * (sReal . r2)) + ((sReal . r1) * y1)) - (x1 * y1) & x1 in R_ (sReal . r1) & y1 in R_ (sReal . r2) ) by A9, SURREALR:def 15;
consider n1 being Nat such that
A11: x1 = uDyadic . ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) by Th43, A10;
set d1 = [\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1);
consider n2 being Nat such that
A12: y1 = uDyadic . ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) by Th43, A10;
set d2 = [\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2);
A13: a == sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) by A10, A11, A12, Lm18;
( r1 - ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) < 0 & r2 - ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) < 0 ) by Th41, XREAL_1:49;
then 0 < (r1 - ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1))) * (r2 - ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) ;
then 0 < (r1 * r2) - (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) * r1)) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) ;
then consider k being Nat such that
A14: ((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) * r1)) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) < [/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k) by Th54, XREAL_1:47;
set d = [/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k);
( sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) < sReal . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) & sReal . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) == uDyadic . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) ) by A14, Th50, Th46;
then ( sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) <= uDyadic . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) & uDyadic . ([/(((r1 * r2) * (2 |^ k)) - 1)\] / (2 |^ k)) < sReal . (r1 * r2) ) by Th44, SURREALO:4;
then ( sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) < sReal . (r1 * r2) & sReal . (r1 * r2) = b ) by SURREALO:4, A9, TARSKI:def 1;
hence not b <= a by A13, SURREALO:4; :: thesis: verum
end;
then A15: L_ ((sReal . r1) * (sReal . r2)) << {(sReal . (r1 * r2))} by A1, A2, SURREAL0:41;
A16: {(sReal . (r1 * r2))} << comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2)))
proof
let b, a be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not b in {(sReal . (r1 * r2))} or not a in comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2))) or not a <= b )
assume A17: ( b in {(sReal . (r1 * r2))} & a in comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2))) ) ; :: thesis: not a <= b
consider x1, y1 being Surreal such that
A18: ( a = ((x1 * (sReal . r2)) + ((sReal . r1) * y1)) - (x1 * y1) & x1 in L_ (sReal . r1) & y1 in R_ (sReal . r2) ) by A17, SURREALR:def 15;
consider n1 being Nat such that
A19: x1 = uDyadic . ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) by Th42, A18;
set d1 = [/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1);
consider n2 being Nat such that
A20: y1 = uDyadic . ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) by Th43, A18;
set d2 = [\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2);
A21: a == sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) by A18, A19, A20, Lm18;
( 0 < r1 - ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) & r2 - ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) < 0 ) by Th41, XREAL_1:49, XREAL_1:50;
then (r1 - ([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1))) * (r2 - ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) < 0 ;
then (r1 * r2) - (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) * r1)) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) < 0 ;
then consider k being Nat such that
A22: [\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k) < ((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)) * r1)) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2))) by Th53, XREAL_1:48;
set d = [\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k);
( uDyadic . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) == sReal . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) & sReal . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) < sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) ) by A22, Th50, Th46;
then ( sReal . (r1 * r2) < uDyadic . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) & uDyadic . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) <= sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) ) by Th44, SURREALO:4;
then ( b = sReal . (r1 * r2) & sReal . (r1 * r2) < sReal . (((([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * r2) + (r1 * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) - (([/((r1 * (2 |^ n1)) - 1)\] / (2 |^ n1)) * ([\((r2 * (2 |^ n2)) + 1)/] / (2 |^ n2)))) ) by SURREALO:4, A17, TARSKI:def 1;
hence not a <= b by A21, SURREALO:4; :: thesis: verum
end;
{(sReal . (r1 * r2))} << comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2)))
proof
let b, a be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not b in {(sReal . (r1 * r2))} or not a in comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2))) or not a <= b )
assume A23: ( b in {(sReal . (r1 * r2))} & a in comp ((R_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2))) ) ; :: thesis: not a <= b
consider x1, y1 being Surreal such that
A24: ( a = ((x1 * (sReal . r2)) + ((sReal . r1) * y1)) - (x1 * y1) & x1 in R_ (sReal . r1) & y1 in L_ (sReal . r2) ) by A23, SURREALR:def 15;
consider n1 being Nat such that
A25: x1 = uDyadic . ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) by Th43, A24;
set d1 = [\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1);
consider n2 being Nat such that
A26: y1 = uDyadic . ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) by Th42, A24;
set d2 = [/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2);
A27: a == sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) by A24, A25, A26, Lm18;
( 0 < r2 - ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) & r1 - ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) < 0 ) by Th41, XREAL_1:49, XREAL_1:50;
then (r1 - ([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1))) * (r2 - ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) < 0 ;
then (r1 * r2) - (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) * r1)) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) < 0 ;
then consider k being Nat such that
A28: [\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k) < ((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)) * r1)) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2))) by Th53, XREAL_1:48;
set d = [\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k);
( uDyadic . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) == sReal . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) & sReal . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) < sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) ) by A28, Th50, Th46;
then ( sReal . (r1 * r2) < uDyadic . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) & uDyadic . ([\(((r1 * r2) * (2 |^ k)) + 1)/] / (2 |^ k)) <= sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) ) by Th44, SURREALO:4;
then ( b = sReal . (r1 * r2) & sReal . (r1 * r2) < sReal . (((([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * r2) + (r1 * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) - (([\((r1 * (2 |^ n1)) + 1)/] / (2 |^ n1)) * ([/((r2 * (2 |^ n2)) - 1)\] / (2 |^ n2)))) ) by SURREALO:4, A23, TARSKI:def 1;
hence not a <= b by A27, SURREALO:4; :: thesis: verum
end;
then A29: {(sReal . (r1 * r2))} << R_ ((sReal . r1) * (sReal . r2)) by A1, A16, SURREAL0:42;
A30: L_ (sReal . (r1 * r2)) << {((sReal . r1) * (sReal . r2))}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in L_ (sReal . (r1 * r2)) or not b in {((sReal . r1) * (sReal . r2))} or not b <= a )
assume A31: ( a in L_ (sReal . (r1 * r2)) & b in {((sReal . r1) * (sReal . r2))} ) ; :: thesis: not b <= a
consider n being Nat such that
A32: a = uDyadic . ([/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n)) by Th42, A31;
set d = [/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n);
0 < (r1 * r2) - ([/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n)) by Th41, XREAL_1:50;
then consider k being Nat such that
A33: 1 / (2 |^ k) <= (r1 * r2) - ([/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n)) by PREPOWER:92;
set M = 1 / (2 |^ k);
consider k1 being Nat such that
A34: r1 - (1 / (2 |^ k)) < [/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1) by Th54, XREAL_1:44;
set d1 = [/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1);
consider k2 being Nat such that
A35: r2 - (1 / (2 |^ k)) < [/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2) by Th54, XREAL_1:44;
set d2 = [/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2);
( 0 < r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) & r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) < 1 / (2 |^ k) & 0 < r2 - ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)) & r2 - ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)) < 1 / (2 |^ k) ) by Th41, A34, A35, XREAL_1:11, XREAL_1:50;
then ( 0 < (r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (r2 - ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) & (r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (r2 - ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) < (1 / (2 |^ k)) * (1 / (2 |^ k)) ) by XREAL_1:96;
then (r1 * r2) - (((r1 * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) < (1 / (2 |^ k)) * (1 / (2 |^ k)) ;
then A36: (r1 * r2) - ((1 / (2 |^ k)) * (1 / (2 |^ k))) < ((r1 * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) by XREAL_1:11;
1 <= 1 * (2 |^ k) by NAT_1:14;
then 1 / (2 |^ k) <= 1 by XREAL_1:79;
then A37: (1 / (2 |^ k)) * (1 / (2 |^ k)) <= (1 / (2 |^ k)) * 1 by XREAL_1:64;
( [/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n) <= (r1 * r2) - (1 / (2 |^ k)) & (r1 * r2) - (1 / (2 |^ k)) <= (r1 * r2) - ((1 / (2 |^ k)) * (1 / (2 |^ k))) ) by A33, A37, XREAL_1:10, XREAL_1:11;
then [/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n) <= (r1 * r2) - ((1 / (2 |^ k)) * (1 / (2 |^ k))) by XXREAL_0:2;
then [/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n) < ((r1 * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) by A36, XXREAL_0:2;
then ( a == sReal . ([/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n)) & sReal . ([/(((r1 * r2) * (2 |^ n)) - 1)\] / (2 |^ n)) < sReal . (((r1 * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) ) by A32, Th50, Th46;
then A38: a <= sReal . (((r1 * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) by SURREALO:4;
A39: ( L_ ((sReal . r1) * (sReal . r2)) << {((sReal . r1) * (sReal . r2))} & (sReal . r1) * (sReal . r2) in {((sReal . r1) * (sReal . r2))} ) by TARSKI:def 1, SURREALO:11;
( uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) in L_ (sReal . r1) & uDyadic . ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)) in L_ (sReal . r2) ) by Th42;
then (((sReal . r1) * (uDyadic . ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) + ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (sReal . r2))) - ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (uDyadic . ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) in comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(L_ (sReal . r2))) by SURREALR:def 15;
then A40: (((sReal . r1) * (uDyadic . ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) + ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (sReal . r2))) + (- ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (uDyadic . ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))))) in L_ ((sReal . r1) * (sReal . r2)) by XBOOLE_0:def 3, A1;
(((sReal . r1) * (uDyadic . ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) + ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (sReal . r2))) + (- ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (uDyadic . ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))))) == sReal . (((r1 * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) by Lm18;
then sReal . (((r1 * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([/((r2 * (2 |^ k2)) - 1)\] / (2 |^ k2)))) < (sReal . r1) * (sReal . r2) by A40, A39, SURREALO:4;
then a < (sReal . r1) * (sReal . r2) by A38, SURREALO:4;
hence not b <= a by A31, TARSKI:def 1; :: thesis: verum
end;
{((sReal . r1) * (sReal . r2))} << R_ (sReal . (r1 * r2))
proof
let b, a be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not b in {((sReal . r1) * (sReal . r2))} or not a in R_ (sReal . (r1 * r2)) or not a <= b )
assume A41: ( b in {((sReal . r1) * (sReal . r2))} & a in R_ (sReal . (r1 * r2)) ) ; :: thesis: not a <= b
consider n being Nat such that
A42: a = uDyadic . ([\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n)) by Th43, A41;
set d = [\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n);
0 < ([\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 * r2) by Th41, XREAL_1:50;
then consider k being Nat such that
A43: 1 / (2 |^ k) <= ([\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n)) - (r1 * r2) by PREPOWER:92;
set M = 1 / (2 |^ k);
consider k1 being Nat such that
A44: r1 - (1 / (2 |^ k)) < [/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1) by Th54, XREAL_1:44;
set d1 = [/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1);
consider k2 being Nat such that
A45: [\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2) < r2 + (1 / (2 |^ k)) by Th53, XREAL_1:29;
set d2 = [\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2);
( 0 < r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) & r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) < 1 / (2 |^ k) & 0 < ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)) - r2 & ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)) - r2 < 1 / (2 |^ k) ) by Th41, A44, A45, XREAL_1:11, XREAL_1:19, XREAL_1:50;
then ( 0 < (r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)) - r2) & (r1 - ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)) - r2) < (1 / (2 |^ k)) * (1 / (2 |^ k)) ) by XREAL_1:96;
then (((r1 * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) - (r1 * r2) < (1 / (2 |^ k)) * (1 / (2 |^ k)) ;
then A46: ((r1 * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) < ((1 / (2 |^ k)) * (1 / (2 |^ k))) + (r1 * r2) by XREAL_1:19;
1 <= 1 * (2 |^ k) by NAT_1:14;
then 1 / (2 |^ k) <= 1 by XREAL_1:79;
then A47: (1 / (2 |^ k)) * (1 / (2 |^ k)) <= (1 / (2 |^ k)) * 1 by XREAL_1:64;
( [\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n) >= (r1 * r2) + (1 / (2 |^ k)) & (r1 * r2) + (1 / (2 |^ k)) >= (r1 * r2) + ((1 / (2 |^ k)) * (1 / (2 |^ k))) ) by A43, A47, XREAL_1:6, XREAL_1:19;
then [\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n) >= (r1 * r2) + ((1 / (2 |^ k)) * (1 / (2 |^ k))) by XXREAL_0:2;
then [\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n) > ((r1 * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) by A46, XXREAL_0:2;
then ( sReal . (((r1 * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) < sReal . ([\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n)) & sReal . ([\(((r1 * r2) * (2 |^ n)) + 1)/] / (2 |^ n)) == a ) by A42, Th50, Th46;
then A48: sReal . (((r1 * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) <= a by SURREALO:4;
A49: ( {((sReal . r1) * (sReal . r2))} << R_ ((sReal . r1) * (sReal . r2)) & (sReal . r1) * (sReal . r2) in {((sReal . r1) * (sReal . r2))} ) by TARSKI:def 1, SURREALO:11;
( uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) in L_ (sReal . r1) & uDyadic . ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)) in R_ (sReal . r2) ) by Th42, Th43;
then (((sReal . r1) * (uDyadic . ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) + ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (sReal . r2))) - ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (uDyadic . ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) in comp ((L_ (sReal . r1)),(sReal . r1),(sReal . r2),(R_ (sReal . r2))) by SURREALR:def 15;
then A50: (((sReal . r1) * (uDyadic . ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) + ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (sReal . r2))) + (- ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (uDyadic . ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))))) in R_ ((sReal . r1) * (sReal . r2)) by XBOOLE_0:def 3, A1;
(((sReal . r1) * (uDyadic . ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) + ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (sReal . r2))) + (- ((uDyadic . ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1))) * (uDyadic . ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))))) == sReal . (((r1 * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) by Lm18;
then (sReal . r1) * (sReal . r2) < sReal . (((r1 * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2))) + (r2 * ([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)))) - (([/((r1 * (2 |^ k1)) - 1)\] / (2 |^ k1)) * ([\((r2 * (2 |^ k2)) + 1)/] / (2 |^ k2)))) by A50, A49, SURREALO:4;
then (sReal . r1) * (sReal . r2) < a by A48, SURREALO:4;
hence not a <= b by A41, TARSKI:def 1; :: thesis: verum
end;
hence (sReal . r1) * (sReal . r2) == sReal . (r1 * r2) by A15, A29, A30, SURREAL0:43; :: thesis: verum
end;

theorem Th57: :: SURREALN:57
for r1, r2 being Real holds (uReal . r1) * (uReal . r2) == uReal . (r1 * r2)
proof
let r1, r2 be Real; :: thesis: (uReal . r1) * (uReal . r2) == uReal . (r1 * r2)
( uReal . r1 = Unique_No (sReal . r1) & uReal . r2 = Unique_No (sReal . r2) ) by Def7;
then ( (uReal . r1) * (uReal . r2) == (uReal . r1) * (sReal . r2) & (uReal . r1) * (sReal . r2) == (sReal . r1) * (sReal . r2) ) by SURREALO:def 10, SURREALR:51;
then ( (uReal . r1) * (uReal . r2) == (sReal . r1) * (sReal . r2) & (sReal . r1) * (sReal . r2) == sReal . (r1 * r2) ) by Lm19, SURREALO:4;
then A1: (uReal . r1) * (uReal . r2) == sReal . (r1 * r2) by SURREALO:4;
uReal . (r1 * r2) = Unique_No (sReal . (r1 * r2)) by Def7;
then sReal . (r1 * r2) == uReal . (r1 * r2) by SURREALO:def 10;
hence (uReal . r1) * (uReal . r2) == uReal . (r1 * r2) by A1, SURREALO:4; :: thesis: verum
end;

theorem Th58: :: SURREALN:58
for n being Nat st n > 0 holds
(uInt . n) " == uReal . (1 / n)
proof
let n be Nat; :: thesis: ( n > 0 implies (uInt . n) " == uReal . (1 / n) )
assume A1: n > 0 ; :: thesis: (uInt . n) " == uReal . (1 / n)
then ( 0_No = uInt . 0 & uInt . 0 < uInt . n ) by Th9, Def1;
then A2: not uInt . n == 0_No ;
A3: n * (1 / n) = 1 by A1, XCMPLX_1:106;
( uInt . n = uDyadic . n & uDyadic . n = uReal . n ) by Def5, Th46;
then ( (uInt . n) * (uReal . (1 / n)) == uReal . 1 & uReal . 1 = 1_No ) by A3, Th57, Th48;
hence (uInt . n) " == uReal . (1 / n) by SURREALI:42, A2; :: thesis: verum
end;

definition
let x be Surreal;
func real_qua x -> Surreal means :Def8: :: SURREALN:def 8
( L_ it = { (x - ((uInt . n) ")) where n is positive Nat : verum } & R_ it = { (x + ((uInt . n) ")) where n is positive Nat : verum } );
existence
ex b1 being Surreal st
( L_ b1 = { (x - ((uInt . n) ")) where n is positive Nat : verum } & R_ b1 = { (x + ((uInt . n) ")) where n is positive Nat : verum } )
proof
set L = { (x - ((uInt . n) ")) where n is positive Nat : verum } ;
set R = { (x + ((uInt . n) ")) where n is positive Nat : verum } ;
A1: { (x - ((uInt . n) ")) where n is positive Nat : verum } is surreal-membered
proof
let o be object ; :: according to SURREAL0:def 16 :: thesis: ( not o in { (x - ((uInt . n) ")) where n is positive Nat : verum } or o is surreal )
assume o in { (x - ((uInt . n) ")) where n is positive Nat : verum } ; :: thesis: o is surreal
then ex n being positive Nat st o = x - ((uInt . n) ") ;
hence o is surreal ; :: thesis: verum
end;
{ (x + ((uInt . n) ")) where n is positive Nat : verum } is surreal-membered
proof
let o be object ; :: according to SURREAL0:def 16 :: thesis: ( not o in { (x + ((uInt . n) ")) where n is positive Nat : verum } or o is surreal )
assume o in { (x + ((uInt . n) ")) where n is positive Nat : verum } ; :: thesis: o is surreal
then ex n being positive Nat st o = x + ((uInt . n) ") ;
hence o is surreal ; :: thesis: verum
end;
then reconsider L = { (x - ((uInt . n) ")) where n is positive Nat : verum } , R = { (x + ((uInt . n) ")) where n is positive Nat : verum } as surreal-membered set by A1;
consider M being Ordinal such that
A2: for o being object st o in L \/ R holds
ex A being Ordinal st
( A in M & o in Day A )
by SURREAL0:47;
L << R
proof
let l, r be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in L or not r in R or not r <= l )
assume A3: ( l in L & r in R ) ; :: thesis: not r <= l
consider nL being positive Nat such that
A4: l = x - ((uInt . nL) ") by A3;
consider nR being positive Nat such that
A5: r = x + ((uInt . nR) ") by A3;
( - ((uInt . nL) ") < - 0_No & - 0_No = 0_No ) by SURREALR:10, SURREALI:def 8;
then A6: ( x + (- ((uInt . nL) ")) < x + 0_No & x + 0_No = x ) by SURREALR:44;
( x = x + 0_No & x + 0_No <= x + ((uInt . nR) ") ) by SURREALR:44, SURREALI:def 8;
hence not r <= l by A4, A5, A6, SURREALO:4; :: thesis: verum
end;
then [L,R] in Day M by A2, SURREAL0:46;
then reconsider LR = [L,R] as Surreal ;
take LR ; :: thesis: ( L_ LR = { (x - ((uInt . n) ")) where n is positive Nat : verum } & R_ LR = { (x + ((uInt . n) ")) where n is positive Nat : verum } )
thus ( L_ LR = { (x - ((uInt . n) ")) where n is positive Nat : verum } & R_ LR = { (x + ((uInt . n) ")) where n is positive Nat : verum } ) ; :: thesis: verum
end;
uniqueness
for b1, b2 being Surreal st L_ b1 = { (x - ((uInt . n) ")) where n is positive Nat : verum } & R_ b1 = { (x + ((uInt . n) ")) where n is positive Nat : verum } & L_ b2 = { (x - ((uInt . n) ")) where n is positive Nat : verum } & R_ b2 = { (x + ((uInt . n) ")) where n is positive Nat : verum } holds
b1 = b2
by XTUPLE_0:2;
end;

:: deftheorem Def8 defines real_qua SURREALN:def 8 :
for x, b2 being Surreal holds
( b2 = real_qua x iff ( L_ b2 = { (x - ((uInt . n) ")) where n is positive Nat : verum } & R_ b2 = { (x + ((uInt . n) ")) where n is positive Nat : verum } ) );

definition
let x be Surreal;
attr x is *real means :: SURREALN:def 9
( x == real_qua x & ex n being Nat st
( uInt . (- n) < x & x < uInt . n ) );
end;

:: deftheorem defines *real SURREALN:def 9 :
for x being Surreal holds
( x is *real iff ( x == real_qua x & ex n being Nat st
( uInt . (- n) < x & x < uInt . n ) ) );

theorem Th59: :: SURREALN:59
for x being Surreal
for n being positive Nat holds
( x - ((uInt . n) ") < real_qua x & real_qua x < x + ((uInt . n) ") )
proof
let x be Surreal; :: thesis: for n being positive Nat holds
( x - ((uInt . n) ") < real_qua x & real_qua x < x + ((uInt . n) ") )

let n be positive Nat; :: thesis: ( x - ((uInt . n) ") < real_qua x & real_qua x < x + ((uInt . n) ") )
x - ((uInt . n) ") in { (x - ((uInt . k) ")) where k is positive Nat : verum } ;
then A1: x + (- ((uInt . n) ")) in L_ (real_qua x) by Def8;
x + ((uInt . n) ") in { (x + ((uInt . k) ")) where k is positive Nat : verum } ;
then A2: x + ((uInt . n) ") in R_ (real_qua x) by Def8;
( L_ (real_qua x) << {(real_qua x)} & {(real_qua x)} << R_ (real_qua x) & real_qua x in {(real_qua x)} ) by TARSKI:def 1, SURREALO:11;
hence ( x - ((uInt . n) ") < real_qua x & real_qua x < x + ((uInt . n) ") ) by A1, A2; :: thesis: verum
end;

Lm20: for x, y being Surreal st x == y holds
real_qua x <= real_qua y

proof
let x, y be Surreal; :: thesis: ( x == y implies real_qua x <= real_qua y )
assume A1: x == y ; :: thesis: real_qua x <= real_qua y
A2: L_ (real_qua x) << {(real_qua y)}
proof
let l, r be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in L_ (real_qua x) or not r in {(real_qua y)} or not r <= l )
assume A3: ( l in L_ (real_qua x) & r in {(real_qua y)} ) ; :: thesis: not r <= l
then l in { (x - ((uInt . n) ")) where n is positive Nat : verum } by Def8;
then consider nL being positive Nat such that
A4: l = x - ((uInt . nL) ") ;
1 * nL < 2 * nL by XREAL_1:68;
then ( uReal . (1 / (2 * nL)) < uReal . (1 / nL) & uReal . (1 / nL) == (uInt . nL) " ) by XREAL_1:76, Th58, Th51;
then ( (uInt . (2 * nL)) " == uReal . (1 / (2 * nL)) & uReal . (1 / (2 * nL)) < (uInt . nL) " ) by Th58, SURREALO:4;
then (uInt . (2 * nL)) " < (uInt . nL) " by SURREALO:4;
then - ((uInt . nL) ") < - ((uInt . (2 * nL)) ") by SURREALR:10;
then A5: x + (- ((uInt . nL) ")) <= y + (- ((uInt . (2 * nL)) ")) by A1, SURREALR:44;
r = real_qua y by A3, TARSKI:def 1;
then y - ((uInt . (2 * nL)) ") < r by Th59;
hence not r <= l by A4, A5, SURREALO:4; :: thesis: verum
end;
{(real_qua x)} << R_ (real_qua y)
proof
let l, r be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in {(real_qua x)} or not r in R_ (real_qua y) or not r <= l )
assume A6: ( l in {(real_qua x)} & r in R_ (real_qua y) ) ; :: thesis: not r <= l
then r in { (y + ((uInt . n) ")) where n is positive Nat : verum } by Def8;
then consider nL being positive Nat such that
A7: r = y + ((uInt . nL) ") ;
1 * nL < 2 * nL by XREAL_1:68;
then ( uReal . (1 / (2 * nL)) < uReal . (1 / nL) & uReal . (1 / nL) == (uInt . nL) " ) by XREAL_1:76, Th58, Th51;
then ( (uInt . (2 * nL)) " == uReal . (1 / (2 * nL)) & uReal . (1 / (2 * nL)) < (uInt . nL) " ) by Th58, SURREALO:4;
then (uInt . (2 * nL)) " < (uInt . nL) " by SURREALO:4;
then A8: x + ((uInt . (2 * nL)) ") <= y + ((uInt . nL) ") by A1, SURREALR:44;
l = real_qua x by A6, TARSKI:def 1;
hence not r <= l by A7, A8, Th59, SURREALO:4; :: thesis: verum
end;
hence real_qua x <= real_qua y by A2, SURREAL0:43; :: thesis: verum
end;

theorem :: SURREALN:60
for x, y being Surreal st x == y holds
real_qua x == real_qua y by Lm20;

Lm21: for r being Real holds sReal . r == real_qua (sReal . r)
proof
let r be Real; :: thesis: sReal . r == real_qua (sReal . r)
set R = sReal . r;
uReal . r = Unique_No (sReal . r) by Def7;
then A1: uReal . r == sReal . r by SURREALO:def 10;
A2: L_ (sReal . r) << {(real_qua (sReal . r))}
proof
let l, r1 be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in L_ (sReal . r) or not r1 in {(real_qua (sReal . r))} or not r1 <= l )
assume A3: ( l in L_ (sReal . r) & r1 in {(real_qua (sReal . r))} ) ; :: thesis: not r1 <= l
then consider n being Nat such that
A4: l = uDyadic . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) by Th42;
set D = [/((r * (2 |^ n)) - 1)\] / (2 |^ n);
0 < r - ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) by XREAL_1:50, Th41;
then consider k being Nat such that
A5: 1 / (2 |^ k) <= r - ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) by PREPOWER:92;
[/((r * (2 |^ n)) - 1)\] / (2 |^ n) <= r - (1 / (2 |^ k)) by A5, XREAL_1:11;
then ( l = uReal . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) & uReal . ([/((r * (2 |^ n)) - 1)\] / (2 |^ n)) <= uReal . (r + (- (1 / (2 |^ k)))) & uReal . (r + (- (1 / (2 |^ k)))) == (uReal . r) + (uReal . (- (1 / (2 |^ k)))) ) by Th46, A4, Th51, Th55;
then A6: l <= (uReal . r) + (uReal . (- (1 / (2 |^ k)))) by SURREALO:4;
( uReal . (- (1 / (2 |^ k))) == - (uReal . (1 / (2 |^ k))) & - (uReal . (1 / (2 |^ k))) == - ((uInt . (2 |^ k)) ") ) by Th58, Th56, SURREALR:65;
then uReal . (- (1 / (2 |^ k))) == - ((uInt . (2 |^ k)) ") by SURREALO:4;
then (uReal . r) + (uReal . (- (1 / (2 |^ k)))) == (sReal . r) + (- ((uInt . (2 |^ k)) ")) by A1, SURREALR:66;
then ( l <= (sReal . r) - ((uInt . (2 |^ k)) ") & (sReal . r) - ((uInt . (2 |^ k)) ") < real_qua (sReal . r) & real_qua (sReal . r) = r1 ) by A3, TARSKI:def 1, Th59, A6, SURREALO:4;
hence not r1 <= l by SURREALO:4; :: thesis: verum
end;
A7: {(sReal . r)} << R_ (real_qua (sReal . r))
proof
let l, r1 be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in {(sReal . r)} or not r1 in R_ (real_qua (sReal . r)) or not r1 <= l )
assume A8: ( l in {(sReal . r)} & r1 in R_ (real_qua (sReal . r)) ) ; :: thesis: not r1 <= l
r1 in { ((sReal . r) + ((uInt . n) ")) where n is positive Nat : verum } by A8, Def8;
then consider nL being positive Nat such that
A9: r1 = (sReal . r) + ((uInt . nL) ") ;
( sReal . r = (sReal . r) + 0_No & (sReal . r) + 0_No < (sReal . r) + ((uInt . nL) ") ) by SURREALR:44, SURREALI:def 8;
hence not r1 <= l by A9, A8, TARSKI:def 1; :: thesis: verum
end;
A10: L_ (real_qua (sReal . r)) << {(sReal . r)}
proof
let l, r1 be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not l in L_ (real_qua (sReal . r)) or not r1 in {(sReal . r)} or not r1 <= l )
assume A11: ( l in L_ (real_qua (sReal . r)) & r1 in {(sReal . r)} ) ; :: thesis: not r1 <= l
l in { ((sReal . r) - ((uInt . n) ")) where n is positive Nat : verum } by A11, Def8;
then consider nL being positive Nat such that
A12: l = (sReal . r) - ((uInt . nL) ") ;
( - ((uInt . nL) ") < - 0_No & - 0_No = 0_No ) by SURREALR:10, SURREALI:def 8;
then ( (sReal . r) + (- ((uInt . nL) ")) < (sReal . r) + 0_No & (sReal . r) + 0_No = sReal . r ) by SURREALR:44;
hence not r1 <= l by A12, A11, TARSKI:def 1; :: thesis: verum
end;
{(real_qua (sReal . r))} << R_ (sReal . r)
proof
let r1, l be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not r1 in {(real_qua (sReal . r))} or not l in R_ (sReal . r) or not l <= r1 )
assume A13: ( r1 in {(real_qua (sReal . r))} & l in R_ (sReal . r) ) ; :: thesis: not l <= r1
then consider n being Nat such that
A14: l = uDyadic . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) by Th43;
set D = [\((r * (2 |^ n)) + 1)/] / (2 |^ n);
0 < ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) - r by Th41, XREAL_1:50;
then consider k being Nat such that
A15: 1 / (2 |^ k) <= ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) - r by PREPOWER:92;
( l = uReal . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) & uReal . ([\((r * (2 |^ n)) + 1)/] / (2 |^ n)) >= uReal . (r + (1 / (2 |^ k))) & uReal . (r + (1 / (2 |^ k))) == (uReal . r) + (uReal . (1 / (2 |^ k))) ) by A14, A15, XREAL_1:19, Th46, Th51, Th55;
then A16: l >= (uReal . r) + (uReal . (1 / (2 |^ k))) by SURREALO:4;
uReal . (1 / (2 |^ k)) == (uInt . (2 |^ k)) " by Th58;
then (uReal . r) + (uReal . (1 / (2 |^ k))) == (sReal . r) + ((uInt . (2 |^ k)) ") by A1, SURREALR:66;
then ( r1 = real_qua (sReal . r) & real_qua (sReal . r) < (sReal . r) + ((uInt . (2 |^ k)) ") & (sReal . r) + ((uInt . (2 |^ k)) ") <= l ) by A13, TARSKI:def 1, Th59, A16, SURREALO:4;
hence not l <= r1 by SURREALO:4; :: thesis: verum
end;
hence sReal . r == real_qua (sReal . r) by A2, A7, A10, SURREAL0:43; :: thesis: verum
end;

Lm22: for r being Real ex n being Nat st
( - n < r & r < n )

proof
let r be Real; :: thesis: ex n being Nat st
( - n < r & r < n )

per cases ( 0 <= r or r < 0 ) ;
suppose A1: 0 <= r ; :: thesis: ex n being Nat st
( - n < r & r < n )

consider n being Nat such that
A2: r < n by SEQ_4:3;
- n < 0 by A2, A1;
hence ex n being Nat st
( - n < r & r < n )
by A1, A2; :: thesis: verum
end;
suppose A3: r < 0 ; :: thesis: ex n being Nat st
( - n < r & r < n )

consider n being Nat such that
A4: - r < n by SEQ_4:3;
0 - r < n by A4;
then ( - n = 0 - n & 0 - n < r & r < 0 & 0 <= n ) by A3, XREAL_1:11;
hence ex n being Nat st
( - n < r & r < n )
; :: thesis: verum
end;
end;
end;

theorem Th61: :: SURREALN:61
for x, y being Surreal st x == y & x is *real holds
y is *real
proof
let x, y be Surreal; :: thesis: ( x == y & x is *real implies y is *real )
assume A1: ( x == y & x is *real ) ; :: thesis: y is *real
then consider n being Nat such that
A2: ( uInt . (- n) < x & x < uInt . n ) ;
A3: ( uInt . (- n) < y & y < uInt . n ) by A2, A1, SURREALO:4;
( x == real_qua x & real_qua x == real_qua y ) by A1, Lm20;
then x == real_qua y by SURREALO:4;
then y == real_qua y by A1, SURREALO:4;
hence y is *real by A3; :: thesis: verum
end;

registration
let r be Real;
cluster sReal . r -> *real ;
coherence
sReal . r is *real
proof
consider n being Nat such that
A1: ( - n < r & r < n ) by Lm22;
A2: ( sReal . n == uDyadic . n & uDyadic . n = uInt . n & sReal . (- n) == uDyadic . (- n) & uDyadic . (- n) = uInt . (- n) ) by Th46, Def5;
( uInt . (- n) < sReal . r & sReal . r < uInt . n ) by A1, Th50, A2, SURREALO:4;
hence sReal . r is *real by Lm21; :: thesis: verum
end;
cluster uReal . r -> *real ;
coherence
uReal . r is *real
proof
uReal . r = Unique_No (sReal . r) by Def7;
then uReal . r == sReal . r by SURREALO:def 10;
hence uReal . r is *real by Th61; :: thesis: verum
end;
end;

registration
cluster non empty V9() surreal uniq-surreal *real for set ;
existence
ex b1 being uSurreal st b1 is *real
proof
take C = uReal . 0; :: thesis: C is *real
thus C is *real ; :: thesis: verum
end;
end;

theorem Th62: :: SURREALN:62
for x being Surreal holds
( x is *real iff ex r being Real st x == uReal . r )
proof
let x be Surreal; :: thesis: ( x is *real iff ex r being Real st x == uReal . r )
thus ( x is *real implies ex r being Real st x == uReal . r ) :: thesis: ( ex r being Real st x == uReal . r implies x is *real )
proof
assume A1: x is *real ; :: thesis: ex r being Real st x == uReal . r
defpred S1[ object ] means ( $1 is Real & ( for r being Real st r = $1 holds
uReal . r < x ) );
defpred S2[ object ] means ( $1 is Real & ( for r being Real st r = $1 holds
x < uReal . r ) );
A2: for r, s being ExtReal st S1[r] & S2[s] holds
r <= s
proof
let r, s be ExtReal; :: thesis: ( S1[r] & S2[s] implies r <= s )
assume A3: ( S1[r] & S2[s] ) ; :: thesis: r <= s
reconsider R = r, S = s as Real by A3;
( uReal . R < x & x <= uReal . S ) by A3;
then uReal . R < uReal . S by SURREALO:4;
hence r <= s by Th51; :: thesis: verum
end;
consider s being ExtReal such that
A4: for r being ExtReal st S1[r] holds
r <= s
and
A5: for r being ExtReal st S2[r] holds
s <= r
from XXREAL_1:sch 1(A2);
consider n being Nat such that
A6: ( uInt . (- n) < x & x < uInt . n ) by A1;
( uReal . n = uDyadic . n & uDyadic . n = uInt . n & uReal . (- n) = uDyadic . (- n) & uDyadic . (- n) = uInt . (- n) ) by Th46, Def5;
then ( S1[ - n] & S2[n] ) by A6;
then ( - n <= s & s <= n & n in REAL & - n in REAL ) by A4, A5, XREAL_0:def 1;
then s in REAL by XXREAL_0:45;
then reconsider s = s as Real ;
take s ; :: thesis: x == uReal . s
set S = uReal . s;
uReal . s = Unique_No (sReal . s) by Def7;
then A7: ( sReal . s == uReal . s & x == real_qua x ) by A1, SURREALO:def 10;
A8: x <= uReal . s
proof
assume uReal . s < x ; :: thesis: contradiction
then uReal . s < real_qua x by A7, SURREALO:4;
then sReal . s < real_qua x by A7, SURREALO:4;
per cases then ( ex xR being Surreal st
( xR in R_ (sReal . s) & sReal . s < xR & xR <= real_qua x ) or ex yL being Surreal st
( yL in L_ (real_qua x) & sReal . s <= yL & yL < real_qua x ) )
by SURREALO:13;
suppose ex xR being Surreal st
( xR in R_ (sReal . s) & sReal . s < xR & xR <= real_qua x )
; :: thesis: contradiction
then consider xR being Surreal such that
A9: ( xR in R_ (sReal . s) & sReal . s < xR & xR <= real_qua x ) ;
consider n being Nat such that
A10: xR = uDyadic . ([\((s * (2 |^ n)) + 1)/] / (2 |^ n)) by A9, Th43;
set D = [\((s * (2 |^ n)) + 1)/] / (2 |^ n);
A11: s < [\((s * (2 |^ n)) + 1)/] / (2 |^ n) by Th41;
then A12: (s + ([\((s * (2 |^ n)) + 1)/] / (2 |^ n))) / 2 < [\((s * (2 |^ n)) + 1)/] / (2 |^ n) by XREAL_1:226;
A13: xR = uReal . ([\((s * (2 |^ n)) + 1)/] / (2 |^ n)) by A10, Th46;
xR <= x by A9, A7, SURREALO:4;
then S1[(s + ([\((s * (2 |^ n)) + 1)/] / (2 |^ n))) / 2] by A12, A13, SURREALO:4, Th51;
hence contradiction by A4, A11, XREAL_1:226; :: thesis: verum
end;
suppose ex yL being Surreal st
( yL in L_ (real_qua x) & sReal . s <= yL & yL < real_qua x )
; :: thesis: contradiction
then consider yL being Surreal such that
A14: ( yL in L_ (real_qua x) & sReal . s <= yL & yL < real_qua x ) ;
yL in { (x - ((uInt . n) ")) where n is positive Nat : verum } by Def8, A14;
then consider nL being positive Nat such that
A15: yL = x - ((uInt . nL) ") ;
1 * nL < 2 * nL by XREAL_1:68;
then ( uReal . (1 / (2 * nL)) < uReal . (1 / nL) & uReal . (1 / nL) == (uInt . nL) " ) by XREAL_1:76, Th58, Th51;
then uReal . (1 / (2 * nL)) < (uInt . nL) " by SURREALO:4;
then - ((uInt . nL) ") < - (uReal . (1 / (2 * nL))) by SURREALR:10;
then yL < x + (- (uReal . (1 / (2 * nL)))) by A15, SURREALR:44;
then sReal . s < x - (uReal . (1 / (2 * nL))) by A14, SURREALO:4;
then ( (uReal . s) + (uReal . (1 / (2 * nL))) == (sReal . s) + (uReal . (1 / (2 * nL))) & (sReal . s) + (uReal . (1 / (2 * nL))) < x ) by A7, SURREALR:42, SURREALR:66;
then ( uReal . (s + (1 / (2 * nL))) == (uReal . s) + (uReal . (1 / (2 * nL))) & (uReal . s) + (uReal . (1 / (2 * nL))) < x ) by SURREALO:4, Th55;
then S1[s + (1 / (2 * nL))] by SURREALO:4;
then s + (1 / (2 * nL)) <= s + 0 by A4;
hence contradiction by XREAL_1:6; :: thesis: verum
end;
end;
end;
uReal . s <= x
proof
assume x < uReal . s ; :: thesis: contradiction
then real_qua x < uReal . s by A7, SURREALO:4;
then real_qua x < sReal . s by A7, SURREALO:4;
per cases then ( ex xR being Surreal st
( xR in R_ (real_qua x) & real_qua x < xR & xR <= sReal . s ) or ex yL being Surreal st
( yL in L_ (sReal . s) & real_qua x <= yL & yL < sReal . s ) )
by SURREALO:13;
suppose ex xR being Surreal st
( xR in R_ (real_qua x) & real_qua x < xR & xR <= sReal . s )
; :: thesis: contradiction
then consider xR being Surreal such that
A16: ( xR in R_ (real_qua x) & real_qua x < xR & xR <= sReal . s ) ;
xR in { (x + ((uInt . n) ")) where n is positive Nat : verum } by Def8, A16;
then consider nL being positive Nat such that
A17: xR = x + ((uInt . nL) ") ;
1 * nL < 2 * nL by XREAL_1:68;
then ( uReal . (1 / (2 * nL)) < uReal . (1 / nL) & uReal . (1 / nL) == (uInt . nL) " ) by XREAL_1:76, Th58, Th51;
then uReal . (1 / (2 * nL)) < (uInt . nL) " by SURREALO:4;
then x + (uReal . (1 / (2 * nL))) < xR by A17, SURREALR:44;
then x + (uReal . (1 / (2 * nL))) < sReal . s by A16, SURREALO:4;
then x + (uReal . (1 / (2 * nL))) < uReal . s by A7, SURREALO:4;
then A18: x < (uReal . s) - (uReal . (1 / (2 * nL))) by SURREALR:42;
- (uReal . (1 / (2 * nL))) == uReal . (- (1 / (2 * nL))) by Th56;
then (uReal . s) + (- (uReal . (1 / (2 * nL)))) == (uReal . s) + (uReal . (- (1 / (2 * nL)))) by SURREALR:66;
then ( x < (uReal . s) + (uReal . (- (1 / (2 * nL)))) & (uReal . s) + (uReal . (- (1 / (2 * nL)))) == uReal . (s + (- (1 / (2 * nL)))) ) by Th55, A18, SURREALO:4;
then S2[s - (1 / (2 * nL))] by SURREALO:4;
then 0 + s <= s + (- (1 / (2 * nL))) by A5;
hence contradiction by XREAL_1:6; :: thesis: verum
end;
suppose ex yL being Surreal st
( yL in L_ (sReal . s) & real_qua x <= yL & yL < sReal . s )
; :: thesis: contradiction
then consider yL being Surreal such that
A19: ( yL in L_ (sReal . s) & real_qua x <= yL & yL < sReal . s ) ;
consider n being Nat such that
A20: yL = uDyadic . ([/((s * (2 |^ n)) - 1)\] / (2 |^ n)) by A19, Th42;
set D = [/((s * (2 |^ n)) - 1)\] / (2 |^ n);
A21: [/((s * (2 |^ n)) - 1)\] / (2 |^ n) < s by Th41;
then A22: [/((s * (2 |^ n)) - 1)\] / (2 |^ n) < (s + ([/((s * (2 |^ n)) - 1)\] / (2 |^ n))) / 2 by XREAL_1:226;
A23: yL = uReal . ([/((s * (2 |^ n)) - 1)\] / (2 |^ n)) by A20, Th46;
x <= yL by A19, A7, SURREALO:4;
then S2[(s + ([/((s * (2 |^ n)) - 1)\] / (2 |^ n))) / 2] by A22, A23, Th51, SURREALO:4;
hence contradiction by A5, A21, XREAL_1:226; :: thesis: verum
end;
end;
end;
hence x == uReal . s by A8; :: thesis: verum
end;
thus ( ex r being Real st x == uReal . r implies x is *real ) by Th61; :: thesis: verum
end;

registration
let x be *real Surreal;
cluster - x -> *real ;
coherence
- x is *real
proof
consider r being Real such that
A1: x == uReal . r by Th62;
( - x == - (uReal . r) & - (uReal . r) == uReal . (- r) ) by A1, Th56, SURREALR:65;
then - x == uReal . (- r) by SURREALO:4;
hence - x is *real by Th62; :: thesis: verum
end;
let y be *real Surreal;
cluster x + y -> *real ;
coherence
x + y is *real
proof
consider r being Real such that
A2: x == uReal . r by Th62;
consider s being Real such that
A3: y == uReal . s by Th62;
( x + y == (uReal . r) + (uReal . s) & (uReal . r) + (uReal . s) == uReal . (r + s) ) by A2, A3, SURREALR:66, Th55;
then x + y == uReal . (r + s) by SURREALO:4;
hence x + y is *real by Th62; :: thesis: verum
end;
cluster x * y -> *real ;
coherence
x * y is *real
proof
consider r being Real such that
A4: x == uReal . r by Th62;
consider s being Real such that
A5: y == uReal . s by Th62;
( x * y == (uReal . r) * y & (uReal . r) * y == (uReal . r) * (uReal . s) ) by A4, A5, SURREALR:54;
then ( x * y == (uReal . r) * (uReal . s) & (uReal . r) * (uReal . s) == uReal . (r * s) ) by SURREALO:4, Th57;
then x * y == uReal . (r * s) by SURREALO:4;
hence x * y is *real by Th62; :: thesis: verum
end;
end;

definition
let x be Surreal;
attr x is No_ordinal means :Def10: :: SURREALN:def 10
R_ x = {} ;
end;

:: deftheorem Def10 defines No_ordinal SURREALN:def 10 :
for x being Surreal holds
( x is No_ordinal iff R_ x = {} );

registration
cluster 0_No -> No_ordinal ;
coherence
0_No is No_ordinal
;
let n be Nat;
cluster uInt . n -> No_ordinal ;
coherence
uInt . n is No_ordinal
by Th7;
end;

registration
cluster non empty V9() surreal uniq-surreal No_ordinal for set ;
existence
ex b1 being uSurreal st b1 is No_ordinal
proof
0_No is No_ordinal ;
hence ex b1 being uSurreal st b1 is No_ordinal ; :: thesis: verum
end;
end;

definition
let A be Ordinal;
func No_Ordinal_op A -> set means :Def11: :: SURREALN:def 11
ex S being Sequence st
( it = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) );
existence
ex b1 being set ex S being Sequence st
( b1 = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) )
proof
deffunc H1( Ordinal, set ) -> object = [{$2},{}];
deffunc H2( Ordinal, Sequence) -> object = [(rng $2),{}];
consider L being Sequence such that
A1: dom L = succ A and
A2: ( 0 in succ A implies L . 0 = 0_No ) and
A3: for A1 being Ordinal st succ A1 in succ A holds
L . (succ A1) = H1(A1,L . A1)
and
A4: for A1 being Ordinal st A1 in succ A & A1 <> 0 & A1 is limit_ordinal holds
L . A1 = H2(A1,L | A1)
from ORDINAL2:sch 5();
take L . A ; :: thesis: ex S being Sequence st
( L . A = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) )

take L ; :: thesis: ( L . A = L . A & dom L = succ A & ( for O being Ordinal st succ O in succ A holds
L . (succ O) = [{(L . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
L . O = [(rng (L | O)),{}] ) )

thus ( L . A = L . A & dom L = succ A & ( for O being Ordinal st succ O in succ A holds
L . (succ O) = [{(L . O)},{}] ) )
by A1, A3; :: thesis: for O being Ordinal st O in succ A & O is limit_ordinal holds
L . O = [(rng (L | O)),{}]

let O be Ordinal; :: thesis: ( O in succ A & O is limit_ordinal implies L . O = [(rng (L | O)),{}] )
assume A5: ( O in succ A & O is limit_ordinal ) ; :: thesis: L . O = [(rng (L | O)),{}]
per cases ( O = 0 or O <> 0 ) ;
suppose A6: O = 0 ; :: thesis: L . O = [(rng (L | O)),{}]
thus L . O = [(rng (L | O)),{}] by A2, A5, A6; :: thesis: verum
end;
suppose O <> 0 ; :: thesis: L . O = [(rng (L | O)),{}]
hence L . O = [(rng (L | O)),{}] by A5, A4; :: thesis: verum
end;
end;
end;
uniqueness
for b1, b2 being set st ex S being Sequence st
( b1 = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) ) & ex S being Sequence st
( b2 = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) ) holds
b1 = b2
proof
deffunc H1( Ordinal, set ) -> object = [{$2},{}];
deffunc H2( Ordinal, Sequence) -> object = [(rng $2),{}];
let IT1, IT2 be set ; :: thesis: ( ex S being Sequence st
( IT1 = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) ) & ex S being Sequence st
( IT2 = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) ) implies IT1 = IT2 )

given S1 being Sequence such that A7: IT1 = S1 . A and
A8: dom S1 = succ A and
A9: for O being Ordinal st succ O in succ A holds
S1 . (succ O) = H1(O,S1 . O)
and
A10: for O being Ordinal st O in succ A & O is limit_ordinal holds
S1 . O = H2(O,S1 | O)
; :: thesis: ( for S being Sequence holds
( not IT2 = S . A or not dom S = succ A or ex O being Ordinal st
( succ O in succ A & not S . (succ O) = [{(S . O)},{}] ) or ex O being Ordinal st
( O in succ A & O is limit_ordinal & not S . O = [(rng (S | O)),{}] ) ) or IT1 = IT2 )

given S2 being Sequence such that A11: IT2 = S2 . A and
A12: dom S2 = succ A and
A13: for O being Ordinal st succ O in succ A holds
S2 . (succ O) = H1(O,S2 . O)
and
A14: for O being Ordinal st O in succ A & O is limit_ordinal holds
S2 . O = H2(O,S2 | O)
; :: thesis: IT1 = IT2
0 c= A ;
then A15: ( S1 . 0 = H2( 0 ,S1 | 0) & H2( 0 ,S2 | 0) = S2 . 0 ) by ORDINAL1:22, ORDINAL2:4, A10, A14;
A16: ( 0 in succ A implies S1 . 0 = 0_No ) by A15;
A17: ( 0 in succ A implies S2 . 0 = 0_No ) by A15;
A18: for O being Ordinal st O in succ A & O <> 0 & O is limit_ordinal holds
S1 . O = H2(O,S1 | O)
by A10;
A19: for O being Ordinal st O in succ A & O <> 0 & O is limit_ordinal holds
S2 . O = H2(O,S2 | O)
by A14;
S1 = S2 from ORDINAL2:sch 4(A8, A16, A9, A18, A12, A17, A13, A19);
hence IT1 = IT2 by A7, A11; :: thesis: verum
end;
end;

:: deftheorem Def11 defines No_Ordinal_op SURREALN:def 11 :
for A being Ordinal
for b2 being set holds
( b2 = No_Ordinal_op A iff ex S being Sequence st
( b2 = S . A & dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) ) );

theorem Th63: :: SURREALN:63
for A being Ordinal
for S being Sequence st dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) holds
for O being Ordinal st O in succ A holds
S . O = No_Ordinal_op O
proof
let A be Ordinal; :: thesis: for S being Sequence st dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) holds
for O being Ordinal st O in succ A holds
S . O = No_Ordinal_op O

let S be Sequence; :: thesis: ( dom S = succ A & ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) implies for O being Ordinal st O in succ A holds
S . O = No_Ordinal_op O )

assume that
A1: dom S = succ A and
A2: ( ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) )
; :: thesis: for O being Ordinal st O in succ A holds
S . O = No_Ordinal_op O

let O be Ordinal; :: thesis: ( O in succ A implies S . O = No_Ordinal_op O )
assume A3: O in succ A ; :: thesis: S . O = No_Ordinal_op O
consider So being Sequence such that
A4: ( No_Ordinal_op O = So . O & dom So = succ O ) and
A5: ( ( for B being Ordinal st succ B in succ O holds
So . (succ B) = [{(So . B)},{}] ) & ( for B being Ordinal st B in succ O & B is limit_ordinal holds
So . B = [(rng (So | B)),{}] ) )
by Def11;
defpred S1[ Ordinal] means ( $1 c= O implies So . $1 = S . $1 );
A6: for B being Ordinal st ( for C being Ordinal st C in B holds
S1[C] ) holds
S1[B]
proof
let B be Ordinal; :: thesis: ( ( for C being Ordinal st C in B holds
S1[C] ) implies S1[B] )

assume A7: for C being Ordinal st C in B holds
S1[C]
; :: thesis: S1[B]
assume A8: B c= O ; :: thesis: So . B = S . B
then A9: B in succ O by ORDINAL1:22;
A10: B in succ A by A3, A8, ORDINAL1:12;
per cases ( not B is limit_ordinal or B is limit_ordinal ) ;
suppose not B is limit_ordinal ; :: thesis: So . B = S . B
then consider C being Ordinal such that
A11: B = succ C by ORDINAL1:29;
A12: C in B by A11, ORDINAL1:21;
S . C = So . C by A8, A12, A7, ORDINAL1:def 2;
then So . B = [{(S . C)},{}] by A5, A8, ORDINAL1:22, A11;
hence So . B = S . B by A3, A8, ORDINAL1:12, A2, A11; :: thesis: verum
end;
suppose B is limit_ordinal ; :: thesis: So . B = S . B
then A13: ( S . B = [(rng (S | B)),{}] & So . B = [(rng (So | B)),{}] ) by A2, A5, A8, ORDINAL1:22, A3, ORDINAL1:12;
A14: ( dom (S | B) = B & dom (So | B) = B ) by A4, A1, A9, ORDINAL1:def 2, RELAT_1:62, A10;
for x being object st x in B holds
(So | B) . x = (S | B) . x
proof
let x be object ; :: thesis: ( x in B implies (So | B) . x = (S | B) . x )
assume A15: x in B ; :: thesis: (So | B) . x = (S | B) . x
reconsider x = x as Ordinal by A15;
(So | B) . x = So . x by A15, FUNCT_1:49
.= S . x by A15, A7, A8, ORDINAL1:def 2 ;
hence (So | B) . x = (S | B) . x by A15, FUNCT_1:49; :: thesis: verum
end;
hence So . B = S . B by A13, A14, FUNCT_1:2; :: thesis: verum
end;
end;
end;
for B being Ordinal holds S1[B] from ORDINAL1:sch 2(A6);
hence S . O = No_Ordinal_op O by A4; :: thesis: verum
end;

theorem Th64: :: SURREALN:64
No_Ordinal_op 0 = 0_No
proof
consider S being Sequence such that
A1: ( No_Ordinal_op 0 = S . 0 & dom S = succ 0 ) and
A2: ( ( for O being Ordinal st succ O in succ 0 holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ 0 & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) )
by Def11;
S . 0 = [(rng (S | 0)),{}] by A2, ORDINAL1:6, ORDINAL2:4;
hence No_Ordinal_op 0 = 0_No by A1; :: thesis: verum
end;

theorem Th65: :: SURREALN:65
for A being Ordinal holds No_Ordinal_op (succ A) = [{(No_Ordinal_op A)},{}]
proof
let A be Ordinal; :: thesis: No_Ordinal_op (succ A) = [{(No_Ordinal_op A)},{}]
set B = succ A;
consider S being Sequence such that
A1: ( No_Ordinal_op (succ A) = S . (succ A) & dom S = succ (succ A) ) and
A2: ( ( for O being Ordinal st succ O in succ (succ A) holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ (succ A) & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) )
by Def11;
A3: ( succ A in succ (succ A) & A in succ A ) by ORDINAL1:6;
S . (succ A) = [{(S . A)},{}] by ORDINAL1:6, A2;
hence No_Ordinal_op (succ A) = [{(No_Ordinal_op A)},{}] by A3, A1, A2, Th63, ORDINAL1:10; :: thesis: verum
end;

theorem Th66: :: SURREALN:66
for A being Ordinal st A is limit_ordinal holds
ex X being set st
( No_Ordinal_op A = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) ) ) )
proof
let A be Ordinal; :: thesis: ( A is limit_ordinal implies ex X being set st
( No_Ordinal_op A = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) ) ) ) )

assume A1: A is limit_ordinal ; :: thesis: ex X being set st
( No_Ordinal_op A = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) ) ) )

set B = succ A;
consider S being Sequence such that
A2: ( No_Ordinal_op A = S . A & dom S = succ A ) and
A3: ( ( for O being Ordinal st succ O in succ A holds
S . (succ O) = [{(S . O)},{}] ) & ( for O being Ordinal st O in succ A & O is limit_ordinal holds
S . O = [(rng (S | O)),{}] ) )
by Def11;
take X = rng (S | A); :: thesis: ( No_Ordinal_op A = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) ) ) )

thus No_Ordinal_op A = [X,{}] by ORDINAL1:6, A1, A2, A3; :: thesis: for o being object holds
( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) )

let o be object ; :: thesis: ( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) )

A4: A in succ A by ORDINAL1:6;
then A5: dom (S | A) = A by A2, ORDINAL1:def 2, RELAT_1:62;
thus ( o in X implies ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) )
:: thesis: ( ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) implies o in X )
proof
assume o in X ; :: thesis: ex B being Ordinal st
( B in A & o = No_Ordinal_op B )

then consider x being object such that
A6: ( x in dom (S | A) & (S | A) . x = o ) by FUNCT_1:def 3;
reconsider x = x as Ordinal by A6;
S . x = No_Ordinal_op x by A2, A3, Th63, A4, A6, ORDINAL1:10;
hence ex B being Ordinal st
( B in A & o = No_Ordinal_op B )
by A6, FUNCT_1:47; :: thesis: verum
end;
given C being Ordinal such that A7: ( C in A & o = No_Ordinal_op C ) ; :: thesis: o in X
( No_Ordinal_op C = S . C & S . C = (S | A) . C ) by A7, A4, ORDINAL1:10, A5, A2, A3, Th63, FUNCT_1:47;
hence o in X by A5, A7, FUNCT_1:def 3; :: thesis: verum
end;

theorem Th67: :: SURREALN:67
for A being Ordinal holds No_Ordinal_op A in Day A
proof
let A be Ordinal; :: thesis: No_Ordinal_op A in Day A
defpred S1[ Ordinal] means No_Ordinal_op $1 in Day $1;
A1: for D being Ordinal st ( for C being Ordinal st C in D holds
S1[C] ) holds
S1[D]
proof
let D be Ordinal; :: thesis: ( ( for C being Ordinal st C in D holds
S1[C] ) implies S1[D] )

assume A2: for C being Ordinal st C in D holds
S1[C]
; :: thesis: S1[D]
per cases ( D is limit_ordinal or not D is limit_ordinal ) ;
suppose D is limit_ordinal ; :: thesis: S1[D]
then consider X being set such that
A3: ( No_Ordinal_op D = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in D & o = No_Ordinal_op B ) ) ) )
by Th66;
A4: X << {} ;
for o being object st o in X \/ {} holds
ex O being Ordinal st
( O in D & o in Day O )
proof
let o be object ; :: thesis: ( o in X \/ {} implies ex O being Ordinal st
( O in D & o in Day O ) )

assume o in X \/ {} ; :: thesis: ex O being Ordinal st
( O in D & o in Day O )

then consider B being Ordinal such that
A5: ( B in D & o = No_Ordinal_op B ) by A3;
No_Ordinal_op B in Day B by A5, A2;
hence ex O being Ordinal st
( O in D & o in Day O )
by A5; :: thesis: verum
end;
hence S1[D] by A3, A4, SURREAL0:46; :: thesis: verum
end;
suppose not D is limit_ordinal ; :: thesis: S1[D]
then consider B being Ordinal such that
A6: succ B = D by ORDINAL1:29;
A7: No_Ordinal_op B in Day B by A6, ORDINAL1:6, A2;
then reconsider OB = No_Ordinal_op B as Surreal ;
A8: {OB} << {} ;
for o being object st o in {OB} \/ {} holds
ex O being Ordinal st
( O in D & o in Day O )
proof
let o be object ; :: thesis: ( o in {OB} \/ {} implies ex O being Ordinal st
( O in D & o in Day O ) )

assume o in {OB} \/ {} ; :: thesis: ex O being Ordinal st
( O in D & o in Day O )

then o = OB by TARSKI:def 1;
hence ex O being Ordinal st
( O in D & o in Day O )
by A7, A6, ORDINAL1:6; :: thesis: verum
end;
then [{OB},{}] in Day D by A8, SURREAL0:46;
hence S1[D] by A6, Th65; :: thesis: verum
end;
end;
end;
for D being Ordinal holds S1[D] from ORDINAL1:sch 2(A1);
hence No_Ordinal_op A in Day A ; :: thesis: verum
end;

registration
let A be Ordinal;
cluster No_Ordinal_op A -> surreal ;
coherence
No_Ordinal_op A is surreal
proof
No_Ordinal_op A in Day A by Th67;
hence No_Ordinal_op A is surreal ; :: thesis: verum
end;
end;

registration
let A be Ordinal;
cluster No_Ordinal_op A -> No_ordinal ;
coherence
No_Ordinal_op A is No_ordinal
proof
per cases ( A is limit_ordinal or not A is limit_ordinal ) ;
suppose A is limit_ordinal ; :: thesis: No_Ordinal_op A is No_ordinal
then ex X being set st
( No_Ordinal_op A = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) ) ) )
by Th66;
hence No_Ordinal_op A is No_ordinal ; :: thesis: verum
end;
suppose not A is limit_ordinal ; :: thesis: No_Ordinal_op A is No_ordinal
then consider B being Ordinal such that
A1: succ B = A by ORDINAL1:29;
No_Ordinal_op A = [{(No_Ordinal_op B)},{}] by Th65, A1;
hence No_Ordinal_op A is No_ordinal ; :: thesis: verum
end;
end;
end;
end;

Lm23: for A, B being Ordinal st A in B holds
No_Ordinal_op A < No_Ordinal_op B

proof
let A, B be Ordinal; :: thesis: ( A in B implies No_Ordinal_op A < No_Ordinal_op B )
defpred S1[ Ordinal] means ( A in $1 implies No_Ordinal_op A < No_Ordinal_op $1 );
A1: for D being Ordinal st ( for C being Ordinal st C in D holds
S1[C] ) holds
S1[D]
proof
let D be Ordinal; :: thesis: ( ( for C being Ordinal st C in D holds
S1[C] ) implies S1[D] )

assume A2: for C being Ordinal st C in D holds
S1[C]
; :: thesis: S1[D]
assume A3: A in D ; :: thesis: No_Ordinal_op A < No_Ordinal_op D
A4: ( L_ (No_Ordinal_op D) << {(No_Ordinal_op D)} & No_Ordinal_op D in {(No_Ordinal_op D)} ) by SURREALO:11, TARSKI:def 1;
per cases ( D is limit_ordinal or not D is limit_ordinal ) ;
suppose D is limit_ordinal ; :: thesis: No_Ordinal_op A < No_Ordinal_op D
then consider X being set such that
A5: ( No_Ordinal_op D = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in D & o = No_Ordinal_op B ) ) ) )
by Th66;
thus No_Ordinal_op A < No_Ordinal_op D by A4, A3, A5; :: thesis: verum
end;
suppose not D is limit_ordinal ; :: thesis: No_Ordinal_op A < No_Ordinal_op D
then consider B being Ordinal such that
A6: succ B = D by ORDINAL1:29;
A7: S1[B] by A2, A6, ORDINAL1:6;
No_Ordinal_op D = [{(No_Ordinal_op B)},{}] by A6, Th65;
then A8: ( {(No_Ordinal_op B)} = L_ (No_Ordinal_op D) & L_ (No_Ordinal_op D) << {(No_Ordinal_op D)} ) by SURREALO:11;
A9: A c= B by A3, A6, ORDINAL1:22;
No_Ordinal_op A <= No_Ordinal_op B by A7, ORDINAL1:11, A9, XBOOLE_0:def 8;
hence No_Ordinal_op A < No_Ordinal_op D by A8, SURREALO:4, SURREALO:21; :: thesis: verum
end;
end;
end;
for D being Ordinal holds S1[D] from ORDINAL1:sch 2(A1);
hence ( A in B implies No_Ordinal_op A < No_Ordinal_op B ) ; :: thesis: verum
end;

theorem Th68: :: SURREALN:68
for A, B being Ordinal holds
( No_Ordinal_op A < No_Ordinal_op B iff A in B )
proof
let A, B be Ordinal; :: thesis: ( No_Ordinal_op A < No_Ordinal_op B iff A in B )
thus ( No_Ordinal_op A < No_Ordinal_op B implies A in B ) :: thesis: ( A in B implies No_Ordinal_op A < No_Ordinal_op B )
proof
assume A1: No_Ordinal_op A < No_Ordinal_op B ; :: thesis: A in B
assume not A in B ; :: thesis: contradiction
per cases then ( A = B or B c< A ) by ORDINAL1:16, XBOOLE_0:def 8;
suppose A = B ; :: thesis: contradiction
hence contradiction by A1, SURREALO:3; :: thesis: verum
end;
suppose B c< A ; :: thesis: contradiction
then No_Ordinal_op B <= No_Ordinal_op A by Lm23, ORDINAL1:11;
hence contradiction by A1; :: thesis: verum
end;
end;
end;
thus ( A in B implies No_Ordinal_op A < No_Ordinal_op B ) by Lm23; :: thesis: verum
end;

theorem Th69: :: SURREALN:69
for A being Ordinal
for x being Surreal st x in Day A holds
x <= No_Ordinal_op A
proof
let A be Ordinal; :: thesis: for x being Surreal st x in Day A holds
x <= No_Ordinal_op A

let x be Surreal; :: thesis: ( x in Day A implies x <= No_Ordinal_op A )
defpred S1[ Ordinal] means for x being Surreal st x in Day $1 holds
x <= No_Ordinal_op $1;
A1: for D being Ordinal st ( for C being Ordinal st C in D holds
S1[C] ) holds
S1[D]
proof
let D be Ordinal; :: thesis: ( ( for C being Ordinal st C in D holds
S1[C] ) implies S1[D] )

assume A2: for C being Ordinal st C in D holds
S1[C]
; :: thesis: S1[D]
set O = No_Ordinal_op D;
let x be Surreal; :: thesis: ( x in Day D implies x <= No_Ordinal_op D )
assume A3: x in Day D ; :: thesis: x <= No_Ordinal_op D
L_ x << {(No_Ordinal_op D)}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in L_ x or not b in {(No_Ordinal_op D)} or not b <= a )
assume A4: ( a in L_ x & b in {(No_Ordinal_op D)} ) ; :: thesis: not b <= a
A5: a in (L_ x) \/ (R_ x) by XBOOLE_0:def 3, A4;
then A6: born a in born x by SURREALO:1;
A7: No_Ordinal_op (born a) < No_Ordinal_op (born x) by A5, SURREALO:1, Th68;
A8: born x c= D by A3, SURREAL0:def 18;
then A9: No_Ordinal_op (born x) <= No_Ordinal_op D by Th68, ORDINAL1:5;
a in Day (born a) by SURREAL0:def 18;
then a <= No_Ordinal_op (born a) by A2, A6, A8;
then a < No_Ordinal_op (born x) by A7, SURREALO:4;
then a < No_Ordinal_op D by A9, SURREALO:4;
hence not b <= a by A4, TARSKI:def 1; :: thesis: verum
end;
then ( L_ x << {(No_Ordinal_op D)} & {x} << R_ (No_Ordinal_op D) ) by Def10;
hence x <= No_Ordinal_op D by SURREAL0:43; :: thesis: verum
end;
for D being Ordinal holds S1[D] from ORDINAL1:sch 2(A1);
hence ( x in Day A implies x <= No_Ordinal_op A ) ; :: thesis: verum
end;

theorem Th70: :: SURREALN:70
for A being Ordinal holds born (No_Ordinal_op A) = A
proof
let A be Ordinal; :: thesis: born (No_Ordinal_op A) = A
A1: No_Ordinal_op A in Day A by Th67;
for O being Ordinal st No_Ordinal_op A in Day O holds
A c= O
proof
let O be Ordinal; :: thesis: ( No_Ordinal_op A in Day O implies A c= O )
assume A2: ( No_Ordinal_op A in Day O & not A c= O ) ; :: thesis: contradiction
No_Ordinal_op O < No_Ordinal_op A by Th68, A2, ORDINAL1:16;
hence contradiction by Th69, A2; :: thesis: verum
end;
hence born (No_Ordinal_op A) = A by A1, SURREAL0:def 18; :: thesis: verum
end;

theorem Th71: :: SURREALN:71
for A being Ordinal
for x being Surreal st x in L_ (No_Ordinal_op A) holds
ex B being Ordinal st
( B in A & x = No_Ordinal_op B )
proof
let A be Ordinal; :: thesis: for x being Surreal st x in L_ (No_Ordinal_op A) holds
ex B being Ordinal st
( B in A & x = No_Ordinal_op B )

let x be Surreal; :: thesis: ( x in L_ (No_Ordinal_op A) implies ex B being Ordinal st
( B in A & x = No_Ordinal_op B ) )

assume A1: x in L_ (No_Ordinal_op A) ; :: thesis: ex B being Ordinal st
( B in A & x = No_Ordinal_op B )

per cases ( A is limit_ordinal or not A is limit_ordinal ) ;
suppose A is limit_ordinal ; :: thesis: ex B being Ordinal st
( B in A & x = No_Ordinal_op B )

then consider X being set such that
A2: ( No_Ordinal_op A = [X,{}] & ( for o being object holds
( o in X iff ex B being Ordinal st
( B in A & o = No_Ordinal_op B ) ) ) )
by Th66;
thus ex B being Ordinal st
( B in A & x = No_Ordinal_op B )
by A1, A2; :: thesis: verum
end;
suppose not A is limit_ordinal ; :: thesis: ex B being Ordinal st
( B in A & x = No_Ordinal_op B )

then consider B being Ordinal such that
A3: succ B = A by ORDINAL1:29;
No_Ordinal_op A = [{(No_Ordinal_op B)},{}] by Th65, A3;
then x = No_Ordinal_op B by A1, TARSKI:def 1;
hence ex B being Ordinal st
( B in A & x = No_Ordinal_op B )
by A3, ORDINAL1:6; :: thesis: verum
end;
end;
end;

Lm24: for x being Surreal st x is No_ordinal holds
ex A being Ordinal st x == No_Ordinal_op A

proof
let x be Surreal; :: thesis: ( x is No_ordinal implies ex A being Ordinal st x == No_Ordinal_op A )
defpred S1[ Ordinal] means x <= No_Ordinal_op $1;
x in Day (born x) by SURREAL0:def 18;
then x <= No_Ordinal_op (born x) by Th69;
then A1: ex C being Ordinal st S1[C] ;
consider Min being Ordinal such that
A2: ( S1[Min] & ( for C being Ordinal st S1[C] holds
Min c= C ) )
from ORDINAL1:sch 1(A1);
assume A3: x is No_ordinal ; :: thesis: ex A being Ordinal st x == No_Ordinal_op A
take Min ; :: thesis: x == No_Ordinal_op Min
set M = No_Ordinal_op Min;
L_ (No_Ordinal_op Min) << {x}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in L_ (No_Ordinal_op Min) or not b in {x} or not b <= a )
assume A4: ( a in L_ (No_Ordinal_op Min) & b in {x} & not a < b ) ; :: thesis: contradiction
consider B being Ordinal such that
A5: ( B in Min & a = No_Ordinal_op B ) by A4, Th71;
S1[B] by A5, A4, TARSKI:def 1;
hence contradiction by A2, A5, ORDINAL1:5; :: thesis: verum
end;
then ( L_ (No_Ordinal_op Min) << {x} & {(No_Ordinal_op Min)} << R_ x ) by A3;
hence x == No_Ordinal_op Min by A2, SURREAL0:43; :: thesis: verum
end;

theorem Th72: :: SURREALN:72
for n being Nat holds uInt . n = No_Ordinal_op n
proof
let n be Nat; :: thesis: uInt . n = No_Ordinal_op n
defpred S1[ Nat] means uInt . $1 = No_Ordinal_op $1;
A1: S1[ 0 ] by Def1, Th64;
A2: for m being Nat st S1[m] holds
S1[m + 1]
proof
let m be Nat; :: thesis: ( S1[m] implies S1[m + 1] )
assume A3: S1[m] ; :: thesis: S1[m + 1]
Segm (m + 1) = succ (Segm m) by NAT_1:38;
hence No_Ordinal_op (m + 1) = [{(No_Ordinal_op m)},{}] by Th65
.= uInt . (m + 1) by Def1, A3 ;
:: thesis: verum
end;
for m being Nat holds S1[m] from NAT_1:sch 2(A1, A2);
hence uInt . n = No_Ordinal_op n ; :: thesis: verum
end;

registration
let O be No_ordinal Surreal;
cluster Unique_No O -> No_ordinal ;
coherence
Unique_No O is No_ordinal
proof
set c = Unique_No O;
consider A being Ordinal such that
A1: O == No_Ordinal_op A by Lm24;
Unique_No O == O by SURREALO:def 10;
then A2: Unique_No O == No_Ordinal_op A by A1, SURREALO:4;
then A3: ( born (Unique_No O) = born_eq (Unique_No O) & born_eq (Unique_No O) c= born (No_Ordinal_op A) & born (No_Ordinal_op A) = A ) by SURREALO:def 5, SURREALO:48, Th70;
assume not Unique_No O is No_ordinal ; :: thesis: contradiction
then consider C being object such that
A4: C in R_ (Unique_No O) by XBOOLE_0:def 1;
reconsider C = C as Surreal by A4, SURREAL0:def 16;
C in (L_ (Unique_No O)) \/ (R_ (Unique_No O)) by A4, XBOOLE_0:def 3;
then A5: born C in born (Unique_No O) by SURREALO:1;
C in Day (born C) by SURREAL0:def 18;
then C <= No_Ordinal_op (born C) by Th69;
then C < No_Ordinal_op A by A5, Th68, A3, SURREALO:4;
then A6: C <= Unique_No O by A2, SURREALO:4;
( Unique_No O in {(Unique_No O)} & {(Unique_No O)} << R_ (Unique_No O) ) by TARSKI:def 1, SURREALO:11;
hence contradiction by A4, A6; :: thesis: verum
end;
end;

definition
let A be Ordinal;
func No_uOrdinal_op A -> No_ordinal uSurreal equals :: SURREALN:def 12
Unique_No (No_Ordinal_op A);
coherence
Unique_No (No_Ordinal_op A) is No_ordinal uSurreal
;
end;

:: deftheorem defines No_uOrdinal_op SURREALN:def 12 :
for A being Ordinal holds No_uOrdinal_op A = Unique_No (No_Ordinal_op A);

theorem Th73: :: SURREALN:73
for A being Ordinal holds
( No_uOrdinal_op A == No_Ordinal_op A & born (No_uOrdinal_op A) = A )
proof end;

theorem Th74: :: SURREALN:74
for A being Ordinal holds No_uOrdinal_op A in Day A
proof end;

theorem Th75: :: SURREALN:75
for A, B being Ordinal holds
( No_uOrdinal_op A < No_uOrdinal_op B iff A in B )
proof end;

theorem Th76: :: SURREALN:76
for A being Ordinal
for x being Surreal st x in Day A holds
x <= No_uOrdinal_op A
proof
let A be Ordinal; :: thesis: for x being Surreal st x in Day A holds
x <= No_uOrdinal_op A

let x be Surreal; :: thesis: ( x in Day A implies x <= No_uOrdinal_op A )
assume x in Day A ; :: thesis: x <= No_uOrdinal_op A
then ( x <= No_Ordinal_op A & No_Ordinal_op A == No_uOrdinal_op A ) by Th69, Th73;
hence x <= No_uOrdinal_op A by SURREALO:4; :: thesis: verum
end;

theorem :: SURREALN:77
for x being Surreal st x is No_ordinal holds
ex A being Ordinal st x == No_uOrdinal_op A
proof
let x be Surreal; :: thesis: ( x is No_ordinal implies ex A being Ordinal st x == No_uOrdinal_op A )
assume x is No_ordinal ; :: thesis: ex A being Ordinal st x == No_uOrdinal_op A
then consider A being Ordinal such that
A1: x == No_Ordinal_op A by Lm24;
No_Ordinal_op A == No_uOrdinal_op A by Th73;
then x == No_uOrdinal_op A by A1, SURREALO:4;
hence ex A being Ordinal st x == No_uOrdinal_op A ; :: thesis: verum
end;

theorem :: SURREALN:78
for n being Nat holds uInt . n = No_uOrdinal_op n
proof end;

theorem :: SURREALN:79
for A being Ordinal holds No_uOrdinal_op (succ A) = [{(No_uOrdinal_op A)},{}]
proof
let A be Ordinal; :: thesis: No_uOrdinal_op (succ A) = [{(No_uOrdinal_op A)},{}]
set OA = No_uOrdinal_op A;
set x = [{(No_uOrdinal_op A)},{}];
A1: {(No_uOrdinal_op A)} << {} ;
A2: born (No_uOrdinal_op A) = A by Th73;
then A3: No_uOrdinal_op A in Day A by SURREAL0:def 18;
for o being object st o in {(No_uOrdinal_op A)} \/ {} holds
ex O being Ordinal st
( O in succ A & o in Day O )
proof
let o be object ; :: thesis: ( o in {(No_uOrdinal_op A)} \/ {} implies ex O being Ordinal st
( O in succ A & o in Day O ) )

assume o in {(No_uOrdinal_op A)} \/ {} ; :: thesis: ex O being Ordinal st
( O in succ A & o in Day O )

then o = No_uOrdinal_op A by TARSKI:def 1;
hence ex O being Ordinal st
( O in succ A & o in Day O )
by A3, ORDINAL1:6; :: thesis: verum
end;
then A4: [{(No_uOrdinal_op A)},{}] in Day (succ A) by A1, SURREAL0:46;
then reconsider x = [{(No_uOrdinal_op A)},{}] as Surreal ;
A5: No_Ordinal_op (succ A) = [{(No_Ordinal_op A)},{}] by Th65;
No_uOrdinal_op A == No_Ordinal_op A by Th73;
then {(No_uOrdinal_op A)} <==> {(No_Ordinal_op A)} by SURREALO:32;
then A6: x == No_Ordinal_op (succ A) by A5, SURREALO:29;
A7: born x c= succ A by A4, SURREAL0:def 18;
No_uOrdinal_op A in (L_ x) \/ (R_ x) by TARSKI:def 1;
then A8: succ A c= born x by A2, SURREALO:1, ORDINAL1:21;
for y being Surreal st y == x holds
succ A c= born y
proof
let y be Surreal; :: thesis: ( y == x implies succ A c= born y )
assume A9: ( y == x & not succ A c= born y ) ; :: thesis: contradiction
( No_uOrdinal_op (born y) < No_uOrdinal_op (succ A) & No_uOrdinal_op (succ A) == No_Ordinal_op (succ A) ) by Th75, Th73, A9, ORDINAL1:16;
then No_uOrdinal_op (born y) < No_Ordinal_op (succ A) by SURREALO:4;
then A10: No_uOrdinal_op (born y) < x by A6, SURREALO:4;
born y c= A by A9, ORDINAL1:16, ORDINAL1:22;
then ( y in Day (born y) & Day (born y) c= Day A ) by SURREAL0:35, SURREAL0:def 18;
then y <= No_uOrdinal_op (born y) by Th76;
hence contradiction by A9, A10, SURREALO:4; :: thesis: verum
end;
then A11: born_eq x = succ A by A8, SURREALO:def 5, A7, XBOOLE_0:def 10;
then A12: x in born_eq_set x by A4, SURREALO:def 6;
A13: (L_ x) \/ (R_ x) is uniq-surreal-membered ;
for z being Surreal st z in born_eq_set x & (L_ z) \/ (R_ z) is uniq-surreal-membered & x <> z holds
(card (L_ x)) (+) (card (R_ x)) in (card (L_ z)) (+) (card (R_ z))
proof
let z be Surreal; :: thesis: ( z in born_eq_set x & (L_ z) \/ (R_ z) is uniq-surreal-membered & x <> z implies (card (L_ x)) (+) (card (R_ x)) in (card (L_ z)) (+) (card (R_ z)) )
assume that
A14: ( z in born_eq_set x & (L_ z) \/ (R_ z) is uniq-surreal-membered & x <> z ) and
A15: not (card (L_ x)) (+) (card (R_ x)) in (card (L_ z)) (+) (card (R_ z)) ; :: thesis: contradiction
A16: ( z == x & z in Day (succ A) ) by A11, A14, SURREALO:def 6;
then ( L_ z << {x} & L_ x << {z} ) by SURREAL0:43;
then ( ex xR being Surreal st
( xR in R_ (No_uOrdinal_op A) & No_uOrdinal_op A < xR & xR <= z ) or ex yL being Surreal st
( yL in L_ z & No_uOrdinal_op A <= yL & yL < z ) )
by SURREALO:13, SURREALO:21;
then consider zL being Surreal such that
A17: ( zL in L_ z & No_uOrdinal_op A <= zL & zL < z ) by Def10;
zL in (L_ z) \/ (R_ z) by A17, XBOOLE_0:def 3;
then A18: zL is uSurreal by A14;
zL in (L_ z) \/ (R_ z) by A17, XBOOLE_0:def 3;
then ( born zL in born z & born z c= succ A ) by SURREALO:1, A16, SURREAL0:def 18;
then ( zL in Day (born zL) & Day (born zL) c= Day A ) by SURREAL0:35, SURREAL0:def 18, ORDINAL1:22;
then zL == No_uOrdinal_op A by Th76, A17;
then A19: zL = No_uOrdinal_op A by A18, SURREALO:50;
( card (L_ x) = 1 & card (R_ x) = 0 ) by CARD_1:30;
then (card (L_ x)) (+) (card (R_ x)) = 1 by ORDINAL7:69;
then (card (L_ z)) (+) (card (R_ z)) = 1 by CARD_1:49, A15, ORDINAL1:16, A17, ZFMISC_1:33;
then consider w being Surreal such that
A20: ( z = [{},{w}] or z = [{w},{}] ) by SURREALO:47;
thus contradiction by A20, A17, A14, A19, TARSKI:def 1; :: thesis: verum
end;
then A21: x is uSurreal by A12, A13, SURREALO:49;
No_Ordinal_op (succ A) == No_uOrdinal_op (succ A) by Th73;
then No_uOrdinal_op (succ A) == x by A6, SURREALO:4;
hence No_uOrdinal_op (succ A) = [{(No_uOrdinal_op A)},{}] by A21, SURREALO:50; :: thesis: verum
end;

theorem :: SURREALN:80
for A being Ordinal ex x being No_ordinal Surreal st
( born x = A & No_uOrdinal_op A == x & ( for o being object holds
( o in L_ x iff ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) ) ) )
proof
let A be Ordinal; :: thesis: ex x being No_ordinal Surreal st
( born x = A & No_uOrdinal_op A == x & ( for o being object holds
( o in L_ x iff ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) ) ) )

defpred S1[ object ] means ex B being Ordinal st
( B in A & $1 = No_uOrdinal_op B );
consider X being set such that
A1: for o being object holds
( o in X iff ( o in Day A & S1[o] ) )
from XBOOLE_0:sch 1();
A2: X << {} ;
for o being object st o in X \/ {} holds
ex O being Ordinal st
( O in A & o in Day O )
proof
let o be object ; :: thesis: ( o in X \/ {} implies ex O being Ordinal st
( O in A & o in Day O ) )

assume o in X \/ {} ; :: thesis: ex O being Ordinal st
( O in A & o in Day O )

then consider B being Ordinal such that
A3: ( B in A & o = No_uOrdinal_op B ) by A1;
born (No_uOrdinal_op B) = B by Th73;
then No_uOrdinal_op B in Day B by SURREAL0:def 18;
hence ex O being Ordinal st
( O in A & o in Day O )
by A3; :: thesis: verum
end;
then A4: [X,{}] in Day A by A2, SURREAL0:46;
then reconsider x = [X,{}] as Surreal ;
R_ x = {} ;
then reconsider x = x as No_ordinal Surreal by Def10;
take x ; :: thesis: ( born x = A & No_uOrdinal_op A == x & ( for o being object holds
( o in L_ x iff ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) ) ) )

for O being Ordinal st x in Day O holds
A c= O
proof
let O be Ordinal; :: thesis: ( x in Day O implies A c= O )
assume A5: ( x in Day O & not A c= O ) ; :: thesis: contradiction
A6: No_uOrdinal_op O in Day O by Th74;
Day O c= Day A by A5, SURREAL0:35;
then ( No_uOrdinal_op O in X & X = L_ x & L_ x << {x} & x in {x} ) by A6, A5, ORDINAL1:16, A1, SURREALO:11, TARSKI:def 1;
hence contradiction by A5, Th76; :: thesis: verum
end;
hence born x = A by A4, SURREAL0:def 18; :: thesis: ( No_uOrdinal_op A == x & ( for o being object holds
( o in L_ x iff ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) ) ) )

L_ (No_Ordinal_op A) << {x}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in L_ (No_Ordinal_op A) or not b in {x} or not b <= a )
assume A7: ( a in L_ (No_Ordinal_op A) & b in {x} ) ; :: thesis: not b <= a
consider B being Ordinal such that
A8: ( B in A & a = No_Ordinal_op B ) by A7, Th71;
A9: ( No_uOrdinal_op B in Day B & Day B c= Day A ) by A8, ORDINAL1:def 2, Th74, SURREAL0:35;
( No_uOrdinal_op B in X & X = L_ x & L_ x << {x} ) by A8, A1, SURREALO:11, A9;
then ( a == No_uOrdinal_op B & No_uOrdinal_op B < b ) by A8, Th73, A7;
hence not b <= a by SURREALO:4; :: thesis: verum
end;
then A10: ( L_ (No_Ordinal_op A) << {x} & {(No_Ordinal_op A)} << R_ x ) ;
L_ x << {(No_Ordinal_op A)}
proof
let a, b be Surreal; :: according to SURREAL0:def 20 :: thesis: ( not a in L_ x or not b in {(No_Ordinal_op A)} or not b <= a )
assume A11: ( a in L_ x & b in {(No_Ordinal_op A)} ) ; :: thesis: not b <= a
consider B being Ordinal such that
A12: ( B in A & a = No_uOrdinal_op B ) by A1, A11;
( a < No_uOrdinal_op A & No_uOrdinal_op A == No_Ordinal_op A ) by A12, Th75, Th73;
then a < No_Ordinal_op A by SURREALO:4;
hence not b <= a by A11, TARSKI:def 1; :: thesis: verum
end;
then ( L_ x << {(No_Ordinal_op A)} & {x} << R_ (No_Ordinal_op A) ) by Def10;
then ( No_uOrdinal_op A == No_Ordinal_op A & No_Ordinal_op A == x ) by SURREAL0:43, A10, Th73;
hence No_uOrdinal_op A == x by SURREALO:4; :: thesis: for o being object holds
( o in L_ x iff ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) )

let o be object ; :: thesis: ( o in L_ x iff ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) )

thus ( o in L_ x implies ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) )
by A1; :: thesis: ( ex B being Ordinal st
( B in A & o = No_uOrdinal_op B ) implies o in L_ x )

given B being Ordinal such that A13: ( B in A & o = No_uOrdinal_op B ) ; :: thesis: o in L_ x
( o in Day B & Day B c= Day A ) by A13, ORDINAL1:def 2, Th74, SURREAL0:35;
hence o in L_ x by A13, A1; :: thesis: verum
end;

registration
let alpha, beta be No_ordinal Surreal;
cluster alpha + beta -> No_ordinal ;
coherence
alpha + beta is No_ordinal
proof
A1: alpha + beta = [(((L_ alpha) ++ {beta}) \/ ({alpha} ++ (L_ beta))),(((R_ alpha) ++ {beta}) \/ ({alpha} ++ (R_ beta)))] by SURREALR:28;
( R_ alpha = {} & {} = R_ beta ) by Def10;
then ( (R_ alpha) ++ {beta} = {} & {} = {alpha} ++ (R_ beta) ) by SURREALR:27;
hence alpha + beta is No_ordinal by A1; :: thesis: verum
end;
cluster alpha * beta -> No_ordinal ;
coherence
alpha * beta is No_ordinal
proof
( R_ alpha = {} & {} = R_ beta ) by Def10;
then A2: alpha * beta = [((comp ((L_ alpha),alpha,beta,(L_ beta))) \/ (comp ((R_ alpha),alpha,beta,{}))),((comp ((L_ alpha),alpha,beta,{})) \/ (comp ({},alpha,beta,(L_ beta))))] by SURREALR:50;
comp ({},alpha,beta,(L_ beta)) = comp ((L_ beta),beta,alpha,{}) by SURREALR:53;
then ( comp ({},alpha,beta,(L_ beta)) = {} & {} = comp ((L_ alpha),alpha,beta,{}) ) by SURREALR:49;
hence alpha * beta is No_ordinal by A2; :: thesis: verum
end;
end;