
Computability for the Mathematical Peter Hoffman This is mostly a leisurely treatment of a famous discovery : the“miracle” (as G¨odeltermed it) that the idea of mechanical process has an absolute meaning, a meaning independent of any other empirical law, or any system of logic. One main purpose here is to give mathematical ‘completeness’ to the material near the end of the elementary logic text [LM], the companion work to this one. That material relates to the incompletability of formal mathematics discovered by G¨odel. The theory of computable functions and algorithms is what we are referring to in the paragraph above. Pedagogically it seems to be a good idea to take some time over this theory, rather than rushing into ad hoc definitions to minimize the amount of trouble proving the basic results needed. Below we discuss the history to a tiny extent, give at least a few details on two of the original approaches from the 1930’s (and later, a lot of detail on the λ-calculus approach), and then adopt a kind of ‘Pascal-type software’ definition. The existence of such a definition is certainly well-known to the experts. However, no logic text I know of takes this approach. There are clearly disadvantages as well as advantages. But the fact that many students have done at least some programming in high- level command languages seems to make this an advantageous framework when teaching logic. To summarize quickly, a command language ATEN is inductively de- fined, whose atoms are assignment commands, and whose only command constructions are concatenation and ‘while-do’ commands. The semantics is very easy to define rigorously. Then one finds that ATEN computes precisely the (partial) recursive functions. It is edifying that the primitive recursive functions are computed by a sublanguage PTEN quickly described by restricting the ‘while-do’ commands in a rather simple manner. In fact we start with a slightly richer (syntactically only!) language BTEN, which includes ‘if-then-else’ commands, as well as a command construction which gives some of the flexibility of variable declarations. This is better for writing the needed algorithms in the proofs of the basic theorems of G¨odel,Church, and Tarski. But ATEN is of course just as strong semantically, and prefer- able in theoretical studies. My limited knowledge of history led me to think it appropriate to call this approach by the name “Babbage computability” (as opposed to “Turing computability”, etc.). Another motivation for this work is to produce a somewhat detailed account, tailored to the teaching of mathematics specialists, of this major advance in our understanding of the world. There are now several very nice texts for computer science students, for example, [DSW], [F], [J] and [Si]. In certain respects, these books are unsuitable for students not specializing in CS, despite their many virtues. 1 I owe a debt of gratitude to Phil Scott at University of Ottawa. Reacting to my query and an early version of this paper, amongst other helpful com- ments, he was able to point out the CS texts [J], [KMA] and [Som]. They use computer languages evidently equivalent to the formal language ATEN. To the extent given, details of their “Turing equivalence” are very differ- ent, these books being designed for CS students, as opposed to mathematics students. This work is written in a discursive style, at a level suitable for anyone who worked their way through [LM]. In particular, the more sophisticated specialists in pure mathematics will probably find it much too wordy, though they might discover one or two things of interest not dealt with in the more advanced treatises like [S] and [M]. The following quotation from [DSW], referring to ‘proofs’ of the equiv- alence of various definitions of computability, is advice which I hope to be seen to have followed : “. it should not be the reader’s responsibility . to fill in vaguely sketched arguments . it is our responsibility as authors to arrange matters so that the simulations can be exhibited simply, clearly and completely.” As mentioned above, in Section VII we give a fairly detailed discussion of the λ-calculus approach to computability. Then we proceed to material on λ-models. This includes a treatment of Dana Scott’s original approach, as well as some very nice theorems of Park and Wadsworth. The latter have not appeared with details elsewhere than in the original research articles, and should appeal quite strongly to most mathematicians. Section VIII is also a quite lengthy self-contained discussion, of the use of formal logic methods in verifying that a program ‘does what it’s supposed to do’. The buzzwords here are Floyd-Hoare logic and dynamic logic. Completely thorough treatments of soundness and relative completeness are given (ap- parently for the first time) for two proof systems. One is the original work where Stephen Cook discussed completeness for a language containing vari- able and procedure declarations with parameters. The other is a reduction to a deterministic language of an early part of Harel’s thesis work on dynamic logic. Each of these needed one crucial correction which came to light in the careful checking needed to verify soundness and completeness. 2 Table of Contents I. Introductory Remarks and informal deductions. II. Mathematical Definitions of Computability. III. Proof that Recursive implies Babbage Computable. IV. Proof that Babbage Computable implies Recursive; Kleene’s Computation Relation; the universal command, the halting problem and lots more. IV-1 The Big Picture. IV-2 Economizing the language BTEN. Appendix A : Nitty-gritty of Recursive Functions and Encoding. IV-3 Kleene’s computation relation is primitive recursive. IV-4 Primitive recursion in ATEN/BTEN. IV-5 Recursive Enumerability. IV-6 More Undecidability Results. IV-7 A Glimpse of Kleene’s Creation : Recursion Theory. IV-8 Universal Commands. IV-9 Fixed Point Equations—a.k.a. “Recursive Programs”. IV-10 Ackermann’s Function. IV-11 McSelfish Calculations. IV-12 Frivolity: Clever Electricians’ Devices. V. Proof of the “G¨odel Express” V-1 Representability and expressibility. V-2 Semi-decidability and semi-expressibility. V-3 The converse, and using the proof system as a ‘computer’. VI. The Algorithms for the G¨odel,Church and Tarski Proofs. VI-1 Being a proof number is recursive. VI-2 Dealing with rules of inference. VI-3 Dealing with the axioms. VI-4 The BTEN-Commands for the three big theorems. 3 VII. The λ-Calculus. VII-1 The Formal System Λ. VII-2 Examples and Calculations in Λ. VII-3 So—what’s going on? VII-4 Non-examples and non-calculability in Λ—undecidability. VII-5 Solving equations, and proving RC ⇐⇒ λ-definable. VII-6 Combinatorial Completeness and Invasion of the Combinators. VII-7 Models for λ-Calculus, and Denotational Semantics. VII-8 Scott’s Original Models. VII-9 Two (not entirely typical) Examples of Denotational Semantics. VIII. Floyd-Hoare Logic. VIII-1 Floyd-Hoare Logic for ATEN. VIII-2 Floyd-Hoare Logic for ATENL. VIII-3 F-H logic for more complicated (and realistic?) languages. VIII-4 The non-existence of a complete F-H proof system for the full languages ALGOL and Pascal. Addendum 1: Function Declarations and Ashcroft’s ‘Paradox’. Addendum 2: Propositional Connectives applied to F-H Statements, and Total Correctness. Addendum 3: F-H Proof Systems where Recursive Programming occurs. 4 We are interested in describing everything that any conceivable computer could possibly do. Interpreted literally, this sounds overly ambitious, to say the least! Listing all possible practical applications is not what is intended. We are thinking about the ‘innards’ of a computing machine, which you can imagine as a bunch of boxes (storage locations), each containing a natural number (or just a 0 or a 1 if preferred). What we want to study are all the possibilities for a ‘computation’ (which amounts to a finite sequence of changes, carried out by some mechanical process, to what is in these boxes). So the encoding, for a practical computer application, of the actual input into a configuration of box entries (and the decoding at the end into actual output) will be largely ignored here. As we shall see, this interpretation of the question “What is computable?” may, without loss of generality, be reduced to the more specific question : “Which functions of natural numbers, returning natural numbers, are to be regarded as being computable functions?” This question cannot be answered by giving a mathematical theorem and its proof. It is a question of giving a mathematical definition—but one which has involved considerable creativity and pregnancy, not having been at all easy or obvious for the pioneers in the foundations of mathematics who stuggled with the question for decades (or perhaps centuries) before its (apparently final) resolution in the 1930’s . A related question involves the human mind (whether or not regarded as identical with the brain). Is it to count (merely) as a “conceivable computer”? This will not be dwelt on here, but certainly has elicited considerable discus- sion, technical literature, and writing of popular books over the years. It’s the academic discipline known as thermostat.is.conscious.and.has.a.soul.ology. The first section below contains some general discussion to organize our ideas, before producing several mathematical definitions of computability in the second section and later. Then in sections III and IV we concen- trate on showing the equivalence of two of the definitions. The latter are used in V and VI to fill in the needed details in the proofs, as given in [LM], of G¨odel’s incompleteness theorem, and theorems of Church answering Hilbert’s “Entscheidungsproblem”, and of Tarski establishing the “undefin- ability of truth”.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages422 Page
-
File Size-