reserve a,b,c,d,m,x,n,j,k,l for Nat,
  t,u,v,z for Integer,
  f,F for FinSequence of NAT;
reserve p,q,r,s for real number;
reserve a,b,c,d,m,x,n,k,l for Nat,
  t,z for Integer,
  f,F,G for FinSequence of REAL;
reserve q,r,s for real number;
reserve D for set;

theorem
  5 divides a|^3 - 1 iff 5 divides a - 1
  proof
    L1: 5 divides a|^3 - 1 implies 5 divides a - 1
    proof
      A1: 5 divides (a|^5 - a) by PEPIN:59,Th58;
      assume
      A2: 5 divides a|^3 - 1; then
a2b:  a|^3 <> 0 by INT_2:13;
      A3: a divides a|^3 by NAT_3:3;
      5 divides (-a|^2)*(a|^3 - 1) by A2,INT_2:2; then
      5 divides -a|^2*a|^3 + a|^2; then
      5 divides -a|^(2+3) + a|^2 by NEWTON:8;then
      5 divides (-a|^5 + a|^2) + (a|^5 - a) by WSIERP_1:4,A1; then
      5 divides a|^2 - a; then
      5 divides a*a - a by NEWTON:81; then
      A4: 5 divides a*(a-1);
      not 5 divides (a|^3-1) + 1 by A2,a2b,NEWTON:39; then
      not 5 divides a by A3,INT_2:9;
      hence thesis by A4,PEPIN:59,INT_5:7;
    end;
    a - 1 divides a|^3 - 1|^3 by NEWTON01:33;
    hence thesis by L1,INT_2:9;
  end;
