<!-- release README; plain-language revision 2026-09-29 (metadata wording only; all numbers, equations and run instructions unchanged) -->
# eq_box_evaluate_standalone — C4(t) and psi4(t) of the one-loop box (conformally coupled scalar, d=3) on the equilateral line

Release 2026-09-28. Standalone: python >= 3.8 + mpmath only (no other dependencies, no network, python-flint not needed). Throughout, "d" after a number means decimal digits.

## What it evaluates
* Line: regular tetrahedron P_v = S = T = 1, x_v = 1 + t (X := 1 + t). Objects: C4, the loop-integrated correlator of Sec. 6.6 of the paper (the column labeled COR in the co-author's numerical table), and psi4, the loop-integrated wavefunction coefficient (V_4 in the paper; the column labeled PSI in that table); same normalisation as the table (factor exactly 1).
* **C4(t) = u(t) + Ω v(t)** — u, v are canonical solutions of the EXACT 28-dimensional differential system for C4 (Sec. 6.5 and App. B.6: the eps-regulated integration-by-parts system on the line, reduced by the exact values of the
  eps^-2 (double-pole) coefficients), fixed WITHOUT data by (i) single-valuedness at t = 1, t*, 0, -29/99, -0.4453, -1/2, -2/3, (ii) the exact large-X conditions beta_4 = beta_6 = beta_8 = 0,
  beta_5 = -24 pi, alpha_5 = pi(22 + 291 log 3 - 108 log 2)/12, beta_7 = -158 pi/3 (exact, from the expansion by regions of App. B.7), (iii) w'_1 = w'_22 = w'_23 = -pi/8 (the exact double-pole boundary constants of App. B.6);
  v is the unique log-free-at-infinity direction, v(X) = X^-4 + (29/80) X^-6 + (923/12800) X^-8 - (1531/204800) X^-10 + ... (even, rational).
  Ω is a PARAMETER (--omega). Default: 21.4444295139357745195031667653426535 (the co-author's closed-form check, a direct 34 d evaluation of the integral that defines Ω in Sec. 6.6). Our independent cross-check from her table through
  transport + asymptotics: 21.44442951393577451950316676534 (29.7 d agreement); an independent direct numerical evaluation of the Ω integral by the authors gives 21.4444295139357745195031667653 (30 d).
* **psi4(t) = c(t) . w(t)** with the exact 34-dimensional differential system for psi4 (Sec. 6.5, App. B.6 and B.8) and a boundary vector fitted to the co-author's psi4 table INSIDE the 8-dimensional physical space
  (single-valuedness as above; 7-dim with t = -2/3): psi4 = u_psi + Ω'_1 v_1 + Ω'_2 v_2, the two log-free directions' coefficients being carried by the fitted vector (two constants that remain
  numerically fitted in this release; the exact asymptotic data c5, c7, c9, s2, b11, c11 are reproduced to 25-31 d).

## Modes
* explicit (X = 1+t >= 2.5; full accuracy for X >= 14): C = sum_{n<=44} X^-n (alpha_n + beta_n log X). Instant. For C4, alpha_n = alpha_n(u) + Ω alpha_n(v), beta_n = beta_n(u).
* transport: Taylor-series integration of d/dt w = G(t) w from t0 = 3/4 along the real axis; every real singular point of the system between t0 and t is passed through the
  UPPER half plane (the convention under which the boundary vectors are defined). Two precisions are run; certified digits = their agreement, capped by the model
  accuracy (C4 28 d, psi4 27 d). Pure-python fixed-point arithmetic: seconds near t0, about 2-5 minutes when detours are needed (a detour is taken around every real singular point between t0 = 3/4 and t; in practice for t > 1 or t < 0.6224), longer very close to
  singular points of the system.
* auto (default): explicit if X >= 14 and its tail bound meets --need, else transport.  both: run both and print their agreement (a consistency check; 37-40 d at t = 15, 30 for C4).
* Fail-closed: exit 3 when certified digits < --need (default dps - 4); exit 4 outside the supported range: t <= 0 (negative t is not supported by this release; the physical region is t > 0), |t| < 1e-6 (t = 0 is a regular singular point of the system: the physical value is finite there but needs the local Frobenius connection, which is not shipped),
  t exactly a singular point of the system (choose a nearby regular rational).

Notes: pass rational t as p/q; a negative value would have to be written --t=-p/q, but negative t is refused (rc 4). Exit codes: 0 ok; 1/2 usage or missing dependency; 3 certified digits below --need; 4 unsupported t. Explicit mode reaches full accuracy for X >= 14; below that --mode auto switches to transport.

## Usage
    python3 eq_box_evaluate_standalone.py --which C4 --t 15                       # auto -> explicit
    python3 eq_box_evaluate_standalone.py --which C4 --t 1/10 --mode transport --dps 28
    python3 eq_box_evaluate_standalone.py --which psi4 --t 46/51 --mode transport
    python3 eq_box_evaluate_standalone.py --which C4 --t 2 --mode both            # explicit vs transport consistency check
    python3 eq_box_evaluate_standalone.py --which C4 --t 20 --omega 21.44442951393577451950316676534
    python3 eq_box_evaluate_standalone.py --selftest-quick                        # 3 explicit checks, seconds
    python3 eq_box_evaluate_standalone.py --selftest                              # + 2 transport checks against independently computed, certified reference values of C4 (~9 min); exit 0 iff all pass
    (--json for machine-readable output; --datadir DIR if the json files live elsewhere; --verbose prints march progress; --dps sets the target digits, default 28)

## Files (same directory)
* system_C4_28.json, system_psi4_34.json — the exact systems: entries G[i,j] and observable row c_j as ascending rational coefficient lists (numerator, denominator), converted
  exactly from the authors' pipeline export of the two systems (the sha256 of each export file is recorded inside; the conversion was cross-checked exactly, entry by entry, against the exact
  tables used by the pipeline's own transport code) plus the systems' singular points (35 d, from a certified root finder) for step control and detours. If these two files are absent, the
  evaluator falls back to the pipeline's original export files of the systems (kept with the derivation records in the paper's repository; not shipped here): placed in --datadir they are parsed on the fly by _ratparse.py (pure-python exact parser, ~5-10 s) with the
  singular points read from singular_points.json (shipped, small); without that file mpmath polyroots is used, which is very slow (> 30 min) for these degree-160 denominators.
