diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-09-26 11:47:26 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2011-09-26 11:47:26 +0000 |
commit | 9ab628374131e60217d550d670027b531125a74e (patch) | |
tree | c0e6c8b0712b875ebe66482d279977124b9c9431 /test-suite/success/induct.v | |
parent | cc0ee62d03e014db8ad3da492c8303f271c186e6 (diff) |
Added support for referring to subterms of the goal by pattern.
Tactics set/remember and destruct/induction take benefit of it.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@14499 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'test-suite/success/induct.v')
-rw-r--r-- | test-suite/success/induct.v | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test-suite/success/induct.v b/test-suite/success/induct.v index d796cf748..b24ed2f1b 100644 --- a/test-suite/success/induct.v +++ b/test-suite/success/induct.v @@ -41,3 +41,26 @@ Proof. auto. auto. Qed. + +(* Check selection of occurrences by pattern *) + +Goal forall x, S x = S (S x). +intros. +induction (S _) in |- * at -2. +now_show (0=1). +Undo 2. +induction (S _) in |- * at 1 3. +now_show (0=1). +Undo 2. +induction (S _) in |- * at 1. +now_show (0=S (S x)). +Undo 2. +induction (S _) in |- * at 2. +now_show (S x=0). +Undo 2. +induction (S _) in |- * at 3. +now_show (S x=1). +Undo 2. +Fail induction (S _) in |- * at 4. +Abort. + |