reserve A,B,O for Ordinal,
        o for object,
        x,y,z for Surreal,
        n,m for Nat;
reserve d,d1,d2 for Dyadic;
reserve i,j for Integer,
        n,m,p for Nat;

theorem Th38:
  for i be Integer,p be Nat,x be 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,p be Nat,x be Surreal;
  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;
  assume
A1:x = [{uDyadic.(i / (2|^p))},{uDyadic.((i+2) / (2|^p))}];
  per cases;
  suppose p=0;
    then
A2: 2|^p =1 by NEWTON:4;
    set j=i+1;
A3: j-1 = i & j+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 thesis by A1,Th10,A3;
  end;
  suppose
A4: p >0;
    per cases;
    suppose i+1 >0;
      then i is Element of NAT by INT_1:3,7;
      hence thesis by A1,A4,Lm7;
    end;
    suppose
A5:   i+1=0;
A6:   0_No = 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 thesis by A6,A5,A7,SURREAL0:43;
    end;
    suppose i+1<0;
      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 == - uDyadic.((n+1) / (2|^p)) by SURREALR:10;
      then
A9:   x == uDyadic.(- ((n+1) / (2|^p))) by Th27;
      -(n+1) = i+1;
      hence thesis by A9,XCMPLX_1:187;
    end;
  end;
end;
