CDM Primitive Recursion 2 Properties of PR

Total Page:16

File Type:pdf, Size:1020Kb

CDM Primitive Recursion 2 Properties of PR 1 Primitive Recursive Functions CDM Primitive Recursion 2 Properties of PR 3 Coding Klaus Sutner 4 *Digression: G¨odel’s β Function Carnegie Mellon University Spring 2021 Computability, Definition 2 Knee-Jerk Reaction 3 Computable means: can be done, in principle, by a standard We need a formal definition of computability that digital computer. is easy to understand and apply, and This sounds good to anyone who has ever written and executed a matches our intuitive notion of computability. program; sadly, there are lots of problems with this approach. First, the hedge “in principle” means you really have to abstract away There are many plausible approaches, we’ll start with a model for from a concrete physical device (time, space, mass, energy, . ). arithmetic functions that dates back to the 19th century and is quite straightforward. Additionally, it is more palatable that machine models to Then there is the question which operating system, which programming those used to program. language, which compiler? These typically have no clear semantics, so what exactly are we defining? But Why? 4 Math versus CS 5 Aka computability versus algorithms. Can’t we get away with an informal, wishy-washy definition? Implementation details are usually of little interest in mathematics, it only matters whether a function is computable or not. Computability is a Yes and No, but mostly: No. central foundational issue, but does not require detailed analysis. Informal is typically good enough for positive results: such-and-such CS is a bit different here, computability alone is typically of interest only thing is computable. as a very first step (e.g., when one establishes the decidability of some problem), to be followed by a careful effort to streamline the But for negative results we need real foundations: such-and-such problem computations (so as to keep resource bounds low). fails to be computable, or fails to be computable given particular resources (complexity theory). As we now understand, the latter type of question can be breathtakingly difficult. This second step leads into the realm of algorithms, which should not be confused with computable functions. Arguably, the concept of algorithm is much more complicated and currently only ill-defined notion. We’ll focus on computability. Computable Arithmetic Functions 6 Primitive Recursion 7 The main idea behind our first model is quite straightforward for anyone who has every used a modern programming language: we will define a For the time being we consider only one data type: the natural numbers function f : N Nn N by N. The corresponding functions are called arithmetic functions or number × → theoretic functions: Some examples are familiar to any kindergartener: addition, multiplication, squaring, roots, exponentiation and so on. defining f(0, y) explicitly, and n f : N N → defining f(x + 1, y) in terms of f(x, y). We introduce a model of computation that is designed to work particularly well with these, no input/output coding is required. This should produce computable functions: we can either compute f(n, y), f(n 1, y), f(n 2, y) . top-down (slightly complicated, − − requires a recursion stack), or we can compute bottom-up f(0, y), For the time being, all our functions will be total. f(1, y), f(2, y) . This requires no more than a loop. Later we will see more complicated forms of recursion. Details: Primitive Recursive Functions 8 Composition 9 m n Given functions gi : N N for i = 1, . , n , h : N N , we define a → → new function f : Nm N by composition as follows: → Interestingly, G¨odel encountered the problem of defining computable f(x) = h(g1(x), . , gn(x)) functions working on his seminal incompleteness theorem. He introduced a class of “very simple,” easily describable functions, that are now called primitive recursive functions. Notation: we write Comp[h, g , . , g ] or simply h (g , . , g ) inspired 1 n ◦ 1 n by the the well-known special case m = 1: Recursion is the key idea, but we need a few more ingredients such as composition and projections. (h g)(x) = h(g(x)). ◦ It will always be crystal clear that our functions are intuitively computable. It is clear that computability is closed wrto composition: output can be re-used as input. Digression: Arity 10 Bureaucracy: Projections 11 Unfortunately, composition by itself is not quite enough. When dealing with functions or relations, it is sometimes convenient to be able to express the arity as part of the notation used. Suppose we have a binary version add of addition, and want to define a ternary version. No problem: n (3) (2) (2) We will use a superscript ( ) for this purpose: add (x, y, z) = add (x, add (y, z)) f (n) n a function of arity But, this is not allowed according to our definition of composition; just try. We need a simple auxiliary tool, so-called projections: (n) In particular write ca for the n-ary constant map x a. 7→ n n n P : P (x , . , xn) = xi (0) i N N i 1 We will call ca a hard constant. → where 1 i n for the projections. ≤ ≤ Describing Functions 12 Clones 13 A clone or function algebra is a collection of arithmetic functions that contains all projections and is closed under composition. Now we can write (3) (2) 3 (2) 3 3 More generally, for any set A, define the collection of all finitary add = add (P1 , add (P2 ,P3 )) ◦ ◦ functions over A as F = (An A) A → n 0 [≥ Note that no variables are needed in this notation system. Definition In general, we will prefer the informal notation, but you should know how A clone (over A) is a subset FA that contains all projections and is C ⊆ to use projections to write formally correct terms. closed under composition. For example, all projections form a clone, as do all arithmetic functions. Nullary Functions 14 Nullary Composition 15 Note that we allow hard constants, null-ary functions in A0 A. → m m Recall composition: f (n), g( ), i [n], produces f (g , . , g ) F( ) i ∈ ◦ 1 n ∈ A We will write f() or f( ) when we evaluate such functions. where n, m 0. ∗ ≥ In the literature, you will also find clones without null-ary functions It is worthwhile to consider the special case where f or the gi are nullary. F(+) = (An A) Case: n = 0 C ⊆ A → n>0 (m) [ Then for m 1 we have cf( ) . ≥ ∗ ∈ C Case: m = 0 This is mostly a technical detail, but one should be aware of the issue. (0) Then for n 1 we have ca where a = f(g ( ), . , g ( )). ≥ ∈ C 1 ∗ n ∗ Actually, this is exactly the kind of pesky detail that makes programming quite so difficult. Generating Clones 16 Rectypes 17 To get something more interesting, we need to consider clones that are generated by This is a perfect example of a recursive data type (rectype), one of the fundamental concepts in TCS. We have certain basic functions , and/or F closed under additional operations Op. a collection of atoms (indecomposable items), and a collection of constructors that can be applied to build more We write complicated, decomposable objects. clone( ; Op) F for the least clone containing and closed under Op. Because of this inductive structure we can perform inductive arguments, F both to establish properties and to define operations. For example, clone(; ) consists just of all projections. Basic Arithmetic Functions 18 Closure Operations: Primitive Recursion 19 When dealing with natural numbers, it is natural (duh) to have Given h : Nn+2 N and g : Nn N we define a new function → → f : Nn+1 N by → Constant zero 0 f(0, y) = g(y) Successor function S : N N , S(x) = x + 1 → f(x + 1, y) = h(x, f(x, y), y) (0) Here constant 0 is meant to be the hard constant c0 (but recall the Write Prec[h, g] for this function. comment on nullary composition from above). This is a rather spartan set of built-in functions, but as we will see it’s all we need. Needless to say, these functions are trivially computable. Definition A function is primitive recursive (p.r.) if it lies in the clone generated by In fact, it is hard to give a reasonable description of the natural numbers zero, successor; and closed under primitive recursion: clone(0,S; Prec). without them (unless you are a set theorist). Two Views 20 Example: Factorials 21 The standard definition of the factorial function uses recursion like so: f(0) = 1 f(x + 1) = (x + 1) f(x) bureaucracy basic operator · To write the factorial function in the form f = Prec[h, g] we need atom projections zero, successor - g : N0 N, g() = 1 → constructors composition - prim. rec. 2 h : N N, h(u, v) = (u + 1) v → · g is none other than S 0 and h is multiplication combined with the ◦ successor function: f = Prec[mult (S P 2,P 2),S 0] ◦ ◦ 1 2 ◦ Digging Down 22 And Addition? 23 We have used addition, which can in turn be defined by yet another To get multiplication we use another recursion: recursion. mult(0, y) = 0 add(0, y) = y mult(x + 1, y) = add(mult(x, y), y) add(x + 1, y) = S(add(x, y)) (1) Note that the 0 here technically stands for the unary version c0 to We write x and y for simplicity, we really should use projections. conform with the specs for primitive recursion. Since S is a basic function, we now have a complete, inductive proof that (n) This is not an issue, since we know that our clone contains all ca , n 0.
Recommended publications
  • “The Church-Turing “Thesis” As a Special Corollary of Gödel's
    “The Church-Turing “Thesis” as a Special Corollary of Gödel’s Completeness Theorem,” in Computability: Turing, Gödel, Church, and Beyond, B. J. Copeland, C. Posy, and O. Shagrir (eds.), MIT Press (Cambridge), 2013, pp. 77-104. Saul A. Kripke This is the published version of the book chapter indicated above, which can be obtained from the publisher at https://mitpress.mit.edu/books/computability. It is reproduced here by permission of the publisher who holds the copyright. © The MIT Press The Church-Turing “ Thesis ” as a Special Corollary of G ö del ’ s 4 Completeness Theorem 1 Saul A. Kripke Traditionally, many writers, following Kleene (1952) , thought of the Church-Turing thesis as unprovable by its nature but having various strong arguments in its favor, including Turing ’ s analysis of human computation. More recently, the beauty, power, and obvious fundamental importance of this analysis — what Turing (1936) calls “ argument I ” — has led some writers to give an almost exclusive emphasis on this argument as the unique justification for the Church-Turing thesis. In this chapter I advocate an alternative justification, essentially presupposed by Turing himself in what he calls “ argument II. ” The idea is that computation is a special form of math- ematical deduction. Assuming the steps of the deduction can be stated in a first- order language, the Church-Turing thesis follows as a special case of G ö del ’ s completeness theorem (first-order algorithm theorem). I propose this idea as an alternative foundation for the Church-Turing thesis, both for human and machine computation. Clearly the relevant assumptions are justified for computations pres- ently known.
    [Show full text]
  • Church's Thesis and the Conceptual Analysis of Computability
    Church’s Thesis and the Conceptual Analysis of Computability Michael Rescorla Abstract: Church’s thesis asserts that a number-theoretic function is intuitively computable if and only if it is recursive. A related thesis asserts that Turing’s work yields a conceptual analysis of the intuitive notion of numerical computability. I endorse Church’s thesis, but I argue against the related thesis. I argue that purported conceptual analyses based upon Turing’s work involve a subtle but persistent circularity. Turing machines manipulate syntactic entities. To specify which number-theoretic function a Turing machine computes, we must correlate these syntactic entities with numbers. I argue that, in providing this correlation, we must demand that the correlation itself be computable. Otherwise, the Turing machine will compute uncomputable functions. But if we presuppose the intuitive notion of a computable relation between syntactic entities and numbers, then our analysis of computability is circular.1 §1. Turing machines and number-theoretic functions A Turing machine manipulates syntactic entities: strings consisting of strokes and blanks. I restrict attention to Turing machines that possess two key properties. First, the machine eventually halts when supplied with an input of finitely many adjacent strokes. Second, when the 1 I am greatly indebted to helpful feedback from two anonymous referees from this journal, as well as from: C. Anthony Anderson, Adam Elga, Kevin Falvey, Warren Goldfarb, Richard Heck, Peter Koellner, Oystein Linnebo, Charles Parsons, Gualtiero Piccinini, and Stewart Shapiro. I received extremely helpful comments when I presented earlier versions of this paper at the UCLA Philosophy of Mathematics Workshop, especially from Joseph Almog, D.
    [Show full text]
  • Enumerations of the Kolmogorov Function
    Enumerations of the Kolmogorov Function Richard Beigela Harry Buhrmanb Peter Fejerc Lance Fortnowd Piotr Grabowskie Luc Longpr´ef Andrej Muchnikg Frank Stephanh Leen Torenvlieti Abstract A recursive enumerator for a function h is an algorithm f which enu- merates for an input x finitely many elements including h(x). f is a aEmail: [email protected]. Department of Computer and Information Sciences, Temple University, 1805 North Broad Street, Philadelphia PA 19122, USA. Research per- formed in part at NEC and the Institute for Advanced Study. Supported in part by a State of New Jersey grant and by the National Science Foundation under grants CCR-0049019 and CCR-9877150. bEmail: [email protected]. CWI, Kruislaan 413, 1098SJ Amsterdam, The Netherlands. Partially supported by the EU through the 5th framework program FET. cEmail: [email protected]. Department of Computer Science, University of Mas- sachusetts Boston, Boston, MA 02125, USA. dEmail: [email protected]. Department of Computer Science, University of Chicago, 1100 East 58th Street, Chicago, IL 60637, USA. Research performed in part at NEC Research Institute. eEmail: [email protected]. Institut f¨ur Informatik, Im Neuenheimer Feld 294, 69120 Heidelberg, Germany. fEmail: [email protected]. Computer Science Department, UTEP, El Paso, TX 79968, USA. gEmail: [email protected]. Institute of New Techologies, Nizhnyaya Radi- shevskaya, 10, Moscow, 109004, Russia. The work was partially supported by Russian Foundation for Basic Research (grants N 04-01-00427, N 02-01-22001) and Council on Grants for Scientific Schools. hEmail: [email protected]. School of Computing and Department of Mathe- matics, National University of Singapore, 3 Science Drive 2, Singapore 117543, Republic of Singapore.
    [Show full text]
  • Theory of Computation
    A Universal Program (4) Theory of Computation Prof. Michael Mascagni Florida State University Department of Computer Science 1 / 33 Recursively Enumerable Sets (4.4) A Universal Program (4) The Parameter Theorem (4.5) Diagonalization, Reducibility, and Rice's Theorem (4.6, 4.7) Enumeration Theorem Definition. We write Wn = fx 2 N j Φ(x; n) #g: Then we have Theorem 4.6. A set B is r.e. if and only if there is an n for which B = Wn. Proof. This is simply by the definition ofΦ( x; n). 2 Note that W0; W1; W2;::: is an enumeration of all r.e. sets. 2 / 33 Recursively Enumerable Sets (4.4) A Universal Program (4) The Parameter Theorem (4.5) Diagonalization, Reducibility, and Rice's Theorem (4.6, 4.7) The Set K Let K = fn 2 N j n 2 Wng: Now n 2 K , Φ(n; n) #, HALT(n; n) This, K is the set of all numbers n such that program number n eventually halts on input n. 3 / 33 Recursively Enumerable Sets (4.4) A Universal Program (4) The Parameter Theorem (4.5) Diagonalization, Reducibility, and Rice's Theorem (4.6, 4.7) K Is r.e. but Not Recursive Theorem 4.7. K is r.e. but not recursive. Proof. By the universality theorem, Φ(n; n) is partially computable, hence K is r.e. If K¯ were also r.e., then by the enumeration theorem, K¯ = Wi for some i. We then arrive at i 2 K , i 2 Wi , i 2 K¯ which is a contradiction.
    [Show full text]
  • Upper and Lower Bounds on Continuous-Time Computation
    Upper and lower bounds on continuous-time computation Manuel Lameiras Campagnolo1 and Cristopher Moore2,3,4 1 D.M./I.S.A., Universidade T´ecnica de Lisboa, Tapada da Ajuda, 1349-017 Lisboa, Portugal [email protected] 2 Computer Science Department, University of New Mexico, Albuquerque NM 87131 [email protected] 3 Physics and Astronomy Department, University of New Mexico, Albuquerque NM 87131 4 Santa Fe Institute, 1399 Hyde Park Road, Santa Fe, New Mexico 87501 Abstract. We consider various extensions and modifications of Shannon’s General Purpose Analog Com- puter, which is a model of computation by differential equations in continuous time. We show that several classical computation classes have natural analog counterparts, including the primitive recursive functions, the elementary functions, the levels of the Grzegorczyk hierarchy, and the arithmetical and analytical hierarchies. Key words: Continuous-time computation, differential equations, recursion theory, dynamical systems, elementary func- tions, Grzegorczyk hierarchy, primitive recursive functions, computable functions, arithmetical and analytical hierarchies. 1 Introduction The theory of analog computation, where the internal states of a computer are continuous rather than discrete, has enjoyed a recent resurgence of interest. This stems partly from a wider program of exploring alternative approaches to computation, such as quantum and DNA computation; partly as an idealization of numerical algorithms where real numbers can be thought of as quantities in themselves, rather than as strings of digits; and partly from a desire to use the tools of computation theory to better classify the variety of continuous dynamical systems we see in the world (or at least in its classical idealization).
    [Show full text]
  • Hyperoperations and Nopt Structures
    Hyperoperations and Nopt Structures Alister Wilson Abstract (Beta version) The concept of formal power towers by analogy to formal power series is introduced. Bracketing patterns for combining hyperoperations are pictured. Nopt structures are introduced by reference to Nept structures. Briefly speaking, Nept structures are a notation that help picturing the seed(m)-Ackermann number sequence by reference to exponential function and multitudinous nestings thereof. A systematic structure is observed and described. Keywords: Large numbers, formal power towers, Nopt structures. 1 Contents i Acknowledgements 3 ii List of Figures and Tables 3 I Introduction 4 II Philosophical Considerations 5 III Bracketing patterns and hyperoperations 8 3.1 Some Examples 8 3.2 Top-down versus bottom-up 9 3.3 Bracketing patterns and binary operations 10 3.4 Bracketing patterns with exponentiation and tetration 12 3.5 Bracketing and 4 consecutive hyperoperations 15 3.6 A quick look at the start of the Grzegorczyk hierarchy 17 3.7 Reconsidering top-down and bottom-up 18 IV Nopt Structures 20 4.1 Introduction to Nept and Nopt structures 20 4.2 Defining Nopts from Nepts 21 4.3 Seed Values: “n” and “theta ) n” 24 4.4 A method for generating Nopt structures 25 4.5 Magnitude inequalities inside Nopt structures 32 V Applying Nopt Structures 33 5.1 The gi-sequence and g-subscript towers 33 5.2 Nopt structures and Conway chained arrows 35 VI Glossary 39 VII Further Reading and Weblinks 42 2 i Acknowledgements I’d like to express my gratitude to Wikipedia for supplying an enormous range of high quality mathematics articles.
    [Show full text]
  • The Interplay Between Computability and Incomputability Draft 619.Tex
    The Interplay Between Computability and Incomputability Draft 619.tex Robert I. Soare∗ January 7, 2008 Contents 1 Calculus, Continuity, and Computability 3 1.1 When to Introduce Relative Computability? . 4 1.2 Between Computability and Relative Computability? . 5 1.3 The Development of Relative Computability . 5 1.4 Turing Introduces Relative Computability . 6 1.5 Post Develops Relative Computability . 6 1.6 Relative Computability in Real World Computing . 6 2 Origins of Computability and Incomputability 6 2.1 G¨odel’s Incompleteness Theorem . 8 2.2 Incomputability and Undecidability . 9 2.3 Alonzo Church . 9 2.4 Herbrand-G¨odel Recursive Functions . 10 2.5 Stalemate at Princeton Over Church’s Thesis . 11 2.6 G¨odel’s Thoughts on Church’s Thesis . 11 ∗Parts of this paper were delivered in an address to the conference, Computation and Logic in the Real World, at Siena, Italy, June 18–23, 2007. Keywords: Turing ma- chine, automatic machine, a-machine, Turing oracle machine, o-machine, Alonzo Church, Stephen C. Kleene,klee Alan Turing, Kurt G¨odel, Emil Post, computability, incomputabil- ity, undecidability, Church-Turing Thesis (CTT), Post-Church Second Thesis on relative computability, computable approximations, Limit Lemma, effectively continuous func- tions, computability in analysis, strong reducibilities. 1 3 Turing Breaks the Stalemate 12 3.1 Turing’s Machines and Turing’s Thesis . 12 3.2 G¨odel’s Opinion of Turing’s Work . 13 3.3 Kleene Said About Turing . 14 3.4 Church Said About Turing . 15 3.5 Naming the Church-Turing Thesis . 15 4 Turing Defines Relative Computability 17 4.1 Turing’s Oracle Machines .
    [Show full text]
  • Computable Functions A
    http://dx.doi.org/10.1090/stml/019 STUDENT MATHEMATICAL LIBRARY Volume 19 Computable Functions A. Shen N. K. Vereshchagin Translated by V. N. Dubrovskii #AMS AMERICAN MATHEMATICAL SOCIETY Editorial Board Robert Devaney Carl Pomerance Daniel L. Goroff Hung-Hsi Wu David Bressoud, Chair H. K. BepemarHH, A. Illem* BMHHCJIHMME ^YHKUMM MIIHMO, 1999 Translated from the Russian by V. N. Dubrovskii 2000 Mathematics Subject Classification. Primary 03-01, 03Dxx. Library of Congress Cataloging-in-Publication Data Vereshchagin, Nikolai Konstantinovich, 1958- Computable functions / A. Shen, N.K. Vereshchagin ; translated by V.N. Dubrovskii. p. cm. — (Student mathematical library, ISSN 1520-9121 ; v. 19) Authors' names on t.p. of translation reversed from original. Includes bibliographical references and index. ISBN 0-8218-2732-4 (alk. paper) 1. Computable functions. I. Shen, A. (Alexander), 1958- II. Title. III. Se• ries. QA9.59 .V47 2003 511.3—dc21 2002038567 Copying and reprinting. Individual readers of this publication, and nonprofit libraries acting for them, are permitted to make fair use of the material, such as to copy a chapter for use in teaching or research. Permission is granted to quote brief passages from this publication in reviews, provided the customary acknowledgment of the source is given. Republication, systematic copying, or multiple reproduction of any material in this publication is permitted only under license from the American Mathematical Society. Requests for such permission should be addressed to the Acquisitions Department, American Mathematical Society, 201 Charles Street, Providence, Rhode Island 02904- 2294, USA. Requests can also be made by e-mail to reprint-permissionQams.org. © 2003 by the American Mathematical Society.
    [Show full text]
  • On the Successor Function
    On the successor function Christiane Frougny LIAFA, Paris Joint work with Valérie Berthé, Michel Rigo and Jacques Sakarovitch Numeration Nancy 18-22 May 2015 Pierre Liardet Groupe d’Etude sur la Numération 1999 Peano The successor function is a primitive recursive function Succ such that Succ(n)= n + 1 for each natural number n. Peano axioms define the natural numbers beyond 0: 1 is defined to be Succ(0) Addition on natural numbers is defined recursively by: m + 0 = m m + Succ(n)= Succ(m)+ n Odometer The odometer indicates the distance traveled by a vehicule. Odometer The odometer indicates the distance traveled by a vehicule. Leonardo da Vinci 1519: odometer of Vitruvius Adding machine Machine arithmétique Pascal 1642 : Pascaline The first calculator to have a controlled carry mechanism which allowed for an effective propagation of multiple carries. French currency system used livres, sols and deniers with 20 sols to a livre and 12 deniers to a sol. Length was measured in toises, pieds, pouces and lignes with 6 pieds to a toise, 12 pouces to a pied and 12 lignes to a pouce. Computation in base 6, 10, 12 and 20. To reset the machine, set all the wheels to their maximum, and then add 1 to the rightmost wheel. In base 10, 999999 + 1 = 000000. Subtractions are performed like additions using 9’s complement arithmetic. Adding machine and adic transformation An adic transformation is a generalisation of the adding machine in the ring of p-adic integers to a more general Markov compactum. Vershik (1985 and later): adic transformation based on Bratteli diagrams: it acts as a successor map on a Markov compactum defined as a lexicographically ordered set of infinite paths in an infinite labeled graph whose transitions are provided by an infinite sequence of transition matrices.
    [Show full text]
  • Introduction to the Theory of Computation Computability, Complexity, and the Lambda Calculus Some Notes for CIS262
    Introduction to the Theory of Computation Computability, Complexity, And the Lambda Calculus Some Notes for CIS262 Jean Gallier and Jocelyn Quaintance Department of Computer and Information Science University of Pennsylvania Philadelphia, PA 19104, USA e-mail: [email protected] c Jean Gallier Please, do not reproduce without permission of the author April 28, 2020 2 Contents Contents 3 1 RAM Programs, Turing Machines 7 1.1 Partial Functions and RAM Programs . 10 1.2 Definition of a Turing Machine . 15 1.3 Computations of Turing Machines . 17 1.4 Equivalence of RAM programs And Turing Machines . 20 1.5 Listable Languages and Computable Languages . 21 1.6 A Simple Function Not Known to be Computable . 22 1.7 The Primitive Recursive Functions . 25 1.8 Primitive Recursive Predicates . 33 1.9 The Partial Computable Functions . 35 2 Universal RAM Programs and the Halting Problem 41 2.1 Pairing Functions . 41 2.2 Equivalence of Alphabets . 48 2.3 Coding of RAM Programs; The Halting Problem . 50 2.4 Universal RAM Programs . 54 2.5 Indexing of RAM Programs . 59 2.6 Kleene's T -Predicate . 60 2.7 A Non-Computable Function; Busy Beavers . 62 3 Elementary Recursive Function Theory 67 3.1 Acceptable Indexings . 67 3.2 Undecidable Problems . 70 3.3 Reducibility and Rice's Theorem . 73 3.4 Listable (Recursively Enumerable) Sets . 76 3.5 Reducibility and Complete Sets . 82 4 The Lambda-Calculus 87 4.1 Syntax of the Lambda-Calculus . 89 4.2 β-Reduction and β-Conversion; the Church{Rosser Theorem . 94 4.3 Some Useful Combinators .
    [Show full text]
  • Foundations of Mathematics
    Foundations of Mathematics Fall 2019 ii Contents 1 Propositional Logic 1 1.1 The basic definitions . .1 1.2 Disjunctive Normal Form Theorem . .3 1.3 Proofs . .4 1.4 The Soundness Theorem . 11 1.5 The Completeness Theorem . 12 1.6 Completeness, Consistency and Independence . 14 2 Predicate Logic 17 2.1 The Language of Predicate Logic . 17 2.2 Models and Interpretations . 19 2.3 The Deductive Calculus . 21 2.4 Soundness Theorem for Predicate Logic . 24 3 Models for Predicate Logic 27 3.1 Models . 27 3.2 The Completeness Theorem for Predicate Logic . 27 3.3 Consequences of the completeness theorem . 31 4 Computability Theory 33 4.1 Introduction and Examples . 33 4.2 Finite State Automata . 34 4.3 Exercises . 37 4.4 Turing Machines . 38 4.5 Recursive Functions . 43 4.6 Exercises . 48 iii iv CONTENTS Chapter 1 Propositional Logic 1.1 The basic definitions Propositional logic concerns relationships between sentences built up from primitive proposition symbols with logical connectives. The symbols of the language of predicate calculus are 1. Logical connectives: ,&, , , : _ ! $ 2. Punctuation symbols: ( , ) 3. Propositional variables: A0, A1, A2,.... A propositional variable is intended to represent a proposition which can either be true or false. Restricted versions, , of the language of propositional logic can be constructed by specifying a subset of the propositionalL variables. In this case, let PVar( ) denote the propositional variables of . L L Definition 1.1.1. The collection of sentences, denoted Sent( ), of a propositional language is defined by recursion. L L 1. The basis of the set of sentences is the set PVar( ) of propositional variables of .
    [Show full text]
  • THE PEANO AXIOMS 1. Introduction We Begin Our Exploration
    CHAPTER 1: THE PEANO AXIOMS MATH 378, CSUSM. SPRING 2015. 1. Introduction We begin our exploration of number systems with the most basic number system: the natural numbers N. Informally, natural numbers are just the or- dinary whole numbers 0; 1; 2;::: starting with 0 and continuing indefinitely.1 For a formal description, see the axiom system presented in the next section. Throughout your life you have acquired a substantial amount of knowl- edge about these numbers, but do you know the reasons behind your knowl- edge? Why is addition commutative? Why is multiplication associative? Why does the distributive law hold? Why is it that when you count a finite set you get the same answer regardless of the order in which you count the elements? In this and following chapters we will systematically prove basic facts about the natural numbers in an effort to answer these kinds of ques- tions. Sometimes we will encounter more than one answer, each yielding its own insights. You might see an informal explanation and then a for- mal explanation, or perhaps you will see more than one formal explanation. For instance, there will be a proof for the commutative law of addition in Chapter 1 using induction, and then a more insightful proof in Chapter 2 involving the counting of finite sets. We will use the axiomatic method where we start with a few axioms and build up the theory of the number systems by proving that each new result follows from earlier results. In the first few chapters of these notes there will be a strong temptation to use unproved facts about arithmetic and numbers that are so familiar to us that they are practically part of our mental DNA.
    [Show full text]