reserve A,B for Ordinal,
        o for object,
        x,y,z for Surreal,
        n for Nat,
        r,r1,r2 for Real;

theorem Th95:
  (for r be non-zero Sequence of REAL,
       y be strictly_decreasing uSurreal-Sequence st dom r = dom y &
            r,y,dom r name_like x holds not Sum(r,y) == x)
  implies
   for alpha be Ordinal
    ex r be non-zero Sequence of REAL,
       y be strictly_decreasing uSurreal-Sequence st
         dom r = succ alpha = dom y &
         r,y,succ alpha name_like x
proof
  assume
A1: for r be non-zero Sequence of REAL,
     y be strictly_decreasing uSurreal-Sequence st dom r = dom y &
     r,y,dom r name_like x holds not Sum(r,y) == x;
  defpred P[Ordinal] means
  ex r be non-zero Sequence of REAL,
     y be strictly_decreasing uSurreal-Sequence st
       dom r = succ $1 = dom y & r,y,succ $1 name_like x;
A2: for D be Ordinal st for C be Ordinal st C in D holds P[C] holds P[D]
  proof
    let D be Ordinal such that
A3: for C be Ordinal st C in D holds P[C];
    defpred U[object,object] means
    $2 is pair & $2`1 is non-zero Sequence of REAL &
    $2`2 is strictly_decreasing uSurreal-Sequence & for A be Ordinal st A=$1
    for r be non-zero Sequence of REAL,
    y be strictly_decreasing uSurreal-Sequence st r = $2`1 & y = $2`2
    holds dom r = succ A = dom y & r,y,succ A name_like x;
A4: for e being object st e in D ex o st U[e,o]
    proof
      let e be object such that
A5:   e in D;
      reconsider E=e as Ordinal by A5;
      consider r1 be non-zero Sequence of REAL,
      y1 be strictly_decreasing uSurreal-Sequence such that
A6:   dom r1 = succ E = dom y1 & r1,y1,succ E name_like x by A5,A3;
      take ry=[r1,y1];
      thus ry is pair &ry`1 is non-zero Sequence of REAL &
      ry`2 is strictly_decreasing uSurreal-Sequence;
      let A be Ordinal such that
A7:   A=e;
      let r be non-zero Sequence of REAL,
        y be strictly_decreasing uSurreal-Sequence;
      thus thesis by A7,A6;
    end;
    consider S be Function such that
A8: dom S = D &
    for o st o in D holds U[o,S.o] from CLASSES1:sch 1(A4);
    defpred R[object,object] means
    for f be Function st f = (S.$1)`1 holds $2= f.$1;
A9: for e being object st e in D ex o st R[e,o]
    proof
      let e be object such that
A10:e in D;
      reconsider e as Ordinal by A10;
      reconsider SE1=(S.e)`1 as non-zero Sequence of REAL by A10,A8;
      take o = SE1.e;
      thus thesis;
    end;
    consider R be Function such that
A11: dom R = D &
    for o st o in D holds R[o,R.o] from CLASSES1:sch 1(A9);
    reconsider R as Sequence by A11,ORDINAL1:def 7;
    rng R c= REAL
    proof
      let y be object;
      assume y in rng R;
      then consider o such that
A12:  o in D & R.o = y by A11,FUNCT_1:def 3;
      reconsider o as Ordinal by A12;
      reconsider SO1=(S.o)`1 as non-zero Sequence of REAL by A12,A8;
      reconsider SO2=(S.o)`2 as strictly_decreasing Surreal-Sequence by A12,A8;
      SO1.o in REAL by XREAL_0:def 1;
      hence thesis by A12,A11;
    end;
    then reconsider R as Sequence of REAL by RELAT_1:def 19;
    not 0 in rng R
    proof
      assume 0 in rng R;
      then consider o such that
A13:  o in D & R.o = 0 by A11,FUNCT_1:def 3;
      reconsider o as Ordinal by A13;
      reconsider SO1=(S.o)`1 as non-zero Sequence of REAL by A13,A8;
      U[o,S.o] by A13,A8;
      then dom SO1 = succ o;
      then o in dom SO1 by ORDINAL1:6;
      then SO1.o in rng SO1 by FUNCT_1:def 3;
      hence thesis by A13,A11;
    end;
    then reconsider R as non-zero Sequence of REAL by ORDINAL1:def 15;
    defpred Y[object,object] means
    for f be Function st f = (S.$1)`2 holds $2= f.$1;
