Logic and Logic Programming J.A
Total Page:16
File Type:pdf, Size:1020Kb
Logic Programming Logic and Logic Programming J.A. Robinson ogic has been around for a all mathematical concepts and for ery of the logical and set-theoretic very long time [23]. It was the formulation of exact deductive paradoxes (such as Bertrand Rus- already an old subject 23 reasoning about them. It seems to sell's set of all sets which are not centuries ago, in Aristotle's be so. The principal feature of the members of themselves, which day (384-322 BC). While predicate calculus is that it offers a therefore by definition both is, and Aristotle was not its origina- precise characterization of the con- also is not, a member of itself); and Ltor, despite a widespread impres- cept of proof. Its proofs, as well as its the huge reductionist work Prin- sion to the contrary, he was cer- sentences and its other formal ex- cipia Mathematica by Bertrand Rus- tainly its first important figure. He pressions, are mathematically de- sell and Alfred North Whitehead. placed logic on sound systematic fined objects which are intended All of these developments had ei- foundations, and it was a major not only to express ideas meaning- ther shown what could be done, or course of study in his own univer- fully--that is, to be used as one uses had revealed what needed to be sity in Athens. His lecture notes on a language--but also to be the sub- done, with the help of this new logic can still be read today. No ject matter of mathematical analy- logic. But it was necessary first for doubt he taught logic to the future sis. They are also capable of being mathematicians to master its tech- Alexander the Great when he manipulated as the data objects of niques and to explore its scope and served for a time as the young construction and recognition algo- its limits. prince's personal tutor. In Alexan- rithms. Significant early steps toward dria a generation later (about 300 At the end of the nineteenth cen- this end were taken by Leopold B.C.), Euclid played a similar role tury, mathematics had reached a Lowenheim (1915), [29] and in systematizing and teaching the stage in which it was more than Thoralf Skolem [45], who studied geometry and number theory of ready to exploit Frege's powerful the symbolic "satisfiability" of for- that era. Both Aristotle's logic and new instrument. Mathematicians mal expressions. They showed that Euclid's geometry have endured were opening up new areas of re- sets of abstract logical conditions and prospered. In some high search that demanded much could be proved consistent by being schools and colleges, both are still deeper logical understanding and given specific interpretations con- taught in a form similar to their far more careful handling of structed from the very symbolic original one. The old logic, how- proofs, than had previously been expressions in which they are for- ever, like the old geometry, has by required. Some of these were David mulated. Their work opened the now evolved into a much more gen- Hiibert's abstract axiomatic recast- way for Kurt G6del (1930, [17]) and eral and powerful form. ing of geometry and Giuseppe Jacques Herbrand (1930, [19]) to Modern ('symbolic' or 'mathe- Peano's of arithmetic, as well as prove, in their doctoral disserta- matical') logic dates back to 1879, Georg Cantor's intuitive explora- tions, the first versions of what is when Frege published the first ver- tions of general set theory, espe- now called the completeness of the sion of what today is known as the cially his elaboration of the dazzling predicate calculus. G6del and predicate calculus [14]. This system theory of transfinite ordinal and Herbrand both demonstrated that provides a rich and comprehensive cardinal numbers. Others were the proof machinery of the predi- notation, which Frege intended to Ernst Zermelo's axiomatic analysis cate calculus can provide a formal be adequate for the expression of of set theory following the discov- proof for every logically true prop- COMMUNICATIONS OF THE ACM/March 1992/Vol.35, No.3 41 Logic Programming osition, and indeed they each gave property of the predicate calculus. time British code-breaking project a constructive method for finding There had until then been an in- included his participation in the the proof, given the proposition. tense search for a positive solution actual design, construction and G6del's more famous achievement, to what Hilbert called the decision operation of several electronic ma- his discovery in 1931 of the amaz- problem--the problem to devise an chines of this kind, and thus he ing 'incompleteness theorems' algorithm for the predicate calculus must surely be reckoned as one of about formalizations of arithmetic, which would correctly determine, the major pioneers in their early has tended to overshadow this im- for any formal sentence B and any development. portant earlier work of his, which is set A of formal sentences, whether a result about pure logic, whereas or not B is a logical consequence of Logic on the Computer his incompleteness results are about A. Church and Turing found that Apart from this enormously impor- certain applied logics (formal axio- despite the existence of the proof tant cryptographic intelligence matic theories of elementary num- procedure, which correctly recog- work and its crucial role in ballistic ber theory, and similar systems) nizes (by constructing a proof of B computations and nuclear physics and do not directly concern us from A) all cases where B is in fact a simulations, the war-time develop- here. logical consequence of A, there is ment of electronic digital comput- The completeness of the predi- not and cannot be an algorithm ing technology had relatively little cate calculus links the syntactic which can similarly correctly recog- impact on the outcome of the war property of formal provability with nize all cases in which B is not a logi- itself. After the war, however, its the conceptually quite different cal consequence of A. Their discov- rapid commercial and scientific semantic property of logical truth. ery bears directly on all attempts to exploitation quickly launched the It assures us that each property be- write theorem-proving software. It current computer era. By 1950, longs to exactly the same sentences. means that it is pointless to try to much-improved versions of some Formal syntax and formal seman- program a computer to answer 'yes' of the war-time general-purpose tics are both needed, but for a time or 'no' correctly to every question of electronic digital computers be- the spotlight was on formal syntax, the form 'is this a logically true sen- came available to industry, univer- and formal semantics had to wait tence?' The most that can be done is sities and research centers. By the until Alfred Tarski (1934, [46]) in- to identify useful subclasses of sen- mid-1950s it had become apparent troduced the first rigorous semanti- tences for which a decision proce- to many logicians that, at last, suffi- cal theory for the predicate calcu- dure can be found. Many such sub- cient computing power was now at lus, by precisely defining satisfi- classes are known. They are called hand to support computational ability, truth (in a given 'solvable subcases of the decision experiments with the predicate cal- interpretation), logical consequence, problem', but as far as I know none culus proof procedure. It was just a and other related notions. Once it of them have turned out to be of matter of programming it and try- was filled out by the concepts of much practical interest. ing it on some real examples. Sev- Tarski's semantics, the theory of the When World War II began in eral papers describing projects for predicate calculus was no longer 1939 all the basic theoretical foun- doing this were given at a Summer unbalanced. Shortly afterward Ger- dations of today's computational School in Logic held at Cornell hard Gentzen (1936, [15]) further logic were in place. What was still University in 1957. One of these sharpened the syntactical results on lacking was any practical way of ac- [37, pp. 74-76] was by Abraham provability by showing that if a sen- tually carrying out the vast symbolic Robinson, the logician who later tence can be proved at all, then it computations called for by the surprised the mathematical estab- can be proved in a 'direct' way, proof procedure. Only the very lishment by applying logical 'non- without the need to introduce any simplest of examples could be done standard' model theory to legiti- extraneous 'clever' concepts; those by hand. Already there were those, mize infinitesimals in the occurring already in the sentence however--Turing himself for one-- foundations of the integral and dif- itself are always sufficient. who were making plans which ferential calculus. Other published All of these positive discoveries would eventually fill this gap. Tur- accounts of results in the first wave of the 1920s and 1930s laid the ing's method in negatively solving of such experiments were [12, 16, foundations on which today's pred- the decision problem had been to 35, 49]. There had also been, in icate calculus theorem-proving pro- design a highly theoretical, abstract 1956, a strange experiment by [33] grams, and thus logic program- version of the modern stored- which attracted a lot of attention at ming have been built. program, general-purpose univer- the time. It has since been cited as a Not all the great logical discover- sal digital computer (the 'universal milestone of the early stages of arti- ies of this period were positive.