Skip to main content

Common destinations

    柊東雲
    Library / Books & Studies /Gödel, Escher, Bach: A Deep Study of Structure, Meaning, and the Self

    ChapterPage 6 of 22

    IV. Coding, Substitution, and Fixed Points: How Arithmetic Talks About Proofs

    An In-Depth Study of Hofstadter’s Gödel, Escher, BachHiiragi Shinonomeabout 4,658 words · 21 minLong-Form Study · Full Text

    Reading Settings
    Font Size
    Line Spacing
    Paragraphs
    Background
    Line Width
    My Reading

    Save Highlight

    Gödel, Escher, Bach: A Deep Study of Structure, Meaning, and the Self · Chapter · IV. Coding, Substitution, and Fixed Points: How Arithmetic Talks About Proofs

    Quote Share Card

    Your thought is not included

    IV. Coding, Substitution, and Fixed Points: How Arithmetic Talks About Proofs

    How can an arithmetical expression possibly “talk about itself”? If one only notes that it contains the words “this sentence,” one has come no closer to Gödel’s construction. What GEB rewards patient following is the decomposition of this seemingly mysterious capability into finitely many steps: first fix the legal expressions and proof rules, encode finite strings as natural numbers, then represent operations on strings as arithmetical relations, and finally obtain a fixed point through an effective substitution.

    This chapter reconstructs that route in commonly used modern notation, without copying the book’s full TNT typesetting, so that the object language, the metalanguage, and the teaching abbreviations stay apart. The reader will see that self-reference can be a rigorous syntactic construction that requires no psychological self inside the sentence. A coding that corresponds to itself is still far from understanding, from determining truth, or from complete knowledge about oneself.

    4.1 Propositional Calculus Governs Only the Connections Among Complete Statements

    Propositional calculus treats complete statements as wholes and studies only how negation, conjunction, disjunction, and implication determine the truth values of compound formulas. The logical implication in it is a relation of truth values, not a causal arrow.

    Propositional calculus uses letters such as P and Q to stand for complete statements, without first analyzing whether what P says concerns numbers, weather, or some person. Under classical two-valued semantics, each propositional letter takes either the value true or false, and the truth value of a compound is fixed by the rules of connection.

    Take modus ponens as an example: from P and P→Q, infer Q. To check its soundness is to check whether there is any assignment that makes both premises true while the conclusion is false. If P and P→Q are both true, then P is true, and the implication requires Q to be true as well; so no such counterexample exists. This is an argument about the chosen semantics and the rule of inference, and it has nothing to do with “I feel it is reasonable.”

    In classical propositional calculus, P→Q asserts only that if P is true then Q is true. Whether P actually occurs, whether it causes Q, and whether the speaker takes the two to be related are not part of it. If a natural-language commitment also includes responsibility, time, or pragmatic requirements, translating it merely as this connective may lose important content. The book’s Chromatic Fantasy, and Feud (pp. 177–180) is in fact organized around how two sentences combine into one: the Tortoise mixes the rule of conjunction with an illegitimate operation that splices phrases of different meaning-structure through “in,” and then questions the standing of “and.” What should be checked here is whether the combination of words preserves content; the rule of conjunction itself has not failed. The propositional calculus text that follows also reminds us that human thinking is not the same as this formal calculus. (pp. 181–198.)

    Formalization is therefore a deliberate trade-off. It clarifies certain questions of validity while attending only to part of verbal behavior. A formal system ignores some everyday meanings; whether that omission counts as a failure depends on whether those meanings belong to the problem at hand.

    4.2 Provisional Assumptions: Inner Levels May Use Outer Ones, but Not the Reverse

    A provisional assumption in a conditional proof is valid only within its own scope. An inner step may use outer assumptions that have not yet been discharged, but an outer step may not, after the inner scope is closed, unconditionally keep a conclusion obtained only from the inner assumption.

    GEB calls entering a stretch of hypothetical inference entering a “fantasy.” The metaphor is apt: we provisionally accept a proposition, reason within the situation where it holds, and what we accept provisionally has not yet been proved. (Chapter VII.) The following very short example is written in the standard form of conditional proof:

    1. Suppose P.
    2. Within the range where P is still retained, suppose Q.
    3. From the assumption P, which is still in force at the outer level, obtain P.
    4. Discharge the provisional assumption Q, obtaining Q→P.
    5. Discharge P, obtaining P→(Q→P).

    This derivation proves that if P holds, then P remains retained under the additional condition Q. P itself has not been proved. The brackets or indentation record which conditions each line depends on.

    Here one can also see why logical rules do not turn into endless approval. The characters in Two-Part Invention keep writing permissions to infer as new premises without ever applying the rule. A formal proof, by contrast, requires some actual method of checking that determines whether each step follows from existing lines by the rules. The checker can be a person or a program. It need not re-prove “the use of this rule is allowed” an infinite number of times before each application. Asking from outside whether the whole system is reliable, however, requires a mathematical account at another level.

    In classical logic, P∨¬P can be a theorem, while neither P nor ¬P need be a theorem without premises. Knowing that “one side or the other holds” does not tell us which side. Taking P as a propositional letter with no further content constraint, it is true under some assignment and false under another, yet the disjunction of the two is true under every assignment.

    This is the classical logical setting. A rigorous discussion must state which logic it has chosen and keep the same set of rules throughout its derivations. Discomfort arising from everyday language cannot alter the present derivation.

    4.3 Entering Arithmetic: Terms, Quantifiers, and Substitution All Have Scope

    Once TNT breaks statements down into the language of natural numbers, the distinction between terms and formulas, the order of quantifiers, capture during substitution, and the conditions for universal generalization all change content. These restrictions spell out dependencies that are easy to overlook when reading.

    TNT introduces the language of natural numbers: 0, successor, addition, multiplication, variables, equality, and quantifiers. For ease of reading, this text uses S for successor, + and × for addition and multiplication, and the common notation for logical connectives. They correspond to the structures the book wants to express, without copying its rule table character by character. (Chapter VIII, pp. 204–230.)

    First distinguish terms from formulas. 0, S0, and a+b are expressions denoting numerical values; a+b = b+a is a formula that can be judged true or false. The truth of a formula with free variables depends on an assignment to those variables. When all free variables are bound by quantifiers, one obtains a sentence, which can be judged true or false in a specified model.

    The scope of quantifiers changes content. ∀a∃b means that for each a one may choose a b that may differ depending on a; ∃b∀a requires one and the same b to serve for all a. In the natural numbers, “every number has a larger number” holds, while “there is a number larger than all numbers” does not. Reversing the order of quantifiers changes whether the witness may depend on earlier choices.

    Variable substitution must also avoid capture. Consider the formula ∀y(x=y): here x is free, and y is bound by the quantifier. To replace the free x by the term y, one must not write ∀y(y=y) directly, because the y that should have been supplied by the outer assignment has been seized by the quantifier. One should first rename the originally bound variable, for example writing ∀z(x=z), and then substitute, obtaining ∀z(y=z). Under the interpretation in natural numbers, the erroneous substitution yields a sentence that is always true, whereas the correct substitution still requires that a specified number equal every natural number. The two are clearly different.

    Likewise, from the provisional assumption a = 0 one obtains a = 0, but one must not immediately generalize this to ∀a(a=0). Here a is not arbitrary; it is constrained by an assumption not yet discharged. Whether generalization is permitted must be checked by whether the relevant variable occurs freely in assumptions still in force, not merely by whether the latest line is written with a quantifier. Many long proofs in the book that seem to shuffle symbols tediously are in fact guarding against replacing a local condition with a universal conclusion.

    Skilled mathematicians can often omit intermediate steps quickly. The omission is legitimate because the derivation can be reconstructed; familiarity with a conclusion does not license skipping its scope.

    4.4 A Complete Proof Skeleton for Commutativity

    The two recursive axioms of addition do not state commutativity, yet a three-step induction can prove it. Local definitions together with the permitted modes of inference suffice to establish a general relation that is not written directly into the axioms.

    Take the two recursive axioms of addition:

    a+0=a,a+S(b)=S(a+b). a+0=a,\qquad a+S(b)=S(a+b).

    These axioms specify addition in the second argument. To prove a+b = b+a, several directions must be linked step by step. Below is a complete proof skeleton, using ordinary first-order arithmetic induction rather than a line-by-line copy of the book’s 56-line formal proof.

    Step one: prove the left-hand addition of zero, namely that for every a, 0+a = a.

    The base case is 0+0 = 0, given by the first axiom. Assume 0+n = n. Then the second axiom gives 0+S(n)=S(0+n), and substituting the induction hypothesis yields S(n). Hence the property passes from n to S(n), and induction gives all natural numbers.

    This step cannot merely say “of course, zero plus anything is that thing.” The first axiom states addition of zero on the right; the induction just given is what connects it to addition of zero on the left. The symmetry one knows intuitively is, at this point, one of the things to be proved.

    Step two: prove that a successor can be moved outside a sum, namely that for arbitrary a and b, S(a)+b = S(a+b).

    Fix an arbitrary a and induct on b. When b = 0, the two sides are S(a) and S(a+0), which are equal by the first axiom. Assume S(a)+b = S(a+b). Then:

    S(a)+S(b)=S(S(a)+b)=S(S(a+b))=S(a+S(b)). \begin{aligned} S(a)+S(b) &=S\bigl(S(a)+b\bigr)\\ &=S\bigl(S(a+b)\bigr)\\ &=S\bigl(a+S(b)\bigr). \end{aligned}

    The first line uses the second axiom of addition, the second line uses the induction hypothesis, and the third line uses the second axiom again. Since a has not been subject to any special assumption, the conclusion applies to every a.

    Step three: prove commutativity.

    Induct on b, taking the proposition to be “for all a, a+b = b+a.” When b = 0, a+0 = a is given by the axiom, and 0+a = a is given by step one, so both sides are equal. Assume that for all a, a+b = b+a. For arbitrary a:

    a+S(b)=S(a+b)=S(b+a)=S(b)+a. \begin{aligned} a+S(b) &=S(a+b)\\ &=S(b+a)\\ &=S(b)+a. \end{aligned}

    The last line uses the lemma from step two. Hence the inductive step holds, yielding ∀b∀a(a+b = b+a).

    This also shows that the rules determine every consequence, yet the consequences must be discovered one by one. A finite and explicit system can have infinitely many consequences, and discovering them still requires organization, lemmas, and suitable inductive propositions.

    The above is a mathematical proof skeleton that can be re-checked step by step. To obtain a complete file made up only of original TNT characters, one that can be handed directly to a proof checker, each equality substitution, universal instantiation, and application of induction must be expanded into specific lines of the chosen calculus. Both kinds of product have their value.

    4.5 Every Instance Having a Proof Still Requires a Uniform Inductive Step

    A universal proof depends on a uniform inductive step that is itself finite. Proofs of individual instances, each given separately, do not add up to it.

    Suppose that for each concrete natural number n one can separately prove a property φ(n): 0 has one proof, 1 has another proof, 2 has yet another, and so on. This still does not provide a finite proof that all natural numbers satisfy φ together.

    Induction supplies a uniform link: prove the base case, then prove that from the property at any n one may infer the property at its successor. To write “every example tried is correct” as “induction holds” omits precisely the most important step.

    One may also imagine another rule, allowing one to infer ∀xφ(x) directly from all infinitely many instances φ(0), φ(1), φ(2), …. This is commonly called the ω-rule. It is a different mechanism from ordinary finite proof systems: how one hands infinitely many premises to a checker, and how one effectively confirms that all of them hold, must be explained separately. When discussing incompleteness, if one quietly brings such infinite capability into the system and then declares the original limitation defeated, that is a substitution by sleight of hand.

    TNT’s induction principle likewise is not fixed to handling a few sentences. Induction can be applied to any formula meeting the condition, forming a mechanically recognizable pattern; each specific proof still uses only finitely many instances. A rule of finite length can accommodate infinitely many usable instances.

    This distinction will later become one of the cores of the incompleteness argument. The system can verify one by one that each specific candidate code is not a proof of a given sentence, yet the universal claim “there is no proof at all” requires a different certificate.

    4.6 Coding: The Key Is Effective Encoding and Decoding

    The essence of coding is effectiveness: a number can be computed from a string, a string can be recovered from a number, and syntactic operations can be rewritten as integer operations. The later mechanical construction depends precisely on this effectiveness.

    For arithmetic to handle syntax, finite strings must first be turned into natural numbers. The book uses a simple decimal correspondence for MIU and a fixed-length code for TNT; Gödel’s own specific coding is only one usable choice. What matters is effective encoding and decoding, and that syntactic operations can be appropriately represented. The numbers themselves have nothing sacred about them. (Chapter IX, pp. 259–272; Chapter XIV, pp. 438–460.)

    A toy encoding of our own is enough to show the basic structure. For the alphabet {A, B}, let A have the digit 1 and B the digit 2. Prefix the string’s digits with a fixed 1, and read the result in base 3. Thus:

    StringBase-3 representationDecimal code
    Empty string11
    A114
    B125
    AA11113
    AB11214

    Appending A to a string with code n turns the code into 3n+1; appending B turns it into 3n+2. Decoding can proceed by repeatedly dividing by 3, recording the remainder 1 or 2, until only the initial prefix 1 remains. Other remainders, or an illegal end point, can be recognized as invalid codes. The fixed prefix prevents confusion between the empty string and the case of leading zeros.

    This correspondence is effective, unlike the bare claim that “finite strings and natural numbers are equally many, so pairing is always possible.” A pairing by some arbitrary, non-computable correspondence might give no way to find the number from the string or the string from the number, nor any way to transfer the substitution operation onto numbers.

    The toy encoding shows only one essential point: certain operations on symbols can be rewritten as explicit operations on integers. To handle genuine formulas, one must also encode brackets, variables, quantifiers, and sequences of formulas; check whether syntax is legal; and represent relations such as where a variable occurs freely and whether a substitution causes capture. Complexity comes from organizing all these conditions together.

    The scale of the encoding cannot be omitted either. The number of a formula may be very large, and the numeral in the object language denoting that number may be far longer than the original formula. “An effective method exists” and “it is cheap and usable under real resources” are two different things. Finite, computable, and actually runnable are three levels of requirement; the later argument depends on the first two.

    Checking a given candidate proof is finite syntactic work. Asking whether any qualifying proof exists turns the question, with its existential quantifier, into a search that may be unbounded.

    Fix an effective arithmetic theory T, and fix a suitable encoding of proofs. Let the following expression mean that p is the code of a legal proof in T whose last sentence has code n:

    Prf⁡T(p,n) \operatorname{Prf}_T(p,n)

    Given a candidate finite proof, we can check it line by line: is each line an axiom, or can it be obtained from earlier lines by the rules, and is the last line exactly the target? This is a check of one concrete certificate.

    Then define:

    Prov⁡T(n)  ≡  ∃p Prf⁡T(p,n). \operatorname{Prov}_T(n)\;\equiv\;\exists p\,\operatorname{Prf}_T(p,n).

    It asks whether there is any qualifying proof at all. Even if every candidate proof can be checked, it does not follow that the whole existential question can be decided by a program that always halts.

    “Effective” needs a precise statement. TNT’s specific axioms and rules can be mechanically recognized. When extended to theories whose axioms are merely enumerable, whether a given line is an axiom may not be directly decidable. A common treatment is to include in the proof code a finite computational certificate of when that axiom appears in the enumeration, so that the checker verifies the certificate and need not solve a waiting problem with no given bound. The standard incompleteness argument later uses exactly this sufficiently effective arithmetization.

    One must also keep three levels always distinct: p is a natural number; we externally decode it into a finite sequence of symbols; and an arithmetical formula, in some model, states that it has the corresponding coding property. Only with correct construction do these three correspond as required. A predicate that bears the word “proof” need not have the properties of a standard provability predicate.

    This is an important example that the book leaves for the question of meaning. A purely arithmetical formula can receive a very rich interpretation from outside, and whether that interpretation is correct must be supported by a specific coding and by the preservation of relations. We need not attribute intrinsic intentions to each number, nor may we declare that it speaks of proofs merely on a reader’s association.

    Original figure: the difference among effective coding, checking a concrete proof, and the existence of a proof

    4.8 Three Meanings of “Representing a Relation,” and One Slip in the Book

    The book’s definition of “representation” on p. 417 is close to weak representation, while the argument on p. 443 that the property of theorem-numbers cannot be represented requires strong representation, provable for each instance both positively and negatively. The correct lesson is that arithmetic can appropriately represent the proof relation, and the later limitations arise from exactly this.

    This slip in the book’s use of the word “representation” affects the arguments that follow. Given a natural-number relation R and a formula ρ, the following distinctions are made explicit:

    1. Semantic definition: for each standard natural number n, R(n) holds if and only if ρ(the numeral of n) is true in the standard structure of the natural numbers.
    2. Weak representation: R(n) holds if and only if T can prove ρ(the numeral of n). It does not require that the negations of non-member instances be provable.
    3. Instance-by-instance two-way representation: if R(n) holds, T can prove ρ(the numeral of n); if R(n) does not hold, T can prove its negation. When the discussion involves mutual exclusion, T is additionally kept consistent.

    “Weak” and “strong” follow different conventions in different literature, so this report gives priority to writing out the conditions. The key is not to convert a guarantee for positive evidence into a guarantee covering both positive and negative cases.

    A two-way representation has extra power. Given n, enumerate the proofs of T and wait for either ρ(the numeral of n) or its negation to appear. The two-way condition guarantees that at least one side eventually appears; consistency excludes both sides holding at once; hence one obtains a decision procedure that always halts. A weak representation guarantees only that members will be found, while non-members may leave the program waiting forever.

    So when following the weak definition on p. 417, to say directly that the relation of theorem-numbers cannot be represented goes too far.

    Concrete proof checking is a finite syntactic task that can be completed, yet universal properties about it may go far beyond instance-by-instance verification. The later construction will exploit this asymmetry fully. Once this is made clear, self-reference no longer looks like a paradox that suddenly emerges from a haze of semantics.

    4.9 A Fixed Point Obtained by a Single Finite Substitution

    For any unary formula F, the diagonal lemma gives a sentence G such that T proves G equivalent to “F applied to the code of G.” The “sameness” here is provable equivalence within the theory, arising from a single finite substitution and re-encoding.

    What follows is the standard proof framework within an arithmetic base strong enough (for example PA and suitable effective extensions of it). We write ⌜A⌝\ulcorner A\urcorner for the code of formula A, and n‾\overline n for the numeral of the natural number n in the object language. These two notations belong to the metalanguage in which we explain the formulas.

    First define an effective function d: given the code n of a unary formula, substitute the numeral n‾\overline n for its free variable, and output the code of the resulting sentence. For invalid codes, a default result is stipulated so that d is a total effective syntactic operation. It performs one finite substitution and re-encoding, rather than copying an entire sentence infinitely into itself.

    Choose an arithmetic formula D(x,y) that represents the graph of this function. The property we need is that for each specific n, basic arithmetic can prove:

    ∀y(D(n‾,y)↔y=d(n)‾). \forall y\bigl(D(\overline n,y)\leftrightarrow y=\overline{d(n)}\bigr).

    This is functionality on specific inputs. d is a function constructible from suitable primitive recursive syntactic operations, and standard arithmetization can provide such a representation. The huge definition of D is not expanded character by character here; the proof framework below relies on this representation result.

    Given any unary formula F(y), define:

    A(x)  :=  ∃y(D(x,y)∧F(y)). A(x)\;:=\;\exists y\bigl(D(x,y)\land F(y)\bigr).

    If necessary, first rename bound variables to avoid capture in the substitution. Let k be the code of A, and then let:

    G:=A(k‾). G:=A(\overline k).

    By the definition of d, d(k) is exactly the code of G. Denote it by g, so that g = ⌜G⌝\ulcorner G\urcorner. By the functionality of D on the specific input k, basic arithmetic proves:

    G↔∃y(D(k‾,y)∧F(y))↔F(g‾)↔F(⌜G⌝‾). \begin{aligned} G &\leftrightarrow\exists y\bigl(D(\overline k,y)\land F(y)\bigr)\\ &\leftrightarrow F(\overline g)\\ &\leftrightarrow F(\overline{\ulcorner G\urcorner}). \end{aligned}

    Finally we obtain:

    T⊢G↔F(⌜G⌝‾). T\vdash G\leftrightarrow F(\overline{\ulcorner G\urcorner}).

    The construction above follows the standard diagonal-lemma route. It can be compared with Section 5.1 of Knight’s Oxford lecture notes; the instance-by-instance functionality condition required has been written out above.

    This is the fixed-point form given by the diagonal lemma. The strings on the two sides of the equivalence are not identical character by character. G itself is a finite sentence; through the relation of codes and substitution, it has the property of making F act on the code of G, as intended.

    Taking F(y) = ¬Prov_T(y), G becomes provably equivalent to “the sentence whose code is G has no T-proof.” Externally one may briefly say that it expresses its own unprovability, yet the actual formula needs no “I” of everyday language to appear. Other choices of F yield other fixed points.

    Given an appropriate effective theory description and proof predicate, writing out the fixed-point sentence is an effective syntactic task. Whether the input theory is consistent, and whether we have reason to believe it is reliable for the standard natural numbers, is a separate question of warrant. Later, when discussing “stepping outside the system,” this distinction will directly constrain the human-machine arguments on both sides.

    4.10 The Gödel Sentence Concerns Provability, Not Truth

    The liar sentence places truth directly within self-reference, while the Gödel sentence uses the provability of a specific theory. The difference between truth and provability allows a sentence to be true in the standard natural numbers yet unprovable in the chosen system, without being both true and false.

    Air on G’s String (pp. 431–437) does definite work at this turn. Starting from a telephone sentence whose quotation marks cannot be heard, it proceeds through the distinction between use and mention and through quotation operations to construct the indirectly self-referential “Tortoise love song,” and finally replaces the corresponding predicate with a false assertion and returns to resolve the opening. The love song points to itself without immediately producing a paradox; it is the change of predicate that alters the logical responsibility. The analysis in this chapter, which follows, still needs to separate truth from provability again; the dialogue itself has not yet completed the provability fixed point of arithmetic.

    “This sentence is false” places truth directly within self-reference. The difference between truth and provability is precisely what grounds the conclusion of the Gödel sentence.

    Defining, within the same arithmetic language, a fully correct truth predicate for all true arithmetic sentences runs into another kind of diagonal problem, namely the Tarski undefinability argument discussed later. That is a reductio of the assumption that some global truth predicate exists. It does not produce, in standard arithmetic, a sentence that is both true and false.

    G speaks of a definite syntactic provability relation, not of temperature, resources, feelings, or social roles. To expand this finite and precise self-reference into “the system fully knows itself” erases the most valuable part of the construction. A system that can generate an expression concerning its own proof rules points at this one relation, which can be explained item by item. That is far from grasping all of its own running states.

    4.11 Finite Coding Gives a Rigorous Self-Reference

    Finite coding, substitution, and the representation of relations are enough to establish a rigorous self-reference. No prior internal observer is needed. They provide a constructible model for programs as data, self-description, and meta-level inference.

    “Talking about itself” thus ceases to be an unanalyzable linguistic magic. The bridge between formal operations and interpretation has to be built with proof. The syntactic work must be coded correctly, variables and scopes must not be substituted by sleight of hand, and checking a concrete proof must not be confused with an unbounded existence question. If a theory claims to derive high-level meaning from low-level activity, it should also bear a corresponding bridging responsibility: it must state which relations are preserved and which capabilities actually form, rather than drawing two levels and then writing a single arrow between them.

    These results supply a standard. When we say that a system represents something, including representing itself, we must at least be able to distinguish external interpretation, internal usable structure, and actual operation. The next chapter examines how this finite and effective self-reference produces incompleteness. Beyond that, we will ask how active symbols can go beyond a static correspondence with codes on paper and enter perception, inference, and choice.


    Player

    Listening Room

    Only By Chasing the Wind

    唯有追赶风的方向Robin / HOYO-MiX / Chevy

    0:00 2:03