177 From \(a^2=a\) to Reflexivity, Transitivity, and Euclideanness

Thesis. The idempotency \(a^2=a\) (equivalently \(A=A\), \(\Pi ^2=\Pi \)), promoted to a binary relation \(R\) on a set \(X\), becomes \(R^2=R\). This single condition forces the three defining properties of an equivalence / causal structure: reflexivity, transitivity, and Euclideanness.

Step 1: Idempotency of the relation

Let \(R\subseteq X\times X\) with composition

\begin{equation} R\circ R = \{(x,y):\exists z,\ xRz\wedge zRy\} = R^2. \tag{8191}\end{equation}
The idempotency \(a^2=a\) lifts to
\begin{equation} R^2 = R, \qquad \text {equivalently}\qquad R^2\subseteq R \ \wedge \ R\subseteq R^2. \tag{8192}\end{equation}
The two inclusions give two distinct properties.
Step 2: \(R^2\subseteq R \Rightarrow \) Transitivity

The inclusion \(R^2\subseteq R\) reads

\begin{equation} (x,y)\in R^2 \;\Rightarrow \; (x,y)\in R, \tag{8193}\end{equation}
i.e. if there exists \(z\) with \(xRz\) and \(zRy\), then \(xRy\):
\begin{equation} (xRz\wedge zRy)\;\Rightarrow \;xRy. \tag{8194}\end{equation}
Renaming, this is transitivity:
\begin{equation} \boxed {\forall x,y,z:\ (xRy\wedge yRz)\Rightarrow xRz \qquad \text {(Transitivity).}} \tag{8195}\end{equation}
Step 3: \(R\subseteq R^2 \Rightarrow \) Reflexivity

The inclusion \(R\subseteq R^2\) reads

\begin{equation} xRy \;\Rightarrow \; \exists z\,(xRz\wedge zRy). \tag{8196}\end{equation}
Taking the witness \(z=y\) (which is admissible since the relation must self-compose to reproduce \((x,y)\)), we obtain
\begin{equation} xRy \;\Rightarrow \; yRy. \tag{8197}\end{equation}
Symmetrically, with \(z=x\), \(xRy\Rightarrow xRx\). Therefore every element in the domain or range relates to itself:
\begin{equation} \boxed {\forall x\in \mathrm {Dom}(R):\ xRx, \qquad \forall x\in \mathrm {Ran}(R):\ xRx \qquad \text {(Reflexivity).}} \tag{8198}\end{equation}
Step 4: \(R^{-1}\circ R = R \Rightarrow \) Euclideanness

Consider the related idempotency \(R^{-1}\circ R = R\). The composition \(R^{-1}\circ R\) is

\begin{equation} R^{-1}\circ R = \{(y,z):\exists x,\ xRy\wedge xRz\}. \tag{8199}\end{equation}
The inclusion \(R^{-1}\circ R\subseteq R\) gives
\begin{equation} (\exists x)(xRy\wedge xRz)\;\Rightarrow \;yRz, \tag{8200}\end{equation}
i.e. Euclideanness:
\begin{equation} \boxed {\forall x,y,z:\ (xRy\wedge xRz)\Rightarrow yRz \qquad \text {(Euclideanness).}} \tag{8201}\end{equation}
Step 5: The cone \(R(x)\) is a clique

Define the future cone (up-set):

\begin{equation} R(x) = \{y\in X:xRy\} = {\uparrow }x. \tag{8202}\end{equation}
Euclideanness says: for \(y,z\in R(x)\) (i.e. \(xRy\) and \(xRz\)), we have \(yRz\):
\begin{equation} y,z\in R(x)\;\Rightarrow \;yRz, \qquad R(x)\times R(x)\subseteq R. \tag{8203}\end{equation}
Hence every cone is a clique (a totally related set):
\begin{equation} \boxed {\forall x:\ R(x)\ \text {is a clique}, \qquad R(x)\times R(x)\subseteq R.} \tag{8204}\end{equation}
With antisymmetry added, \({\uparrow }x\) becomes totally ordered.
Step 6: The full idempotent tower

The chain of compositions collapses:

\begin{equation} R^2 = R, \qquad R^{-1}\circ R = R, \qquad (R\circ R)\cap (R^{-1}\circ R) = R, \tag{8205}\end{equation}
and all higher powers stabilise:
\begin{equation} R^2 = R \;\Rightarrow \; R^n = R\ (n\geq 2), \qquad R = R^2 = R^3 = \cdots \tag{8206}\end{equation}
Result

The single idempotency \(R^2=R\) decomposes into two inclusions, and together with \(R^{-1}\circ R=R\) yields all three properties:

\begin{equation} R^2=R \;\Longrightarrow \; \begin {cases} R^2\subseteq R & \Rightarrow \ \text {Transitivity}\\[4pt] R\subseteq R^2 & \Rightarrow \ \text {Reflexivity} \end {cases} \tag{8207}\end{equation}
\begin{equation} R^{-1}\circ R = R \;\Longrightarrow \; \text {Euclideanness}. \tag{8208}\end{equation}
\begin{equation} \boxed {R^2=R \;\Longrightarrow \; \text {Reflexivity}\wedge \text {Transitivity}\wedge \text {Euclideanness}.} \tag{8209}\end{equation}

A relation that is reflexive, transitive, and Euclidean is an equivalence relation; with antisymmetry it is a partial (indeed total on each cone) order. The idempotency \(a^2=a\) — the algebraic form of \(A=A\) — is therefore the relational seed of both equivalence and causal-order structure: the cones \({\uparrow }x\) are cliques, totally ordered once antisymmetry is imposed. The same \(\Pi ^2=\Pi \) that generates the projector spectrum \(\{0,1\}\) generates, at the relational level, the order structure \(R^2=R\).

177.1 \(A=A\) as the Identity Type: the \(\infty \)-Groupoid Lift

Thesis. The relational lift \(R^2=R\) (preceding subsection) has a homotopy-type-theoretic counterpart: the identity type \(\operatorname {Id}_A(x,y)\equiv (x=_A y)\). Where \(R^2=R\) generated reflexivity, transitivity, and symmetry as properties, the identity type generates them as structure carrying higher coherence — making \((A,\operatorname {Id}_A)\) an \(\infty \)-groupoid. \(A=A\) is thus not a bare proposition but the generator of an entire tower of paths.

