Like the basic resolution function IMP_RES_THEN, the resolution tactic
RES_THEN performs a single-step resolution of an implication and the
assumptions of a goal. RES_THEN differs from IMP_RES_THEN only in that the
implications used for resolution are taken from the assumptions of the goal
itself, rather than supplied as an argument.
When applied to a goal A ?- g, the tactic RES_THEN ttac uses RES_CANON to
obtain a set of implicative theorems in canonical form from the assumptions A
of the goal. Each of the resulting theorems (if there are any) will have the
form:
ai |- !x1...xn. ui ==> vi
where ai is one of the assumptions of the goal. Having obtained
these implications, RES_THEN then attempts to match each antecedent ui to
each assumption aj |- aj in the assumptions A. If the antecedent ui of
any implication matches the conclusion aj of any assumption, then an instance
of the theorem ai, aj |- vi, called a ‘resolvent’, is obtained by
specialization of the variables x1, ..., xn and type instantiation,
followed by an application of modus ponens. There may be more than one
canonical implication derivable from the assumptions of the goal and each
such implication is tried against every assumption, so there may be several
resolvents (or, indeed, none).
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,
has the effect of:
MAP_EVERY (mapfilter ttac [... ; (ai,aj |- vi) ; ...]) (A ?- g)
where the theorems ai,aj |- vi are all the consequences that can be
drawn by a (single) matching modus-ponens inference from the assumptions A
and the implications derived using RES_CANON from the assumptions. The
sequence in which the theorems ai,aj |- vi are generated and the
corresponding tactics applied is unspecified.