reserve k for Nat;

theorem Th2:
  for a,b be Integer, n be Nat holds
  ((a mod n)+(b mod n)) mod n = (a + (b mod n)) mod n
proof
  let a,b be Integer;
  let n be Nat;
  per cases;
  suppose
    0 < n;
  then a mod n + (a div n)*n = (a-(a div n)*n) + (a div n)*n by INT_1:def 10
    .= a+0;
  then n divides (a + (b mod n))-((a mod n)+(b mod n)) by INT_1:def 3;
  then (a + (b mod n)),((a mod n)+(b mod n)) are_congruent_mod n by INT_2:15;
  hence thesis by NAT_D:64;
  end;
  suppose
A1: n = 0;
  hence ((a mod n)+(b mod n)) mod n = 0 by INT_1:def 10
  .= (a + (b mod n)) mod n by A1,INT_1:def 10;
  end;
end;
