(************************************************************************)
(*         *      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)         *)
(************************************************************************)
(** The type [nat] of Peano natural numbers (built from [O] and [S]) is defined in [Datatypes.v] *)
(** This module defines the following operations on natural numbers : - predecessor [pred] - addition [plus] - multiplication [mult] - less or equal order [le] - less [lt] - greater or equal [ge] - greater [gt]  It states various lemmas and theorems about natural numbers, including Peano's axioms of arithmetic (in Coq, these are provable). Case analysis on [nat] and induction on [nat * nat] are provided too *)
Require Corelib.Init.Nat.
Open Scope nat_scope.
Local Notation "0" := O.
Definition eq_S := f_equal S.
Definition f_equal_nat := f_equal (A:=nat).
#[global]
Hint Resolve f_equal_nat: core.
(** The predecessor function *)
Notation pred := Nat.pred (only parsing).
Definition f_equal_pred := f_equal pred.

(* Specifications: *)
Theorem pred_Sn : forall n:nat, n = pred (S n).
Definition eq_add_S n m (H: S n = S m): n = m := f_equal pred H.