Section EqualityModulo.
Variable N:Z.
Definition eqm a b := (a mod N = b mod N).
Infix "==" := eqm (at level 70).
Instance Zplus_eqm : Proper (eqm ==> eqm ==> eqm) Z.add.
Instance Zminus_eqm : Proper (eqm ==> eqm ==> eqm) Z.sub.
Instance Zmult_eqm : Proper (eqm ==> eqm ==> eqm) Z.mul.
Instance Zopp_eqm : Proper (eqm ==> eqm) Z.opp.

Lemma Zmod_eqm : forall a, (a mod N) == a.