aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Arith/Factorial.v
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-05-13 22:40:41 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-05-13 22:40:41 +0000
commitf3bdc124043e9d2ce40f1d44cbc22b351e977d01 (patch)
treeeb93d3e4db32d4fcaaea4f3fbc86c851afaec4fb /theories/Arith/Factorial.v
parentf6ef45b99330719391111df5d51dfb55d853d962 (diff)
Nouveaux lemmes (sur proposition de Nijmegen)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4012 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Arith/Factorial.v')
-rw-r--r--theories/Arith/Factorial.v34
1 files changed, 34 insertions, 0 deletions
diff --git a/theories/Arith/Factorial.v b/theories/Arith/Factorial.v
new file mode 100644
index 000000000..4963379e6
--- /dev/null
+++ b/theories/Arith/Factorial.v
@@ -0,0 +1,34 @@
+(***********************************************************************)
+(* v * The Coq Proof Assistant / The Coq Development Team *)
+(* <O___,, * INRIA-Rocquencourt & LRI-CNRS-Orsay *)
+(* \VV/ *************************************************************)
+(* // * This file is distributed under the terms of the *)
+(* * GNU Lesser General Public License Version 2.1 *)
+(***********************************************************************)
+
+(*i $Id$ i*)
+
+Require Plus.
+Require Lt.
+
+(** Factorial *)
+
+Fixpoint fact [n:nat]:nat:=
+ Cases n of
+ O => (S O)
+ |(S n) => (mult (S n) (fact n))
+ end.
+
+Lemma lt_O_fact : (n:nat)(lt O (fact n)).
+Proof.
+Induction n; Unfold lt; Simpl; Auto with arith.
+Qed.
+
+Lemma fact_neq_0:(n:nat)~(fact n)=O.
+Proof.
+Intro.
+Apply sym_not_eq.
+Apply lt_O_neq.
+Apply lt_O_fact.
+Qed.
+