Module Nat2Z.
(** [Z.of_nat], basic equations *)
Register inj_succ as num.Nat2Z.inj_succ.
(** [Z.of_N] produce non-negative integers *)
(** [Z.of_nat] is a bijection between [nat] and non-negative [Z], with [Z.to_nat] (or [Z.abs_nat]) as reciprocal. See [Z2Nat.id] below for the dual equation. *)
(** [Z.of_nat] is hence injective *)
(** [Z.of_nat] and usual operations *)
Register inj_add as num.Nat2Z.inj_add.
Register inj_mul as num.Nat2Z.inj_mul.
Register inj_sub as num.Nat2Z.inj_sub.

Lemma inj_pred_max n : Z.of_nat (Nat.pred n) = Z.max 0 (Z.pred (Z.of_nat n)).