diff options
author | Stephane Glondu <steph@glondu.net> | 2010-07-01 17:21:14 +0200 |
---|---|---|
committer | Stephane Glondu <steph@glondu.net> | 2010-07-01 17:21:14 +0200 |
commit | da178a880e3ace820b41d38b191d3785b82991f5 (patch) | |
tree | 6356ab3164a5ad629f4161dc6c44ead74edc2937 /theories/Init/Tactics.v | |
parent | e4282ea99c664d8d58067bee199cbbcf881b60d5 (diff) |
Imported Upstream version 8.2pl2+dfsgupstream/8.2.pl2+dfsg
Diffstat (limited to 'theories/Init/Tactics.v')
-rw-r--r-- | theories/Init/Tactics.v | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/theories/Init/Tactics.v b/theories/Init/Tactics.v index 2d7e2159..48b4568d 100644 --- a/theories/Init/Tactics.v +++ b/theories/Init/Tactics.v @@ -6,7 +6,7 @@ (* * GNU Lesser General Public License Version 2.1 *) (************************************************************************) -(*i $Id: Tactics.v 11741 2009-01-03 14:34:39Z herbelin $ i*) +(*i $Id: Tactics.v 13198 2010-06-25 22:36:20Z letouzey $ i*) Require Import Notations. Require Import Logic. @@ -174,3 +174,20 @@ Tactic Notation "now" tactic(t) := t; easy. (** A tactic to document or check what is proved at some point of a script *) Ltac now_show c := change c. + +(** Clear an hypothesis and its dependencies *) + +Tactic Notation "clear" "dependent" hyp(h) := + let rec depclear h := + clear h || + match goal with + | H : context [ h ] |- _ => depclear H; depclear h + end || + fail "hypothesis to clear is used in the conclusion (maybe indirectly)" + in depclear h. + +(** Revert an hypothesis and its dependencies : + this is actually generalize dependent... *) + +Tactic Notation "revert" "dependent" hyp(h) := + generalize dependent h. |