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.

(* Specifications: *)
Lemma le_0__Z : forall (n : Z) (i : Z_ n), 0 <= i.
Lemma lt_z__Z : forall (n : Z) (i : Z_ n), i < n.
Lemma Zmod_le_0_z : forall x m : Z, 0 < m -> 0 <= x mod m.
Lemma Zmod_lt_z_m : forall x m : Z, 0 < m -> x mod m < m.
Lemma Zdiv_small_0 : forall x m : Z, 0 <= x -> x < m -> x / m = 0.
Lemma Zle_0_div : forall a m : Z, 0 <= a -> 0 < m -> 0 <= a / m.
Lemma Zdiv_le : forall a b m : Z, 0 < m -> a <= b -> a / m <= b / m.
Lemma Zmod_plus_m : forall x m : Z, 0 < m -> (x + m) mod m = x mod m.
Lemma Zmod_minus_m : forall x m : Z, 0 < m -> (x - m) mod m = x mod m.
Lemma Zmod_km_plus : forall x k m : Z, 0 < m -> (k * m + x) mod m = x mod m.
Lemma Zmod_minus_km : forall x k m : Z, 0 < m -> (x - k * m) mod m = x mod m.
Lemma Zdivmod_split : forall x m : Z, 0 < m -> x / m * m + x mod m = x.
Lemma Zmod_plus_distr_l : forall a b m : Z, 0 < m -> (a + b) mod m = (a mod m + b) mod m.
Lemma Zmod_mult_distr_l : forall a b m : Z, 0 < m -> (a * b) mod m = (a mod m * b) mod m.
Lemma Zmod_minus_distr_l : forall a b m : Z, 0 < m -> (a - b) mod m = (a mod m - b) mod m.
Lemma Zmod_minus_distr_r : forall a b m : Z, 0 < m -> (a - b) mod m = (a - b mod m) mod m.
Lemma modred : forall x m : Z, 0 <= x -> x < m -> x mod m = x.
Lemma Zdiv_a_b_b_Zmod : forall a b : Z, 0 < b -> a / b * b = a - a mod b.
Lemma Zminus_Zdiv_Zmult : forall a b : Z, 0 < b -> a - a / b * b = a mod b.
Lemma Zmod_prod_Zmod : forall x y z : Z, 0 < y -> 0 < z -> x mod (y * z) mod z = x mod z.
Lemma Zdiv_mult_plus : forall a b m : Z, 0 < m -> 0 <= b -> b < m -> (a * m + b) / m = a.
Lemma Zdiv_mult_minus : forall a b m : Z, 0 < m -> 0 < b -> b <= m -> (a * m - b) / m = a - 1.
Lemma Zdiv_times_plus : forall x y m : Z, 0 < m -> (x * m + y) / m = (x + y / m).
Lemma div_1_id : forall a : Z, a / 1 = a.
Lemma mod_1_0 : forall z : Z, z mod 1 = 0.