Definition in_Z_ (m x : Z) := 0 <= x < m.Definition Z_ (m : Z) := sig (in_Z_ m).Coercion Z_from_Z_ (m : Z) (x : Z_ m) := proj1_sig (P := in_Z_ m) x.Notation _Z := (Z_from_Z_ _).Definition in_Zpls (x : Z) := 0 < x.Definition Zpls := sig in_Zpls.Coercion Zpls_ (x : Zpls) := proj1_sig (P := in_Zpls) x.

Lemma Zmod_km_plus : forall x k m : Z, 0 < m -> (k * m + x) mod m = x mod m.