---
title: Synthetic Tait Computability
url: https://www.emergentmind.com/topics/synthetic-tait-computability-stc
type: topic
---

# Synthetic Tait Computability

Synthetic Tait Computability (STC) is a synthetic formulation of Tait-style computability and logical-relations arguments inside the internal language of a glued categorical model rather than as an external metatheoretic construction. In this formulation, modalities and glue-like type formers encode the syntactic–semantic phase distinction that classical proofs treat through presheaves, naturality conditions, and substitution lemmas. The general program is developed in "Synthetic Tait Computability the Hard Way" [2310.02051], while "Canonicity for Cost-Aware Logical Framework via Synthetic Tait Computability" [2504.12464] applies it to the cost-aware logical framework CALF and resolves a conjecture of Niu et al. by proving canonicity for closed computations of type \(F\,\mathbb{N}\). A later mechanization in Istari shows that core STC constructions can be formalized essentially verbatim in an extensional proof assistant [2509.11418].

## 1. Conceptual basis of STC

STC recasts classical computability predicates as internal objects of a glued topos. In the account of "Synthetic Tait Computability the Hard Way" [2310.02051], the progression runs from naive Tait-style canonicity and normalization proofs, through categorical reformulations using presheaves and Artin gluing, to a synthetic presentation in which the ambient internal logic discharges naturality, coherence, and substitution stability automatically. The resulting viewpoint treats canonicity, normalization, and parametricity as consequences of internal semantic structure rather than as externally maintained logical-relations invariants.

A central feature of STC is a modal phase distinction. In the general presentation, the internal language carries a proposition governing the syntactic phase and two corresponding modalities: an open modality, written as a reader-like construction such as \(\mathrm{Msyn}\,X \cong (\bullet \to X)\) or \(\mathrm{open}(A) := \mathrm{syn} \to A\), and a closed modality, written as \(\mathrm{Msem}\,X\) or \(\mathrm{closed}(A)\), that quotients or trivializes information under the phase proposition [2310.02051]. Extension types and glue types then internalize the gluing constraints: syntactic data remain visible in the open component, while semantic data inhabit the closed component and restrict correctly under the phase proposition.

This construction is “synthetic” in a precise sense. Rather than defining a logical relation externally and then proving substitution closure, head expansion, and compatibility with type formers by hand, STC works inside the internal higher-order logic of the glued category, where exponentials, pullbacks, and finite limits already realize the relevant Kripke and gluing structure [2310.02051]. A plausible implication is that the proof burden shifts from bespoke metatheoretic bookkeeping to the design of the internal modalities and glue objects.

## 2. STC in the cost-aware logical framework CALF

In the CALF application, STC is specialized to a dependent, effectful variant of call-by-push-value for synthetic cost analysis. CALF separates value types and computation types, introduces a writer-style cost effect via a primitive step constructor, and enforces a phase distinction between behavioral equality and cost sensitivity through a proposition \(\mathrm{beh}\) [2504.12464]. The underlying CBPV split is explicit: value types inhabit \(\mathrm{tpv}\), computation types inhabit \(\mathrm{tpc}\), value terms are \(\mathrm{tm}^+(A)\), and computation terms are \(\mathrm{tm}^{\ominus}(X) := \mathrm{tm}^+(\mathrm{U}(X))\).

