224 System U: Logic, ZFC, Categories, and Type Theory in One
Thesis. The four frameworks share a common core: one term grammar, three primitives, and
six axioms. Each field is obtained by adding a small module, and the differences between them
turn out to be which commutativity, identity, and truth conditions are imposed on the same
composition and grading relations. Because the core is shared, statements mixing
the four become expressible, which none of them can do alone. System U is the
base of Section 283 written in the notation of this chapter; the two are the same
theory.
Of the four predicates of the earlier presentation, two are definable and one is the logical equality
of the ambient first-order language. The primitives are \(\mathsf {Sub}\), \(\mathsf {Comp}\), and \(\neg \), and grading is the defined
notion
Step 1: The four columns are the same four notions
logic
ZFC
categories
type theory
relation
\(\vdash \)
\(\in \)
\(\to \)
\(:\)
composition
\(\vee \)
\(\cup \)
\(\circ \)
\(\Sigma \)
dual
\(\wedge \)
\(\cap \)
—
—
identity
\(\varphi \to \varphi \)
\(=\)
\(\mathrm {id}\)
\(\mathrm {refl}\)
grading
—
rank
—
universe
The composition row carries \(\vee \), not \(\wedge \): \(\cup \), \(\circ \), and \(\Sigma \) are all join-like, and conjunction is their De Morgan
dual, supplied by (13991) below rather than by \(\mathsf {Comp}\) itself. Placing \(\wedge \) and \(\cup \) in one row would ask a
single relation to be both a meet and a join.
Here \(c\) ranges over constants (among them \(\bot ,\top \)), \(v\) over variables, \(*\) is the term former for \(\mathsf {Comp}\), \(\cdot \) is
application, and \(\langle \,,\rangle \) is pairing. Terms are freely generated; the quantifiers of (U0)–(U5) range over
them. No collection of terms is postulated.
The witnesses \(v,v'\) must be bound: they occur on one side each, and leaving them
free makes the biconditional an open formula whose two sides have different free
variables.
The two axioms of the earlier presentation, recovered.
Proposition 224.1 (Reflexivity of identity).\(\mathsf {Eq}(t,t)\).
Proof.\(t=t\) is a theorem of first-order logic with equality; it need not be posited. □
Proposition 224.2 (Irreflexivity of grading).\(\neg \mathsf {Lev}(t,t)\).
Proof.Immediate from (13987): it would require \(t\neq t\). □
Proposition 224.3 (Transitivity of grading).\(\mathsf {Lev}(s,t)\wedge \mathsf {Lev}(t,u)\Rightarrow \mathsf {Lev}(s,u)\).
Proof.\(\mathsf {Sub}(s,u)\) by (U1). If \(s=u\) then \(\mathsf {Sub}(s,t)\) and \(\mathsf {Sub}(t,s)\), so \(s=t\) by (U2), contradicting \(s\neq t\). □
So the decisive pair — identity applies to itself, grading must not — costs no axioms at all.
Both are consequences of (13987).
the equivalence by (U2) together with \(\mathsf {Sub}(\varphi ,\top )\), which (U5) and (17853) supply for every \(\varphi \). With
the earlier orientation \(\mathsf {Sub}(\varphi ,\top )\) the predicate holds of every term, so \(\vdash \) would be universally satisfied; the
present form gives the intended reading, and \(\varphi \vdash \psi :\equiv \mathsf {Tr}(\neg \varphi *\psi )\) is then Boolean entailment \(\varphi \sqsubseteq \psi \), reflexive by
(17853).
Defining \(\mathrm {id}_a:=\mathsf {Comp}(a,a,a)\) would identify an object with an arrow and would impose idempotence on
composition, which fails for arrows in general.
Membership is typing together with composition data — and under module Z,
where (Z3) supplies the composition datum from the grading one, the two coincide
outright.
Composition versus union.
Both are \(\mathsf {Comp}\); they differ only in the axioms imposed:
is not a consequence of the encodings, since the left
side is \(\mathsf {Tr}\)-based and the right side is \(\mathsf {Lev}\)-based. It is a bridge principle, posited as axiom (CH) in
module T below, and its content is proof-relevance: that a truth is witnessed by a term. The
earlier claim that it follows from both sides being \(\mathsf {Lev}\) does not survive the repair of \(\vdash \), and stating it
as an axiom is the honest form — it is exactly what distinguishes a proof-relevant reading from
a proof-irrelevant one.…and stating it as an axiom is the honest form — see Remark 224.4 for
the two modules it separates.
Idempotence and totality are kept out of the core: composition is neither, so a core containing
them could not be shared with module C.
\begin{equation} \boxed {\text {common core plus a module; sets in exactly one module}.} \tag{14025}\end{equation}
Remark 224.4 (Proof-relevance is optional).Axiom (CH) is offered, not asserted. The
unification of Section 224does not depend on it, and there are two defensible modules for
the type column. The choice between them is left to the reader.
Module \(\mathrm {T}^{-}\) (proof-irrelevant).Take (T1)–(T3) and omit (CH). Typing is \(\mathsf {Lev}\), \(\Sigma \)is \(*\), universes
are stratified, and the type column is connected to the set column by \(\mathfrak {T}\)— which is the
identity, since \(x\in y\)and \(x:y\)abbreviate one formula. What is not available is a bridge to the logic
column: \(\mathsf {Tr}\)is \(\mathsf {Sub}\)-based and typing is \(\mathsf {Lev}\)-based, and no derivation carries one to the other. The
four-way structure is unaffected, because the translations \(\mathfrak {K}\), \(\mathfrak {P}\), \(\mathfrak {T}\)never pass through \(\mathsf {Tr}\).
Module \(\mathrm {T}\) (proof-relevant).Add (CH). Instantiating it at \(\varphi :=\top \), and using \(\top \to \psi =\neg \top *\psi =\bot *\psi =\psi \), one obtains
truth as
inhabitation. This is the translation \(\text {logic}\to \text {type}\)of Step 7, which becomes a theorem exactly when (CH) is
assumed and is otherwise unavailable. The gain is a fifth translation and a genuinely four-way
connected diagram; the cost is recorded next.
Why the two modules do not stack.Under module L, \(\mathsf {Tr}(\psi )\)is \(\psi =\top \)by (14000), so (14026) says
that \(\top \)is the unique inhabited term. Every proof then proves the same object, and
proof-relevance is formally present but vacuous. The conclusion is not that (CH) is
inconsistent — it is not — but that (CH) and (L2) are alternatives rather than companions:
Huntington’s axiom makes the propositional structure Boolean, and a Boolean structure
has one truth to inhabit. A non-degenerate proof-relevant reading asks for module L
to be weakened to its Heyting fragment, i.e. (L0), (L1), and distributivity without
(L2).
Position taken.This is left open by design. Both readings are extensions of the same base,
they differ by a single axiom, and neither is forced by anything earlier in the section. That is
itself the claim under examination: the frameworks are separated by their modules and not by
their foundations, and the logic/type divide — whether a truth is a fact or a witnessed fact —
turns out to be one such module choice, visible here as (CH) and (L2) declining to be asserted
together.
\begin{equation} \boxed {\text {Proposition~224.2 alone blocks all five, and cycles of every length}.} \tag{14032}\end{equation}
Russell and Girard are here the same derivation, since \(\in _0\) and \(:\) both reduce to
\(\mathsf {Lev}\).
Step 7: Mutual translation
(a) Set theory \(\to \)categories.
Define the C-structure \(\mathfrak {K}(\mathrm {Z})\): objects are terms; for each pair with \(\mathsf {Sub}(a,b)\) there is one arrow \(\iota _{a,b}\);
composition is \(\mathsf {Comp}(\iota _{a,b},\iota _{b,c},\iota _{a,c})\), and \(\mathrm {id}_a=\iota _{a,a}\). Then (C1)–(C3) hold, by (U0), (U1), and (U3) respectively, and \(x*y\) is the
coproduct of \(x\) and \(y\).
satisfying (U0) from identities and (U1) from composition; (U2) holds after quotienting by
\(a\simeq b\). On the image of \(\mathfrak {K}\) the round trip is exact: \(\mathfrak {P}\circ \mathfrak {K}=\mathrm {id}\).
(c) Type theory \(\to \)categories.
An inhabitant is a generalised element, an arrow out of the terminal object:
Proof.Take \(z:=x\). By (Z2), \(\mathsf {Comp}(x,x,x)\) holds, so \(\mathsf {Comp}(x,y,y)\), i.e. \(\mathsf {Sub}(x,y)\) by (Z3). Symmetrically with \(z:=y\) we get \(\mathsf {Sub}(y,x)\). Then \(x=y\) by
(U2). □
This is a theorem, not a definition: an object is determined by what lies below it. It
is the poset case of the Yoneda lemma, which is why the same statement reads as
extensionality in the set column and as representability in the category column. Note that it
settles extensionality for \(\sqsubseteq \); extensionality for the generator \(\in _0\) is independent and remains
(Z4).
\begin{equation} \boxed {\text {all four translations run through } \mathsf {Comp}\text { and }\mathsf {Lev}.} \tag{14036}\end{equation}
which reads simultaneously as \(a\in A\), \(A\subseteq B\), so \(a\in B\); as \(a:A\), \(A\) a subtype of \(B\), so \(a:B\); and, under \(\mathfrak {K}\), as
the composite of \(\ulcorner a\urcorner :\top \to A\) with \(\iota _{A,B}\). One derivation, three theorems.
\begin{equation} \boxed {\text {cross-framework statements become expressible}.} \tag{14039}\end{equation}
The union is not an amalgamation of four theories but the observation that they were four
presentations of two relations. Composition appears as disjunction, union, functional
composition, and dependent sum; grading appears as membership, rank, typing, and universe
level; and the choice of field amounts to which commutativity and identity conditions
are placed on them. The core carries six axioms, of which the decisive pair costs
nothing:
the first logical, the second definitional. Identity applies to itself; grading
must not. Every paradox in the survey is an attempt to make grading reflexive, and
every classical repair forbids it — so the five repairs are one definition, and what
remains is a single system in which statements crossing the four frameworks can be
written.
224.1 The Fifth Generator: Coinduction and the Four Hard Cases
Four constructions appear to demand completed collections: a choice function on an infinite
product, a Vitali set of representatives, a generic filter lying outside its model, and a
proper-class elementary embedding. None of them fails in the term language. Each requires one
additional generator — greatest fixed points — after which they become, respectively, a
generation rule, a normalisation with a partial function, a coinductive stream with a grammar
extension, and a grammar homomorphism.
Guardedness.
The generator is well defined only under a syntactic restriction:
\begin{equation} \boxed {\text {in }\nu X.F(X),\ \text {every occurrence of }X \text { lies under a constructor } (*,\ \cdot ,\
\langle \,,\rangle ).} \tag{14044}\end{equation}
Without it, \(\nu X.X\) is
unconstrained and every term satisfies the fixed-point equation. With it, \(F\) is monotone for \(\mathsf {Sub}\) and
contractive for the usual metric on infinite terms, so the greatest fixed point exists and is
unique. The earlier statement of the generator omitted this condition; it is what makes \(\nu \) a
definition rather than a schema of arbitrary assertions.
Equation (14046) is stated with \(\mathsf {Sub}\), not with \(\subseteq \): inclusion of collections is unavailable in a
system whose core names no sets, and subordination is the relation that carries the same
content. The first four generators produce only finite terms; \(\nu \) supplies the unbounded
ones.
Partial terms.
Three of the four cases below record a failure as undefinedness, which a total first-order
language cannot express. We therefore add an existence predicate and the strictness convention
with all axioms of Step 2 read as holding for defined terms. This is the minimal apparatus
that makes “\(c_\mu \cdot V\uparrow \)” a sentence rather than a notation.
Step 1: Choice as a generation rule
Instead of selecting an element from a product, posit a constant that produces a term at
each index:
and the requirement \(\forall i\,\exists t_i\) is discharged by the rule rather than by a collection of
choices.
What is and is not obtained.
The scope of this move should be stated exactly.
\begin{equation} \boxed { \begin {array}{l} \text {obtained: choice for every family whose index sort is presented by a grammar}\\ \text {not obtained: choice for an arbitrary family} \end {array}} \tag{14050}\end{equation}
With the index grammar above one gets
countable choice; with an arbitrary generated index sort one gets choice for that sort. Full AC
over a family with no presentation is not derivable, and this is not a defect to be papered over
but the position of the system: a family that cannot be generated is not an object of the
term language, so there is nothing for choice to range over. This agrees with the
observation of Section 133 that uniqueness of normal form already performs the selection:
Positing \(c_{\mathrm {rep}}\) is itself a choice principle for \(\approx \) — it is the content of the Vitali
construction, relocated from a set to a constant — and it should be labelled as such rather than
treated as free. What changes is the consequence:
Non-measurability is not a contradiction but
the undefinedness of a partial function. The measure term has no value on \(V\); by the strictness
convention of Step 0 this is a sentence of the system, and nothing in the system is violated by
its truth.
Step 3: Forcing as a coinductive stream
A generic filter is unbounded and is therefore a \(\nu \)-term:
Why (14057) is a scheme.
The earlier form quantified over all dense sets \(D\), which reintroduces quantification over
collections and so forfeits the set-freedom of the core. Here \(D\) ranges over terms of the grammar
defining dense predicates, and genericity is one axiom per such term. This is the same strength
as the usual formulation relative to a countable transitive model, where the dense sets are
exactly those the model can name.
The extension of the model is an extension of the grammar:
\begin{equation} T^{M[G]}::=T^{M}\ \mid \ c_G\cdot T . \tag{14058}\end{equation}
So “\(G\) lies outside \(M\)” becomes “\(c_G\) is
not among the constants of \(T^M\)” — a statement about signatures, not about membership in a
collection.
Step 4: Elementary embeddings as grammar homomorphisms
An embedding is a structurally recursive rewriting:
This correction matters. If \(j\) fixes every constant and commutes with every constructor,
then \(j(t)=t\) for all closed \(t\) by induction on (14042), the set of moved terms is empty, and \(\mathrm {crit}(j)\) fails to exist
— the earlier formulation defined away the very thing it was measuring. Fixing only the logical
constants leaves room for \(j\) to move atoms, and the critical point is then well defined:
\begin{equation} \mathrm {crit}(j)=\text {the }\mathsf {Lev}\text {-least } t \text { with } j(t)\neq t, \tag{14061}\end{equation}
which
exists whenever \(j\) is non-trivial, because Proposition 224.3 makes \(\mathsf {Lev}\) a strict order and \(\nu \)-terms are
reached only through guarded constructors. No proper class is needed; what is needed is only
that the rule apply everywhere:
Vopěnka’s principle becomes the scheme asserting that for
every term-presented family there exists a non-trivial homomorphism between two of its
members.
This is the same substitution made for the domain of quantification in Section 132.2:
what looked like a requirement for a set was a requirement for a way of producing
instances.
The four cases are not counterexamples but a diagnosis. The first four generators produce
finite terms, and each of these constructions is unbounded; adding \(\nu \) — greatest fixed points,
hence streams and non-well-founded objects — supplies what is missing, and the constructions
then read off directly. Choice becomes a rule emitting a term per index, with its scope now
stated precisely: as far as the index sort is generated, and no further. Vitali representatives
become a normalisation, with the choice content visible in \(c_{\mathrm {rep}}\) and non-measurability recorded as a
partial function rather than a paradox. A generic filter becomes a coinductive stream and its
genericity a scheme over term-presented dense predicates, so that no quantification over
collections returns. An elementary embedding becomes a homomorphism of the grammar which
fixes the logical constants but may move atoms, so that the critical point survives. The
grammar is
\begin{equation} \boxed {\text {three corners occupied, one empty by one line --- the third such in this work}} \tag{14087}\end{equation}
\begin{align} \text {§282}\ &:\ \text {(Glb)}+\text {(Wtn)} \ \text {empty by rigidity} \tag{14088}\\ \text {§281.3}\ &:\ \mathsf {Tv}(\theta ) +\neg \mathsf {Cm}(D)\ \text {empty by Lem.~281.22} \tag{14089}\\ \text {here}\ &:\ \textbf {(U2)}+\textbf {(B)}\ \text {empty by the above} \tag{14090}\end{align}
\begin{equation} \boxed {\text {a modality is nontrivial exactly where terms are \emph {not} rigid}} \tag{14091}\end{equation}
Rigidity was what licensed a global equality (Prop. 282.4) and what emptied the fourth
corner (Prop. 281.46). It is also what empties modality: a world that is identified with
everything it can reach has nothing to be possible about.
\begin{equation} \boxed {\text {guardedness and reflexivity are the incompatible pair; this is why}\ \nu \ \text {is consistent}} \tag{14109}\end{equation}
\begin{equation} \boxed {\text {the re-entry form is the Löb fixed point; the paradox and the generator differ by one guard}} \tag{14112}\end{equation}
\begin{equation} \boxed {\text {modality}=\text {the two fixed points over reachability};\quad \text {nontrivial}=\text {not rigid}} \tag{14128}\end{equation}
224.3 Integration as a Greatest Fixed Point: \(\int \) as \(\nu \)
Thesis. Measure theory appears to require a \(\sigma \)-algebra — a family of sets. Daniell’s inversion
removes it: take the integral as primitive and derive the measure. In the term language this
makes \(\int \) a constant \(\mathsf {c}_I\) with three axioms, the third of which is monotone convergence — a
coinductive limit. The Polyakov action then becomes a pure term, the Hilbert space a grammar
closed under \(\nu \), and the whole development splits cleanly: \(\mu \) for finite construction, \(\nu \) for infinite
limits.
\begin{equation} \boxed {\nu \ \text {is the type-theoretic counterpart of AFA}.} \tag{14154}\end{equation}
This is why the
Girard discussion turned on coinduction: dropping well-foundedness is passing from \(\mu \) to
\(\nu \), and the price — induction and normalisation — is exactly the price computed
there.
Two fixed-point operators suffice for the whole development. Finite construction — terms,
lists, naturals, the ZFC axioms of Section 221 — is \(\mu \); infinite limits — streams, reals, integrals,
Hilbert completeness — is \(\nu \). The integral is not an operation on a family of measurable sets but
the greatest fixed point of a monotone approximation, and the measure is recovered
from it by evaluation at characteristic functions. With that, the Polyakov action, the
projector algebra, and the set-theoretic foundations all inhabit a single term grammar,
distinguished only by which constants they name and which of the two fixed points they
use.
224.4 The Three Services of Set Theory, Replaced
Thesis. Set theory is retained for three services: extensionality, heterogeneous collection, and a
uniform language across fields. Each has a replacement that requires no collections, and
in each case the replacement carries strictly more information — an equivalence
relation without forming a quotient, a dependent pair that records the type of each
component, and a single term grammar in which fields differ only by their list of
constants.
with \(\mathsf {c}\) a constant, \(\mathsf {v}\) a variable, \(T\!\cdot \!T\) application, and \(\langle T,T\rangle \) pairing. Every field is obtained by fixing a
list of constants.
The three services are the reason set theory is kept after the paradoxes are handled, and none
of them requires collections. An equivalence relation does the work of extensionality without
forming classes; a dependent pair does the work of a heterogeneous set while additionally
recording what kind each component is, which the set does not; and a four-constructor
grammar does the work of a common language, with the differences between set theory,
category theory, type theory, algebra, and logic reduced to which constants are declared. The
gain is not only elimination but information: the tagged pair knows more than the bare set, and
the shared grammar makes visible that Russell’s and Girard’s paradoxes are the same term \(\mathsf {c}_L\!\cdot \!x\!\cdot \!x\),
forbidden once.
224.5 Eliminating the Function Arrow: \(f:A\to B\) as a Predicate
Thesis. The arrow \(\to \) is a binary type constructor, hence subject to the same analysis as every
other binary primitive. A function is recoverable as a ternary predicate together with two
conditions: uniqueness of value, and a clause for every constructor. The second is where totality
lives — exhaustiveness of the grammar, not an additional axiom — which is exactly how match
works in Coq and Agda.
Step 0: Discipline
The section observes the constraints: no quantification over a domain, no collections, and
existential claims discharged by witness terms rather than asserted. Equality is the equality of
the ambient logic, so \(\mathsf {Eq}\) is not a primitive; where the earlier presentation wrote \(\mathsf {Eq}(b,b')\) we write \(b=b'\).
Argument terms are generated by a grammar fixed in advance, and every scheme below has one
instance per term of that grammar.
Step 1: What the arrow bundles
\begin{equation} f:A\to B \quad \text {requires}\quad \begin {cases} f & \text {a name}\\ A,B & \text {domain and codomain}\\ \to & \text {a binary type constructor} \end {cases} \tag{14174}\end{equation}
By Section 222.1 the arrow is itself an application, \(c_\to \cdot A\cdot B\), so it carries no privilege over other
binary symbols. Three things are bundled into one piece of notation, and they come
apart:
Component of \(f:A\to B\)
content
disposition
the relation
\(f\) associates arguments to values
\(\mathsf {Fn}\) (Step 2)
single-valuedness
at most one value per argument
(F1)
totality
at least one value per argument
the grammar (Step 3)
The last row is the substantive one. Writing \(A\to B\) asserts totality silently; the analysis below makes the
assertion explicit and then discharges it.
What the elimination costs.
The replacement of (14177) by (14178) is not free, and the price is worth naming, since it is
what motivates encoding 2. Adding \(\mathrm {ap}\) to the grammar makes \(\mathrm {ap}(f,a)\) a term for every \(f\) and \(a\), including
those outside the domain. Two readings are available:
1.
Guarded. Keep \(\mathsf {Dom}\) as the hypothesis of (14178), so that \(\mathrm {ap}(f,a)\) is asserted to be a value
only where \(\mathsf {Dom}(f,a)\) holds. Elsewhere the term exists but nothing is claimed of it.
2.
Strict. Adopt the existence predicate of Section 224.1 and require \(\mathrm {E}\bigl (\mathrm {ap}(f,a)\bigr )\leftrightarrow \mathsf {Dom}(f,a)\), so the term is
undefined off the domain.
Either is consistent; the strict reading is used in Step 5, where partiality is the subject. What is
not available is an unguarded \(\mathsf {Fn}(f,a,\mathrm {ap}(f,a))\) for all \(a\), which would assert that every \(f\) is total on every term
and collapse the distinction the section is drawing.
Step 3: Encoding 2 — structural recursion
For a grammar \(A::=c_1\mid c_2\cdot A\), give one clause per constructor:
Proposition 224.7 (Exhaustiveness yields totality).If (14179) provides a clause for
every constructor of the grammar, then for each term \(t\)of that grammar there is a \(b\)with \(\mathsf {Fn}(f,t,b)\),
and by (14176) it is unique.
Proof.By induction on the formation of \(t\), which is a metatheoretic induction over a
decidable grammar and not a quantified statement of the object language. If \(t=c_1\), the first
clause applies. If \(t=c_2\cdot a\), the induction hypothesis supplies \(b\) with \(\mathsf {Fn}(f,a,b)\) and the second clause supplies
\(g(b)\). Uniqueness at each stage is (14176). □
\begin{equation} \boxed {\text {a clause for each constructor yields totality}.} \tag{14180}\end{equation}
Note what carries the argument: the grammar has finitely many constructors and each
term is built by finitely many applications of them, so the induction is over the presentation,
not over a domain of objects. This is why no collection is required.
Worked example: doubling.
With \(\mathbb {N}::=0\mid s\cdot n\):
becomes, with the quantifiers removed as in Section 220.2, one axiom instance per term \(t\) of
the argument grammar:
\begin{equation} \boxed {\mathsf {Fn}\bigl (f,t,\mathrm {ap}(f,t)\bigr ) \qquad [\text {scheme, one instance per } t].} \tag{14185}\end{equation}
The universal is discharged by the scheme and the existential by the
former, so the statement is quantifier-free. It remains, however, a family of assumptions: the
scheme asserts at each \(t\) what encoding 2 proves at each \(t\). That is the difference the next step
records.
Step 5: Partial functions
Dropping (F2) and keeping only single-valuedness gives partiality:
which may fail — here in
the strict reading of Step 2, so that undefinedness is a sentence rather than a notation. Making
the divergence explicit with a reduction relation:
The fixed point is taken over a predicate of one argument,
and \(X\) occurs guarded under \(\mathsf {Step}\), so the condition of Section 224.1 is met and (14188)
is a definition rather than an assertion. The existential over \(a'\) is discharged by the
reduction being deterministic: \(a'\) is the term \(\mathrm {step}(f,a)\).
Reading (14188) with \(\nu \) in place of \(\mu \)
gives the predicate satisfied also by non-terminating reductions — the coinductive
reading, which is what a stream-producing definition inhabits. The two fixed points are
ordered by \(\mathsf {Sub}(\mu X.F,\ \nu X.F)\) as in (14046), and the difference between them is exactly the divergent
arguments.
Step 6: Comparison
Encoding
form
source of totality
status
1. graph predicate
\(\mathsf {Fn}(f,a,b)\)
axiom (F2)
assumed
2. structural recursion
clause per constructor
the grammar
proved
3. scheme
\(\mathsf {Fn}(f,t,\mathrm {ap}(f,t))\)
scheme instances
assumed, per term
\begin{equation} \boxed {\text {encoding 2 is preferable: totality comes from the grammar}.} \tag{14190}\end{equation}
In encoding 1 totality is a single axiom requiring separate verification; in encoding 3 it is a
family of axioms, one per term, which removes the quantifier but not the assumption; in
encoding 2 it is Proposition 224.7, a consequence of having covered every constructor. The
three are not equivalent formulations of one thing — they differ in what is assumed and what is
derived, and only the second derives it.
A definition type-checks as a total function precisely when the match is exhaustive; a missing
constructor is reported as an incomplete pattern, and the definition is rejected. Two checks are
performed, and they are (F1) and Proposition 224.7 respectively: that each branch returns a
determinate value, and that the branches cover the constructors. As in Section 222.3, the
implementation makes explicit what informal notation assumes — the arrow \(A\to B\) asserts totality,
and the checker demands the clauses that justify it.
Remark 224.8 (The recursion check is a third condition).Exhaustiveness alone gives
totality for structural recursion, where each clause consumes one constructor. A recursive
call on a non-decreasing argument can be exhaustive and still fail to terminate, which is
why proof assistants perform a separate guardedness or termination check alongside the
coverage check. In the present setting that check is the requirement of Step 5 that the
fixed point be \(\mu \)rather than \(\nu \), and it is not implied by Proposition 224.7. Recording it here
keeps the correspondence with matchexact: coverage gives a value for each constructor,
guardedness gives that the computation of that value halts.
so \(h=g\circ f\) in the diagrammatic order of Section 281. Two adjustments to the earlier
form. First, the quantifier \(\forall a,b,c\) is a scheme, as everywhere else in this section. Second,
(14192) as stated is satisfied by any \(h\) defined on more than the composite — it is
an inclusion of graphs, not an equality — so single-valuedness of \(h\) is what pins it
down:
Proposition 224.9.If \(h\)and \(h'\)both satisfy (14192) and both satisfy (14176), and each is
defined only where the hypothesis of (14192) is met, then \(\mathsf {Fn}(h,a,c)\leftrightarrow \mathsf {Fn}(h',a,c)\).
Proof.Given \(\mathsf {Fn}(h,a,c)\), the domain condition supplies \(b\) with \(\mathsf {Fn}(f,a,b)\) and \(\mathsf {Fn}(g,b,c)\); (14192) for \(h'\) gives \(\mathsf {Fn}(h',a,c)\).
Symmetrically in the other direction. □
Associativity is then the equivalence of predicates
whose two sides read \(v=(h\circ g)\circ f\) and \(v=h\circ (g\circ f)\) respectively, with
the witnesses bound as in (U4) — leaving \(u,w\) free would make the biconditional an open formula
with different free variables on its two sides.
\begin{equation} \boxed {\text {the category axiom is an equivalence of predicates} \quad \checkmark } \tag{14194}\end{equation}
This agrees with the categorical encoding
of Section 222 and with (C2) of Section 281: the function arrow, once eliminated,
leaves behind exactly the composition predicate that category theory was already
using.
The arrow is not primitive. A function is a ternary predicate that is single-valued and defined
on every constructor, and the two conditions correspond exactly to the two things a
proof assistant checks: that the returned value is determined, and that the pattern
match is complete. Totality, which the notation \(A\to B\) silently asserts, is thereby relocated
from an axiom to a property of the grammar — there is a clause for each way of
building an argument, so there is a value for each argument, and the induction that
establishes this runs over the presentation rather than over a domain of objects,
which is why no collection is needed to state it. The relocation is genuine and not
cosmetic: encoding 1 assumes totality once, encoding 3 assumes it term by term,
and only encoding 2 derives it. Dropping the requirement gives partial functions,
with undefinedness expressed by the existence predicate rather than by silence; and
distinguishing \(\mu \) from \(\nu \) distinguishes definitions that terminate from those that need not,
which is the one condition that exhaustiveness does not supply (Remark 224.8).