reserve A for non trivial Nat,
        B,C,n,m,k for Nat,
        e for Nat;
reserve a for non trivial Nat;

theorem
:: Theorem 4
:: Y. Matiyasevich, J Robinson:
:: Reduction of an Arbitrary Diophantine Equation to One in 13 Unknowns
:: Acta Arithmetica, 27, 1975.
  for A be non trivial Nat,C,B be Nat,e st 0 < B holds
    C = Py(A,B) iff
      ex i,j be Nat, D,E,F,G,H,I be Integer st
        D*F*I is square & F divides (H - C) & B <= C &
   D= (A^2-1)*C^2+1 & E= 2*(i+1)*D*(e+1)*C^2 & F= (A^2 -1) *E^2+1 &
   G = A+F*(F-A) & H = B+2*j*C & I = (G^2-1)*H^2+1
proof
  let A be non trivial Nat, C,B be Nat, e such that
A1:0 < B;
  thus C = Py(A,B) implies ex i,j be Nat, D,E,F,G,H,I be Integer st
    D*F*I is square & F divides (H - C) & B <= C & D= (A^2-1)*C^2+1 &
    E= 2*(i+1)*D*(e+1)*C^2 & F= (A^2 -1) *E^2+1 & G = A+F*(F-A) &
    H = B+2*j*C & I = (G^2-1)*H^2+1
  proof
    assume C = Py(A,B);
    then consider i,j be Nat, D,E,F,G,H,I be Nat such that
A2:D*F*I is square & F divides (H - C) & B <= C & D= (A^2-1)*C^2+1 &
    E= 2*(i+1)*D*(e+1)*C^2 & F= (A^2 -1) *E^2+1 & G = A+F*(F-A) &
    H = B+2*j*C & I = (G^2-1)*H^2+1 by A1,Th17;
    take i,j,D,E,F,G,H,I;
    thus thesis by A2;
  end;
  thus thesis by A1,Th18;
end;