Step 1: Identity type and reflexivity

The proposition \(A=A\) lifts to the identity type

\begin{equation} \operatorname {Id}_A(x,y)\equiv (x=_A y). \tag{8210}\end{equation}
Its sole constructor is reflexivity, the type-theoretic \(A=A\):
\begin{equation} \mathrm {refl}_x:\operatorname {Id}_A(x,x), \qquad \forall x:A,\quad \mathrm {refl}_x:x=_A x. \tag{8211}\end{equation}
This is the witness that every term is identical to itself — the constructive content of \(A=A\).
Step 2: Symmetry (path inversion)

For a proof \(p:x=_A y\), path induction produces an inverse:

\begin{equation} p:x=_A y \;\Longrightarrow \; p^{-1}:y=_A x, \tag{8212}\end{equation}
so \(\operatorname {Id}_A(x,y)\Longrightarrow \operatorname {Id}_A(y,x)\), with the involution law
\begin{equation} (p^{-1})^{-1}=p. \tag{8213}\end{equation}
This is the type-theoretic form of \(R^{-1}=R\).
Step 3: Transitivity (path composition)

For \(p:x=_A y\) and \(q:y=_A z\), composition gives

\begin{equation} p\cdot q:x=_A z, \qquad \operatorname {Id}_A(x,y)\times \operatorname {Id}_A(y,z) \;\Longrightarrow \;\operatorname {Id}_A(x,z), \tag{8214}\end{equation}
the type-theoretic form of \(R^2\subseteq R\) (transitivity).
Step 4: Groupoid coherence laws

Unlike the relational case, the identity type carries explicit coherence witnesses:

\begin{align} (p\cdot q)\cdot r &= p\cdot (q\cdot r) &&\text {(associativity)}, \tag{8215}\\ p\cdot \mathrm {refl}_y = p,\qquad \mathrm {refl}_x\cdot p &= p &&\text {(unit laws)}, \tag{8216}\\ p\cdot p^{-1}=\mathrm {refl}_x,\qquad p^{-1}\cdot p &= \mathrm {refl}_y &&\text {(inverse laws)}. \tag{8217}\end{align}

These are not properties but terms — proofs that themselves inhabit higher identity types.

Step 5: The three axioms as dependent products

Reflexivity, symmetry, and transitivity assemble into dependent products over \(A\):

\begin{align} &\prod _{x:A}\operatorname {Id}_A(x,x) &&\text {(reflexivity)}, \tag{8218}\\ &\prod _{x,y:A}\bigl (\operatorname {Id}_A(x,y)\to \operatorname {Id}_A(y,x)\bigr ) &&\text {(symmetry)}, \tag{8219}\\ &\prod _{x,y,z:A}\bigl (\operatorname {Id}_A(x,y)\to \operatorname {Id}_A(y,z) \to \operatorname {Id}_A(x,z)\bigr ) &&\text {(transitivity)}. \tag{8220}\end{align}
Step 6: \((A,\operatorname {Id}_A)\) is an \(\infty \)-groupoid

Reading \(\operatorname {Hom}(x,y)=\operatorname {Id}_A(x,y)\), identity types are paths:

\begin{equation} \operatorname {Id}_A(x,y)=\operatorname {Path}_A(x,y), \tag{8221}\end{equation}
with
\begin{align} \operatorname {Path}_A(x,x)&\ni \mathrm {refl}_x, \tag{8222}\\ p\in \operatorname {Path}_A(x,y)&\Longrightarrow p^{-1}\in \operatorname {Path}_A(y,x), \tag{8223}\\ p\in \operatorname {Path}_A(x,y),\ q\in \operatorname {Path}_A(y,z) &\Longrightarrow p\cdot q\in \operatorname {Path}_A(x,z). \tag{8224}\end{align}

Because the coherence laws of Step 4 themselves hold up to higher paths (and those up to still higher paths, ad infinitum), the pair \((A,\operatorname {Id}_A)\) is an \(\infty \)-groupoid:

\begin{equation} \boxed {(A,\operatorname {Id}_A) \;=\;(\infty )\text {-groupoid}.} \tag{8225}\end{equation}
Result
\begin{equation} \boxed { A=A \;\Rightarrow \;\mathrm {refl}_x:\operatorname {Id}_A(x,x) \;\Rightarrow \; \begin {cases} p^{-1}:y=_A x &\text {(symmetry)}\\ p\cdot q:x=_A z &\text {(transitivity)}\\ \text {coherence laws} &\text {(groupoid)} \end {cases} \;\Rightarrow \;(A,\operatorname {Id}_A)=\infty \text {-groupoid}. } \tag{8226}\end{equation}

Just as the algebraic form \(a^2=a\) (the projector \(\Pi ^2=\Pi \)) generates the binary spectrum \(\{0,1\}\), and the relational form \(R^2=R\) generates order structure (reflexivity, transitivity, Euclideanness), the type-theoretic form \(\operatorname {Id}_A(x,x)\) generates the \(\infty \)-groupoid. The same \(A=A\) appears at three levels: as a spectrum-fixing idempotent (operators), as an order-generating relation (sets), and as a path-generating identity type (homotopy). In the last, \(A=A\) is the reflexivity path \(\mathrm {refl}_x\) — the seed from which symmetry, transitivity, and all higher coherences unfold as the tower of an \(\infty \)-groupoid.

177.2 From HoTT [193] to \((\infty ,1)\)-Categories and Hilbert Spaces

Thesis. The \(\infty \)-category does not live inside ETCS — ETCS is the \(0\)-truncation \(\tau _{\leq 0}\) of HoTT. The full untruncated type theory is the internal language of an \((\infty ,1)\)-topos: each type carries an \(\infty \)-groupoid of iterated identity types. This \(\infty \)-groupoid is then represented on a Hilbert space, linking the categorical and quantum structures.

Part I: The category of types

A universe \(\mathcal {U}\) of types, with

