Lectures onType Theory
Chapter 66
Chapter 66Optional

System T and the Dialectica Interpretation

Prerequisites. Direct starred prerequisites: none. No later core chapter depends on this route.

An intuitionistic proof of nmA(n,m) establishes that a witness exists for every input. Its conclusion need not display the finite-type functional that computes the witness. Gödel’s Dialectica interpretation makes that hidden data explicit: positive quantifiers become witnesses, negative quantifiers become challenges, and implication transforms both.

The target of this chapter is Gödel’s System T. The source is first-order Heyting arithmetic HA, exactly as in the direct soundness theorem of Avigad and Feferman’s reconstruction [AF98]. This choice is important. The same source explains direct higher-type variants, but not full extensional E-HAω; the latter first needs a separate formal interpretation into a suitable weaker higher-type arithmetic. Nothing below silently crosses that boundary.

Primitive recursion at finite types

Finite types are generated by σ,τ::=Nστ. Products are convenient for tuples but eliminable by currying, so they are metanotation here. Terms are the simply typed lambda terms with 0:N,S:NN,Rσ:σ(Nσσ)Nσ. The computation rules are (λx.t)ut[u/x],Rσag0a, Rσag(Sn)gn(Rσagn). We take their compatible closure. This lambda presentation is definitionally intertranslatable with the typed K,S,R presentation used in the primary source [AF98].

Addition, multiplication, and triangular summation are System T terms: add:=λm.λn.RNm(λk.λr.Sr)n,mul:=λm.λn.RN0(λk.λr.addmr)n,tri:=λn.RN0(λk.λr.add(Sk)r)n. For example, tri3add3(tri2)add3(add2(add10))6. Recursion occurs on a natural number, although the accumulated result may have any finite type. Thus RNN, for example, builds a sequence of functions.

Exercise 66.1

★★☆ Use RNN to define F:NNN with F0x=x and F(Sn)x=Fn(Sx). Calculate F34, displaying every recursor step. (Twelve lines.)

Reducibility and normalization

Let SN be the terms admitting no infinite reduction sequence. Define reducibility by type: RN=SN,Rστ={tuRσ.tuRτ}. A term is neutral if it is a variable, a neutral application, or a recursor whose natural argument is neutral. The candidate facts needed below are:

  1. tRσ implies tSN;

  2. tRσ and tt imply tRσ;

  3. a neutral t:σ is in Rσ if every immediate reduct of t is;

  4. every variable is reducible.

All four are proved together by induction on σ. At arrow type, apply the term to an arbitrary reducible argument. For neutral expansion, the reducts of tu either reduce t, reduce u, or expose a head redex; nested induction on the finite reduction height of u closes the case.

Lemma 66.1 — Reducibility of primitive recursion

If aRσ, gRNσσ, and nRN, then RσagnRσ.

Proof of Lemma 66.1 — Reducibility of primitive recursion

Proof. Compatible one-step reduction is finitely branching on a finite term. Hence strong normalization of n gives a maximum reduction length. Induct on that length, with a subordinate induction on the reduction heights of a and g. Candidate closure handles reductions inside the three arguments. If the head argument is 0, the head reduct is a. If it is Sk, the head reduct is gk(Rσagk). The outer induction makes the recursive call reducible, and reducibility of g handles its two arguments. If the head argument is neutral, candidate neutral expansion applies. These are all immediate reducts. ◻

For a substitution ρ, write ρRΓ when x:σΓ implies ρ(x)Rσ.

Theorem 66.2 — Fundamental theorem

If Γt:σ and ρRΓ, then t[ρ]Rσ.

Proof of Theorem 66.2 — Fundamental theorem

Proof. Induct on the typing derivation. Variables use ρ. Application uses the arrow clause. For abstraction, extend ρ by an arbitrary reducible argument; beta expansion and the induction hypothesis give a reducible result. Zero has no reduct and therefore lies in SN. If uRN, then uSN, and every reduction of Su reduces u; hence SuSN. Thus successor satisfies the arrow clause. The recursor case is lemma 66.1. ◻

