| 1 |
Require Import Crypto.Util.Tactics.ChangeInAll. |
| 2 |
|
| 3 |
(** fully reduces the first argument to [t], wherever it appears *) |
| 4 |
Ltac unfold_first_arg t := |
| 5 |
repeat match goal with |
| 6 |
| [ H : context[t ?x] |- _ ] => progress change_with_compute_in_all x |
| 7 |
| [ |- context[t ?x] ] => progress change_with_compute_in_all x |
| 8 |
end. |
| 9 |
|
| 10 |
(** fully reduces the second argument to [t], wherever it appears *) |
| 11 |
Ltac unfold_second_arg t := |
| 12 |
repeat match goal with |
| 13 |
| [ H : context[t _ ?x] |- _ ] => progress change_with_compute_in_all x |
| 14 |
| [ |- context[t _ ?x] ] => progress change_with_compute_in_all x |
| 15 |
end. |