reserve a,b,k,m,n,s for Nat;
reserve c,c1,c2,c3 for Complex;
reserve i,j,z for Integer;
reserve p for Prime;
reserve x for object;

theorem :: Problem 164
  for x,y,z,t being positive Integer holds
  1/(x^2) + 1/(y^2) + 1/(z^2) + 1/(t^2) = 1 iff x = 2 & y = 2 & z = 2 & t = 2
  proof
    let x,y,z,t be positive Integer;
    thus 1/(x^2) + 1/(y^2) + 1/(z^2) + 1/(t^2) = 1 implies
    x = 2 & y = 2 & z = 2 & t = 2
    proof
      assume
A1:   1/(x^2) + 1/(y^2) + 1/(z^2) + 1/(t^2) = 1;
      1/(x^2) + 1/(y^2) + 1/(z^2) + 1/(t^2) =
      1/(t^2) + 1/(x^2) + 1/(y^2) + 1/(z^2) =
      1/(z^2) + 1/(t^2) + 1/(x^2) + 1/(y^2) =
      1/(y^2) + 1/(z^2) + 1/(t^2) + 1/(x^2);
      then
A2:   x <> 1+0 & y <> 1+0 & z <> 1+0 & t <> 1+0 by A1,XREAL_1:6;
      then
A3:   x >= 2 & y >= 2 & z >= 2 & t >= 2 by NAT_1:23;
A4:   1/(x^2) <= 1/4 & 1/(y^2) <= 1/4 & 1/(z^2) <= 1/4 & 1/(t^2) <= 1/4
      by A2,Lm10,NAT_1:23;
A5:   now
        assume x > 2;
        then
A6:     1/(x^2) <= 1/9 by Lm11;
        1/(y^2)+1/(z^2) <= 1/4+1/4 by A4,XREAL_1:7;
        then 1/(y^2)+1/(z^2)+1/(t^2) <= 1/4+1/4+1/4 by A4,XREAL_1:7;
        then 1/(x^2)+(1/(y^2)+1/(z^2)+1/(t^2)) <= 1/9+(1/4+1/4+1/4)
        by A6,XREAL_1:7;
        hence contradiction by A1;
      end;
A7:   now
        assume y > 2;
        then
A8:     1/(y^2) <= 1/9 by Lm11;
        1/(z^2)+1/(t^2) <= 1/4+1/4 by A4,XREAL_1:7;
        then 1/(z^2)+1/(t^2)+1/(x^2) <= 1/4+1/4+1/4 by A4,XREAL_1:7;
        then 1/(y^2)+(1/(z^2)+1/(t^2)+1/(x^2)) <= 1/9+(1/4+1/4+1/4)
        by A8,XREAL_1:7;
        hence contradiction by A1;
      end;
A9:   now
        assume z > 2;
        then
A10:    1/(z^2) <= 1/9 by Lm11;
        1/(t^2)+1/(x^2) <= 1/4+1/4 by A4,XREAL_1:7;
        then 1/(t^2)+1/(x^2)+1/(y^2) <= 1/4+1/4+1/4 by A4,XREAL_1:7;
        then 1/(z^2)+(1/(t^2)+1/(x^2)+1/(y^2)) <= 1/9+(1/4+1/4+1/4)
        by A10,XREAL_1:7;
        hence contradiction by A1;
      end;
      now
        assume t > 2;
        then
A11:    1/(t^2) <= 1/9 by Lm11;
        1/(x^2)+1/(y^2) <= 1/4+1/4 by A4,XREAL_1:7;
        then 1/(x^2)+1/(y^2)+1/(z^2) <= 1/4+1/4+1/4 by A4,XREAL_1:7;
        then 1/(t^2)+(1/(x^2)+1/(y^2)+1/(z^2)) <= 1/9+(1/4+1/4+1/4)
        by A11,XREAL_1:7;
        hence contradiction by A1;
      end;
      hence thesis by A3,A5,A7,A9,XXREAL_0:1;
    end;
    thus thesis;
  end;