The core CBPV structure is given by the adjunction
\[
F : \mathrm{tpv} \to \mathrm{tpc}, \qquad U : \mathrm{tpc} \to \mathrm{tpv},
\]
together with
\[
\mathrm{ret} : \mathrm{tm}^+(A) \to \mathrm{tm}^{\ominus}(F(A)),
\]
\[
\mathrm{bind} : \mathrm{tm}^{\ominus}(F(A)) \to (\mathrm{tm}^+(A) \to \mathrm{tm}^{\ominus}(X)) \to \mathrm{tm}^{\ominus}(X),
\]
satisfying the usual \(\beta\), \(\eta\), and associativity equations. Cost is governed by a monoid \((\mathrm{costty}, 0, +, \le)\) and a step constructor
\[
\mathrm{stepp} : \mathrm{costty} \to \mathrm{tm}^{\ominus}(X) \to \mathrm{tm}^{\ominus}(X),
\]
with laws \(\mathrm{stepp}_0\) and \(\mathrm{stepp}_+\). The behavioral phase proposition \(\mathrm{beh}\) enforces the crucial equation
\[
\mathrm{beh} \vdash \mathrm{stepp}\ c\ e = e,
\]
so cost is silent under \(\mathrm{beh}\) [2504.12464].

Canonicity in this setting is computation-level rather than purely value-level. For natural numbers, the main theorem states that every closed computation of type \(F\,\mathbb{N}\) is equal to a computation that first incurs some abstract cost and then returns a canonical numeral:
\[
\text{For every term } e : \mathrm{tm}^{\ominus}(F(\mathrm{Nat})), \text{ there exists } c : \mathrm{costty} \text{ and } n : \mathbb{N} \text{ such that }
e = \mathrm{stepp}^c(\mathrm{ret}(\mathrm{suc}^n(\mathrm{zero}))).
\]
This is the conjectured canonicity property of CALF proved by STC in [2504.12464].

## 3. Internal computability structures

The CALF proof instantiates STC with two phase propositions: \(\mathrm{syn}\), governing the syntax/semantics split of the synthetic proof, and \(\mathrm{beh}\), governing CALF’s behavioral collapse of cost [2504.12464]. The proof then constructs computability structures internally in the language of an Artin-glued category.

For value types, the STC interpretation is a strict glue whose open component is the object-language type and whose closed component is a proof-relevant semantic family. The paper chooses that family to be all terms:
\[
\llbracket A \rrbracket^v := \mathrm{glue}\{a : A_{\mathrm{syntax}}\}\{B(a)\}, \qquad
\llbracket \mathrm{tm}^+(A) \rrbracket := \pi_{\bullet}(\llbracket A \rrbracket^v).
\]
Concretely, the value-type universe is given by
\[
\mathrm{blue.M.tpv} := \mathrm{glue}\ A:\mathrm{red.tpv}\ \{\mathrm{extTy}(\mathrm{Univ}_i;\ \mathrm{syn};\ \mathrm{red.tm}^+(A))\},
\]
so every semantic inhabitant of a value type is represented by its terms [2504.12464].

For computation types, the semantic side is not merely a set of terms but a cost algebra. The paper defines a record \(\mathrm{alg}\) with carrier \(C\), semantic stepping operation \(\mathrm{sstep} : \mathfrak{c} \to C \to C\), and laws \(\mathrm{sstep}_0\), \(\mathrm{sstep}_+\), and \(\mathrm{sstep}_{\mathrm{beh}}\), the last of which mirrors the object-theoretic equation that cost vanishes under \(\mathrm{beh}\) [2504.12464]. The interpretation of computation types is then
\[
\mathrm{blue.M.tpc} := \mathrm{glue}\{X : \mathrm{red.tpc}\}\{\mathrm{extTy}(\mathrm{alg};\ \mathrm{syn};\ \mathrm{SynAlg}\ X)\}.
\]