* model_C4.json — u(3/4), v(3/4) (28 components, in the basis of system_C4_28.json, i.e. the 28 rows of the reduction's normal form that survive the quotient; 45-50 digits), the Ω values, alpha_n(u), beta_n(u), alpha_n(v) for n = 4..44.
* model_psi4.json — the 34-component psi4 vector at t = 3/4 and alpha_n, beta_n (n = 5..44).
* selftest_reference.json — reference values: three internal consistency checks of the authors' full evaluator (explicit = transport to 31-40 d) and two reference values of C4 from an independent direct numerical evaluation with certified error (t = 2, cert 23.6 d;
  t = 1/10, cert 26.4 d). Recorded self-test digits (dps 28): explicit 29.3 / 29.9 / 29.7 (C4 t=15, psi4 t=15, C4 t=30; the 29-30 d reflect that the references were recorded with the authors' 30 d direct evaluation of Ω, while
  Ω_default is the 34 d value), transport 28.4 (C4 t=2) and 30.4 (C4 t=1/10).
* singular_points.json — singular points of both systems (t-plane, 35 d).
* _ratparse.py — the exact parser (only needed for the on-the-fly fallback).

## Exact vs quoted
exact: both systems (G, c over Q(t)), the eps^-2 constants (-pi/8), the asymptotic structure and constants used to fix u, v's rational X-series, the single-valuedness
conditions (certified numerically, gaps 1e-5 -> 1e-51). certified numerics: u(3/4), v(3/4) (data-free, ~28-33 d), the alpha_n/beta_n functionals (|X|=3 monodromy-at-infinity
method, dps 60). quoted: Ω (default = co-author 34 d; ours a 29.7 d cross-check), the psi4 boundary vector (co-author-data fit, ~27-33 d). New exact log coefficients found on the
way (for the record): beta_9 = -627 pi/10, beta_11 = 10247 pi/840 (confirmed by the co-author), beta_13 = 2475239 pi/10080, beta_15 = 2789981 pi/7040,
beta_17 = -130953871 pi/139776; alpha_7 = pi(22519/360 + 423/8 log 3 - 16 log 2) (exact, from the expansion by regions; given with alpha_6 and beta_7 in App. B.7).

## Validation record
co-author table (33-34 d): C4 fits in the 4-dim space with 8 real unknowns at 33.2 d, held-out 33-34.6 d; controls (decoy x(1+t/10^9), prefactors, wrong table) fail by
>= 19 orders. Held-out tests against an independent direct numerical evaluation (values computed before the models were built and compared only afterwards): C4 data-free model 15/15 + 8/8 PASS on two held-out sets (28.0-29.4 d); psi4 8-space refit 8/8 PASS on a further held-out set (32.2-33.1 d). The full record of these fits and tests is kept with the derivation records
in the paper's repository.
