Skip to content
Snippets Groups Projects
Commit 35f7ca38 authored by Ralf Jung's avatar Ralf Jung
Browse files

prove a tactic for canceling with pattern matching, and use it in a few (test-)places

parent 9df93b33
No related branches found
No related tags found
No related merge requests found
......@@ -298,6 +298,14 @@ Tactic Notation "feed" "destruct" constr(H) :=
Tactic Notation "feed" "destruct" constr(H) "as" simple_intropattern(IP) :=
feed (fun p => let H':=fresh in pose proof p as H'; destruct H' as IP) H.
(** The following tactic can be used to add support for patterns to tactic notation:
It will search for the first subterm of the goal matching [pat], and then call [tac]
with that subterm. *)
Ltac find_pat pat tac :=
match goal with |- context [?x] => unify pat x; tac x || fail 2
end.
(** Coq's [firstorder] tactic fails or loops on rather small goals already. In
particular, on those generated by the tactic [unfold_elem_ofs] which is used
to solve propositions on collections. The [naive_solver] tactic implements an
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment