Você está na página 1de 8

P. C.

Gilmore

A Proof Method for Quantification Theory:


Its Justification and Realization

Abstract: A program is described which can provide a computer with quick logical facility for syllogisms and
moderately more complicated sentences. The program realizes a method for proving that a sentence of quan-
tification theory is logically true. The program, furthermore, provides a decision procedure over a subclass of
the sentences of quantificatio~ theory. The subclass of sentences for which the program provides a decision
procedure includes all syllogisms. Full justification of the method is given.

A program for the IBM 704 Data Processing Machine is outlined which realizes the method. Production runs of
the program indicate that for a class of moderately complicated sentences the program can produce proofs in
intervals ranging up to two minutes.

Introduction
Before a rigorous mathematical proof of any theorem can ingful and are therefore called well-formed formulae, or
be given, it is necessary that the theorem, and the axioms briefly wff. From the wff of the theory will be selected
from which the theorem is to be deduced, be precisely the sentences of the theory.
stated in an unambiguous language. The formal language Inductive definitions of wff and of "the (individual)
variously called the first-order predicate calculus or logic, variable X occurs free in the wff S" are given simultane-
the first-order functional calculus or logic, or quantifica- ously:
tion theory, is adequate for the expression of any theorem 1. A formula consisting of a predicate letter followed by
or axiom. Further, although the sentences of quantifica- any number of individual names or variables is an atomic
tion theory are ambiguous in the sense of being capable wff and a wff and the variables occurring in it occur free.
of possessing many different meanings, it is an easy matter
2. If S is a wff then so is -S, and the variables occurring
to remove this ambiguity simultaneously from all sen-
free in S occur free in <S,
tences of the language by assigning meaning to the primi-
tive symbols from which the sentences are formed. But 3. If Sand Tare wff then so are (S&T), (SvT),
most important of all, it is possible to give for sentences (S :J T) and (S == T), and the variables occurring free
T, SI, S2, ... of quantification theory a precise definition in either S or T occur free in these wff.
of "T is a logical consequence of the sentences S1,S2,"'" 4. If S is a wff and X is any variable then (EX)S and
to replace the intuitive but vague notion in natural lan- (AX)S are wff and the variables other than X occurring
guages that one sentence is a logical consequence of
free in S occur free in these wff.
other sentences. Thus quantification theory not only pro-
vides a language for mathematics but also permits a A variable X which occurs in a wff but does not occur
description of what constitutes a rigorous mathematical free is said to be bound in the wff and must, therefore, by
proof. part (4) of the definition, occur with quantifier symbols
The primitive symbols of quantification theory are as in (EX) or (AX). A sentence of the theory is a wff in
brackets (,), the logical connectives -, &, v, :J, ==, the which no variable occurs free. Calling such formulae of
predicate letters A, B, C, ... the individual names, a, b, c, the theory sentences is reasonable if the primitive symbols
... the individual variables x, y, z, ... and the quantifiers of the theory are interpreted as follows:
E and A. Any finite sequence of these primitive symbols Atomic sentences (atomic wff which are sentences)
is a formula of the theory. From the formulae of the can be understood as abbreviations for sentences such as
28 theory are selected some which in some sense are mean- "1+3=5", "3<7", or "John is tall"; these could be ex-

IBM JOURNAL' .JANUARY 1960


