Skip to main content

Domain solvers

Eight more pipelines, each mapped to a domain or industry, each an independent endpoint on the 7-step seal, and each checked against a known or exact result. The point of the framework isn't one API that answers everything — it's a rack of individual, powerful solvers you tap from a control panel or a simulation that computes every Zeqond.

Honest framing

Three of these touch famous open problems (P vs NP, Yang–Mills, Riemann). They compute, verify, and simulate in those domains — real, useful work — but they do not prove the theorems, and the framework never claims to. That honesty is exactly what keeps the rest of the suite credible.

ZeqEpi — epidemics

POST /api/zeq/epi · zeq_epi · epi — SIR / SEIR compartmental dynamics (RK4). Reality check: the population S(+E)+I+R is conserved. Reports R₀, peak infected, peak day, and the Kermack–McKendrick final size. Verified: R₀=3 → 94% final size, population conserved to ~10⁻¹³. Public health.

ZeqQuant — option pricing

POST /api/zeq/quant · zeq_quant · quant — a European option priced by Monte-Carlo simulation of geometric Brownian motion, verified against the exact Black–Scholes formula. Reports price, standard error, delta. Verified: MC 10.442 vs BS 10.4506 (0.08%). Quantitative finance.

ZeqZeta — Riemann zeta zeros

POST /api/zeq/zeta · zeq_zeta · zeta — the Riemann–Siegel Z(t); locates the nontrivial zeros on the critical line and checks the count against N(T)=θ(T)/π+1. A match means every zero up to T is on the line — RH verified in that range (as has been done to ~10¹³ zeros). Verified: first zero 14.135, count matches the formula exactly. Verifies; does not prove RH. Number theory.

ZeqSAT — 3-SAT / complexity

POST /api/zeq/sat · zeq_sat · sat — a DPLL 3-SAT solver on a seeded random instance at ratio α=m/n (hardness peaks at the α≈4.26 phase transition). A SAT result is certified against every clause; it reports decisions/propagations so you watch the NP-hard scaling wall. Solves instances; does not resolve P vs NP. Cryptography, logistics, scheduling.

ZeqGauge — lattice gauge theory

POST /api/zeq/gauge · zeq_gauge · gauge — 2-D compact U(1) lattice gauge theory (Metropolis Monte-Carlo, Wilson action). The mean plaquette is checked against the exact result ⟨cos θ_P⟩ = I₁(β)/I₀(β). Verified: 0.6937 vs 0.6978 (0.58%). This is the method used to study Yang–Mills confinement/mass-gap numerically; it does not prove the Yang–Mills theorem. Particle physics.

ZeqFEA — structural finite elements

POST /api/zeq/fea · zeq_fea · fea — a 2-D plane-stress cantilever meshed with Q4 elements, solved by a matrix-free element-by-element, Jacobi-preconditioned conjugate gradient: the global stiffness is never assembled, so memory is O(dof) and large meshes run (up to ~9000 elements). Reality check: the CG residual (the system is solved); tip deflection is compared to Euler–Bernoulli beam theory. The life-or-death is mesh convergence — refine and the FEM tip deflection converges to beam theory: a coarse nx=24, ny=6 is ~6% too stiff (ratio 0.94), a refined nx=120, ny=30 lands on it (ratio ~1.00), CG residual ~10⁻⁹. Response reports elements, dof, deflectionRatio. Fills stress, strain, displacement, elasticity. Structural engineering.

fea nx=24 ny=6 # coarse — ratio ≈ 0.94 (6% stiff)
fea nx=120 ny=30 # refined — ratio ≈ 1.00 (converged to beam theory)

ZeqGrid — power flow

POST /api/zeq/grid · zeq_grid · grid — DC power-flow on an N-bus network, B·θ=P. Reality check: Kirchhoff's current law and power balance (residual ≈ machine zero). Reports bus angles, line flows, max loading. Verified: KCL to ~10⁻¹⁵. Energy / power systems.

ZeqDevice — device electrostatics

POST /api/zeq/device · zeq_device · device — now 2-D device electrostatics by default: the potential and field in a semiconductor cross-section under an electrode, ∇²φ = 0 on [0,Lx]×[0,Ly] (electrode φ(x,0)=V·sin(kx·πx/Lx), three grounded edges), solved matrix-free by a Jacobi-preconditioned conjugate gradient on the 5-point Laplacian. The reality check is the exact analytic solution — a sinh Fourier mode φ = V·sin(kx·πx/Lx)·sinh(kx·π(Ly−y)/Lx)/sinh(kx·π·Ly/Lx) — plus the CG residual as the "genuinely solved" check. The reported peak field |E|=|∇φ| is what sets breakdown in a MOSFET / HEMT / diode. Fills potential + E-field. Deterministic. Verified live: default 80×60 → 0.0039% vs exact (CG residual 6·10⁻¹¹, 86 iters); a finer kx=2 grid → 0.0084%; the solve is bit-for-bit reproducible; an absurd grid clamps (nx·ny ≤ 24000) and still seals.

