reserve a,b,i,k,m,n for Nat;
reserve s,z for non zero Nat;
reserve c for Complex;

theorem Th49:
  a^2 mod 7 = 0 or a^2 mod 7 = 1 or a^2 mod 7 = 2 or a^2 mod 7 = 4
  proof
    per cases;
    suppose not 7 divides a;
      then ex k st a^2 = 7*k+1 or a^2 = 7*k+2 or a^2 = 7*k+4 by Th46;
      hence thesis by Th16;
    end;
    suppose 7 divides a;
      then 7 divides a^2 by INT_2:2;
      hence thesis by PEPIN:6;
    end;
  end;
