223 Predicate Encoding of the Core: Logic, ZFC, Categories, Type Theory,
Algebra
Thesis. The essential content of five formal frameworks can be carried by four predicates.
Membership, composition, typing, and divisibility all reduce to combinations of \(\mathsf {Eq}\), \(\mathsf {Comp}\), \(\mathsf {Lev}\), and \(\mathsf {Tr}\);
objects become derived notions; and the three classical paradoxes are blocked by a single
axiom, the irreflexivity of \(\mathsf {Lev}\).
Both \(\mathsf {Add}\) and \(\mathsf {Mul}\) are instances of \(\mathsf {Comp}\) with different axioms — idempotence present or absent
(Section 222.2).
\begin{equation} \boxed {\text {four predicates, five fields}.} \tag{13851}\end{equation}
The encoding makes one structural fact visible that the separate formalisms obscure: identity
and grading differ exactly in their behaviour at the diagonal.
Identity applies to itself; grading
must not. Every paradox treated in this work — Russell’s, Girard’s, Burali-Forti’s — is an
attempt to make the grading reflexive, and every classical repair — Foundation, the universe
hierarchy, ramified types — is a way of forbidding it. Stated in predicates, the three repairs are
one axiom, and the distinction between the frameworks is a matter of which derived notions
they choose to name.
223.1 Below the Predicate: Application, Arity, and the Binary Floor
Predicates are not primitive: \(P(x)\) already presupposes a symbol, a term, and the act of applying
one to the other. Application is the more basic notion, and application is binary. Descending
further — to unary predicates, to rewriting, to a single constant — does not reach below two
places, because a relation with fewer than two relata relates nothing. Two is the floor, for
symbols and for arity alike.
\begin{equation} \boxed {\text {binary is the floor}.} \tag{13867}\end{equation}
Step 7: Why two is minimal
To relate is to relate something to something. One relatum leaves nothing to relate it to; zero
leaves nothing at all. The requirement is not a limitation of notation but the content of the
word:
Two symbols
and two places are the minimum, and they are the same minimum found earlier
in other guises — the spectrum \(\{0,1\}\), the group \(\mathbb {Z}_2\), the law \(A\neq \neg A\). Predicates were treated as
primitive throughout this work for convenience; what is actually primitive is application,
and what application requires is a pair. The elimination cannot proceed past that
point, since a system with fewer than two places has nothing to apply and nothing to
distinguish.
223.2 Set Notation as Abbreviation: \(x\in \{A,\neg A\}\) and \(x\in \{a_1,\dots ,a_n\}\)
Thesis. Two of the most basic uses of braces — membership in a complementary pair, and
membership in a finite list — are abbreviations for disjunctions. We give eight encodings of
each, none using \(\{\,\}\), \(\in \), or the ellipsis, and observe that stripping the notation from the
first leaves the excluded middle, and from the second leaves a finite disjunction of
identities.
Part I: \(x\in \{A,\neg A\}\)
What the notation bundles.
\begin{equation} x\in \{A,\neg A\} \quad \text {requires}\quad \begin {cases} \text {forming the pair }\{A,\neg A\}\\ \text {the relation }\in \\ \text {the claim that }x\ \text {is one of the two} \end {cases} \tag{13871}\end{equation}
Check with \(n=2\), \(a_1=1\), \(a_2=2\): \(p(X)=X^2-3X+2\), and \(p(1)=0\), \(p(3)=2\neq 0\). This is the predicate \(\mathsf {Root}\) of Section 222.2.
\begin{equation} \boxed {\{a_1,\dots ,a_n\}\ \text {is a name for } \mathsf {Eq}(\cdot ,a_1)\vee \cdots \vee \mathsf {Eq}(\cdot ,a_n).} \tag{13893}\end{equation}
Both notations are abbreviations for disjunctions of identities, and in each case eight
independent encodings recover the content without braces, membership, or ellipsis. The first
strips to the excluded middle: \(\{A,\neg A\}\) is the objectification of \(A\vee \neg A\). The second strips to a finite
disjunction, with the ellipsis replaced by recursion or by a grammar that generates the
list without naming its length. In neither case is the collection doing work that the
disjunction does not already do — which is why every encoding succeeds, and why the
historical order (logical law first, set notation afterwards) is the order of dependence as
well.
223.3 Implementations Already Do This
Thesis. The encoding derived in Section 223.2 — grammar plus recursion, with no
braces, no membership primitive, and no ellipsis — is not a proposal. It is what
proof assistants and functional languages have implemented for decades. Writing
the definition out in code forces three things that informal set notation conceals:
explicit finiteness, an explicit recursion, and, in the proof-relevant setting, explicit
witnesses.
Inductive list (A : Type) : Type :=
| nil : list A
| cons : A -> list A -> list A.
Fixpoint In (a : A) (l : list A) : Prop :=
match l with
| nil => False
| b :: m => b = a \/ In a m
end.
Line by line: nil => False is \(\mathsf {Mem}(x,\mathsf {nil})=\bot \), and b :: m => b = a \/ In a m is \(\mathsf {Eq}(x,a)\vee \mathsf {Mem}(x,\ell )\).
Step 3: Agda — membership as a datatype
data List (A : Set) : Set where
[] : List A
_::_ : A -> List A -> List A
data _in_ {A : Set} (x : A) : List A -> Set where
here : forall {xs} -> x in (x :: xs)
there : forall {y xs} -> x in xs -> x in (y :: xs)
Here membership is not a proposition but an inductive type whose inhabitants are positions.
This makes the witness structure visible in the source: for
\begin{equation} \boxed {\texttt {here}\neq \texttt {there here} \quad \text {--- two witnesses of one membership}.} \tag{13898}\end{equation}
This is the witness multiplicity computed in Remark 210.3, appearing as a matter of
course in a working implementation: which occurrence is meant is data, not a side
condition.
Step 4: Lean
inductive List (a : Type u) where
| nil : List a
| cons : a -> List a -> List a
def Mem (a : a) : List a -> Prop
| .nil => False
| .cons b bs => a = b \/ Mem a bs
Identical in shape to the Coq definition.
Step 5: Haskell
elem :: Eq a => a -> [a] -> Bool
elem _ [] = False
elem x (y:ys) = x == y || elem x ys
The Eq a constraint is the decidability requirement: returning Bool rather than
a proposition demands that equality be decidable. Otherwise the recursion is the
same.
\begin{equation} \boxed {\text {four implementations, one recursion}.} \tag{13899}\end{equation}
Step 7: What the code forces
No ellipsis.
The notation \(\{a_1,\dots ,a_n\}\) has no counterpart; a list is built by constructors, and \(n\) is never
named.
Explicit finiteness.
Every inhabitant of List A is finite by construction, since the type is inductively generated.
Infinite sequences require a separate, coinductive declaration — exactly the distinction drawn
at the end of Section 223.2:
codata Stream (A : Set) : Set where
_::_ : A -> Stream A -> Stream A
Explicit recursion.
Membership is not a primitive relation but a function defined by cases on the constructors,
which is why it terminates and why it can be computed.
Explicit witnesses (Agda).
Proof-relevant membership records the position, so two occurrences of the same element
give two inhabitants. Informal notation writes \(x\in \{x,x\}\) and discards the distinction; the implementation
cannot.
Step 8: Where the practices diverge
informal mathematics
implementation
list
\(\{a_1,\dots ,a_n\}\)
inductive type
length
implicit in “\(\dots \)”
structural
membership
primitive \(\in \)
defined recursion
witnesses
discarded
data (Agda)
finiteness
assumed
enforced by the type
decidability
assumed
a constraint (Eq a)
\begin{equation} \boxed {\text {the encoding is standard practice in implementation and unusual only in informal prose}.} \tag{13900}\end{equation}
Nothing in Section 223.2 is a novel proposal about how membership might be defined; it is a
transcription of what every proof assistant does. The interest lies in what the transcription
reveals. Informal set notation hides the recursion, hides the finiteness assumption, hides the
decidability assumption, and — in the proof-relevant case — hides the witnesses, since \(x\in \{x,x\}\) is
written once although it holds in two ways. An implementation cannot hide any of these,
because each must be supplied before the definition type-checks. That the same recursion
appears in Coq, Lean, Agda, and Haskell, with the differences confined to the result type
(Prop, Set, Bool), indicates that the recursion, and not the collection, is where the content
lies.
Remark 223.1 (Why the trajectory runs toward the recursive form).
The encoding of Section 223.3is not merely current practice in proof assistants; it
is the form that mechanised mathematics is converging on, for reasons that match the
analysis given here.
The record so far.
Result
system
effort
Four Colour Theorem (2005)
Coq
original proof already computational
Feit–Thompson (2012)
Coq
six years, 255-page source
Kepler conjecture (2014)
HOL Light / Isabelle
Flyspeck, eleven years
Liquid Tensor Experiment (2022)
Lean
eighteen months
The formalisation cost has been falling, and in the last case the process surfaced gaps in the
informal argument — which is the expected outcome if, as argued above, informal notation
conceals recursion, finiteness, decidability, and witnesses.
Machine provers operate on the same form.Recent systems — AlphaProof and AlphaGeometry, LeanDojo and ReProver, Lean Copilot
— all generate candidate proofs and submit them to a kernel. Generation alone is insufficient:
Why mechanisation selects this form.The conclusion of Section 223.3was that the content resides in the recursion rather than in
the collection. A recursion is an algorithm; a grammar generates; both are executable. An
informal collection is not:
\begin{equation} \{a_1,\dots ,a_n\} \;\Longrightarrow \; \text {the ellipsis is not machine-readable}. \tag{13906}\end{equation}
\begin{equation} \boxed {\text {mechanisability selects the notation}.} \tag{13907}\end{equation}
Three pressures, one direction.
1.
Logical: the recursion carries the content (Sections 223.2–223.3).
2.
Practical: proof assistants require that form before a definition type-checks.
3.
Computational: machine provers can only search and verify in a checkable calculus.
Closure.Informal set notation is an abbreviation adequate for communication between
people who can reconstruct the omitted recursion. Once a machine participates — as
checker, as generator, or as search procedure — the abbreviation must be expanded, and
expanding it produces exactly the form derived in this work: a grammar, a structural
recursion, an explicit grading, and, where proofs are relevant, explicit witnesses. The
trajectory is therefore not a stylistic preference but a consequence of what can be
checked.
223.4 Eliminating \(\in \) from the Witness Example
Thesis. Section 223.3 used \(x\in (x::x::[\,])\) to exhibit two distinct witnesses, here and there here. The
example still writes \(\in \). We remove it in seven ways and observe that six of them retain the
witness structure while one destroys it — the difference being entirely a matter of the result
type.
Step 1: What the Agda witnesses record
The two inhabitants of \(x\in (x::x::[\,])\) are positions: here is position \(0\) and there here is position \(1\). So the
content of the membership claim is positional, and can be stated as such.
Step 2: Encoding 1 — indexed position
\begin{equation} \mathsf {At}(n,\ell ,a) \quad \text {``the $n$-th entry of $\ell $ is $a$''}, \tag{13909}\end{equation}
The example that introduced witness multiplicity did so through a membership type, but the
multiplicity is not a feature of membership. It is positional information: two occurrences means
two positions, two decompositions, a count of two, a filter of length two, a root of multiplicity
two. Each of these is stated without \(\in \), and each keeps the information that the informal \(x\in \{x,x\}\)
discards. Only the Boolean fold loses it, and it loses it for a reason visible in its signature —
the target has two values and cannot record which occurrence was found. The witness structure
identified throughout this work is therefore independent of the membership relation, and
survives its elimination.
223.5 Extensional Equality without Sets: Eight Predicates
Thesis. The identification \(\{x:\varphi \}=\{x:\psi \}\) collapses eight distinct relations into a single equation. Writing
them as predicates keeps them apart and shows that they are strictly ordered by strength.
Three primitives suffice — \(\mathsf {Eq}\), \(\mathsf {Comp}\), \(\mathsf {Tr}\); notably \(\mathsf {Lev}\) is not needed, since grading is required for membership
but not for comparison.
Grading is required to define membership (Section 223) but plays no role in comparison — a
separation the set-theoretic notation cannot display, since both are written with the same
symbol.
an isomorphism leaves witnesses distinguishable (Remark 210.3).
Step 5: What the set equation discards
Predicate
strength
what it records
\(\mathsf {TermEq}\)
strongest
the terms themselves coincide
\(\mathsf {NFEq}\)
strong
they compute to one form
\(\mathsf {ExtEq}\)
middle
they hold of the same things
\(\mathsf {Iso}_{f,g}\)
weakest
a specific pair of translations
\begin{equation} \boxed {\{x:\varphi \}=\{x:\psi \} \ \text {erases all four distinctions}.} \tag{13948}\end{equation}
Extensional equality is not one relation but a family, ordered by strength, and the set-theoretic
equation names only the coarsest thing they have in common. Written as predicates, one must
say which is meant: whether the terms are identical, whether they normalise alike, whether
they merely hold of the same objects, or whether some specified pair of maps translates one
into the other. The example \(x^2=1\) versus \(x=1\vee x=-1\) satisfies all four, which is why the set notation is harmless
there and misleading in general. And the primitive \(\mathsf {Lev}\) does not appear at all: comparison needs
identity, composition, and truth, but not grading — membership is the only notion that needs
a level.
Remark 223.2 (Eight verifications of one extensional identity).
Set-theoretically the claim is \(\{x:\varphi \}=\{x:\psi \}\). Eight verifications are available, none using braces, and
they do not all assert the same thing.