aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Arith/Plus.v
diff options
context:
space:
mode:
authorGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-11-14 13:44:25 +0000
committerGravatar herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7>2003-11-14 13:44:25 +0000
commit9977a49c7c39e5431982105a6879c3cb15179847 (patch)
tree7257a4dea07529cbe0149f0a3b955aad324e5c88 /theories/Arith/Plus.v
parent47c543e0ab368a5ee140fab1a2a48f7c3c47d059 (diff)
Nouveaux lemmes 'canoniques'; compatibilite
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@4901 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Arith/Plus.v')
-rwxr-xr-xtheories/Arith/Plus.v26
1 files changed, 22 insertions, 4 deletions
diff --git a/theories/Arith/Plus.v b/theories/Arith/Plus.v
index d44914499..ffa94fcd0 100755
--- a/theories/Arith/Plus.v
+++ b/theories/Arith/Plus.v
@@ -18,6 +18,18 @@ Open Local Scope nat_scope.
Implicit Variables Type m,n,p,q:nat.
+(** Zero is neutral *)
+
+Lemma plus_0_l : (n:nat) (O+n)=n.
+Proof.
+Reflexivity.
+Qed.
+
+Lemma plus_0_r : (n:nat) (n+O)=n.
+Proof.
+Intro; Symmetry; Apply plus_n_O.
+Qed.
+
(** Commutativity *)
Lemma plus_sym : (n,m:nat)(n+m)=(m+n).
@@ -56,15 +68,21 @@ Hints Resolve plus_assoc_r : arith v62.
(** Simplification *)
-Lemma simpl_plus_l : (n,m,p:nat)((n+m)=(n+p))->(m=p).
+Lemma plus_reg_l : (n,m,p:nat)((p+n)=(p+m))->(n=m).
Proof.
-NewInduction n ; Simpl ; Auto with arith.
+Intros m p n; NewInduction n ; Simpl ; Auto with arith.
Qed.
+V7only [
+Notation simpl_plus_l := [n,m,p:nat](plus_reg_l m p n).
+].
-Lemma simpl_le_plus_l : (p,n,m:nat) (p+n)<=(p+m) -> n<=m.
+Lemma plus_le_reg_l : (n,m,p:nat) (p+n)<=(p+m) -> n<=m.
Proof.
-Intro p; NewInduction p; Simpl; Auto with arith.
+NewInduction p; Simpl; Auto with arith.
Qed.
+V7only [
+Notation simpl_le_plus_l := [p,n,m:nat](plus_le_reg_l n m p).
+].
Lemma simpl_lt_plus_l : (n,m,p:nat) (p+n)<(p+m) -> n<m.
Proof.