Mechanical Mathematics and Inferential Analysis

Mechanical Mathematics and Inferential Analysis

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS H A 0 WANG Cambridge, Mass. 1. GENERAL SPECULATIONS If we compare calculating with proving, four dif...

1MB Sizes 0 Downloads 49 Views

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS H A 0 WANG Cambridge, Mass.

1. GENERAL SPECULATIONS

If we compare calculating with proving, four differences strike the eye: (1) Calculations deal with numbers; proofs, with propositions. (2) Rules of calculation are generally more exact than rules of proof. (3) Procedures of calculation are usually terminating (decidable, recursive) or can be made so by fairly well-developed methods of approximation. Procedures of proof, however, are often nonterminating (undecidableor nonrecursive, though recursively enumerable), indeed incomplete in the case of number theory or set theory, and we do not have a clear conception of approximate methods in theorem-proving. (4) We possess efficient calculating procedures, while with proofs it frequently happens that even in a decidable theory, the decision method is not practically feasible. Although shortcuts are the exception in calculations, they seem to be the rule with proofs in so far as intuition, insight, experience, and other vague and not easily imitable principles are applied. Since the proof procedures are so complex or lengthy, we simply cannot manage unless we somehow discover peculiar connections in each particular case. Undoubtedly, it is such differences that have discouraged responsible scientists from embarking on the enterprise of mechanizing significant portions of the activity of mathematical research. The writer, however, feels that the nature and the dimension of the difficulties have been misrepresented through uncontrolled speculation and exaggerated because of a lack of appreciation of the combined capabilities of mathematical logic and calculating machines. Of the four differences, the first is taken care of either by quoting Godel representations of expressions or by recalling the familiar fact that alphabetic information can be handled on numerical (digital) machines. The second difference has largely been removed by the achievements of mathematical logic in formalization during the past eighty years or so. Item (3) is not a difference that is essential to the task of proving

2

H A 0 WANG

theorems by machine. The immediate concern is not so much theoretical possibility as practical feasibility. Quite often a particular question in an undecidable domain is settled more easily than one in a decidable region, even mechanically. We do not and cannot set out to settle all questions of a given domain, decidable or not, when, as is usually the case, the domain includes infinitely many particular questions. In addition, it is not widely realized how large the decidable subdomains of an undecidable domain (e.g., the predicate calculus) are. Moreover, even in an undecidable area, the question of finding a proof for a proposition known to be a theorem, or formalizing a sketch into a detailed proof, is decidable theoretically. The state of affairs arising from the Godel incompleteness is even less relevant to the sort of work envisaged here. The purpose here is at most to prove mathematical theorems of the usual kind, e.g., as exemplified by treatises on number theory, yet not a single “garden-variety” theorem of number theory has been found unprovable in the current axiom system of number theory. The concept of approximate proofs, though undeniably of a kind other than approximations in numerical calculations, is not incapable of more exact formulation in terms of, say, sketches of and gradual improvements toward a correct proof. The difference (4) is perhaps the most fundamental. It is, however, easy to exaggerate the degree of complexity which is necessary, partly because abstract estimates are hardly realistic, partly because so far little attention has been paid to the question of choosing more efficient alternative procedures. The problem of introducing intuition and experience into machines is a bit slippery. Suffice it to say for the moment, however, that we have not realized that much of our basic strategies in searching for proofs is mechanizable, because we had little reason to be articulate on such matters until large, fast machines became available. We are in fact faced with a challenge to devise methods of buying originality with plodding, now that we are in possession of servants which are such persistent plodders. In the more advanced areas of mathematics, we are not likely to succeed in making the machine imitate the man entirely. Instead of being discouraged by this, however, one should view it as a forceful reason for experimenting with mechanical mathematics. The human inability to command precisely any great mass of details sets an intrinsic limitation on the kind of thing that is done in mathematics and the manner in which it is done. The superiority of machines in this respect indicates that machines, while following the broad outline of

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS

3

paths drawn up by people, might yield surprising new results by making many new turns which man is not accustomed to taking. The attempt to mechanize, as much as possible, mathematical thinking opens up a large area of research. In my opinion, the theoretical core of this area is a new branch of applied logic which may be called inferential analysis, characterized by an emphasis on the explicitlessand practical feasibility of methods of inference. This discipline enjoys a measure of autonomy not shared by numerical analysis which, for example, does not deal with logical operations on the choice and arrangement of numerical methods. It is believed that the development of mechanical mathematics will influence pedagogical and research methods in mathematics, as well as affect certain epistemological questions of a specifically mathematical coloring. The governing general principle is: what can be formulated exactly can be put on a machine, subject to the practical limitations on the manageable dimension and complexity. Repetitions are a good indication of the suitability of a mechanical treatment. Thus, for example, much of the activity of teaching mathematics is tedious and requires patience. If no interaction between pupil and teacher were necessary, televisions, or sometimes just gramophones, would be sufficient to replace teachers. As it is, these ready-made conveniences are only used as partial substitutes but, even so, teaching has already begun to enjoy to a certain extent the advantages of mass production. However, interesting problems of mechanical mathematics arise only when we come to tasks which call for an active agent to give answers, advices, and criticisms, the simplest being the correction of exercises and examination papers. Psychologically, the pupil has many reasons for preferring a patient machine teacher when the problem is, as in the majority of situations, a matter of drill rather than inspiration. The result may be that human teachers will employ mechanical devices as teaching assistants. In a similar fashion, since in mathematical research there is also a great deal of mechanizable tedious work, mechanical devices may be used to aid individual mathematicians. In this connection, ,in view of the fact that specific mathematical discoveries are made essentially once and for all, there are less of exact repetitions, but more of the problem of using mechanical devices flexibly by, for example, designing and combining programs on general purpose computers. In order to use machines either to aid research or to aid teaching, the results, methods, and spirit of formalization in mathematical logic are to play an essential role.