\begin{equation} A:\mathcal {U}, \qquad \mathrm {Hom}(A,B):=(A\to B), \qquad \mathrm {id}_A:A\to A, \qquad (g\circ f)(x)=g(f(x)). \tag{8227}\end{equation}
Function equality is function extensionality:
\begin{equation} f=g\;\Longleftrightarrow \;\prod _{x:A}f(x)=g(x). \tag{8228}\end{equation}
Part II: The tower of identity types

Each type generates an infinite tower of identity types:

\begin{equation} \mathrm {Id}_A(x,y)=(x=_A y), \quad \mathrm {Id}_{\mathrm {Id}_A}(p,q)=(p=q), \quad \mathrm {Id}_{\mathrm {Id}_{\mathrm {Id}_A}}(\alpha ,\beta )=(\alpha =\beta ), \quad \vdots \tag{8229}\end{equation}
This defines the fundamental \(\infty \)-groupoid:
\begin{equation} A\mapsto \Pi _\infty (A) =\bigl (A,\,(x=_A y),\,(p=q),\,(\alpha =\beta ),\,\dots \bigr ). \tag{8230}\end{equation}
The cells at each level are:
\begin{equation} \begin {aligned} 0\text {-cells} &= x:A,\\ 1\text {-cells} &= p:x=_A y,\\ 2\text {-cells} &= \alpha :p=q,\\ 3\text {-cells} &= \Gamma :\alpha =\beta ,\\ &\vdots \end {aligned} \tag{8231}\end{equation}
Part III: Groupoid structure on paths

Paths carry inverses, composition, and identity:

\begin{equation} p^{-1}:y=_A x, \qquad p\cdot q:x=_A z, \qquad \mathrm {refl}_x:x=_A x. \tag{8232}\end{equation}
The groupoid laws hold up to higher paths:
\begin{equation} (p\cdot q)\cdot r = p\cdot (q\cdot r) \quad \text {(up to higher paths)}, \tag{8233}\end{equation}
\begin{equation} p\cdot \mathrm {refl}=p, \qquad \mathrm {refl}\cdot p=p \quad \text {(up to higher paths)}. \tag{8234}\end{equation}
Hence:
\begin{equation} \Pi _\infty (A)\in \infty \mathrm {Gpd}. \tag{8235}\end{equation}
Part IV: Types are \(\infty \)-groupoids

The correspondence is an equivalence:

\begin{equation} \mathrm {Type}\simeq \infty \mathrm {Gpd}, \qquad \mathcal {U}\simeq (\infty ,1)\mathrm {Cat}. \tag{8236}\end{equation}
The type formers are categorical operations:
\begin{equation} \Pi \text {-types}\leftrightarrow \text {right adjoints}, \quad \Sigma \text {-types}\leftrightarrow \text {left adjoints}, \quad \mathrm {Id}\text {-types}\leftrightarrow \text {mapping spaces}. \tag{8237}\end{equation}
Univalence closes the structure:
\begin{equation} \mathrm {Univalence}:(A=B)\simeq (A\simeq B). \tag{8238}\end{equation}
\begin{equation} \boxed {\mathrm {HoTT}\;\longrightarrow \;\infty \mathrm {Gpd} \;\hookrightarrow \;(\infty ,1)\mathrm {Cat}.} \tag{8239}\end{equation}
\begin{equation} \boxed {A\mapsto \Pi _\infty (A) =(A,\mathrm {Id},\mathrm {Id}^2,\mathrm {Id}^3,\ldots ),} \qquad \boxed {\mathrm {Type}\simeq \infty \mathrm {Gpd}.} \tag{8240}\end{equation}

Where ETCS sits. ETCS is the \(0\)-truncation:

\begin{equation} \mathbf {Set} = \tau _{\leq 0}(\mathrm {HoTT}) = \{A:\mathrm {isSet}(A)\}. \tag{8241}\end{equation}
It discards all cells above level \(0\), so it contains no \(\infty \)-category. The \(\infty \)-structure lives only in the untruncated \((\infty ,1)\)-topos whose internal language is full HoTT.

177.3 From \((\infty ,1)\)-Topos to BHK Semantics

Thesis. The chain \((\infty ,1)\text {-Topos}\to \text {Topos}\to \Omega \to \text {Heyting} \to \text {BHK}\) is derived stepwise: \(0\)-truncation collapses an \((\infty ,1)\)-topos to an ordinary topos, the subobject classifier \(\Omega \) is an internal Heyting algebra, and the Curry–Howard correspondence reads off BHK semantics from the Heyting structure.

I. \((\infty ,1)\)-Topos \(\to \) Topos by \(0\)-Truncation

Let \(\mathcal {X}\) be an \((\infty ,1)\)-topos with truncation functor:

\begin{equation} \tau _{\leq 0}:\mathcal {X}\to \tau _{\leq 0}\mathcal {X}, \qquad \tau _{\leq 0}(A) = \|A\|_0, \qquad \pi _n(\|A\|_0)=0\quad (n\geq 1). \tag{8242}\end{equation}
The \(0\)-truncated objects:
\begin{equation} \tau _{\leq 0}\mathcal {X} = \{A\in \mathcal {X}:\pi _n(A)=0,\ n\geq 1\} \tag{8243}\end{equation}
form a category equivalent to sheaves of sets on the underlying site:
\begin{equation} \tau _{\leq 0}\mathcal {X}\simeq \mathrm {Sh}(\mathcal {C},J). \tag{8244}\end{equation}
By Giraud’s axioms, \(\mathrm {Sh}(\mathcal {C},J)\) is an elementary \(1\)-topos:
\begin{equation} (\infty ,1)\text {-Topos} \xrightarrow {\;\tau _{\leq 0}\;} 1\text {-Topos}. \tag{8245}\end{equation}
II. Topos \(\to \) Subobject Classifier \(\Omega \)

An elementary topos \(\mathcal {E}\) has a subobject classifier \(\Omega \in \mathcal {E}\) with \(\top :1\to \Omega \), such that every monomorphism \(m:A\rightarrowtail X\) has a unique characteristic map \(\chi _m:X\to \Omega \):

