
theorem
  for a, b, c being Ordinal st a (+) b = a (+) c holds b = c
proof
  let a, b, c be Ordinal;
  assume A1: a (+) b = a (+) c;
  set C1 = CantorNF(a(+)b), C2 = CantorNF(a(+)c);
  set E1 = omega-exponent CantorNF a, E2 = omega-exponent CantorNF b;
  set E3 = omega-exponent CantorNF c, L1 = omega-leading_coeff CantorNF a;
  set L2 = omega-leading_coeff CantorNF b;
  set L3 = omega-leading_coeff CantorNF c;
  :: the ranges must be equal, else one of CNF b, CNF c would
  :: have a coefficient 0, which is impossible by definition
  A2: rng E2 = rng E3
  proof
    assume rng E2 <> rng E3;
    then per cases by XBOOLE_0:def 10;
    suppose not rng E2 c= rng E3;
      then consider y being object such that
        A3: y in rng E2 & not y in rng E3 by TARSKI:def 3;
      y in rng E1 \/ rng E2 by A3, XBOOLE_0:def 3;
      then A4: y in rng(omega-exponent C1) by Th76;
      then consider x being object such that
        A5: x in dom(omega-exponent C1) & (omega-exponent C1).x = y
        by FUNCT_1:def 3;
      A6: x in dom C1 by A5, Def1;
      then A7: y = omega-exponent(C1.x) by A5, Def1;
      A8: omega-exponent(C1.x) in rng E1
      proof
        assume not omega-exponent(C1.x) in rng E1;
        then not y in rng E1 \/ rng E3 by A3, A7, XBOOLE_0:def 3;
        hence contradiction by A1, A4, Th76;
      end;
      then omega-exponent(C1.x) in rng E1 /\ rng E2 by A3, A7, XBOOLE_0:def 4;
      then A9: omega-leading_coeff(C1.x)
        = L1.(E1".(omega-exponent(C1.x))) + L2.(E2".(omega-exponent(C1.x)))
        by A6, Th80;
      omega-exponent(C1.x) in rng E1 \ rng E3 by A3, A7, A8, XBOOLE_0:def 5;
      then omega-leading_coeff(C1.x) = L1.(E1".(omega-exponent(C1.x))) + 0
        by A1, A6, Th78;
      then A10: 0 = L2.(E2".y) by A7, A9;
      y in dom(E2") by A3, FUNCT_1:33;
      then E2".y in rng(E2") by FUNCT_1:3;
      then E2".y in dom E2 by FUNCT_1:33;
      then E2".y in dom CantorNF b by Def1;
      then E2".y in dom L2 by Def3;
      hence contradiction by A10, FUNCT_1:def 9;
    end;
    suppose not rng E3 c= rng E2;
      then consider y being object such that
        A11: y in rng E3 & not y in rng E2 by TARSKI:def 3;
      y in rng E1 \/ rng E3 by A11, XBOOLE_0:def 3;
      then A12: y in rng(omega-exponent C2) by Th76;
      then consider x being object such that
        A13: x in dom(omega-exponent C2) & (omega-exponent C2).x = y
        by FUNCT_1:def 3;
      A14: x in dom C2 by A13, Def1;
      then A15: y = omega-exponent(C2.x) by A13, Def1;
      A16: omega-exponent(C2.x) in rng E1
      proof
        assume not omega-exponent(C2.x) in rng E1;
        then not y in rng E1 \/ rng E2 by A11, A15, XBOOLE_0:def 3;
        hence contradiction by A1, A12, Th76;
      end;
      then omega-exponent(C2.x) in rng E1 /\ rng E3
        by A11, A15, XBOOLE_0:def 4;
      then A17: omega-leading_coeff(C2.x)
        = L1.(E1".(omega-exponent(C2.x))) + L3.(E3".(omega-exponent(C2.x)))
        by A14, Th80;
      omega-exponent(C2.x) in rng E1 \ rng E2 by A11, A15, A16, XBOOLE_0:def 5;
      then omega-leading_coeff(C2.x) = L1.(E1".(omega-exponent(C2.x))) + 0
        by A1, A14, Th78;
      then A18: 0 = L3.(E3".y) by A15, A17;
      y in dom(E3") by A11, FUNCT_1:33;
      then E3".y in rng(E3") by FUNCT_1:3;
      then E3".y in dom E3 by FUNCT_1:33;
      then E3".y in dom CantorNF c by Def1;
      then E3".y in dom L3 by Def3;
      hence contradiction by A18, FUNCT_1:def 9;
    end;
  end;
  then A19: E2 = E3 by Th34;
  A20: dom L2 = dom CantorNF b by Def3
    .= card dom E2 by Def1
    .= card rng E2 by CARD_1:70
    .= card dom E3 by A2, CARD_1:70
    .= dom CantorNF c by Def1
    .= dom L3 by Def3;
  for x being object st x in dom L2 holds L2.x = L3.x
  proof
    let x be object;
    assume x in dom L2;
    then x in dom CantorNF b by Def3;
    then A21: x in dom E2 by Def1;
    then A22: E2.x in rng E2 by FUNCT_1:3;
    then E2.x in rng E1 \/ rng E2 by XBOOLE_0:def 3;
    then E2.x in rng(omega-exponent C1) by Th76;
    then consider y being object such that
      A23: y in dom(omega-exponent C1) & (omega-exponent C1).y = E2.x
      by FUNCT_1:def 3;
    A24: y in dom C1 by A23, Def1;
    then A25: omega-exponent(C1.y) = E2.x by A23, Def1;
    per cases;
    suppose omega-exponent(C1.y) in rng E1;
      then A26: omega-exponent(C1.y) in rng E1 /\ rng E2
        by A22, A25, XBOOLE_0:def 4;
      then A27: omega-exponent(C2.y) in rng E1 /\ rng E3 by A1, A2;
      L1.(E1".(E2.x)) + L2.(E2".(E2.x))
         = omega-leading_coeff(C1.y) by A24, A25, A26, Th80
        .= L1.(E1".(E2.x)) + L3.(E3".(E2.x)) by A1, A24, A25, A27, Th80;
      hence L2.x = L3.(E3".(E2.x)) by A21, FUNCT_1:34
        .= L3.x by A19, A21, FUNCT_1:34;
    end;
    suppose not omega-exponent(C1.y) in rng E1;
      then A29: omega-exponent(C1.y) in rng E2 \ rng E1
        by A22, A25, XBOOLE_0:def 5;
      then A30: omega-exponent(C2.y) in rng E3 \ rng E1 by A1, A2;
      thus L2.x = L2.(E2".(E2.x)) by A21, FUNCT_1:34
        .= omega-leading_coeff(C1.y) by A24, A25, A29, Th79
        .= L3.(E3".(E2.x)) by A1, A24, A25, A30, Th79
        .= L3.x by A19, A21, FUNCT_1:34;
    end;
  end;
  then L2 = L3 by A20, FUNCT_1:2;
  then Sum^ CantorNF b = Sum^ CantorNF c by A19, Th67;
  hence thesis;
end;
