Crab Canon & Topic VIII — Typographical Number Theory

6 min read

Core idea

The Crab Canon is a two-page dialogue that reads the same forwards and backwards. Achilles meets the Tortoise, they exchange pleasantries, the Crab interrupts, the conversation reverses, and the dialogue ends where it began — except the lines are now the same lines, read in the opposite order. Structurally it is a palindrome at the level of speeches, a music-theoretic retrograde inversion in prose form. Bach has a Crab Canon in the Musical Offering — one voice plays the theme forwards while the other plays it backwards, and they harmonize. Hofstadter has built the dialogue to be the same shape as Bach's piece.

Then Topic VIII introduces Typographical Number Theory (TNT) — the formal system the rest of the book has been preparing you for. TNT adds to propositional logic three crucial ingredients: numerals (0, S0, SS0, …), variables (a, b, c, …) that range over numbers, and quantifiers (∀a: "for all a," ∃a: "there exists a"). With these you can express genuine arithmetical statements: "every number has a successor," "there are infinitely many primes," "no number is its own square except 0 and 1." TNT is essentially Peano arithmetic in a typographical (string-rewriting) form.

Hofstadter's argument: TNT is expressive enough to do real number theory and structurally similar enough to mathematics that anything Gödel proves about TNT applies to formalizations of arithmetic in general. The topic exists so the reader has a concrete system in hand when the incompleteness argument arrives in Topic X.

Why it matters

The Crab Canon as indirect self-reference

The Crab Canon's two main moves — Achilles and the Tortoise describing artistic works to each other — turn out, structurally, to be the Dialogue containing them. Achilles describes Escher's Crab Canon lithograph; the Tortoise describes Bach's Crab Canon musical piece; the dialogue itself has the crab-canon structure both are talking about. The Crab character also describes a piece of DNA he has been studying, and that DNA's structure (palindromic on both strands, like real DNA hairpins) matches the Dialogue's structure too.

This is indirect self-reference: the characters in the dialogue describe a structure that the dialogue itself has, without referring to themselves directly. Hofstadter is showing that self-reference does not require the word "self" or the construction "this very sentence." A system can reference its own structure by describing something isomorphic to itself. Gödel's sentence will do the same — describing a number-theoretic property that, when decoded, refers to the sentence's own provability.

TNT's alphabet and grammar

TNT's symbols: the numeral 0, the successor function S (so S0 is 1, SSS0 is 3), the variables a, b, c, ... (with primes for more), the binary operators + and × (or in the book, the dot), parentheses, the propositional connectives ~ ∧ ∨ ⊃ from Topic VII, the quantifiers and , and the colon : used after a quantifier to indicate scope.

Examples of TNT formulas:

  • (0 + S0) = S0 — "0 + 1 = 1" (true)
  • ∀a:(a + 0) = a — "for every number a, a + 0 = a" (true; a TNT axiom)
  • ∃b:(b × b) = SSSSSSSS0 — "there exists b such that b × b = 8" (false)
  • ∀a:∃b:(b = (a × a)) — "every number has a square" (true)

Five axioms and rules of inference