\begin{equation} \begin {array}{ccc} A & \longrightarrow & 1 \\ \downarrow m & & \downarrow \top \\ X & \xrightarrow {\;\chi _m\;} & \Omega \end {array} \qquad \text {(pullback)}. \tag{8246}\end{equation}
This gives the natural isomorphism:
\begin{equation} \mathrm {Sub}(X)\cong \mathrm {Hom}(X,\Omega ). \qquad \text {Topos}\;\Longrightarrow \;\Omega . \tag{8247}\end{equation}
III. \(\Omega \) \(\to \) Internal Heyting Algebra

For each \(X\), the poset of subobjects \(\mathrm {Sub}(X)\) is ordered by inclusion:

\begin{equation} A\leq B \iff A\subseteq B. \tag{8248}\end{equation}
Meet (pullback) and join (image of coproduct):
\begin{equation} A\wedge B = A\times _X B, \qquad A\vee B = \operatorname {im}(A+B\rightarrowtail X). \tag{8249}\end{equation}
Top and bottom:
\begin{equation} \top = X, \qquad \bot = 0\rightarrowtail X. \tag{8250}\end{equation}
Heyting implication:
\begin{equation} A\Rightarrow B = \max \{C\mid C\wedge A\leq B\}. \tag{8251}\end{equation}
The defining adjunction (existence guaranteed by cartesian closure):
\begin{equation} C\leq (A\Rightarrow B) \iff C\wedge A\leq B, \qquad (-\wedge A)\dashv (A\Rightarrow -). \tag{8252}\end{equation}
This is the subobject-level restriction of the topos exponential adjunction:
\begin{equation} \mathrm {Hom}(C\wedge A,B)\cong \mathrm {Hom}(C,A\Rightarrow B), \qquad (-\times A)\dashv (-)^A. \tag{8253}\end{equation}
Therefore \(\Omega \) carries an internal Heyting algebra structure:
\begin{equation} \Omega \ \text {internal Heyting algebra}, \qquad \text {Topos}\;\Longrightarrow \;\Omega \;\Longrightarrow \;\text {Heyting}. \tag{8254}\end{equation}
IV. Heyting \(\to \) BHK via Curry–Howard

The Heyting operations correspond to BHK proof-constructions:

\begin{equation} \begin {array}{rcl} P\wedge Q &\leftrightarrow & (p,q),\\[3pt] P\vee Q &\leftrightarrow & \operatorname {inl}(p)\;|\;\operatorname {inr}(q),\\[3pt] P\Rightarrow Q &\leftrightarrow & (p\mapsto q),\\[3pt] \top &\leftrightarrow & *,\\[3pt] \bot &\leftrightarrow & \varnothing ,\\[3pt] \neg P = (P\Rightarrow \bot ) &\leftrightarrow & (p\mapsto \varnothing ). \end {array} \tag{8255}\end{equation}
A proof of \(P\) is a global element \(1\to \Omega \) factoring through \(\top \); the BHK clauses are the internal-language reading of the Heyting operations. Therefore:
\begin{equation} \text {Heyting}\;\Longrightarrow \;\text {BHK}. \tag{8256}\end{equation}
\begin{equation} \boxed { (\infty ,1)\text {-Topos} \xrightarrow {\;\tau _{\leq 0}\;} \text {Topos} \xrightarrow {\;\Omega \;} \text {Heyting} \xrightarrow {\;\mathrm {Curry\text {-}Howard}\;} \text {BHK}. } \tag{8257}\end{equation}

Remark 177.1 (Intuitionistic logic as topos internal language). The internal logic of any elementary topos is intuitionistic, not classical. The subobject classifier \(\Omega \) is a Heyting algebra rather than a Boolean algebra: the law of excluded middle \(P\vee \neg P=\top \) and double-negation elimination \(\neg \neg P=P\) hold only in the special case of a Boolean topos (\(\Omega \cong 1+1\)).

At the proof-relevant level, the Curry–Howard correspondence identifies type constructors with BHK proof-constructions: a proof of \(P\wedge Q\) is a pair, of \(P\vee Q\) an injection, of \(P\Rightarrow Q\) a function — this is \(\mathrm {BHK}_{\rm thick}\), the internal type theory of a cartesian-closed category (Subsection 177.4). Propositional \((-1)\)-truncation collapses this to \(\mathrm {BHK}_{\rm thin}\cong \) Heyting, retaining only inhabitation.

The full chain therefore reads: homotopy type theory, through its \((\infty ,1)\)-categorical semantics, contains ordinary topos logic at the \(0\)-truncated level. A topos has a Heyting \(\Omega \), and Heyting is \(\mathrm {BHK}_{\rm thin}\) — the proof-irrelevant shadow of the proof-relevant \(\mathrm {BHK}_{\rm thick}\) recovered by categorification. \(\mathrm {HoTT}\) at \(\tau _{\le 0}\) is a topos; a topos has a Heyting \(\Omega \); and Heyting is \(\mathrm {BHK}_{\rm thin}\).

177.4 Truncation and Categorification: \((\infty ,1)\)-Topos \(\to \) Heyting \(\to \) BHK

Thesis. Heyting logic and the BHK interpretation are not in a single “derives from” relation; they are linked by an adjoint pair. Truncation descends from proof-relevant types to proof-irrelevant propositions; categorification ascends. The full chain \((\infty ,1)\)-topos \(\to \) 1-topos \(\to \) Heyting is descent by truncation; Heyting \(\to \) CCC \(\to \) BHK\(_{\rm thick}\) is ascent by categorification; and BHK\(_{\rm thick}\to \) BHK\(_{\rm thin}\cong \) Heyting closes the loop.

Step 1: Descent by truncation
\begin{equation} (\infty ,1)\text {-Topos} \xrightarrow {\tau _{\le 0}} 1\text {-Topos} \xrightarrow {\Omega } \text {Heyting}. \tag{8258}\end{equation}
The 0-truncation kills higher homotopy:
\begin{equation} A\mapsto |A|_0, \qquad \pi _n(|A|_0)=0\ (n\ge 1). \tag{8259}\end{equation}
In the resulting 1-topos, the subobject lattice is classified by \(\Omega \):
\begin{equation} \mathrm {Sub}(X)\cong \mathrm {Hom}(X,\Omega ), \tag{8260}\end{equation}
and carries Heyting structure:
\begin{align} A\wedge B &= A\times _X B, \tag{8261}\\ A\vee B &= \operatorname {im}(A+B\to X), \tag{8262}\\ C\le (A\Rightarrow B) &\iff C\wedge A\le B. \tag{8263}\end{align}

