Is there a tactic that works like resolve_tac, but only does the unification and not solve the goal yet? The rule I want to resolve with has variables in the assumptions that are not part of the conclusion and I want to instantiate them with id. To do that I would first need to fix all variables that are used in the goal (i.e. do unification). If I don't do this I end up with a goal like prems ==> bij (?f3 <all forall bound variables>) which isabelle refuses to unify with id if i try to apply bij_id
If bij_id is not applicable to this goal, then the type of ?f3 must not unify with ?'a => ?'a.
To some extend using supply [[unify_trace_failure]] gives an error message that helps finding out why goals do not unify
I am not sure why, but replacing TRYALL (resolve_tac ctxt @{thms bij_id} ORELSE' assume_tac ctxt) with REPEAT_DETERM (resolve_tac ctxt @{thms bij_id} 1 ORELSE assume_tac ctxt 1) works? Wat?
TRYALL starts with the last subgoal, whereas REPEAT_DETERM with the first. Since you have schematic variables in your goals, the order can matter.
Ah, yes there were two kinds of goals that were still schematic and the bij goal just happend to be the one that failed. Adding more theorems to the resolve tac to cover the other kinds, makes it work with TRYALL too.
Jan van Brügge has marked this topic as resolved.
Last updated: Nov 07 2025 at 16:23 UTC