reserve a,b for Complex;
reserve z for Complex;
reserve n0 for non zero Nat;
reserve a0,a1,a2,s1,s2 for Complex;
reserve a3,x,q,r,s,s3 for Complex;

theorem Th19:
  1_root_of_cubic(a0,a1,a2) * 2_root_of_cubic(a0,a1,a2) *
  3_root_of_cubic(a0,a1,a2) = -a0
proof
  per cases;
  suppose
A1: 3*a1 - a2|^2 = 0;
    set r = (9*a2*a1 - 2*a2|^3 - 27*a0)/54, s1 = 3-root(2*r);
    ( ex r,s1 st r = (9*a2*a1 - 2*a2|^3 - 27*a0)/54 & s1 = 3-root(2*r) &
2_root_of_cubic(a0,a1,a2) = -s1/2-a2/3+s1*(2-root 3)*<i>/2)& ex r,s1 st r = (9
*a2*a1 - 2*a2|^3 - 27*a0)/54 & s1 = 3-root(2*r) & 3_root_of_cubic(a0,a1,a2) = -
    s1/2-a2/3-s1*(2-root 3)*<i>/2 by A1,Def3,Def4;
    hence 1_root_of_cubic(a0,a1,a2) * 2_root_of_cubic(a0,a1,a2) *
3_root_of_cubic(a0,a1,a2) = (s1-a2/3)*(-s1/2-a2/3+s1*(2-root 3)*<i>/2)* (-s1/2-
    a2/3-s1*(2-root 3)*<i>/2) by A1,Def2
      .= (s1-a2/3)*((s1/2+a2/3)*(s1/2+a2/3)+(2-root 3)*(2-root 3)*s1*s1/2/2)
      .= (s1-a2/3)*((s1/2+a2/3)*(s1/2+a2/3)+(2-root 3)|^2*s1*s1/2/2) by Th1
      .= (s1-a2/3)*((s1/2+a2/3)*(s1/2+a2/3)+3*s1*s1/2/2) by Th7
      .= s1*s1*s1-a2*a2*a2/3/3/3
      .= s1|^3-a2*a2*a2/27 by Th2
      .= 2*r-a2*a2*a2/27 by Th7
      .= (9*a2*a1 - 2*a2|^3 - 27*a0)/27-a2|^3/27 by Th2
      .= (3*a2*a1 - a2|^(2+1))/9 -a0
      .= (3*a2*a1 - a2|^2*a2)/9 -a0 by NEWTON:6
      .= -a0 by A1;
  end;
  suppose
A2: 3*a1 - a2|^2 <> 0;
    set q = (3*a1 - a2|^2)/9, r = (9*a2*a1 - 2*a2|^3 - 27*a0)/54, s = 2-root(q
    |^3+r|^2), s1 = 3-root(r+s), s2 = -q/s1;
A3: s1 <> 0
    proof
      assume s1 = 0;
      then
A4:   0 = s1|^3 by NEWTON:11
        .= r+s by Th7;
      q|^3+r|^2 = s|^2 by Th7
        .= s*s by Th1
        .= (-s)*(-s)
        .= r|^2 by A4,Th1;
      then q*q*q = 0 by Th2;
      hence contradiction by A2;
    end;
A5: s1*s1*s1 = s1|^3 by Th2
      .= r+s by Th7;
    then
A6: (r+s)-(q*q*q)/(r+s) = (r+s)*(r+s)/(r+s)-(q*q*q)/(r+s) by A3,XCMPLX_1:89
      .= ((r+s)*(r+s)-(q*q*q))/(r+s) by XCMPLX_1:120
      .= (r*r+2*r*s+s*s-q|^3)/(r+s) by Th2
      .= (r*r+2*r*s+s|^2-q|^3)/(r+s) by Th1
      .= (r*r+2*r*s+(q|^3+r|^2)-q|^3)/(r+s) by Th7
      .= ((r*r+2*r*s)+r|^2)/(r+s)
      .= ((r*r+2*r*s)+r*r)/(r+s) by Th1
      .= 2*r*(r+s)/(r+s)
      .= 2*r by A5,A3,XCMPLX_1:89;
    set t = s1+s2, d = s1-s2;
A7: s1*s2 = -(q/s1*s1) .= -q by A3,XCMPLX_1:87;
    ( ex q,r,s,s1,s2 st q = (3*a1 - a2|^2)/9 & r = (9*a2*a1 - 2*a2|^3 - 27
    *a0)/54 & s = 2-root(q|^3+r|^2) & s1 = 3-root(r+s) & s2 = -q/s1 &
2_root_of_cubic(a0,a1, a2) = -(s1+s2)/2-a2/3+(s1-s2)*(2-root 3)*<i>/2)& ex q,r,
s,s1,s2 st q = (3*a1 - a2|^2)/9 & r = (9*a2*a1 - 2*a2|^3 - 27*a0)/54 & s = 2
-root(q|^3+r|^2) & s1 = 3 -root(r+s) & s2 = -q/s1 & 3_root_of_cubic(a0,a1,a2) =
    -(s1+s2)/2-a2/3-(s1-s2)*( 2-root 3)*<i>/2 by A2,Def3,Def4;
    hence 1_root_of_cubic(a0,a1,a2) * 2_root_of_cubic(a0,a1,a2) *
3_root_of_cubic(a0,a1,a2) = (t-a2/3)*(-t/2-a2/3+d*(2-root 3)*<i>/2)* (-t/2-a2/3
    -d*(2-root 3)*<i>/2) by A2,Def2
      .= (t-a2/3)*((t/2+a2/3)*(t/2+a2/3)+(2-root 3)*(2-root 3)*d*d/2/2)
      .= (t-a2/3)*((t/2+a2/3)*(t/2+a2/3)+(2-root 3)|^2*d*d/2/2) by Th1
      .= (t-a2/3)*((t/2+a2/3)*(t/2+a2/3)+3*d*d/2/2) by Th7
      .= (s1*s1*s1+s2*s2*s2)+a2*(4*s1*s2)/4-a2*a2*a2/27
      .= (s1|^3+s2*s2*s2)+a2*(s1*s2)-a2*a2*a2/27 by Th2
      .= (s1|^3+(-q/s1)*(-q/s1)*(-q/s1))+a2*(-q)-a2*a2*a2/27 by A7
      .= (s1|^3-(q/s1)*(q/s1)*(q/s1))-a2*q-a2*a2*a2/27
      .= (s1|^3-(q*q)/(s1*s1)*(q/s1))-a2*q-a2*a2*a2/27 by XCMPLX_1:76
      .= (s1|^3-(q*q*q)/(s1*s1*s1))-a2*q-a2*a2*a2/27 by XCMPLX_1:76
      .= (s1|^3-(q*q*q)/(s1|^3))-a2*q-a2*a2*a2/27 by Th2
      .= (s1|^3-(q*q*q)/(r+s))-a2*q-a2*a2*a2/27 by Th7
      .= ((r+s)-(q*q*q)/(r+s))-a2*q-a2*a2*a2/27 by Th7
      .= 2*(9*a2*a1 - 2*a2|^3 - 27*a0)/54-a2*q-a2|^3/27 by A6,Th2
      .= (9*a2*a1 - 3*a2|^3)/27 -a2*q -a0
      .= (9*a2*a1 - 3*(a2*a2*a2))/27 -a2*q -a0 by Th2
      .= a2*(3*a1 - (a2*a2))/9 -a2*q -a0
      .= a2*(3*a1 - a2|^2)/9 -a2*q -a0 by Th1
      .= -a0;
  end;
end;
