
theorem for a,b be Integer holds parity (a gcd b) = max (parity a, parity b)
  proof
    let a,b be Integer;
    per cases;
    suppose
      A1: a is odd; then
      a gcd b is odd;
      hence thesis by A1,XXREAL_0:def 10,NEWTON03:def 1;
    end;
    suppose
      A1: a is even;
      per cases;
      suppose
        B1: b is odd; then
        (a gcd b) is odd;
        hence thesis by B1,A1,XXREAL_0:def 10;
      end;
      suppose
        B1: b is even; then
        (a gcd b) is even by A1;
        hence thesis by B1,A1;
      end;
    end;
  end;