The most important semantic object is the free \(F\)-algebra, \(F\mathrm{Alg}\), whose carrier directly packages the canonicity shape of computations. Its closed component records that a computation \(e : \mathrm{tm}^{\ominus}(F(A))\) is of the form \(\mathrm{stepp}^c(\mathrm{ret}\ a)\), with cost hidden behind \(\mathrm{closed\_beh}\) and collapsed to \(\mathrm{ret}\ a\) under \(\mathrm{beh}\):
\[
F\mathrm{Alg}.C(A) :=
\mathrm{glue}\{ e : \mathrm{tm}^{\ominus}(F(A)) \}
\{
\mathrm{closed\_syn}((a : \mathrm{tm}^+(A),\ bc : \mathrm{closed\_beh}(\mathrm{costty})) \times \alpha)
\},
\]
where
\[
\alpha := \mathrm{try}\ bc\ \{\lambda(c : \mathfrak{c}).\ \mathrm{open\_syn}(e = \mathrm{stepp}^c(\mathrm{ret}\ a))\}\{\mathrm{beh}\}\{\mathrm{open\_syn}(e = \mathrm{ret}\ a)\}.
\]
The canonicity theorem is therefore not extracted from a separate normalization argument; it is built into the carrier of the semantic interpretation itself [2504.12464].

For \(\mathrm{Nat}\), the value interpretation similarly enforces numeral form:
\[
\llbracket \mathrm{Nat} \rrbracket :=
\mathrm{glue}\{e : \mathrm{tm}^+(\mathrm{Nat})\}
\{
\mathrm{closed\_syn}((n : \mathbb{N}) \times \mathrm{open\_syn}(e = \mathrm{suc}^n(\mathrm{zero})))
\}.
\]
Thus closed terms of value type \(\mathrm{Nat}\) are canonical numerals, and closed computations of type \(F(\mathrm{Nat})\) are step-plus-return computations whose returned value is a numeral [2504.12464].

## 4. Proof architecture and the role of Artin gluing

The canonicity proof proceeds by constructing a computability structure \(M_{\mathrm{blue}} : \mathrm{extTy}(\Sigma_{\mathrm{calf}};\ \mathrm{syn};\ M_{\mathrm{red}})\), where \(M_{\mathrm{red}}\) is the syntactic model restricted under \(\mathrm{syn}\) [2504.12464]. This yields a section of the Artin-glued category over syntax.

The ambient glued category is
\[
E := \mathrm{PSh}(I) \downarrow N_{\rho},
\]
where \(I\) is the walking arrow \(\bullet \leftarrow \circ\), with \(\rho(\circ)=\mathrm{beh}\) and \(\rho(\bullet)=1_C\). Objects of \(E\) carry both syntactic and semantic components, together with compatibility under precomposition by \(! : \mathrm{beh} \to 1_C\). The forgetful functor \(\pi_{\circ} : E \to C\) erases semantic structure, and the induced functor
\[
\mathrm{blueify} : C \to E
\]
satisfies \(\pi_{\circ} \circ \mathrm{blueify} = \mathrm{id}_C\) [2504.12464].

This is the synthetic version of the Fundamental Theorem of Logical Relations. Every well-typed term inhabits its glued interpretation, and the open component retracts to the original syntax. For a closed computation \(e : \mathrm{tm}^{\ominus}(F(\mathrm{Nat}))\), the semantic component of \(\mathrm{blueify}(e)\) contains a witness triple \((n,c,p)\), where \(p\) proves
\[
e = \mathrm{stepp}^c(\mathrm{ret}(\mathrm{suc}^n(\mathrm{zero}))).
\]
Projecting back to the syntactic side yields exactly the canonicity theorem in the original category of judgments [2504.12464].

Two technical ingredients are especially important. First, the interaction law
\[
\mathrm{ap\_step}: \mathrm{ap}(\mathrm{stepp}\ c\ f, a) = \mathrm{stepp}\ c(\mathrm{ap}\ f\ a)
\]
is used to lift semantic stepping through \(\Pi\)-types. Second, the \(\mathrm{bind}\) clause in the glued semantics uses the witness that a computation is syntactically equal to \(\mathrm{stepp}^c(\mathrm{ret}\ a)\) to derive the corresponding shape of \(\mathrm{bind}(e,f)\); the paper identifies this as the STC counterpart of classical head-expansion reasoning [2504.12464].

## 5. Relation to earlier STC and later mechanization