Corollary 66.3 — Normalization and numerical canonicity

Every well-typed System T term is strongly normalizing. Every closed normal term of type N is a numeral.

Proof of Corollary 66.3 — Normalization and numerical canonicity

Proof. Use the identity substitution in theorem 66.2 and candidate fact 1. For canonicity, inspect a closed normal natural term. It is neither a variable nor a lambda. An application or recursor at its head would either contain a redex or have a closed neutral natural head, which does not exist. Thus it is 0 or Sn; iterate the argument. ◻

The normalization claim has the same System T signature and reduction boundary as Avigad and Feferman’s Theorem 4.3.3 [AF98].

This proof supplies normalization, not a feasible cost bound. System T functionals can have very large normalization behavior as their finite type level rises.

Exercise 66.2

★★★ Supply the arrow-type proof of candidate facts 1–3, including the nested measure needed when both function and argument reduce. Then prove that SRNN. (One page.)

The Dialectica matrix

For every arithmetic formula A, its interpretation has the form ADxy.AD(x,y), where the matrix AD is quantifier-free in the language of System T. Witness variables x and challenge variables y may be empty. If AD=xy.AD and BD=uv.BD, define: PDP(P atomic),(AB)Dx,uy,v.(ADBD),(AB)Dz,x,uy,v.((z=0AD)(z=1BD)),(z.A(z))DXz,y.AD(Xz,y,z),(z.A(z))Dz,xy.AD(x,y,z),(AB)DU,Yx,v.(AD(x,Yxv)BD(Ux,v)). Negation is implication to false, hence (¬A)DYx.¬AD(x,Yx). The functional U sends a witness for the premise to a witness for the conclusion. The functional Y sends a premise witness and a challenged conclusion to a challenge against that premise. Forgetting Y destroys the contravariant information in implication.

Exercise 66.3

★★☆ Compute the full Dialectica interpretations of nm.P(n,m)and(nm.P(n,m))k.Q(k), with P,Q atomic. Give the finite type of every extracted functional. (Half a page.)

Soundness for Heyting arithmetic

Let HA be first-order intuitionistic arithmetic with equality, zero, successor, primitive-recursive function symbols, and induction for all formulas. Let equational System T include quantifier-free propositional reasoning and induction for quantifier-free formulas. This is the exact first-order source/finite-type target pair used in the direct theorem below.

Lemma 66.4 — Deciding a matrix

For each arithmetic formula A, there is a System T term χA such that the target proves χA(x,y)=0AD(x,y). Consequently there is a term Cond selecting either of two same-typed values according to a matrix truth value.

Proof of Lemma 66.4 — Deciding a matrix

Proof. Induct on the quantifier-free matrix. Equality of natural-number terms is decidable by primitive recursion. Boolean combinations compose their characteristic terms. Define Cond by recursion on its numerical test. No decision procedure for quantified formulas is asserted. ◻

Theorem 66.5 — Dialectica soundness for HA

If HAA, then one can compute closed System T terms t such that the target proves y.AD(t,y).

Proof of Theorem 66.5 — Dialectica soundness for HA

Proof. Induct on the HA derivation. Atomic equality axioms need no witness. Conjunction introduction pairs the two witness tuples; its eliminations project one tuple. Disjunction introduction supplies tag 0 or 1; elimination combines the branch witnesses with Cond. Universal introduction abstracts the source variable into the witness functional, and elimination applies it. Existential introduction pairs the arithmetic witness with the matrix witness; elimination substitutes both into the continuation.

For implication introduction, the induction hypothesis under an assumed witness x computes a result witness Ux and identifies which premise challenge Yxv suffices for each result challenge v. These are exactly the two functionals in the implication clause. For modus ponens, suppose a realizes A, while U,Y realize AB. Instantiate the first matrix at Yav, and the second at x=a; then Ua realizes B. Thus the extracted witness is functional application.

