(** Centered modulo *)

(* Specifications: *)
Lemma cmod_mod (x d : Z) :
cmod (x mod d) d = cmod x d.
Lemma cmod_small (x d : Z) :
- (d / 2) <= x < d / 2 -> cmod x d = x.
Lemma to_Z_cmodwB (x : int) :
to_Z x = cmod (φ x%uint63) wB.
Lemma of_Z_spec (z : Z) : to_Z (of_Z z) = cmod z wB.
Lemma of_pos_spec (p : positive) :
to_Z (of_pos p) = cmod (Zpos p) wB.
Lemma sub_spec (x y : int) :
to_Z (x - y)%sint63 = cmod (to_Z x - to_Z y) wB.
Lemma mul_spec (x y : int) :
to_Z (x * y)%sint63 = cmod (to_Z x * to_Z y) wB.
Lemma succ_spec (x : int) :
to_Z (succ x)%sint63 = cmod (to_Z x + 1) wB.