757 Proof theory and dependent types from the same diagonals

Natural deduction, the sequent calculus and dependent type theory are not further subjects. Each rule of each of them is one side of an adjunction of Section 755.2, and each structural rule is an act on places of Section 755.1. This section computes the correspondence, rule by rule.

757.1 Judgements and structural rules are the acts on places

A judgement \(\Gamma \vdash A\) says that \(A\) follows from the statements \(\Gamma \); with proofs written, \(\Gamma \vdash t:A\). The places of \(\Gamma \) are its hypotheses.

rule what it says in the chain
identity \(A\vdash A\) \(a=a\)
weakening from \(\Gamma \vdash C\) to \(\Gamma ,A\vdash C\) \(\pi \): leave a place unused
contraction from \(\Gamma ,A,A\vdash C\) to \(\Gamma ,A\vdash C\) \(\Delta \): use a place twice
exchange from \(\Gamma ,A,B\vdash C\) to \(\Gamma ,B,A\vdash C\) \((\pi _2,\pi _1)\)
cut from \(\Gamma \vdash A\) and \(A,\Theta \vdash C\) to \(\Gamma ,\Theta \vdash C\) composition (Section 755.3)
substitution from \(\Gamma \vdash t:A\) and \(x{:}A\vdash u:C\) to \(\Gamma \vdash u[t/x]:C\) composition, with proofs written

So the two generating acts \(\Delta \) and \(\pi \) are contraction and weakening, the reflexivity \(P\le P\) is the identity rule, and cut is the composition that was computed, not assumed.

757.2 Natural deduction: each connective is an adjoint

An adjunction is a bijection between two kinds of proofs. Read downwards it is an introduction rule; read upwards it is an elimination rule. Doing one after the other gives back what one had: these two round trips are the conversions \(\beta \) and \(\eta \).

connective adjoint of introduction elimination
\(A\wedge B\) right, of \(\Delta \) \(\langle a,b\rangle \) \(\pi _1p,\ \pi _2p\)
\(A\vee B\) left, of \(\Delta \) \(\mathrm {inl}\,a,\ \mathrm {inr}\,b\) case on \(p\)
\(\top \) right, of the map to one place \(\ast \) none
\(\bot \) left, of the map to one place none from \(\bot \), anything
\(A\Rightarrow B\) right, of \((-)\wedge A\) \(\lambda x.\,t\) \(f\,a\)
\(\forall x\,B(x)\) right, of \(\pi \) \(\lambda x.\,t\), \(x\) not in \(\Gamma \) \(f\,a\)
\(\exists x\,B(x)\) left, of \(\pi \) \((a,b)\) open the pair, \(x\) not in \(C\)
\(a=b\) left, of putting two places equal \(\mathrm {refl}\) (J)

Two rules written out. For \(\wedge \) and \(\Rightarrow \) the bijections are

\[ \dfrac {\Gamma \vdash A\qquad \Gamma \vdash B}{\Gamma \vdash A\wedge B} \qquad \qquad \dfrac {\Gamma ,A\vdash B}{\Gamma \vdash A\Rightarrow B} \]
each read in both directions. The conditions “\(x\) not in \(\Gamma \)” and “\(x\) not in \(C\)” say that the statement on the other side comes from \(\pi \): it does not use the place \(x\).

Conversions.

\begin{align} \pi _1\langle a,b\rangle &=a, & \langle \pi _1p,\pi _2p\rangle &=p, \tag{26519}\\ (\lambda x.\,t)\,a&=t[a/x], & \lambda x.\,(f\,x)&=f, \tag{26520}\\ \mathrm {case}(\mathrm {inl}\,a)&=\text {the left branch at }a, & \mathrm J\,d\,\mathrm {refl}&=d . \tag{26521}\end{align}

The left column removes an introduction followed by an elimination, a detour; the right column says that every proof of the kind is an introduction.

Negation. \(\neg A\) is \(A\Rightarrow \bot \). From the rules above, \(A\wedge \neg A\vdash \bot \) by application: no contradiction is computed. \(\vdash A\vee \neg A\) is not: it is (A) of Section 755.

757.3 The sequent calculus: the same adjunctions on two sides

In a sequent \(\Gamma \vdash \Theta \) a connective may be introduced on the right or on the left. The right rule is the adjunction read downwards; the left rule is its other direction, composed once with the identity:

