\documentclass[11pt]{amsart} \usepackage[T1]{fontenc} \usepackage[margin=0.95in]{geometry} \usepackage{amsmath,amssymb,amsthm,booktabs,graphicx,hyperref} \sloppy \setlength{\emergencystretch}{3em} \newcommand{\code}[1]{\texttt{\detokenize{#1}}} \newtheorem{theorem}{Theorem}[section] \newtheorem{lemma}[theorem]{Lemma} \newtheorem{proposition}[theorem]{Proposition} \newtheorem{remark}[theorem]{Remark} \title[LeanXRay, ZeroCommitSlice, and Bounded-Memory Verification for Lean~4]{LeanXRay, ZeroCommitSlice, and Bounded-Memory Verification: Dominator Auditing, Zero-Commit Compilation, and Streaming Proof-Body Analysis for Million-Declaration Lean~4 Proofs} \author{Robert Kadlec} \address{Masaryk University, Brno, Czech Republic} \email{kadlecr@mail.muni.cz} \thanks{ORCID: \href{https://orcid.org/0009-0003-9245-8130}{0009-0003-9245-8130}. Purely AI-generated research directed and supervised by the author, by whom full scholarly responsibility for the work is assumed (all new implementation, refactoring, scripts, cross-model audits, and prose were executed by AI systems; see Section~\ref{sec:epistemic-disclosure}). This paper is part of a broader research project in which the respective competencies of humans and large language models are investigated.} \date{November 28, 2026} \begin{document} \begin{abstract} Large-scale AI-assisted Lean~4 formalizations now exceed $1.26\times 10^6$ declarations and $94$\,GiB of compiled \texttt{.olean} archives, while single-module \texttt{lean4export 3.1.0} streams reach $445$\,MiB and commit $\approx 1$\,GiB of OS memory in existing external checkers. We present \texttt{lean-slice-oss}, an Apache-2.0 engineering suite enabling million-declaration auditing and verification on $32$\,GiB workstations via four tools: (1)~\textbf{LeanXRay}, combining Cooper--Harvey--Kennedy dominator auditing with native \texttt{.olean} structure inspection; (2)~\textbf{ZeroCommitSlice}, a portable Windows/POSIX zero-commit \texttt{.olean} loader and reverse-topological slicer; (3)~\textbf{\texttt{lean-export-stream}}, a Rust streaming structural/axiom auditor and proof-body liveness modeler; and (4)~a $3$-patch series for \texttt{nanoda\_lib 0.4.32} introducing a file-backed \texttt{mmap} expression arena and tagged axiom reporting. Across three real exports, the disk arena cuts peak Windows pagefile commit by $4.16\times$--$14.64\times$ and Linux \texttt{RssAnon} by $4.10\times$--$8.51\times$. A cross-OS causal ablation shows that disabling theorem-body unfolding breaks Mathlib typechecking on \texttt{Rat.instEncodable}, proving permanent proof-body deletion incomplete and motivating reclaimable \texttt{mmap} arenas. \end{abstract} \maketitle \section{Motivation: Five Engineering Bottlenecks at Million-Declaration Scale} When auditing a $1.265\times 10^6$-declaration formal proof~\cite{Alpoge2026} or cross-verifying multi-hundred-megabyte \texttt{lean4export} streams~\cite{Lean4Export2026} on a commodity 32\,GiB workstation, standard interactive workflows hit five engineering bottlenecks: \begin{enumerate} \item \emph{Monolithic coupling and regex fragility:} In the Alp\"oge archive~\cite{Alpoge2026} (historical companion-archive analysis~\cite{Paper2Archive}), deleting all $194$ literature leaf theorems in \texttt{PrincipalDirect.lean} disconnects only $244{,}592$ declarations ($19.34\%$ of the $1{,}264{,}848$-node DAG); $>80.6\%$ of the graph lives below five structural chokepoints. Source regexes misclassify local \texttt{haveI} declarations as structure fields and miss compiled kernel \texttt{Expr.proj} nodes. \item \emph{Pagefile commit exhaustion and \texttt{MAX\_PATH}:} Mapping $>100{,}000$ \texttt{.olean} files with default copy-on-write mappings exhausts OS commit limits on 32\,GiB hosts, while deep module hierarchies exceed Windows' $260$-character path limit. \item \emph{Random-order BFS disk thrashing:} Queue-based reachability sweeps over $175{,}173$ memory-mapped \texttt{.olean} files jump randomly across $94.3$\,GiB of disk pages, stalling below $100$ declarations/second. \item \emph{Declaration-DAG vs.\ full-import closure gap:} Computing reverse-import closures solely inside the $146{,}398$-module declaration DAG omits zero-declaration or off-cone bridge modules sitting on transitive import paths between modified modules (encountered live with \texttt{CarFillE} and \texttt{WindowBoundOfLiteratureLevel} below \texttt{TopMainZj}). \item \emph{In-RAM export commit pressure and theorem-unfolding completeness:} External Rust checkers holding the entire expression arena in RAM commit $\approx 1$\,GiB ($1{,}020$\,MiB) of OS pagefile charge for a single $445$\,MiB export, yet permanently discarding theorem proof bodies after checking risks false rejections (\emph{incompleteness}) whenever the kernel unfolds a theorem body during definitional equality checking (e.g., via \texttt{Acc.rec} or subsingleton elimination). \end{enumerate} \section{LeanXRay and Source-Level Cross-Archive Auditing (\texttt{lean\_dag\_audit.py})} \subsection{Binary DAG Cache, Dominator Trees, and CSR Extraction (Historical Companion Receipts)} In our companion Paper~2 release archive~\cite{Paper2Archive} (historical receipts, not regenerated inside this repository's \texttt{receipts/} directory), our Python/NumPy pipeline caches the $1{,}264{,}848$-node, $14{,}075{,}546$-edge Alp\"oge DAG in $76.5$\,MiB (\texttt{dag\_cache.npz}) and computes exact immediate dominator trees~\cite{LengauerTarjan1979,CooperHarveyKennedy2001} in $\sim 7$\,s. Because edge-cut savings are non-additive across overlapping cones, joint multi-cut BFS on the cached graph simulated $-3{,}751$ declarations for $P + F + \mathrm{cm} + \text{Hironaka}(1,2)$ ($19$ surface landmarks) and $-4{,}037$ net declarations when stacking Stickelberger and \texttt{UnusedSlot33} (compared with measured live-cut deltas in Table~\ref{tab:live-cuts}, which track full kernel-reachable closures rather than declaration-DAG-only simulations). Similarly, the CSR Mathlib candidate scanner \texttt{scan\_mathlib\_candidates.py} was originally timed at $0.84$\,s over the cached $1.265\text{M}$-node graph in~\cite{Paper2Archive} (isolating \texttt{GroundTheory.TateCohomology}, \texttt{GroundTheory.FunctionField}, $14$ zero-external-dep subgraphs, and Hironaka's single $806$-byte external dependency \texttt{SaturationByPowers}); in \texttt{lean-slice-oss}, we harden it with CSR bounds/monotonicity validation and unit tests on synthetic CSR fixtures. \subsection{Native \texttt{.olean} Projection, Eliminator, and Constructor Auditing (\texttt{LeanXRayDump.lean})} Our native Lean~4.33.1 metaprogram \texttt{LeanXRayDump.lean} queries \texttt{Lean.getStructureInfo?} on compiled \texttt{.olean} environments, walks every reachable expression DAG with a memoized \texttt{Std.HashSet Expr} (avoiding exponential re-traversal of shared subexpressions and covering recursor rule bodies), and exits non-zero if any referenced constant is missing. Compile-time selftests exposed four non-obvious kernel requirements~\cite{MouraUllrich2021}: \begin{proposition}[Four Syntactic Requirements for Lean~4 Structure Auditing]\label{prop:pitfalls} To accurately identify fields of a structure $S$ with no syntactic projection references in the dependency cone of a root declaration $R$ under Lean~4.33.1: \begin{enumerate} \item \emph{Theorem and opaque unpacking:} \texttt{Lean.ConstantInfo.value?} (with its default \texttt{allowOpaque := false}) returns \texttt{none} on both \texttt{.thmInfo} and \texttt{.opaqueInfo}; the walker must explicitly unpack \texttt{.thmInfo v => v.value}, \texttt{.defnInfo v => v.value}, \texttt{.opaqueInfo v => v.value}, and \texttt{.recInfo v => v.rules.map (\ensuremath{\cdot}.rhs)}. \item \emph{Both \texttt{Expr.proj} and named projections:} Lean~4 compiles field accesses to both primitive \texttt{Expr.proj S idx e} and named constants \texttt{Expr.const S.field}; walking only \texttt{getUsedConstantsAsSet} misses all \texttt{Expr.proj} uses. \item \emph{Field index order:} Inside \texttt{Lean.StructureInfo}, \texttt{info.fieldInfo} is sorted by \texttt{Name.quickLt} for binary search, whereas kernel \texttt{Expr.proj} indices $0,1,\dots$ follow declaration order \texttt{info.fieldNames}. \item \emph{Eliminator and constructor hazards (advisory scope):} The flag \texttt{advisoryNoProjOrListedElimInCone} requires zero listed eliminators (\texttt{rec}, \texttt{casesOn}, \texttt{recOn}, \texttt{ndrec}, \texttt{ndrecOn}, \texttt{below}, \texttt{brecOn}, \texttt{noConfusion}) and zero constructor uses (\texttt{S.mk}) in the cone. Even when \texttt{true}, it remains strictly \emph{advisory} and requires recompilation and kernel checking of the affected transitive closure. \end{enumerate} \end{proposition} All three compile-time selftests (\texttt{demo\_consumer\_proj}, \texttt{demo\_consumer\_elim}, \texttt{demo\_constructor\_only}) execute during \texttt{lean -c} compilation and pass automatically. \subsection{Source-Only Cross-Archive Auditing (\texttt{lean\_dag\_audit.py})} We generalized module-level Cooper--Harvey--Kennedy~\cite{CooperHarveyKennedy2001} dominator trees, extraction censuses, and lexer-aware forbidden-token scanning into \texttt{lean\_dag\_audit.py}, requiring \emph{no} precompiled \texttt{.olean} files. Table~\ref{tab:o04} summarizes receipts regenerated directly by the shipped CLI across Chudnovsky's transcendence archive~\cite{Chudnovsky2026} and Sernau's compactified GRH repository~\cite{Sernau2026}. \begin{table}[ht] \centering \caption{Source-only cross-archive audit via the shipped \texttt{lean\_dag\_audit.py} (\texttt{receipts/o04\_cross\_archive\_audit.json}). Declaration counts are source-level regex counts (\texttt{decls\_regex}). Every scanned archive recorded $0$ forbidden tokens under \texttt{--root} (\texttt{sorry}/\texttt{sorryAx}, \texttt{admit}, \texttt{native\_decide}, \texttt{decide +native}, \texttt{bv\_decide}, \texttt{axiom}, \texttt{unsafe}, \texttt{implemented\_by}, \texttt{extern}, \texttt{ofReduceBool}, \texttt{trustCompiler}); this is a source hygiene scan, not \texttt{\#print axioms}.} \label{tab:o04} \resizebox{\textwidth}{!}{% \begin{tabular}{@{}lrrrrrr@{}} \toprule \textbf{External Lean~4 Archive} & \textbf{Modules} & \textbf{Lines} & \textbf{Regex Decls} & \textbf{Local Edges} & \textbf{Target Cone} & \textbf{Unused Mods} \\ \midrule Chudnovsky \texttt{2610.26539}~\cite{Chudnovsky2026} (full) & $976$ & $114{,}709$ & $8{,}191$ & $1{,}997$ & $969$ mods ($8{,}169$ decls) & $7$ \\ \quad \texttt{BlowupJetSurjectivityComplete} subcone & --- & --- & --- & --- & $225$ mods ($2{,}203$ decls) & $751$ \\ \texttt{lsernau/grh-lean}~\cite{Sernau2026} (\texttt{grh-compact/}) & $794$ & $112{,}827$ & $10{,}946$ & $1{,}398$ & $794/794$ ($100\%$) & $0$ \\ \texttt{lsernau/grh-lean}~\cite{Sernau2026} (\texttt{grh/}) & $803$ & $477{,}124$ & $23{,}839$ & $1{,}733$ & $803/803$ ($100\%$) & $0$ \\ \bottomrule \end{tabular}} \end{table} In particular, \texttt{lean\_dag\_audit.py} verified that Chudnovsky's $828$-module \texttt{OAI.NumberTheory.PiExponent} tree has $0$ imports from \texttt{QuadraticPi} and its ampleness subcone (\texttt{BlowupJetSurjectivityComplete}) spans $225$ modules ($28{,}423$ lines), while \texttt{lsernau/grh-lean} has $0$ unused modules outside the cone of \texttt{Main}. \section{ZeroCommitSlice: Portable Zero-Commit Loading and Live Dependency Cuts} \subsection{Cross-Platform Zero-Commit Loader and Reverse-Topological Sweep} \texttt{ReadonlyArchive\_portable.c} is pinned to Lean~4.33.1 (commit \texttt{819816b2}, 64-bit little-endian GMP encoding checked via \texttt{\_Static\_assert} and build-time sysroot validation), exposes the exact 2-argument C ABI emitted by Lean~4.33.1 for \texttt{alpoge\_read\_module} (verified at compile time by \texttt{build.py} via \texttt{-include generated\_abi\_check.h} under \texttt{-Wall -Wextra -Werror}), and replaces copy-on-write \texttt{.olean} mapping on archive roots with: \begin{itemize} \item \textbf{Windows:} \texttt{CreateFileMappingW(..., PAGE\_READONLY)} $+$ \texttt{MapViewOfFileEx} at the saved \texttt{.olean} base address (zero OS pagefile commit charge). \item \textbf{Linux / POSIX:} canonicalized \texttt{realpath} containment + \texttt{S\_ISREG} validation followed by \texttt{mmap((void*)base, len, PROT\_READ, MAP\_PRIVATE | MAP\_NORESERVE | MAP\_FIXED\_\allowbreak NOREPLACE, fd, 0)} (with optional \texttt{MAP\_NORESERVE} and sanitizer guards, plus fallback to stock 3-arg \texttt{lean\_compacted\_\allowbreak region\_read(..., lean\_io\_mk\_world())}). On Ubuntu~26.04.1 \texttt{x86\_64} (kernel \texttt{7.0.0-38-generic}, Lean~4.33.1), both \texttt{gcc 15.2.0} and Ubuntu \texttt{clang 21.1.8} compile \texttt{ReadonlyArchive\_portable.c} with \texttt{-Wall -Wextra -Werror} and the generated 2-arg ABI header with $0$ warnings, and $5/5$ live POSIX runtime checks pass (\texttt{ZeroCommitSlice [POSIX]: mapped=1 bytes=6848 fallbacks=0}, separate \texttt{reused\_existing=1} manifest accounting, \texttt{LeanXRayDump} live \texttt{.olean} inspection, positive-control symlink-escape fallback rejecting an external symlink while mapping an in-archive import, and RUNPATH startup without \texttt{LD\_LIBRARY\_PATH}; \texttt{receipts/linux\_20261128/linux\_posix\_mmap\_runtime.json}). Clean-machine Linux QA exposed four build-harness defects---Linux \texttt{leanc -leanshared} omitting \texttt{-lleanshared} (\texttt{D2}), \texttt{build.py} prepending \texttt{/bin} so \texttt{--cc clang} shadowed system \texttt{clang} with Lean's headerless bundled \texttt{clang} (\texttt{D3}), \texttt{Makefile} omitting \texttt{\#include } from \texttt{generated\_abi\_check.h} (\texttt{D4}), and missing \texttt{-Wl,-rpath,/lib/lean} RUNPATH (\texttt{D5})---all repaired in \texttt{c\_lean/build.py} and \texttt{c\_lean/Makefile}. \end{itemize} Linked with \texttt{SliceFrontendV2\_OSS.lean} (which checks circular imports via active-DFS tracking, validates nonempty targets, walks \texttt{Expr.proj} struct names and recursor rule bodies, tracks \texttt{compiled} vs.\ \texttt{reused\_existing} outputs separately, and writes JSON receipts via \texttt{--receipt}), our reverse-topological sweep visits imported modules $b = N-1, N-2, \dots, 0$ (touching each \texttt{.olean} file at most once). In the historical Alp\"oge RH runs~\cite{Paper2Archive}, this mapped $174{,}155$--$175{,}042$ standalone archive files ($93.6$--$94.3$\,GiB, $118$--$124$ fallbacks) on a 32\,GiB host with peak working set $11$--$17$\,GiB, sweeping $\sim 1.473\times 10^6$ constants in $653.0$--$799.3$\,s ($1{,}843$--$2{,}256$ decls/s). \subsection{Historical Live End-to-End Dependency Cuts (Companion Paper~2 Archive)} Table~\ref{tab:live-cuts} records the three historical live-compiled dependency cuts from our companion Paper~2 release~\cite{Paper2Archive} through \texttt{PrincipalDirect}, \texttt{PrincipalSupply}, and \texttt{CutClosedRH} (\texttt{closedRH : RiemannHypothesis}), where expanding the \texttt{CM} reverse-import closure over the full $175{,}180$-node import graph ($175{,}173$ archive \texttt{.olean} modules plus $7$ top-level project/entry files; $7$ additional non-imported helper files bring total \texttt{.lean} files to $175{,}187$) caught two non-DAG bridge modules (\texttt{CarFillE}, \texttt{WindowBoundOfLiteratureLevel}; $400 \to 402$, total $897$ archive modules, $0$ topological violations). \begin{table}[ht] \centering \caption{Historical live kernel-BFS cones (\texttt{SliceFrontendV2}, Lean~4.33.1, companion archive~\cite{Paper2Archive}) across three progressive RH cuts. Every target passed \texttt{Environment.addDeclCore} with axioms strictly \texttt{[propext, Classical.choice, Quot.sound]} relative to trusted read-only archive imports. Stage~2 tracks $21$ landmarks ($19$ surface $+$ $2$ sub-landmarks); Stage~3 adds $6$ Stickelberger landmarks ($27$ total).} \label{tab:live-cuts} \resizebox{\textwidth}{!}{% \begin{tabular}{@{}lrrrrrr@{}} \toprule \textbf{Live Cut Stage} & \textbf{Arch.\ Mods} & \textbf{\texttt{hSup} Total} & \textbf{\texttt{closedRH} Total} & \textbf{Arch+Proj} & \textbf{Arch+Proj Mods} & \textbf{Landmarks Absent} \\ \midrule Stage 1: $P + \text{Hironaka}_{1,2}$ & $7$ & $1{,}477{,}330$ & $1{,}477{,}360$ & $1{,}263{,}979$ & $146{,}187$ & $3/21$ \\ Stage 2: $P + F + \mathrm{CM} + \text{Hironaka}_{1,2}$ & $897$ & $1{,}473{,}424$ & $1{,}473{,}454$ & $1{,}260{,}117$ & $145{,}643$ & $21/21$ \\ Stage 3: Stage 2 $+$ Stickelberger (C3) & $897+0$ & $1{,}473{,}199$ & $1{,}473{,}229$ & $1{,}259{,}895$ & $145{,}601$ & $27/27$ \\ \midrule \textbf{Measured Delta (Stage 3 vs.\ Stage 1)} & --- & \textbf{$-4{,}131$} & \textbf{$-4{,}131$} & \textbf{$-4{,}084$} & \textbf{$-586$} & \textbf{$27/27$ unreached} \\ \bottomrule \end{tabular}} \end{table} \section{Streaming Export Auditing, Proof-Body Liveness, and \texttt{nanoda\_lib} Patches} \subsection{Single-Pass Streaming Auditing and Structural Liveness Model (\texttt{lean-export-stream})} To pre-flight and analyze multi-hundred-megabyte \texttt{lean4export 3.1.0} NDJSON streams without constructing a full expression DOM in single-pass mode, we ship both a Python auditor (\texttt{stream\_export\_audit.py}, $6.738$\,MiB peak traced Python heap via \texttt{tracemalloc} on a $34.38$\,MiB export, $12/12$ reason-checked synthetic tampers rejected in \texttt{receipts/o02\_python\_benchmark\_receipt.json}) and a compiled Rust tool \textbf{\texttt{lean-export-stream}} (compiled with \texttt{-D warnings}). Both implement strict duplicate-key JSON rejection, require exactly one initial \texttt{meta} record with format \texttt{3.1.x}, reject unknown/multi-key records, enforce contiguous IDs and back-references across every record kind (\texttt{in}, \texttt{il}, \texttt{ie}, \texttt{axiom}, \texttt{def}, \texttt{thm}, \texttt{opaque}, \texttt{inductive}, \texttt{quot}, \texttt{levelParams}, \texttt{all}), compute SHA-256 digests, and compare permitted axioms as exact tagged \texttt{Name} component sequences (defeating single-component \texttt{\guillemotleft{}Quot.sound\guillemotright{}} collisions). In \texttt{cargo test}, \texttt{lean-export-stream} runs $2$ Rust unit tests (\texttt{cargo test} reports $2$ passed), verifying an exporter-valid positive fixture and $32$ diagnostic assertions rejecting $16/16$ tampered stream classes across both single-pass and \texttt{--liveness} modes. Its $O(\#\text{exprs})$ \texttt{--liveness} mode partitions exported expressions into those reachable from types, definitions, opaques, inductives, axioms, or quotients (\texttt{retained\_non\_proof\_exprs}) versus those reachable \emph{exclusively} inside theorem proof terms (\texttt{theorem\_proof\_only\_exprs}), while also reporting how many proof-only nodes are shared across $\ge 2$ theorem closures (\texttt{shared\_proof\_only\_exprs\_ge2\_thms}). Across three Lean~4.33.1 exports generated from our companion formalization suites---\texttt{DVRConductorNoGoingUp} (Paper~4 DVR conductor descent, $34.38$\,MiB), \texttt{KroneckerFpCert} ($\mathbb{F}_p[x]$ kernel polynomial certification, $96.98$\,MiB), and \texttt{PostRHAbelianClosure} (Paper~2 \texttt{v2.1.0-pre} abelian window criterion, $445.01$\,MiB)---\texttt{lean-export-stream} sustains $88.9$--$95.9$\,MiB/s and measures proof-only shares of $60.95\%$, $66.00\%$, and $74.65\%$, corresponding to serialized structural expression-count ratios (\texttt{modeled\_serialized\_expr\_ratio}) of $2.46\times$, $2.88\times$, and $3.83\times$ (Table~\ref{tab:o02}). This ratio is strictly a structural node-count model ignoring execution order, byte sizes, and OS paging. \subsection{Empirical Kernel Completeness Finding, Causal Ablation, and Upstream \texttt{nanoda\_lib} 3-Patch Series} It is tempting to infer from the $61\%$--$75\%$ proof-only share that a streaming Lean~4 checker can permanently delete every theorem proof body immediately after checking it. Instrumenting \texttt{nanoda\_lib}'s \texttt{TypeChecker::unfold\_def} with a per-\texttt{ExportFile} atomic counter incremented only after universe-arity matching succeeds on a \texttt{Declar::Theorem} first revealed \textbf{$94$}, \textbf{$258$}, and \textbf{$1{,}211$} theorem proof-body unfolds across our three exports. To test causality---whether those unfolds are strictly necessary for kernel completeness rather than merely alternate reduction paths---we executed a dedicated test-only ablation (\texttt{receipts/theorem\_unfold\_ablation\_windows.json}) in which \texttt{TypeChecker::get\_applied\_def} and \texttt{TypeChecker::unfold\_def} return \texttt{None} for \texttt{Declar::Theorem} (treating previously checked theorems as body-less opaques) and \texttt{check\_all\_declars\_serial} catches panics per declaration: \begin{itemize} \item \texttt{DVRConductorNoGoingUp.export}: $34$ blocked theorem-unfold attempts $\to$ $0/8{,}410$ failures (\texttt{exit 0}); \item \texttt{KroneckerFpCert.export}: $136$ blocked theorem-unfold attempts $\to$ $0/20{,}441$ failures (\texttt{exit 0}); \item \texttt{PostRHAbelianClosure.export}: $473$ blocked theorem-unfold attempts $\to$ \textbf{$2/63{,}537$ hard kernel typechecking failures} (\texttt{exit 101}, \texttt{assertion failed: self.def\_eq(u, v)}) on standard Mathlib declarations \textbf{\texttt{Rat.instEncodable.\_proof\_3}} and \textbf{\texttt{Rat.instEncodable}}. \end{itemize} Permanently discarding theorem proof terms after checking is therefore \emph{provably incomplete} on real Mathlib proofs. Instead, backing the expression interner with a \textbf{file-backed \texttt{mmap} arena} removes expression storage from the OS pagefile commit charge on Windows while keeping every proof body faultable on demand. We ship a self-contained 3-patch series targeting pinned upstream \texttt{ammkrn/nanoda\_lib 0.4.32} commit \texttt{0da9f98feadd3a0a2ef4b3dbcf52a298a6fef929} (cleanly verified with \texttt{git apply --check --whitespace=error}, $58/58$ \texttt{cargo test --release} passing): \begin{enumerate} \item \textbf{Patch 1 (File-backed \texttt{mmap} \texttt{ExprStore}):} Adds \texttt{crate::disk\_expr::\{Disk, ExprStore\}} with Windows \texttt{create\_new + share\_mode(0)} and POSIX \texttt{0700}/\texttt{0600} exclusive creation plus immediate post-\texttt{mmap} unlink, clean \texttt{Drop} teardown, and \texttt{try\_insert\_full} error propagation up to $2^{31}$ expressions. \item \textbf{Patch 2 (\texttt{W2-1} Fix + Tagged Axiom Receipts):} Removes the spurious \texttt{"Unable to print axioms"} error when \texttt{pp\_to\_stdout: false}, switches \texttt{PpDestination} to \texttt{write\_all} + \texttt{flush()}, enforces component-level axiom whitelist matching (rejecting \texttt{\guillemotleft{}Quot.sound\guillemotright{}}), and adds atomic non-aliasing \texttt{axioms\_json\_path}. \item \textbf{Patch 3 (\texttt{O-02} Single-File \texttt{disk\_arena\_dir} + Telemetry):} Exposes \texttt{disk\_arena\_dir}, per-\texttt{ExportFile} \texttt{theorem\_unfolds}, and actual \texttt{is\_disk\_arena()} / \texttt{disk\_arena\_bytes()} reporting with no intended semantic change to kernel checking. \end{enumerate} \begin{table}[ht] \centering \caption{Measured \texttt{lean-export-stream} throughput/liveness and upstream \texttt{nanoda\_bin} A/B benchmarks on three Lean~4.33.1 exports (\texttt{receipts/rust\_stream\_*.json} and \texttt{receipts/nanoda\_patches\_ab\_benchmark.json}, single-threaded Windows, \texttt{pp\_to\_stdout: false}, \texttt{print\_axioms: true}). Unpatched \texttt{0da9f98f} emitted $1$ pretty-printer error on every run; all patched runs emitted $0$ errors, $0$ leftover arena files, and identical declaration/axiom/unfold counts. A $4$-control paired schema-valid \texttt{sorryAx} policy suite passed on both RAM and Disk.} \label{tab:o02} \resizebox{\textwidth}{!}{% \begin{tabular}{@{}lrrrrrrrrr@{}} \toprule \textbf{Export (Lean 4.33.1)} & \textbf{Size} & \textbf{Unique Exprs} & \textbf{Stream} & \textbf{Proof-Only \%} & \textbf{Unpatched} & \textbf{RAM Commit / WS} & \textbf{Disk Commit / WS} & \textbf{Commit} & \textbf{Thm.} \\ & \textbf{(MiB)} & & \textbf{(MiB/s)} & \textbf{(Mod.\ Ratio / Sh.$\ge 2$)} & \textbf{Commit / Time} & \textbf{/ Time} & \textbf{/ Time} & \textbf{Drop} & \textbf{Unf.} \\ \midrule \texttt{DVRConductorNoGoingUp} & $34.38$ & $629{,}021$ & $93.4$ & $60.95\%$ ($2.46\times$ / $31\text{k}$) & $66.49$\,MiB / $1.37$\,s & $66.08$ / $51.29$\,MiB / $1.39$\,s & \textbf{$13.79$} / $41.76$\,MiB / $1.51$\,s & \textbf{$4.79\times$} & $94$ \\ \texttt{KroneckerFpCert} & $96.98$ & $1{,}769{,}373$ & $95.9$ & $66.00\%$ ($2.88\times$ / $95\text{k}$) & $131.88$\,MiB / $5.62$\,s & $131.21$ / $111.51$\,MiB / $6.32$\,s & \textbf{$31.52$} / $111.91$\,MiB / $6.47$\,s & \textbf{$4.16\times$} & $258$ \\ \texttt{PostRHAbelianClosure} & $445.01$ & $8{,}233{,}903$ & $88.9$ & $74.65\%$ ($3.83\times$ / $746\text{k}$) & $1{,}020.05$\,MiB / $47.60$\,s & $1{,}020.07$ / $734.19$\,MiB / $44.32$\,s & \textbf{$69.70$} / \textbf{$436.25$}\,MiB / $46.98$\,s & \textbf{$14.64\times$} & $1{,}211$ \\ \bottomrule \end{tabular}} \end{table} On the $445.01$\,MiB \texttt{PostRHAbelianClosure.export} ($63{,}537$ declarations), \texttt{disk\_arena\_dir} reduces Windows peak pagefile commit by \textbf{$14.64\times$} ($1{,}020.07 \to 69.70$\,MiB) and peak working set by $1.68\times$ ($734.19 \to 436.25$\,MiB), running within $+6.0\%$ of patched RAM ($46.98$ vs.\ $44.32$\,s) and $1.3\%$ faster than unpatched upstream ($47.60$\,s); on DVR and Kronecker, single-run wall times change by $+9.2\%$ and $+2.3\%$ while peak working set drops $1.23\times$ on DVR and rises $+0.4\%$ on Kronecker. All three backends (unpatched \texttt{0da9f98f}, patched RAM, and patched Disk) produce identical acceptance verdicts and declaration counts, and the 4-control paired \texttt{sorryAx} suite verifies whitelist admission and exact \texttt{unpermitted axiom "sorryAx"} rejection on both RAM and Disk. \subsection{Clean-Machine Linux \texttt{x86\_64} Replay and \texttt{MAP\_SHARED} Filesystem Accounting} A clean-machine Linux~\texttt{x86\_64} replay pass (Ubuntu~26.04.1 LTS, kernel \texttt{7.0.0-38-generic}, AMD EPYC~7713P, 62\,GiB RAM, no swap, \texttt{rustc 1.96.0}, isolated via \texttt{systemd-run --user} with 24\,GiB memory cap; anonymized receipts in \texttt{receipts/linux\_20261128/}) reproduced all semantic results across Windows and Linux: $3/3$ \texttt{lean-export-stream} exports matched on every structural, axiom, and liveness field ($64.9$--$69.9$\,MiB/s); $6/6$ patched \texttt{nanoda} summary JSONs were byte-identical to Windows ($94$/$258$/$1{,}211$ theorem unfolds, $32$/$88$/$384$\,MiB disk arenas, $58/58$ \texttt{cargo test}, $4/4$ \texttt{sorryAx} policy controls); POSIX immediate-\texttt{unlink} kept visible arena files at \textbf{$0$} throughout every run with $0$ leftovers and $0$ major page faults; and the Stage~5 theorem-unfold ablation identically failed on the same $2/63{,}537$ declarations (\texttt{Rat.instEncodable.\_proof\_3} and \texttt{Rat.instEncodable}, \texttt{src/tc.rs:1036}). Table~\ref{tab:linux-ab} reports the Linux memory and wall-time metrics. \begin{table}[ht] \centering \caption{Clean-machine Linux~\texttt{x86\_64} A/B verification (\texttt{receipts/linux\_20261128/linux\_nanoda\_ab\_benchmark.json}, single-threaded, Ubuntu~26.04.1 / EPYC~7713P, arena on \texttt{tmpfs}, $0$ major faults ($7$/$20$/$81$ with the arena on \texttt{ext4}), $0$ visible arena files during run, $6/6$ summary JSONs byte-identical to Windows).} \label{tab:linux-ab} \resizebox{\textwidth}{!}{% \begin{tabular}{@{}lrrrrrrr@{}} \toprule \textbf{Export} & \textbf{Stream} & \textbf{Unp.\ / RAM / Disk} & \textbf{Unp.\ / RAM / Disk} & \textbf{RAM $\to$ Disk} & \textbf{\texttt{RssAnon}} & \textbf{RAM $\to$ Disk} & \textbf{Vis.} \\ & \textbf{(MiB/s)} & \textbf{Wall (s)} & \textbf{\texttt{ru\_maxrss} (MiB)} & \textbf{\texttt{RssAnon} (MiB)} & \textbf{Drop} & \textbf{\texttt{VmData} (MiB)} & \textbf{Files} \\ \midrule \texttt{DVRConductorNoGoingUp} & $64.9$ & $2.10$ / $2.26$ / $2.50$ & $46.6$ / $46.6$ / $40.0$ & $44.8 \to \mathbf{10.9}$ & $\mathbf{4.10\times}$ & $90.4 \to 45.6$ & $0$ \\ \texttt{KroneckerFpCert} & $65.9$ & $8.24$ / $8.98$ / $9.51$ & $112.3$ / $112.8$ / $106.5$ & $111.1 \to \mathbf{17.7}$ & $\mathbf{6.27\times}$ & $154.0 \to 54.9$ & $0$ \\ \texttt{PostRHAbelianClosure} & $69.9$ & $60.2$ / $65.2$ / $71.9$ & $532.2$ / $532.3$ / $443.4$ & $526.7 \to \mathbf{61.9}$ & $\mathbf{8.51\times}$ & $812.6 \to \mathbf{102.8}$ & $0$ \\ \bottomrule \end{tabular}} \end{table} A supplementary filesystem experiment (\texttt{X1}, \texttt{x1\_arena\_tmpfs\_vs\_ext4.log}) on \texttt{PostRHAbelianClosure.export} uncovered an important Linux systems nuance for \texttt{MAP\_SHARED} arenas: while \texttt{RssAnon} drops $8.5\times$ in both configurations and \texttt{VmHWM} stays at $443.2$\,MiB, placing \texttt{disk\_arena\_dir} on RAM-backed \texttt{tmpfs} (\texttt{/tmp}) accounts $380.4$\,MiB as non-reclaimable \texttt{RssShmem} ($59.9$\,MiB \texttt{RssAnon}, $2.1$\,MiB \texttt{RssFile}, $73.1$\,s), whereas placing it on disk-backed \texttt{ext4} (\texttt{/var/tmp}) moves \textbf{$381.2$\,MiB into kernel-reclaimable \texttt{RssFile} page cache} ($60.5$\,MiB \texttt{RssAnon}, $1.1$\,MiB \texttt{RssShmem}, $74.7$\,s). A hard cgroup limit check (\texttt{X2}, \texttt{MemoryMax} $= 320$/$160$\,MiB $< \text{VmHWM}$, no swap) further showed that RAM mode and a \texttt{tmpfs} arena suffer OOM kills within $\sim 5$\,s, whereas an \texttt{ext4} arena avoids OOM (\texttt{oom\_kill} $= 0$, $\sim 140\text{k}$ major faults) but thrashes ($\sim 92\%$ system time, exceeding $480$\,s vs.\ $74$--$76$\,s unconstrained)---reclaimability prevents OOM kills, not paging slowdowns when RAM is far smaller than the active working set. On Linux, \texttt{disk\_arena\_dir} should therefore target a disk-backed local filesystem (e.g., \texttt{/var/tmp} on \texttt{ext4}/\texttt{XFS}), avoiding both \texttt{tmpfs} (non-reclaimable without swap) and NFS (where unlinked open files create \texttt{.nfs*} silly-rename entries). \subsection{Minimal \texttt{con-leche} v4.36.0 Decline Reproducer} Our release packages \texttt{PrincipalizationCertRepro.lean} ($26$ lines of Lean code; $31$ lines with header; zero Mathlib), in which a reflexive mutual inductive predicate in \texttt{Prop} with function-typed recursive hypotheses over a higher universe suffices to trigger \texttt{con-leche}/\texttt{con-ron} v4.36.0's \texttt{--verified} decline (\texttt{exit 2}, \texttt{reflexive member}~\cite{ConLeche2026}), alongside two passing controls (\texttt{ConLecheNestedRepro.lean}, $18$/$27$ lines; \texttt{ConLecheMutualRepro.lean}, $19$/$28$ lines; all $5$ checkers exit $0$). \section{Strict Epistemic Boundaries and AI Provenance} \label{sec:epistemic-disclosure} \begin{itemize} \item \texttt{lean-export-stream} and \texttt{stream\_export\_audit.py} perform structural, duplicate-key, back-reference, SHA-256, liveness-modeling, and tagged-component axiom-\emph{name} checks only; they do \emph{not} verify axiom type signatures and do \emph{not} replace full dependent typecheckers. Single-pass auditing avoids an expression DOM; \texttt{--liveness} uses $O(\#\text{exprs})$ memory. \item \texttt{lean\_dag\_audit.py} performs source-level regex/lexer hygiene scanning over files under \texttt{--root} only and does not replace \texttt{\#print axioms}. \item \texttt{LeanXRayDump} reports a strictly syntactic advisory flag, not a semantic proof of safe field deletion without recompilation. \item Historical Alp\"oge live-cut and CSR figures in Section~2.1 and Table~\ref{tab:live-cuts} derive from companion archive~\cite{Paper2Archive}, where \texttt{PrincipalSupply.hSup} and \texttt{closedRH} passed Lean~4.33.1's \texttt{Environment.addDeclCore} relative to trusted read-only archive \texttt{.olean} imports. \item Both Windows~\texttt{x86\_64} and Linux~\texttt{x86\_64} (Ubuntu~26.04.1, \texttt{gcc 15.2.0}, Ubuntu \texttt{clang 21.1.8}, \texttt{rustc 1.96.0}, Lean~4.33.1) have been live-tested across all Python, Rust, \texttt{nanoda\_lib}, and C/Lean suites (\texttt{receipts/} and \texttt{receipts/linux\_20261128/}); Linux CI jobs remain defined in \texttt{.github/workflows/ci.yml}. On Linux, actual RAM-pressure reclaimability of \texttt{disk\_arena\_dir} requires a disk-backed local filesystem (\texttt{ext4}/\texttt{XFS}), not \texttt{tmpfs} or NFS; macOS has not been tested locally. \end{itemize} \noindent\textbf{Pure-AI Provenance and Human Supervision.} This manuscript and the accompanying \texttt{lean-slice-oss} software suite report purely AI-generated engineering and research directed, scoped, and supervised by the human author (Robert Kadlec, Masaryk University, Brno, Czech Republic; email \texttt{kadlecr@mail.muni.cz}; ORCID \href{https://orcid.org/0009-0003-9245-8130}{0009-0003-9245-8130}), as part of a broader research project in which the respective competencies of humans and large language models are investigated. All new code, patches, benchmark harnesses, cross-model adversarial audits, and prose were executed by AI systems (Google Gemini/Antigravity, OpenAI Codex, and Anthropic Claude), while full scholarly responsibility for the integrity, accuracy, and publication of all reported results is assumed by the human author. Full audit logs and provenance records are archived in \texttt{AI\_DISCLOSURE\_AND\_PROVENANCE.md}. \begin{thebibliography}{10} \bibitem{Alpoge2026} L.~Alp\"oge, \emph{Lean~4 Formalization of the Riemann Hypothesis (Archive Revision \texttt{79c751e0b0a5ea3bbfc20198c852fa85f28661e6})}, 2026. \bibitem{Chudnovsky2026} G.~V.~Chudnovsky, \emph{Lemniscate irrationality exponent via separated-weights interpolation in Lean~4}, arXiv:2610.26539, October 2026. \bibitem{ConLeche2026} \texttt{con-leche} / \texttt{con-ron} (v4.36.0), \emph{Third-party Lean~4 external kernel verifiers}, 2026. \bibitem{CooperHarveyKennedy2001} K.~D.~Cooper, T.~J.~Harvey, and K.~Kennedy, \emph{A simple, fast dominance algorithm}, Software Practice \& Experience \textbf{4} (2001), 1--10. \bibitem{Paper2Archive} R.~Kadlec, \emph{Auditing the Principal-Character Cone of Alp\"oge's Lean Proof of the Riemann Hypothesis (Release v2.0.0)}, Zenodo, \url{https://doi.org/10.5281/zenodo.24584643}, November 2026. \bibitem{Lean4Export2026} Lean FRO / \texttt{lean4export} (format v3.1.0), \url{https://github.com/leanprover/lean4export}, 2026. \bibitem{LengauerTarjan1979} T.~Lengauer and R.~E.~Tarjan, \emph{A fast algorithm for finding dominators in a flowgraph}, ACM Trans.\ Program.\ Lang.\ Syst.\ \textbf{1} (1979), no.~1, 121--141. \bibitem{Mathlib2020} The mathlib Community, \emph{The Lean mathematical library}, Proc.\ 9th ACM SIGPLAN Int.\ Conf.\ Certified Programs and Proofs (CPP 2020), pp.~367--381. \bibitem{MouraUllrich2021} L.~de~Moura and S.~Ullrich, \emph{The Lean~4 theorem prover and programming language}, Automated Deduction -- CADE 28, LNCS 12699, Springer, 2021, pp.~625--635. \bibitem{Nanoda2026} \texttt{ammkrn}, \emph{\texttt{nanoda\_lib}: A Lean~4 type checker in Rust (v0.4.32, commit \texttt{0da9f98f})}, \url{https://github.com/ammkrn/nanoda_lib}, 2026. \bibitem{Sernau2026} L.~Sernau, \emph{\texttt{grh-lean}: Compact Lean~4 Formalization of GRH}, \url{https://github.com/lsernau/grh-lean}, November 2026. \end{thebibliography} \end{document}