Computability for the Mathematical (PDF)

Total Page:16

File Type:pdf, Size:1020Kb

Computability for the Mathematical (PDF) 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”.
Recommended publications
  • Basic Structures: Sets, Functions, Sequences, and Sums 2-2
    CHAPTER Basic Structures: Sets, Functions, 2 Sequences, and Sums 2.1 Sets uch of discrete mathematics is devoted to the study of discrete structures, used to represent discrete objects. Many important discrete structures are built using sets, which 2.2 Set Operations M are collections of objects. Among the discrete structures built from sets are combinations, 2.3 Functions unordered collections of objects used extensively in counting; relations, sets of ordered pairs that represent relationships between objects; graphs, sets of vertices and edges that connect 2.4 Sequences and vertices; and finite state machines, used to model computing machines. These are some of the Summations topics we will study in later chapters. The concept of a function is extremely important in discrete mathematics. A function assigns to each element of a set exactly one element of a set. Functions play important roles throughout discrete mathematics. They are used to represent the computational complexity of algorithms, to study the size of sets, to count objects, and in a myriad of other ways. Useful structures such as sequences and strings are special types of functions. In this chapter, we will introduce the notion of a sequence, which represents ordered lists of elements. We will introduce some important types of sequences, and we will address the problem of identifying a pattern for the terms of a sequence from its first few terms. Using the notion of a sequence, we will define what it means for a set to be countable, namely, that we can list all the elements of the set in a sequence.
    [Show full text]
  • Domain and Range of a Function
    4.1 Domain and Range of a Function How can you fi nd the domain and range of STATES a function? STANDARDS MA.8.A.1.1 MA.8.A.1.5 1 ACTIVITY: The Domain and Range of a Function Work with a partner. The table shows the number of adult and child tickets sold for a school concert. Input Number of Adult Tickets, x 01234 Output Number of Child Tickets, y 86420 The variables x and y are related by the linear equation 4x + 2y = 16. a. Write the equation in function form by solving for y. b. The domain of a function is the set of all input values. Find the domain of the function. Domain = Why is x = 5 not in the domain of the function? 1 Why is x = — not in the domain of the function? 2 c. The range of a function is the set of all output values. Find the range of the function. Range = d. Functions can be described in many ways. ● by an equation ● by an input-output table y 9 ● in words 8 ● by a graph 7 6 ● as a set of ordered pairs 5 4 Use the graph to write the function 3 as a set of ordered pairs. 2 1 , , ( , ) ( , ) 0 09321 45 876 x ( , ) , ( , ) , ( , ) 148 Chapter 4 Functions 2 ACTIVITY: Finding Domains and Ranges Work with a partner. ● Copy and complete each input-output table. ● Find the domain and range of the function represented by the table. 1 a. y = −3x + 4 b. y = — x − 6 2 x −2 −10 1 2 x 01234 y y c.
    [Show full text]
  • Adaptive Lower Bound for Testing Monotonicity on the Line
    Adaptive Lower Bound for Testing Monotonicity on the Line Aleksandrs Belovs∗ Abstract In the property testing model, the task is to distinguish objects possessing some property from the objects that are far from it. One of such properties is monotonicity, when the objects are functions from one poset to another. This is an active area of research. In this paper we study query complexity of ε-testing monotonicity of a function f :[n] → [r]. All our lower bounds are for adaptive two-sided testers. log r • We prove a nearly tight lower bound for this problem in terms of r. TheboundisΩ log log r when ε =1/2. No previous satisfactory lower bound in terms of r was known. • We completely characterise query complexity of this problem in terms of n for smaller values of ε. The complexity is Θ ε−1 log(εn) . Apart from giving the lower bound, this improves on the best known upper bound. Finally, we give an alternative proof of the Ω(ε−1d log n−ε−1 log ε−1) lower bound for testing monotonicity on the hypergrid [n]d due to Chakrabarty and Seshadhri (RANDOM’13). 1 Introduction The framework of property testing was formulated by Rubinfeld and Sudan [19] and Goldreich et al. [16]. A property testing problem is specified by a property P, which is a class of functions mapping some finite set D into some finite set R, and proximity parameter ε, which is a real number between 0 and 1. An ε-tester is a bounded-error randomised query algorithm which, given oracle access to a function f : D → R, distinguishes between the case when f belongs to P and the case when f is ε-far from P.
    [Show full text]
  • Basic Concepts of Set Theory, Functions and Relations 1. Basic
    Ling 310, adapted from UMass Ling 409, Partee lecture notes March 1, 2006 p. 1 Basic Concepts of Set Theory, Functions and Relations 1. Basic Concepts of Set Theory........................................................................................................................1 1.1. Sets and elements ...................................................................................................................................1 1.2. Specification of sets ...............................................................................................................................2 1.3. Identity and cardinality ..........................................................................................................................3 1.4. Subsets ...................................................................................................................................................4 1.5. Power sets .............................................................................................................................................4 1.6. Operations on sets: union, intersection...................................................................................................4 1.7 More operations on sets: difference, complement...................................................................................5 1.8. Set-theoretic equalities ...........................................................................................................................5 Chapter 2. Relations and Functions ..................................................................................................................6
    [Show full text]
  • Module 1 Lecture Notes
    Module 1 Lecture Notes Contents 1.1 Identifying Functions.............................1 1.2 Algebraically Determining the Domain of a Function..........4 1.3 Evaluating Functions.............................6 1.4 Function Operations..............................7 1.5 The Difference Quotient...........................9 1.6 Applications of Function Operations.................... 10 1.7 Determining the Domain and Range of a Function Graphically.... 12 1.8 Reading the Graph of a Function...................... 14 1.1 Identifying Functions In previous classes, you should have studied a variety basic functions. For example, 1 p f(x) = 3x − 5; g(x) = 2x2 − 1; h(x) = ; j(x) = 5x + 2 x − 5 We will begin this course by studying functions and their properties. As the course progresses, we will study inverse, composite, exponential, logarithmic, polynomial and rational functions. Math 111 Module 1 Lecture Notes Definition 1: A relation is a correspondence between two variables. A relation can be ex- pressed through a set of ordered pairs, a graph, a table, or an equation. A set containing ordered pairs (x; y) defines y as a function of x if and only if no two ordered pairs in the set have the same x-coordinate. In other words, every input maps to exactly one output. We write y = f(x) and say \y is a function of x." For the function defined by y = f(x), • x is the independent variable (also known as the input) • y is the dependent variable (also known as the output) • f is the function name Example 1: Determine whether or not each of the following represents a function. Table 1.1 Chicken Name Egg Color Emma Turquoise Hazel Light Brown George(ia) Chocolate Brown Isabella White Yvonne Light Brown (a) The set of ordered pairs of the form (chicken name, egg color) shown in Table 1.1.
    [Show full text]
  • A Denotational Semantics Approach to Functional and Logic Programming
    A Denotational Semantics Approach to Functional and Logic Programming TR89-030 August, 1989 Frank S.K. Silbermann The University of North Carolina at Chapel Hill Department of Computer Science CB#3175, Sitterson Hall Chapel Hill, NC 27599-3175 UNC is an Equal OpportunityjAfflrmative Action Institution. A Denotational Semantics Approach to Functional and Logic Programming by FrankS. K. Silbermann A dissertation submitted to the faculty of the University of North Carolina at Chapel Hill in par­ tial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science. Chapel Hill 1989 @1989 Frank S. K. Silbermann ALL RIGHTS RESERVED 11 FRANK STEVEN KENT SILBERMANN. A Denotational Semantics Approach to Functional and Logic Programming (Under the direction of Bharat Jayaraman.) ABSTRACT This dissertation addresses the problem of incorporating into lazy higher-order functional programming the relational programming capability of Horn logic. The language design is based on set abstraction, a feature whose denotational semantics has until now not been rigorously defined. A novel approach is taken in constructing an operational semantics directly from the denotational description. The main results of this dissertation are: (i) Relative set abstraction can combine lazy higher-order functional program­ ming with not only first-order Horn logic, but also with a useful subset of higher­ order Horn logic. Sets, as well as functions, can be treated as first-class objects. (ii) Angelic powerdomains provide the semantic foundation for relative set ab­ straction. (iii) The computation rule appropriate for this language is a modified parallel­ outermost, rather than the more familiar left-most rule. (iv) Optimizations incorporating ideas from narrowing and resolution greatly improve the efficiency of the interpreter, while maintaining correctness.
    [Show full text]
  • The Domain of Solutions to Differential Equations
    connect to college success™ The Domain of Solutions To Differential Equations Larry Riddle available on apcentral.collegeboard.com connect to college success™ www.collegeboard.com The College Board: Connecting Students to College Success The College Board is a not-for-profit membership association whose mission is to connect students to college success and opportunity. Founded in 1900, the association is composed of more than 4,700 schools, colleges, universities, and other educational organizations. Each year, the College Board serves over three and a half million students and their parents, 23,000 high schools, and 3,500 colleges through major programs and services in college admissions, guidance, assessment, financial aid, enrollment, and teaching and learning. Among its best-known programs are the SAT®, the PSAT/NMSQT®, and the Advanced Placement Program® (AP®). The College Board is committed to the principles of excellence and equity, and that commitment is embodied in all of its programs, services, activities, and concerns. Equity Policy Statement The College Board and the Advanced Placement Program encourage teachers, AP Coordinators, and school administrators to make equitable access a guiding principle for their AP programs. The College Board is committed to the principle that all students deserve an opportunity to participate in rigorous and academically challenging courses and programs. All students who are willing to accept the challenge of a rigorous academic curriculum should be considered for admission to AP courses. The Board encourages the elimination of barriers that restrict access to AP courses for students from ethnic, racial, and socioeconomic groups that have been traditionally underrepresented in the AP Program.
    [Show full text]
  • Domain and Range of an Inverse Function
    Lesson 28 Domain and Range of an Inverse Function As stated in the previous lesson, when changing from a function to its inverse the inputs and outputs of the original function are switched. This is because when we find an inverse function, we are taking some original function and solving for its input 푥; so what used to be the input becomes the output, and what used to be the output becomes the input. −11 푓(푥) = Given to the left are the steps 1 + 3푥 to find the inverse of the −ퟏퟏ original function 푓. These 풇 = steps illustrates the changing ퟏ + ퟑ풙 of the inputs and the outputs (ퟏ + ퟑ풙) ∙ 풇 = −ퟏퟏ when going from a function to its inverse. We start out 풇 + ퟑ풙풇 = −ퟏퟏ with 푓 (the output) isolated and 푥 (the input) as part of ퟑ풙풇 = −ퟏퟏ − 풇 the expression, and we end up with 푥 isolated and 푓 as −ퟏퟏ − 풇 the input of the expression. 풙 = ퟑ풇 Keep in mind that once 푥 is isolated, we have basically −11 − 푥 푓−1(푥) = found the inverse function. 3푥 Since the inputs and outputs of a function are switched when going from the original function to its inverse, this means that the domain of the original function 푓 is the range of its inverse function 푓−1. This also means that the range of the original function 푓 is the domain of its inverse function 푓−1. In this lesson we will review how to find an inverse function (as shown above), and we will also review how to find the domain of a function (which we covered in Lesson 18).
    [Show full text]
  • Math 101 B-Packet
    Math 101 B-Packet Scott Rome Winter 2012-13 1 Redefining functions This quarter we have defined a function as a rule which assigns exactly one output to each input, and so far we have been happy with this definition. Unfortunately, this way of thinking of a function is insufficient as things become more complicated in mathematics. For a better understanding of a function, we will first need to define it better. Definition 1.1. Let X; Y be any sets. A function f : X ! Y is a rule which assigns every element of X to an element of Y . The sets X and Y are called the domain and codomain of f respectively. x f(x) y Figure 1: This function f : X ! Y maps x 7! f(x). The green circle indicates the range of the function. Notice y is in the codomain, but f does not map to it. Remark 1.2. It is necessary to define the rule, the domain, and the codomain to define a function. Thus far in the class, we have been \sloppy" when working with functions. Remark 1.3. Notice how in the definition, the function is defined by three things: the rule, the domain, and the codomain. That means you can define functions that seem to be the same, but are actually different as we will see. The domain of a function can be thought of as the set of all inputs (that is, everything in the domain will be mapped somewhere by the function). On the other hand, the codomain of a function is the set of all possible outputs, and a function may not necessarily map to every element of the codomain.
    [Show full text]
  • 1.1 Function Definition (Slides in 4-To-1 Format)
    Definition of a function We study the most fundamental concept in mathematics, that of a Elementary Functions function. Part 1, Functions In this lecture we first define a function and then examine the domain of Lecture 1.1a, The Definition of a Function functions defined as equations involving real numbers. Definition of a function. A function f : X ! Y assigns to each element of the set X an element of Dr. Ken W. Smith Y . Sam Houston State University Picture a function as a machine, 2013 Smith (SHSU) Elementary Functions 2013 1 / 27 Smith (SHSU) Elementary Functions 2013 2 / 27 A function machine Inputs and unique outputs of a function We study the most fundamental concept in mathematics, that of a function. In this lecture we first define a function and then examine the domain of functions defined as equations involving real numbers. The set X of inputs is called the domain of the function f. The set Y of all conceivable outputs is the codomain of the function f. Definition of a function The set of all outputs is the range of f. A function f : X ! Y assigns to each element of the set X an element of (The range is a subset of Y .) Y . Picture a function as a machine, The most important criteria for a function is this: A function must assign to each input a unique output. We cannot allow several different outputs to correspond to an input. dropping x-values into one end of the machine and picking up y-values at Smith (SHSU) Elementary Functions 2013 3 / 27 Smith (SHSU) Elementary Functions 2013 4 / 27 the other end.
    [Show full text]
  • C Ommon C Ore Assessment C Omparison for Mathematics
    C O M M O N C ORE A SSESSMENT C OMPARISON FOR M ATHEMATICS GRADES 9–11 F UNCTIONS J une 2013 Prepared by: Delaware Department of Education Accountability Resources Workgroup 401 Federal Street, Suite 2 Dover, DE 19901 12/4/2013 Document Control No.: 2013/05/08 Common Core Assessment Comparison for Mathematics Grades 9–11—Functions Table of Contents INTRODUCTION ................................................................................................................... 1 INTERPRETING FUNCTIONS (F.IF) ..................................................................................... 6 Cluster: Understand the concept of a function and use function notation. ....................... 7 9-11.F.IF.1 – Understand that a function from one set (called the domain) to another set (called the range) assigns to each element of the domain exactly one element of the range. If is a function and is an element of its domain, then denotes the output of corresponding to the input . The graph of is the graph of the equation . ............................................... 7 9-11.F.IF.2 – Use function notation, evaluate functions for inputs in their domains, and interpret statements that use function notation in terms of a context. .......................................................... 10 9-11.F.IF.3 – Recognize that sequences are functions, sometimes defined recursively, whose domain is a subset of the integers. For example, the Fibonacci sequence is defined recursively by f(0) = f(1) = 1, f(n+1) = f(n) + f(n-1) for n 1. ........................................................................... 11 Cluster: Interpret functions that arise in applications in terms of the context. ............... 12 9-11.F.IF.4 – For a function that models a relationship between two quantities, interpret key features of graphs and tables in terms of the quantities, and sketch graphs showing key features given a verbal description of the relationship.
    [Show full text]
  • Instructional Support Tool for Teachers: Functions
    New Jersey Student Learning Standards Mathematics Algebra 1 Instructional Support Tool for Teachers: Functions This instructional support tool is designed to assist educators in interpreting and implementing the New Jersey Student Learning Standards for Mathematics. It contains explanations or examples of each Algebra 1 course standard to answer questions about the standard’s meaning and how it applies to student knowledge and performance. To ensure that descriptions are helpful and meaningful to teachers, this document also identifies grades 6 to 8 prerequisite standards upon which each Algebra 1 standard builds. It includes the following: sample items aligned to each identified prerequisite; identification of course level connections; instructional considerations and common misconceptions; sample academic vocabulary and associated standards for mathematical practice. Examples are samples only and should not be considered an exhaustive list. This instructional support tool is considered a living document. The New Jersey Department of Education believe that teachers and other educators will find ways to improve the document as they use it. Please send feedback to [email protected] so that the Department may use your input when updating this guide. Please consult the New Jersey Student Learning Standards for Mathematics for more information. 1 Functions Standards Overview Functions describe situations where one quantity determines another. Because we continually make theories about dependencies between quantities in nature and society, functions are important tools in the construction of mathematical models. In school mathematics, functions usually have numerical inputs and outputs and are often defined by an algebraic expression. A function can be described in various ways, such as by a graph (e.g., the trace of a seismograph); by a verbal rule, as in, “I’ll give you a state, you give me the capital city”; by an algebraic expression like f(x) = a + bx; or by a recursive rule.
    [Show full text]