
theorem MO5:
  for a,b be Nat st a,b are_coprime holds
    (a|^4 + b|^4) mod 5 = 1 or (a|^4 + b|^4) mod 5 = 2
  proof
    let a,b be Nat such that
    A1: a,b are_coprime;
    A3: not 5 divides a or not 5 divides b by A1,PEPIN:59,PYTHTRIP:def 2;
    (a|^(5 -1) mod 5 = 0 or a|^(5-1) mod 5 = 1) &
      (b|^(5-1) mod 5 = 0 or b|^(5-1) mod 5 = 1) by PEPIN:59,MOP; then
    per cases;
    suppose
      a|^4 mod 5 = 0 & b|^4 mod 5 = 0; then
      B1: 5 divides a|^4 & 5 divides b|^4 by INT_1:62;
      a|^4 divides a|^(4 + 1) & b|^4 divides b|^(4 + 1) by NEWTON:89; then
      5 divides a|^5 & 5 divides b|^5 by B1,INT_2:9;
      hence thesis by A3,PEPIN:59,NEWTON02:160;
    end;
    suppose
      a|^4 mod 5 = 0 & b|^4 mod 5 = 1; then
      (a|^4 + b|^4) mod 5 = (0 + 1) mod (1 + 4) by NAT_D:66;
      hence thesis;
    end;
    suppose
      a|^4 mod 5 = 1 & b|^4 mod 5 = 0; then
      (a|^4 + b|^4) mod 5 = (1 + 0) mod (1 + 4) by NAT_D:66;
      hence thesis;
    end;
    suppose
      a|^4 mod 5 = 1 & b|^4 mod 5 = 1; then
      (a|^4 + b|^4) mod 5 = (1 + 1) mod (2 + 3) by NAT_D:66;
      hence thesis;
    end;
  end;
