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.

Lemma inj_sub_max n m : Z.of_nat (n-m) = Z.max 0 (Z.of_nat n - Z.of_nat m).