From 3dcd1844ac8d5554093afc254ed8ee5c294546e3 Mon Sep 17 00:00:00 2001 From: herbelin Date: Wed, 2 Jun 2004 15:50:10 +0000 Subject: Nouveaux thms de non circularité de nat git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5795 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Arith/Plus.v | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/theories/Arith/Plus.v b/theories/Arith/Plus.v index 496ac33303..7ed40b6c34 100755 --- a/theories/Arith/Plus.v +++ b/theories/Arith/Plus.v @@ -199,4 +199,29 @@ Definition tail_plus n m := plus_acc m n. Lemma plus_tail_plus : forall n m, n + m = tail_plus n m. unfold tail_plus in |- *; induction n as [| n IHn]; simpl in |- *; auto. intro m; rewrite <- IHn; simpl in |- *; auto. -Qed. \ No newline at end of file +Qed. + +(** Discrimination *) + +Lemma succ_plus_discr : forall n m, n <> S (plus m n). +Proof. +intros n m; induction n as [|n IHn]. + discriminate. + intro H; apply IHn; apply eq_add_S; rewrite H; rewrite <- plus_n_Sm; + reflexivity. +Qed. + +Lemma n_SSn : forall n, n <> S (S n). +Proof. +intro n; exact (succ_plus_discr n 1). +Qed. + +Lemma n_SSSn : forall n, n <> S (S (S n)). +Proof. +intro n; exact (succ_plus_discr n 2). +Qed. + +Lemma n_SSSSn : forall n, n <> S (S (S (S n))). +Proof. +intro n; exact (succ_plus_discr n 3). +Qed. -- cgit v1.2.3