The implication is the right adjoint to meet:

\begin{equation} (-\wedge A)\dashv (A\Rightarrow -), \qquad \mathrm {Hom}(C\wedge A,B)\cong \mathrm {Hom}(C,A\Rightarrow B). \tag{8264}\end{equation}
Step 2: Ascent by categorification
\begin{equation} \text {Heyting} \xrightarrow {\text {categorify}} \text {CCC}, \tag{8265}\end{equation}
sending the Heyting adjunction to the cartesian-closed exponential:
\begin{equation} \wedge \leadsto \times , \qquad \Rightarrow \leadsto (-)^A, \tag{8266}\end{equation}
\begin{equation} (-\wedge A)\dashv (A\Rightarrow -) \;\leadsto \; (-\times A)\dashv (-)^A. \tag{8267}\end{equation}
The internal language of a CCC is type theory:
\begin{equation} \text {CCC} \xrightarrow {\text {internal language}} \text {Type Theory} \simeq \text {BHK}_{\rm thick}. \tag{8268}\end{equation}
The BHK clauses are the type constructors:
\begin{equation} P\wedge Q\leftrightarrow P\times Q, \quad P\vee Q\leftrightarrow P+Q, \quad P\Rightarrow Q\leftrightarrow Q^P, \quad \bot \leftrightarrow 0, \quad \top \leftrightarrow 1. \tag{8269}\end{equation}
Step 3: Closing the loop by \((-1)\)-truncation
\begin{equation} \text {BHK}_{\rm thick} \xrightarrow {(-1)\text {-trunc}} \text {BHK}_{\rm thin}, \tag{8270}\end{equation}
where the propositional truncation retains only inhabitation:
\begin{equation} A\mapsto |A|_{-1}, \qquad |A|_{-1}= \begin {cases} \top , & A\neq \varnothing ,\\ \bot , & A=\varnothing , \end {cases} \tag{8271}\end{equation}
and
\begin{equation} \text {BHK}_{\rm thin}\cong \text {Heyting}. \tag{8272}\end{equation}
Step 4: The truncation hierarchy

Homotopy type theory is the proof-relevant top:

\begin{equation} \text {HoTT}\simeq (\infty ,1)\text {-Topos}, \tag{8273}\end{equation}
where the identity types \(\operatorname {Id}_A(x,y)\) and all homotopy groups \(\pi _0,\pi _1,\pi _2,\ldots \) are retained. The 0-truncation \(\tau _{\le 0}\) kills \(\pi _n\) for \(n\ge 1\); the \((-1)\)-truncation \(|A|_{-1}\) retains only \(A\neq \varnothing \):
\begin{equation} \begin {aligned} \text {HoTT}&\simeq (\infty ,1)\text {-Topos}\\ &\;\;\downarrow \ \tau _{\le 0}\\ 1&\text {-Topos}\\ &\;\;\downarrow \ \Omega \\ &\text {Heyting}. \end {aligned} \tag{8274}\end{equation}
Result

The three legs of the adjunction:

\begin{equation} \boxed {(\infty ,1)\text {-Topos} \;\longrightarrow \;1\text {-Topos} \;\longrightarrow \;\Omega \;\longrightarrow \;\text {Heyting}} \tag{8275}\end{equation}
\begin{equation} \boxed {\text {Heyting} \;\xrightarrow {\text {categorify}}\;\text {CCC} \;\xrightarrow {\text {internal language}}\;\text {BHK}_{\rm thick}} \tag{8276}\end{equation}
\begin{equation} \boxed {\text {BHK}_{\rm thick} \;\xrightarrow {(-1)\text {-trunc}}\;\text {BHK}_{\rm thin} \cong \text {Heyting}} \tag{8277}\end{equation}

Heyting and BHK are the same logic at two truncation levels. Within a level, Curry–Howard gives the dictionary (\(\wedge \leftrightarrow \times \), \(\Rightarrow \leftrightarrow (-)^A\), etc.). Across levels, truncation descends (proof-relevant \(\to \) proof-irrelevant) and categorification ascends. The apparent tension — “Heyting derives from BHK” versus “BHK derives from Heyting” — dissolves: the \((-1)\)-truncation sends BHK\(_{\rm thick}\) to Heyting (thick \(\to \) thin), while categorification sends Heyting to BHK\(_{\rm thick}\) (thin \(\to \) thick). They are the two directions of an adjunction, not a contradiction.

177.5 From Categories to Hilbert Spaces

Thesis. A category is represented on Hilbert spaces by a functor \(F:\mathcal {C}\to \mathbf {Hilb}\) sending each object to an \(\ell ^2\) space of morphisms. For a groupoid, this is the groupoid \(C^*\)-algebra acting on \(\ell ^2(\mathcal {C})\).

Part I: The representation functor

A category \(\mathcal {C}\) with objects \(\mathrm {Ob}(\mathcal {C})\) and hom-sets \(\mathrm {Hom}_{\mathcal {C}}(X,Y)\) is sent to Hilbert spaces by a functor:

\begin{equation} F:\mathcal {C}\to \mathbf {Hilb}, \qquad X\mapsto \mathcal {H}_X, \qquad f:X\to Y\mapsto F(f):\mathcal {H}_X\to \mathcal {H}_Y, \tag{8278}\end{equation}
satisfying functoriality:
\begin{equation} F(\mathrm {id}_X)=I_{\mathcal {H}_X}, \qquad F(g\circ f)=F(g)\circ F(f). \tag{8279}\end{equation}
Part II: The \(\ell ^2\) construction

A Hilbert space is a complete inner-product space:

\begin{equation} \langle \cdot ,\cdot \rangle :\mathcal {H}\times \mathcal {H}\to \mathbb {C}, \qquad \mathcal {H}=\overline {\mathrm {span}}\{e_i\}_{i\in I}. \tag{8280}\end{equation}
For each object \(X\), define the Hilbert space of morphisms from a fixed generator \(A\):
\begin{equation} \mathcal {H}_X = \ell ^2(\mathrm {Hom}_{\mathcal {C}}(A,X)) = \left \{\psi :\mathrm {Hom}_{\mathcal {C}}(A,X)\to \mathbb {C} \;\middle |\;\sum _f|\psi (f)|^2<\infty \right \}, \tag{8281}\end{equation}
with inner product
\begin{equation} \langle \psi ,\phi \rangle = \sum _f\overline {\psi (f)}\,\phi (f). \tag{8282}\end{equation}
Part III: Morphisms act by precomposition

