Lecture 5: Termination of proof reduction in Deduction modulo theories
Teacher: Gilles Dowek
Theories:
 Arithmetic
 Simple Type Theory (implemented in HOL Light (Amazon), Isabelle/HOL (Cambridge), HOL4 (Munich))
 Dependent Type Theory (Coq, Agda, Lean, …)
Right now: termination of proof reduction in predicate logic
Oddly: termination of $λ$calculus: similar technique here → because everything can be expressed in a unifying proof langugage (BHK interpretation, interpretation of proof: Curryde BruijnHoward)
Derivation tree:
 one way to check that a proof is wellformed: go through the derivation tree and check each node ⇒ at each step: “which rule may apply”? ⟶ so you have to check all of them
 workaround: label the nodes of the derivation tree with the names of the rules, and check (only one rule to check at each step)
 if you just write the name of the rules, and not the conclusions: you can reconstruct the full tree
or
or you could just specify the names of the rules:
this is a proof term
Shorthand for the one above:
Problem: with the axiom sequents! The name of the rule is not enough anymore! So the relation associating a conclusion to premises must be a function (which is not the case for $axiom$) ⟶ replace axiom by functions $axiom_{P,Q ⊢ P}$ (disambiguation of the axiom rule so that we have a family of functions).
Example of proof term with axiom rules:
But this is not the way we will represent proofs. We will forget about the contexts: in ND, contexts are almost always the same (except for bookkeeping with $⇒$intro, etc…):
where you know you’re in the context $α ≝ P, β ≝ Q$
But some rules, as $⇒$intro, extend context ⟶ we add named hypotheses to our proof: $λβ:B \, π$
Cutelimination for $⇒$ for example: from $π$ proof of $Γ, A ⊢ B$, remove the hypothesis $A$ in all sequents, replace the axiom rules on this proposition by $π’$ of $Γ ⊢ A$ ⟶ substitute $π’$ for $α$ (associated to $A$) in $π$
Rules
 $∧$intro: $⟨π, π’⟩$
 $∧$elim 1: $fst(π)$
 $∧$elim 2: $snd(π)$
 $⇒$intro: $λα:A \, π$
 $⇒$elim: $app(π, π’)$, also written $(π \, π’)$
 etc…
Proof reduction rules
Proof reduction is $β$reduction! Actually, not really, you also have:
With implication only: it’s exactly ST $λ$calculus (minimal intuitionistic logic).
BrouwerHeytingKolmogorov (BHK) interpretation
 Brouwer/Heyting: advisor/student
 Kolmogorov: discovered it independently
BHK interpretation:

How do you build a proof of $A∧B$?
 build a proof of $A$ and a proof of $B$

How do you use a proof of $A∧B$?
 to build a proof of $A$ or a proof of $B$
Balance between intro/elim: cutelimination: building and using amounts to do nothing. Same issue in social science: what’s a knife, primarily? (something which is built with a blade and a handler or something the purpose of which is to cut things?)

How do you build an ordered pair of a proof of $A$ and a proof of $B$?
 build a proof of $A$ and a proof of $B$

How do you use an ordered pair of a proof of $A$ and a proof of $B$?
 to build a proof of $A$ or a proof of $B$
A proof of $A ∧ B$ is built and used like an ordered pair ⟶ so you may as well say that they are the same (if building and using are done in the same way, you have the same objects)
Implication: trickier, but similarly: a proof of $A ⇒ B$ is an algorithm mapping proofs of $A$ to proofs of $B$
$A ⇒ B$ is an “idle” object that “waits” for a proof of $A$ to produce a proof of $B$ ⟶ it’s an algorithm
And analogously for other connectives.
Curryde BruijnHoward correspondence
Types put on proof terms:
$Φ(A)$: type of proofs of $A$
$Φ$ is an isomorphism between propositions and types (CurryHoward isomorphism)
Enriched ND (with typing rules):
Big difference with ND: derivability of $Γ ⊢ π: A$ is decidable: just look at $π$! (it’s not proof search but proof checking, whereas in ND: $Γ ⊢ A$ requires proof finding). Actually, you have a “tiny” copy of the derivation in $π$.
Termination of proof reduction in predicate logic
Like for ST $λ$calculus, we will prove: if $Γ ⊢ π$, then $π ∈ R_A$, and $π$ strongly terminates (ST).
$π ∈ R_{∀x.\, A}$ if $π$ ST and when it reduces to $λx \, π_1$, then for all term $t ∈ R_{A}$, $(π \, t) ∈ R_{(t/x)A}$. Not the same problem as in System F, as $t$ is just a term (it’s weight can be regarded as $0$).
Termination of proofreduction in some theories
Cornerstone of the course
Main tool: the notion of model
$R_A ∈ 𝒞$, where $𝒞$ is the set of candidates
Define a function $R$ mapping every proposition $A$ to a candidate $R_A$ s.t.
 $R_{A∧B} = R_A \tilde ∧ R_B, \; R_{A⇒B} = R_A \tilde ⇒ R_B$,etc.
 if $A≡B$, then $R_A = R_B$
and prove that all proofs of $A$ are in $R_A$, hence strongly terminate.
Examples:

for $P ⟶ Q ⇒ Q$:
 $R$ maps $Q$ to $\tilde ⊤$, $P$ to $\tilde ⊤ \tilde ⇒ \tilde ⊤$

doesn’t work for $P ⟶ P ⇒ Q$, as $P$ appears in negative position
In a Heyting algebra:
because:
 $\tilde ⊤ ≥ \tilde ⊤ \tilde ⇒ \tilde ⊤$ (maximality)
 $\tilde ⊤ ≤ \tilde ⊤ \tilde ⇒ \tilde ⊤ ⟺ \tilde ⊤ \tilde ∧ \tilde ⊤ ≤ \tilde ⊤$ (maximality again)
and we conclude by antisymmetry.
But this doesn’t hold for reductibility candidates: $\tilde ⊤ ≠ \tilde ⊤ \tilde ⇒ \tilde ⊤$, because $δ ≝ λα:A. (α \, α)$ is in $\tilde ⊤$ ($δ$ is ST) but not in $\tilde ⊤ \tilde ⇒ \tilde ⊤$! ($δ$ is ST but $(δ \, δ)$ is not)
So reductibility candidates form a preHeyting algebra.
Completeness property: to build models with fixpoints, as with

In ST $λ$calculus: all you have is constant functions and functions that add a constant number to its argument.
 $λx, y. SS(0)$
 $λx, y. SS(x)$
 but not $x ⟼ 2×x$, etc…
 lacking: induction. If you add it, you get Gödel System T.

Arithmetic: much more powerful programming language (you have induction in arithmetic!)
 $π: ∀x, ∃y. (x = 2 × y \; ∨ \; x = 2 × y + 1)$
so
In Arithmetic: we can encode every provably total computable function (example of non provably total computable function: an interpretor of arithmetic)
Proofs are programs and proofreduction is an interpreter.
Leave a comment