Basics of Computability

Total Page:16

File Type:pdf, Size:1020Kb

Load more

Appendix A Basics of Computability The Appendix follows closely [1]. Intuitively, a function is computable if there is a procedure that calculates its values, that is, when the function f is defined for a given argument w, the execution of the procedure on w will necessarily terminate in a finite number of steps returning f (w).Otherwise,if f is not defined for w then the execution of the procedure on w either does not terminate or it does but no meaningful result will be returned. So function f can be computable even when it is partial (possibly not defined everywhere). For the moment, by a procedure we mean a program composed of a finite sequence of basic commands. An algorithm is a procedure whose execution always terminates in a finite number of steps, for the relevant input data. For instance, there is an algorithm for determining whether or not a natural number is even based on the known fact that a natural number x is even if and only if the remainder of the division of x by 2 is zero. On the other hand, consider the function f = (x → x/2) over the natural numbers. This function is defined whenever x is an even number and undefined otherwise. Thus, f is a partial function and is computable since there is a procedure such that its execution over an even number x returns x/2 and its execution elsewhere does not terminate. For defining computable functions, we need to adopt a computational formal- ism for describing procedures and algorithms. We adopt the Church-Turing Thesis (see [2, 3]) stating that any computational formalism should be equivalent to Tur- ing’s computational model. However, some of them are more flexible than the others taking into account the functions we want to consider and the results we want to obtain. In the examples above, we are in the setting of natural numbers. This means that we concentrate on functions from Nn to Nm where n ∈ N and m ∈ N+.Inthis setting, Turing and Kleene models of computation are commonly used. Showing that a function is computable using Turing machines, see [4], consists of finding a Turing machine that computes the function. On the other hand, proving that a function is computable using Kleene recursive functions, see [5], means that we must prove that © Springer Nature Switzerland AG 2020 161 J. Rasga and C. Sernadas, Decidability of Logical Theories and Their Combination, Studies in Universal Logic, https://doi.org/10.1007/978-3-030-56554-1 162 Appendix A: Basics of Computability the function is recursive which consists of writing a program where the construction of the function is reflected. However, in many cases, we want to work outside the natural number setting (although everything we do could be done in this setting). For instance, we can be interested in reasoning about formulas and theorems in a logic from a decidable point of view. In this case, we have two possibilities: either we convert formulas and theorems to the setting of natural numbers via a Gödelization (see [1]) or we can define the concept of computable function in the appropriate setting by adopting a more flexible computational formalism. In both cases, we must identify the alphabet at hand and define the set of formulas as a subset of the set of all finite sequences that we can write with the alphabet. In this book, we use an abstract high-level programming language for writing procedures and algorithms following closely mathematical notations (see [1]). We omit non-essential details and simplify the presentation so that the book can be read by anyone with a very shallow contact with programming. For showing that a function is computable, no matter the setting, we must find a procedure that computes the function. A.1 Preliminaries GivenasetS and s1,...,sn ∈ S, we denote by |s1 ... sn| the length n of the sequence s1 ... sn over S. Moreover, we denote by ε the empty sequence, that is, the sequence with length 0. Finally, we denote by S∗ the set of all finite sequences over S also called the universe over S. We assume fixed a finite non-empty alphabet A containing capital and small letters, digits, punctuation marks, whitespace characters and logical, numerical and comparison symbols. We denote by W the universe A∗. Example A.1 For instance, the sequences function(x)(return 1) and functionwhile are in W. In order to improve readability, letters in A may be presented in sans-serif font. Appendix A: Basics of Computability 163 Definition A.2 A working universe is an infinite subset of W. Example A.3 For instance, N, Z, Q, {1}∗, {0, 1}∗ are working universes. Definition A.4 Let W be a working universe and n ∈ N+.AsetC ⊆ W n is called a set of type n over W,orsimplyaset over W. Definition A.5 Let W1 and W2 be working universes, C1 and C2 sets over W1 and W2, respectively, and f a function from C1 to C2.Thedomain of f is the set dom f ={w ∈ C1 : f (w)↓ and f (w) ∈ C2} where the notation f (w)↓ indicates that f is defined for w.Therange of f is range f = f (dom f ). Moreover, we say that C1 and C2 are the source and the target sets of f , respectively. Note A.6 We use the notation f : C1 C2 to indicate that f is a function from C1 to C2 (the domain may be a proper subset of C1). We say that f is a map or a total function, written as f : C1 → C2 whenever dom f = C1. Example A.7 Consider the function x f = x → : N N. 2 Then dom f is the set of all even natural numbers and range f = N Definition A.8 Let W be a working universe and C ⊆ W n. Then, the function w ∈ 1if C n χC:W = w → : W → N 0 otherwise is called the characteristic map of C over W. When W is W we write χC and say that it is the characteristic map of C. Definition A.9 An enumeration of a set C ⊆ W n is a map h : N → W n such that range h = C. 164 Appendix A: Basics of Computability A.2 Computational Model Many approaches have been proposed to define formally the notion of computable function, namely, among others: Turing machines [4, 6–8], Kleene’s μ-recursive functions [5, 9], Church’s λ-definable functions [5, 10–12], Post’s canonical sys- tems [13–17], Shepherdson-Sturgis register machines [13, 18], Aanderaa-Cohen modular machines [19] and Diophantine sets [20–22]. The equivalence of the first three definitions in the list above inspired Stephen Kleene (in [3]) to state the fol- lowing postulate, which has become known as the Church-Turing Thesis: Any function that can be accepted as computable is formally computable by some Turing machine. The discussion of the thesis in Kleene’s book [23] is highly recommended (see also [24]). For a recent survey see [25]. Since then, it has been shown that these and other formal notions of computability are all equivalent. In other words, any reasonable formalization of the notion of computability identifies only Turing com- putable functions. Notice that the Church-Turing thesis is not provable. Only on a case-by-case basis can it be shown that a particular formalization of computability identifies as computable precisely the Turing computable functions. We adopt as model of computation an abstract high-level programming language over the alphabet A.Aprogram also called a procedure is an element in W of the form function (args)(body) where args is a finite list of variables and body is a non-empty finite sequence of commands (separated by ;). We use five main commands: return statement, assignment, loop, alternative and null statement. The return statement command ,..., return exp1 expn when executed interrupts the execution of the function and returns the values of ,..., expressions exp1 expn. Example A.10 Consider the following program Padd: function (x, y)(return 2x + 3y) The execution of Padd on (k1, k2) terminates returning the value 2k1 + 3k2. Example A.11 Consider the following program P: function (w1,w2)(return w1 · “+“ · w2) where the operation · when receiving two strings returns the concatenation of the strings. The execution of P on strings s1 and s2 returns the string composed of the symbols in s1 followed by the symbol + followed by the symbols in s2. Appendix A: Basics of Computability 165 The assignment command ,..., = ,..., var1 varn exp1 expn ,..., when executed assigns simultaneously the values of the expressions exp1 expn to the variables var1,...,varn, respectively. Example A.12 Consider the following program P: function (n)( f = function (x, y)(return 2x + 3y); return n + f (n, n + 1) ) The execution of P on a natural number n returns 6n + 3. An alternative program doing the same thing as P is as follows: function (n)(return n + Padd(n, n + 1)) where Padd is defined in Example A.10. The loop command while cond do (body) when executed repeatedly executes the commands in the body while the Boolean expression cond is true. To simplify the presentation, we may omit the parentheses when the body has just one command. Example A.13 Consider the following program Pfact: function (n)( k = 1; r = 1; while k ≤ n do ( r = r × k; k = k + 1 ); return r ) The execution of P on a natural number n returns n!. An alternative solution could be achieved by defining a recursive function: Pfactr = function (n)(if n == 0 then return 1 else return n × Pfactr(n − 1)) The null statement Null when executed does nothing.
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

    “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.
  • Church's Thesis and the Conceptual Analysis of Computability

    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.
  • Enumerations of the Kolmogorov Function

    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.
  • Epistemological Consequences of the Incompleteness Theorems

    Epistemological Consequences of the Incompleteness Theorems

    Epistemological Consequences of the Incompleteness Theorems Giuseppe Raguní UCAM - Universidad Católica de Murcia, Avenida Jerónimos 135, Guadalupe 30107, Murcia, Spain - [email protected] After highlighting the cases in which the semantics of a language cannot be mechanically reproduced (in which case it is called inherent), the main episte- mological consequences of the first incompleteness Theorem for the two funda- mental arithmetical theories are shown: the non-mechanizability for the truths of the first-order arithmetic and the peculiarities for the model of the second- order arithmetic. Finally, the common epistemological interpretation of the second incompleteness Theorem is corrected, proposing the new Metatheorem of undemonstrability of internal consistency. KEYWORDS: semantics, languages, epistemology, paradoxes, arithmetic, in- completeness, first-order, second-order, consistency. 1 Semantics in the Languages Consider an arbitrary language that, as normally, makes use of a countable1 number of characters. Combining these characters in certain ways, are formed some fundamental strings that we call terms of the language: those collected in a dictionary. When the terms are semantically interpreted, i. e. a certain meaning is assigned to them, we have their distinction in adjectives, nouns, verbs, etc. Then, a proper grammar establishes the rules arXiv:1602.03390v1 [math.GM] 13 Jan 2016 of formation of sentences. While the terms are finite, the combinations of grammatically allowed terms form an infinite-countable amount of possible sentences. In a non-trivial language, the meaning associated to each term, and thus to each ex- pression that contains it, is not always unique. The same sentence can enunciate different things, so representing different propositions.
  • John P. Burgess Department of Philosophy Princeton University Princeton, NJ 08544-1006, USA Jburgess@Princeton.Edu

    John P. Burgess Department of Philosophy Princeton University Princeton, NJ 08544-1006, USA [email protected]

    John P. Burgess Department of Philosophy Princeton University Princeton, NJ 08544-1006, USA [email protected] LOGIC & PHILOSOPHICAL METHODOLOGY Introduction For present purposes “logic” will be understood to mean the subject whose development is described in Kneale & Kneale [1961] and of which a concise history is given in Scholz [1961]. As the terminological discussion at the beginning of the latter reference makes clear, this subject has at different times been known by different names, “analytics” and “organon” and “dialectic”, while inversely the name “logic” has at different times been applied much more broadly and loosely than it will be here. At certain times and in certain places — perhaps especially in Germany from the days of Kant through the days of Hegel — the label has come to be used so very broadly and loosely as to threaten to take in nearly the whole of metaphysics and epistemology. Logic in our sense has often been distinguished from “logic” in other, sometimes unmanageably broad and loose, senses by adding the adjectives “formal” or “deductive”. The scope of the art and science of logic, once one gets beyond elementary logic of the kind covered in introductory textbooks, is indicated by two other standard references, the Handbooks of mathematical and philosophical logic, Barwise [1977] and Gabbay & Guenthner [1983-89], though the latter includes also parts that are identified as applications of logic rather than logic proper. The term “philosophical logic” as currently used, for instance, in the Journal of Philosophical Logic, is a near-synonym for “nonclassical logic”. There is an older use of the term as a near-synonym for “philosophy of language”.
  • Theory of Computation

    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.
  • The Strength of Mac Lane Set Theory

    The Strength of Mac Lane Set Theory

    The Strength of Mac Lane Set Theory A. R. D. MATHIAS D´epartement de Math´ematiques et Informatique Universit´e de la R´eunion To Saunders Mac Lane on his ninetieth birthday Abstract AUNDERS MAC LANE has drawn attention many times, particularly in his book Mathematics: Form and S Function, to the system ZBQC of set theory of which the axioms are Extensionality, Null Set, Pairing, Union, Infinity, Power Set, Restricted Separation, Foundation, and Choice, to which system, afforced by the principle, TCo, of Transitive Containment, we shall refer as MAC. His system is naturally related to systems derived from topos-theoretic notions concerning the category of sets, and is, as Mac Lane emphasizes, one that is adequate for much of mathematics. In this paper we show that the consistency strength of Mac Lane's system is not increased by adding the axioms of Kripke{Platek set theory and even the Axiom of Constructibility to Mac Lane's axioms; our method requires a close study of Axiom H, which was proposed by Mitchell; we digress to apply these methods to subsystems of Zermelo set theory Z, and obtain an apparently new proof that Z is not finitely axiomatisable; we study Friedman's strengthening KPP + AC of KP + MAC, and the Forster{Kaye subsystem KF of MAC, and use forcing over ill-founded models and forcing to establish independence results concerning MAC and KPP ; we show, again using ill-founded models, that KPP + V = L proves the consistency of KPP ; turning to systems that are type-theoretic in spirit or in fact, we show by arguments of Coret
  • The Interplay Between Computability and Incomputability Draft 619.Tex

    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 .
  • Computable Functions A

    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.
  • 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

    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 .
  • Foundations of Mathematics

    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 .
  • Type Theory and Applications

    Type Theory and Applications

    Type Theory and Applications Harley Eades [email protected] 1 Introduction There are two major problems growing in two areas. The first is in Computer Science, in particular software engineering. Software is becoming more and more complex, and hence more susceptible to software defects. Software bugs have two critical repercussions: they cost companies lots of money and time to fix, and they have the potential to cause harm. The National Institute of Standards and Technology estimated that software errors cost the United State's economy approximately sixty billion dollars annually, while the Federal Bureau of Investigations estimated in a 2005 report that software bugs cost U.S. companies approximately sixty-seven billion a year [90, 108]. Software bugs have the potential to cause harm. In 2010 there were a approximately a hundred reports made to the National Highway Traffic Safety Administration of potential problems with the braking system of the 2010 Toyota Prius [17]. The problem was that the anti-lock braking system would experience a \short delay" when the brakes where pressed by the driver of the vehicle [106]. This actually caused some crashes. Toyota found that this short delay was the result of a software bug, and was able to repair the the vehicles using a software update [91]. Another incident where substantial harm was caused was in 2002 where two planes collided over Uberlingen¨ in Germany. A cargo plane operated by DHL collided with a passenger flight holding fifty-one passengers. Air-traffic control did not notice the intersecting traffic until less than a minute before the collision occurred.