In 1936, to say what it means for something to be computable, Turing did not describe a machine. He described a person (Turing, 1937): a clerk with a pencil, a supply of squared paper, a finite alphabet of symbols, and a small number of states of mind, who at each moment looks at one square, and according to what is there and the state he is in, writes a symbol or rubs one out, moves one square left or right, and changes state. That is all the clerk may do. Turing’s claim was that whatever a human being can calculate, a clerk so restricted can calculate, and the machine that bears his name is the clerk with the person taken out. In the same year, independently, Emil Post described a “worker” moving along a row of boxes, marking and unmarking them (Post, 1936), and arrived at the same place.

Now do the same for proving. Imagine a person who has a language of statements — letters standing for claims whose insides we do not look at, and a way of building “if this then that” from two statements — and who is permitted exactly one act: to write down a new line, provided it is one of a few fixed shapes agreed in advance, or follows from lines already written by one fixed rule. Nothing else. No insight, no appeal to what the letters mean, no step that cannot be checked by looking at the shapes of the lines on the page. A proof is what such a person produces, and the question this chapter asks of it is Turing’s question turned around: not “what can this clerk compute?” but “why should anyone believe the last line?” We shall find that the clerk has been in your compiler all along.

2.1 Formulas

First the language.

Definition 2.1 (formulas). Fix a stock of letters p,q,r,…. The formulas are defined inductively: every letter is a formula; if A and B are formulas, so is A → B, read “if A then B”, or “A implies B”; and nothing else is a formula. In one line, A,B ::= p∣A → B, with the arrow grouping to the right, so that A → B → C is A → (B → C).

That is Definition 1.9 with the word “type” replaced by the word “formula” and the word “basic type” by the word “letter”: the same grammar, the same bracket convention, the same strings. For now treat the two as different things that happen to be spelled alike, and read A → B as a statement — a claim that B follows from A — and not as a contract. (There is more to logic than →: and, or and not arrive in Chapter 3, and for all in Chapter 4. One connective is enough to see the shape of a proof, and it is the one that matters most.)

2.2 Axioms, rules, and proofs

A proof is a list of lines, and a line may be written only if it has one of a few fixed shapes or follows from earlier lines by one fixed rule. Which shapes? Two will do, and they were chosen so that one particular theorem about proofs would hold — the theorem of §2.7, which is the one your compiler relies on. The first shape says that a claim is implied by anything: if A holds, then A holds whatever else does. The second is modus ponens carried out under a hypothesis: if, given A, you have B → C, and, given A, you have B, then, given A, you have C. The rule is modus ponens itself: from an implication and its antecedent, write the consequent. Here are the two shapes and the rule; the design is Frege’s, and systems of this kind carry Hilbert’s name.

Definition 2.2 (axiom schemas and modus ponens). The axioms are all instances of two schemas:

(I)A → B → A (2.1) (II)(A → B → C) → (A → B) → A → C (2.2)

where A, B and C stand for arbitrary formulas. The one rule of inference is modus ponens: from A → B and A, infer B,

A → BA B . (2.3)

Each schema stands for infinitely many axioms, all of one shape. Both of

p → q → pand(r → s) → p → (r → s)

are instances of (I), the first with p and q for A and B, the second with r → s and p. A simple parser can test whether a given formula matches one of the two shapes, which is all the checker needs. To check an application of modus ponens a clerk finds the two cited lines and confirms, symbol for symbol, that one is exactly the other with an arrow and the new line attached. Pattern matching; no understanding required.

Here, built from the two shapes and the one rule, is the certificate.

Definition 2.3 (proof from hypotheses; theorem). Let Γ be a set of formulas, the hypotheses. A proof of A from Γ is a finite sequence of formulas

A1,A2,…,An

whose last line An is A, and in which each line Ak is justified in one of three ways:

1.
(axiom) Ak is an instance of (I) or (II);
2.
(hypothesis) Ak is a member of Γ;
3.
(modus ponens) there are two earlier lines Ai and Aj, with i,j < k, such that Ai is the formula Aj → Ak.

No other kind of line is allowed. If such a proof exists I write Γ ⊢ A, read “A is provable from Γ”. When Γ is empty the second clause never applies, and I write ⊢ A and call A a theorem.

In words: go down the list; every line must match one of the two shapes, or be one of the hypotheses, or be the B of a modus ponens whose two premises, A → B and A, both appear higher up. Higher up is the force of i,j < k: a line may cite only lines already written, which is what makes the check a single pass down the page. On the right of each line I write its justification, and “MP i, j” means modus ponens applied to line i as the implication and line j as its antecedent — the implication first, as the function came first in “(app) i, j”.

