Reading preferences
Optional display controls need JavaScript. All reading content and navigation work without it.
Source file content/incompleteness/arithmetization-syntax/arithmetization-syntax.tex
Editorial
Note that arithmetization for signed tableaux is not yet available.
Source file content/incompleteness/arithmetization-syntax/introduction.tex
Introduction
In order to connect computability and logic, we need a way to talk about the objects of logic (symbols, terms, formulas, derivations), operations on them, and their properties and relations, in a way amenable to computational treatment. We can do this directly, by considering computable functions and relations on symbols, sequences of symbols, and other objects built from them. Since the objects of logical syntax are all finite and built from an enumerable sets of symbols, this is possible for some models of computation. But other models of computation---such as the recursive functions----are restricted to numbers, their relations and functions. Moreover, ultimately we also want to be able to deal with syntax within certain theories, specifically, in theories formulated in the language of arithmetic. In these cases it is necessary to arithmetize syntax, i.e., to represent syntactic objects, operations on them, and their relations, as numbers, arithmetical functions, and arithmetical relations, respectively. The idea, which goes back to Leibniz, is to assign numbers to syntactic objects.
It is relatively straightforward to assign numbers to symbols as their “codes.” Some symbols pose a bit of a challenge, since, e.g., there are infinitely many variables, and even infinitely many function symbols of each arity source. But of course it's possible to assign numbers to symbols systematically in such a way that, say, source and source are assigned different codes. Sequences of symbols (such as terms and formulas) are a bigger challenge. But if we can deal with sequences of numbers purely arithmetically (e.g., by the powers-of-primes coding of sequences), we can extend the coding of individual symbols to coding of sequences of symbols, and then further to sequences or other arrangements of formulas, such as derivations. This extended coding is called “Gödel numbering.” Every term, formula, and derivation is assigned a Gödel number.
By coding sequences of symbols as sequences of their codes, and by choosing a system of coding sequences that can be dealt with using computable functions, we can then also deal with Gödel numbers using computable functions. In practice, all the relevant functions will be primitive recursive. For instance, computing the length of a sequence and computing the source-th element of a sequence from the code of the sequence are both primitive recursive. If the number coding the sequence is, e.g., the Gödel number of a formula source, we immediately see that the length of a formula and the (code of the) source-th symbol in a formula can also be computed from the Gödel number of source. It is a bit harder to prove that, e.g., the property of being the Gödel number of a correctly formed term or of a correct derivation is primitive recursive. It is nevertheless possible, because the sequences of interest (terms, formulas, derivations) are inductively defined.
As an example, consider the operation of substitution. If source is a formula, source a variable, and source a term, then source is the result of replacing every free occurrence of source in source by source. Now suppose we have assigned Gödel numbers to source, source, source---say, source, source, and source, respectively. The same scheme assigns a Gödel number to source, say, source. This mapping---of source, source, and source to source---is the arithmetical analog of the substitution operation. When the substitution operation maps source, source, source to source, the arithmetized substitution function maps the Gödel numbers source, source, source to the Gödel number source. We will see that this function is primitive recursive.
Arithmetization of syntax is not just of abstract interest, although it was originally a non-trivial insight that languages like the language of arithmetic, which do not come with mechanisms for “talking about” languages can, after all, formalize complex properties of expressions. It is then just a small step to ask what a theory in this language, such as Peano arithmetic, can prove about its own language (including, e.g., whether sentences are provable or true). This leads us to the famous limitative theorems of Gödel (about unprovability) and Tarski (the undefinability of truth). But the trick of arithmetizing syntax is also important in order to prove some important results in computability theory, e.g., about the computational power of theories or the relationship between different models of computability. The arithmetization of syntax serves as a model for arithmetizing other objects and properties. For instance, it is similarly possible to arithmetize configurations and computations (say, of Turing machines). This makes it possible to simulate computations in one model (e.g., Turing machines) in another (e.g., recursive functions).
Source file content/incompleteness/arithmetization-syntax/coding-symbols.tex
Coding Symbols
The basic language source of first order logic makes use of the symbols
together with enumerable sets of variables and constant symbols, and enumerable sets of function symbols and predicate symbols of arbitrary arity. We can assign codes to each of these symbols in such a way that every symbol is assigned a unique number as its code, and no two different symbols are assigned the same number. We know that this is possible since the set of all symbols is enumerable and so there is a bijection between it and the set of natural numbers. But we want to make sure that we can recover the symbol (as well as some information about it, e.g., the arity of a function symbol) from its code in a computable way. There are many possible ways of doing this, of course. Here is one such way, which uses primitive recursive functions. (Recall that source is the number coding the sequence of numbers source, dots, source.)
Definition of symbol codes
If source is a symbol of source, let the symbol code source be defined as follows:
Primitive recursive recognition of function and predicate symbol codes
The following relations are primitive recursive:
Definition of a string Goedel number
If source is a sequence of symbols, its Gödel number is source.
Explain
Note that codes and Gödel numbers are different things. For instance, the variable source has a code source. But the variable source considered as a term is also a sequence of symbols (of length source). The Gödel number source of the term source is source.
Worked Goedel number of a prefix equality formula
Recall that if source, dots, source is a sequence of numbers, then the code of the sequence source in the power-of-primes coding is
where source is the source-th prime (starting with source). So for instance, the formula source, or, more explicitly, source, has the Gödel number
Source file content/incompleteness/arithmetization-syntax/coding-terms.tex
Coding Terms
Explain
A term is simply a certain kind of sequence of symbols: it is built up inductively from constants and variables according to the formation rules for terms. Since sequences of symbols can be coded as numbers---using a coding scheme for the symbols plus a way to code sequences of numbers---assigning Gödel numbers to terms is not difficult. The challenge is rather to show that the property a number has if it is the Gödel number of a correctly formed term is computable, or in fact primitive recursive.
Variables and constant symbols are the simplest terms, and testing whether source is the Gödel number of such a term is easy: source holds if source is source for some source. In other words, source is a sequence of length source and its single element source is the code of some variable source, i.e., source is source for some source. Similarly, source holds if source is source for some source. Both of these relations are primitive recursive, since if such an source exists, it must be source:
Primitive recursive recognition of terms and closed terms
The relations source and source which hold iff source is the Gödel number of a term or a closed term, respectively, are primitive recursive.
Proof
A sequence of symbols source is a term iff there is a sequence source, dots, source of terms which records how the term source was formed from constant symbols and variables according to the formation rules for terms. To express that such a putative formation sequence follows the formation rules it has to be the case that, for each source, either
source is built from source terms source, dots, source occurring prior to place source using an source-place function symbol source.
To show that the corresponding relation on Gödel numbers is primitive recursive, we have to express this condition primitive recursively, i.e., using primitive recursive functions, relations, and bounded quantification.
Suppose source is the number that codes the sequence source, dots, source, i.e., source. It codes a formation sequence for the term with Gödel number source iff for all source:
source, or
source, or
there is an source and a number source such that each source is equal to some source for source and
and moreover source. (The function source turns the sequence source into source and is primitive recursive.)
The indices source, source, the Gödel numbers source of the terms source, and the code source of the sequence source, in (3) are all less than source. We can replace source above with source. Hence we can express “source is the code of a formation sequence of the term with Gödel number source” in a way that shows that this relation is primitive recursive.
We now just have to convince ourselves that there is a primitive recursive bound on source. But if source is the Gödel number of a term, it must have a formation sequence with at most source terms (since every term in the formation sequence of source must start at some place in source, and no two subterms can start at the same place). The Gödel number of each subterm of source is of course source. Hence, there always is a formation sequence with code source, where source.
For source, simply leave out the clause for variables.
Exercise on flattening coded lists of terms
Show that the function source, which turns the sequence source into source, is primitive recursive.
Primitive recursive coding of numerals
The function source is primitive recursive.
Proof
We define source by primitive recursion:
Source file content/incompleteness/arithmetization-syntax/coding-formulas.tex
Coding formula
Once we have defined the relation source primitive recursively, we can use it to define the corresponding relation for formulas, source primitive recursively.
Primitive recursive recognition of atomic formula codes
The relation source which holds iff source is the Gödel number of an atomic formula, is primitive recursive.
Proof
The number source is the Gödel number of an atomic formula iff one of the following holds:
Primitive recursive recognition of formula codes
The relation source which holds iff source is the Gödel number of a formula is primitive recursive.
Proof
A sequence of symbols source is a formula iff there is a formation sequence source, dots, source of formulas which records how source was formed from atomic formulas according to the formation rules. The code for each source (and indeed of the code of the sequence source) is less than the code source of source.
Exercise giving the detailed formula coding proof
Give a detailed proof of the proposition that the formula code predicate is primitive recursive along the lines of the first proof of the proposition that the term code predicate is primitive recursive.
Primitive recursive recognition of free variable occurrences
The relation source, which holds iff the source-th symbol of the formula with Gödel number source is a free occurrence of the variable with Gödel number source, is primitive recursive.
Proof
Exercise.
Exercise proving the free occurrence relation primitive recursive
Prove the proposition that free occurrence is primitive recursive. You may make use of the fact that any substring of a formula which is a formula is a sub-formula of it.
Primitive recursive recognition of sentence codes
The property source which holds iff source is the Gödel number of a sentence is primitive recursive.
Proof
A sentence is a formula without free occurrences of variables. So source holds iff
Source file content/incompleteness/arithmetization-syntax/substitution.tex
Substitution
Recall that substitution is the operation of replacing all free occurrences of a variable source in a formula source by a term source, written source. This operation, when carried out on Gödel numbers of variables, formulas, and terms, is primitive recursive.
Primitive recursive arithmetized substitution
There is a primitive recursive function source with the property that
Proof
We can then define a function source by primitive recursion as follows:
Primitive recursive free for substitution relation
The relation source, which holds iff the term with Gödel number source is free for the variable with Gödel number source in the formula with Gödel number source, is primitive recursive.
Proof
Exercise.
Exercise proving the free for relation primitive recursive
Prove the proposition that the free for relation is primitive recursive
Source file content/incompleteness/arithmetization-syntax/proofs-in-lk.tex
derivation in source
Explain
In order to arithmetize derivations, we must represent derivations as numbers. Since derivations are trees of sequents where each inference carries also a label, a recursive representation is the most obvious approach: we represent a derivation as a tuple, the components of which are the end-sequent, the label, and the representations of the sub-derivations leading to the premises of the last inference.
Coding L K sequents and derivations
If source is a finite sequence of sentences, source, then source.
If source is a sequent, then a Gödel number of source is
If source is a derivation in source, then source is defined as follows:
If source consists only of the initial sequent source, then source is
If source ends in an inference with one or two premises, has source as its conclusion, and source and source are the immediate subproof ending in the premise of the last inference, then source is
respectively, where source is given by the following table according to which rule was used in the last inference:
The table pairs each inference rule with its numerical code. Codes one through six are left and right weakening, contraction, and exchange in that order. Codes seven through twelve are left and right negation, conjunction, and disjunction in that order. Codes thirteen through eighteen are left and right conditional, universal quantifier, and existential quantifier in that order. Cut has code nineteen and equality has code twenty. Each rule and code is available as an explicit row in the linearized table.
L K inference rule code table Rule: left weakening right weakening left contraction right contraction left exchange right exchange source: 1 2 3 4 5 6 Rule: left negation right negation left conjunction right conjunction left disjunction right disjunction source: 7 8 9 10 11 12 Rule: left conditional right conditional left universal quantifier right universal quantifier left existential quantifier right existential quantifier source: 13 14 15 16 17 18 Rule: cut = source: 19 20
Example coding a three node L K derivation
Consider the very simple derivation
Proof tree for the implication from a conjunction to its first conjunct
Three sequent nodes form one branch. The top initial sequent has capital A on both sides. Applying left conjunction yields the middle sequent with the conjunction of capital A and capital B on the left and capital A on the right. Applying right conditional to that middle node yields the bottom sequent with an empty left side and the implication from the conjunction to capital A on the right. Each inference has one premise.
The Gödel number of the derivation consisting only of the initial sequent would be source. The Gödel number of the derivation ending in the conclusion of source would be source (source since source has one premise, the Gödel number of the conclusion source, and source is the number coding source). The Gödel number of the entire derivation then is source, i.e.,
Explain
Having settled on a representation of derivations, we must also show that we can manipulate such derivations primitive recursively, and express their essential properties and relations so. Some operations are simple: e.g., given a Gödel number source of a derivation, source gives us the Gödel number of its end-sequent and source the code of its last rule. The property source defined by
holds of source iff source is the Gödel number of a sequent consisting of sentences. Some are much harder. We'll at least sketch how to do this. The goal is to show that the relation “source is a derivation of source from source” is a primitive recursive relation of the Gödel numbers of source and source.
Primitive recursiveness of checking the last L K inference
The property source which holds iff the last inference in the derivation source with Gödel number source is correct, is primitive recursive.
Proof
source is an initial sequent if either there is a sentence source such that source is source, or there is a term source such that source is source. In terms of Gödel numbers, source holds iff
We also have to show that for each rule of inference source the relation source is primitive recursive, where source holds iff source is the Gödel number of derivation source, and the end-sequent of source follows by a correct application of source from the immediate sub-derivations of source.
A simple case is that of the right conjunction rule. If source ends in a correct source inference, it looks like this:
Two premise right conjunction inference
The omitted subderivation pi sub one ends in a sequent with Gamma on the left and Delta followed by capital A on the right. The omitted subderivation pi sub two ends in a sequent with the same Gamma on the left and the same Delta followed by capital B on the right. Right conjunction uses those two ordered premises to conclude the sequent with Gamma on the left and Delta followed by the conjunction of capital A and capital B on the right. The blank top boxes are layout placeholders for omitted derivations, not additional axioms or empty sequents.
So, the last inference in the derivation source is a correct application of source iff there are sequences of sentences source and source as well as two sentences source and source such that the end-sequent of source is source, the end-sequent of source is source, and the end-sequent of source is source. We just have to translate this into Gödel numbers. If source then source and source. So, source holds iff
The individual lines express, respectively, “there is a sequence (source) with Gödel number source, there is a sequence (source) with Gödel number source, a formula (source) with Gödel number source, and a formula (source) with Gödel number source,” such that “the end-sequent of source is source,” “the end-sequent of source is source,” “the end-sequent of source is source,” and “source has two immediate subderivations and the last inference rule is source (with number source).”
The last inference in source is a correct application of source iff there are sequences source and source, a formula source, a variable source, and a term source, such that the end-sequent of source is source and the end-sequent of source is source. So in terms of Gödel numbers, we have source iff
We then define source as
The first line ensures that the end-sequent of source is actually a sequent consisting of sentences. The last line covers the case where source is just an initial sequent.
Exercise on coding four further L K inference rules
Define the following properties as in the proposition on primitive recursive inference correctness:
For the last one, you will have to also show that you can test primitive recursively if the last inference of the derivation with Gödel number source satisfies the eigenvariable condition, i.e., the eigenvariable source of the source does not occur in the end-sequent.
Primitive recursiveness of correct L K derivation codes
The relation source which holds if source is the Gödel number of a correct derivation source, is primitive recursive.
Proof
A derivation source is correct if every one of its inferences is a correct application of a rule, i.e., if every one of its sub-derivations ends in a correct inference. So, source iff
Primitive recursive proof relation from a primitive recursive premise set
Suppose source is a primitive recursive set of sentences. Then the relation source expressing “source is the code of a derivation source of source for some finite source and source is the Gödel number of source” is primitive recursive.
Proof
Suppose “source” is given by the primitive recursive predicate source. We have to show that source which holds iff source is the Gödel number of a sentence source and source is the code of an source-derivation with end-sequent source is primitive recursive.
By the previous proposition, the property source which holds iff source is the code of a correct derivation source in source is primitive recursive. If source is such a code, then source is the code of the end-sequent of source, and so source is the code of the left side of the end sequent and source the right side. So we can express “the right side of the end-sequent of source is source” as source. The left side of the end-sequent of source is of course automatically finite, we just have to express that every sentence in it is in source. Thus we can define source by
Source file content/incompleteness/arithmetization-syntax/proofs-in-nd.tex
derivation in Natural Deduction
Explain
In order to arithmetize derivations, we must represent derivations as numbers. Since derivations are trees of formulas where each inference carries one or two labels, a recursive representation is the most obvious approach: we represent a derivation as a tuple, the components of which are the number of immediate sub-derivations leading to the premises of the last inference, the representations of these sub-derivations, and the end-formula, the discharge label of the last inference, and a number indicating the type of the last inference.
Coding natural deduction derivations
If source is a derivation in natural deduction, then source is defined inductively as follows:
If source consists only of the assumption source, then source is source. The number source is source if it is an undischarged assumption, and the numerical label otherwise.
If source ends in an inference with zero, one, two, or three premises, then source is
respectively. Here source, source, source are the sub-derivations ending in the premise(s) of the last inference in source, source is the conclusion of the last inference in source, source is the discharge label of the last inference (source if the inference does not discharge any assumptions), and source is given by the following table according to which rule was used in the last inference.
The table assigns sixteen rule codes. It pairs introduction and elimination for conjunction, disjunction, conditional, and negation; then intuitionistic and classical falsity rules; then introduction and elimination for universal quantification, existential quantification, and equality. The reading gives every rule and its corresponding code.
Natural deduction rule code table Rule: conjunction introduction conjunction elimination disjunction introduction disjunction elimination source: 1 2 3 4 Rule: conditional introduction conditional elimination negation introduction negation elimination source: 5 6 7 8 Rule: intuitionistic falsity rule classical falsity rule universal quantifier introduction universal quantifier elimination source: 9 10 11 12 Rule: existential quantifier introduction existential quantifier elimination equality introduction equality elimination source: 13 14 15 16
Example of a recursively coded derivation
Consider the very simple derivation
Deriving a conditional from a conjunction assumption
A single branch has three nodes. The leaf is capital A and capital B under discharge label one. Conjunction elimination yields capital A without discharging it. Conditional introduction yields if capital A and capital B then capital A and discharges the original label one assumption.
The Gödel number of the assumption would be source. The Gödel number of the derivation ending in the conclusion of source would be source (source since source has one premise, the Gödel number of conclusion source, source because no assumption is discharged, and source is the number coding source). The Gödel number of the entire derivation then is source, i.e.,
Explain
Having settled on a representation of derivations, we must also show that we can manipulate Gödel numbers of such derivations primitive recursively, and express their essential properties and relations. Some operations are simple: e.g., given a Gödel number source of a derivation, source gives us the Gödel number of its end-formula, source gives us the discharge label and source the number indicating the type of the last inference. Some are much harder. We'll at least sketch how to do this. The goal is to show that the relation “source is a derivation of source from source” is a primitive recursive relation of the Gödel numbers of source and source.
Primitive recursive assumption and discharge relations
The following relations are primitive recursive:
Proof
We have to show that the corresponding relations between Gödel numbers of formulas and Gödel numbers of derivations are primitive recursive.
We want to show that source, which holds if source is the Gödel number of an assumption of the derivation with Gödel number source labelled source, is primitive recursive. This is the case if the derivation with Gödel number source is a sub-derivation of source. Note that the way we code derivations is a special case of the coding of trees introduced in the section on trees in Recursive Functions, so the primitive recursive function source gives a sequence of Gödel numbers of all sub-derivations of source (of length at most source). So we can define
We want to show that source, which holds if all assumptions with label source in the derivation with Gödel number source all are the formula with Gödel number source. But this relation holds iff source.
Primitive recursive correctness of the last inference
The property source which holds iff the last inference in the derivation source with Gödel number source is correct, is primitive recursive.
Proof
Here we have to show that for each rule of inference source the relation source is primitive recursive, where source holds iff source is the Gödel number of derivation source, and the end-formula of source follows by a correct application of source from the immediate sub-derivations of source.
A simple case is that of the conjunction introduction rule. If source ends in a correct source inference, it looks like this:
Conjunction introduction from two subderivations
The left unexpanded subderivation delta sub one concludes capital A. The right unexpanded subderivation delta sub two concludes capital B. A binary conjunction introduction combines their conclusions into capital A and capital B. No assumptions are discharged by this last step.
Then the Gödel number source of source is source where source, source, source, and source. So we can define source as
Another simple example is the source rule. This has no premises, so source, like assumptions. It also has no discharge label, i.e., source. However, source must be of the form source, for a closed term source. Here, a primitive recursive definition is
For a more complicated example, source holds iff the end-formula of source is of the form source, where the end-formula of source is source, and any assumption in source labelled source is of the form source. We can express this primitive recursively by
(Think of source as the Gödel number of source).
For another example, consider existential quantifier introduction. Here, the last inference in source is correct iff there is a formula source, a closed term source and a variable source such that source is the end-formula of the derivation source and source is the conclusion of the last inference. So, source holds iff
We then define source as
The first line ensures that the end-formula of source is a sentence. The last line covers the case where source is just an assumption.
Exercise on further inference tests
Define the following properties as in the proposition on primitive recursive inference correctness:
For the last one, you will have to also show that you can test primitive recursively if the last inference of the derivation with Gödel number source satisfies the eigenvariable condition, i.e., the eigenvariable source of the source inference occurs neither in the end-formula of source nor in an open assumption of source. You may use the primitive recursive predicate source from the proposition on primitive recursive open assumptions for this.
Primitive recursive correctness of an entire derivation
The relation source which holds if source is the Gödel number of a correct derivation source, is primitive recursive.
Proof
A derivation source is correct if every one of its inferences is a correct application of a rule, i.e., if every one of its sub-derivations ends in a correct inference. So, source iff
Primitive recursive open assumption relation
The relation source that holds if source is the Gödel number of an undischarged assumption source of the derivation source with Gödel number source, is primitive recursive.
Proof
An occurrence of an assumption is discharged if it occurs with label source in a sub-derivation of source that ends in a rule with discharge label source. So source is an undischarged assumption of source if at least one of its occurrences is not discharged in source. We must be careful: source may contain both discharged and undischarged occurrences of source.
Consider a sequence source, dots, source where source, source is the assumption source (for some source), and source is an immediate sub-derivation of source. If such a sequence exists in which no source ends in an inference with discharge label source, then source is an undischarged assumption of source.
The primitive recursive function source provides us with a sequence of Gödel numbers of all sub-derivations of source. Any sequence of Gödel numbers of sub-derivations of source is a subsequence of it. Being a subsequence of is a primitive recursive relation: source holds iff source. Being an immediate sub-derivation is as well: source iff source. So we can define source by
Primitive recursive natural deduction proof relation relative to Gamma
Suppose source is a primitive recursive set of sentences. Then the relation source expressing “source is the code of a derivation source of source from undischarged assumptions in source and source is the Gödel number of source” is primitive recursive.
Proof
Suppose “source” is given by the primitive recursive predicate source. We have to show that source which holds iff source is the Gödel number of a sentence source and source is the code of a natural deduction derivation with end formula source and all undischarged assumptions in source is primitive recursive.
By the proposition on primitive recursive derivation checking, the property source which holds iff source is the Gödel number of a correct derivation source in natural deduction is primitive recursive. Thus we can define source by
Source file content/incompleteness/arithmetization-syntax/proofs-in-ax.tex
Axiomatic derivation
Explain
In order to arithmetize axiomatic derivations, we must represent derivations as numbers. Since derivations are simply sequences of formulas, the obvious approach is to code every derivation as the code of the sequence of codes of formulas in it.
Coding axiomatic derivations as sequences
If source is an axiomatic derivation consisting of formulas source, dots, source, then source is
Example of a three line axiomatic derivation code
Consider the very simple derivation:
The three line axiomatic derivation
Line one is if capital B then capital B or capital A. Line two is the conditional from line one to if capital A then line one. Line three is if capital A then line one. The proof dependencies are from lines one and two to line three by modus ponens; this explanatory dependency is not a printed source annotation.
| Line | Formula |
|---|---|
| 1. | source |
| 2. | source |
| 3. | source |
The Gödel number of this derivation would be
Explain
Having settled on a representation of derivations, we must also show that we can manipulate such derivations primitive recursively, and express their essential properties and relations so. Some operations are simple: e.g., given a Gödel number source of a derivation, source gives us the Gödel number of its end-formula. Some are much harder. We'll at least sketch how to do this. The goal is to show that the relation “source is a derivation of source from source” is primitive recursive in the Gödel numbers of source and source.
Primitive recursive axiomatic proof checks
The following relations are primitive recursive:
Proof
We have to show that the corresponding relations between Gödel numbers of formulas and Gödel numbers of derivations are primitive recursive.
We have a given list of axiom schemas, and source is an axiom if it is of the form given by one of these schemas. Since the list of schemas is finite, it suffices to show that we can test primitive recursively, for each axiom schema, if source is of that form. For instance, consider the axiom schema
source is an instance of this axiom schema if there are formulas source and source such that we obtain source when we concatenate `source' with source with `source' with `source' with source with `source' with source and with `source'. We can test the corresponding property of the Gödel number source of source, since concatenation of sequences is primitive recursive and the Gödel numbers of source and source must be smaller than the Gödel number of source, since when the relation holds, both source and source are sub-formulas of source. Hence, we can define:
If we have such a definition for each axiom schema, their disjunction defines the property source, “source is the Gödel number of an axiom.”
The source-th line in source is justified by modus ponens iff there are lines source and source where the sentence on line source is some formula source, the sentence on line source is source, and the sentence on line source is source.
Since bounded quantification, concatenation, and source are primitive recursive, this defines a primitive recursive relation.
A line in source is justified by QR if it is of the form source, a preceding line is source for some constant symbol source, and source does not occur in source. This is the case iff
All of these can be tested primitive recursively, since the Gödel numbers of source, source, and source are less than the Gödel number of the formula on line source, and that of source less than the Gödel number of the formula on line source:
Here we assume that source and source are the Gödel numbers of the constant and variable, respectively, considered as terms (i.e., not their symbol codes). We test that source is the only free variable of source by testing if source is a sentence, and ensure that source does not occur in source by requiring that every symbol of source is different from source.
We leave the other version of QR as an exercise.
source is the Gödel number of a correct derivation iff every line in it is an axiom, or justified by modus ponens or QR. Hence:
Exercise on axiom schemas and the other quantifier rule
Define the following relations as in the proposition on primitive recursive inference correctness:
Primitive recursive axiomatic provability relation relative to Gamma
Suppose source is a primitive recursive set of sentences. Then the relation source expressing “source is the code of a derivation source of source from source and source is the Gödel number of source” is primitive recursive.
Proof
Suppose “source” is given by the primitive recursive predicate source. We have to show that the relation source is primitive recursive, where source holds iff source is the Gödel number of a sentence source and source is the code of a derivation of source from source.
By the previous proposition, the property source which holds iff source is the code of a correct derivation source is primitive recursive. However, that definition did not take into account the set source as an additional way to justify lines in the derivation. Our primitive recursive test of whether a line is justified by QR also left out of consideration the requirement that the constant source is not allowed to occur in source. It is possible to amend our definition so that it takes into account source directly, but it is easier to use source and the deduction theorem. source iff there is some finite list of sentences source, dots, source such that source. And by the deduction theorem, this is the case if source. Whether a sentence with Gödel number source is of this form can be tested primitive recursively. So, instead of considering source as the Gödel number of a derivation of the sentence with Gödel number source from source, we consider source as the Gödel number of a derivation of a nested conditional of the above form from source.
First, if we have a sequence of sentences, we can primitive recursively form the conditional with all these sentences as antecedents and given sentence as consequent:
The bound on source is given by considering that each source is the Gödel number of a sub-formula of the last line of the derivation, i.e., is less than source. The number of antecedents source, i.e., the length of source, is less than the length of the last line of source.
Source disclosures
- TR035-SAR-013: A with t substituted for every free occurrence of x, the arithmetized substitution function maps the source
- TR035-SAR-015: Source caveat. The displayed predicate construction needs the sequence coded by z to have length n, so that the number of arguments agrees with the predicate arity. The source does not state this length condition. The source argument remains visible without an unmarked repair. source
- TR035-SAR-016: Source caveat. The argument list code z need not be less than the formula code x. For the unary predicate P with index zero applied to variable v subscript one, the variable symbol code is thirty six and its term Goedel number is two to the thirty seventh power. Coding the singleton list of that term Goedel number introduces another exponentiation, and exceeds the code of the formula. A larger primitive recursive bound is needed; the source bound is preserved as a documented defect. source
- TR035-SAR-014: A sequence of symbols s is a formula if and only if there is a formation sequence s subscript zero through s subscript k minus one equals s, of formulas, which records source
- TR035-SAR-017: Source caveat. The final entry in the formation sequence is s itself, whose Goedel number equals x, not a number less than x. Moreover, coding a sequence containing x makes its sequence code larger than x under the stated coding. The strict bound asserted in the source is therefore not correct. This short source proof is preserved, and the subsequent detailed proof exercise remains unsolved. source
- TR035-SAR-018: Reader correction. Being a sentence first requires being a formula. The repaired condition says that F r m holds of x, and that every variable occurrence in the formula coded by x is not free. The source display omitted the first conjunct, and is retained in the source record. source
- TR035-SAR-019: The source calls this the Goedel number of the initial sequent. The corrected reading is the Goedel number of the derivation consisting only of that initial sequent. source
- TR035-SAR-020: An unmatched closing parenthesis after the final capital A is removed. The coded conclusion remains the sequent with an empty left side and the implication from the conjunction of capital A and capital B to capital A on the right. source
- TR035-SAR-021: An unmatched closing parenthesis in the nested initial sequent code is removed. That inner code refers to the sequent with capital A on both sides, matching the definition of p sub zero. source
- TR035-SAR-022: The abbreviated End Seq name is normalized to End Sequent, as used throughout the following argument. Its value remains the tuple component at index one plus the component at index zero of p. source
- TR035-SAR-023: The abbreviated Init Seq name is normalized to Initial Seq, the name used later for the same initial sequent predicate. source
- TR035-SAR-028: The source presents this as a sketch. The accessible formula reproduces its explicit tuple conditions; no additional syntactic domain or substitution guard has been silently inserted. source
- TR035-SAR-024: The source explanation says the end sequent of d. The corrected reading is the end sequent of p, matching the argument of Correct in the displayed definition. source
- TR035-SAR-025: The isolated Deriv of d is read as Deriv of p, matching the derivation code in the proposition and the following subtree test. source
- TR035-SAR-026: The missing closing parenthesis of Correct is restored after the selected subtree code. The reading remains that Correct holds of every entry in Subtree Sequence of p. source
- TR035-SAR-027: The source equates the sole right side entry with x, the entire derivation code. The corrected reading equates it with y, the conclusion sentence code, as the final displayed definition already does. source
- TR035-SAR-001: The end formula is a sentence and the entire following disjunction holds: a correctly numbered rule case, or the assumption case. source
- TR035-SAR-004: Preserve the printed OpenAssum formula and its literal speech. Note: the strict bound excludes the single-assumption path, whose code equals SubtreeSeq of d. Also, label zero denotes no discharge, but the displayed inequality rejects matching zeros on a path. No replacement algorithm is supplied in this edition. source
- TR035-SAR-002: Preserve source wording and formula. Note: the displayed relation says every entry of s occurs in s prime, not necessarily in the same order. The later adjacency condition separately imposes path order. source
- TR035-SAR-003: There exists a j less than component zero of d prime such that d is component j plus one of d prime. source
- TR035-SAR-007: Add the bounded existential quantifier for an earlier line j, with j less than i, before the existing quantifiers. Retain all existing predicate conditions. source
- TR035-SAR-005: does not occur source
- TR035-SAR-009: Preserve the source wording. Note: the displayed sentence test rules out other free variables but does not require x to occur, so it establishes at most x free, rather than exactly x free. source
- TR035-SAR-006: and that of c less than the Goedel number of the formula on line j source
- TR035-SAR-008: Preserve the printed freshness test. Note: it tests absence of the constant only from the antecedent, not from the quantified matrix. The book's soundness proof requires both. No additional test is inserted into this predicate. source
- TR035-SAR-010: constant and variable, respectively, considered as terms source
- TR035-SAR-011: different from the constant symbol code, component zero of c source
- TR035-SAR-012: concatenate h Conditional of s, y, and n, followed by the code of a closing parenthesis source