pressed in quantification theory as A 135, B37, or ca, in which occur only predicate letters and names of I,
allowing numerals also to be names in quantification "true for the interpretation" and "false for the interpre-
theory. Atomic wff which are not sentences can be under- tation" can be readily defined considering the meanings
stood as abbreviations for sentence forms such as which have been given to the logical connectives and
"I +x=5", or "x+y=5", or "x+y=z", or "3<y" or quantifiers. Thus (Ey) (Bay & Cy) is true in the interpre-
"x<y" or "x is tall", where if variables in a sentence tation rCa, cs, Bab, <Bba, -Baa, --Bbb} because Bah
form are replaced by names the result is a sentence. The and Cb are true in the interpretation and therefore also
logical connectives -, &, v, ::) and == are to be understood (Bab & Cb) and hence the above sentence. But the same
as expressing negation, conjunction, disjunction, implica- sentence is false in the interpretation {C a, - Cb, Bab,
tion and equivalence respectively in the sense that, for -Bha,-Baa, -Bbb} because there is no name a such
example, (S & T) is a sentence which is true if and only that both Baa and Ca are true in the interpretation, and
if both Sand T are true, and (S::) T) is a sentence which hence no name a for which t Bao: & Co:) is true for the
is true if and only if S is false or T is true, and -S is a interpretation. Clearly any consistent set I of ground sen-
sentence which is true if and only if S is false, When the tcnces ean be completed to an interpretation by adding to
logical connectives are attached to sentence forms rather I, for any atomic sentence formed from a predicate letter
than sentences the result is to be understood as a new and names of I, either the atomic sentence or its negation,
sentence form with the expected properties. For example, should neither already appear in I. Such an interpretation
if Sex) is a sentence form with one free variable x, then will be called a completion of I.
-sex) is a sentence form with one free variable x and This definition of interpretation will appear a little
such that for any name a, the sentence . -S~) formed strange because it does not require the specification of any
from -Sex) by replacing x everywhere by a: is true if and set of objects which is to be the range of the variables
only if Sea) is false. Finally a sentence such as (Ex)S(x) x, y, z, ... , to which the names a, b, c ... are assigned
can be understood to be a sentence which is true if and or the properties and relations of which are to be assigned
only if for some name a, Sea) is true, while a sentence to the predicate letters A, B, C, .... But since it is possi-
(Ax)S(x) can be understood to be a sentence which is ble for every object of a set to be assigned a single name,
true if and only if for every possible name a, S(a) is it is irrelevant whether one uses names to discuss the
true. For sentence forms Sex, y) with two free variables objects or simply discusses the names. However, this has
x andy, (Ey)S(x, y) and (Ay)S(x, y) are sentence forms as a consequence that two apparently quite different inter-
with one free variable x and are related in the obvious pretations may be, for all practical purposes, the same
manner to the sentence form Sex, y). interpretation. An object given a single name in one inter-
A sentence is generally thought to be either true or pretation may be given a different name, or many different
false. But a sentence of quantification theory may be true names in another interpretation. For this reason the notion
or false depending upon the interpretations given to the of a homomorphism for interpretations is convenient.
predicate letters and names which occur in it. Thus Let if! be a single valued mapping of the names of an
"(Ey) (Bay & Cy)" is true when "Bay" is understood as interpretation II onto the names of an interpretation 12 ,
"a is the brother of y", "Cy" is understood as "y is tall" and for any sentence S in which only names of II occur,
and "a" is the name of someone with a tall brother, but let "'(S) be the sentence obtained from S by replacing
can be false under other interpretations. each name a occurring in S by if!(a). If for any ground
If atomic sentences or sentences formed from atomic sentence G in which only names of II occur, G is a mem-
sentences by attaching a negation sign " .. " arc caned ber of 11 if and only if f(G) is a member of 12 , f is said
ground sentences, then by an interpretation can be under- to be a homomorphism of II onto 12 If there exists a
stood a set 1 of ground sentences of quantification theory homomorphism of II onto 12 then 12 is said to be a homo-
with the following properties: morphic image of II. It can be readily seen that if 1/ is a
1. No atomic sentence and its negation are members of 1 homomorphism of II onto 12 then for any sentence S, Sis
(I is consistent); true or false for II if and only if "'(8) is true or false
respectively for 12
2. For every possible atomic sentence which can be
A counterexample for a conjectured theorem T in a
formed from names and predicate letters occurring in
mathematical theory with axioms S1, S2, .. consists in a
ground sentences in I, either the sentence or its negation
mathematical structure for which SI, S2, .. are all true
is a member of 1 (I is complete).
and for which T is false. Assuming that T, Sl, S2, ... are
A predicate letter or name occurring in a member of an all sentences of quantification theory, this can he more
interpretation I is said to be a predicate letter or name of 1. precisely expressed: The counterexample consists in an
The members of an interpretation I are the only ground interpretation for which Sl, S2, ... are alI true and T is
sentences of the language which are true for the interpre- false. Thus, a conjectured theorem is actually a theorem
tation. A ground sentence not in I, but formed from a if itis impossible to find a counterexample for it. Hence
predicate letter and names of I, is false for J. Hence a one can say that a sentence T is a logical consequence of
sentence in which occurs a predicate letter or name not of sentences 81> S2, ... if and only if it is not possible to find
an interpretation is neither true nor false for the interpre- an interpretation for which Sl, 8 2 , are all true and T
tation. For sentences which are not ground sentences and is false. If T is a logical consequence of an empty set of 29

IBM JOURNAL ",JANUARY 1960