4

HA0 WANG

The advance of mechanical mathematics may also affect some of our concepts in the philosophy of mathematics. We get, not only in theory, but even in practice, an objective criterion of mathematical rigor in mechanical terms. The range of feasible mathematical methods will be extended so that the theoretically feasible and the practically feasible begin to converge, and we have a more realistic guidance to the improvement of feasibility. As we understand more fully the range of mechanical mathematics, we get a clearer view of the relation between complexity and conceptual difficulty in mathematics, since we would probably wish to say that mechanizable pieces, even when highly complex, are conceptually easy. When alternative proofs are fully mechanizable, we obtain also a quantitative measure of the simplicity of mathematical proofs, to supplement our vaguer but richer intuitive concept of simplicity. With the increasing power to formalize and mechanize, we are freed from tedious details and can more effectively survey the content and conceptual core of a mathematical proof.

2. THECENTRAL ROLEOF LOGIC In theory all mathematical arguments can be formalized in elementary logic (quantification theory, predicate calculus). If we add equality and the quantifiers “for all x” and “for some y” to the propositional connectives “and”, “if“, “or”, “not”, etc., we obtain the predicate calculus, in which, as logicians will know, every usual mathematical discipline can be so formulated that each theorem T in the latter becomes one in the former when the relevant mathematical axioms A are added as premises. That is to say, if T is the theorem in the mathematical discipline, then “if A , then T” is a theorem of logic. From this fact it is clear that in order to prove mathematical theorems by machines a major step is to deal with theorems of the predicate calculus. One may question the advantage of thus handling mathematics, on the ground that the peculiar mathematical content of each individual branch is lost when the disciplines are thus uniformly incorporated into the predicate calculus by formalization and abstraction. Now it is indeed true that we must add special methods for each special mathematical discipline. An adequate treatment of the predicate calculus is, however, of dominant importance, and for each discipline the basic additional special methods required are fairly uniform. For number theory, the essential new feature is largely concentrated in mathematical induction

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS

5

as a method of proof and of definition; for set theory, in the axiom of comprehension, i.e., the axiom specifying all the conditions which define sets. So there is the problem of choosing the formula to make induction on, or of choosing the condition for defining a set. While it seems doubtful that there is any uniform efficient mechanical method for making such selections, there are often quite feasible partial methods. For example, for making such selections in number theory the obvious uninspired method of trying the desired conclusion of one or another of its clauses as the induction formula should suffice in many cases. It would seem that, once a feasible way of doing logic is given, fairly simple additional methods could carry us quite some way into special mathematical disciplines. Since most of us learned Euclid and number theory without worrying about the predicate calculus, it might seem that the natural course is to bypass logic and go directly to mathematics. But in fact such an approach is ill-advised, so long as the aim is to prove more and harder theorems rather than merely to re-enact the history of mathematical thinking. What is natural for people need not be natural for the machine. If logic is not treated in an explicit and systematic way, constant subsequent additions of ad hoc devices keep slowing our progress toward interesting theorems, while multiplying the sources of possible confusion. In general, a vast machinery specifically designed to obtain a few easy theorems is wasteful ; results obtained from whatever approaches should be measured against the generality and economy of the machinery used. Foundations, furthermore, should be scaled to large future superstructures. It is our conviction that to treat logic only by the way would score very poorly by both criteria. 3.

SOME POSSIBLE

DIRECTIONS FOR FURTHER EXPLORATION

Results so far are too rudimentary to provide us with any decisive conclusions as to the dimension of the long-range effects of the pursuit of mechanical mathematics. Nevertheless, I shall venture a few comments drawn from my own restricted experience. (a) I have examined the theoretically undecidable domain of the predicate calculus and managed to make an IBM 704 prove all theorems (over 350) of Principia mathematica in this domain in less than 9 minutes; this suggests that we usually do not use the full power of strong mathematical methods and should not be prevented from trying to handle an area on account of

6

H A 0 WANG