This is the definition the chapter rests on, and it is syntactic through and through: a rule is applied by matching the shapes of formulas, never by asking what they mean, and that is what makes checking mechanical. A hypothesis is used exactly like a proved line. The hypotheses are what you have been told; a proof from Γ says what follows from what you have been told; and the special case of nothing told at all is what we call a theorem. A function does not know its inputs either: it is told what kind of thing each will be — that was the context Γ of Definition 1.10 — and on that basis does its work for every input of that kind at once. We write the same symbol ⊢ in both places, and that is not an accident.

Now put the two definitions side by side. A typing, by Definition 1.11, is a list of judgements of which each line is a 𝖪, an 𝖲, a variable from the context, or an application built from two earlier lines. A proof, by Definition 2.3, is a list of formulas of which each line is an instance of (I), an instance of (II), a hypothesis from Γ, or a modus ponens on two earlier lines. Four cases and three, in the same order, of the same shapes — and the shapes themselves match, since (I) is (1.1), the type the checker gives 𝖪, and (II) is (1.2), the type it gives 𝖲. Checking a typing and constructing a proof are one activity.

2.3 Typings are proofs

Take the typing of Example 1.12 and rub out the programs. What is left of line 1,

⊢𝖲 : (A → (A → A) → A) → (A → (A → A)) → A → A,

is the formula

(A → (A → A) → A) → (A → (A → A)) → A → A,

which is an instance of schema (II). What is left of line 3, “(app) 1, 2”, is “MP 1, 2”. What is left of the whole list is a five-line proof of A → A from no hypotheses at all. The agreement is not a resemblance but an identity, and stating it takes two sentences: rub the programs out of a typing and what is left is a proof; write programs back onto a proof and what you get is a typing.

For a context Γ = x1 : A1,…,xn : An write |Γ| for the set {A1,…,An} of types in it, now read as formulas.

Theorem 2.4 (typings are proofs).

(i)
(Erasure.) Let a typing end in Γ ⊢ M : A. Replace each line Γ ⊢ N : B by the formula B, and each justification by its counterpart: (K) by (I), (S) by (II), (var) by hypothesis, and “(app) i, j” by “MP i, j”. The result is a proof of A from |Γ|.
(ii)
(Decoration.) Conversely, let A1,…,An be a proof of A from a set of formulas, and let Γ be a context that assigns a distinct variable to each hypothesis the proof uses. Decorate each line with a term: an instance of (I) with 𝖪, an instance of (II) with 𝖲, a hypothesis with its variable, and a line “MP i, j” with MiMj, where Mi and Mj decorate the cited lines. The result is a typing, ending in Γ ⊢ Mn : A.

Proof. Both directions go down the list a line at a time, checking that each line’s justification survives the change; that is what “by induction on the length of the list” means here.

(i) Every line of the typing has the same context Γ, by Definition 1.11, so take the four cases of that definition in turn.

1.
A line justified by (K) has the type B → C → B for some B and C, which erased is an instance of (I).
2.
A line justified by (S) has the type (B → C → D) → (B → C) → B → D, which erased is an instance of (II).
3.
A line justified by (var) has a type listed in Γ, which erased is a member of |Γ|: a hypothesis.
4.
A line justified by “(app) i, j” has type C, where line i has type B → C and line j has type B. Erased, line i is the formula B → C and line j is B, so “MP i, j” is a correct justification for C.

Each line of the result is justified, and the last is A.

(ii) Each axiom line is an instance of (I) or (II), so has the shape of a type that (K) or (S) assigns, and the decorated line is justified by that rule. Each hypothesis line is a formula in |Γ|, and Γ assigns it a variable, so the decorated line is justified by (var). Each line “MP i, j” concludes C from B → C at line i and B at line j; by the time we reach it, those lines have been decorated with terms Mi : B → C and Mj : B, so MiMj : C is justified by “(app) i, j”. □

