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;
reserve f,g for complex-valued FinSequence;

theorem :: Problem 188
  not ex x,y,z,t being positive Nat st x^2 + 2*y^2 = z^2 & 2*x^2 + y^2 = t^2
  proof
    given x,y,z,t being positive Nat such that
A1: x^2 + 2*y^2 = z^2 and
A2: 2*x^2 + y^2 = t^2;
    set d = x gcd y;
    set x1 = x div d;
    set y1 = y div d;
    set z1 = z div d;
    set t1 = t div d;
A3: d divides x by INT_2:def 2;
A4: d divides y by INT_2:def 2;
    then
A5: y1 = y / d by RING_3:6;
A6: d^2 divides x^2 by A3,PYTHTRIP:6;
A7: d^2 divides y^2 by A4,PYTHTRIP:6;
    then d^2 divides 2*y^2 by INT_2:2;
    then d^2 divides z^2 by A1,A6,NAT_D:8;
    then
A8: z1 = z / d by RING_3:6,PYTHTRIP:6;
    d^2 divides 2*x^2 by A6,INT_2:2;
    then d^2 divides t^2 by A2,A7,NAT_D:8;
    then
A9: t1 = t / d by RING_3:6,PYTHTRIP:6;
A10: x1^2 + 2*y1^2 = x^2/d^2 + 2*(y/d)^2 by A5,XCMPLX_1:76
     .= x^2/d^2 + 2*(y^2/d^2) by XCMPLX_1:76
     .= z^2/d^2 by A1
     .= z1^2 by A8,XCMPLX_1:76;
    2*x1^2 + y1^2 = 2*(x^2/d^2) + (y/d)^2 by A5,XCMPLX_1:76
    .= 2*(x^2/d^2) + y^2/d^2 by XCMPLX_1:76
    .= t^2/d^2 by A2
    .= t1^2 by A9,XCMPLX_1:76;
    hence contradiction by A10,Th76,Lm12;
  end;
