(* -*- coding: utf-8 -*- *)
(************************************************************************)
(*         *      The Rocq Prover / The Rocq Development Team           *)
(*  v      *         Copyright INRIA, CNRS and contributors             *)
(* <O___,, * (see version control and CREDITS file for authors & dates) *)
(*   \VV/  **************************************************************)
(*    //   *    This file is distributed under the terms of the         *)
(*         *     GNU Lesser General Public License Version 2.1          *)
(*         *     (see LICENSE file for the text of the license)         *)
(************************************************************************)
(** Properties of the injection from binary positive numbers to Peano natural numbers *)
(** Original development by Pierre Crégut, CNET, Lannion, France *)
Local Open Scope positive_scope.
Local Open Scope nat_scope.
Module Pos2Nat.
(** [Pos.to_nat] is a morphism for successor, addition, multiplication *)

(** [Pos.to_nat] is a bijection between [positive] and non-zero [nat], with [Pos.of_nat] as reciprocal. See [Nat2Pos.id] below for the dual equation. *)
Theorem id p : of_nat (to_nat p) = p.