So types are formulas, and a typing is a proof: not resembles one, is one, line for line, justification for justification. The two constants are the two axiom schemas with programs attached; application is modus ponens with programs attached; a variable in the context is a hypothesis with a name. Now re-read Theorem 1.16 with the programs rubbed out. A 𝖪 step rewrites 𝖪PQ to P. In the proof, the line for 𝖪PQ was reached as follows: a proof of A (the lines for P), then an instance of (I) saying A → B → A, a modus ponens giving B → A, a proof of B (the lines for Q), and a modus ponens giving A. That is a detour: A was already in hand, and the proof went out through B and came back to it. The step deletes the detour and keeps the proof of A that was there all along. An 𝖲 step is a detour of the same kind through (II). So running a program is removing detours from a proof, and subject reduction is the statement that a proof with a detour removed is still a proof of the same formula. Everything the checker does with its four cases is therefore something a logician would recognise. The next two sections write proofs, and every proof written there is also a program typed.

2.4 A first proof (practice)

The point of the drill is to see what a proof looks like on the page and what checking one involves. The claim is ⊢ p → p: that “p implies p” is a theorem, provable from no hypotheses. Each line carries its justification on the right; the square brackets give the formulas substituted for the schema’s letters A,B,C, in that order.

1.
(p → (p → p) → p) → (p → (p → p)) → p → p (II) [p,p → p,p]
2.
p → (p → p) → p (I) [p,p → p]
3.
(p → (p → p)) → p → p MP 1, 2
4.
p → (p → p) (I) [p,p]
5.
p → p MP 3, 4

Five lines to prove that p implies p. Each is trivial to check: lines 1, 2 and 4 are matched against two shapes, and lines 3 and 5 against the two lines they cite.

Line 1 is not trivial to find, and it is worth seeing how one would find it, because the thinking runs backwards from the goal, which is how all proof-finding runs. The goal p → p is not an axiom, so it must come by modus ponens, from some C and C → (p → p). Could the second of these be an instance of (I)? Then C would be p, and we would need a proof of p on its own, which there cannot be — p is a bare letter, and nothing in the system proves a bare letter, as Chapter 3 confirms. So try (II): its last part, A → C, must be p → p, which fixes A = C = p and leaves B free; and both premises, p → (B → p) and p → B, will be instances of (I) if we choose B to be p → p. That is line 1. The search took a paragraph; the check takes none.

Now put this proof beside Example 1.12, the typing of 𝖲𝖪𝖪 at A → A, and read the two lists line by line. Line 1 there was (S) at [A,A → A,A]; line 1 here is (II) at [p,p → p,p]. Line 3 there was (app) 1, 2; line 3 here is MP 1, 2. With p for A, and the programs rubbed out, the two lists are the same list: Theorem 2.4 on a five-line example.

2.5 Structural facts

Two proofs from hypotheses first, both of which are wanted later. The short one: a proof that {p}⊢ q → p. The hypothesis is p; we are to show that q → p follows from it.

1.
p → q → p (I) [p,q]
2.
p hypothesis
3.
q → p MP 1, 2

Now hypothetical syllogism, the rule that chains two implications: from p → q and q → r, conclude p → r. As a claim about provability it is {p → q,q → r}⊢ p → r, and here is the proof.

1.
q → r hypothesis
2.
(q → r) → p → (q → r) (I) [q → r,p]
3.
p → (q → r) MP 2, 1
4.
(p → (q → r)) → (p → q) → p → r (II) [p,q,r]
5.
(p → q) → p → r MP 4, 3
6.
p → q hypothesis
7.
p → r MP 5, 6

Read the blocks, not the symbols. Lines 1–3 take the hypothesis q → r and weaken it, by (I), to p → (q → r): a statement that says less, since it only promises q → r once p is given. Lines 4–5 put that through (II), which turns “given p, q implies r” into “if p gives q then p gives r”. Line 7 fires the result on the other hypothesis. Every Hilbert proof has this character: a few ideas, spelled out at a length the checker can follow. (If you did Exercise 1.3, you have seen this list before, with programs on it.)

Example 2.5 (the two erasures). Example 1.12, the typing of 𝖲𝖪𝖪 at A → A, erases to the five-line proof of ⊢ p → p in §2.4, with p for A; and that proof, decorated, gives back 𝖲𝖪𝖪. The identity function is the proof that p implies p. Exercise 1.3(a), the typing of 𝖲(𝖪f)g in the context f : B → C,g : A → B, erases to the seven-line proof of hypothetical syllogism just given, with A,B,C for p,q,r: the two (var) lines are the two hypotheses, and the two uses of (app) that build 𝖪f and 𝖲(𝖪f) are the two uses of modus ponens that weaken q → r and push it through (II). Composition, applied to two functions, is the proof that chains two implications.

Four facts about ⊢ follow straight from the definition, and each is used without comment from here on. They are the kind of thing a programmer takes for granted about scope, and it is worth seeing that logic has to earn them.