\[ \dfrac {\Gamma \vdash A\qquad \Gamma \vdash B}{\Gamma \vdash A\wedge B} \qquad \dfrac {A,\Theta \vdash C}{A\wedge B,\Theta \vdash C} \qquad \qquad \dfrac {\Gamma ,A\vdash B}{\Gamma \vdash A\Rightarrow B} \qquad \dfrac {\Gamma \vdash A\qquad B,\Theta \vdash C}{A\Rightarrow B,\Gamma ,\Theta \vdash C} \]

One conclusion or several. With one statement on the right the calculus proves what Section 757.2 proves. Allowing several statements on the right, with contraction there, gives \(\vdash A,\neg A\) and hence \(\vdash A\vee \neg A\): contraction on the right is (A). Dropping \(\Delta \) and \(\pi \) altogether leaves a calculus in which each hypothesis is used exactly once.

Cut is computed away. When the cut statement was just introduced on both sides, the cut is replaced by cuts on its parts:

\begin{align} &\text {cut on }A\wedge B\ \text { between }\ \Gamma \vdash A\wedge B\ \text { and }\ A\wedge B,\Theta \vdash C &&\leadsto \ \text {cut on }A, \tag{26522}\\ &\text {cut on }A\Rightarrow B\ \text { between }\ \Gamma \vdash A\Rightarrow B\ \text { and }\ A\Rightarrow B,\Gamma ',\Theta \vdash C &&\leadsto \ \text {cuts on }A\text { and on }B . \tag{26523}\end{align}

These are the conversions \(\pi _1\langle a,b\rangle =a\) and \((\lambda x.\,t)\,a=t[a/x]\) of Section 757.2. In every other case the cut is moved above the last rule of one of its premises. The cut statement gets smaller or the cut gets higher in the proof; by induction on the pair (size of the cut statement, height), ordered first by size, every proof becomes a proof without cut. The cases with contraction need the cut to remove several copies at once; the full case analysis is not written out here.

What follows from a proof without cut.

757.4 Dependent types: a statement with a place is a kind over a kind

A family \(B(x)\) of kinds over \(A\) is an arrow \(p:E\to A\); \(B(a)\) is the fibre over \(a\). A context \(\Gamma =(x_1{:}A_1,\dots ,x_n{:}A_n)\) is a kind built by adding one place at a time, each over the ones before.

judgement what it is
\(\Gamma \vdash B\ \mathrm {type}\) an arrow into \(\Gamma \)
\(\Gamma \vdash b:B\) a section of it
\(\Gamma \vdash B=B'\),  \(\Gamma \vdash b=b'\) the same arrow, the same section
substitution \(B[f]\) the pullback along \(f\): the inverse image of a diagonal
\(\Gamma ,x{:}A\) the kind over \(\Gamma \) itself, as a new context

The formers are the adjoints of substitution. For \(p:\Gamma .A\to \Gamma \), leaving the place \(x\) unused is the pullback \(p^{*}\), and

\[ \Sigma _A\ \dashv \ p^{*}\ \dashv \ \Pi _A . \]

former

adjoint

introduction and elimination

over one-point kinds

\(\Sigma _{x:A}B(x)\)

left, of \(p^{*}\)

\((a,b)\);  \(\pi _1,\pi _2\)

\(\exists \), and \(\wedge \) when \(B\) ignores \(x\)

\(\Pi _{x:A}B(x)\)

right, of \(p^{*}\)

\(\lambda x.\,b\);  \(f\,a\)

\(\forall \), and \(\Rightarrow \) when \(B\) ignores \(x\)

\(\mathrm {Id}_A(x,y)\)

left, of \(\Delta ^{*}\)

\(\mathrm {refl}\);  (J)

\(=\)

\(A+B\), \(0\)

left, of \(\Delta \) and of the map to one place

injections;  case

\(\vee \), \(\bot \)

\(A\times B\), \(1\)

right, of the same

pair;  projections

\(\wedge \), \(\top \)

\(\mathbb N\)

the least kind for \(1+X\)

\(0,S\);  one arrow out

induction

\(\mathcal U\)

the whole of a level (C26)

a kind;  its points

The bijection for \(\Pi \) is the rule read both ways,

