RES_CANON : (thm -> thm list)
The theorem argument to RES_CANON should be either be an implication (which can be universally quantified) or a theorem from which an implication can be derived using the transformation rules discussed below. Given such a theorem, RES_CANON returns a list of implications in canonical form. It is the implications in this resulting list that are used by the various resolution tactics to infer consequences from the assumptions of a goal.
The transformations done by RES_CANON th to the theorem th are as follows.
First, if th is a negation A |- ~t, this is converted to the implication
A |- t ==> F. The following inference rules are then applied
repeatedly, until no further rule applies. Conjunctions are split into their
components and equivalence (boolean equality) is split into implication in
both directions:
A |- t1 /\ t2 A |- t1 = t2
-------------------- ----------------------------------
A |- t1 A |- t2 A |- t1 ==> t2 A |- t2 ==> t1
Conjunctive antecedents are transformed by:
A |- (t1 /\ t2) ==> t
---------------------------------------------------
A |- t1 ==> (t2 ==> t) A |- t2 ==> (t1 ==> t)
and disjunctive antecedents by:
A |- (t1 \/ t2) ==> t
--------------------------------
A |- t1 ==> t A |- t2 ==> t
The scope of universal quantifiers is restricted, if possible:
A |- !x. t1 ==> t2
-------------------- [if x is not free in t1]
A |- t1 ==> !x. t2
and existentially-quantified antecedents are eliminated by:
A |- (?x. t1) ==> t2
--------------------------- [x' chosen so as not to be free in t2]
A |- !x'. t1[x'/x] ==> t2
Finally, when no further applications of the above rules are
possible, and the theorem is an implication:
A |- !x1...xn. t1 ==> t2
then the theorem A u {t1} |- t2 is transformed by a recursive
application of RES_CANON to get a list of theorems:
[A u {t1} |- t21 , ... , A u {t1} |- t2n]
and the result of discharging t1 from these theorems:
[A |- !x1...xn. t1 ==> t21 , ... , A |- !x1...xn. t1 ==> t2n]
is returned. That is, the transformation rules are recursively
applied to the conclusions of all implications.
|- !n k r. (?q. (k = (q * n) + r) /\ r < n) ==> (k MOD n = r)For this theorem, the canonical list of implications returned by RES_CANON is as follows:
- RES_CANON MOD_UNIQUE; > val it = [|- !r n q k. (k = q * n + r) ==> r < n ==> (k MOD n = r), |- !n r. r < n ==> !q k. (k = q * n + r) ==> (k MOD n = r)] : thm listThe existentially-quantified, conjunctive, antecedent has given rise to two implications, and the scope of universal quantifiers has been restricted to the conclusions of the resulting implications wherever possible.