reserve A,B,C for Ordinal,
        o for object,
        x,y,z,t,r,l for Surreal,
        X,Y for set;

theorem Th28:
  for x,y be Surreal holds
    x + y = [(L_x ++ {y})\/({x} ++ L_y), (R_x ++ {y}) \/({x} ++ R_y)]
proof
  let x,y be Surreal;
  set Bx=born x,By=born y,A=Bx (+)By;
  consider S be c=-monotone Function-yielding Sequence such that
  A1:  dom S = succ A & No_sum_op A = S.A and
  A2: for B be Ordinal st B in succ A
     ex SB be ManySortedSet of Triangle B st S.B = SB &
       for x be object st x in Triangle B holds
         SB.x = [union rng (S|B).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
                 union rng(S|B).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by Def6;
  consider SA be ManySortedSet of Triangle A such that
    A3:S.A = SA and
    A4:for x be object st x in Triangle A holds
       SA.x = [union rng (S|A).:([:L_x`1,{R_x}:]\/[:{L_x},L_R_x:]),
               union rng(S|A).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:])]
       by A2,ORDINAL1:6;
  set U =union rng (S|A);
  A5:[x,y] in Triangle A by Def5;
  [x,y]`1 =x & [x,y]`2=y;
  then A6: x+y = [U.:([:L_x,{y}:]\/[:{x},L_y:] ),
    U.:([:R_x,{y}:]\/[:{x},R_y:] )] by A1,A3,A5,A4;
  A7: U.:[:L_x,{y}:] c= L_x ++ {y}
  proof
    let a be object;
    assume a in U.:[:L_x,{y}:];
    then consider b be object such that
    A8: b in dom U & b in [:L_x,{y}:] & U.b = a by FUNCT_1:def 6;
    consider x1,y1 be object such that
    A9: x1 in L_x & y1 in {y} & b=[x1,y1] by ZFMISC_1:def 2,A8;
    reconsider x1,y1 as Surreal by A9,SURREAL0:def 16;
    set X1 = born x1,C = X1 (+) born y;
    x1 in L_x\/ R_x by A9,XBOOLE_0:def 3;
    then A10: C in A by SURREALO:1,ORDINAL7:94;
    then A11: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A12:S.C = SC and
    for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A13:y=y1 by A9,TARSKI:def 1;
    A14:dom SC = Triangle C by PARTFUN1:def 2;
    A15: [x1,y] in Triangle C by Def5;
    A16: x1 + y = SC.[x1,y] by A11,A1,A2,A12,Th26;
    A17: SC. [x1,y] = (union rng S).[x1,y] by A11,A14,A15,Th2,A1,A12;
    U.b = (union rng S).b by A12,Th5,A10,A13,A9,A15,A14;
    hence thesis by A9,Def8,A8, A17,A16,A13;
  end;
  L_x ++ {y} c= U.:[:L_x,{y}:]
  proof
    let b be object;
    assume b in L_x ++ {y};
    then consider x1,y1 be Surreal such that
    A18: x1 in L_x & y1 in {y} & b = x1 + y1 by Def8;
    A19: y=y1 by A18,TARSKI:def 1;
    set X1 = born x1,C = X1 (+) born y;
    x1 in L_x\/ R_x by A18,XBOOLE_0:def 3;
    then A20: C in A by SURREALO:1,ORDINAL7:94;
    then A21: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A22:S.C = SC and
     for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A23:dom SC = Triangle C by PARTFUN1:def 2;
    A24: [x1,y] in Triangle C by Def5;
    A25: x1 + y = SC.[x1,y] by A21,A1,A2,A22,Th26;
    SC. [x1,y] = (union rng S).[x1,y]
    by A21,A23,A24,Th2,A1,A22;
    then A26:U.[x1,y] = b by A25,A18,A19,A22,Th5,A20,A24,A23;
    A27: [x1,y] in dom U by A22,Th5,A20,A24,A23;
    [x1,y] in [:L_x,{y}:] by A18,A19,ZFMISC_1:87;
    hence thesis by A26,A27,FUNCT_1:def 6;
  end;
  then A28:U.:[:L_x,{y}:] = L_x ++ {y} by A7,XBOOLE_0:def 10;
  A29: U.:[:R_x,{y}:] c= R_x ++ {y}
  proof
    let a be object;
    assume a in U.:[:R_x,{y}:];
    then consider b be object such that
    A30: b in dom U & b in [:R_x,{y}:] & U.b = a by FUNCT_1:def 6;
    consider x1,y1 be object such that
    A31:  x1 in R_x & y1 in {y} & b=[x1,y1] by ZFMISC_1:def 2,A30;
    reconsider x1,y1 as Surreal by A31,SURREAL0:def 16;
    set X1 = born x1,C = X1 (+) born y;
    x1 in L_x\/ R_x by A31,XBOOLE_0:def 3;
    then A32: C in A by SURREALO:1,ORDINAL7:94;
    then A33: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A34:S.C = SC and
     for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A35:y=y1 by A31,TARSKI:def 1;
    A36:dom SC = Triangle C by PARTFUN1:def 2;
    A37: [x1,y] in Triangle C by Def5;
    A38: x1 + y = SC.[x1,y] by A33,A1,A2,A34,Th26;
    A39: SC. [x1,y] = (union rng S).[x1,y] by A33,A36,A37,Th2,A1,A34;
    U.b = (union rng S).b by A34,Th5,A32,A35,A31,A37,A36;
    hence thesis by A31,Def8,A30,A39,A38,A35;
  end;
  R_x ++ {y} c= U.:[:R_x,{y}:]
  proof
    let b be object;
    assume b in R_x ++ {y};
    then consider x1,y1 be Surreal such that
    A40: x1 in R_x & y1 in {y} & b = x1 + y1 by Def8;
    A41: y=y1 by A40,TARSKI:def 1;
    set X1 = born x1,C = X1 (+) born y;
    x1 in L_x\/ R_x by A40,XBOOLE_0:def 3;
    then A42: C in A by SURREALO:1,ORDINAL7:94;
    then A43: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A44:S.C = SC and
     for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A45:dom SC = Triangle C by PARTFUN1:def 2;
    A46: [x1,y] in Triangle C by Def5;
    A47: x1 + y = SC.[x1,y] by A43,A1,A2,A44,Th26;
    SC. [x1,y] = (union rng S).[x1,y]
    by A43,A45,A46,Th2,A1,A44;
    then A48:U.[x1,y] = b by A47,A44,Th5,A42,A46,A45,A40,A41;
    A49: [x1,y] in dom U by A44,Th5,A42,A46,A45;
    [x1,y] in [:R_x,{y}:] by A40,A41,ZFMISC_1:87;
    hence thesis by A48,A49,FUNCT_1:def 6;
  end;
  then A50:U.:[:R_x,{y}:] = R_x ++ {y} by A29,XBOOLE_0:def 10;
  A51: U.:[:{x},L_y:] c= {x} ++ L_y
  proof
    let a be object;
    assume a in U.:[:{x},L_y:];
    then consider b be object such that
    A52: b in dom U & b in [:{x},L_y:] & U.b = a by FUNCT_1:def 6;
    consider x1,y1 be object such that
    A53: x1 in {x} & y1 in L_y & b=[x1,y1] by ZFMISC_1:def 2,A52;
    reconsider x1,y1 as Surreal by A53,SURREAL0:def 16;
    set Y1 = born y1,C = born x (+) Y1;
    y1 in L_y\/ R_y by A53,XBOOLE_0:def 3;
    then A54: C in A by SURREALO:1,ORDINAL7:94;
    then A55: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A56:S.C = SC and
     for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A57:x=x1 by A53,TARSKI:def 1;
    A58:dom SC = Triangle C by PARTFUN1:def 2;
    A59: [x,y1] in Triangle C by Def5;
    A60: x+ y1 = SC.[x,y1] by A55,A1,A2,A56,Th26;
    A61: SC. [x,y1] = (union rng S).[x,y1] by A55,A58,A59,Th2,A1,A56;
    U.b = (union rng S).b by A56,Th5,A54,A57,A53,A59,A58;
    hence thesis by A53,Def8,A52, A61,A60,A57;
  end;
  {x} ++ L_y c= U.:[:{x},L_y:]
  proof
    let b be object;
    assume b in {x} ++ L_y;
    then consider x1,y1 be Surreal such that
    A62: x1 in {x} & y1 in L_y & b = x1 + y1 by Def8;
    A63: x=x1 by A62,TARSKI:def 1;
    set Y1 = born y1,C = born x (+) Y1;
    y1 in L_y\/ R_y by A62,XBOOLE_0:def 3;
    then A64: C in A by SURREALO:1,ORDINAL7:94;
    then A65: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A66:S.C = SC and
     for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A67:dom SC = Triangle C by PARTFUN1:def 2;
    A68: [x,y1] in Triangle C by Def5;
    A69: x + y1 = SC.[x,y1] by A65,A1,A2,A66,Th26;
    SC. [x,y1] = (union rng S).[x,y1] by A65,A67,A68,Th2,A1,A66;
    then A70:U.[x,y1] = b by A69,A66,Th5,A64,A68,A67,A62,A63;
    A71: [x,y1] in dom U by A66,Th5,A64,A68,A67;
    [x,y1] in [:{x},L_y:] by A62,A63,ZFMISC_1:87;
    hence thesis by A70,A71,FUNCT_1:def 6;
  end;
  then A72:{x} ++ L_y = U.:[:{x},L_y:] by A51,XBOOLE_0:def 10;
  A73: U.:[:{x},R_y:] c= {x} ++ R_y
  proof
    let a be object;
    assume a in U.:[:{x},R_y:];
    then consider b be object such that
    A74: b in dom U & b in [:{x},R_y:] & U.b = a by FUNCT_1:def 6;
    consider x1,y1 be object such that
    A75: x1 in {x} & y1 in R_y & b=[x1,y1] by ZFMISC_1:def 2,A74;
    reconsider x1,y1 as Surreal by A75,SURREAL0:def 16;
    set Y1 = born y1,C = born x (+) Y1;
    y1 in L_y\/ R_y by A75,XBOOLE_0:def 3;
    then A76: C in A by SURREALO:1,ORDINAL7:94;
    then A77: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A78:S.C = SC and
     for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A79:x=x1 by A75,TARSKI:def 1;
    A80:dom SC = Triangle C by PARTFUN1:def 2;
    A81: [x,y1] in Triangle C by Def5;
    A82: x+ y1 = SC.[x,y1] by A77,A1,A2,A78,Th26;
    A83: SC. [x,y1] = (union rng S).[x,y1] by A77,A80,A81,Th2,A1,A78;
    U.b = (union rng S).b by A78,Th5,A76,A79,A75,A81,A80;
    hence thesis by A75,Def8,A74, A83,A82,A79;
  end;
  {x} ++ R_y c= U.:[:{x},R_y:]
  proof
    let b be object;
    assume b in {x} ++ R_y;
    then consider x1,y1 be Surreal such that
    A84: x1 in {x} & y1 in R_y & b = x1 + y1 by Def8;
    A85: x=x1 by A84,TARSKI:def 1;
    set Y1 = born y1,C = born x (+) Y1;
    y1 in L_y\/ R_y by A84,XBOOLE_0:def 3;
    then A86: C in A by SURREALO:1,ORDINAL7:94;
    then A87: C in succ A by ORDINAL1:8;
    then consider SC be ManySortedSet of Triangle C such that
    A88:S.C = SC and
    for x be object st x in Triangle C holds
      SC.x = [union rng (S|C).:([:L_L_x,{R_x}:]\/[:{L_x},L_R_x:] ),
        union rng(S|C).:([:R_L_x,{R_x}:]\/[:{L_x},R_R_x:] )] by A2;
    A89:dom SC = Triangle C by PARTFUN1:def 2;
    A90: [x,y1] in Triangle C by Def5;
    A91: x + y1 = SC.[x,y1] by A87,A1,A2,A88,Th26;
    SC. [x,y1] = (union rng S).[x,y1]
    by A87,A89,A90,Th2,A1,A88;
    then A92:U.[x,y1] = b by A91,A88,Th5,A86,A90,A89,A84,A85;
    A93: [x,y1] in dom U by A88,Th5,A86,A90,A89;
    [x,y1] in [:{x},R_y:] by A84,A85,ZFMISC_1:87;
    hence thesis by A92,A93,FUNCT_1:def 6;
  end;
  then A94:{x} ++ R_y = U.:[:{x},R_y:] by A73,XBOOLE_0:def 10;
  U.:([:L_x,{y}:]\/[:{x},L_y:])  = (L_x ++ {y}) \/({x} ++(L_y))
  by A28,A72,RELAT_1:120;
  hence thesis by A6,A50,A94,RELAT_1:120;
end;
