
theorem Th36:
  for u,v being Integer, m being CR_Sequence, i being Nat
  st i in dom m holds to_int(mod(u,m) - mod(v,m),m), u - v
  are_congruent_mod m.i
proof
  let u,v be Integer, m be CR_Sequence, i be Nat;
  set z = to_int((mod(u,m) - mod(v,m)),m);
  set c = the CR_coefficients of m;
A1: len mod(u,m) = len m by Def3;
  len mod(v,m) = len m by Def3;
  then
A2: len(mod(u,m) - mod(v,m)) = len m by A1,Lm3;
  then z = Sum((mod(u,m) - mod(v,m)) (#) c) mod Product(m) by Def5;
  then z mod Product(m) = Sum((mod(u,m)-mod(v,m)) (#) c) mod Product(m) by
NAT_D:65;
  then
A3: z, Sum((mod(u,m)-mod(v,m)) (#) c) are_congruent_mod Product(m) by NAT_D:64;
  assume
A4: i in dom m;
  then ex y being Integer st y * m.i = Product(m) by Th10;
  then
A5: z, Sum((mod(u,m)-mod(v,m)) (#) c) are_congruent_mod m.i by A3,INT_1:20;
  Sum((mod(u,m)-mod(v,m)) (#) c), (mod(u,m)-mod(v,m)).i are_congruent_mod
  m.i by A4,A2,Th29;
  then
A6: z,(mod(u,m)-mod(v,m)).i are_congruent_mod m.i by A5,INT_1:15;
  (mod(u,m)-mod(v,m)).i, u - v are_congruent_mod m.i by A4,Lm10;
  hence thesis by A6,INT_1:15;
end;