sentences, that is, if it is impossible to find an interpreta- In the description of the process some well-known
tion in which T is false, then T is logically true. concepts and theorems from logic will be used. Two sen-
A program for the IBM 704 Data Processing Machine tences are said to be logically equivalent if and only if
will be described which will, for any logically true sen- there exists no interpretation for which one is true and
tence T, construct a proof that T is logically true. For a the other is false. A sentence in which no quantifiers
special class M of sentences the program will do more; for appear, and which is in disjunctive normal form, is called
any member T of M the program can decide whether or a matrix. Since a matrix consists of one or more disjune-
not T is logically true, produce a proof of T should it be tions of conjunctions of one or more ground sentences.
logically true and provide essentially a counterexample to from two matrices M 1 and M 2 can be formed a product
T should T be not logically true. The class M of sentences matrix. as follows: For each conjunction of M 1 and each
is sufficiently wide to include, for example, all syllogisms. conjunction of M 2 , form a conjunction of the product
Results of production runs will be given. In addition it matrix by conjoining the two conjunctions. Contradictory
will be shown how the program can be adapted for pro- conjunctions, i.e., ones in which both an atomic sentence
ducing a proof that a sentence T is a logical consequence and its negation appear, can be dropped from the product
of sentences Sl, S2, ... matrix.
The theoretical basis of the program is a process which, A wff which is not a sentence but is in disjunctive nor-
for any sentence S of quantification theory, generates at mal form and does not contain any quantifiers is called a
the nth step of the process a finite number k, k n20, of matrix form. A sentence which is in prenex form, that is,
finite sets lnh 1n2 , ,Ink~ of ground sentences. Each set one in which all of the quantifiers occur initially, and
formed at the n+ 1s t step is either one of the sets formed which consists of a sequence of quantifiers attached to a
at the nth step or is obtained from such a set by adding wff which is a matrix form, will be said to be in standard
new members to it Hence if k,,> 0 for all n then it is pos- form. For any sentence of quantification theory, there
sible to find a function cp such that I"W{nl c;l"+l~,rH.l) for exists a sentence in standard form which is logically
all n. It is then the case that any completion of the set equivalent to the given sentence. A sentence which is in
QO
standard form and which is logically equivalent to a given
U 1,,'1>'''1 is an interpretation for which S is true. Con- sentence will be said to be a standard form of the given
n::::!
versely if there is any interpretation whatsoever for which sentence.
S is true, then there is also one which is a completion of The original motivation for the proof method of this
co
paper was the method of semantic tableaux of Beth,
U 1,,'1>("1 for some cp. It follows that there is an interpre-
although in its present form it is closer to the work of
fl.::::1
tation for which S is true if and only if k,,>O for all n. Hintikka.? The proof method is related in form, if not
The process can be applied to proving that a sentence entirely in motivation, to the methods of Herbrand and
T is logically true by taking as input to the process the Gentzen."
sentence - T. Should k = 0 for some n, then T is true for Although much previous work has been done in prov-
every interpretation, and therefore logically true, since ing theorems by machine, the present work is the first
it is not possible for there to be an interpretation for working program for quantification theory. The work of
which - T is true and thus for which T is false. On the Newell, Shaw and Simon did not have as its primary aim
other hand, however, the process cannot, in general, show the proof of theorems, but did result in a program for the
that a sentence T is not logically true; that is, that - T has propositional logic. 1
an interpretation, since it would be necessary to show that Gelernter's and Rochester's program- for proving
kn>O, for all n, while only a finite number of k'l can ever theorems in elementary geometry is applied to proving
be computed.' Nevertheless, for one special class M of theorems which can be put into the standard form:
sentences of quantification theory the process does actu-
(AX l ) (AX",) (P{X1 , , X",) :JQ(X h , X,,) ),
ally provide a decision procedure; that is, for any member
T of M, if - T is used as input for the process, it will he where P(X1 , ,Xn ) and Q(Xlo , X,,) are conjunc-
possible to decide after a finite number of steps whether tions of atomic wff, from axioms which can be put into
or not T is logically true. For, for any member T of M, the same standard form. Although there exists a simple
it is possible to compute a number N such that if - T is decision procedure for theorems in such an axiomatic
used as input to the process then there is an interpretation theory, the Gelernter-Rochester program does not make
for which - T is true if and only if kn>O for all n, n c.N, use of it. Their program, with motivations similar to those
Further if if> is a function such that 1,,'b(nJ C1n+l'i>(n+l) for of Newell and Simon, instead of exhaustively generating
:;.; substitutions for the axioms, chooses substitutions which
n"<N, then any completion of U 1,,</Jen) is an interpreta- are expected to lead more directly to a proof of the
'J1,~1

tion for which - T is true. Thus for T in M. if the process theorem. Dunham, Fridshal and Sward have developed a
is carried out with - T as input and k ~ 0 at the nth step, program which uses an efficient decision procedure for
n"<N, then T has been proven to be logically true; while theorems in propositional logic." The work of Wang is
if kn>O for each of the first N steps of the process, Tis most directly related to the present paper." Wang has
known to be not logically true and a counterexample to T written two programs and has proposed a third. His first
30 can actually be exhibited. program is a decision procedure for theorems of the

IBM JOURNAL'JANUARY 1960


