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

theorem Th50:
  for x,y be Surreal holds
    x * y = [comp(L_x,x,y,L_y) \/ comp(R_x,x,y,R_y),
             comp(L_x,x,y,R_y) \/ comp(R_x,x,y,L_y)]
proof
  let x,y be Surreal;
  set Bx=born x,By=born y,A=Bx (+)By;
  deffunc UU(object,object,c=-monotone Function-yielding Sequence) =
    [( (union rng ($3).:[:L_$1,{$2}:]) ++
                       (union rng ($3).:[:{$1},L_$2:]) ++ --
                       (union rng ($3).:[:L_$1,L_$2:]) ) \/
                     ( (union rng ($3).:[:R_$1,{$2}:]) ++
                       (union rng ($3).:[:{$1},R_$2:]) ++ --
                       (union rng ($3).:[:R_$1,R_$2:])),
                     ( (union rng ($3).:[:L_$1,{$2}:]) ++
                       (union rng ($3).:[:{$1},R_$2:]) ++ --
                       (union rng ($3).:[:L_$1,R_$2:]) ) \/
                     ( (union rng ($3).:[:R_$1,{$2}:]) ++
                       (union rng ($3).:[:{$1},L_$2:]) ++ --
                       (union rng ($3).:[:R_$1`2,L_$2:]))];
  deffunc H(object,c=-monotone Function-yielding Sequence) =
       [ {(union rng $2.[xL,R_$1]) +'
         (union rng $2.[L_$1,yL]) +' -' (union rng $2.[xL,yL])
         where xL is Element of L_L_$1,yL is Element of L_R_$1:
         xL in L_L_$1 & yL in L_R_$1} \/
        {(union rng $2.[xR,R_$1]) +'
        (union rng $2.[L_$1,yR]) +' -' (union rng $2.[xR,yR])
        where xR is Element of R_L_$1,yR is Element of R_R_$1:
        xR in R_L_$1 & yR in R_R_$1},
        {(union rng $2.[xL,R_$1]) +'
        (union rng $2.[L_$1,yR]) +' -' (union rng $2.[xL,yR])
        where xL is Element of L_L_$1,yR is Element of R_R_$1:
        xL in L_L_$1 & yR in R_R_$1}
        \/
        {(union rng $2.[xR,R_$1]) +'
        (union rng $2.[L_$1,yL]) +' -' (union rng $2.[xR,yL])
        where xR is Element of R_L_$1,yL is Element of L_R_$1:
        xR in R_L_$1 & yL in L_R_$1}];
   consider S be c=-monotone Function-yielding Sequence such that
   A1:  dom S = succ A & No_mult_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 = H(x,S|B) by Def12;
   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 = H(x,S|A)
   by A2,ORDINAL1:6;
   set U =union rng (S|A);
   A5:[x,y] in Triangle A by Def5;
   A6: x*y = H([x,y],S|A) by A1,A3,A5,A4;
   A7:for X,Y be surreal-membered set st X c= L_x\/ R_x & Y c= L_y\/ R_y
   holds {(U.[xL,y]) +' (U.[x,yL]) +' -' (U.[xL,yL])
   where xL is Element of X,yL is Element of Y:xL in X & yL in Y}
   = comp(X,x,y,Y)
   proof
     let X,Y be surreal-membered set such that
     A8: X c= L_x\/ R_x & Y c= L_y \/R_y;
     thus {(U.[xL,y]) +' (U.[x,yL]) +' -' (U.[xL,yL])
     where xL is Element of X,yL is Element of Y:xL in X & yL in Y}
     c= comp(X,x,y,Y)
     proof
       let a be object;
       assume a in {(U.[xL,y]) +' (U.[x,yL]) +' -' (U.[xL,yL])
       where xL is Element of X,yL is Element of Y:xL in X & yL in Y};
       then consider xL be Element of X,yL be Element of Y such that
       A9:a= (U.[xL,y])+' (U.[x,yL])+' -' (U.[xL,yL]) & xL in X & yL in Y;
       reconsider x1=xL,y1=yL as Surreal by SURREAL0:def 16,A9;
       set X1 = born x1,C1 = X1 (+) born y;
       A10: C1 in A by A9,A8,SURREALO:1,ORDINAL7:94;
       then A11: C1 in succ A by ORDINAL1:8;
       then consider SC1 be ManySortedSet of Triangle C1 such that
       A12:S.C1 = SC1 and
       for x be object st x in Triangle C1 holds
       SC1.x = H(x,S|C1) by A2;
       A13:dom SC1 = Triangle C1 by PARTFUN1:def 2;
       A14: [x1,y] in Triangle C1 by Def5;
       A15: x1 * y = SC1.[x1,y] by A11,A1,A2,A12,Th48;
       A16: SC1. [x1,y] = (union rng S).[x1,y] by A11,A13,A14,Th2,A1,A12;
       A17: U. [x1,y] = x1*y by A16,A15,A12,Th5,A10,A14,A13;
       set Y1 = born y1,C2 = born x (+) Y1;
       A18: C2 in A by A9,A8,SURREALO:1,ORDINAL7:94;
       then A19: C2 in succ A by ORDINAL1:8;
       then consider SC2 be ManySortedSet of Triangle C2 such that
       A20:S.C2 = SC2 and
       for x be object st x in Triangle C2 holds
       SC2.x = H(x,S|C2) by A2;
       A21:dom SC2 = Triangle C2 by PARTFUN1:def 2;
       A22: [x,y1] in Triangle C2 by Def5;
       A23: x * y1 = SC2.[x,y1] by A19,A1,A2,A20,Th48;
       A24: SC2. [x,y1] = (union rng S).[x,y1] by A19,A21,A22,Th2,A1,A20;
       A25: U. [x,y1] = x*y1 by A24,A23,A20,Th5,A18,A22,A21;
       set C3 = X1  (+) Y1;
       C3 in C2 in A by A9,A8,SURREALO:1,ORDINAL7:94;
       then A26: C3 in A by ORDINAL1:10;
       then A27: C3 in succ A by ORDINAL1:8;
       then consider SC3 be ManySortedSet of Triangle C3 such that
       A28:S.C3 = SC3 and
       for x be object st x in Triangle C3 holds
       SC3.x = H(x,S|C3) by A2;
       A29:dom SC3 = Triangle C3 by PARTFUN1:def 2;
       A30: [x1,y1] in Triangle C3 by Def5;
       A31:x1 * y1 = SC3.[x1,y1] by A27,A1,A2,A28,Th48;
       A32:SC3. [x1,y1] = (union rng S).[x1,y1] by A27,A29,A30,Th2,A1,A28;
       a= (U.[xL,y]) +' (U.[x,yL]) +' -' (x1*y1)
       by A9,A32,A31,A28,Th5,A26,A30,A29;
       hence thesis by Def14,A9,A17,A25;
     end;
     let a be object;
     assume a in comp(X,x,y,Y);
     then consider x1,y1 be Surreal such that
     A33: a = (x1*y) +' (x*y1) +' -' (x1*y1) & x1 in X & y1 in Y by Def14;
     set X1 = born x1,C1 = X1 (+) born y;
     A34:C1 in A by A33,A8,SURREALO:1,ORDINAL7:94;
     then A35: C1 in succ A by ORDINAL1:8;
     then consider SC1 be ManySortedSet of Triangle C1 such that
     A36:S.C1 = SC1 and
     for x be object st x in Triangle C1 holds
     SC1.x = H(x,S|C1) by A2;
     A37:dom SC1 = Triangle C1 by PARTFUN1:def 2;
     A38: [x1,y] in Triangle C1 by Def5;
     A39: x1 * y = SC1.[x1,y] by A35,A1,A2,A36,Th48;
     A40: SC1. [x1,y] = (union rng S).[x1,y] by A35,A37,A38,Th2,A1,A36;
     A41: U. [x1,y] = x1*y by A40,A39,A36,Th5,A34,A38,A37;
     set Y1 = born y1,C2 = born x  (+) Y1;
     A42: C2 in A by A33,A8,SURREALO:1,ORDINAL7:94;
     then A43: C2 in succ A by ORDINAL1:8;
     then consider SC2 be ManySortedSet of Triangle C2 such that
     A44:S.C2 = SC2 and
     for x be object st x in Triangle C2 holds
     SC2.x = H(x,S|C2) by A2;
     A45:dom SC2 = Triangle C2 by PARTFUN1:def 2;
     A46: [x,y1] in Triangle C2 by Def5;
     A47: x * y1 = SC2.[x,y1] by A43,A1,A2,A44,Th48;
     A48: SC2. [x,y1] = (union rng S).[x,y1] by A43,A45,A46,Th2,A1,A44;
     A49: U. [x,y1] = x*y1 by A48,A47,A44,Th5,A42,A46,A45;
     set C3 = X1  (+) Y1;
     C3 in C2 in A by A33,A8,SURREALO:1,ORDINAL7:94;
     then A50: C3 in A by ORDINAL1:10;
     then A51: C3 in succ A by ORDINAL1:8;
     then consider SC3 be ManySortedSet of Triangle C3 such that
     A52:S.C3 = SC3 and
     for x be object st x in Triangle C3 holds
     SC3.x = H(x,S|C3)by A2;
     A53:dom SC3 = Triangle C3 by PARTFUN1:def 2;
     A54: [x1,y1] in Triangle C3 by Def5;
     A55: x1 * y1 = SC3.[x1,y1] by A51,A1,A2,A52,Th48;
     A56: SC3. [x1,y1] = (union rng S).[x1,y1] by A51,A53,A54,Th2,A1,A52;
     a= (x1*y) +' (x*y1) +' -' (U. [x1,y1])
     by A33,A56,A55,A52,Th5,A50,A54,A53;
     hence thesis by A33,A49,A41;
   end;
   A57:L_x c= L_x \/ R_x & R_x c= L_x \/ R_x &
   L_y c= L_y\/R_y & R_y c= L_y\/R_y by XBOOLE_1:7;
   A58:{(U.[xL,y]) +'(U.[x,yL]) +' -' (U.[xL,yL])
   where xL is Element of L_x,yL is Element of L_y:xL in L_x & yL in L_y}
   =comp(L_x,x,y,L_y) by A57,A7;
   A59:{(U.[xL,y]) +'(U.[x,yR]) +' -' (U.[xL,yR])
   where xL is Element of L_x,yR is Element of R_y:xL in L_x & yR in R_y}
   =comp(L_x,x,y,R_y) by A57,A7;
   {(U.[xR,y]) +'(U.[x,yR]) +' -' (U.[xR,yR])
   where xR is Element of R_x,yR is Element of R_y:xR in R_x & yR in R_y}
   =comp(R_x,x,y,R_y) by A57,A7;
   hence thesis by A6,A58,A59,A57,A7;
end;
