4 VR-Sets
4.1 Position
VR-Sets is the operational theory of sets built from the single primitive \(\emptyset \). A set is not a container but an operational functionality: upon a query, it either reveals an element (which is itself a set) or reveals nothing. The relation \(x \in y\) is read as a reference—the functionality of \(y\) uses \(x\) in its description—not as physical containment. The closure principle (§ II.3 of the preprint) replaces the ZF axioms of existence: every operationally describable functionality is a set. Individual closure theorems (Pairing, Union, Power, Infinity, Replacement, Choice) are proved, not postulated.
Architectural load-bearing fact. The implementation is \(\texttt{OSet} := \texttt{ZFSet}\) — an abbrev (reducible definition) over mathlib’s quotient \(\texttt{ZFSet} := \texttt{Quotient PSet.setoid}\). VR-Sets is built on mathlib’s ZFSet, not in a parallel universe. All nine ZFC axioms are theorems on this type; no extra axioms are introduced. The ZFA-mode cannot be modelled in ZFSet (cyclic sets are provably absent); this structural boundary is formalized as AFA_Refuted and quineAtom_impossible, both axiom-free.
4.2 Foundation (Part II)
\(\texttt{OSet} := \texttt{ZFSet}\) (declared as abbrev, hence reducible). ZFSet is Quotient PSet.setoid where \(\texttt{PSet} := \texttt{inductive mk}(\alpha : \texttt{Type}, A : \alpha \to \texttt{PSet})\). The pre-set constructor \(\texttt{mk}(\alpha , A)\) encodes Definition 1 directly: \(\alpha \) is the index of queries that produce an element, \(A\) is the response function. The quotient by \(\texttt{PSet.Equiv}\) (bisimulation) is the operational identity \(\equiv \) of Definition 4, collapsed to Lean’s \(=\). Because OSet is an abbrev, all mathlib operations on ZFSet (sUnion, powerset, image, …) apply to OSet without wrappers.
\(\texttt{osetEmpty} := \emptyset : \texttt{OSet}\) via the EmptyCollection ZFSet instance. Operational identity \(a \equiv b\) is notation for \(a = b : \texttt{OSet}\), so \(\texttt{PSet.Equiv}\) is definitionally absorbed into Lean’s \(=\).
If \(\forall x : \mathrm{OSet},\; x \in a \leftrightarrow x \in b\), then \(a \equiv b\). Proved by ZFSet.ext: the membership condition is exactly Definition 4’s coincidence of functionalities. The preprint’s remark that «extensionality is built into the definition» is confirmed.
\(\exists !\, a : \mathrm{OSet},\; \forall x,\; x \notin a\). Existence: osetEmpty. Uniqueness: two sets with no members have the same membership, hence are equal by Lemma II.1.
\(\texttt{operationalDepth}(a) := \texttt{ZFSet.rank}(a) : \mathrm{Ordinal}\) — the Von Neumann rank of the membership tree.
\(\texttt{operationalDepth}(\emptyset ) = 0\) (rank_empty). If \(b \in a\) then \(\texttt{operationalDepth}(b) {\lt} \texttt{operationalDepth}(a)\) (rank_lt_of_mem). Depth is strictly monotone on membership, providing the induction instrument for VR-Sets (the analogue of A4 lifted to sets).
The cyclic case (Quine atom) is absent from OSet by construction: PSet is inductive, so all elements are accessible.
4.3 ZFC axioms as closure theorems (Part III)
\(\texttt{osetPair}(a,b) := \{ a,b\} \) (unordered pair via Insert ZFSet ZFSet). \(\texttt{osetUnion}(a) := \texttt{ZFSet.sUnion}(a)\) (\(\bigcup a\)). \(\texttt{osetPower}(a) := \texttt{ZFSet.powerset}(a)\) (\(\mathcal{P}(a)\)). \(\omega _{\texttt{OSet}} := \texttt{ZFSet.omega}\) (first infinite Von Neumann ordinal). \(\texttt{osetReplacement}(F, a) := @\texttt{ZFSet.image}\, F\, (\texttt{Classical.allZFSetDefinable}\, \_ )\, a\) (image of \(a\) under \(F\); noncomputable).
\(\forall x,\; x \in \{ a,b\} \leftrightarrow x = a \lor x = b\). Proved by ZFSet.mem_pair.
\(\forall x,\; x \in \bigcup a \leftrightarrow \exists \, c \in a,\; x \in c\). Proved by ZFSet.mem_sUnion.
\(\forall x,\; x \in \mathcal{P}(a) \leftrightarrow x \subseteq a\). Proved by ZFSet.mem_powerset.
First structural boundary: Lean’s \(\mathcal{P}(a)\) admits all subsets (classical); the preprint’s \(\mathcal{P}(a)\) contains only operationally describable subsets (countably many for \(a = \omega \)). The countability of the operational \(\mathcal{P}(\omega )\) is metatheoretic. See Observation B.1.
\(\emptyset \in \omega _{\texttt{OSet}}\) (omega_zero) and \(n \in \omega _{\texttt{OSet}} \Rightarrow \texttt{insert}\, n\, n \in \omega _{\texttt{OSet}}\) (omega_succ). The conjunction is Theorem_III_6_Infinity.
\(\forall x,\; x \in \texttt{osetReplacement}(F, a) \leftrightarrow \exists \, y \in a,\; F(y) = x\). Proved via Classical.allZFSetDefinable: all Lean functions \(F\) are treated as definable. This introduces Classical.choice (second source; see Observation C.1).
\(\forall a \ne \emptyset ,\; \exists \, x \in a,\; \forall y \in x,\; y \notin a\). Proved via WellFounded.has_min on IsWellFounded.wf (Classical.choice is the third source). Fourth structural boundary: Foundation holds unconditionally on OSet because ZFSet is well-founded by construction. In ZFA-mode it would fail; but ZFA-mode is absent (Observation B.5).
If every member of \(a\) is nonempty, then \(\exists \, f : \mathrm{OSet} \to \mathrm{OSet},\; \forall x \in a,\; f(x) \in x\). Proved via Classical.epsilon (Classical.choice directly, the fourth source). The preprint argues AC is a theorem of the countable operational universe (via DC); this argument is metatheoretic.
4.4 Modes (Part IV)
\(\texttt{isZFCmode}(s) := \texttt{Acc}\, ({\cdot } \in {\cdot })\, s\) — accessibility of \(s\) in the membership relation. A set is in ZFC-mode when every descending membership chain into it terminates.
\(\forall s : \mathrm{OSet},\; \texttt{isZFCmode}(s)\). Proved by IsWellFounded.wf.apply: ZFSet is globally well-founded because PSet is an inductive type. The theorem records that \(\texttt{OSet} := \texttt{ZFSet}\) lies entirely within ZFC-mode.
The conjunction of all nine ZFC axioms (Extensionality, Empty, Foundation, Pairing, Union, Power, Infinity, Replacement, Choice) holds on \(\mathrm{OSet}\). A structural collector: no new content, new knowledge is their joint assembly. Stated unconditionally (without mode guard) because \(\texttt{isZFCmode\_ all}\) makes the guard vacuous.
4.4.1 ZFA boundary: Quine atom and AFA refuted in PSet
\(\texttt{isZFAmode}(\ldots ) := \texttt{True}\) on \(\texttt{PSet}\): every PSet element is declared to be in ZFA-mode (maximal universe). \(\texttt{isZFAmode\_ all}\) follows by trivial. Axiom profile: [] for both.
\(\texttt{quineAtomSpec} := \exists \, p : \texttt{PSet}.{0},\; p \in p\). The existence of a self-membered PSet element (Quine atom \(A = \{ A\} \)).
\(\lnot \texttt{quineAtomSpec}\). Proved by PSet.mem_irrefl: PSet is an inductive type, so membership is irreflexive. The Quine atom would require \(p \in p\), which contradicts PSet.mem_irrefl.
Axiom profile: [] — axiom-free proof. PSet’s well-founded recursion principle is structural, not axiomatic.
\(\texttt{AFA\_ Statement}\): for every graph \((V, E)\) (any Lean type \(V\), any relation \(E\)) there exists a unique decoration \(f : V \to \texttt{PSet}\) such that for every vertex \(v\), \(f(v) \equiv \{ f(w) \mid (v,w) \in E\} \) (in the sense of PSet.Equiv). This is Aczel’s (1988) graph-decoration AFA in full classical generality.
\(\lnot \texttt{AFA\_ Statement}\). Proof: apply AFA_Statement to the universal self-loop graph (\(V = \texttt{Unit}\), \(E\, \_ \, \_ = \texttt{True}\)); the decoration \(f\) must satisfy \(f() \equiv \{ f()\} \), giving \(f() \in f()\); this contradicts PSet.mem_irrefl.
Axiom profile: [] — axiom-free proof.
This is the strongest boundary result in VR-Sets. At the earlier structural boundaries (Theorems III.5, III.7, III.9), Lean’s object existed as a classical entity wider than the operational version. Here, the ZFA-mode universe provably does not exist in mathlib’s type hierarchy. Adding AFA as an axiom would be inconsistent with PSet.mem_irrefl. The impossibility is constructively proved, not merely metatheoretic. See Observation B.5.
4.5 Conjectures (Part IV)
\(\texttt{Conjecture\_ IV\_ 1\_ Statement}\): there exists a countable type \(M\) with an injection \(M \hookrightarrow \mathrm{OSet}\) such that all nine ZFC axioms hold relative to \((M, \texttt{embed})\). Formalises the open question of § IX.1: is the ZFC-mode of VR-Sets mutually interpretable with a countable model of classical ZFC? Status: (open question, no proof attempted). Axiom profile: [propext, Quot.sound] (references OSet = ZFSet).
\(\texttt{Conjecture\_ IV\_ 2\_ Statement}\): there exists a type \(U\) with a membership relation \(\mathrm{mem}\) admitting a self-membered element, satisfying extensionality, and satisfying classical AFA. Status: (open question, no proof attempted).
Conjecture IV.2 will be answered constructively in Chapter 5 (VR-Sets-ZFA): the type OSetZFA (coinductive CoPSet quotiented by cobisimulation) satisfies AFA as a theorem, providing the required type \(U\).
Axiom profile: [] — stated over abstract \((U, \mathrm{mem})\), no reference to specific mathlib quotient types.
4.6 VR numbers bridge (Part V)
\(\texttt{osetSuccOp}(s) := \texttt{insert}\, s\, s = s \cup \{ s\} \). \(\texttt{embedVR} : \mathrm{VRObj} \to \mathrm{OSet}\) by \(\texttt{embedVR}(\texttt{base}) := \emptyset \), \(\texttt{embedVR}(\texttt{succ}\, x) := \texttt{osetSuccOp}(\texttt{embedVR}(x))\). noncomputable (ZFSet is a quotient type). Proved: \(\texttt{embedVR\_ zero} : \texttt{embedVR}(\texttt{base}) = \emptyset \) and \(\texttt{embedVR\_ succ}\) by rfl.
\(\forall x : \mathrm{VRObj},\; \texttt{isZFCmode}(\texttt{embedVR}(x))\). Immediate from isZFCmode_all.
\(\texttt{VR.mem}\, x\, y \leftrightarrow \texttt{embedVR}(x) \in \texttt{embedVR}(y)\) (embedVR_mem_iff). \(\texttt{embedVR}\) is injective (embedVR_injective). Both proved by joint structural induction on the second VRObj argument via the private embedVR_mem_iff_and_inj.
The structure VR_OSet_iso has five fields: embed (\(\mathrm{VRObj} \to \mathrm{OSet}\)), preserve_zero (\(\texttt{embed}(\texttt{base}) = \emptyset \)), preserve_succ (\(\texttt{embed}(\texttt{succ}\, x) = \texttt{insert}(\texttt{embed}(x), \texttt{embed}(x))\)), preserve_mem (\(\mathrm{VR.mem}\, x\, y \leftrightarrow \texttt{embed}(x) \in \texttt{embed}(y)\)), injective (Function.Injective embed). Covers ordinal structure only; arithmetic preservation (vadd, vmul, vpow) follows by composition through Theorem_11_VR_PA.
The term Theorem_V_2 : VR_OSet_iso with embed := embedVR. The five fields are filled by embedVR_zero, embedVR_succ (rfl), embedVR_mem_iff, and embedVR_injective.
4.7 Operational consequences
The preprint (§ III.5) asserts that \(\mathcal{P}(\omega )\) in VR-Sets is countable: each element is a describable functionality (a finite algorithm over a finite alphabet), and the set of such algorithms is countable. Cantor’s diagonal \(D = \{ n : n \notin S_n\} \) requires a complete enumeration of describable subsets — operationally unattainable (equivalent to solving the Halting Problem). \(D\) does not specify a describable functionality, hence \(D\) is not a set in the operational universe. The diagonal is absent from the operational \(\mathcal{P}(\omega )\) not by prohibition but because its premise is unrealisable. Lean’s osetPower contains all classical subsets; the countability claim is metatheoretic.
The preprint (§ III.9) derives AC from Dependent Choice plus countability of the operational universe. AC is thus a theorem, not an axiom; the Banach–Tarski paradox is excluded not by weakening AC but because the uncountable subsets of \(\mathbb {R}\) on which it relies do not exist in the operational universe. Lean records AC via Classical.choice for all families; the countability argument is metatheoretic.
In classical ZF, Replacement is an axiom schema (one axiom per formula). In VR-Sets and in Lean/mathlib, a single theorem quantifies over all functions \(F\). The schema collapses because Lean functions are first-class objects: the meta-level quantification over formulas disappears. See Observation D.1.
4.8 Axiom profile analysis
Classical.choice enters through four distinct mechanisms: (1) Lemma_II_3_DepthMono via Ordinal.iSup (ordinal supremum); (2) Theorem_III_7_Replacement via Classical.allZFSetDefinable (all Lean functions declared definable); (3) Theorem_III_8_Foundation via WellFounded.has_min (minimal element); (4) Theorem_III_9_Choice via Classical.choice directly. None is a direct application of AC to a set-theoretic family. Contrast with VR-Numbers where Classical.choice entered through a single source (Rat.add via Nat.gcd).
4.9 Methodological observations (Part X)
Seventeen observations from the formalisation, grouped thematically. Observations A.1–D.2 are from the Part X preprint draft; observations E.1–E.6 are from source-file comments.
Group A: Quotient-base structure
The preprint’s operational identity \(\equiv \) (Definition 4, bisimulation) is not a separate proof step but is definitionally absorbed into the quotient construction: \(a \equiv b\) is exactly \(a = b : \texttt{OSet} = \texttt{ZFSet} = \texttt{Quotient PSet.setoid}\). This is more economical than VR-Numbers, where each isomorphism required explicit forward/backward round-trip proofs. Here, the bisimulation is the quotient.
The preprint (§ II.2) says union reveals elements «without repetitions up to \(\equiv \)». In ZFSet, duplicate suppression requires no separate predicate or decidability instance: the quotient automatically identifies extensionally equivalent elements. ZFSet.sUnion and ZFSet.powerset return ZFSet values, so membership is already modulo PSet.Equiv.
Group B: Five structural boundaries
Lean’s osetPower contains all classical subsets. The preprint’s \(\mathcal{P}(A)\) contains only operationally describable subsets. For \(A = \omega \), Lean gives an uncountable set; the preprint gives a countable set. The operational restriction is metatheoretic.
osetReplacement admits all Lean functions \(F\). The preprint restricts to operationally definable functions. Classical.allZFSetDefinable records the gap: «all Lean functions are definable» is the non-operational assumption.
Lean proves AC for all families via Classical.choice. The preprint argues AC from countability: in a countable universe, a choice function can be constructed algorithmically (DC suffices). Lean cannot express the countability restriction; the argument is metatheoretic.
On OSet = ZFSet, Foundation holds unconditionally (Lean is narrower than the preprint). The preprint treats Foundation as mode-dependent (fails in ZFA-mode). In Lean, there is no ZFA-mode to speak of; the type pre-commits to well-foundedness. This is the opposite direction from boundaries B.1–B.3.
A systematic search of all of mathlib4 for AFA, AntiFoundation, non-well-founded, coinductive sets, NonWellFounded, and Quine returned zero results. PSet is an inductive (not coinductive) Lean type; membership is well-founded by its elimination rule. The Quine atom and AFA are not merely hard to construct — they are provably impossible in PSet with empty axiom profiles. This boundary is categorically stronger than B.1–B.4 and stronger than the VR-Numbers § VIII.6 boundary: the ZFA-mode universe has no representation at all in the mathlib type hierarchy.
Group C: Axiom-minimal patterns
Conjecture_IV_1_Statement: Axiom profile: [propext, Quot.sound] (references OSet = ZFSet, a specific quotient type). Conjecture_IV_2_Statement: Axiom profile: [] (stated over abstract \((U, \mathrm{mem})\), no reference to any specific mathlib type). The difference is not incidental: Conjecture IV.1 asks about a countable submodel of an existing type; Conjecture IV.2 asks about the existence of a type outside the current mathlib hierarchy. The axiom profiles witness this structural distinction at the level of dependency closures.
On OSet = ZFSet, isZFCmode is universally true; the predicate is trivial here. Its conceptual content becomes operative only at the PSet level (Stage 10), where elements representing the Quine atom would fail Acc PSet.Mem (the membership chain \(A \ni A \ni A \ni \ldots \) does not terminate). The predicate is defined at OSet-level as a syntactic template for that future analysis.
Lemma II.3 in the preprint has three cases: finite depth, infinite non-cyclic depth (e.g. \(\omega \)), and cyclic/undefined depth (e.g. Quine atom). In OSet = ZFSet, the third case is structurally absent: PSet is inductive, so cyclic objects do not exist. operationalDepth is well-defined (total) on all OSet elements; the preprint’s undefined case simply does not arise in the type.
Group D: Methodological convergences
Classical ZF has Replacement as a schema (one axiom per formula). VR-Sets has a single closure theorem over describable functions. Lean/mathlib has a single theorem parametric in \(F : \texttt{ZFSet} \to \texttt{ZFSet}\). Three systems, three different motivations (classical meta-level quantification / operational describability / type-theoretic first-class functions), same formal result: one theorem.
VR-Numbers produced only positive results (theorems proved). VR-Sets produces a structurally richer three-tier outcome: (1) 16 proved theorems (including Theorem_IV_1_ZFCAxioms, Theorem_V_2); (2) 2 refuted claims (AFA_Refuted, quineAtom_impossible), both axiom-free; (3) 2 open formulations (Conjecture_IV_1_Statement, Conjecture_IV_2_Statement). The refuted claims are structural boundary theorems, not logical inconsistencies. The open formulations are the first instances in the VR Lean cycle where the system records a claim it cannot resolve.
OSet is declared as abbrev (@[reducible]), not def. This means all mathlib operations on ZFSet apply directly to OSet without wrappers. VR-Numbers used def with explicit wrappers (IntVRIntIso, iaddQ, etc.) because VR-Numbers built its own arithmetic independently. VR-Sets relies on mathlib’s ZFSet infrastructure completely; abbrev reflects this dependency.
Conjecture_IV_2_Statement is stated with classical AFA (all Lean types \(V\), all relations \(E\)) — strictly stronger than the preprint’s operational AFA (only describable graphs). If the conjecture is false, it does not refute the preprint’s weaker form. If true, it implies the preprint’s form. Classical AFA is used because operational AFA (like computability of Cauchy sequences in VR-Numbers) is not Lean-expressible: the condition «describable graph» is metatheoretic.
VR_OSet_iso has five fields: embed, preserve_zero, preserve_succ, preserve_mem, injective. Arithmetic preservation (vadd, vmul, vpow at OSet level) is deliberately excluded. It follows by composition: \(\mathrm{VRObj} \xrightarrow {\texttt{Theorem\_ 11\_ VR\_ PA}} \mathbb {N} \xrightarrow {\texttt{embedVR} \circ O} \mathrm{OSet}\). Re-proving at the OSet level would duplicate VR.lean without adding mathematical content. Contrast with VR_PA_iso (Chapter 2): that is a bijection; VR_OSet_iso is an embedding (OSet contains vastly more than the image of VRObj).
The preprint’s closure principle (§ II.3): «if a functionality is operationally describable, then there exists a set \(A\) such that \(A\) is that functionality» is not expressible as a Lean predicate. Individual closure theorems (Pairing, Union, …) are proved separately, each as a wrapper over a mathlib ZFSet lemma. The general principle — «every describable functionality is a set» — lies in the metatheory.
4.10 Axiom profile
Axiom profile: [] for 4 objects: isZFAmode_all, quineAtom_impossible, AFA_Refuted, Conjecture_IV_2_Statement. The first three use only inductive structural properties of PSet; the fourth is stated over abstract types.
Axiom profile: [propext, Quot.sound] for 12 objects including: Lemma_II_1_Extensionality, Lemma_II_2_UniquenessEmpty, Theorem_III_3_Pairing, Theorem_III_4_Union, isZFCmode_all, isZFCmode, Theorem_V_2, embedVR_mem_iff, embedVR_injective, Conjecture_IV_1_Statement, and others.
Axiom profile: [propext, Classical.choice, Quot.sound] for 6 objects: operationalDepth (via Ordinal.iSup), Lemma_II_3_DepthMono, Theorem_III_7_Replacement, Theorem_III_8_Foundation, Theorem_III_9_Choice, Theorem_IV_1_ZFCAxioms.
VR-Sets is the first module in the VR Cycle where axiom-free objects appear. Both refutations (AFA_Refuted, quineAtom_impossible) are axiom-free, unlike any result in VR-Numbers.
4.11 References
The preprint for this chapter is VR-Sets, v1.0.1 (23 May 2026).
The Lean 4 formalisation is archived at VR-Sets Lean, v1.0.0 (23 May 2026), git tag v1.2-vr-sets.