\[ \dfrac {\Gamma ,x{:}A\vdash b:B}{\Gamma \vdash \lambda x.\,b:\Pi _{x:A}B}, \]
with \((\lambda x.\,b)\,a=b[a/x]\) and \(\lambda x.\,(f\,x)=f\) as the two round trips.

Identity is the diagonal, seen as a family. The arrow \(\Delta :A\to A\times A\) is a kind over \(A\times A\); its fibre over \((x,y)\) is the proofs of \(x=y\). It is \(\Sigma _\Delta \) of the one-point family, and the adjunction \(\Sigma _\Delta \dashv \Delta ^{*}\) says: a section of a family \(R\) over the identity kind is a section of \(R(x,x)\) over \(A\). That is (J), and \(\mathrm {refl}\) is \(\Delta \) itself. On the first road the fibres have at most one point; on the second (Section 756) they are paths.

Formers commute with substitution. A pullback of a pullback is a pullback, so \(\Sigma \), \(\Pi \) and \(\mathrm {Id}\) computed after a substitution are the substitution of the ones computed before.

Induction is recursion with “exactly one”. Let \(C\) be a family over \(\mathbb N\) with \(c_0:C(0)\) and \(c_s:C(n)\to C(Sn)\). The total kind \(\Sigma _nC(n)\) then has a point \((0,c_0)\) and a step \((n,c)\mapsto (Sn,c_s(c))\), so by (U) of Section 69.6 there is one arrow \(h:\mathbb N\to \Sigma _nC(n)\) keeping them. Then \(\pi _1\circ h\) keeps \(0\) and \(S\), as does \(\mathrm {id}\); so \(\pi _1\circ h=\mathrm {id}\), and \(h\) is a section: a point of \(C(n)\) for every \(n\). The dependent eliminator is computed from the one without dependence.

757.5 Statements as kinds, proofs as points

Sections 757.2 and 757.4 are one table read twice. A statement is a kind with at most one point; a proof is a point; a rule of natural deduction is the rule of the former with the same adjoint, restricted to such kinds.

proof theory type theory adjoint in the chain
identity rule a variable \(a=a\)
weakening, contraction unused, repeated variable \(\pi \), \(\Delta \)
cut substitution composition
\(\wedge \), \(\Rightarrow \), \(\forall \) \(\times \), \(\to \), \(\Pi \) right \(\times \), \(B^{A}\), \(\forall \)
\(\vee \), \(\exists \), \(=\) \(+\), \(\Sigma \), \(\mathrm {Id}\) left \(+\), \(\exists \), (J)
removing a detour \(\beta \) round trip unit, then counit
removing a cut computing a substitution composing
proof without cut normal form
excluded middle (A)

The one difference is between “some” as a statement and as a kind: \(\exists x\,B(x)\) has at most one point and forgets which \(x\); \(\Sigma _xB(x)\) keeps it. The first is the second with all its points made equal (Section 756.8).

757.6 Three theorems that are used here, not computed

Normalization. Removing detours comes to an end, in whatever order it is done; so every proof of natural deduction has a normal form, and the bullets of Section 757.3 hold for it. The proof assigns to each kind a set of “well-behaved” proofs by the same adjoints and shows by induction on the proof that every proof is in it; it is not written out here [1753, 1754].

Arithmetic and \(\varepsilon _0\). With the rule of induction of Section 757.4 added, cuts on induction statements cannot be removed as above. They can be removed by assigning to each proof an ordinal below \(\varepsilon _0\) (Section 71.11) that falls at each step. So arithmetic proves no contradiction, given that the ordinals below \(\varepsilon _0\) are well-founded; and that well-foundedness is exactly what arithmetic does not prove.

The statement that says “I am not provable”. Writing a statement into its own place is \(\Delta \) on codes of statements. By the diagonal argument of Section 69.11, with “provable” in the role of the map and \(\neg \) as the map with no fixed point, there is \(G\) with \(G\leftrightarrow \neg \,\mathrm {Prov}(\ulcorner G\urcorner )\). If arithmetic proves no contradiction, it does not prove \(G\); and then it does not prove its own consistency either. The coding and the conditions on \(\mathrm {Prov}\) are not written out here.

757.7 What is used

