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 Th20:
  d in DYADIC(n+1)\DYADIC(n) iff ex i be Integer st d = (2*i+1) / 2|^(n+1)
proof
  thus d in DYADIC(n+1)\DYADIC(n) implies
    ex i be Integer st d = (2*i+1) / 2|^(n+1)
  proof
    assume
A1: d in DYADIC(n+1)\DYADIC(n);
    then d in DYADIC(n+1) by XBOOLE_0:def 5;
    then consider i be Integer such that
A2: d = i / (2|^(n+1)) by Def4;
    i is odd
    proof
      assume i is even;
      then consider j be 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 thesis by A1,XBOOLE_0:def 5;
    end;
    then consider j be Integer such that
A4: i= 2*j+1 by ABIAN:1;
    take j;
    thus thesis by A2,A4;
  end;
  given i be Integer such that
A5:d = (2*i+1) / 2|^(n+1);
A6:d in DYADIC(n+1) by Def4,A5;
  not d in DYADIC(n)
  proof
    assume d in DYADIC(n);
    then consider j be 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 thesis by XCMPLX_1:5;
  end;
  hence thesis by A6,XBOOLE_0:def 5;
end;
