reserve fi,psi for Ordinal-Sequence,
  A,A1,B,C,D for Ordinal,
  X,Y for set,
  x,y for object;

theorem Th30:
  A+^B+^C = A+^(B+^C)
proof
  defpred Sigma[Ordinal] means A+^B+^$1 = A+^(B+^$1);
A1: for C st Sigma[C] holds Sigma[succ C]
  proof
    let C such that
A2: A+^B+^C = A+^(B+^C);
    thus A+^B+^succ C = succ(A+^B+^C) by ORDINAL2:28
      .= A+^succ(B+^C) by A2,ORDINAL2:28
      .= A+^(B+^succ C) by ORDINAL2:28;
  end;
A3: for C st C <> 0 & C is limit_ordinal & for D st D in C holds Sigma[D]
  holds Sigma[C]
  proof
    deffunc F(Ordinal) = A +^ B +^ $1;
    let C such that
A4: C <> 0 and
A5: C is limit_ordinal and
A6: for D st D in C holds Sigma[D];
    consider L being Ordinal-Sequence such that
A7: dom L = C & for D st D in C holds L.D = F(D) from ORDINAL2:sch 3;
    deffunc F(Ordinal) = A +^ $1;
    consider L1 being Ordinal-Sequence such that
A8: dom L1 = B+^C & for D st D in B+^C holds L1.D = F(D) from
    ORDINAL2:sch 3;
A9: rng L c= rng L1
    proof
      let x be object;
      assume x in rng L;
      then consider y being object such that
A10:  y in dom L and
A11:  x = L.y by FUNCT_1:def 3;
      reconsider y as Ordinal by A10;
A12:  B+^y in B+^C by A7,A10,ORDINAL2:32;
      L.y = A+^B+^y by A7,A10;
      then
A13:  L.y = A+^(B+^y) by A6,A7,A10;
      L1.(B+^y) = A+^(B+^y) by A7,A8,A10,ORDINAL2:32;
      hence thesis by A8,A11,A13,A12,FUNCT_1:def 3;
    end;
A14: B+^C <> {} by A4,Th26;
    B+^C is limit_ordinal by A4,A5,Th29;
    then
A15: A+^(B+^C) = sup L1 by A8,A14,ORDINAL2:29
      .= sup rng L1;
    A+^B+^C = sup L by A4,A5,A7,ORDINAL2:29
      .= sup rng L;
    hence A+^B+^C c= A+^(B+^C) by A15,A9,ORDINAL2:22;
    let x be object;
    assume
A16: x in A+^(B+^C);
    then reconsider x9 = x as Ordinal;
A17: now
A18:  A c= A+^B by Th24;
      assume
A19:  not x in A+^B;
      then A+^B c= x9 by ORDINAL1:16;
      then consider E being Ordinal such that
A20:  x9 = A+^E by A18,Th27,XBOOLE_1:1;
      B c= E by A19,A20,ORDINAL1:16,ORDINAL2:32;
      then consider F being Ordinal such that
A21:  E = B+^F by Th27;
A22:  now
        assume not F in C;
        then B+^C c= B+^F by ORDINAL1:16,ORDINAL2:33;
        then A+^(B+^C) c= A+^(B+^F) by ORDINAL2:33;
        then x9 in x9 by A16,A20,A21;
        hence contradiction;
      end;
      then x = A+^B+^F by A6,A20,A21;
      hence thesis by A22,ORDINAL2:32;
    end;
A23: A+^B+^{} = A+^B by ORDINAL2:27;
    A+^B+^{} c= A+^B+^C by ORDINAL2:33,XBOOLE_1:2;
    hence thesis by A23,A17;
  end;
  A+^B+^{} = A+^B by ORDINAL2:27
    .= A+^(B+^{}) by ORDINAL2:27;
  then
A24: Sigma[0];
  for C holds Sigma[C] from ORDINAL2:sch 1(A24,A1,A3);
  hence thesis;
end;