Proposition 2.6 (structural facts). For all sets of formulas Γ and Δ and all formulas A and B:

1.
(reflexivity) if A ∈Γ then Γ ⊢ A;
2.
(monotonicity) if Γ ⊆Δ and Γ ⊢ A then Δ ⊢ A;
3.
(transitivity) if Γ ⊢ A and Δ ∪{A}⊢ B then Γ ∪Δ ⊢ B;
4.
(finiteness) if Γ ⊢ A then Γ0 ⊢ A for some finite Γ0 ⊆Γ.

Proof. In each case the job is to exhibit a proof of the required kind, built from the proofs we are given; nothing is said about what the formulas mean, only about lists.

(1)
The one-line sequence A is a proof of A from Γ: its only line is justified as a hypothesis, because A is a member of Γ.
(2)
A proof of A from Γ is already a proof of A from Δ: every line justified as a member of Γ is a member of Δ too, because Γ ⊆Δ, and the other two kinds of line do not mention Γ.
(3)
Write out the proof of A from Γ, and after it the proof of B from Δ ∪{A} with every line justified as “hypothesis A” deleted; each modus ponens that cited one of the deleted lines now cites the last line of the first proof, which is A. Every remaining hypothesis is in Γ or in Δ, so the result is a proof of B from Γ ∪Δ.
(4)
A proof is a finite list, so only finitely many of its lines are justified as hypotheses. Let Γ0 be the set of formulas on those lines: a finite subset of Γ, and the same list is a proof of A from Γ0.

Only the third item rewrites a proof; in the others the list we are given, or the one line A, serves as it stands. □

In the language of programs: a variable in scope may be used (1); extra names in scope do no harm (2); a helper function may be inlined at its call sites (3); and a program is a finite text (4). The third fact is the one to remember, because it says that proofs compose: a theorem, once proved, may be used as a line in any later proof, just as a function, once written, may be called. Item (4) looks trivial and will matter in Chapter 9. What the checker cannot do is type a definition with a parameter, and what we cannot yet see is what that has to do with logic. The next section shows what it costs a proof to do without such a rule, and the one after shows that the rule was there all the time.

2.6 The cost of an implication

Hypothetical syllogism in §2.5 was proved from its two implications, written down as hypotheses. Suppose instead we want it as a theorem, with no hypotheses at all: the single formula

(q → r) → (p → q) → p → r,

“if q implies r then, if p implies q, p implies r”. Here is a proof from the schemas alone. To keep it legible I abbreviate

P := q → r,Q := p → q → r,R := (p → q) → p → r,

so that the goal is P → R.

1.
(P → Q → R) → (P → Q) → P → R (II) [P,Q,R]
2.
Q → R, that is, (p → q → r) → (p → q) → p → r (II) [p,q,r]
3.
(Q → R) → P → (Q → R) (I) [Q → R,P]
4.
P → Q → R MP 3, 2
5.
(P → Q) → P → R MP 1, 4
6.
P → Q, that is, (q → r) → p → (q → r) (I) [q → r,p]
7.
P → R MP 5, 6

Seven lines again, and each checks in a moment. But look at line 1. With the abbreviations undone it is an instance of (II) with twenty letters and nineteen arrows, and nobody finds it by thinking about what implication means. Compare it with the proof from hypotheses. There, q → r and p → q were simply written down as lines 1 and 6, and the five lines in between did the work. Here the two hypotheses have been pushed into the formula: line 6 is q → r weakened by (I) exactly as line 2 was there, line 2 here is the instance of (II) that was line 4 there, and line 1 is an instance of (II) whose only job is to carry out, under the hypothesis P, the modus ponens that line 5 performed in the open. The closed proof contains the open one, rebuilt one level up.

That is the cost of an implication in this system. To prove A → B outright, you cannot assume A and derive B, because “assume” is not one of the three kinds of line; you must build the proof of B with A threaded through every step, by instances of (II) that grow with the formulas they carry. For a conclusion with one arrow it is a nuisance; for one with three it is unmanageable (try flip, Exercise 2.3); and every function you have ever written has an arrow in its type for every parameter. A clerk restricted to two shapes and one rule cannot prove anything of the form A → B without an instance of (II) that nobody would write down unprompted. Yet the typing of Exercise 1.3(b) is this proof — line for line, (S) for (II), (K) for (I) — and a compiler produces that typing in a microsecond. Something finds these lines. The next section says what.

2.7 The Deduction Theorem

