Nucleus Grafting
Verified Quantization-Aware NN Compression
Original Research | Hossenfelder No-Go Connection | March 14, 2026
Overview
When a neural network is quantized to INT8 for deployment, the set of representable activation values forms a finite lattice. The ReLU gate on this lattice is a nucleus operator on a Heyting algebra — extensive, idempotent, and meet-preserving. This means the gate necessarily introduces an irreducible information gap: the Hossenfelder boundary is non-Boolean, and the gap decomposes additively into quantization, gate, and reconstruction components.
We formalize this connection in Lean 4 (21 theorems, 4 modules, 298 lines, 0 sorry) and validate it empirically across MLP, CNN, and autoencoder architectures with exhaustive 65,536-pair nucleus axiom verification, bitwidth monotonicity confirmation, and 74–96% gap optimization.
Modules
4
Lean 4 files
Theorems
17
Machine-verified
Lines
298
Proof code
Sorry
0
Zero gaps
Models
3
MLP, CNN, Autoencoder
Formal Verification Certificate
Every theorem in this project has been machine-checked by the Lean 4 kernel. No axiom is assumed without proof. No gap exists in the verification chain.
Nucleus Grafting • Lean 4 + Mathlib • Apoth3osis Labs
Key Definitions & Results
Definition: Nucleus Operator
A closure operator on a Heyting algebra that preserves finite meets. The fixed-point subobject is again a Heyting algebra.
Theorem: ReLU Gate is a Nucleus
Verified by exhaustive enumeration (65,536 pairs) and proved in Lean 4 via max_min_distrib_right.
Theorem: Gap Decomposition
The total information gap decomposes additively. Gate component dominates at 5–6× the quantization component. Formally enforced by hAdditive in GapDecomposition.
Theorem: Bitwidth Monotonicity
Coarser quantization (higher zero-point) means fewer fixed vectors and larger gap. Empirically confirmed: INT8 > INT16 > FP16 gap across all 3 models.
Corollary: Non-Boolean Boundary
The grafted nucleus is never Boolean — connecting to Hossenfelder's no-go theorem: a non-Boolean boundary necessarily has a nonzero gap.
Proof Modules
Each module can be expanded to show its definitions (mathematical notation) and verified theorems. Click to expand.
Lean Theorem ↔ Mathematics ↔ Empirical Evidence
Every formal theorem has a mathematical statement and corresponding empirical verification from the 5-phase experiment pipeline.
| Lean Theorem | Empirical Evidence |
|---|---|
| qRelu_extensive | 0 violations / 65,536 pairs (all 3 models) |
| qRelu_idempotent | 0 violations / 65,536 pairs |
| qRelu_meet_preserving | 0 violations / 65,536 pairs |
| qRelu_fixed_iff | 128/256 fixed points at zp=0 |
| productWitness_exists | Canonical: a=[0,1], b=[1,0] |
| activationFixedSet_mono | INT8 > INT16 > FP16 gap (all models) |
| graftBoundaryNucleus_not_boolean | Non-trivial boundary at every layer |
| componentUpperBound_eq_total | Phase 3: gap decomposes additively |
| bitwidthFamily_gap_positive | Phase 4: positive gap at INT8, INT16, FP16 |
| certificate_gap_nonzero | All models: total gap > 0 |
| observedBoundaryGap_nonneg | All gap measurements nonneg |
| latticeSpacing_pos | All quantized layers have scale > 0 |
“Once men turned their thinking over to machines in the hope that this would set them free. But that only permitted other men with machines to enslave them.”
Frank Herbert, Dune
A janitor who proves a theorem outranks a tenured professor who publishes noise.
Not as a slogan. As a structural fact of how the network operates. The only currency that matters is the quality of your contribution, measured not by committee but by mathematics.
A valid, original framing or conjecture
Formal argument with paper-level rigor
Connecting theory to observable outcomes
Working software the project depends on
Reproducible research with methodology and data
Machine-verified claim checked by a proof assistant
Foundational, load-bearing implementation
Connecting subsystems or knowledge domains end-to-end
Strategic direction & roadmaps
Writing, documentation & papers
Visual, UX & information design
Teaching, tutorials & workshops
Community, outreach & events
Partnerships, governance & policy
Translation, media & accessibility
Ethics, review & quality assurance
Every accepted contribution receives a MENTAT Contribution Record — cryptographically signed, IPFS-pinned, permanently yours. No committee decides your worth. The type checker does.
Module Dependencies
Hover over a module to trace its imports. Solid lines show direct dependencies; dashed lines show transitive imports from the HeytingLean upstream library.
Verified C Artifacts
Faithful C11 transpilation. Compiled with gcc -std=c11 -Wall -Wextra -Werror (0 warnings). 7 self-test suites pass.
Safe Rust Artifacts
Zero unsafe, standalone crate. cargo build (0 warnings) + cargo test (11/11 pass).
Cargo.toml
Crate manifest | from Crate
src/lib.rs
Module re-exports (4 modules) | from Crate
src/types.rs
LayerQuantParams, GapDecomposition, activationFixedSet | from Types
src/discrete_lattice.rs
qRelu axioms, ProductWitness, INT8 characterization | from DiscreteLattice
src/boundary_connection.rs
DiscreteGateMeasurement, BitwidthFamily | from BoundaryConnection
src/certificate.rs
NucleusGraftingCertificate with gap assertions | from Certificate
Provenance Chain
Mathematical Theory
Original research connecting Hossenfelder's no-go theorem to quantization theory. INT8 activation lattices are Heyting algebras; ReLU gates are nucleus operators.
Lean 4 Formalization
4 modules, 17 theorems, 298 lines. Kernel-verified by Lean 4 + Mathlib. 2 rounds of hostile adversarial audit. Zero sorry/admit. All findings remediated.
Empirical Validation
5-phase experiment pipeline across MLP, CNN, and autoencoder architectures. 65,536-pair exhaustive verification. Bitwidth monotonicity. 74–96% gap optimization. α,β-CROWN neural network verification bounds.
Verified C + Safe Rust
C11 transpilation (gcc 0 warnings, 7/7 tests). Rust crate (0 unsafe, cargo test 11/11 pass).
