SUBGOAL_THEN : term -> thm_tactic -> tactic
A1 ?- t1
========== f (u |- u)
A2 ?- t2
A1 ?- t1
==================== SUBGOAL_THEN u f
A1 ?- u A2 ?- t2
Typically f (u |- u) will be an invalid tactic because it would return a validation function which generated the theorem A1,u |- t1 from the theorem A2 |- t2. Nonetheless, the tactic SUBGOAL_THEN u f is valid because of the extra sub-goal where u must be proved.
{n = SUC m} ?- (0 = n) ==> t
SUBGOAL_THEN (Term `~(0 = n)`) (fn th => REWRITE_TAC [th])
{n = SUC m} ?- ~(0 = n)
?- T