Module SuccNat2Pos.
(** Composition of [Pos.of_succ_nat] and [Pos.to_nat] is successor on [nat] *)

(* Specifications: *)
Theorem id_succ (n:nat) : Pos.to_nat (Pos.of_succ_nat n) = S n.
Theorem pred_id (n:nat) : pred (Pos.to_nat (Pos.of_succ_nat n)) = n.
(** [Pos.of_succ_nat] is hence injective *)
Lemma inj (n m : nat) : Pos.of_succ_nat n = Pos.of_succ_nat m -> n = m.
Lemma inj_iff (n m : nat) : Pos.of_succ_nat n = Pos.of_succ_nat m <-> n = m.
(** Another formulation *)
Theorem inv n p : Pos.to_nat p = S n -> Pos.of_succ_nat n = p.
(** Successor and comparison are morphisms with respect to [Pos.of_succ_nat] *)
Lemma inj_succ n : Pos.of_succ_nat (S n) = Pos.succ (Pos.of_succ_nat n).
Lemma inj_compare n m :
(n ?= m) = (Pos.of_succ_nat n ?= Pos.of_succ_nat m)%positive.