The clerk may not assume. But it turns out that the clerk does not need to, because anything that can be proved by assuming A can be proved without, and there is a mechanical procedure that does the conversion. The claim is that whenever B has a proof from Γ together with A, the implication A → B has a proof from Γ alone; and the proof of the claim is a transformation of proofs, which takes a proof of B that uses A as a hypothesis and rewrites it, line by line, into one that does not.

Theorem 2.7 (Deduction Theorem). For every set of formulas Γ and all formulas A and B,

Γ ∪{A}⊢ B⟺Γ ⊢ A → B.

Proof. There are two directions. Right to left is one use of modus ponens. Left to right is the transformation: we go down the given proof of B a line at a time and, for each line Ak, write out a proof of A → Ak from Γ alone, using the proofs already written for the earlier lines; when we reach the last line, which is B, we have a proof of A → B. (That is what “by induction on k” means.)

Right to left. Suppose Γ ⊢ A → B. Take a proof of A → B from Γ; it is also a proof from Γ ∪{A}, by monotonicity (Proposition 2.6(2)). Add two lines: A, justified as a hypothesis, since A is a member of Γ ∪{A}; then B, by modus ponens on the lines A → B and A. The result is a proof of B from Γ ∪{A}.

Left to right. Let A1,…,An = B be a proof of B from Γ ∪{A}. We show by induction on k that Γ ⊢ A → Ak for every k ≤ n; at k = n that is the claim.

Induction hypothesis: for every j < k, a proof of A → Aj from Γ has already been written.

To show: a proof of A → Ak from Γ, built on top of those.

By Definition 2.3 the line Ak is an axiom, a hypothesis or a modus ponens, and a hypothesis is a member of Γ or A itself; that gives three cases, since an axiom and a member of Γ are handled alike.

1.
(Ak is an axiom or a member of Γ) Then Ak is a legitimate line of a proof from Γ. Write it; then Ak → A → Ak, an instance of (I) with Ak and A for its two letters; then A → Ak, by modus ponens on those two lines. Three lines.
2.
(Ak is A itself) Then A → Ak is A → A, and the five-line proof of §2.4, with A for p, proves it from no hypotheses at all, so in particular from Γ.
3.
(Ak follows by modus ponens) Then there are earlier lines Aj and Ai = Aj → Ak. By the induction hypothesis, applied to j and to i, proofs from Γ of A → Aj and of A → Aj → Ak have already been written. Now write the instance of (II) with A, Aj and Ak for its three letters:
(A → Aj → Ak) → (A → Aj) → A → Ak.

Modus ponens on this line and A → Aj → Ak gives (A → Aj) → A → Ak, and modus ponens on that and A → Aj gives A → Ak. Three lines, on top of the proofs already written.

Concatenating the pieces in order gives a proof from Γ whose last line is A → An, that is, A → B. Only the third case used the induction hypothesis, and only two schemas were needed: (I) in the first case, (II) in the third, and both inside the five-line proof the second case borrows. □

Three things follow, and the first answers the question Chapter 1 ended on.

The compiler’s missing rule is a theorem. A definition fx = M has a parameter x and a body M. To type it, a checker would want to say: suppose x has type A; if, on that supposition, M has type B, then f has type A → B. In the judgements of Chapter 1,

if Γ,x : A ⊢ M : B then Γ ⊢ f : A → B,

which, with the programs rubbed out, is: if Γ ∪{A}⊢ B then Γ ⊢ A → B. That is the Deduction Theorem, left to right. The rule the checker lacked is not a rule but a theorem of the system it already has — and since the theorem’s proof is a construction, it tells the checker what to do. This is the compiler promised in Theorem 1.8. The theorem’s proof is a construction, and running it with the programs left on rather than rubbed out compiles the parameter away: its first case writes a 𝖪 and its third an 𝖲, and what comes out of a definition fx1⋯xn := M is a term containing no variables at all, which runs the same way on every argument and has the type the definition should have. Chapter 3 sets the two languages side by side and finds them the same language (Theorem 3.3). This is also why the schemas are what they are: (I) and (II) are the types of the two programs that survive when every variable has been compiled away, and they were chosen — by Hilbert’s school, long before anyone compiled anything — precisely so that the Deduction Theorem would hold.