\[ \begin {aligned} a=a\ &\to \ \Delta ,\ \pi \ \to \ \text {adjoints}\\ &\to \ \begin {cases} \text {at most one point: natural deduction, sequents, cut computed away}\\[2pt] \text {any kind: } \Sigma ,\ \Pi ,\ \mathrm {Id},\ \mathbb N,\ \mathcal U \end {cases} \end {aligned} \]

Nothing new is assumed in this section. Excluded middle is (A), read as contraction on the right. \(\mathbb N\) and \(\mathcal U\) are (C26). The three theorems of Section 757.6, and the full case analysis of removing cuts, are stated with their idea and are not computed here.

Remark 757.1 (Apparent Fallacies as \(A = A\)).

The following arguments are conventionally classified as logical fallacies or invalid proofs. The present framework identifies them as instances of \(\varphi \subseteq \Gamma \iff A = A\) — structurally identical to valid proofs, differing only in whether the circularity is concealed or explicit.

1. The Liar Paradox.

“This statement is false.” \(\Rightarrow \) If true, then false. \(\Rightarrow \) If false, then true. \(\Rightarrow \) …

Structure:

\begin{equation} \varphi = \neg \varphi \;\Longleftrightarrow \; \varphi \subseteq \{\neg \varphi \} \;\Longleftrightarrow \; \varphi \Rightarrow \varphi \;\Longleftrightarrow \; A = A \tag{26524}\end{equation}
The self-reference is not a defect. It is \(A = A\) applied to \(\varphi \) itself — the statement asserting its own identity.

Remark 757.2 (The Liar Paradox as \(V = 0.5\)).

Let \(S\) be the sentence: “\(S\) is false.”

1. Classical Oscillation.

\begin{align} S = \text {true} &\Longrightarrow S = \text {false}, \tag{26525}\\ S = \text {false} &\Longrightarrow S = \text {true}. \tag{26526}\end{align}

The sentence maps to its own negation:

\begin{equation} S \;\mapsto \; \neg S. \tag{26527}\end{equation}

2. The Oscillation Sequence.

\begin{align} S_0 &= S, \tag{26528}\\ S_1 &= \neg S_0, \tag{26529}\\ S_2 &= \neg S_1 = \neg (\neg S_0) = S_0, \tag{26530}\\ S_3 &= \neg S_2 = \neg S_0 = S_1. \tag{26531}\end{align}

Period-2 recurrence:

\begin{equation} S_{n+2} = S_n. \tag{26532}\end{equation}
In binary form:
\begin{equation} x_n = \begin {cases} 1 & n \text { even} \\ 0 & n \text { odd} \end {cases} \qquad \Longleftrightarrow \qquad \{1, 0, 1, 0, \ldots \}. \tag{26533}\end{equation}
No classical fixed point exists: \(S \neq \neg S\) classically. 3. The Fixed Point is \(V = 0.5\).

Define the recurrence with initial condition \(x_0 = 0\):

\begin{equation} x_0 = 0, \qquad x_{n+1} = 1 - x_n. \tag{26534}\end{equation}
This generates the oscillation \(\{0, 1, 0, 1, \ldots \}\). The unique fixed point:
\begin{equation} x^* = 1 - x^* \;\Longrightarrow \; x^* = \tfrac {1}{2} \;\Longleftrightarrow \; \lim _{n\to \infty } x_n = \tfrac {1}{2}. \tag{26535}\end{equation}
The sequence never stabilises pointwise, but the unique attractor of the map \(f(x) = 1 - x\) is obtained by solving \(x = f(x)\):
\begin{align} x = f(x) &\;\Longrightarrow \; x = 1 - x \tag{26536}\\ &\;\Longrightarrow \; 2x = 1 \tag{26537}\\ &\;\Longrightarrow \; x = \tfrac {1}{2}. \tag{26538}\end{align}

Equivalently:

\begin{equation} 1 = x + x = 0.5 + 0.5 \;\Longleftrightarrow \; A + \neg A = 1 \;\Longleftrightarrow \; T = 1. \tag{26539}\end{equation}
Therefore:
\begin{equation} x^* = \tfrac {1}{2} \;\Longleftrightarrow \; V = 0.5 \;\Longleftrightarrow \; A = \neg A = 0.5 \;\Longleftrightarrow \; A = A. \tag{26540}\end{equation}
The structural signature of \(O < T\): a self-referential sentence cannot be evaluated from outside itself.