Contraction AAA duplicates the positive witness. For a pair of challenges, lemma 66.4 and Cond select a challenge on which the required premise matrix would otherwise fail. Weakening ignores an unused witness. Exchange and associativity only rearrange tuples.

For arithmetic induction, assume extracted a realizes the base case and extracted step functionals transform a witness at n into one at Sn, while translating a challenge backwards. Define the positive witness at n by Ragn. A subordinate primitive recursion threads the final challenge backwards through the preceding stages. Target induction on n proves the resulting matrix. The defining equations for the primitive-recursive arithmetic symbols are handled by their System T representatives. These cases cover the axiom and rule schemes of the selected presentation of HA. ◻

The proof is syntax directed and local: cut or modus ponens composes extracted terms rather than globally normalizing the source proof. Avigad and Feferman state this theorem as their Theorem 2.4.1 and spell out modus ponens, contraction, matrix decision, and induction [AF98].

A witness calculated

Let Tri(n,m) be the primitive-recursive graph of triangular summation. Its defining equations prove Tri(0,0),Tri(n,m)Tri(Sn,Sn+m). Heyting arithmetic proves nm.Tri(n,m) by induction: choose 0 at the base, and from witness m choose Sn+m at the step. Because Tri is atomic, the Dialectica translation is simply FNNn.Tri(n,Fn). Following the soundness induction gives F=tri=λn.RN0(λk.λr.add(Sk)r)n. The earlier reduction calculates F(3)=6. The target proof also verifies Tri(3,6); computation alone would not establish the matrix.

Exercise 66.4

★★★ Give an HA induction proof of nm.m=nn. Run the soundness construction on that proof, write the extracted System T term, and calculate it on input 3. Distinguish the reduction trace from the target proof of the atomic matrix. (One page.)

The higher-type and classical boundary

The direct argument extends to the intensional, weakly extensional, and type-zero-equality higher-type arithmetics paired with their corresponding targets. It does not directly interpret full E-HAω. Avigad and Feferman instead describe a formal interpretation of the extensional theory into HA0ω, preserving formulas whose variables have low types, before applying Dialectica [AF98].

Likewise, classical arithmetic first uses a negative translation. Countable choice and the principles needed for classical analysis require stronger functionals, notably bar recursion. That extension is developed separately; it is not a consequence of theorem 66.5.

Seminar and practical

Suggested first pass.

Begin with exercise 66.5; then run exercise 66.7.

Exercise 66.5

★★☆ Explain the variance of U and Y in the implication clause by staging a game between a witness and a challenger. Then give a concrete formula for which deleting Y loses information. (Half a page.)

Exercise 66.6

★★☆ Prepare a boundary ledger with rows for HA, HA0ω, E-HAω, classical arithmetic, countable choice, and classical analysis. For each, state whether this chapter gives a direct interpretation, a composed interpretation, or no theorem. Cite the exact construction required in the latter two cases. (One page.)

Exercise 66.7

★★★ Practical project.system-t-witness-evaluator The companion artifact system-t-witness-evaluator implements the natural-number fragment of System T. Add multiplication, run tri3, and add a mutation that uses the predecessor index where its successor is required. Record the Kappa commands and explain which recursor equation the mutation violates. (One page plus code.)

Sources and theorem boundary

The finite-type syntax, exact Dialectica clauses, and soundness induction are from Avigad and Feferman [AF98]. The reducibility development is a Tait argument specialized to System T; Tait’s intensional interpretation is a historical primary source for finite-type proof interpretations [Tai67]. The companion course supplies evaluation and metatheory exercises [Hof24]. Bar-recursive extensions are sourced and proved separately. The extracted witness theorem here is exactly for the selected HA-to-System-T translation.

Search the book

Type to search the local edition.