A morphism \(f:X\to Y\) induces

\begin{equation} F(f):\ell ^2(\mathrm {Hom}(A,X))\to \ell ^2(\mathrm {Hom}(A,Y)), \qquad (F(f)\psi )(g) = \psi (f\circ g). \tag{8283}\end{equation}
Part IV: Groupoid \(C^*\)-algebra

When \(\mathcal {C}\) is a groupoid, the convolution algebra is

\begin{equation} \mathbb {C}[\mathcal {C}] = \bigoplus _{g\in \mathrm {Mor}(\mathcal {C})}\mathbb {C}\,g, \tag{8284}\end{equation}
with the left regular representation
\begin{equation} \lambda :\mathbb {C}[\mathcal {C}]\to B(\ell ^2(\mathcal {C})), \qquad C^*(\mathcal {C})=\overline {\lambda (\mathbb {C}[\mathcal {C}])}. \tag{8285}\end{equation}
The groupoid \(C^*\)-algebra acts on the Hilbert space:
\begin{equation} C^*(\mathcal {C})\curvearrowright \mathcal {H}, \qquad \pi :C^*(\mathcal {C})\to B(\mathcal {H}), \qquad (\pi ,\mathcal {H}). \tag{8286}\end{equation}
Result
\begin{equation} \boxed {\mathcal {C} \xrightarrow {\;\mathbb {C}[-]\;}\mathbb {C}[\mathcal {C}] \xrightarrow {\;\mathrm {rep}\;}B(\mathcal {H}),} \qquad \boxed {\mathcal {C}\xrightarrow {\;F\;}\mathbf {Hilb}.} \tag{8287}\end{equation}
\begin{equation} \boxed {X\mapsto \mathcal {H}_X, \qquad f\mapsto F(f),} \qquad \boxed {\mathcal {H}_X=\ell ^2(\mathrm {Hom}_{\mathcal {C}}(A,X)).} \tag{8288}\end{equation}

The full chain. HoTT yields the \(\infty \)-groupoid \(\Pi _\infty (A)\), embedding into \((\infty ,1)\mathrm {Cat}\); the \(0\)-truncation is ETCS (\(\mathbf {Set}\)). A category \(\mathcal {C}\) is then represented on a Hilbert space via \(\mathcal {H}_X=\ell ^2(\mathrm {Hom}(A,X))\), and for a groupoid this is the groupoid \(C^*\)-algebra. The path from type theory to quantum mechanics runs:

\begin{equation} \mathrm {HoTT} \to \infty \mathrm {Gpd} \hookrightarrow (\infty ,1)\mathrm {Cat} \xrightarrow {F}\mathbf {Hilb} \xrightarrow {C^*}B(\mathcal {H}). \tag{8289}\end{equation}

177.6 From \(\infty \)-Groupoids to von Neumann Algebras

Thesis. The \(1\)-truncation of an \(\infty \)-groupoid is an ordinary groupoid, whose convolution algebra closes (in the weak topology) to a von Neumann algebra. For the fundamental \(\infty \)-groupoid of a space, this is the group von Neumann algebra \(L(\pi _1(X))\), completing the passage HoTT \(\to \) \(\infty \)-groupoid \(\to \) operator algebra.

Step 1: \(1\)-truncation to an ordinary groupoid

Let \(\mathcal {G}_\infty \) be an \(\infty \)-groupoid. Its \(1\)-truncation discards all cells above level \(1\):

\begin{equation} \Pi _1(\mathcal {G}_\infty ) = \tau _{\leq 1}(\mathcal {G}_\infty ) = (\mathrm {Ob},\mathrm {Mor}), \tag{8290}\end{equation}
an ordinary groupoid with objects and morphisms only.
Step 2: Convolution \(*\)-algebra

Form the groupoid algebra:

\begin{equation} \mathbb {C}[\Pi _1(\mathcal {G}_\infty )] = \bigoplus _{g\in \mathrm {Mor}}\mathbb {C}\,g, \qquad g\cdot h = gh, \qquad g^* = g^{-1}. \tag{8291}\end{equation}
Step 3: \(\ell ^2\) representation

The Hilbert space of square-summable functions on morphisms:

\begin{equation} \ell ^2(\Pi _1(\mathcal {G}_\infty )) = \left \{\psi :\mathrm {Mor}\to \mathbb {C} \;\middle |\;\sum _g|\psi (g)|^2<\infty \right \}, \qquad \langle \psi ,\phi \rangle = \sum _g\overline {\psi (g)}\,\phi (g). \tag{8292}\end{equation}
The left regular representation acts by
\begin{equation} \lambda (g)\delta _h = \delta _{gh}, \qquad \lambda :\mathbb {C}[\Pi _1(\mathcal {G}_\infty )] \to B\!\left (\ell ^2(\Pi _1(\mathcal {G}_\infty ))\right ). \tag{8293}\end{equation}
Step 4: Weak closure to a von Neumann algebra

Let \(M_0\) be the image of the regular representation, and take its double commutant (von Neumann bicommutant theorem):

\begin{equation} M_0 = \lambda \!\left (\mathbb {C}[\Pi _1(\mathcal {G}_\infty )]\right ), \qquad M = M_0'', \tag{8294}\end{equation}
\begin{equation} M = \lambda \!\left (\mathbb {C}[\Pi _1(\mathcal {G}_\infty )]\right )'' = W^*(\Pi _1(\mathcal {G}_\infty )) = L(\Pi _1(\mathcal {G}_\infty )). \tag{8295}\end{equation}
\begin{equation} \boxed {\mathcal {G}_\infty \;\xrightarrow {\tau _{\leq 1}}\;\Pi _1(\mathcal {G}_\infty ) \;\xrightarrow {\mathbb {C}[-]}\;\mathbb {C}[\Pi _1(\mathcal {G}_\infty )] \;\xrightarrow {\lambda }\;B(\ell ^2) \;\xrightarrow {(\cdot )''}\;W^*(\Pi _1(\mathcal {G}_\infty )).} \tag{8296}\end{equation}
Step 5: Fundamental group case

