(************************************************************************) (* * The Coq Proof Assistant / The Coq Development Team *) (* v * INRIA, CNRS and contributors - Copyright 1999-2018 *) (* Some p | _ => None end. Definition pos_to_z p := Zpos p. Numeral Notation positive pos_of_z pos_to_z : positive_scope. (** [N] *) Definition n_of_z z := match z with | Z0 => Some N0 | Zpos p => Some (Npos p) | Zneg _ => None end. Definition n_to_z n := match n with | N0 => Z0 | Npos p => Zpos p end. Numeral Notation N n_of_z n_to_z : N_scope. (** [Z] *) Definition z_of_z (z:Z) := z. Numeral Notation Z z_of_z z_of_z : Z_scope.