Step 4. Connection to \(A = A\).

The liar paradox is the sentence that asserts \(A = \neg A\). By Section 12 (Stage 3):

\[ A = A \;\Longrightarrow \; A \neq \neg A \;\Longrightarrow \; S \text { is not a valid partition.} \tag {13} \]
\(S\) is not a defect of logic. It is the sentence that attempts to occupy both sides of the partition simultaneously:
\[ S \in A \cap \neg A \;\Longleftrightarrow \; V = 0.5 \;\Longleftrightarrow \; A = A. \tag {14} \]

Complete structure.

\[ S \mapsto \neg S \;\Longrightarrow \; S_{n+2} = S_n \;\Longrightarrow \; \lim _{n\to \infty } S_n = 0.5 \;\Longrightarrow \; V = 0.5 \;\Longleftrightarrow \; A = A. \]
\[ \boxed { \text {Liar paradox} \;\Longleftrightarrow \; S \mapsto \neg S \;\Longleftrightarrow \; V = 0.5 \;\Longleftrightarrow \; A = A. } \]

The liar paradox is not a contradiction. It is the arithmetic signature of the fixed point \(V = 0.5\): the sentence that cannot be placed on either side of the partition, and therefore occupies the boundary — which is \(A = A\).

2. The \(1 = 2\) Proof.

Let \(a = b\). Then:

\begin{align} a^2 &= ab \tag{26541}\\ a^2 - b^2 &= ab - b^2 \tag{26542}\\ (a-b)(a+b) &= b(a-b) \tag{26543}\\ a + b &= b \quad \text {(dividing by } a - b\text {)} \tag{26544}\\ 2b &= b \;\Longrightarrow \; 2 = 1 \tag{26545}\end{align}

The error: division by \(a - b = 0\) conceals \(0 = 0\) inside the step, i.e. the conclusion (\(0 \neq 0\)) is smuggled into the premise:

\begin{equation} a - b = 0 \;\Longrightarrow \; \frac {(a-b)(a+b)}{a-b} = \frac {0}{0} \;\Longleftrightarrow \; \frac {T}{T} = 1 \;\Longleftrightarrow \; A = A \tag{26546}\end{equation}
By Remark 3.7: \(0/0 = T/T = 1\) within the Totality framework. The “fallacy” is \(A = A\) applied at the boundary \(T = 0\).

3. All Numbers Are Equal (Induction Fallacy).

Claim: in any set of \(n\) elements, all elements are equal. Proof: assume true for \(n\); extend to \(n+1\) using overlap. Error: the overlap is empty at \(n = 1 \to 2\), so the inductive step assumes what it needs to prove:

\begin{equation} P(n) \subseteq \Gamma _{n+1} \;\Longleftrightarrow \; \varphi \subseteq \Gamma \;\Longleftrightarrow \; \text {circularity} \;\Longleftrightarrow \; A = A \tag{26547}\end{equation}

4. The structural identity.

All three share the same logical form as every valid proof (Section 461, Section 99, Lemma 99.6):

\begin{equation} \boxed { \text {circularity} \;\Longleftrightarrow \; \varphi \subseteq \Gamma \;\Longleftrightarrow \; \varphi \Rightarrow \varphi \;\Longleftrightarrow \; A = A } \tag{26548}\end{equation}

The difference between a “fallacious” argument and a “valid” proof is not logical but declarative: the community selects which instances of \(\varphi \subseteq \Gamma \) to permit (Atiyah case).




Argument Concealed structure Status



Liar paradox \(\varphi = \neg \varphi \) declared fallacious
\(1 = 2\) proof \(0/0 = T/T = 1\) declared fallacious
All numbers equal \(P(n) \subseteq \Gamma _{n+1}\) declared fallacious
Euclid’s proofs \(\varphi \subseteq \Gamma \) declared valid
Atiyah’s RH attempt \(\varphi \subseteq \Gamma \) declared fallacious



All: \(\varphi \subseteq \Gamma \iff A = A\)



Every argument in the table instantiates \(\varphi \subseteq \Gamma \). The “valid” column and the “fallacious” column are not logically distinct. They are declarations — different permissions applied to the same structure \(A = A\).