For the fundamental \(\infty \)-groupoid of a space \(X\), \(\mathcal {G}_\infty =\Pi _\infty (X)\), the \(1\)-truncation gives the fundamental group:

\begin{equation} \Pi _1(X) = \pi _1(X). \tag{8297}\end{equation}
The resulting von Neumann algebra is the group von Neumann algebra:
\begin{equation} L(X) = L(\pi _1(X)) = \lambda (\mathbb {C}[\pi _1(X)])''. \tag{8298}\end{equation}
It carries the canonical trace:
\begin{equation} \tau :L(\pi _1(X))\to \mathbb {C}, \qquad \tau (a) = \langle a\,\delta _e,\delta _e\rangle , \tag{8299}\end{equation}
making \((L(\pi _1(X)),\tau )\) a tracial von Neumann algebra.
Result
\begin{equation} \boxed {\Pi _\infty (X)\mapsto L(\pi _1(X)) = \lambda (\mathbb {C}[\pi _1(X)])''.} \tag{8300}\end{equation}
\begin{equation} \boxed {\mathcal {G}_\infty \mapsto W^*(\tau _{\leq 1}\mathcal {G}_\infty ).} \tag{8301}\end{equation}

Interpretation. The \(\infty \)-groupoid of a type carries homotopy at every level, but the operator-algebraic shadow sees only the \(1\)-truncation: the fundamental group \(\pi _1\). Its group von Neumann algebra \(L(\pi _1(X))\), with canonical trace \(\tau (a)=\langle a\delta _e,\delta _e\rangle \), is the tracial algebra on which the Tomita–Takesaki modular flow acts. The chain

\begin{equation} \mathrm {HoTT} \to \Pi _\infty (X) \xrightarrow {\tau _{\leq 1}}\pi _1(X) \xrightarrow {\lambda ,(\cdot )''}L(\pi _1(X)) \xrightarrow {\text {Tomita}}\sigma _t \tag{8302}\end{equation}
connects type theory to the modular time flow: the higher homotopy is truncated to \(\pi _1\), the group algebra closes to a tracial von Neumann algebra, and the trace generates the modular dynamics that, in the gravitational setting, is emergent time.

177.7 The h-Level Truncation Tower

Thesis. Every type sits in a tower of homotopy levels, from contractible (\(-2\)) through propositions (\(-1\)), sets (\(0\)), groupoids (\(1\)), and upward to the full \(\infty \)-groupoid. Each level is defined recursively by the homotopy level of its identity types, and the truncation operators \(\tau _n\) project down the tower. ETCS lives at level \(0\); the operator-algebraic shadow (\(\pi _1\)) lives at level \(1\).

The homotopy-level classification
\begin{equation} \begin {array}{c|c|c} n & \text {HoTT truncation} & \text {Structure}\\ \hline -2 & \mathrm {isContr}(A) & \text {contractible}\\ -1 & \mathrm {isProp}(A) & \text {proposition}\\ 0 & \mathrm {isSet}(A) & \text {set}\\ 1 & \mathrm {isGroupoid}(A) & 1\text {-groupoid}\\ 2 & \mathrm {is2Type}(A) & 2\text {-groupoid}\\ 3 & \mathrm {is3Type}(A) & 3\text {-groupoid}\\ \vdots & \vdots & \vdots \\ n & \mathrm {is}n\mathrm {Type}(A) & n\text {-groupoid}\\ \vdots & \vdots & \vdots \\ \infty & A & \infty \text {-groupoid} \end {array} \tag{8303}\end{equation}
Recursive definition

The levels are defined by recursion on the identity types:

\begin{align} \mathrm {isProp}(A) &:= \prod _{x,y:A}(x=y), \tag{8304}\\ \mathrm {isSet}(A) &:= \prod _{x,y:A}\mathrm {isProp}(x=y), \tag{8305}\\ \mathrm {is1Type}(A) &:= \prod _{x,y:A}\mathrm {isSet}(x=y), \tag{8306}\\ \mathrm {is2Type}(A) &:= \prod _{x,y:A}\mathrm {is1Type}(x=y), \tag{8307}\\ &\;\;\vdots \notag \\ \mathrm {is}n\mathrm {Type}(A) &:= \prod _{x,y:A}\mathrm {is}(n-1)\mathrm {Type}(x=y). \tag{8308}\end{align}

Each level requires the identity types one level down to be already truncated — the tower is built from the bottom by iterating \(\prod _{x,y:A}(-)\) on identity types.

Truncation operators

The truncation \(\tau _n\) projects a type to its \(n\)-type:

\begin{equation} \tau _{-2}(A) = *, \quad \tau _{-1}(A) = \|A\|, \quad \tau _0(A) = \|A\|_0, \quad \tau _1(A) = \|A\|_1, \quad \tau _2(A) = \|A\|_2, \quad \vdots \tag{8309}\end{equation}
\begin{equation} \tau _n(A) = \|A\|_n, \qquad \vdots \qquad \tau _\infty (A) = A. \tag{8310}\end{equation}
Level-by-level identification
\begin{equation} \boxed {\mathrm {Prop} = (-1)\text {-types},} \qquad \boxed {\mathrm {Set} = 0\text {-types},} \tag{8311}\end{equation}
\begin{equation} \boxed {1\text {-types}\simeq 1\text {-groupoids},} \qquad \boxed {n\text {-types}\simeq n\text {-groupoids},} \tag{8312}\end{equation}
\begin{equation} \boxed {\mathrm {Type}\simeq \infty \text {-groupoids}.} \tag{8313}\end{equation}
The descending tower
\begin{equation} \begin {array}{c} \infty \text {-groupoid}\\ \big \downarrow \ \tau _n\\ n\text {-groupoid}\\ \big \downarrow \ \tau _{n-1}\\ (n-1)\text {-groupoid}\\ \vdots \\ \big \downarrow \ \tau _0\\ \mathrm {Set}\\ \big \downarrow \ \tau _{-1}\\ \mathrm {Prop}\\ \big \downarrow \ \tau _{-2}\\ * \end {array} \tag{8314}\end{equation}
Interpretation