pessimistic abstract estimates of the more difficult cases in the region. (b) Care in the theoretical design of the procedures is essential and a certain amount of sophistication in mathematical logic is indispensable, because most existing methods are not immediately applicable on machines. (c) In particular, one often has to reformulate available methods or even invent fundamentally new ones ; sometimes theoretically insignificant improvements could increase the speed or reduce the necessary storage by several orders of magnitude, for example, a device to try out certain “preferred” substitutions first. (d) Long-rangeplanning and efforts to make results cumulative are necessary; ad hoc measures and desire for quick sensation should be avoided because otherwise the limit of diminishing return will be reached too soon; the correct course would increase reward per unit of work more and more quickly with greater and greater efforts. (e) While more can be done with larger machines, the design and choice of methods is, at least at the present stage, more crucial because we are far from having made full use of an IBM 704 or 7090 yet. (f) Distrust luck and do not, for example, use obscure methods with the hope that something wonderful might happen since we do not know what will happen ; the chances of undesirable consequences are much bigger. At the present stage, mechanical mathematics seems to be one of the areas in information processing which promise the highest reward for each unit of labor. Only accidental circumstances such as the lack of alliance of potential contributors in administration, programming, and logic have so far sabotaged more rapid developments. The laziest solution of this practical difficulty is for one to attack problems in isolation and hope that the pieces will miraculously fit together in due course. This is not the most satisfactory solution but perhaps the most feasible, given all the facts of competition, sales exaggeration, desire for liberty and independence. There are at least three groups of preliminary work necessary for genuine advances in the long run :a good common (idealized programming) language for crystallization, communication, and accumulation of results; a decent library of subroutines for simple algebraic and logical manipulations of symbols, as well as for simple basic proof and decision procedures; and a fairly sophisticated logical analysis of a number of specific mathematical proofs with a view to bringing out the details which have to be taken care of in order to thoroughly formalize and mechanize them. It is of course not excluded that one would often run into blind

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS

7

alleys. But I am confident major wastes can be avoided through careful planning and alert flexibility. With these provisos in mind, I now proceed to list a few possible directions which, in my opinion, are worthy of at least some preliminary exploration. That proof procedures for elementary logic can be mechanized is familiar. In practice, however, were we slavishly to follow these procedures without further refinements, we should encounter a prohibitively expansive element. It is desirable to study underlying properties of such expansions in order to increase efficiency. In this way we are led to a closer study of reduction procedures and of decision procedures for special domains, as well as of proof procedures of more complex sorts. Such deeper considerations of elementary logic also provide us with a systematic approach to axiomatic theories viewed as applied predicate calculus. The insights thus obtained can complement our direct treatment of specific mathematical disciplines. For the sake of a more concrete goal to guide the choice of theoretical questions, we may set ourselves the aim of programming machines to formalize and “discover” proofs in quantifier-free number theory and axiomatic set theory. These areas are chosen both because they are so central and because it seems desirable to isolate the two basically difficult mathematical concepts: functions and quantifiers. It is possible that the quantifier-free theory of positive integers, including arbitrary simple recursive definitions, can be handled mechanically with relative ease, and yield fairly interesting results. It is clear from works in the literature that this restricted domain of number theory is rather rich in content. It goes beyond logic in an essential way because of the availability of (quantifierfree) mathematical induction. On the other hand, in axiomatic set theory, the explicit use of functions can be postponed for quite a long time. Moreover, here certain general concepts often prove difficult; perhaps machines will more quickly excel in areas where people’s intuitions are not strong. A case in point would be Quine’s axiomatic system “New Foundations,” which was obtained by relaxing certain syntactical restrictions of the theory of types. While the ulterior aim is to use machines to aid mathematical research with the assistance of logic, machines can also be used to aid our theoretical research in logic at the present stage. Computers can be put to good use in the quantity production of concrete examples, which we constantly need as a means of clarifying our concepts and so expediting general theoretical results.

8

HA0 WANG

Already in the limited experience in the mechanizing of logical procedures, the machine outputs have from time to time brought out features of the procedures which one had not thought out clearly in advance. Such experiences have sufficed to persuade us that we would do well to experiment with computing machines even if it were only for purposes of theoretical logic. Some other possible directions are: (1) Experiment with redoing school and college mathematics by machines ;instruct a machine to compete with the average student by using its patience to compensate its lack of intuition; partial decision procedures in algebra, trigonometry, analytic geometry, the calculus ;prove theorems in elementary geometry and algebra with extensive use of methods dealing with the underlying logic. (2) Try to combine numerical and inferential methods so that principles can be introduced for the machine to choose particular methods to apply according to the nature of the given problems; this aims at delegating to the machine as much as possible of the work which now requires a maths matical analyst. (R.W. Hamming is much interested in work along this direction.) (3) In fields like algebraic topology where often definitions are long but proofs are short, it is not unlikely that mechanized logical methods will prove to be of practical use in helping to sort out logical consequences of new concepts. (4)Fairly simple mathematical researches involving combinatorial considerations such as questions of completeness, independence, deducibility in the various systems of the propositional calculus can presumably be helped radically by a few suitably devised machine programs. ( 5 ) Use this type of work as data to guide us in the design of more realistic idealized programming languages. With regard to the formulation of programming languages, it seems desirable not to pursue the task in isolation and then look for applications afterwards. One must not let the initial investment in a programming language control the choice of problems to be programmed, but frequent revisions of a fixed language require a prohibitive amount of energy and work which can easily prevent one from meeting new demands with an open mind. A good compromise between rigidity and complete lack of organization would seem to be the isolation of necessary devices such as the designing of MACROinstructions at every stage, as is called for by specific but typical occasions. In this way, a body of quite well-organized data would gradually emerge as more programs are written. Attention to the accumulation of good MACROinstructions also brings

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS

