1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* This file was automatically generated: do not edit *********************)
19 (*#***********************************************************************)
21 (* v * The Coq Proof Assistant / The Coq Development Team *)
23 (* <O___,, * CNRS-Ecole Polytechnique-INRIA Futurs-Universite Paris Sud *)
25 (* \VV/ **************************************************************)
27 (* // * This file is distributed under the terms of the *)
29 (* * GNU Lesser General Public License Version 2.1 *)
31 (*#***********************************************************************)
33 (*i $Id: Peano.v,v 1.23.2.1 2004/07/16 19:31:03 herbelin Exp $ i*)
35 (*#* Natural numbers [nat] built from [O] and [S] are defined in Datatypes.v *)
37 (*#* This module defines the following operations on natural numbers :
40 - multiplication [mult]
41 - less or equal order [le]
43 - greater or equal [ge]
46 This module states various lemmas and theorems about natural numbers,
47 including Peano's axioms of arithmetic (in Coq, these are in fact provable)
48 Case analysis on [nat] and induction on [nat * nat] are provided too *)
50 include "Init/Notations.ma".
52 include "Init/Datatypes.ma".
54 include "Init/Logic.ma".
60 inline procedural "cic:/Coq/Init/Peano/eq_S.con" as definition.
63 Hint Resolve (f_equal S): v62.
67 Hint Resolve (f_equal (A:=nat)): core.
70 (*#* The predecessor function *)
72 inline procedural "cic:/Coq/Init/Peano/pred.con" as definition.
75 Hint Resolve (f_equal pred): v62.
78 inline procedural "cic:/Coq/Init/Peano/pred_Sn.con" as theorem.
80 inline procedural "cic:/Coq/Init/Peano/eq_add_S.con" as theorem.
83 Hint Immediate eq_add_S: core v62.
86 (*#* A consequence of the previous axioms *)
88 inline procedural "cic:/Coq/Init/Peano/not_eq_S.con" as theorem.
91 Hint Resolve not_eq_S: core v62.
94 inline procedural "cic:/Coq/Init/Peano/IsSucc.con" as definition.
96 inline procedural "cic:/Coq/Init/Peano/O_S.con" as theorem.
99 Hint Resolve O_S: core v62.
102 inline procedural "cic:/Coq/Init/Peano/n_Sn.con" as theorem.
105 Hint Resolve n_Sn: core v62.
110 inline procedural "cic:/Coq/Init/Peano/plus.con" as definition.
113 Hint Resolve (f_equal2 plus): v62.
117 Hint Resolve (f_equal2 (A1:=nat) (A2:=nat)): core.
121 Infix "+" := plus : nat_scope.
124 inline procedural "cic:/Coq/Init/Peano/plus_n_O.con" as lemma.
127 Hint Resolve plus_n_O: core v62.
130 inline procedural "cic:/Coq/Init/Peano/plus_O_n.con" as lemma.
132 inline procedural "cic:/Coq/Init/Peano/plus_n_Sm.con" as lemma.
135 Hint Resolve plus_n_Sm: core v62.
138 inline procedural "cic:/Coq/Init/Peano/plus_Sn_m.con" as lemma.
140 (*#* Multiplication *)
142 inline procedural "cic:/Coq/Init/Peano/mult.con" as definition.
145 Hint Resolve (f_equal2 mult): core v62.
149 Infix "*" := mult : nat_scope.
152 inline procedural "cic:/Coq/Init/Peano/mult_n_O.con" as lemma.
155 Hint Resolve mult_n_O: core v62.
158 inline procedural "cic:/Coq/Init/Peano/mult_n_Sm.con" as lemma.
161 Hint Resolve mult_n_Sm: core v62.
164 (*#* Definition of subtraction on [nat] : [m-n] is [0] if [n>=m] *)
166 inline procedural "cic:/Coq/Init/Peano/minus.con" as definition.
169 Infix "-" := minus : nat_scope.
172 (*#* Definition of the usual orders, the basic properties of [le] and [lt]
173 can be found in files Le and Lt *)
175 (*#* An inductive definition to define the order *)
177 inline procedural "cic:/Coq/Init/Peano/le.ind".
180 Infix "<=" := le : nat_scope.
184 Hint Constructors le: core v62.
187 (*i equivalent to : "Hints Resolve le_n le_S : core v62." i*)
189 inline procedural "cic:/Coq/Init/Peano/lt.con" as definition.
192 Hint Unfold lt: core v62.
196 Infix "<" := lt : nat_scope.
199 inline procedural "cic:/Coq/Init/Peano/ge.con" as definition.
202 Hint Unfold ge: core v62.
206 Infix ">=" := ge : nat_scope.
209 inline procedural "cic:/Coq/Init/Peano/gt.con" as definition.
212 Hint Unfold gt: core v62.
216 Infix ">" := gt : nat_scope.
220 Notation "x <= y <= z" := (x <= y /\ y <= z) : nat_scope.
224 Notation "x <= y < z" := (x <= y /\ y < z) : nat_scope.
228 Notation "x < y < z" := (x < y /\ y < z) : nat_scope.
232 Notation "x < y <= z" := (x < y /\ y <= z) : nat_scope.
235 (*#* Pattern-Matching on natural numbers *)
237 inline procedural "cic:/Coq/Init/Peano/nat_case.con" as theorem.
239 (*#* Principle of double induction *)
241 inline procedural "cic:/Coq/Init/Peano/nat_double_ind.con" as theorem.