diff options
author | Jason Gross <jgross@mit.edu> | 2017-07-08 15:59:53 -0400 |
---|---|---|
committer | Jason Gross <jgross@mit.edu> | 2017-07-08 16:01:19 -0400 |
commit | 5aa6b0a6b2ac0561125716710662adab6ad6f333 (patch) | |
tree | dcd50d5c9e51bca63566e10a48a824f0e197e42f /src/Util/Tactics/UnfoldArg.v | |
parent | c13b59e4e416b308f709bf5e901f29580fb04f5a (diff) |
Add UnfoldArg
Diffstat (limited to 'src/Util/Tactics/UnfoldArg.v')
-rw-r--r-- | src/Util/Tactics/UnfoldArg.v | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Util/Tactics/UnfoldArg.v b/src/Util/Tactics/UnfoldArg.v new file mode 100644 index 000000000..5f7772578 --- /dev/null +++ b/src/Util/Tactics/UnfoldArg.v @@ -0,0 +1,11 @@ +Require Import Crypto.Util.Tactics.ChangeInAll. + +(** fully reduces the first argument to [t], wherever it appears *) +Ltac unfold_first_arg t := + repeat match goal with + | [ H : context[t ?x] |- _ ] => progress change_with_compute_in_all x + | [ |- context[t ?x] ] => progress change_with_compute_in_all x + end. + +(* use uconstr so we can have underscores *) +Tactic Notation "unfold_first_arg" uconstr(t) := unfold_first_arg t. |