9

into the somewhat routine task of programming a theoretically more interesting element of formulating exactly concepts which are intuitively familiar. 4. CASESTUDIES AND STOCK-OF-TRADE SYSTEMS

To analyze in detail specific mathematical proofs is clearly a useful preliminary step toward the mechanization of types of arguments. One might attempt to work out a few examples of such case studies drawn from number theory, geometry, and axiomatic set theory. In number theory, one might compare quantifier and free variable proofs of the infinitude of primes and of the fundamental theorem of arithmetic, putting emphasis on recursive functions and mathematical induction. In geometry and axiomatic set theory, one might consider mildly difficult theorems which are proved with quantifiers but without functions. In each case, two types of problems can be conveniently separated : deriving very elementary properties such as the commutativity of addition from the basic axioms on the one hand, and organizing such elementary properties to obtain a basis for further derivations on the other. For the human being, the first type of problem is rather artificial and contraintuitive. For example, the very early theorems in elementary geometry are more abstruse than the simple exercises about parallels, triangles, etc. A good organization of elementary properties plus an exact formulation of familiar methods of trying to find a proof would presumably yield in each discipline something similar to the principles obtained from what is often called the “heuristic approach”. It is here proposed that such organizations be called stock-of-trade systems. However, despite terminological disputes, everybody probably agrees as to roughly what sort of thing is to be done, and the more relevant question is how good a result one gets. It is with regard to this last point that a patient study of special cases with ample use also of the stocks in trade of mathematical logic appears indispensible. For instance, even a formalization of Euclid’s proof of the infinitude of primes contains a few surprises, and there are quite a number of theoretically interesting questions connected with the problem of proving the irrationality of f2 with no appeal to quantifiers. We consider here only an example in axiomatic set theory derived from a paper of Hintikka [13]. If a theorem is proved in a system, even one with only a finite set

10

HA0 WANG

of axioms, it would seem that one major problem is to select the axioms needed for the proof. It stands to reason to expect that it would be easier for the machine to begin with the selected axioms. In so doing, we may lose some alternative proof which uses other axioms but that is something which we do not have to worry about yet. Moreover, it appears easier to select and prove intermediate lemmas and break up the whole proof into parts. In both cases, if we do not have the selection to begin with, it is not easy to decide whether it is advantageous to take all to begin with, or to add routines to select. In the long run, one would expect to use the latter alternative. But when the methods of selecting subproblems and branching out are as cumbersome as some existing crude attempts appear to be, it is not necessarily more efficient to use the selection alternative. The example to be considered is of special interest because it lies in an area which has not been developed nearly as much as old subjects such as number theory. Consequently, we can draw very little from a cumulative intuition, and our advantages over machines are not great. Moreover, this area has been pursued with a considerable emphasis on formal arguments. Let Hxy and 3zGxyz be short for:

#x A (1) u # v3z(z

(2) y # a = (3) y # b (4) y # c = (5)y#d3

z

# Y A FZY A Fyz).

(Fyu = Hay). (Fyb r l H b y ) . (Fyc = ( y = a v y (Fyd-y=c).

=

b)).

The assertion is that the conjunction of (1)-(5) is contradictory. More exactly, this says that the following formula is a theorem of the predicate calculus. (I) 13 u 3 v 3 u 3 b 3 c 3 d v y v z 3 w 3 x {u#v A b#a A [v # b A [Y#C A [y # d

3 3 =)

((Fya A G w w ) V ( 1 F y a A 1 G a y z ) ) l ((Fyb A 1 G b y z ) V ClFvb A Gbyx))] (Fyc=(y=a V y=b))l (Fyd-y = ~ 1 1 ) .

If the system does not include =, then we have to treat a = b as

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS

11

an abbreviation for Vx(Fxu E Fxb),

and add the axiom: u =b

3

Vy(Fuy E Fby).

This incidentally illustrates the fact that for mechanical mathematics it is in practice desirable to include = to begin with. In that case, the formula is in one of the familiar decidable cases since it contains only two consecutive 3 ’ s (for validity). In terms of satisfiability, the part without the i n i t i a l 1 has no model and can be decided by the 3VzX satisfiability case (see [23]). On the whole, it seems easier to make machines do some of the formalizing work which logicians sometimes have to do. This may be viewed as an application of the principle “Charity begins at home.” Some malicious soul might use this as evidence for his favorite view that logic is trivial, and he will be wrong for too many reasons which it is tiresome to elaborate. In general, what is needed for mechanization is not just axiomatic systems with emphasis on economy and elegance but rather “stock-oftrade systems” and formalizations which are exact and yet remain as close to good common expositions as possible.

5. SOMETHEORETICAL DIFFICULTIES In order to mechanize proof procedures of the predicate calculus, it seems natural to use Herbrand’s Theorem. This has been suggested and carried out to varying degrees of completion by different people (see [21], [22], [lo], [16], [6]). The crucial part contains the generation from a given formula of a sequence of propositional or Boolean conditions, and the testing of them. It is clear, both by theoretical estimates and from results obtained so far, that (i) doing the expansion and the testing both by a brute force approach is not feasible; (ii) even greatly speeding up the testing part is not adequate to dealing with fairly interesting cases because often we have to generate a large number of Boolean conditions. Hence, a central theoretical problem is to find ways of selecting only useful terms from each sequence of Boolean conditions. This problem has been explored in a preliminary manner in [22] and [23]. One element is to develop decision procedures for subdomains of the predicate calculus.

