reserve d,i,j,k,m,n,p,q,x,k1,k2 for Nat,
  a,c,i1,i2,i3,i5 for Integer;

theorem
  i*p <> 0 & k mod i*p < p implies k mod i*p = k mod p
proof
  assume that
A1: i*p <> 0 and
A2: k mod i*p < p;
  set T = k mod i*p;
  consider n being Nat such that
A3: k = (i*p)*n + T and
  T < i*p by A1,NAT_D:def 2;
  k = p*(i*n) + T by A3;
  then k mod p = T mod p by NAT_D:21
    .= T by A2,NAT_D:24;
  hence thesis;
end;
