Module Nat2N.
(** [N.of_nat] is an bijection between [nat] and [N], with [Pos.to_nat] as reciprocal. See [N2Nat.id] above for the dual equation. *)
Hint Rewrite id : Nnat.
Ltac nat2N := apply N2Nat.inj; now autorewrite with Nnat.
(** [N.of_nat] is hence injective *)

Lemma inj_iff n n' : N.of_nat n = N.of_nat n' <-> n = n'.