In my coq development I am learning how to create new tactics tailored to my problem domain, a la Prof. Adam Chlipala. On that page he describes how to create powerful custom tactics by e.g. combining repeat
with match
.
Now, I already have a powerful one-shot tactic in use, auto
. It strings together chains of steps found from hint databases. I have invested some effort in curating those hint databases, so I'd like to continue using it as well.
However this presents a problem. It isn't clear what the "right" way is to incorporate auto
's functionality into customized tactics.
For example, since (per its page) auto
always either solves the goal or does nothing, putting it inside a loop is no more powerful than calling it once after the loop.
To see why this isn't ideal, consider a hypothetical way to directly call a single "step" of auto
, which succeeds if it could make a change (as opposed to only when it solved the goal) and fails otherwise. Such single-steps could be interleaved with custom behavior in a match repeat loop, allowing us to e.g. try contradiction
or try congruence
at intermediate points within the search tree.
Are there good design patterns for incorporating auto
's functionality into custom tactics?
Can auto
's behavior be decomposed into "single step" tactics that we can use?