reserve a,b,c,h for Integer;
reserve k,m,n for Nat;
reserve i,j,z for Integer;
reserve p for Prime;

theorem Th91:
  for a,b,c being Integer st (a^2+b^2+c^2) mod 4 = 0 holds
  a is even & b is even & c is even
  proof
    let a,b,c be Integer such that
A1: (a^2+b^2+c^2) mod 4 = 0;
A2: (a^2+b^2+c^2) mod 4 = ((a^2 mod 4)+(b^2 mod 4)+(c^2 mod 4)) mod 4
    by NUMBER05:8;
    assume not a is even or not b is even or not c is even;
    then per cases;
    suppose a is odd;
      then
A3:   a^2 mod 4 = 1 by PYTHTRIP:4;
      per cases;
      suppose b is even;
        then
A4:     b^2 mod 4 = 0 by PYTHTRIP:3;
        per cases;
        suppose c is odd;
          then c^2 mod 4 = 1 by PYTHTRIP:4;
          hence contradiction by A1,A2,A3,A4,NAT_D:24;
        end;
        suppose c is even;
          then c^2 mod 4 = 0 by PYTHTRIP:3;
          hence contradiction by A1,A2,A3,A4;
        end;
      end;
      suppose b is odd;
        then
A5:     b^2 mod 4 = 1 by PYTHTRIP:4;
        per cases;
        suppose c is odd;
          then c^2 mod 4 = 1 by PYTHTRIP:4;
          hence contradiction by A1,A2,A3,A5,NAT_D:24;
        end;
        suppose c is even;
          then c^2 mod 4 = 0 by PYTHTRIP:3;
          hence contradiction by A1,A2,A3,A5,NAT_D:24;
        end;
      end;
    end;
    suppose b is odd;
      then
A6:   b^2 mod 4 = 1 by PYTHTRIP:4;
      per cases;
      suppose a is even;
        then
A7:     a^2 mod 4 = 0 by PYTHTRIP:3;
        per cases;
        suppose c is odd;
          then c^2 mod 4 = 1 by PYTHTRIP:4;
          hence contradiction by A1,A2,A6,A7,NAT_D:24;
        end;
        suppose c is even;
          then c^2 mod 4 = 0 by PYTHTRIP:3;
          hence contradiction by A1,A2,A6,A7;
        end;
      end;
      suppose a is odd;
        then
A8:     a^2 mod 4 = 1 by PYTHTRIP:4;
        per cases;
        suppose c is odd;
          then c^2 mod 4 = 1 by PYTHTRIP:4;
          hence contradiction by A1,A2,A6,A8,NAT_D:24;
        end;
        suppose c is even;
          then c^2 mod 4 = 0 by PYTHTRIP:3;
          hence contradiction by A1,A2,A6,A8,NAT_D:24;
        end;
      end;
    end;
    suppose c is odd;
      then
A9:   c^2 mod 4 = 1 by PYTHTRIP:4;
      per cases;
      suppose a is even;
        then
A10:    a^2 mod 4 = 0 by PYTHTRIP:3;
        per cases;
        suppose b is odd;
          then b^2 mod 4 = 1 by PYTHTRIP:4;
          hence contradiction by A1,A2,A9,A10,NAT_D:24;
        end;
        suppose b is even;
          then b^2 mod 4 = 0 by PYTHTRIP:3;
          hence contradiction by A1,A2,A9,A10;
        end;
      end;
      suppose a is odd;
        then
A11:    a^2 mod 4 = 1 by PYTHTRIP:4;
        per cases;
        suppose b is odd;
          then b^2 mod 4 = 1 by PYTHTRIP:4;
          hence contradiction by A1,A2,A9,A11,NAT_D:24;
        end;
        suppose b is even;
          then b^2 mod 4 = 0 by PYTHTRIP:3;
          hence contradiction by A1,A2,A9,A11,NAT_D:24;
        end;
      end;
    end;
  end;
