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

theorem
  a*x|^ n=p & x*y=q & n is even & n >= 1 & p/a>0 &a<>0 implies x=n
  -root(p/a) & y=q*n-root(a/p) or x=-n-root(p/a) & y=-q*n-root(a/p)
proof
  assume that
A1: a*x|^ n=p and
A2: x*y=q and
A3: n is even & n >= 1 and
A4: p/a>0 and
A5: a<>0;
A6: x|^ n=p/a by A1,A5,XCMPLX_1:89;
  (p/a)">0 by A4;
  then 1/(p/a)>0 by XCMPLX_1:215;
  then
A7: (1*a)/p>0 by XCMPLX_1:77;
A8: p<>0 by A4;
  per cases by A3,A4,A6,Th4;
  suppose
A9: x=n-root(p/a);
    then y*(n-root(p/a)*n-root(a/p))=q*n-root(a/p) by A2;
    then y*n-root((p/a)*(a/p))=q*n-root(a/p) by A4,A3,A7,POWER:11;
    then y*n-root((p/a)*(a*p"))=q*n-root(a/p) by XCMPLX_0:def 9;
    then y*n-root(p/a*a*p")=q*n-root(a/p);
    then y*n-root(p*p")=q*n-root(a/p) by A5,XCMPLX_1:87;
    then y*n-root(p/p)=q*n-root(a/p) by XCMPLX_0:def 9;
    then y*n-root(1)=q*n-root(a/p) by A8,XCMPLX_1:60;
    then y*1=q*n-root(a/p) by A3,POWER:6;
    hence thesis by A9;
  end;
  suppose
A10: x=-n-root(p/a);
    then y*(n-root(p/a)*n-root(a/p))=-q*n-root(a/p) by A2;
    then y*n-root((p/a)*(a/p))=-q*n-root(a/p) by A4,A3,A7,POWER:11;
    then y*n-root((p/a)*(a*p"))=-q*n-root(a/p) by XCMPLX_0:def 9;
    then y*n-root(p/a*a*p")=-q*n-root(a/p);
    then y*n-root(p*p")=-q*n-root(a/p) by A5,XCMPLX_1:87;
    then y*n-root(p/p)=-q*n-root(a/p) by XCMPLX_0:def 9;
    then y*n-root(1)=-q*n-root(a/p) by A8,XCMPLX_1:60;
    then y*1=-q*n-root(a/p) by A3,POWER:6;
    hence thesis by A10;
  end;
end;
