The solvers (COMPUTE)
Step 4 is where physics actually happens. computeByDomain(prefix, inputs, constants) in
shared/api-core/src/lib/zeqSolvers.ts dispatches the validated query, by domain prefix, to a
closed-form solver. Each solver evaluates a real equation over the constants bound in Step 2
and the inputs validated in Step 3, and returns a structured result — not a bare number:
{
value: 2954.0077, // the answer
unit: "m", // its physical dimension
uncertainty: 0.0, // propagated error
equation: "r_s = 2GM/c²", // the closed form used
detail: { G: 6.674e-11, M: 1.989e30, c: 299792458 } // the bound constants
}
The number, the unit, the uncertainty, and the equation it came from. A result that can't name its own equation isn't a Zeq result.
The dedicated solvers
There are 33 dedicated solvers (plus the generic path below). Each owns a band of physics and evaluates genuine closed forms — a representative selection:
| Solver | Domain | Representative equations |
|---|---|---|
solveZR | Zeq Resonance | R(t) = S(t)·[1 + α_K·sin(2π·f_H·t)] |
solveQM | Quantum / Atomic / Many-body | particle-in-a-box Eₙ = n²π²ħ²/(2mL²), de Broglie λ = h/p |
solveQR | Quantum Resonance / Computing | ω_r = 1/√(LC), Q = ω₀L/R |
solveWP | Wave Physics | v = λf, λ = c/f, k = 2π/λ |
solveCM | Classical / Newtonian / Kinematic | F = ma, KE = ½mv², p = mv, F = Gm₁m₂/r² |
solvePlasma | Plasma Physics | electron plasma frequency ω_p = √(n_e e²/ε₀m_e) |
solveCrystal | Crystallography | Bragg λ = 2d·sinθ, cubic spacing d = a/√(h²+k²+l²) |
solveTD | Thermodynamics / Atmospheric | ideal gas P = nRT/V, Stefan–Boltzmann j = σT⁴ |
solveEM | Electromagnetism | Coulomb F = q²/(4πε₀r²), Lorentz F = q(E + v×B) |
solveOM | Orbital / Aerospace | r_s, v_orb = √(GM/r), T = 2π√(r³/GM) |
solveFD | Fluid / Geophysics / Seismology | Bernoulli, Reynolds Re = ρvL/μ |
solveSM | Statistical Mechanics | Fermi–Dirac n(E) = 1/(e^{(E−μ)/k_BT}+1) |
solveGR | General Relativity / Cosmic | Schwarzschild r_s = 2GM/c², gravitational redshift |
solveNU | Nuclear Physics | semi-empirical mass formula (binding energy) |
solveOP | Optics | E = hf, Snell n₁sinθ₁ = n₂sinθ₂, Fresnel reflection |
solveStructural | Materials / Engineering / Robotics | σ = F/A, ε = σ/E, beam deflection |
solvePP | Particle Physics | de Broglie λ = h/p, relativistic p = γmv |
solveHF | Forensics (anti-hallucination) | HF1..HF21 truth-verification scores |
solveMED | Medical | BMI, BSA (Mosteller), GFR (MDRD), pharmacokinetics |
solveBIO | Biotech | Michaelis–Menten, PCR amplification, protein mass |
solveENERGY | Energy | Carnot, solar/wind power, heat transfer |
solveACO | Acoustics | speed of sound, SPL dB, Doppler, Sabine reverb |
solvePHOT | Photonics | waveguide, Kerr, Bragg grating, gain threshold |
solveFIN | Finance | CAPM, Sharpe, Black–Scholes, VaR (Monte-Carlo) |
solveCDM | Condensed Matter | Fermi–Dirac, σ = neμ, Hall, band gap, BCS gap/Tc, Josephson |
solveSIG | Signal Processing | SNR, Nyquist, Hamming/Hann windows, time-bandwidth |
solveCTRL | Control Theory | overshoot, rise/settling time, gain/phase margin |
solveNET | Network Science | scale-free P(k) ∝ k^−γ (graph metrics refuse) |
solveASTRON | Astronomy | Kepler III, Schwarzschild mass, Hubble, redshift, L = 4πR²σT⁴ |
solveCS | Computational + Statistics | Amdahl/Gustafson, Shannon capacity, Fitts, Bayes, binomial, normal PDF |
solveNEURO | Neuroscience | firing rate, Hebbian Δw = η·xᵢ·xⱼ, sigmoid activation |
solveCRYPTO | Cryptography | birthday collision bound |
Many solvers compute several related quantities and return the one that matches the input
signature — e.g. solveCM computes force, kinetic energy and momentum, and returns whichever
the supplied inputs ask for. Nothing is recalled from a table of pre-computed answers; the
Schwarzschild radius of the Sun is derived from r_s = 2GM/c² every time.
Worked example
curl -X POST https://zeqsdk.com/api/zeq/compute \
-H "Authorization: Bearer $ZEQ_KEY" \
-H "Content-Type: application/json" \
-d '{"operators":["GR37"],"inputs":{"mass":1.98892e30}}'
solveGR binds G and c from CODATA 2018, takes M from your input, evaluates
r_s = 2GM/c², and returns 2954.0077 m. Run it on any node: same value, because every
node binds the same constants and runs the same closed form.
Honest coverage
Operators are served by one of two mechanisms, and the framework is explicit about which you got.
solverCoverage.ts maps every registry category to its solver, and a test cross-checks the map
against the live dispatch on every run so it can't silently drift:
| Tier | Meaning |
|---|---|
| Dedicated closed-form solver | Evaluates the domain's own standard equations directly in float64 over CODATA constants. Serves most of the 65 categories. |
| Universal numerical engine | solveGeneric — a universal formula set, then RK4 integration of the HULYAS master equation. Serves the rest, returning a real deterministic value with a NUMERICAL FALLBACK disclosure. |
(Measured by solverCoverage.test.ts, which cross-checks the registry against the live dispatch on
every run — 65 categories total. Hundreds of explicit operator IDs are handled by closed-form math
across the dedicated solvers; the numerical engine guarantees a real answer for every remaining
operator in the catalogue.)
The generic path — and the ODE master-equation fallback
solveGeneric first matches a query against ~16 universal formulas (E = hf, E = mc²,
V = IR, p = mv, U = mgh, …) and returns a value when one fits.
When no closed form matches, the framework does not stop at a bare NaN. It integrates the
HULYAS master equation (RK4 numerical integration, the ODE master-equation fallback) over
your inputs and returns a real, deterministic field energy — the same directive that powers
zeq_solve. This is transparently disclosed: the response's master-equation block carries a
NUMERICAL FALLBACK note stating the value came from the numerical integrator, not from
evaluating the operator's own closed form. Same inputs → same value; different inputs → different
value. Dedicated closed-form solvers are never overridden by the fallback.
NUMERICAL FALLBACK (no closed form matched these inputs)
The value above was produced by RK4 integration of the HULYAS
master equation on the inputs you supplied — NOT by evaluating the
operator formula printed above.
When the machine still refuses
Some operators cannot be expressed by a scalar at all, and for those the machine refuses and says why rather than inventing a number:
- A series / matrix is required — beta (Cov/Var), portfolio variance, historical VaR: "needs a return series". Network clustering, PageRank, betweenness, modularity: "needs the graph / adjacency structure".
- A field / PDE is required — the acoustic wave PDE, coupled-mode photonics: "use the ODE /
field path (
zeq_solve)". - The wrong input was given — de Broglie /
E = hνwith only a mass: names the input needed (p/v,f/λ) and computes correctly when it is supplied. - The operator does not exist — an unknown operator ID is refused (
UNKNOWN_OPERATOR), never silently computed as though it were real.
The VERIFY step surfaces every refusal honestly and marks the
result no-solution. Across all 1,606 catalogued operators, a neutral audit finds a 100%
honesty net: every operator either computes a real value (closed-form or ODE fallback) or names
exactly what it needs. None fabricate.
This honesty is a feature, not an apology. A scientific tool that pretends to solve everything is untrustworthy; one that tells you exactly what it computed — closed form, numerical fallback, or an honest refusal — is one you can build on. For authoritative values, compute against a node and verify the signed result.
No degraded fallback
Every compute runs the full 7-step wizard against the real solvers — there is no "ground-state" degrade path. Physics is unlimited from Builder up, so a paid compute always returns real physics; a metered tier over its daily allowance is refused outright rather than handed a diluted answer. The ODE master-equation fallback is a legitimate numerical method, disclosed as such — never a lesser substitute for the closed form you asked for.
Read next
- Generative mathematics — how the solver's operator set becomes one printed equation
- Precision & proof — Step 5: how the result is checked and signed
- The honesty contract — missing inputs, assumed conditions, the ODE fallback, and refusals
- The operators reference — the full catalogue the prefixes index
The solver derives. It never recalls. Where it can't derive a closed form it integrates the master equation and says so — and where even that can't answer, it tells you what it needs.