12

H A 0 WANG

Another element is to use miniscope forms instead of prenex forms. A third element is to develop semidecision procedures whose range of application we do not know exactly in advance ([23], p. 30). The decision procedures appear not to include the formulas which are of the most interest to us. More specifically, the decision procedures mostly deal with formulas in the prenex form, and when we derive a theorem from a few axioms, even though the theorem and the axioms are separately of simple forms, putting the implication (of the theorem by the axioms) in a prenex form quickly gets us outside the decidable subdomains. This suggests that we should try to extend the decision procedures to truth functions of formulas in the prenex form. Property C in Herbrand’s dissertation [l 11 (see below) seems relevant to this question. The semidecision procedure of [23] is not developed far enough in that the conditions under which we are to terminate the procedure are not specified explicitly. For example, if we encounter a periodic situation (a torus), we can naturally stop; but since the initial columns occupy a special place, we permit also cases while the initial columns and the others have two periods which can be fitted together. Closer examination is necessary in order to lay down broader stopping conditions. The miniscope form defined in [22] is different from the one developed in Herbrand’s dissertation because it permits the breaking up of a quantifier into several. While this permits more extensive reductions, it makes an elegant general treatment difficult. Hence, it seems desirable to return to Herbrand’s treatment which is again connected intimately with his Property C and Property B. Both for these reasons and for the additional reason that Herbrand’s dissertation contains a wealth of relevant material which has been largely overlooked hitherto in the literature, we shall reproduce here in part lecture notes given at Oxford in the Michaelmas term of 1960 on Herbrand’s dissertation, especially on the Properties B and C. His Property A also appears interesting and has been revived in Ackermann’s book ([l], p. 93), but will not be discussed here because we do not understand fully its implications for mechanization. 6. HERBRAND’S DISSERTATION

1,

6.1. Herbrand’s System H. The primitive logical constants are V, (+v) (or Vv), (-v) (or 3v),with 2 , A , = defined in the usual manner. To avoid confusion, we shall use p,q,r,...,Fx,Gxy ,... as atomic

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS

13

formulas and X,Yx, ... as arbitrary formulas which may or may not be atomic. By a “tautology” we shall mean a formula that is always true according to the customary interpretations of truth-functional (Boolean) connectives, abstracting from an analysis of parts which contain quantifiers. The system H contains six rules ([ll], pp. 31-32). RT. Rule of tautology. Every quantifier-free tautology is a theorem. (For example, p 1 p , although not VxFx 1VxFx, falls under this.) RI.

Rules of inversion. Given a theorem X of H , we get another theorem of H if we replace within X a part which is of one of the following forms by its dual:

17 -I(*V)YV (&v)(Yv v 2 )

Y (TV)lYV (fv)Yv v

2 not containing v .

RU. Rule of universal generalization. Xxx +

z

+yXyy (“+”

for infer).

RE. Rule of existential generalization. Xxx + -yXxy. RC. Rule of contraction. X V X + X .

RD. Rule of detachment (cut, modus ponens). X , X 2 Y + Y. The difference between RU and RE can be brought out by: x=x +y(y=y) x = x --f - y ( x = y ) x = x 7+ + y ( x = y ) . --f

The first important result is a direct proof of the following ([ll], p. 36). 6.2. THEOREM 1. Every tautology is a theorem of H; in other words, if we substitute quantifier expressions for parts in RT, we again get theorems of H . 6.2.1. X V

... V

X-+ X

6.3. Positive and Negative Parts. It is familiar that every formula can be brought into a prenex normal form with a matrix in the conjunctive (or disjunctive) normal form: ( f v 1 ) . ..(& vn)Xv1..

.vn

such that X is in, say, a conjunctive normal form.

14

HA0 WANG

+

If we wish to determine whether a quantifier turns into or -, or whether an atomic proposition (an occurrence of it) gets negated or not in such a normal form, we do not have to carry out the transformation but may “calculate” directly by using the notion of positive and negative parts. 6.3.1. Signs of occurrences of propositional parts ([ 111, p. 21 and p. 35). (a) The sign of the occurrence of X in X is (b) The sign changes from Y to 1 Y ; i.e., if an occurrence of 1 Y in X has one sign, the same occurrence of Y in X has the other sign. (c) The sign does not change from X V Y to X or Y. (d) The sign does not change from (& v)Xv to Xv.

+.

6.3.2. A positive occurrence of form; a negative occurrence of

+ v or -v remains + v or -v in a prenex + v or -v becomes -v or + v.

6.3.3. When a formula X without quantifiers is transformed into a conjunctive normal form Y, the sign of each occurrence of each atomic formula is preserved; in particular, a negative or a positive occurrence of, e.g., a letter p turns respectively into one or more occurrences of p preceded b y 1 or not. 6.3.4. If p has only positive occurrences in X@), then

k H@

4)

