
theorem ND3:
  for n,k be non zero Nat holds
  n mod k > 0 implies (n - 1) mod k = (n mod k) - 1
  proof
    let n,k be non zero Nat;
    assume
    A1: n mod k > 0;
    reconsider p = k - 1 as non zero Nat by A1,RADIX_2:1;
    reconsider x = (n mod k) - 1 as Nat by A1;
    A2: x + 1 < (k - 1) + 1 by NAT_D:1; then
    k - (x + 1) > (x + 1) - (x + 1) by XREAL_1:9; then
    reconsider m = k - (x + 1) as Nat;
    x mod (x + (1 + m)) < k - 1 by A2,XREAL_1:6; then
    ((x + 1) mod k) - 1 = ((n mod k) - (1 mod (1+p))) mod k
    .= (n - 1) mod k by INT_6:7;
    hence thesis;
  end;
