 reserve i,j, k,v, w for Nat;
 reserve j1,j2, m, n, s, t, x, y for Integer;
 reserve p for odd Prime;
 reserve a for Real;
 reserve b for Integer;

theorem Prime4Sq:
  for p1, p2 be Prime holds
    ex x1,x2,x3,x4 be Nat st p1*p2 = x1^2 + x2^2 + x3^2 + x4^2
  proof
    let p1, p2 be Prime;
    consider x1,x2,x3,x4 be Nat such that
A3: p1 = x1^2 + x2^2 + x3^2 + x4^2 by Them5;
    consider y1,y2,y3,y4 be Nat such that
A4: p2 = y1^2 + y2^2 + y3^2 + y4^2 by Them5;
    set z1 = x1*y1 + x2*y2 +x3*y3 + x4*y4,
        z2 = -x1*y2 + x2*y1 - x3*y4 + x4*y3,
        z3 = x1*y3 - x2*y4 - x3*y1 + x4*y2,
        z4 = x1*y4 + x2*y3 - x3*y2 - x4*y1;
    reconsider n1 = |. z1 .|, n2 = |. z2 .|, n3 = |. z3 .|,n4 = |. z4 .|
      as natural Number;
    reconsider n1,n2,n3,n4 as Nat by TARSKI:1;
A7: n1^2 = z1^2 & n2^2 = z2^2 & n3^2 = z3^2 & n4^2 = z4^2 by COMPLEX1:75;
    p1*p2 = z1^2 + z2^2 + z3^2 + z4^2 by A3,A4
       .= n1^2 + n2^2 + n3^2 + n4^2 by A7;
    hence thesis;
  end;
