reserve x,y,a,b,c,p,q for Real;
reserve m,n for Element of NAT;

theorem
  (x|^ n)+(y|^ n)=p & (x|^ n)*(y|^ n)=q & p^2-4*q>=0 & p>0 & q>0 &
  n is even & n >= 1
  implies x=n-root((p+sqrt(p^2-4*q))/2)&y=n-root((p-sqrt(p^2-4*q
  ))/2) or x=-n-root((p+sqrt(p^2-4*q))/2)&y=n-root((p-sqrt(p^2-4*q))/2) or x=n
-root((p+sqrt(p^2-4*q))/2)&y=-n-root((p-sqrt(p^2-4*q))/2) or x=-n-root((p+sqrt(
p^2-4*q))/2)&y=-n-root((p-sqrt(p^2-4*q))/2) or x=n-root((p-sqrt(p^2-4*q))/2)&y=
n-root((p+sqrt(p^2-4*q))/2) or x=-n-root((p-sqrt(p^2-4*q))/2)&y=n-root((p+sqrt(
p^2-4*q))/2) or x=n-root((p-sqrt(p^2-4*q))/2)&y=-n-root((p+sqrt(p^2-4*q))/2) or
  x=-n-root((p-sqrt(p^2-4*q))/2)&y=-n-root((p+sqrt(p^2-4*q))/2)
proof
  assume
A1: (x|^ n)+(y|^ n)=p & (x|^ n)*(y|^ n)=q;
  assume that
A2: p^2-4*q>=0 and
A3: p>0 and
A4: q>0 and
A5: n is even & n >= 1;
  --4*q>0 by A4,XREAL_1:129;
  then -4*q<0;
  then p^2+(-4*q)<p^2+0 by XREAL_1:8;
  then sqrt(p^2-4*q)<sqrt(p^2) by A2,SQUARE_1:27;
  then sqrt(p^2-4*q)<p by A3,SQUARE_1:22;
  then -sqrt(p^2-4*q)>-p by XREAL_1:24;
  then -sqrt(p^2-4*q)+p>-p+0+p by XREAL_1:8;
  then
A6: (0+p-sqrt(p^2-4*q))/2>0 by XREAL_1:139;
A7: delta(1,(-p),q)=(-p)^2-4*1*q by QUIN_1:def 1
    .=p^2-4*q;
  then 0 <= sqrt delta(1,(-p),q) by A2,SQUARE_1:17,26;
  then -(-p)+sqrt delta(1,-p,q)>0 +0 by A3;
  then
A8: (0+p+sqrt(p^2-4*q))/2>0 by A7,XREAL_1:139;
  now
    per cases by A1,A2,Th14;
    suppose
      x|^ n=(p+sqrt(p^2-4*q))/2 & y|^ n=(p-sqrt(p^2-4*q))/2;
      hence thesis by A5,A8,A6,Th4;
    end;
    suppose
      x|^ n=(p-sqrt(p^2-4*q))/2 & y|^ n=(p+sqrt(p^2-4*q))/2;
      hence thesis by A5,A8,A6,Th4;
    end;
  end;
  hence thesis;
end;
