reserve i,s,t,m,n,k for Nat,
        c,d,e for Element of NAT,
        fn for FinSequence of NAT,
        x,y for Integer;
reserve p for Prime;

theorem
  for i,n st n>1 & i,n are_coprime holds
    i|^s,1 are_congruent_mod n iff order(i,n) divides s
proof let i,n;
  assume A1:n>1 & i,n are_coprime;
   thus i|^s,1 are_congruent_mod n implies order(i,n) divides s
    proof assume i|^s,1 are_congruent_mod n;
      then i|^s,i|^0 are_congruent_mod n by NEWTON:4;
      then s,0 are_congruent_mod order(i,n) by A1,Th10;
      then order(i,n) divides (s-0) by INT_2:15;
     hence thesis;
    end;
   assume order(i,n) divides s;
   then order(i,n) divides (s-0);
   then s,0 are_congruent_mod order(i,n) by INT_2:15;
   then i|^s,i|^0 are_congruent_mod n by A1,Th10;
  hence thesis by NEWTON:4;
end;
