From 93a5f1e03e29e375be69a2361ffd6323f5300f86 Mon Sep 17 00:00:00 2001 From: herbelin Date: Fri, 27 Nov 2009 19:48:59 +0000 Subject: Added support for definition of fixpoints using tactics. Fixed some bugs in -beautify and robustness of {struct} clause. Note: I tried to make the Automatic Introduction mode on by default for version >= 8.3 but it is to complicated to adapt even in the standard library. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@12546 85f007b7-540e-0410-9357-904b9bb8a0f7 --- theories/Arith/Compare_dec.v | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'theories/Arith') diff --git a/theories/Arith/Compare_dec.v b/theories/Arith/Compare_dec.v index deb6f229b..d696360fd 100644 --- a/theories/Arith/Compare_dec.v +++ b/theories/Arith/Compare_dec.v @@ -22,17 +22,17 @@ Definition zerop n : {n = 0} + {0 < n}. Defined. Definition lt_eq_lt_dec n m : {n < m} + {n = m} + {m < n}. - induction n; simple destruct m; auto with arith. - intros m0; elim (IHn m0); auto with arith. - induction 1; auto with arith. + intros; induction n in m |- *; destruct m; auto with arith. + destruct (IHn m) as [H|H]; auto with arith. + destruct H; auto with arith. Defined. Definition gt_eq_gt_dec n m : {m > n} + {n = m} + {n > m}. - exact lt_eq_lt_dec. + intros; apply lt_eq_lt_dec; assumption. Defined. Definition le_lt_dec n m : {n <= m} + {m < n}. - induction n. + intros; induction n in m |- *. auto with arith. destruct m. auto with arith. @@ -40,7 +40,7 @@ Definition le_lt_dec n m : {n <= m} + {m < n}. Defined. Definition le_le_S_dec n m : {n <= m} + {S m <= n}. - exact le_lt_dec. + intros; exact (le_lt_dec n m). Defined. Definition le_ge_dec n m : {n <= m} + {n >= m}. @@ -48,11 +48,11 @@ Definition le_ge_dec n m : {n <= m} + {n >= m}. Defined. Definition le_gt_dec n m : {n <= m} + {n > m}. - exact le_lt_dec. + intros; exact (le_lt_dec n m). Defined. Definition le_lt_eq_dec n m : n <= m -> {n < m} + {n = m}. - intros; elim (lt_eq_lt_dec n m); auto with arith. + intros; destruct (lt_eq_lt_dec n m); auto with arith. intros; absurd (m < n); auto with arith. Defined. -- cgit v1.2.3