The CALF proof is a specialization of the more general STC methodology developed in "Synthetic Tait Computability the Hard Way" [2310.02051]. In that broader account, STC handles canonicity for a simple base type, normalization by reify/reflect and normalization by evaluation, dependent types with \(\Pi\), \(\Sigma\), and \(U\), and parametricity for System F through double gluing. The common pattern is always the same: define a glued semantic object whose open component is the syntax, prove a synthetic fundamental lemma, and then read off the desired metatheorem from the closed component.

The CALF application extends this pattern in a direction absent from ordinary STC examples: it combines dependent CBPV polarization with an explicit cost effect and a second phase proposition \(\mathrm{beh}\) that erases cost. The paper identifies several new ingredients relative to ordinary CBPV logical relations: a cost-sensitive algebra \(\mathrm{alg}\) with \(\mathrm{sstep}_{\mathrm{beh}}\), gluing of computation types to algebras in the closed component, try/closed-induction forms specialized to \(\mathrm{beh}\), and the crucial use of \(\mathrm{ap\_step}\) rather than \(\mathrm{lam\_step}\) [2504.12464]. This suggests that STC is not merely a repackaging of standard canonicity arguments, but a framework capable of internalizing nontrivial effect-specific proof obligations.

A later development, "Mechanizing Synthetic Tait Computability in Istari" [2509.11418], shows that these internal constructions can be formalized essentially verbatim in an extensional type theory with equality reflection. That work develops a reusable phase-distinction library with modalities, extension types, and strict glue types, and applies it both to a canonicity model for dependent type theory with booleans and to a Kripke canonicity model for the cost-aware logical framework. In the CALF case, the mechanization uses presheaves over the two-point poset \(\mathbbm{2} = \{ \mathrm{beh} \to \top \}\), corresponding to a two-world Kripke logical relation, and relies on equality reflection to avoid transport-heavy encodings [2509.11418].

## 6. Significance, scope, and limitations

Within CALF, the canonicity theorem has a clear semantic meaning: a closed computation of \(F(A)\) is observationally equivalent to “incur cost, then return a value.” For \(A = \mathrm{Nat}\), value-level canonicity says every closed \(t : \mathrm{Nat}\) satisfies \(t \equiv \mathrm{suc}^n(\mathrm{zero})\), while computation-level canonicity strengthens this to the step-plus-return form for closed \(e : F(\mathrm{Nat})\) [2504.12464]. The paper explicitly connects this to a sound basis for cost analysis and to algorithmic cost proofs, citing examples such as merge sort \(O(n \log n)\) [2504.12464].

At the same time, several boundaries are explicit. The CALF result is canonicity, not full normalization; termination and normalization beyond canonicity are not addressed [2504.12464]. The framework omits a mixed computation-level \(\Sigma^{+-}\) to avoid effect-forgetting projections, and the paper states that adding such constructs would require linear contexts, such as the Enriched Effect Calculus, which are not modeled there [2504.12464]. Equality reflection is confined to values rather than computations, and universes of computation types are left for future work [2504.12464].

Broader STC also carries methodological caveats. The general STC account notes that G-types may require strictification to reconcile “equal under \(\bullet\)” with external isomorphism, though the restricted uses in that development can be constructive [2310.02051]. The Istari mechanization similarly states that strict glue type equations are justified by realignment or strictification axioms in a Grothendieck topos, and that algorithmic content must be externalized from the internal language of the gluing model [2509.11418].

These limitations clarify a common misconception. STC is not itself a normalization algorithm, nor does it automatically yield computational extraction. Rather, it is a semantic proof technology that internalizes gluing and logical relations into modal dependent type theory. Its significance lies in making phase distinctions, computability structures, and read-back arguments precise enough that canonicity and related metatheorems emerge from the internal structure of the model rather than from externally managed logical-relations infrastructure.

Source: https://www.emergentmind.com/topics/synthetic-tait-computability-stc