aboutsummaryrefslogtreecommitdiffhomepage
path: root/theories/Arith
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-07-09 18:17:58 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-07-09 18:17:58 +0000
commitf3870c96a192ff52449db9695b1c160834ff023f (patch)
treec5b02c6e9a12df51ce7ca5005e0bdf0c58d74cec /theories/Arith
parent06d096b3ff3dff8cca216091c0c5ffa3a7530e1d (diff)
induction/destruct : nicer syntax for generating equations (solves #2741)
The ugly syntax "destruct x as [ ]_eqn:H" is replaced by: destruct x eqn:H destruct x as [ ] eqn:H Some with induction. Of course, the pattern behind "as" is arbitrary. For an anonymous version, H could be replaced by ?. The old syntax with "_eqn" still works for the moment, by triggers a warning. For making this new syntax work, we had to change the seldom-used "induction x y z using foo" into "induction x, y, z using foo". Now, only one "using" can be used per command instead of one per comma-separated group earlier, but I doubt this will bother anyone. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15566 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'theories/Arith')
-rw-r--r--theories/Arith/Compare_dec.v2
-rw-r--r--theories/Arith/Mult.v2
2 files changed, 2 insertions, 2 deletions
diff --git a/theories/Arith/Compare_dec.v b/theories/Arith/Compare_dec.v
index f6801da20..d7dd987fb 100644
--- a/theories/Arith/Compare_dec.v
+++ b/theories/Arith/Compare_dec.v
@@ -202,7 +202,7 @@ Lemma nat_compare_spec :
forall x y, CompareSpec (x=y) (x<y) (y<x) (nat_compare x y).
Proof.
intros.
- destruct (nat_compare x y) as [ ]_eqn; constructor.
+ destruct (nat_compare x y) eqn:?; constructor.
apply nat_compare_eq; auto.
apply <- nat_compare_lt; auto.
apply <- nat_compare_gt; auto.
diff --git a/theories/Arith/Mult.v b/theories/Arith/Mult.v
index 0c44cfaf1..f779e0772 100644
--- a/theories/Arith/Mult.v
+++ b/theories/Arith/Mult.v
@@ -73,7 +73,7 @@ Qed.
Lemma mult_minus_distr_r : forall n m p, (n - m) * p = n * p - m * p.
Proof.
- intros; induction n m using nat_double_ind; simpl; auto with arith.
+ intros; induction n, m using nat_double_ind; simpl; auto with arith.
rewrite <- minus_plus_simpl_l_reverse; auto with arith.
Qed.
Hint Resolve mult_minus_distr_r: arith v62.