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 |
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).
