The function IMP_RES_THEN is the basic building block for resolution
in HOL.  This is not full higher-order, or even first-order,
resolution with unification, but simply one way simultaneous
pattern-matching (resulting in term and type instantiation) of the
antecedent of an implicative theorem to the conclusion of another
theorem (the candidate antecedent).
Given a theorem-tactic ttac and a theorem th, the theorem-tactical
IMP_RES_THEN uses RES_CANON to derive a canonical list of
implications from th, each of which has the form:
   Ai |- !x1...xn. ui ==> vi
Tactics are produced using the theorem-tactic ttac from all these
resolvents (failures of ttac at this stage are filtered out) and
these tactics are then applied in an unspecified sequence to the goal.
That is,
   IMP_RES_THEN ttac th  (A ?- g)
   MAP_EVERY (mapfilter ttac [... , (Ai u {aj} |- vi) , ...]) (A ?- g)