Pass dim:1 (or a 1-D doping param Na/Nd/ni/T) for the original 1-D PN junction: built-in voltage and depletion width computed analytically (V_bi=V_T·ln(NaNd/n_i²)) and by a numerical Poisson solve, checked against each other — silicon V_bi 0.6934 V (analytic) vs 0.6940 V (numeric), 0.10% agreement. Semiconductor-device design.

device # 2-D electrostatics — 0.004% vs the exact sinh mode
device nx=120 ny=90 kx=2 # a finer grid, second electrode mode
device dim=1 # the 1-D PN junction (built-in voltage)
device Na=1e22 Nd=2e22 # PN junction by doping → V_bi ≈ 0.71 V

ZeqSchrodinger — quantum energy levels

POST /api/zeq/schrodinger · zeq_schrodinger · schrodinger — the time-independent Schrödinger eigenvalue problem Ĥψ = Eψ, Ĥ = −(ℏ²/2m)d²/dx² + V(x): the bound-state energy levels of a quantum particle — the spectrum behind atoms, quantum wells/dots, molecular vibration and the qubit. The Hamiltonian is discretised to a symmetric tridiagonal matrix and its lowest levels are found by a Sturm-sequence bisection — each eigenvalue bracketed to machine precision by counting sign changes, no dense linear algebra — and the ground state ψ₀ by inverse iteration (a Thomas solve). The reality check is the EXACT analytic spectrum: the harmonic oscillator Eₙ = ℏω(n+½) and the infinite square well Eₙ = n²π²ℏ²/2mL². The RMS error over the requested levels is the seal — and it is genuinely life-or-death: too coarse a grid, or a box too small to hold the wavefunction, gives the WRONG levels and seals observable-differential, not verified. Fills potential_field + concentration_field (|ψ₀|²). Natural units ℏ=m=1. Deterministic. Verified live: harmonic oscillator (6 levels) → 0.006% vs exact; infinite square well (5 levels) → 0.001%; a deliberately coarse 40-point well → 0.68%, which honestly does not seal.

schrodinger # harmonic oscillator, E₀…E₅ vs ℏω(n+½)
schrodinger potential=square-well L=1 # particle in a box, Eₙ=n²π²/2L²
schrodinger omega=2 levels=8 # a stiffer well, eight levels
schrodinger N=40 potential=square-well # too coarse → observable-differential

ZeqAcoustic — resonator modes

POST /api/zeq/acoustic · zeq_acoustic · acoustic — the resonant frequencies of a 1-D acoustic resonator: the Helmholtz eigenvalue problem −p″ = k² p on [0,L] for the pressure p, with each end open (pressure-release, p=0) or closed/rigid (∂p/∂x=0). This is the physics of organ pipes, wind instruments, exhaust and HVAC ducts, and muffler design. A finite-volume discretisation with a diagonal mass matrix (a rigid boundary node carries a half-cell mass) turns it into a symmetric tridiagonal problem, solved by the same Sturm-bisection as ZeqSchrodinger, and f = kc/2π. The reality check is the exact closed form for each end condition — open–open fₙ = n·c/2L (half-wave), open–closed fₙ = (2n−1)·c/4L (quarter-wave), closed–closed fₙ = n·c/2L (the trivial DC mode is dropped). The RMS error vs exact is the seal; a coarse grid seals observable-differential. Fills pressure_field. Deterministic. Verified live (L=1 m, c=343 m/s): open–open fundamental 171.5 Hz, open–closed 85.75 Hz, closed–closed 171.5 Hz — all to ~0.0001% vs exact.

acoustic # open–open pipe, fₙ = n·c/2L
acoustic ends=open-closed # stopped pipe, fₙ = (2n−1)·c/4L
acoustic ends=closed-closed L=0.5 c=343 # a 0.5 m rigid duct
acoustic L=0.6 modes=8 # eight overtones of a 0.6 m tube

ZeqBuckling — Euler column buckling

POST /api/zeq/buckling · zeq_buckling · buckling — the axial load at which a slender column or strut buckles, the collapse mode behind columns, struts, landing-gear legs, rocket interstages and scaffolding. Solves the beam-column buckling generalised eigenvalue problem K φ = P·K_g φ (elastic bending stiffness K vs geometric stiffness K_g) assembled from Hermitian Euler–Bernoulli beam finite elements; the smallest positive eigenvalue is the critical load P_cr, found by a Cholesky reduction of the SPD stiffness followed by a cyclic-Jacobi diagonalisation. The reality check is Euler's exact closed form P_cr = π²·EI/(K·L)², where the effective-length factor K encodes the end condition — pinned–pinned K=1 (π²), fixed–fixed K=½ (4π²), fixed–free K=2 (π²/4), fixed–pinned K≈0.699 (20.19·EI/L²). The relative error is the seal; a too-coarse mesh gives the wrong load and seals observable-differential. Fills elasticity_tensor. Deterministic. Verified live (EI=1, L=1): pinned–pinned P_cr=9.8696 (π²), fixed–fixed 39.478 (4π²), fixed–free 2.4674 (π²/4), fixed–pinned 20.19 — all to <0.001% vs Euler.