You may assume the premise. Read the theorem the other way round. To prove A → B, assume A and derive B; every such proof can be rewritten, mechanically, into a proof of the implication with no assumption. So the clerk may, after all, write “suppose A” — not because the rules allow it, but because a theorem about the rules says the supposition can always be compiled away. Hypothetical syllogism as a theorem, which cost a twenty-letter line in §2.6, now costs this: from the hypotheses q → r, p → q and p, modus ponens twice gives q and then r; discharge p, then p → q, then q → r. Three lines of thought and three discharges, and the twenty-letter line is what the third discharge writes on your behalf. It has a price: the rewritten proof is about three times as long, three lines for each original one. That is what every implication proved in the bare system costs, and it is why nobody writes such proofs by hand. And it buys this. The theorem ⊢ p → p took a paragraph of searching; with the theorem it is immediate from {p}⊢ p, which is a one-line proof. (The theorem’s own proof uses the five-line proof once, in the case Ak = A; what the theorem saves you is finding it again.)

A proof is a finite list of formulas, each an axiom, a hypothesis, or modus ponens from earlier lines, and checking one is pattern matching. A typing is a proof with the programs written beside the lines (Theorem 2.4): 𝖪 and 𝖲 are the two schemas, application is modus ponens, a variable in the context is a hypothesis, and running a program removes detours from a proof. The rule the compiler needed for a parameter is the Deduction Theorem, Γ ∪{A}⊢ B iff Γ ⊢ A → B, whose proof is the algorithm that compiles the parameter away, and whose two schemas are the types of the two constants that survive the compilation. How did the compiler know? It checked a proof.

We have been writing 𝖪 and 𝖲 and compiling our definitions away because that is what the checker’s four rules could type. But the Deduction Theorem says that the case for parameters is admissible: adding it as a fifth case would let nothing new be typed. So add it, and let the parameter stay. Every definition fx := M you have ever written is then a term in its own right, the checker that reads it directly has three cases, two of which are ours and the third a theorem of ours — and we have not yet asked what those three rules, with the programs rubbed out, are as a logic. Chapter 3 goes back to the computational world with the parameter in hand, and finds that a mathematician has been using exactly those three rules since 1934.

Exercises

Exercise 2.1. Prove ⊢ p → p by the Deduction Theorem, in one line of thought. Then say which five lines the theorem writes on your behalf.

Exercise 2.2. Prove ⊢ (p → q) → (q → r) → p → r, hypothetical syllogism with its antecedents the other way round, by the Deduction Theorem. Then start to prove it from the schemas alone by following the transformation in the proof of Theorem 2.7, and stop when you can see how long it will be.

Exercise 2.3. Flip, the function that swaps the order of two arguments, has the type (p → q → r) → q → p → r.

(1)
Prove {p → q → r}⊢ q → p → r from the schemas and modus ponens, without the Deduction Theorem. (About nine lines; the instance of (II) you need has q as its first letter.)
(2)
Prove the closed formula ⊢ (p → q → r) → q → p → r by the Deduction Theorem, and say roughly how long the proof of (1), put through the theorem’s construction, would be.

Exercise 2.4. Write a checker: a program that takes a list of formulas, each annotated “(I)”, “(II)”, “hypothesis” or “MP i, j”, and a set of hypotheses, and returns whether the list is a proof from those hypotheses in the sense of Definition 2.3. What is its running time in the length of the proof? Then say which lines of your checker are rule (var) and which are rule (app) of a type checker, and what you would have to add to make it check typings instead.

Reading

Open Logic Project (2026, chapter 12) on axiomatic derivations: parts of §§2.2 and 2.7 adapt its text, which is free to use with attribution, and its remark that the schemas were chosen for the Deduction Theorem is the one this chapter turns into a compiler. Curry and Feys (1958) is where 𝖪 and 𝖲 meet (I) and (II) in print; Turner (1979) turns the Deduction Theorem’s construction into a working compiler; Wadler (2015) tells the whole story. Next, Chapter 3: the λ put back, and the logic whose proofs are programs. References.

Haskell B. Curry and Robert Feys. Combinatory Logic, Volume I. North-Holland, Amsterdam, 1958.
Open Logic Project. The Open Logic Text. https://openlogicproject.org, 2026. Release 9620cc7, 12 July 2026. Licensed CC BY 4.0.
Emil L. Post. Finite combinatory processes—formulation 1. Journal of Symbolic Logic, 1(3):103–105, 1936.
Alan M. Turing. On computable numbers, with an application to the Entscheidungsproblem. Proceedings of the London Mathematical Society, s2-42 (1):230–265, 1937.
David A. Turner. A new implementation technique for applicative languages. Software: Practice and Experience, 9(1):31–49, 1979.
Philip Wadler. Propositions as types. Communications of the ACM, 58(12):75–84, 2015.