TNT has five axioms (essentially Peano arithmetic's axioms) plus inference rules — the propositional rules from Topic VII, plus rules for the quantifiers (universal generalization, existential introduction, specification, induction). The induction rule is the workhorse for proofs about all natural numbers: if you can prove the base case and prove that the property carries over from n to n+1, then you may conclude the property for all numbers.

Why TNT is expressively rich enough to break

The key fact: TNT can talk about its own strings, axioms, and proofs. Hofstadter does not yet show how — that is Topic X's job — but he previews the result. Every TNT formula can be assigned a unique number (a Gödel number) by an encoding scheme that maps symbols to digits and concatenation to multiplication. Under this encoding, "TNT formula f has Gödel number n" is itself a TNT-expressible statement about n. And "there exists a proof in TNT of the formula with Gödel number n" is also TNT-expressible.

Once arithmetic is rich enough to talk about its own proofs, you have everything you need to construct the Gödel sentence: a formula G whose Gödel number g is such that G says "the formula with Gödel number g is not provable in TNT." If G were provable, TNT would prove a falsehood (inconsistency). If G is not provable, then G is true but not provable in TNT (incompleteness). The argument requires nothing exotic — only that TNT can encode statements about its own structure, which any sufficiently expressive system of arithmetic can.

The story arc from MIU to TNT

The book has been climbing an expressiveness ladder. MIU (Topic I) was four rules and three letters — too weak to do anything but the puzzle. pq (Topic II) was rich enough to encode addition. tq (Topic III) was rich enough to encode multiplication. Propositional calculus (Topic VII) was rich enough to encode logical reasoning over fixed propositions, but lacked quantifiers — so it stayed consistent and complete. TNT (Topic VIII) adds variables, quantifiers, and arithmetic on top of propositional logic, and lands at the threshold where Gödel's theorem applies. The next topic pulls the trigger.

Key takeaways

Mental model

Mental model

Practical application

The topic is a slow-burn preparation. The practical skill is learning to read formal expressions as arithmetic, and arithmetic expressions as formal statements about arithmetic.

1. Identify the quantifiers. ∀a: means "for every a"; ∃a: means "there exists an a." The scope of the quantifier extends until a matching delimiter (usually parentheses or end-of-formula). The same variable can be bound by different quantifiers in nested scopes.

2. Identify the predicate. Strip off the quantifiers and read what is inside. ∀a:∃b:(b > a) — read the inside as b > a, the predicate. Then read with the quantifiers: "for every a, there exists b such that b > a" — "every number has something bigger." True.

3. Reverse the quantifiers and check. ∃b:∀a:(b > a) — same predicate, swapped quantifiers — "there exists b such that for every a, b > a" — "there is a number bigger than every number." False. The order of quantifiers matters enormously and is the source of many subtle bugs in formal arguments.

4. Translate everyday claims into TNT and look at them. "All swans are white" is ∀x:(swan(x) ⊃ white(x)). "Some swans are not white" is its negation, ∃x:(swan(x) ∧ ~white(x)). These translations train the same skill mathematicians use when they argue about properties of numbers: render the claim formally, then check whether the form is a tautology, a contradiction, or contingent.

Example

Consider the claim "every continuous function on a closed interval attains its maximum" — the extreme value theorem. In formal real-analysis notation:

∀f:∀a,b:((continuous(f) ∧ a ≤ b) ⊃ ∃c:(a ≤ c ≤ b ∧ ∀x:(a ≤ x ≤ b ⊃ f(x) ≤ f(c))))

Decoded: for every function f, for every pair a ≤ b, if f is continuous and a ≤ b, then there exists a c in [a, b] such that for every x in [a, b], f(x) ≤ f(c). The nested quantifiers (∀f ∀a,b ∃c ∀x) carry the entire content of the theorem. Swap any two of them and you may get a different (sometimes false) statement.

This is why mathematicians spend so much time on quantifier order. Most subtle proof errors are quantifier swaps in disguise. A student who writes "for every ε, there exists a δ such that for every x..." has stated uniform continuity. A student who writes "there exists a δ such that for every x, for every ε..." has stated something else entirely, and a worse student writes "for every x, for every ε, there exists a δ" and has stated mere pointwise continuity. The propositional calculus could not distinguish these forms; TNT can. The added expressiveness is exactly what TNT buys you, and exactly what makes it vulnerable to Gödel.

The Crab Canon makes the same point in fiction: the dialogue's shape (palindromic, retrograde) cannot be expressed in the language of the dialogue's content (the chitchat between Achilles, Tortoise, and Crab). The shape is one level up. TNT's encoding lets the same kind of move happen formally — meta-level facts about TNT formulas can be expressed in TNT itself by encoding them as facts about numbers.

Continue exploring

Tags