A14: for e being object st e in D ex o st Y[e,o]
    proof
      let e be object such that
A15:e in D;
      reconsider e as Ordinal by A15;
      reconsider SE2=(S.e)`2 as strictly_decreasing uSurreal-Sequence
        by A15,A8;
      take o = SE2.e;
      thus thesis;
    end;
    consider Y be Function such that
A16: dom Y = D &
    for o st o in D holds Y[o,Y.o] from CLASSES1:sch 1(A14);
    reconsider Y as Sequence by A16,ORDINAL1:def 7;
    rng Y is uniq-surreal-membered
    proof
      let y be object;
      assume y in rng Y;
      then consider o such that
A17:  o in D & Y.o = y by A16,FUNCT_1:def 3;
      reconsider o as Ordinal by A17;
      reconsider SO2=(S.o)`2 as strictly_decreasing uSurreal-Sequence
      by A17,A8;
      U[o,S.o] by A17,A8;
      then dom SO2 = succ o;
      then o in dom SO2 by ORDINAL1:6;
      then SO2.o in rng SO2 by FUNCT_1:def 3;
      then SO2.o is uSurreal by SURREALO:def 12;
      hence thesis by A17,A16;
    end;
    then reconsider Y as uSurreal-Sequence by Def10;
    defpred EQ[Ordinal] means
    $1 in D implies
    Y|succ $1 is strictly_decreasing &
    R|succ $1 = (S.$1)`1 & Y|succ $1 = (S.$1)`2;
A18: for E be Ordinal st for F be Ordinal st F in E holds EQ[F] holds EQ[E]
    proof
      let E be Ordinal such that
A19:  for F be Ordinal st F in E holds EQ[F];
      set YE = Y|succ E;
      assume
A20:  E in D;
A21:  dom YE = succ E by A20,ORDINAL1:21,A16,RELAT_1:62;
      reconsider r=(S.E)`1 as non-zero Sequence of REAL by A20,A8;
      reconsider y=(S.E)`2 as strictly_decreasing uSurreal-Sequence by A20,A8;
      set sE=succ E;
      U[E,S.E] by A20,A8;
      then
A22:  dom r = succ E = dom y & r,y,sE name_like x;
      thus YE is strictly_decreasing
      proof
        let a,b be Ordinal such that
A23:    a in b in dom YE;
        let sa,sb be Surreal such that
A24:    sa=YE.a & sb=YE.b;
A25:    sa = Y.a & sb = Y.b by A23,ORDINAL1:10,A24,FUNCT_1:47;
        per cases by A23,ORDINAL1:8;
        suppose
A26:      b=E;
A27:      a in D by A26,A20,A23,ORDINAL1:10;
A28:      U[a,S.a] by A27,A8;
          reconsider ra=(S.a)`1 as non-zero Sequence of REAL by A27,A8;
          reconsider ya=(S.a)`2 as strictly_decreasing Surreal-Sequence
          by A27,A8;
A29:      dom ra = succ a = dom ya & ra,ya,succ a name_like x by A28;
          succ a c= E by A26,A23,ORDINAL1:21;
          then succ a in sE by ORDINAL1:22;
          then
A30:      succ a c= sE by ORDINAL1:def 2;
          r,y,succ a name_like x by A22,A30;
          then
A31:      r|succ a = ra|succ a & y|succ a = ya|succ a by A29,Th87;
          R|succ a = ra & Y|succ a = ya by A26,A23,A27,A19;
          then sa = Y.a = ya.a by A23,ORDINAL1:6,10,A24,FUNCT_1:49;
          then
A32:      sa = y.a by A29,A31,FUNCT_1:49,ORDINAL1:6;
          sb = y.b by A25,A26,A16,A20;
          hence thesis by A23,A32,A22,Def11;
        end;
        suppose
A33:      b in E;
          then
A34:      EQ[b] by A19;
A35:      Y|succ b is strictly_decreasing by A34,A20,A33,ORDINAL1:10;
          succ b c= D by A20,A33,ORDINAL1:10,21;
          then
