(** (Mod a b n) means (a = b (mod n)) *)

Definition Mod (a b : Z) (n : nat) :=
  exists q : Z, a = (b + Z_of_nat n * q)%Z.

Lemma mod_repr_eq : forall (p : nat) (x y : Z), 0 < p -> (0 < x < Z_of_nat p)%Z -> (0 < y < Z_of_nat p)%Z -> Mod x y p -> x = y.