
theorem
  for a,b be odd Nat st a,b are_coprime holds
    (a|^2 + b|^2)/2 is square implies not 3 divides a*b
  proof
    let a,b be odd Nat such that
    A1: a,b are_coprime;
    assume
    A2: (a|^2 + b|^2)/2 is square; then
    A3: a|^2 mod 3 = b|^2 mod 3 by ESS;
    a|^2,b|^2 are_coprime & 3 is non trivial by A1,WSIERP_1:11; then
    A4: max (a|^2 mod 3, b|^2 mod 3) > 0 by COM;
    a|^2 mod 3 is trivial by SM3; then
    per cases by NAT_2:def 1;
    suppose
      a|^2 mod 3 = 0;
      hence thesis by A3,A4;
    end;
    suppose
      B1: a|^2 mod 3 = 1; then
      b|^2 mod 3 = 1 by A2,ESS; then
      B2: not 3 divides a|^2 & not 3 divides b|^2 by B1,INT_1:62;
      a divides a|^2 & b divides b|^2 by NAT_3:3; then
      B3: not 3 divides a & not 3 divides b by B2,INT_2:9; then
      a,3 are_coprime & b,3 are_coprime by PEPIN:41,GROUP_17:5;
      hence thesis by B3,EULER_1:13;
    end;
  end;