The tower organises all of mathematics by homotopy level. At the bottom, \(\tau _{-2}\) collapses everything to a point; \(\tau _{-1}\) keeps only truth values (propositions, the subobject classifier \(\Omega \)); \(\tau _0\) keeps sets (ETCS); \(\tau _1\) keeps groupoids (whose \(\pi _1\) gives the group von Neumann algebra of Section 177.6). Each successive truncation discards one more layer of higher homotopy.

The physical content lives at specific levels. ETCS and classical set theory are the \(0\)-truncation. The fundamental group \(\pi _1\) — and hence the operator algebra \(L(\pi _1)\) and the Tomita modular flow — is the \(1\)-truncation. The full untruncated type (\(\tau _\infty (A)=A\)) is the \(\infty \)-groupoid, the internal object of the \((\infty ,1)\)-topos. Mathematics is not a single level but the entire tower; classical structures are its lower truncations, and the higher homotopy that ETCS discards is exactly what carries the \(\infty \)-categorical and quantum structure.

177.8 From HoTT to ZFC via \(0\)-Truncation

Thesis. Classical set theory is the \(0\)-truncation of homotopy type theory. Restricting HoTT to \(0\)-types (sets) and adding the law of excluded middle, choice, and replacement recovers ETCS and then ZFC. The entire classical foundation is the lowest non-trivial floor of the h-level tower.

Step 1: \(0\)-truncation of the universe

Start from HoTT with universe \(\mathcal {U}\) and take the \(0\)-truncation:

\begin{equation} \tau _0(\mathcal {U}) = \|\mathcal {U}\|_0, \qquad 0\text {-Types} = \{A:\mathcal {U}\mid \mathrm {isSet}(A)\}. \tag{8315}\end{equation}
A set is a type whose identity types are propositions:
\begin{equation} \mathrm {isSet}(A) := \prod _{x,y:A}\mathrm {isProp}(x=y). \tag{8316}\end{equation}
Step 2: UIP and the category of sets

The set condition is uniqueness of identity proofs (UIP):

\begin{equation} \mathrm {UIP}:\quad x=y\;\Longrightarrow \;p=q \quad (\text {any two proofs of }x=y\text { are equal}). \tag{8317}\end{equation}
The \(0\)-types form the category of sets:
\begin{equation} \boxed {0\text {-Types}\simeq \mathbf {Set}.} \tag{8318}\end{equation}
Step 3: Adding LEM and AC gives ETCS

Adjoin the law of excluded middle and the axiom of choice:

\begin{equation} \mathrm {LEM}:\quad P+\neg P, \qquad \mathrm {AC}. \tag{8319}\end{equation}
Then:
\begin{equation} 0\text {-Types} + \mathrm {LEM} + \mathrm {AC} \;\Longrightarrow \; \mathbf {ETCS}. \tag{8320}\end{equation}
LEM forces the subobject classifier \(\Omega \) to be two-valued (\(\Omega =\mathbf {2}\)), making the topos Boolean; AC provides splitting of epimorphisms.
Step 4: Adding replacement gives ZFC

Adjoin the replacement schema:

\begin{equation} \mathbf {ETCS} + \mathrm {Replacement} \;\Longrightarrow \; \mathbf {ZFC}. \tag{8321}\end{equation}
ETCS is equivalent to bounded Zermelo set theory with choice; adding replacement raises it to full ZFC.
The full reduction
\begin{equation} \boxed {\mathrm {HoTT} \;\xrightarrow {\tau _0}\;0\text {-Types} \;\xrightarrow {\mathrm {UIP}}\;\mathbf {Set} \;\xrightarrow {+\mathrm {LEM}+\mathrm {AC}}\;\mathbf {ETCS} \;\xrightarrow {+\mathrm {Replacement}}\;\mathbf {ZFC}.} \tag{8322}\end{equation}
The translation dictionary
\begin{equation} \begin {array}{c|c} \text {HoTT} & \text {ZFC}\\ \hline A:\mathcal {U} & x\\ A=B & A=B\\ A\simeq B & \text {bijection}\\ \Sigma _{x:A}B(x) & \text {dependent pair}\\ \Pi _{x:A}B(x) & \text {function set}\\ \|A\|_0 & \text {underlying set}\\ \mathbb {N}_{\mathrm {HoTT}} & \omega \\ A+B & A\sqcup B\\ A\times B & A\times B\\ A\to B & B^A \end {array} \tag{8323}\end{equation}
Result
\begin{equation} {\footnotesize \boxed {0\text {-Types}\simeq \mathbf {Set},}} \tag{8324}\end{equation}
\begin{equation} {\footnotesize \boxed {\mathbf {Set}+\mathrm {LEM}+\mathrm {AC}+\mathrm {Replacement} \simeq \mathbf {ZFC},}} \tag{8325}\end{equation}
\begin{equation} {\footnotesize \boxed {\mathrm {HoTT}\rightsquigarrow \mathbf {ZFC} \text { via }\tau _0.}} \tag{8326}\end{equation}

Interpretation. ZFC is not foundational bedrock — it is the \(0\)-truncation of HoTT with three classical axioms added. The passage discards all higher homotopy (\(\tau _0\) keeps only sets), collapses the Heyting-valued \(\Omega \) to Boolean (LEM), splits epimorphisms (AC), and closes under replacement. Everything above level \(0\) — the groupoids carrying \(\pi _1\), the operator algebras \(L(\pi _1)\), the modular flow, and the full \(\infty \)-categorical structure — is invisible to ZFC. Classical set theory is the shadow that the \(\infty \)-groupoid casts at homotopy level \(0\). The complete picture runs from the untruncated type at the top down through every truncation:

\begin{equation} \mathrm {HoTT}\;(\infty ) \;\to \;\cdots \;\to \;\mathbf {Set}\;(0) \;\to \;\mathbf {ETCS} \;\to \;\mathbf {ZFC}, \tag{8327}\end{equation}
with the higher levels carrying the geometry and physics that the classical foundation cannot see.