buckling # pinned–pinned, P_cr = π²·EI/L²
buckling ends=fixed-fixed # clamped, 4× stiffer (4π²·EI/L²)
buckling ends=fixed-free # a cantilever column, ¼ the load
buckling E=2e11 I=8e-6 L=3 ends=fixed-pinned # a real steel strut, in newtons

ZeqOpt — nonlinear optimization

POST /api/zeq/opt · zeq_opt · opt — minimises a standard test function (sphere, Rosenbrock, Rastrigin, Beale) by Nelder–Mead or gradient descent, checked against the known global minimum. Verified: converges to ~10⁻²⁴ on the unimodal functions; honestly reports getting trapped in a local minimum on multimodal Rastrigin (that's the real behaviour of a local optimiser). Operations research, ML, engineering design.

ZeqClimate — shallow water

POST /api/zeq/climate · zeq_climate · climate — the 2-D shallow-water equations (Lax–Friedrichs), seeded by a droplet that radiates gravity waves. Reality check: total mass is conserved (drift is the gate); wave speed is bounded by the CFL limit √(gH)·dt/dx ≤ 1. Fills velocity + height. Verified: mass conserved to ~10⁻¹³%, blows up past CFL. Climate, geophysics, oceanography.

ZeqDock — molecular docking

POST /api/zeq/dock · zeq_dock · dock — a rigid ligand docked against a receptor pocket by minimising a Lennard-Jones + Coulomb score over its 6 rigid-body degrees of freedom, from seeded restarts. Reality check: the gradient norm at the best pose (a genuine energy minimum) and bit-exact reproducibility. Reports binding energy, pose, contacts. Verified: finds a favourable binding energy (~−6), deterministic. Drug discovery, computational chemistry.

ZeqKalman — optimal state estimation

POST /api/zeq/kalman · zeq_kalman · kalman — the Kalman filter: track a constant-velocity target (state [position, velocity]) from noisy position measurements only — the estimator behind GPS, radar/lidar tracking, robotics, inertial navigation and sensor fusion. Four honest reality checks: (1) the error covariance P is independent of the data and converges to the steady-state Riccati/DARE solution — the seal, verified to ~10⁻¹⁴; (2) the empirical RMSE → √P∞[0,0], the optimal (minimum-variance) bound — verified 2.5% at 1.5 k steps, 1.0% at 6 k; (3) the innovation variance ≈ HP⁻Hᵀ+R (whiteness, ~1%); (4) the Joseph-form covariance update keeps P symmetric positive-definite where a naive update would lose it and the filter would diverge — the life-or-death. Deterministic (seeded): the same seed reproduces bit-for-bit, and — correctly — a different seed gives the same covariance and bound but a different RMSE, because P does not depend on the measurement noise. Reports RMSE, the optimal bound, the steady-state Kalman gain, and the SPD flag. Control, estimation, autonomy, quantitative finance.

ZeqLotka — predator–prey / ecosystem dynamics

POST /api/zeq/lotka · zeq_lotka · lotka — the Lotka–Volterra system dx/dt = αx − βxy, dy/dt = δxy − γy — coupled prey/predator populations, behind fisheries management, pest control, conservation biology and ecosystem-collapse forecasting. Reality check: the first integral H = δx − γ·ln x + βy − α·ln y is conserved on every orbit, so the populations trace a closed boom-bust cycle. The life-or-death: the default RK4 integrator holds H to ~10⁻⁹ (verified live) and the ecosystem cycles stably; forward-Euler (method:"euler") lets H drift ~4% and the populations spiral to a false extinction or explosion — and because the drift exceeds 0.1%, that run does not seal (mints no verified envelope). Reports the boom-bust extremes, the cycle period (vs the small-oscillation T≈2π/√(αγ)), and the coexistence fixed point (γ/δ, α/β). Deterministic. Population ecology, conservation, resource management.

lotka # RK4 — invariant conserved ~1e-9, stable cycle
lotka method=euler # forward-Euler drifts → spirals → does NOT seal
kalman # default track — RMSE ≈ √P∞, covariance → DARE (1e-14)
kalman sigmaZ=3 # noisier sensor → larger but still-optimal error
kalman steps=6000 # RMSE tightens to the optimal bound (~1%)