(X(P)

X(q));

if p has only negative occurrences in X@), then

k H@

4)

(X(q)

X@)).

Proof by induction on the number of logical constants in X . ([ 111, p. 36.) 6.3.5. General and restricted variables. A quantified variable is general if it is and begins a positive part, or - and begins a negative part; in the other two cases it is called a restricted variable. ([ 1I], p. 35.)

+

6.3.6. Miniscope form. A formula is in the miniscope form if the quantifiers cannot be driven inwards any further by the rules of inversion RI. Each formula has a unique miniscope form.

6.4. Champs (sections, cycles). In a given formula, we may replace each general variable v by an indexing function (a Skolem function, an Herbrand function) with the restricted variables governing Y in the formula as arguments. Since ordinary functions (the descriptive functions) add no

15

MECHANICAL MATHEMATICS A N D INFERENTIAL ANALYSIS

basic complications, we shall exclude them. Functions for ungoverned general variables are (indexing) constants, they are always contained in CZas defined below. For an arbitrary set S of indexing functions, we can define the associated champs as follows. The champ of order 1, CI, contains only one fixed object al, which may be taken as the number 1. Given the champs CI,.. .,c k , c k + l consists of all and only the indexing constants and the values of the indexing functions in Swith arguments drawn from CI, ...,ck. We shall assume that the values of different functional expressions are always different. Thus, given a set of indexing functions, we can always determine the number nK of the members of the union of CI, .. ,c k .

.

7. PROPERTY B AND PROPERTY C Given an arbitrary formula, we replace each general variable by a function of all the restricted variables which govern it. Then we can define the champs and a function nk which gives the number of numbers occurring in C1,...,ck.

7.1. The reduced form of order k of a formula X. Let N = nk. (1) An atomic formula is its own reduced form. (2) If the reduced forms of Y and 2 are Y* and Z*, those o f l Y , Y V 2 a r e l Y * , Y* v Z*. (3) If + x or -x is a general variable and the reduced form of Yx is Y* x, that of xYx or -xYx is Y* x(y1,. ..,ym),where y l , ...,y , are the restricted variables which govern x. (4) If -x is restricted, the reduced form of -xYx is:

+

Y*l

If

v ... A

Y*N.

... A

Y*N.

+ x is restricted, that of + xYx is: Y*l A

7.2. A proposition X has Property C of order k if its reduced form of order k is a tautology. It has Property B of order k if its miniscope form has Property C of order k. A very important theorem in Herbrand’s dissertation ([ 1l],pp. 101-105) is :

THEOREM 2. Ifaproposition has Property C (or B) of order k, then every proposition derivable from it by the rules of inversion RI has Property C (or B) of order k.

16

H A 0 WANG

The first rule for negation exchanging Z a n d l l Z obviouslymakes no difference. The rules of exchanging (kv ) l Z v and l ( r v ) Z v , (*v) (Yv v Z ) and (& v) Yv V Z do not affect the reduced forms when (kv) is a general variable, since a general variable remains general by the transformation. When (& v) is a restricted variable, the rules of negation do not affect Property C because of the definition of A in terms of V , from which we have : ( 1 Y l A ... A l Y N ) r l ( Y l V ... V Y N ) ( T Y l V ... V l Y N ) = l ( Y 1 A ... A Y N ) . The complex cases are with the rules of disjunction when (&v) is a restricted variable. Case (a). The exchange of ( - v ) Yv v 2 and ( - v ) (Yv v Z ) . Suppose U and V are the same except that an occurrence of ( - v ) Yv V Z in U is replaced by (- v) (Yv V Z ) in V. Let U* and V* be the reduced forms of U and V of order k. We wish to show that U* is a tautology if and only if V* is. The difference between lJ* and V* is that, for every general variable y in Z , we use y(x1, ...,x I ) to get U*, y(x1, ...,xn,v) to get V*. The number n k in the two cases are, say, NI and N,, NI < Nz. (al). If V* is a tautology, then U* is one. If V* is a tautology, then, in particular, if y(x1, ...,x n , l ) ,...,y(x1,...,x,,Nz) are all identified, the result is again a tautology, since we are thereby merely restricting the choice of truth values of certain atomic propositions. Hence, if we delete repetitions, we can derive U* from V*. Hence, U* is also a tautology. (a2). If some assignment falsifies V*, then there is also some assignment which falsifies U*. We choose for each falsifying assignment of V* a falsifying assignment of a suitably chosen U** which can be shown to be implied by U*. Since X I , . .., X n are the (only) free variables in (- v) Yv V Z and (-v)(Yv V Z ) , the two parts may multiply their occurrences in U* and V* according to the values given to X I , . . ., x n from { 1 , . ., N I } and { 1 , . ..,N z } respectively. Now we define U** from U* by choosing one number i from { 1 , . ,N z } for each fixed set of values of X I , . .., X I from { 1,. ..,Nz), and replacingy(x1,...,xn) in U* by y(x1,. ..,xn,il.It is essential that U ** is modified to be over { 1,. .,N z } rather than { 1 , . ..,N i } . First, we make the choice of i for U** for a fixed falsifying assignment

.

..

.

MECHANICAL MATHEMATICS AND INFERENTIAL ANALYSIS

T of V* and a fixed choice of (XI,. sponding parts in U** and V * are: Y*l V ( Y * l v Z*1)

17

..,xn) from { 1 ,...,N2}. The corre-

... V Y*N2 V Z*i v ... v ( P N 2 v Z*N2).

(1) (2)

If in the assignment T, (2) gets the value true, then either Y * j is true for some j , and we can take any number, say 1 as i, or else, Z*j is true for some j , and we choose the smallest such j to be i. If (2) gets the value false, then i can be any number, say 1 . It is clear that ( 1 ) and (2) get the same truth value by the choice, and we can similarly choose an i for each set of values X I , . .., x n from { 1 , . ..,Nz}.In this way, it follows that the assignment T falsifying V* also falsifies U** which is like V* except for containing parts like ( 1 ) in place of parts like (2). Now we have to show that U* implies U**. Just the replacement of y(x1,. ..,x,) by y(x1,...,xn,i) makes no difference since we merely give the former a new name. But the fact that U* is relative to { 1 ,...,N1}, but U** is relative to { 1 ,...,Nz}, N1< N2, means there are more clauses in U** than in U*. If we look at (4) of 7.1, we see that a positive occurrence of ( - x ) Wx is replaced by a disjunction, a negative occurrenceof (+x ) Wx is replaced by a conjunction. Hence, using 6.3.4, we can get U* 3 U** from : (W1 V ... V WNi) 3 (W1 V ... V WN2) (W1 A ... A WN2) 2 (W1 A ... A WNi). Therefore, a falsifying assignment of V* yields one for U*, i.e., V* is a tautology if U* is. By (al) and (a2), we have proved Theorem 2 for Case (a). Case (b). The exchange of (+v)Yv v 2 and (+ v)(Yv V Z). The proof is similar to Case (a) except that in choosing i for U**, we use : (Y*l A ... A Y*N2) V Z*i (I*> ( Y * l V Z l ) A ... A (Y*N2 V Z*N2). (2*> If (2*) gets true in the assignment T, then take any number, say 1 , as i . If (2*) gets false, then ( Y * j v Zj) must be false for somej, take the smallest such j as i. This completes the proof of Theorem 2. It is clear that, from this theorem, we can use a prenex form or the miniscope form and retain the same order k of Property C(or Property B).

18

HA0 WANG

8. HERBRAND’S THEOREM The fundamental theorem proved by Herbrand ([ 111, pp. 112-1 13) is somewhat different from what is commonly known as Herbrand’s Theorem : HERBRAND’S FUNDAMENTAL THEDREM HX;one can effectively find (i) If X has Property B of order k , then the proof of X from the number k . (ii) Given a proof in H of a proposition X, we can effectively jind a number k such that X has Property B of order k . By Theorem 2, if X has Property B of order k, a prenex form of X has Property B of order k and can be proved in H with the help of 6.2.1, in a manner which is familiar nowadays. Hence, by RI, we get a proof of X in H . And (i) is proved. To prove (ii), we make induction on the number of steps in the proof. An axiom must be a case of RT and has Property B or C of order 1. By Theorem 2, RI does not affect the order of Property B or C . RU does not change the reduced form. If Xxx has Property C of order k with nr = N1, then (-y)Xxy has Property C of order k or k 1. We may assume Xxx in the prenex form (by Theorem 2), and then the reduced form of (-y)Xxy of order k 1 must be a disjunction X*jl V . V X*jNz which includes all the disjuncts of the reduced form of Xxx of order k , since N1< Nz.For example, (-z)(Gzx V 1 G v x ) is of order 1 since its reduced form G12 V 7 G 1 2 is a tautology; (-y)(-z)(Gzx V 1 G v y ) is of order 2 since its reduced form (G12 V 1 G l l ) V (G22 V l G 1 1 ) V (G12 V 7G12) v (G22 V 7G12) is a tautology and y does take the fixed value 2 of x . Hence, RE preserves Property B or C with the possible increase of the order by 1 . RC does not change the order of Property B because, given a falsifying assignment of the reduced form of X,we get one for that of X V X by the same assignment of truth values to the atomic formulas. RD preserves the order of Property B. First, if X and 2 have Property B of order k, then X A 2 has the same order. Thus, take the reduced form XI V V X j of X and Y1 v V Yt or Y. Then the reduced form of X A 2 clearly contains all disjuncts X, Yb, 1 I; a I; j , 1 Ib 5; t , and is therefore a tautology. Hence, if X and X =Y Y are of order k, so is also X A (X 2 Y).

+

+

..

...

...

MECHANICAL. MATHEMATICS AND INFERENTIAL ANALYSIS

19

Let X be ( f y l f ...f y,) My1 ...y ,xi...xn, and Y be ( f z i f ...f z g ) Nz1 ...zqxl...xn. To avoid conflicts of variables, we replace yi ,...,y, in X by u1, ...,up to get XI, and consider X A (Xi 3 Y). To get this into a prenex form, we can pair off ut with yr, one of which must be positive while the other is negative. We put them pairwise at the beginning, with the negative preceding the positive in eachcase. Let the negative one of the pair yt and ut be vt and the other be wi, then we have: (-v1+w1-

...- v p + w p & z 1 f . . . kzg) [ M y l . .. y p ~ 1 ... ~ A n MU^. . UpX1..

.

.Xn

3

N z ~...ZqX1.. .xn)].

Now we form a champ of order k for this formula, and identify suitable elements in it to get one for Y. Thus all elements wt+l(vl,...,vt), with arbitrary v1,. ..,v4, are identified with vt+l; all elements zt(vi,.. .,vp, zfl,. ..,z4,) with a fixed zt(u1,. ..,up,ztl,. ..,zt,). In this way, we get a champ for Y of order p since the only indexing functions are those for the negative quantifiers among z1,. ..,zq plus the indexing constants for the free variables xi,. ..,xn. By hypothesis, X A (X = Y) has Property B of order p and has, therefore, a disjunction: which is a tautology. After the identifications, we get a new tautology in which certain disjuncts are repeated and can be deleted. Suppose the formula is the result after the deletions, then we can derive by the propositional calculus: Y1 v ... v YN. But then this tautology is essentially the reduced form of order k of the formula Y. This completes the exposition of Herbrand’s fundamental theorem. Recently Peter Andrews and Burton Dreben discovered in Herbrand’s thesis (see their forthcoming paper “Some difticulties in Herbrand’s Theorem”) a subtle mistake which is preserved in the above exposition in the sketched proof of Case (b) on p. 17. We have to replace the two occurrences of “order k” in the statement of Theorem 2, on p. 15 above, by “some finite order.” The fundamental Theorem remains correct except that the detailed calculations of the order of Property B become more complex. Dreben is planning a thorough discussion of these questions. (October, 1962).

20

H A 0 WANG

REFERENCES ACKERMANN, W., Solvable Cases of the Decision Problem. Amsterdam, 1954. GOODSTEIN, R. L., Recursive Number Theory. Amsterdam, 1957. BTER, R., Rekursive Funktionen. 2nd edition, Budapest, 1957. QUINE,W. V., Mathematical Logic. Revised Edition, Cambridge, Mass.,1950. SURANYI,J., Reduktionstheorie des Entscheidungsproblems.Budapest, 1959. DAVIS,M and H. PUTNAM,“A Computing Procedure for Quantification Theory.” Journal ACM, Vol. 7 (1960), pp. 201-215. [7] DUNHAM, B., R. FRIDSHAL,G. L. SWARD,“A Nonheuristic Program for Proving Elementary Logical Theorems.” Proceedings Z.C.Z.F., Paris, 1959 (pub. 1960), p. 284. [8] -, J. H. NORTH,Exploratory Mathematics by Machine (to be published in a symposium volume at Perdue University). [9] GELERNTER, H., “Realization of a Geometry Theorem Proving Machine.” Proceedings Z.C.Z.F., Pans, 1959 (pub. 1960). [lo] GILMORE, P. C., “A Proof Method for Quantification Theory: Its Justification and Realization.” ZBM Journal, Vol. 4 (1960), pp. 28-35. [Ill HERBRAND, J., Recherches sur la ThPorie de la Dkmonstration. Warsaw, 1930. [I21 -, “Sur le Problkme Fondamental de la Logique Mathkmatique.” CR, Warsaw, No. 24 (1931). [13] HINTIKKA,K. J. J., “Vicious Circle Principle and the Paradoxes.” Journal of Symbolic Logic, Vol. 22 (1957), pp. 245-248. [14] MINSKY,M., “Steps Toward Artificial Intelligence.” Proceedings Z.R.E., Vol. 49 (1961), pp. 8-30. A., J. C. SHAW,H. A. SIMON,“Empirical Explorations of the Logical [15] NEWELL, Theory Machine: A Case Study in Heuristics,” Proceedings W.J.C.C., (19571, pp. 218-230. D., H. PRAWITZ,N. VOGHERA,“A Mechanical Proof Procedure and [16] PRAWITZ, its Realization in an Electronic Computer.” Journal ACM, Vol. 7 (1960), pp. 102-128. [17] -, “An Improved Proof Procedure.” Theoria, Vol. 26 (1960), pp. 102-139. [18] ROBINSON, A., “On the Mechanization of the Theory of Equations.” Bulletins of the Research Council of Israel, Vol. 9F, No. 2 (Nov. 1960), pp. 47-70. [19] SHEPHERDSON, J., The Principle of Induction in Free Variable Systems of Number Theory. (Lecture at the Polish Academy, Spring, 1961, to be published). [20] SKOLEM, Th., “Begriindung der elementaren Arithmetik.” Kristiania, 1923,38 pp. [21] WANG,H., “A Variant to Turing’s Theory of Computing Machines.” Journal ACM, Vol. 4 (1957), pp. 63-92. [22] -, “Toward Mechanical Mathematics,” ZBM Journal, Vol. 4 (1960), pp. 2-22. [23] -, “Proving Theorems by Pattern Recognition.” Part I, Communications ACM, Vol. 3 (1960), pp. 220-234; Part 11, Bell System Technical Journal, Vol. 40 (1961), pp. 1-41. [l] [2] [3] [4] [5] [6]