
theorem
  for a,b be odd Nat st a,b are_coprime holds
    ((a|^4 + b|^4)/2) mod 5 = 3 or ((a|^4 + b|^4)/2) mod 5 = 1
  proof
    let a,b be odd Nat such that
    A1: a,b are_coprime;
    reconsider n = (a|^4 + b|^4)/2 as Nat;
    A2: (a|^4 + b|^4) mod 5 = (2*n) mod (4+1)
    .= ((2 mod (2+3))*(n mod 5)) mod 5 by NAT_D:67
    .= (2*(n mod 5)) mod 5;
    n mod (4+1) = 0 or ... or n mod (4+1) = 4 by NUMBER03:11; then
    per cases;
    suppose
      n mod (4+1) = 0;
      hence thesis by A1,A2,MO5;
    end;
    suppose
      n mod (4+1) = 1;
      hence thesis;
    end;
    suppose
      n mod (4+1)= 2;
      hence thesis by A1,A2,MO5;
    end;
    suppose
      n mod (4+1) = 3;
      hence thesis;
    end;
    suppose
      n mod (4+1) = 4; then
      (a|^4 + b|^4) mod 5 = (1*5 + 3) mod 5 by A2
      .= 3 mod (3 + 2) by NAT_D:21
      .= 3;
      hence thesis by A1,MO5;
    end;
  end;