propositional logic, his second a decision procedure for PlH1r=Pnr+l andp".j.l}o=Pnj for 1 (d) if there is a
theorems of quantification theory which are members of k such that Pn}= p,n for k<j~r and Pnk<P.n- l , then
the Class M, while the proposed program is a proof P,,+lj=Pni for l~j<k, Pn+lk=P"k+1, P"'+l,,=P.n and
method for theorems of quantification theory which incor- Pn+li~ 1 for k<i<r.
porates the decision procedure of the first two programs. The sequence of z-tuples so generated is without dupli-
Thus the intention of Wang's third program is exactly cations and is such that for any k, 1>;;;; k >;;;; r, and any posi-
the same as the program outlined in this paper; the two tive non-zero integer It, every k-tuple of numbers trI,
programs differ, however, in several ways. For example, 1 <,m>;;;;p" occurs in the sequence (Pn(,..I'l+l, ... , Pnr),
it is based on a method of proof more directly related to n~l, 2, ... , before any k-tuple with a number p.+1
that of Gentzen and Herbrand rather than that of Beth appears.
and Hintikka, Also, at the same time, Wang's program A sentence S in standard form is a member of the set
is to accomplish more, for it is to accept as input data the D if and only if there is no (existentially quantified)
sentence to be proven, while the input data for the pro- variable of S dependent upon any (universally quantified)
gram of this paper is a standard form of the negation of variable of S. A sentence T is then a member of the set AI
the sentence to be proven. A further comparison of the if and only if the sentence - T has a standard form which
two programs will have to wait upon production runs is a member of D.
from Wang's program." Let there occur s names in S. Let S not be in D. A
The process which has been described as the theoretical sequence (Qn 1 ' q-a, ... , qmn), n = 1, 2, . , . of m-tuples
basis of the program of this paper is given in detail in of positive non-zero integers is generated as follows:
the next section. The following section describes the pro-
(l) For all k and n, if X k is universally quantified and
gram for the IBM 704 Data Processing Machine for
proving sentences to be logically true, and its extension k=ui' then qnk=Pnj;
to a program for proving that a given sentence is a logical (2) For all k, if x; is existentially quantified and is de-
consequence of other sentences. Results of production pendent upon the variables Xnit' .. ,Xnit, then (a) qlk
runs are given in the subsequent section. is the maximum ofs+1, qll+1, ... ,qlk_1+1; (b) for
all n> 1, if h is the smallest positive integer for which
The process
(P n i l' ... ,Pn},) is identical with Phi" . , Phi<), then if
Given any sentence, choose a standard form S for it. Then h-en, qnk is qhk; while if h=n, q"k is the maximum of
S can be written: $+1, qll+1, ... , Qlm+1, ... , q"-l1 + 1, "', q"_lm+l,
qnl + 1, ... , Q"k-l + 1; in particular if t=O, then qnk~q1k'
Should S be in D so that it can be assumed that in the
where Xl, X z , .. ,X" are all the variables which occur sequence Q1, Qz, , Qm no A precedes an E, then a finite
free in the matrix form M(Xl. .. ,Xm ) and each Qi is sequence (qnl, ,qnm), n=I,2, ... ,max(1,(m-r+s)r),
either E or A. If Qi is E(A ), then X, is said to be existen- of m-tuples of positive non-zero integers is generated as
tially (universally) quantified. follows:
The matrix form M(Xl, ... ,Xrn ) consists of the dis-
(1) For all k and n, if Xj,; is universally quantified and
junction of one or more conjunctions of one or more basic
k=uj, then qnk=Pni;
sentence forms or basic sentences. Two conjunctions are
said to be linked by given variables if there exists a finite (2) For all k and n, if X k is existentially quantified, then
sequence of conjunctions of the matrix form, beginning qnk is the maximum of 8+ 1, qll + 1, ... , q1k-l + 1. In
with one of the conjunctions and ending with the other, particular, therefore, if either r=O or r=m, then only one
such that for each adjoining pair of conjunctions in the term is generated.
sequence, one of the given variables OCCurs free in both Let a1, az, .. , a., U""l, . be a list of names of quan~
members of the pair. An existentially quantified variable tification theory in which the names 01, az. . ,u.which oc-
Xi is said to depend upon all universally quantified vari- cur in S are all listed first. Let PI be the matrix M(oqll'
ables Xi for which i<j and which occur free in conjunc- , Uqlm), and for n> 1, let P n be the product matrix of
tions where Xi occurs free, or which are linked to the Pn - 1 with the matrix M(a q" " , a q", ,) . For S in D, P" is
conjunctions in which X, occurs free by the universally defined for n>;;;;max (1, (m-r+s)r), while for Snot in D,
quantified variables XI< for which i<k. it is defined for aU n ~ 1. Then for any nand i, I ni is the set
Let there be r universally quantified variables Xu!, XU" of ground sentences conjoined together to form the jth
... , X"r' Then a sequence of r-tuples ([1n1' P"2, . . ,P"r), conjunction of P". Let k" be the number of conjunctions
n = I, 2, ... , of positive non-zero integers is generated as ofP".
follows:
(1) ForaIlj, P1j=l;
Theorem 1
(2) Let p,,, be the maximum of pn1, P,,2, ... ,p"r, then For S not in D the sets In) possess the following properties:
(a) if for all j, Isj~r,Pn}=P.n, then P"+lr=/t,,+1 and
(l) For any n for which k n +1>O and any t, 1 ::;;j~k"+l'
P"+li= 1 for i<r; (b) if there is a k such that Pnj=p", for
there exists an i such that l"'<;;;["+li;
k<i~r and Pnk=P,,,-I, then pn+1i=Pn} for l~i<k,
P,,+lk=P.", and Pn+1i=1 for k<iSr; (c) if Pnr<f"'" then (2) For any function rp for which [,,<P(n) <;;;["<1",(,,,.1) for 31

IBM JOURNAL'JANUARY 1960


ro
n2l, S is true for any completion of '"
U I",!,(,,); iffl G) is 111 J'. Then since U 1,,<1>(11) C}*, there exists a
'1::...:1- -n::::1

(3) For any interpretation I" for which S is true there unique completion} of '" 1"<p(,,,
U such that Ir;;F. 1ft is a
n:::1
exists an interpretation 1', I'<]", for which S is true and
homomorphism of 1 onto 1'.
a function cP for whichI,,<I>o,l r;;f"+l'1>("q) for n> 1, such
Corollary. For S not in D there exists an interpretation for
that I' is the homomorphic image of some completion
00 which S is true if and only if k,,>O for all n,
of'U 1,,<IJ(n).9 Since by (I) if k,,> 0 for all n then there exists a func-
n~~l
tion cP for which [,,"'(n) for all n, and hence by
Proof (2) there exists an interpretation for which S is true. Con-
versely if there is an interpretation for which S is true
That they possess property (I) is immediate. A comple-
~
then by (3) there is such a and hence k.'> 0 for all 11,
tion 1 of a set U 1,,$(,,) is formed from the latter set by
n;;;;l Theorem 2
adding to it ground sentences consistent with it formed
from names and predicate letters occurring in members of When S is in D and N "~max(l, (m-r+s)"), the sets I"j
the latter set. Hence, all of the sentences M(a"." ... ,a'l.m), possess the following properties:
n= 1,2, . , . , are true for I and therefore also S is true (I) For any 11, 1 <;n<N, for which kn+i>O and any i,
for t. 1 S;Sk n ,!, there exists an i such that [nir;;f,,+lj.
Let S be true for I", Choose a sequence b i , b 2 , , of
names of I" as follows: (2) For any function cP for which In'iJ;n) Cln+l<l>(;'~l) for
eo
1'511<1"1, S is true for any completion of U InP(n..
( 1) If names occur in S, list these first in the order in 1l:::o1

which they are listed in a1, (12, , , (I,; (3) For any interpretation 1" for which S is true there
(2) If no names occur in Sand QI is A, choose any name exists an interpretation 1', rc; I", for which S is true and a
of I" as b 1 ; function 1:> for which [,,<1'(") Cl n+l'iJin+l}, for 1Sn<N, such
that I' is the homomorphic image of some completion of
(3) Assume that the sequence of names has been com- y

pleted for t members (t may be 0 if,\' = 0 and Q1 is E) . Let U I"'I>C,,).


.. 1
n be the smallest integer for which q"j=l+ 1 for some j. Properties (l) and (2) follow in exactly the same man-
It then follows that for only one k is qnk=t+ 1, 80 that one ner as in Theorem 1. The proof of (3) is similar to that
can assume that bq"l' ... ,b'l~k~l have already been chosen, in Theorem 1 except that the sequence bs, b 2 " , of names
and further that Qk is E. Hence, choose bq ' k to be such that of l" is finite, the sequence being terminated after all the
(Qi,.clXj'+l) , .. (QmXm)Al(h.1ut' .. , h'/'k' X kl1, , X",) names in S have been listed and either one member has
is true for I", heen chosen for each existentially quantified variable in S,
For any n, Af(b q,, !, " " b q.,.) is true for l", Let P', be should one exist, or otherwise after only one member has
M(b q 11 , , b'l1m) and let P'" be the product matrix of been chosen. Then (b'1nl'"'" bq"m) is defined for 1 <n <N,
P' n~l and M (b q" " , b q m ) . Let l' ni be the set of grou nd Similarly one can prove:
sentences in the jlh conjunction of P'". Then since P'" is Corollary. For S in D there exists an interpretation for
true for I" for any n, there must he a cP' such that the which S is true if and only if k,,>O for nSN.
' (n) tll conjunction of PO" is true for rand l' n'l> (n) C
m
The program to produce proofs for
I'n+l<P' (" +1) for any n. Since l" is complete and U l',,'}" (n.) logically true sentences
?l='l
00 The input for the program is a standard form of the llega~
cr, there is a unique completion I' of U {n<P'(") such
n::::l tion of the sentence T to be proven. The input data pro-
that I'r;;.r. Since for any n, M(h'l." ... , b q m ) is true for vides. the-refore, a matrix form as well as a list of quan-
1', S also is true for 1'. tifiers with the dependencies of the existential quantifiers
From the manner in which the sets l',,'i>' (nl have been indicated. The matrix form data consists of a list of 36-hit
defined, it follows that if J'"j is the set of ground sentences computer words each member in the list being an atomic
in the jlh conjunction of M(b'Jnl' .. ,b qnm) then there wff', negated or not, or a dividing word to indicate the
'n occurrence of the connective "v", The negated and un-
exists a function y such that U J'k'((k) =I'nr[>'(l') for all n,
k~l
negated atomic wff are expressed within the computer
Let 1"j be the set of ground sentences in the jlh conjunc- words as follows: The sign bit is used to indicate the
tion of M(a,!,,!, ... , G q m ) and let be a function such occurrence of the negation sign, a negative word being a
n negated atomic wff. The next five bits are used for the
that U h'(o,) =["P(ll) for all 11. Let the map If! be the single-
k"l predicate letter while the remaining 30 bits are used for
valued map of the names al. a~, ... onto the names b-: the variables in a manner dependent upon the number of
h z . defined by: for all i, IHad =b i Let l* be the inter- variables. The 30 bits are broken up, as nearly as possible,
32 pretation with ground sentences G as members for which into equal fields, the number of which is the same as the

IBM JOURNAL. JANUARY 1960


maximum number of variables attached to predicate inclusion in the program of a routine to remove common
letters in the sentence to be proven. Variables are ex- factors results in a saving of code numbers.
pressed as non-zero binary numbers occupying the fields If Inj<;;;Jnk, for some j and k, then it is clear from
of the 30 bits. The names which replace the variables are Theorems 1 and 2 that there is no loss in ignoring the set
also binary numbers and occupy the same field as the Ink and considering only further the set Inj. For the pro-
variable they replace. Thus positive and negative ground gram this amounts to discarding redundant conjunctions
sentences and unnegated and negated atomic wff are rep- from P, a redundant conjunction being one for which
resented in the program within a single computer word another conjunction of P; exists, of which each ground
in exactly the same manner. There results a limitation on sentence occurs in the redundant conjunction. After the
the maximum number of names that can be introduced removal of redundant conjunctions, fewer distinct atomic
which is determined by the maximum number of variables sentences may occur in a product matrix than before the
attached to predicate letters; for example, if this number removal so that code numbers may be freed for reuse.
is 6 then the maximum number of names that can be intro- The main steps in the program can now be fully
duced is 2 5-1, or 31. described.
In outline the program is very simple. A substitution
( 1) Should T not be in M or should 7' be in M and n be
generator generates the m-tuples (aqn l , , aqno,) ,
not greater than N for T, then generate a new substitution
n= 1,2, ... , and as each is produced it is substituted into
(a Qn1 , ,aq""J according to the dependencies of existen-
the matrix form to produce the matrices M(a']nll'" ,aqm,J. tially quantified variables on universally quantified vari-
As each matrix M(a'l~p ... ,Oqg",), n'> 1, is produced it
ables. Should T be in M and should n be greater than N,
is multiplied by the previous product matrix P n - 1 and the
then T is not logically true and the program stops.
resulting product matrix Pn is tested to determine whether
or not it has any conjunctions. Should Pn have no con- (2) Generate the flit conjunction of JI.!(aq"l' .. ,Qq,.,,)
junctions then a proof has been produced for the sentence by substituting Qq". for Xl> .. , aq" ," for X m in the jtlt
to be proven. Should the sentence T to be proven be a conjunction of the matrix form of the input. If a member
member of M and should n=N for T, then if P has a of the conjunction contradicts any ground sentence on the
conjunction, T is not provable. Should n<N or should T truth list, or another ground sentence in the conjunction,
not be a member of M then if P" has a conjunction the discard the conjunction and go to (5).
program goes on to produce P,,'.l- (3) Determine the code numbers that have been previ-
This outline of the program is not complete, however,
ously assigned to the ground sentences of the conjunction,
since in order to conserve computing time and space, the
and assign new numbers to those ground sentences which
matrices are coded before being multiplied. A matrix is
have not previously been assigned numbers. Should a code
coded by expressing each of its conjunctions as a pair of
number larger than 36 be required, the program stops.
36-bit computer words as follows: As the ground sen-
Express the conjunction as a pair of words.
tences are produced by substitution into the negated and
unnegated atomic wff of the matrix form, they receive (4) Form the product of the coded jth conjunction with
in tum a code number from I to 36, a ground sentence the previous product matrix, dropping from the resulting
with a negation sign attached receiving the same number new product any contradictory conjunctions. As each
as the ground sentence without the negation sign. In the conjunction of the new product matrix is formed, test to
pair of words representing the conjunction of a matrix, a see if it is redundant or if it makes an already appearing
zero in the i t h place of the first word indicates that the conjunction of the new product matrix redundant, and
negative ground sentence with that code number is a store it according to the results of this test.
member of the conjunction, and a zero in the i t h place of (5) Check to see if the new product matrix is complete;
the second word indicates that the positive ground sentence
that is check to see if j is the number of conjunctions in
with that code number is a member of the conjunction.
the matrix form, If the product matrix is not complete go
The limitation of 36 on the number of distinct positive to (2) to generate the j+ 1 th conjunction; iUt is, go to (6).
ground sentences that may appear is severe. Therefore,
immediate consideration is being given to writing a pro- (6) Check to see if the product matrix is empty. If it is,
gram in which each conjunction of a matrix is expressed the proof is complete and the program stops. If it is not,
by two, four, six, et cetera, words as needed, allowing the remove common factors from the product matrix and put
limitation to be raised to 72, 108, 144, et cetera. However, them onto the truth list. Determine and record all code
two features in the program for conserving code numbers numbers that have been freed for reuse.
make the limitation less severe than would first be The only change that would be necessary in order to
apparent. use the program for proving theorems in an axiomatic
A ground sentence which appears in every conjunction theory with axioms S\, 8 2 , , would be in (I) and (2).
of some Pn must necessarily appear in every conjunction Instead of only generating substitutions for a matrix form
of Pn+j for i> O. Hence such common factors can be obtained from the negation of the theorem T to be proven,
removed from all of the conjunctions of P n and put onto the program would also have to generate substitutions for
a special list Called the truth list. Since a ground sentence matrix forms obtained from the axioms. The remainder
on the truth list does not require a code number, the of the program would be unchanged. 33

IBM JOURNAL ..JAl."'WARY 1960


Table 1 The sentences to be provenP

(1) (Ex) (Ay) (Az) ([Fy.::JGy)=Fx) &Fy-::>Hy)=:Cx) & (Fy-::>Gy) -::> Hy)=Hx)] -::> (Fz&Gz&Hz)} .

(2) (Ex)(Ey)(Az){[(Fxz=:Fzy) & (Fzy=Fzz) & (Fxy:=Fyx) j:J (Fxy=Fxz)} .


(3) (Ex)(Ay) (Az) ([ Fyz:J (Gy:J HX:J Fx;'() & Ft.x -::> GX):J Hz) & Fxy] -::> Fzz] .

(4) (Ex)(Ey)(Az){(Fxy::J (Fyz & Fzz) ) & Fxy & Gxy)::J (Gxz& Gzz} .
(5) {[(Ax){Ey)(Fxy v Fyx) & (Ax)(Ay)(Fxy :J Fyy)::J (Ez)Fzz} .

(6) (Ax)(Ey)(Px::J(PyvQy, where the atomic wff "Px' is replaced by: (Eu)(Av)(Fux:J(Gvu&Gux)), the
atomic wff "Py" is replaced by a corresponding wff, and the atomic wff "Qy" is replaced by: (Au) (Av) (Ew)
Gvu v Hwyv)::J Guw) .

(7) ([(Ax) (Kx -::> (Ey) (Ly & (Fxy ::J Gxy ) & (Ez;)(Kz; &(Au) (Lu::J Fzu J:J (Ev)(Ew) (Kv&Lw& Gvw)} .

(8) (3) in which the atomic wff "Hx" is replaced by: (Au)(Ev)Hu'lJx, and the atomic wff "Hz" is replaced by a corre-
sponding wff.
(9) (Ax) (Ey) (Az) {(pyx:J (Pxz :: Pxy & (Pxy::J (~Pxz:J (Pyx & PZy)}, where the atomic wff "Pxy" is replaced
by: (Au)(Ev) tFxun & Gyu & -Hxy), and the other atomic wffs are replaced by corresponding wffs.

Table 2 The input. Results from produttion runs"lO


No. of The sentences for which proofs were attempted by the
Quantifier List Conjunctions program are given in Table 1. Information about the
(1) (Ez)(Ax) (Ey) rs quantifier list and matrix function provided by the sen-
(2) (Ax, y) (Ez) 2 tences of Table 1 are given in Table 2. Finally in Table 3
(3) (Ax) (Ey, z) 4 the results of the production runs are given. No names
(4) (Ax, y)(Ez) 4 appear in any of the sentences used as inputs. None of
(5) (Ax) (Ey) (Az) 4
the inputs to the program are in the class D although
(6) (Ex) (Ay)(Ez, u, v)(Aw) (Ex') (Ay', z') 8
Example (1) is a member of class M.
(7) (Ex) CAy) (Ez) (Av, w) 9 In evaluating the difficulty of Examples (6), (8), and
(8) (Ax)(Ey, z, u)(Av)(Ew) 6 (9), it is important to recognize that although they are
(9a) (Ex) (Ay) (Ez, u) (Av) (Ew) (Ax') described as substitutions into easily proven theorems
(Ey')(Az', u', v') 21 (the sentence of (9) into which the substitution is made
(9b) (Ex) (Ay) (Ez, u, 'V, w) (Ax') (Ey', z') can be proven by the program in less than one-hundredth
(Au', o', w') 21 of a minute), they are themselves only easily proven when

Table 3 The results.


No.oj No. oj
Status Time Proof Subst. Con]. Truth L. Code No.
(1) yes om yes 4 4 10 0
(2) no 0.01 no 11 2 0 36+
(3) yes 1.42 yes 13 590 53 33
(4) yes 21* no 7 2900+ 7 30
(5) yes 0.01 yes 3 2 4 5
(6) yes 0.12 yes 27 24 16 14
(7) yes om yes 5 6 4 12
(8) yes 0.74 no 10 150 6 36+
(9a) yes 15.06 no 3 1900 3 36+
f9b) yes 21* no 6 1850 5 35
SfafuJ indicates whether or not the sentence is logically true, Time b given In minutes. Proof indicates whether or not a proof was produced. No. 0/ Subsl. is
the number of times a new matrix was generated. No. of c.,,;. i. the maximum number I)f conjunctions in any product matrix. Truth L. i> the number of
34 entries on the truth list. Code No, is the maximum number of code numbers used. The two starred examples were manually stopped.

rBM ,JOURNAL "',JANUARY 1960


the substitutions are recognized. When the substitutions tions in the product matrix can increase rapidly. But the
are disguised, as they are in the input data for the program, removal of contradictory conjunctions and redundant
the difficulty of the example is considerably increased. conjunctions, in some cases at any rate, keeps the number
One run was used to evaluate that part of the program of conjunctions down to a manageable size. The limitation
which removes redundant conjunctions from the product on the number of coding numbers, although quite strin-
matrix, as this portion of the program consumes a large gent, is not as serious in practice as would first appear.
proportion of the running time when the product matrix The results certainly encourage the writing of programs
is large. The result was to prove conclusively the value of with double or triple the present number of coding num-
this portion of the program. bers. Pessimism regarding the program is confirmed, how-
A number of examples other than those used in pro- ever, in one respect. If the quantifier list of the input
duction runs were considered but rejected because they contains m universal quantifiers, then in order to consider
are all too easy for the program; that is, the program can all possible substitutions of up to k names into the uni-
produce a proof for them in less than one-hundredth of versally quantified variables it is necessary to generate k m
a minute. Included in such examples are all of the syllo- matrices and form their product. Thus, for example, in
gisms. Indeed, as the syllogisms belong to that special (9a) if all possible substitutions of up to only three indi-
class of sentences which are decidable by the program, viduals are to be considered then 3 6 or 729 matrices must
the program can decide of any syllogism whether or not be generated and multiplied, the product matrix of which
it is valid within one-hundredth of a minute. can have up to 21 729 conjunctions! Considering the num-
In Table 2. the dependencies indicated by the order of ber of multiplications performed by the program in pro-
the quantifiers in the quantifier list were the only ones indi- duction runs, it is clear that success can only be had with
cated. Two different equivalent quantifier lists for Exam- such a problem by a program which is more discriminat-
pic (9) were tried. The number of conjunctions is the ing in the matrices that it generates and multiplies. Exam-
number in the matrix function. Variables in a group with ple (4) is a good case in point. A very short proof of this
E or A indicate a sequence of quantifiers. sentence can be produced by hand simulation if a very
obvious refinement is added to the routine for generating
Conclusions matrices. Nevertheless, the program has succeeded in
Without considering the results of the production runs, it producing proofs for moderately complicated sentences.
might be concluded that the program had little chance of For simple logical deductions such as the syllogisms, the
success. With each multiplication the number of conjunc- program has very fast logical facility.

Referentes and footnotes


1. Actually, from a theorem of Church in "An Unsolvable roms," Proceedings of the International Conference on
Problem of Elementary Number Theory," American Information Processing, Paris, 1959.
Journal of Mathematics, 58, 345-363, it can be concluded 7, Hao Wang, "Toward Mechanical Mathematics," see p. 2,
that there can exist no effective process for the construe- this journal.
lion of interpretations for sentences. In particular, there- 8. There has come to my attention the work of D. Prawitz,
fore, there can exist no effective process for determining, H. Prawitz, and Neri Voghera of Stockholm. A brief
in general, whether or not it is true that k,,>O for all n. outline of their work appears in the Proceedings 0/ the
2. E. W. Beth, "Semantic Entailment and Formal Deriva- International Conference on Information Processing,
bility," Amsterdam, North Holland Publishing Co., 1955. Paris, 1959, in the discussion of the session on theorem
K. 1. J. Hintikka, "F orm and Content in Quantification proving.
Theory," appearing in "TWQ Papers on Symbolic Logic," 9. A stronger result can be proven but is not needed for the
Helsinki, Acta Philosophica Fennica, Fasc, VIlI, 1955. purposes of this paper. For the stronger result I' is such
3. G. Gentzen, "Untersuchungen uber das logische Schlies- that any sentence is true for I' if and only if it is true
sen," Mathematische Zeitschrijt 39. 176-210, 405-431 for I",
(1934-5). J. Herbrand, Recherches sur la theorie de /a 1O. First announced in a paper "A Program for the Produc-
demonstration, Travaux de la Societe des Sciences et des tion of Proofs for Theorems Derivable within the First
Lettres de Varsovie, Classe III sciences mathernatiques Order Predicate Calculus from Axioms," Proceedings of
ct physiques, No. 33 (1930). the International Conference on In/ormation Processing,
4. A. Newell, J. C. Shaw and H. A. Simon, "Empirical Ex- Paris, 1959.
plorations of the Logic Theory Machine: A Case Study 11. Alonzo Church, Introduction to Mathematical Logic,
in Heuristics," Proceedings oj The Western Joint Com- Princeton University Press, 1956, is the source of Exam-
puter Conference, 218-230 (1957). Further references ple 1 to 4 and 9. They are, respectively, Ex. 3, p. 262;
can be Obtained from this paper. 2, p. 265; 1, p. 262; 5, p. 265; and 2, p, 262. Example 7
5. H. L. Gelernter and N. Rochester, "Intelligent Behavior appears in Rosser, J. B., Logic [or Mathematicians,
in Problem-Solving Machines," IBM Journal; 2, 336-345 McGraw-Hili Book Co., New York, p. 150 Ex. (e).
(1958). See also, H. Gelernter, "Realization of a Geom- Example 6 and the modification for Example 9 are due
etry Theorem Proving Machine," Proceedings oj the to J. D. Rmlc<4,'e.
International Conference on In/ormation Processing,
Paris, 1959.
6. B. Dunham, R. Fridshal and G. L. Sward, "A Non-
Heuristic Program for Proving Elementary Logical Theo- Received April 20, 1959 35

IBM JOURNAL "JANUARY 1960

Você também pode gostar