Skip to content

ryanncode/tensor-sieve

Repository files navigation

tensor-sieve

tensor-sieve is a Lean 4 formalization project mapping the emergence of quantum chaos directly from discrete arithmetic topologies.

It provides the Formal Theoretical Warrant for the non-Archimedean kinematics that drive the Gaussian Unitary Ensemble (GUE) eigenvalue spectrum without relying on continuous Hilbert spaces or physics-based heuristics.

The Architecture of Verification

To achieve strict verification and massive computational scale simultaneously, this project operates in tandem with a computational execution engine:

  1. tensor-sieve (This Repository): The Lean 4 formalization. It establishes the strictly computable, type-theoretically sound operator equations.
  2. krein (Web Engine): The Rust/WASM execution environment. This evaluates the formal logic over massive structural bounds (e.g., Primorials up to $10^{11}$) directly in the browser to extract the continuous eigenvalue spacing.

Key Theoretical Components

1. Non-Archimedean Kinematics

Standard $p$-adic dynamics frequently depend on artificial continuity (like Berkovich spaces) and temporal iteration. tensor-sieve implements pure constructivist kinematics. We strictly enforce the principle that topological distance is measured exclusively through discrete multiples (divisibility). The operations themselves construct the geometric space.

2. The Krein Space Metric

By fracturing the positive-definite Hilbert space and utilizing an indefinite Krein space, the framework maps asymmetric parity phases natively. The chaotic distribution of the primes is no longer treated as a fluid approximation; it is explicitly tracked as true structural randomness generated by unique factorization jamming against itself.

3. The Continuous Spectrum Unfolding

The shift operator calculates localized arithmetic divergence across the lattice using combinatorial Laplacians ($L_c = D - K$). The discrete delta constraints enforce exact prime transition rules, generating continuous, floating-point eigenvalue spectra that mirror topological tension.

Visualizing the Energy Landscape

While Lean 4 guarantees the logic, the actual transversal evaluation requires navigating massive integer boundaries (e.g., $N = 27,720,000$). The output stream of these tensor evaluations maps the discrete bottlenecks into an unfolded continuous spectrum.

GUE Energy Landscape

Understanding the Data

Plot 1: Transition Amplitudes (Krein Space Decomposition) This plot tracks the transition amplitudes. Green stems represent evaluations residing in the positive-definite $V^+$ subspace, while orange stems represent evaluations dropping into the $V^-$ subspace, successfully absorbing negative parity.

Plot 2: Cumulative Spectral Density (Unfolded Spectrum) This step function graphs the cumulative sum of the energy level spacings. It provides a formal Density of States, proving that the finite lattice boundaries construct a coherent bottleneck without yielding infinite mathematical divergence.

Plot 3: Level Repulsion Histogram The normalized spacings are binned into a probability density histogram. Overlaid natively is the exact theoretical Wigner surmise curve ($P(s) = \frac{32}{\pi^2} s^2 e^{-\frac{4}{\pi} s^2}$). This provides definitive visual proof that the deterministic grammatical constraints of the non-Archimedean sieve genuinely replicate quantum chaotic Level Repulsion.

Plot 4: Spectral Form Factor (SFF) This log-log plot evaluates the discrete Fourier transform of the pair correlation function. It explicitly annotates the theoretical transition phases (Correlation Hole, Heisenberg Time, Topological Plateau) that guarantee the algorithm generates a true chaotic quantum system rather than independent local pseudo-random noise.


Verification Status The current Lean 4 architecture provides a formally verified, computable specification for the discrete $p$-adic shift operator natively grounded in indefinite Krein geometry. Global universal verification theorems regarding infinite boundary condition scaling (e.g., global cyclic homology descents) remain future targets, cleanly separating the successful structural simulation from the ongoing universal proof sequence.