A36:      dom (Y|succ b) = succ b by A16,RELAT_1:62;
A37:      b in succ b by ORDINAL1:6;
          then sa = (Y|succ b).a & sb = (Y|succ b).b
          by A25,A36,FUNCT_1:47,A23,ORDINAL1:10;
          hence thesis by A37,A35,A23,A36;
        end;
      end;
      then reconsider YE as strictly_decreasing Surreal-Sequence;
A38:  dom (R|sE) = sE by A20,A11,ORDINAL1:21,RELAT_1:62;
A39:  o in sE implies (R|sE).o = r.o & YE.o = y.o
      proof
        assume
A40:    o in sE;
        then reconsider o as Ordinal;
A41:    (R|succ E).o = R.o & YE.o = Y.o by A40,FUNCT_1:49;
        per cases by A40,ORDINAL1:8;
        suppose o = E;
          hence thesis by A41,A20,A11,A16;
        end;
        suppose
A42:      o in E;
A43:      o in D by A42,A20,ORDINAL1:10;
          then
A44:      U[o,S.o] by A8;
          reconsider ro=(S.o)`1 as non-zero Sequence of REAL by A8,A43;
          reconsider yo=(S.o)`2 as strictly_decreasing Surreal-Sequence
          by A8,A43;
A45:      dom ro= succ o = dom yo & ro,yo,succ o name_like x by A44;
          succ o c= E by A42,ORDINAL1:21;
          then succ o in sE by ORDINAL1:22;
          then
A46:      succ o c= sE by ORDINAL1:def 2;
          r,y,succ o name_like x by A22,A46;
          then
A47:      r|succ o = ro|succ o & y|succ o = yo|succ o by A45,Th87;
          o in succ o by ORDINAL1:8;
          then yo.o = y.o & ro.o= r.o by A47,A45,FUNCT_1:49;
          hence thesis by A41,A42,A20,ORDINAL1:10,A11,A16;
        end;
      end;
A48:  o in sE implies (R|sE).o = r.o by A39;
      o in sE implies YE.o = y.o by A39;
      hence thesis by A48,A22,A21,FUNCT_1:2,A38;
    end;
A49: for D be Ordinal holds EQ[D] from ORDINAL1:sch 2(A18);
    Y is strictly_decreasing
    proof
      let a,b be Ordinal such that
A50:  a in b in dom Y;
      let sa,sb be Surreal such that
A51:  sa=Y.a & sb=Y.b;
      set B=Y|succ b;
A52:  b in succ b by ORDINAL1:6;
      a in succ b by A50,ORDINAL1:8;
      then
A53:  sa = B.a & sb=B.b by A51,ORDINAL1:6,FUNCT_1:49;
A54:  dom B = succ b by RELAT_1:62,A50,ORDINAL1:21;
      B is strictly_decreasing by A49,A50,A16;
      hence sb < sa by A54,A50,A52,A53;
    end;
    then reconsider Y as strictly_decreasing Surreal-Sequence;
A55: R,Y,D name_like x
    proof
      thus D c= dom R = dom Y by A16,A11;
      let b be Ordinal such that
A56:  b in D;
      let Pb be Surreal such that
A57:  Pb = Partial_Sums(R,Y).b;
A58:  U[b,S.b] by A56,A8;
      reconsider rb=(S.b)`1 as non-zero Sequence of REAL by A56,A8;
      reconsider yb=(S.b)`2 as strictly_decreasing Surreal-Sequence by A56,A8;
      set sb=succ b;
A59:  dom rb = sb = dom yb & rb,yb,sb name_like x by A58;
A60:  Y|succ b is strictly_decreasing &
      R|succ b = rb & Y|succ b = yb by A49,A56;
A61:  b in sb & sb in succ sb by ORDINAL1:6;
      b in succ sb by ORDINAL1:6,8;
      then Pb = (Partial_Sums(R,Y)|succ sb).b by A57,FUNCT_1:49
      .= Partial_Sums(rb,yb).b by A60,Th85;
      then not x == Pb & rb.b = omega-r (x - Pb) &
      yb.b = omega-y (x - Pb) by A61,A59;
      hence thesis by ORDINAL1:6,A60,FUNCT_1:49;
    end;
    then
A62: not Sum(R,Y) == x by A1,A16;
    then
