aboutsummaryrefslogtreecommitdiff
path: root/src/Util/Tactics
diff options
context:
space:
mode:
authorGravatar Jason Gross <jgross@mit.edu>2017-04-10 13:56:19 -0400
committerGravatar Jason Gross <jgross@mit.edu>2017-04-10 13:56:19 -0400
commitdbcc30f4b504a4413e6d207e4da78e3906ca3f9c (patch)
tree451b28a3dedcd4ba28374b89b0016b2c7732ec19 /src/Util/Tactics
parentf2814cf2ba24fbddc3cb091a4fddd19a8c807b89 (diff)
Add rewrite_hyp ... by tac
Diffstat (limited to 'src/Util/Tactics')
-rw-r--r--src/Util/Tactics/RewriteHyp.v40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/Util/Tactics/RewriteHyp.v b/src/Util/Tactics/RewriteHyp.v
index 240931e05..dd1d186db 100644
--- a/src/Util/Tactics/RewriteHyp.v
+++ b/src/Util/Tactics/RewriteHyp.v
@@ -42,3 +42,43 @@ Tactic Notation "erewrite_hyp" "<-" "?*" "in" "*" := repeat do_with_hyp' ltac:(f
Tactic Notation "erewrite_hyp" "!*" "in" "*" := progress erewrite_hyp ?* in *.
Tactic Notation "erewrite_hyp" "->" "!*" "in" "*" := progress erewrite_hyp -> ?* in *.
Tactic Notation "erewrite_hyp" "<-" "!*" "in" "*" := progress erewrite_hyp <- ?* in *.
+
+Tactic Notation "rewrite_hyp" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => rewrite H).
+Tactic Notation "rewrite_hyp" "->" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => rewrite -> H).
+Tactic Notation "rewrite_hyp" "<-" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => rewrite <- H).
+Tactic Notation "rewrite_hyp" "?*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => rewrite !H).
+Tactic Notation "rewrite_hyp" "->" "?*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => rewrite -> !H).
+Tactic Notation "rewrite_hyp" "<-" "?*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => rewrite <- !H).
+Tactic Notation "rewrite_hyp" "!*" "by" tactic3(tac) := progress rewrite_hyp ?*.
+Tactic Notation "rewrite_hyp" "->" "!*" "by" tactic3(tac) := progress rewrite_hyp -> ?*.
+Tactic Notation "rewrite_hyp" "<-" "!*" "by" tactic3(tac) := progress rewrite_hyp <- ?*.
+
+Tactic Notation "rewrite_hyp" "*" "in" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => rewrite H in * by tac).
+Tactic Notation "rewrite_hyp" "->" "*" "in" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => rewrite -> H in * by tac).
+Tactic Notation "rewrite_hyp" "<-" "*" "in" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => rewrite <- H in * by tac).
+Tactic Notation "rewrite_hyp" "?*" "in" "*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => rewrite !H in * by tac).
+Tactic Notation "rewrite_hyp" "->" "?*" "in" "*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => rewrite -> !H in * by tac).
+Tactic Notation "rewrite_hyp" "<-" "?*" "in" "*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => rewrite <- !H in * by tac).
+Tactic Notation "rewrite_hyp" "!*" "in" "*" "by" tactic3(tac) := progress rewrite_hyp ?* in * by tac.
+Tactic Notation "rewrite_hyp" "->" "!*" "in" "*" "by" tactic3(tac) := progress rewrite_hyp -> ?* in * by tac.
+Tactic Notation "rewrite_hyp" "<-" "!*" "in" "*" "by" tactic3(tac) := progress rewrite_hyp <- ?* in * by tac.
+
+Tactic Notation "erewrite_hyp" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => erewrite H by tac).
+Tactic Notation "erewrite_hyp" "->" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => erewrite -> H by tac).
+Tactic Notation "erewrite_hyp" "<-" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => erewrite <- H by tac).
+Tactic Notation "erewrite_hyp" "?*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => erewrite !H by tac).
+Tactic Notation "erewrite_hyp" "->" "?*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => erewrite -> !H by tac).
+Tactic Notation "erewrite_hyp" "<-" "?*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => erewrite <- !H by tac).
+Tactic Notation "erewrite_hyp" "!*" "by" tactic3(tac) := progress erewrite_hyp ?* by tac.
+Tactic Notation "erewrite_hyp" "->" "!*" "by" tactic3(tac) := progress erewrite_hyp -> ?* by tac.
+Tactic Notation "erewrite_hyp" "<-" "!*" "by" tactic3(tac) := progress erewrite_hyp <- ?* by tac.
+
+Tactic Notation "erewrite_hyp" "*" "in" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => erewrite H in * by tac).
+Tactic Notation "erewrite_hyp" "->" "*" "in" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => erewrite -> H in * by tac).
+Tactic Notation "erewrite_hyp" "<-" "*" "in" "*" "by" tactic3(tac) := do_with_hyp' ltac:(fun H => erewrite <- H in * by tac).
+Tactic Notation "erewrite_hyp" "?*" "in" "*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => erewrite !H in * by tac).
+Tactic Notation "erewrite_hyp" "->" "?*" "in" "*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => erewrite -> !H in * by tac).
+Tactic Notation "erewrite_hyp" "<-" "?*" "in" "*" "by" tactic3(tac) := repeat do_with_hyp' ltac:(fun H => erewrite <- !H in * by tac).
+Tactic Notation "erewrite_hyp" "!*" "in" "*" "by" tactic3(tac) := progress erewrite_hyp ?* in * by tac.
+Tactic Notation "erewrite_hyp" "->" "!*" "in" "*" "by" tactic3(tac) := progress erewrite_hyp -> ?* in * by tac.
+Tactic Notation "erewrite_hyp" "<-" "!*" "in" "*" "by" tactic3(tac) := progress erewrite_hyp <- ?* in * by tac.