



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Applied Logic Lecture 22: Arithmetic Representability CS 4860 Spring 2009 Thursday, April 9, 2009
In the previous lectures we have introduced axiomatizations of various fragments of mathematics, including integer arithmetic. We have given two formalizations – the axioms of an inductively ordered integral domain and the Peano axioms. In the process the number of axioms has grown tremendously. If we were to rely just on the pure tableau calculus for first-order logic, we would hardly be able to prove anything from these axioms in a decent amount of time. The size of the proofs will just be too big for that.
From a practical perspective, therefore, it makes little sense to continue the path of adding axioms to first-order logic. Instead, we have to turn these axioms into proof rules that we can apply ad lib and even extend the proof system by decision procedures for certain fragments of mathematics, which are guaranteed to be correct but use extra-logical features to construct a proof. Doing so will bring us to a formalism that we call P roof R efinement L ogic, and in particular to a version of it that we call λ-PRL, which enables us to reason about programs, integers and lists of integers. There is also a successor of λ-PRL that is based on a much richer formal logic called type theory, but introducing that logic and its applications is a course by itself.
However, before we do so, let us explore the theoretical consequences of the axiomatizations we have so far. The Peano axioms appear so utterly simple – can we express anything interesting in them? They include substitution and induction as axiom schemes , which potentially means an infinite number of axioms – how far would we get if we require the number of axioms to be truly finite? These two questions will lead us to the investigation of computable functions, issues of decidability, and eventually to what is known as G¨odel’s incompleteness theorem.
The theory of computable functions has been the subject of mathematical studies since the early 1930’s. A variety of formal models has been developed, such as the λ -calculus (functional pro- gramming), Turing machines (imperative programming), recursive functions , and a huge number of programming languages. All these models have turned out to be equivalent. None is stronger than the others, so we can be quite sure that they do represent the class of all computable functions completely – if a function is computable then it can be represented in each of these formalisms (this became known as Church’s thesis ). Most theoretical models of computability focus on functions on natural numbers, so we will only consider the domain N from now on.
In the following we will show that the Peano axioms are strong enough to express all computable functions in terms of formal logic. For this purpose we have to define what it means for a logical formula to represent a function. Let us keep in mind that the language of Peano Arithmetic includes only the language of first-order logic (predicates, variables, parameters, logical connectives, and quantifiers), the designated parameters 0 and 1 , the designated equality predicate =, and the desig- nated function symbols + and *. So, while the numbers 0 and 1 have a direct representation by a symbol of Peano Arithmetic, all the other numbers have to be represented by terms. The number 2 is represented by 0+1+1, 3 by 0+1+1+1, and so on. In the following discourse we need to be able to denote the term that represents an arbitrary natural number n. We choose the notation n for this purpose and define n ≡ 0+1+1+...1︸ ︷︷ ︸ n times
. Note that n is a term of the object language of Peano
Arithmetic while n itself is a meta-level symbol representing a natural number.^1
How can we represent computable functions by logical formulas? Recall that in the axiomatization of integers as inductively ordered integral domain we introduced function symbols as more con- ventional notation for predicates that satisfied the functionality axiom. A term of the form f (x)=y is only a different way of writing the predicate Rf (x,y). Does that mean that the predicate Rf is a representation of the function f?
Not exactly. We have to keep in mind that a (computable) function is a semantical construct that maps natural numbers onto natural numbers, while the symbol f is still an object of the formal language (an abbreviation for an object level term, to be precise). However, we can relate a com- putational function to the semantical meaning of a predicate Rf by saying that f (x) = y must hold if the corresponding formula is valid. The following definition makes this concept precise.
A formal theory T is a set of formulas over some formal language. A formula X is valid in T (Notation |=T X) if it is true in every model of T. Often a theory T is defined by a set of axioms and the elements of T , called theorems , are the logical consequences of these axioms. Occasionally people identify the theory with this set of axioms, but this is not entirely accurate. In the following we will focus on theories whose language includes a representation of natural numbers.
Definition: An n-ary function f : Nn→N is called representable in a theory T if there is an (n+1)-ary predicate Rf in the formal language of T , such that for all x 1 , .., xn, y ∈^ N
In a weak sense, representability in a theory can be viewed as some form of logic programming. Note that the requirements on the predicate Rf representing a function f are quite strict. It is not sufficient that Rf (x 1 ,..,xn,y) is not valid in T if f (x 1 , .., xn) 6 =y. Instead, the negation of this formula must be valid, which means that Rf must be a very exact representation and that the theory T is capable of expressing that.
Q: What kind of functions can be represented in Peano Arithmetic?
Let us consider a few examples:
It is easy to show that all representable functions must be computable. Given an input (x 1 , .., xn) one simply searches for the smallest y such that Rf (x 1 ,..,xn,y) becomes provable, making sure that the same y is revisited over and over again as the bound for the number of proof steps is increased. If f (x 1 , .., xn) is defined then this method will eventuall find the corresponding output.
We now want to show that Peano Arithmetic is sufficiently strong to represent all computable functions. We will do this by looking at the so-called μ-recursive functions, a mathematical model for computability that is closest to formal logic. μ-recursive functions are as expressive as any other model of computability and thus well-suited for our purpose. They are defined as follows.
Definition: The class of μ -recursive functions is recursively defined as follows.
μ-recursive functions are often called recursive functions , as long as this notion is unambiguous. Note that minimization doesn’t terminate if f (x 1 , ..xn, y) 6 =0 for all y. Note also that partial func- tions do not satisfy the functionality axiom anymore but only functional equality, since there may be input values x for which there is no y with Rf (x, y).
Theorem: All μ-recursive functions are representable in Peano Arithmetic.
Proof: We demonstrate how to represent all the constructs mentioned above.
our proof this is irrelevant, as we only need to show that every computable function can be represented.