A63: not x - Sum(R,Y) ==0_No by SURREALR:47;
    reconsider Rx = omega-r (x +- Sum(R,Y)) as Element of REAL
    by XREAL_0:def 1;
    not 0 in {Rx};
    then not 0 in rng <%Rx%> by AFINSQ_1:33;
    then reconsider RX=<%Rx%> as non-zero Sequence of REAL by ORDINAL1:def 15;
    rng(R^RX) = rng R \/ rng RX by ORDINAL4:2;
    then reconsider RRX = R^RX as non-zero Sequence of REAL by RELAT_1:def 19;
    take RRX;
A64: dom RX = 1 by AFINSQ_1:def 4;
    then
A65: dom RRX = (dom R)+^ 1 by ORDINAL4:def 1;
    then
A66: dom RRX = succ D by A11,ORDINAL2:31;
    set  Yx = omega-y (x +- Sum(R,Y)), YX = <%Yx%>, YYX=Y^YX;
A67: dom YX = 1 by AFINSQ_1:def 4;
    then
A68: dom YYX = (dom Y)+^ 1 by ORDINAL4:def 1;
    then
A69: dom YYX = succ D by A16,ORDINAL2:31;
    0 in 1 by CARD_1:49,TARSKI:def 1;
    then
A70: Rx = RX.0 = RRX.(D+^0) & D+^0 = D &
    Yx = YX.0 = YYX.(D+^0)
    by A16,A11,A64,A67,ORDINAL4:def 1,ORDINAL2:27;
    YYX is strictly_decreasing
    proof
      let a,b be Ordinal such that
A71:  a in b in dom YYX;
      let sa,sb be Surreal such that
A72:  sa=YYX.a & sb=YYX.b;
      per cases by A71,A69,ORDINAL1:8;
      suppose
A73:    b in D;
        then a in D by A71,ORDINAL1:10;
        then sa = Y.a & sb = Y.b by A72,A73,A16,ORDINAL4:def 1;
        hence thesis by A71,A73,A16,Def11;
      end;
      suppose
A74:    b=D;
        sa = Y.a by A74,A72,A71,A16,ORDINAL4:def 1;
        then
A75:    omega-y ( Sum(R,Y) - x) < sa
        by A11,A71,A74,A62,Th92,A55,Th88;
        Yx = omega-y (-(x +- Sum(R,Y))) by A63,Th56
        .= omega-y (-x + - - Sum(R,Y)) by SURREALR:40
        .= omega-y (-x + Sum(R,Y));
        hence thesis by A70,A74,A75,A72;
      end;
    end;
    then reconsider YYX as strictly_decreasing uSurreal-Sequence;
    take YYX;
    thus dom RRX = succ D = dom YYX by A65,A11,A68,A16,ORDINAL2:31;
    thus succ D c= dom RRX = dom YYX
      by A65,A11,A67,A16,ORDINAL2:31,ORDINAL4:def 1;
    let b be Ordinal such that
A76: b in succ D;
    let Pb be Surreal such that
A77: Pb = Partial_Sums(RRX,YYX).b;
A78: dom R = dom RRX/\dom R by ORDINAL7:1,A66,A11;
    o in dom R implies R.o = RRX.o by ORDINAL4:def 1;
    then
A79: RRX|D = R by A78,FUNCT_1:46,A11;
A80: dom Y = dom YYX/\dom Y by ORDINAL7:1,A69,A16;
A81: o in dom Y implies Y.o = YYX.o by ORDINAL4:def 1;
A82: Pb = (Partial_Sums(RRX,YYX)|succ D).b by A76,A77,FUNCT_1:49
    .= Partial_Sums(RRX|D,YYX|D).b by Th85
    .= Partial_Sums(R,Y).b by A79,A81,A80,FUNCT_1:46,A16;
    per cases by A76,ORDINAL1:8;
    suppose b= D;
      hence thesis by A55,A1,A16,A82,A70;
    end;
    suppose
A83:  b in D;
      then RRX.b = R.b & YYX.b = Y.b by A11,A16,ORDINAL4:def 1;
      hence thesis by A55,A83,A82;
    end;
  end;
  for D be Ordinal holds P[D] from ORDINAL1:sch 2(A2);
  hence thesis;
end;
