← Session 8 — Regroup + R-004 finite-height Li theorem; resources atlas ingested
thinking (33442 chars)
FOUND IT!!!
`mp.zeta(90, 0.5)` at dps 1700 returns: 1237940039285380274899124224.**00000000000000014183606858897689**
Look at that value: integer part 1237940039285380274899124224 = 2^90 = 1237940039285380274899124224 EXACTLY. Then fractional part 0.00000000000000014183... The true ζ(90, 0.5) = Σ (m+0.5)^{−90} = 2^90·(1 + (2/3)^90·... )... wait: (m+1/2)^{−90} for m=0: 2^90. m=1: (3/2)^{−90} = 2^90/3^90 = 2^90·3^{−90} = 1.24e27·8.7e-43·... = tiny. So fractional part ~ 2^90·3^{−90}·(1+...) ≈ 1.4e-16·... The displayed fraction .000000000000000141836... hmm that looks plausible actually (2^90·3^{−90} = 1.2379e27·8.7279e-43·... wait 3^90 = 8.7279e42, so 2^90/3^90 = 1.2379e27/8.7279e42 = 1.419e-16 ✓ matches the .1418e-15 fraction ✓).
So zeta(90, 0.5) is computed CORRECTLY. Note the value at dps 300 vs dps 1700 are IDENTICAL strings — meaning mpmath CACHED the value... or the fractional digits beyond a point are wrong-but-cached. eta_d[89] vs eta_fresh identical → same cached value reused ✓ deterministic.
diff = 6.78e-58 — the REAL diff between flint-Stieltjes η_89 and mpmath-τ η_89. So eta_d[89] is wrong at ~6.8e-58 (relative 6e-15 of η_89 = 1.1e-43; i.e., mpmath τ_89 accurate to ~57 significant digits of the SMALL part, i.e., ζ(90,0.5) accurate to absolute ~10^{27−57−... }). Hmm: η_89 = (−1)^{90}[τ + 1] with τ = −2^{−90}ζ(90,0.5). η error 6.8e-58 → τ error 6.8e-58 → ζ error = 6.8e-58·2^90 = 8.4e-31. In units of the displayed value (1.2e27): relative 6.8e-58·2^90/1.24e27 = 6.8e-58... i.e., ζ(90,0.5) accurate to ~58 SIGNIFICANT digits (10^{27}·10^{−58} = 8.4e-31 ✓). 58 digits ≈ ... where does 58 come from? dps 1700 → error should be 10^{−1700}·1e27 = 1e-1673. NOT 1e-31. So mpmath's Hurwitz zeta at dps 1700 is only accurate to ~58 digits!!! THE MPMATH ZETA BUG IS REAL — but it's ~58 digits, not 16-19.
Hmm interesting: 58 digits... The fractional part .00000000000000014183606858897689: 1.4183606858897689e-16. True 2^90·(3^{−90} + 5^{−90}·...): 3^{−90}·2^90 = (2/3)^90 = 1.41835e-16? (2/3)^90: log10 = 90·(−0.17609) = −15.848 → 1.4184e-16 ✓. And next term (2/5)^90 = 10^{−35.8}. So the fraction beyond ~16 digits is ~1e-36 — mpmath printed ...14183606858897689: digits after 1.4184e-16: 3606858897689e-31 — hmm the (2/5)^90 term = 2.5e-36, and (2/7)^90 ~ 1e-49... so the fraction's digits 3606858897689 at 1e-31 scale — mpmath might have those wrong. Whatever — the point is mpmath Hurwitz zeta breaks at ~58 digits.
And in the earlier DIFF runs: why did they print 3.5e-102?! The diff runs subtracted at dps 100... eta_e (dps-150 content) ROUNDED to dps 100 = 100 significant digits: eta_e[89] rounded to 100 sig digits ≈ accurate to 1e-43·1e-100 = 1e-143. eta_d[89] content: computed at dps 100 addition from dps-1700 tau — content ~100 sig digits with error 6.8e-58. diff at dps 100: |1.1e-43 values, difference 6.8e-58| — representable, should print 6.8e-58!!! IT PRINTED 3.5e-102. WHY?!
OH MY GOD. I bet mp.nstr or the subtraction... wait. In the FIRST diff run and diag3, the diffs printed ~1e-102 — but just now, same computation at dps 300 printed 6.78e-58. The difference: dps at subtraction time (100 vs 300)! At dps 100: eta_e[89] (150-digit content) gets rounded to 100 digits: 1.14574263767131308339251462596489268573709446921740912101498e-43 → 100 sig digits: chop at ...40912101498 (that's already ~89 digits) → to 100 digits appends nothing meaningful — the mpf holds 89+ sig digits exactly... rounding to dps 100 keeps its first 100 sig digits — the value has ~89 digits, so NO rounding. eta_d[89] holds ~89 digits too (1.14574263767131986428001632534171267967813299191953069549961e-43: count: ~89 chars). Both fully representable at dps 100. Their difference 6.78e-58 representable. So dps-100 subtraction should give 6.78e-58. But it printed 3.5e-102!!
UNLESS the subtraction at dps 100 did something else... you know what, maybe in the earlier runs the eta_d values were DIFFERENT because the dps-switching HISTORY differed (the loop ran j=0..210 with zeta caches built along the way at various dps). mpmath zeta caching keyed by value, not precision → in the full loop, zeta(90, 0.5) might have been cached at a DIFFERENT precision context... Actually here's the thing: in this last script, KMAX=95, and eta_fresh recomputation at dps 1700 gave the SAME digits → cache consistent within this run.
Whatever the micro-cause (mpmath cache/precision handling bugs on Py 3.14), the MACRO conclusion is now solid:
**ROOT CAUSE: mpmath's mp.zeta (Hurwitz and likely integer) on this stack (mpmath 1.3 + Py 3.14) is accurate only to ~58 digits (at least for large s), silently.** The E-021 script computes τ_j = (−1/2)^{j+1}ζ(j+1, 1/2) via mpmath — the η_j errors ~|τ|·10^{−58}·(cancellation-independent, absolute ~10^{−58}·2^{j+1}/2^{j+1} = ...) — wait: ζ(j+1,0.5) error ~ 2^{j+1}·10^{−58} → τ error ~ 10^{−58}·(constant!). Then S_f error ~ Σ C(n,j)·10^{−58} ~ 2^n·10^{−58}: n=200 → 10^{60−58} = 10^2 ~ matches observed 76682?? order 10^{4.9} vs 10^2 — same ballpark (errors not worst-case aligned). n=500: 10^{150−58} = 10^{92}?? observed 10^{60}. Hmm — bigger than observed again. But maybe the "58 digits" grows with s... At j=89: error in ζ ~ 8.4e-31 = 10^{27−58}; relative to ζ ~ 10^{−58}. At larger j, maybe relative error stays ~10^{−58}: τ error ~10^{−58} constant. S_f(500) predicted ≤ 10^{92}, observed 10^{60} — off by 10^{32}, and observed per-term ~10^{−90}: so errors DECAY with j?! Maybe mpmath error is ~10^{−58} RELATIVE to the small part... η_j error ~3^{−j}·10^{−58}: Σ C(n,j)3^{−j}10^{−58} = (4/3)^n·10^{−58}: n=500: 10^{62−58} = 10^4?? observed 10^{60}. No.
Honestly the exact error law doesn't matter for the FIX. What matters:
**THE FIX: do not use mpmath zeta at all. Compute η_j via flint only:**
- Option A (best): η_j via the E-011 Stieltjes-division machinery (flint.acb.stieltjes) — but that needs Stieltjes to k=5000 (expensive: E-015 did 3000 in hours; stieltjes cost ~k³ per memory note → k=5000 ~ 4.6× cost of 3000 — too slow for now).
- Option B: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] with ζ(j+1) from FLINT arb (fast, rigorous, E-011-validated) — the small part computed with 0.48j-digit cancellation, so use dps = 0.31·N_MAX + 0.48·j + margin... Actually (1−2^{−s})ζ(s) − 1 at s = j+1: value ~3^{−(j+1)}; ζ(s) ~ 1+2^{−s}: need ζ(s) to absolute accuracy ≪ 3^{−s}: flint arb at working precision W digits gives absolute error ~10^{−W}: need W > 0.48j + desired_accuracy. For S_f to n=5000 with error < 10^{-30}: need η_j absolute error < 10^{−30}/2^n·... hmm total budget: Σ C(n,j)δ_j < 10^{−30} → δ_j < 10^{−30}/2^n ~ 10^{−30−0.301n} — at n=5000: 10^{−1535}. And W > 0.48j + 1535. At j=5000: W > 3935. Hmm, large but flint arb zeta is FAST (E-011 used it). Actually, better: for large j, compute the small part DIRECTLY as a series: Σ_{m≥3 odd?} — (1−2^{−s})ζ(s) − 1 = Σ_{m≥3} m^{−s} − 2^{−s}ζ(s)... hmm that's Σ over odd m≥3: Σ_{k≥1}(2k+1)^{−s}: for s ≥ 30, = 3^{−s}(1 + (3/5)^s + (3/7)^s + ...): first term dominates; sum ~3^{−s}(1+ε). Direct evaluation with flint: a handful of terms at modest precision. NO CANCELLATION.
- Option B': η_j = (−1)^{j+1}[Σ_{k≥1}(2k+1)^{−(j+1)} + σ_{j+1}] — direct odd-reciprocal power sum (τ's small part is exactly Σ_{k≥1}(2k+1)^{−(j+1)} per Lagarias's Remark: τ_n = (−1)^{n+1}Σ_{m≥0}(2m+1)^{−(n+1)}; subtract (−1)^{n+1}·1 = the m=0 term). So η_j = (−1)^{j+1}[Σ_{m≥1}(2m+1)^{−(j+1)} + σ_{j+1}]. For j ≥ 20: sum = 3^{−(j+1)} + 5^{−(j+1)} + 7^{−(j+1)} + ... converges in ~j/2 terms to any precision, trivially with mpmath mp.power at dps 100. NO big-number cancellation at all! And σ_{j+1} for j+1 ≤ 16 from zeros (as now), else 0 (|σ| ≤ σ₂·14^{1−j} — wait for j+1 > 16: |σ_{j+1}| ≤ Σ|ρ|^{−(j+1)} ≤ σ₂·(1/14.13)^{j−1} < 10^{−18} for j ≥ 16 — hmm at j=16: σ₂·14^{−15} = 0.046·7.2e-18 = 3.3e-19. negligible vs η_16 ~ 3^{−17} = 1.3e-8? Yes negligible.)
This is clean, fast, and avoids both mpmath-zeta and the cancellation. For j ≤ 20 use flint for τ... actually use the direct sum for ALL j: Σ_{m=1}^{M}(2m+1)^{−(j+1)}: at j=0: Σ (2m+1)^{−1} DIVERGES! τ_0 is special (has the log term) — keep j=0 as-is (τ_0 = −(log4π+γ)/2 exact, no mpmath zeta). For j ≥ 1 the series converges; for small j (j=1: Σ(2m+1)^{−2} converges like 1/m² — need many terms for high precision! Σ_{m>M}(2m+1)^{−2} ~ 1/(2M): for 1650 digits need M ~ 10^{1650} — IMPOSSIBLE for small j. So for small j use the closed form: Σ_{m≥1}(2m+1)^{−s} = (1−2^{−s})ζ(s) − 1 — with flint arb zeta (rigorous, fast) — cancellation 0.48j digits, affordable for small j (j ≤ 100: 48 extra digits). Strategy:
- j = 0: η_0 = −γ − σ_1 + 1 + τ... just η_0 = τ_0 − σ_1 + 1 with τ_0 = −(log4π+γ)/2 (no zeta).
- 1 ≤ j ≤ J_SPLIT (~50): η_j = (−1/2)^{j+1}ζ(j+1,1/2)... OR (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] with ζ via FLINT at dps = full_digits + 0.48j + margin (0.48·50 = 24 extra digits — trivial).
- j > J_SPLIT: direct odd-power series Σ_{m=1}^{M}(2m+1)^{−(j+1)} truncated when term < 10^{−(digits+10)}; each term via mp.power (exact-ish) — fast.
Wait, actually for ALL j ≥ 1, can use flint: (1−2^{−(j+1)})ζ(j+1) − 1 with ζ from flint.arb — cancellation 0.48j digits at j=5000 = 2400 digits on top of 1650+ = ~4100 digits total. flint arb zeta at 4100 digits for 5000 values — E-011 did 2000 zetas at 1000+ digits quickly (arb zeta is fast). Hmm, but simpler & cheaper: hybrid split at J_SPLIT=40: direct series beyond 40 (at j=40: 3^{−41} ~ 1.5e-20, need terms m=1..M with (2M+1)^{−41} < 10^{−1660}: M ~ ... (2M+1)^41 > 10^{1660} → 2M+1 > 10^{40.5} — HUGE M?! No wait — I need the SUM to 1650 digits ABSOLUTE: terms after m=M contribute < (2M)^{−j}: for j=41, (2M)^{−41} < 10^{−1660} → M ~ 10^{40}/2 — impossible!! Hmm no: absolute accuracy needed for η_40 is NOT 10^{−1660} — the S_f error budget per term: C(n,j)·δ_j with C(5000, 41) ~ 5000^41/41! ~ 10^{110}. δ_40 < 10^{−30}/10^{110} = 10^{−140}. So η_j accuracy requirements depend on j: δ_j ≲ 10^{−30}/C(n_max, j). For j ~ n/2 (max C): 10^{−1530}. For j=40: 10^{−140}. Direct series for j=40 to 140 absolute digits: terms (2m+1)^{−41}: 3^{−41} = 1.5e-20; need tail < 10^{−140}: (2M+1)^{−41}·(2M+1)/40 < 10^{−140} → (2M+1)^{−40} ≲ 10^{−140} → 2M+1 ≳ 10^{3.5} = 3162. M ~ 1600 terms at 200 digits — trivial! And for j=2500 (max C): δ needed ~10^{−1530}: 3^{−2501} = 10^{−1194} — SMALLER than required accuracy!!! η_2500 itself (~10^{−1194}) is below the accuracy floor — can set η_j = 0 for j where 3^{−j}·C(n_max,j) < 10^{−40}! log10 C(5000,j) + log10 3^{−j}: max of C at j=2500: 1505; 3^{−2500} = 10^{−1193}: product 10^{312} — NOT negligible!! So η_j matters to full accuracy ~10^{−1530} at j=2500, where η_j ~ 10^{−1193}: relative accuracy 10^{−337}. Direct series: 3^{−2501}(1 + (3/5)^{2501} + ...) — the tail after m=1: (5)^{−2501} = 10^{−1749} — negligible vs 10^{−1530}... need (2m+1)^{−2501} < 10^{−1530}: 2m+1 > 10^{0.61} = 4.1: m ≥ 2 suffices! For large j only a FEW terms needed.
So the direct-series approach works for all j ≥ J_SPLIT with M(j) small for large j. And the split: for j ≤ J_SPLIT use flint zeta with +0.48j digits (cheap since J_SPLIT small, say 100: flint zeta for 100 values at 1800 digits — seconds).
Actually — EVEN SIMPLER: use flint for everything via the same formula: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] with ζ from flint.arb at working precision W_j = full_digits + 0.48·j + 50 (string precision per j). flint arb zeta at ~4000 digits max — is flint zeta fast at 4000 digits? E-021's P3 already computed ζ(j) for j ≤ 5000 at 1650 digits via flint — it did (zeta cache!). But the cancellation needs EXTRA 0.48j digits — recompute zeta strings at precision (0.31·N_MAX + 0.48·j + 100). Total cost similar to P3 (~few minutes). This avoids hybrid complexity. flint is VALIDATED (E-011).
Hmm wait — but does (1−2^{−s})ζ(s)−1 via flint at W digits give absolute error ~10^{−(W−0.48j)}? ζ(s) ~ 1: flint computes to W sig digits → absolute error 10^{−W} (value ~1). The subtraction (1−2^{−s})ζ(s) − 1 ~ 3^{−s}: result error ~10^{−W} → relative error 10^{−W}/3^{−s} = 10^{−W+0.48s}. With W = 1650 + 0.48j + 50: relative 10^{−1700}.
So the FIX for E-021 P2: replace tau_j (mpmath Hurwitz) with flint-based computation of η_j directly:
η_0 = −(log4π+γ)/2 − σ_1 + 1
η_j = (−1)^{j+1}·[(1−2^{−(j+1)})·ζ_flint(j+1) − 1 + σ_{j+1}], j ≥ 1
with ζ_flint strings at precision scaling 0.48j + base.
Also NOTE: the same mpmath-zeta issue affects... E-021's P1 uses xi_mp with mp.zeta (complex s) at dps 30 — "mpmath complex-ζ OK to ~1e-10 (E-018 C2)" per handoff — P1's |R| sampling is robust (A_use/B0_use have 20-30% margins). Fine.
Also mpmath zeta appears in E-011's arb_zetas? No — E-011 used flint.arb(j).zeta() ✓. E-015 same ✓. So E-011/E-015 results are SAFE. The mpmath-Hurwitz usage in E-021 P2 is the only place. GOOD — ledger #3 stands.
Also: the σ_m computed from 7900 zeros via mpc at dps 50-100 — mpmath POWER r**(-m) — plain arithmetic, fine.
Hmm, one more check — "58 digits": let me characterize the mpmath bug a bit for the record (it contradicts/extends the memory note "16-19 digits"): zeta(90, 0.5) at dps 1700 accurate to ~58 sig digits. Actually the memory note says E-011 found mp.zeta broken beyond ~16-19 digits; here we see ~58 at dps 1700. Maybe accuracy scales with dps but with huge losses (Hurwitz via Euler-Maclaurin with Bernoulli cache issues?). For the memory file: mpmath zeta (any form) is untrustworthy beyond double precision on this stack; use flint always. I'll update the memory note.
Now implement the fix in E-021. Plan:
1. Replace P2's η computation: flint-based, no mpmath zeta.
2. Keep σ_m from zeros (fine).
3. Rerun (S_∞ is cached — actually the zeta cache is reusable for S_∞; the η-side needs its own higher-precision zeta strings — separate cache).
4. Also the CSV/JSON from the failed run will be overwritten (script has --force semantics; CSV gets rewritten at end).
Precision plan for η_j (j ≥ 1): need absolute error ≤ 10^{−(0.31·N_MAX + 60)} after the 0.48j-digit cancellation → compute ζ(j+1) string at W_j = ceil(0.31·N_MAX) + ceil(0.477·j) + 160 digits via flint.arb(j+1).zeta().str(W_j). Sum over odd m? No — direct: small = (1−2^{−(j+1)})ζ − 1 at mp dps W_j + 50. For j=0: η_0 = τ_0 − σ_1 + 1 (exact constants + σ_1).
Wait, also should double check the σ truncation: for j+1 > 16, σ_{j+1} set to 0, true |σ_{j+1}| ≤ σ₂·14^{1−j} ≤ 3e-19 for j ≥ 16. η_j absolute error budget at j=16..: C(5000,j)·3e-19 at j=16: C(5000,16) ~ 10^{44}·3e-19 = 3e-25?? Hmm — that's bigger than 1e-30 target! Extend σ_m to m ≤ 24 (zeros to 5000: σ_2 tail bound 2e-13·... the σ_m themselves for m ≤ 24 are dominated by first zeros, computed fine; truncation of zeros at T=5000 affects σ_m ~ T^{1−m} — negligible for m ≥ 2). With m ≤ 24: omitted σ_{j+1} for j ≥ 24: |σ| ≤ 0.046·14^{−23} ~ 10^{−27}. C(5000,24)·10^{−27}: C ~ 10^{63}·1e-27 = 1e-36 ✓ fine. So SIGMA_M_MAX = 24. Actually at j between 17 and 24 with σ=0: |σ_{j+1}| ≤ 0.046·14^{−(j−1)}: j=17: 0.046·14^{−16} = 2e-20·... 14^{−16} = 4.4e-19 → 2e-20. C(5000,17) ~ 10^{46}·2e-20 = 2e-26 > 1e-30! Marginal. So yes, extend σ to 24: j=24 omitted: 0.046·14^{−23} = 4.6e-2·2.9e-27 = 1.3e-28; C(5000,24) ~ 10^{63}: 1.3e-65?? wait C(5000,24) = 5000^24/24! ~ 10^{88.7}/10^{23.2} = 10^{65.5}. ×1.3e-28 = 1.3e-62 ✓ fine.
Hmm wait, actually there's subtlety: the σ_m from only 7900 zeros (T=5000): σ_m = 2Re Σ_{γ≤5000} ρ^{−m} + tail. Tail for m=2: bounded 2e-13-ish (per script log: tail <= printed earlier ~1e-13?). For σ_2, error 1e-13 → η_1 error 1e-13 → C(n,2)·1e-13 ~ n²/2·1e-13: at n=5000: 1.25e7·1e-13 = 1.25e-6!!! THAT breaks the budget too! The V1 check needs λ to 1e-40 relative (~1e-36 absolute at λ~10⁴)... hmm, V1 threshold worst < 1e-40 relative. σ_2 tail 1e-13 → S_f error at j=2: C(5000,2)·1e-13 = 1.25e-6 → λ error 1.25e-6 → rel ~ 1e-10. V1 FAILS?! But wait — this was ALSO true in the ORIGINAL design (STATE.md said η₀ = −0.576975 within σ₁-tail 1.2e-3 ✓ — accepted as expected). Hmm, so the design accepts σ-truncation errors at small j?? But then V1 (λ vs E-015 to 1e-40) can never pass with zeros only to T=5000! σ_1 tail: the paired form Σ 1/(ρ(1−ρ)) tail ~ 2·tail_2 ~ 2.4e-4 (measured η_0 diff 2.4e-4). η_0 error 2.4e-4 → S_f error C(n,1)·2.4e-4 = n·2.4e-4 = 1.2 at n=5000!!! λ error ~1.2!!! V1 hopeless with T_ZEROS = 5000.
Hmm!! So E-021's P2 design has an intrinsic zero-truncation wall: η_0 needs σ_1 to ~10^{−35}/n... σ_1 via paired zeros to height T has tail ~ 2Σ_{γ>T}1/γ² ~ 2·logT/(2πT) ~ 2.4e-4 at T=5000. To get σ_1 to 10^{−38} need T ~ 10^{35} — impossible!!
BUT WAIT — we don't need σ_1 from zeros at all! σ_1 is KNOWN in closed form: σ_1 = Σ_ρ 1/ρ = 1 + γ/2 − (1/2)log(4π) = B' — the classical constant ≈ 0.02309570896612103... (λ_1!). Actually λ_1 = σ_1 exactly (λ_1 = Σ(−1)^{j−1}C(1,j)σ_j = σ_1). And λ_1 is known to 102 digits (E-011: 0.0230957089661210338143102479064952916219321271520507...). So η_0 = τ_0 − σ_1 + 1 EXACTLY.
Similarly σ_2 = 2σ_1 − λ_2? From λ_2 = 2σ_1 − σ_2 → σ_2 = 2σ_1 − λ_2. And generally σ_j via λ_1..λ_j (triangular): σ_j = (−1)^{j−1}[λ_j − Σ_{i<j}(−1)^{i−1}C(j,i)σ_i]. So ALL σ_j (j ≤ 16 or 24) can be computed from λ_1..λ_24 — known from E-015 (λ to n=3000 at dps 1450!!) or E-011's CSV (λ_1..1000). EXACTLY (to 1450 digits)! NO ZERO SUMS NEEDED for σ_m, m ≤ 24!!
Even better: η_j for j ≤ 23 = τ_j + (−1)^{j+1}σ_{j+1} + (−1)^j with σ from λ's (E-015 CSV, 25-digit strings — hmm, E-015 CSV has λ to ~26 digits only! "306.6557648513447664127226" — 26 digits. Not enough for 1650-digit η. But E-011's CSV? Also ~12-30 digits. Hmm. λ to full precision: E-015 computed at dps 1450 but the CSV may have truncated... Let me check E-015 CSV format: earlier: "200,306.6557648513447664127226,1.00951446899" — 26 digits. NOT enough.
Alternatives: compute λ_1..λ_24 from the zero side? σ_1 = λ_1 known 102 digits (E-011 JSON has lambda_1 to 30+ digits; the LAMBDA1_KNOWN string in E-011 script: 102 digits!). λ_2..λ_24: computable from zero-side with zeros to T=5000 + tail bounds... σ_m for m ≥ 2 converges ABSOLUTELY (Σ|ρ|^{−m} < ∞): zero-truncation tail for σ_m ~ ∫_T^∞ t^{−m} dN ~ T^{1−m}logT/(2π(m−1)): m=2: 10^{−3.7}·... at T=5000: ~2e-4?? Wait earlier the script log printed "sigma_2 tail <= ..." — let me check what it printed. Earlier log line: "sigma_2 = ... (plain-power sum; tail <= X)" — I didn't see the value. From D-036: tails computed via tail_m. At T=5000, tail_2 ≈ N(T)/T² + (2/2π)[log(T/2πe)/1 + 1]T^{−1} + S(T)/T² ≈ (7900/2.5e7) + 0.318·(6.68+1)/5000 ≈ 3.16e-4 + 4.88e-4 ≈ 8e-4. Hmm that's the BOUND; actual tail ~ log(2πT)... Σ_{γ>T}1/γ²·2 ≈ 2·∫ log(t/2π)/(2πt²) dt ≈ 2·(log(T/2π)+1)/(2πT) ≈ 2·7.68/(31415) = 4.9e-4. So σ_2 known to ~5e-4 only from zeros?! Hmm wait, that contradicts η_1 matching Stieltjes to 8e-12 in diag1?? diag1 η_1: a/b = 0.188026978299 vs true 0.18754623284 — differ by 4.8e-4 ✓ CONSISTENT with σ_2 tail 4.8e-4. Yes! So zero-side σ_2 has 4.8e-4 error (flagged "a WRONG" in diag1!). Confirmed.
So zero-truncation at T=5000 gives σ_m errors ~5e-4·14^{2−m}·... For η to 1650 digits we need σ_m essentially exact → use the triangular inversion from λ_1..λ_m. Where to get high-precision λ_1..λ_24? E-015's underlying computation had dps 1450 but CSV truncated. RERUN E-015 machinery for n ≤ 24? That needs Stieltjes to k=24 — SECONDS via flint. YES: compute η via E-011 machinery directly for j ≤ 24 (Stieltjes division, flint, high precision — cheap for k ≤ 24), and for j > 24 use... hmm, but η_j for j > 24 still needs σ_{j+1} (tiny, ≤ 14^{−25} — set 0 ✓) and τ_j's small part via flint zeta (the (1−2^{−s})ζ(s)−1 formula, cancellation 0.48j digits, affordable).
CLEANEST FINAL DESIGN for P2 (all flint, no mpmath zeta):
- j = 0..24: η_j via E-011's Stieltjes series-division (flint.acb.stieltjes to k=24 at full precision — seconds). VALIDATED machinery.
- j ≥ 25: η_j = (−1)^{j+1}·[(1−2^{−(j+1)})·ζ_flint(j+1) − 1], σ omitted (|σ_{j+1}| ≤ σ₂·14^{1−j} < 10^{−27}·0.05 — below budget at these j since C(5000,25)~10^{67}·1.3e-28 = 1.3e-61 ✓).
ζ_flint(j+1) strings at W_j = full_digits + ceil(0.48j) + 100 digits. NOTE: E-021's existing zeta cache has ζ(j) at full_digits = 1650 — NOT enough for j > ~25 (needs +0.48j). So a second cache "E-021-zeta-hi-cache.json" at per-j precision. Cost: 5000 flint zetas at up to ~4100 digits — comparable to P3's cache build (was acceptable; cache reused for the 1e4 rerun later).
Hmm wait — actually for j ≥ 25 we could ALSO use the direct odd-power series, avoiding big zeta entirely: Σ_{m≥1}(2m+1)^{−(j+1)}: at j=25: 3^{−26} = 10^{−12.4}; terms: 3^{−26}(1+(3/5)^{26}+...) ≈ 3^{−26}(1+1.7e-6+...): need ~40 terms for 1700 digits?? (2m+1)^{−26} < 10^{−1712}: 2m+1 > 10^{65.9} — no!! For the SUM's absolute accuracy 10^{−1712} at j=25... the sum itself is ~10^{−12.4}, so need relative 10^{−1700}: tail after M: (2M)^{−25}·... < 10^{−12.4−1700}: (2M)^{25} > 10^{1712}: 2M > 10^{68.5}. IMPOSSIBLE. So no — for j=25 direct series needs the sum to RELATIVE 1700 digits → huge M. flint-zeta-with-cancellation is the way (0.48·25 = 12 extra digits — trivial). For j=2500: direct series: sum ~10^{−1193}, need absolute 10^{−1530} (relative 10^{−337}): tail (2M+1)^{−2501} < 10^{−1530}: 2M+1 > 10^{0.612} = 4.1: M=2!! Two terms. So direct series IS better for large j. Hybrid: j ≤ J_SPLIT: flint zeta; j > J_SPLIT: direct series with M(j) = smallest M with (2M+1)^{−(j+1)} < 10^{−(need)}. J_SPLIT where M becomes small... M(j) ≈ (10^{need/(j+1)}−1)/2 with need = 0.31·N_MAX + 60 − log10(3^{−(j+1)})·... hmm need absolute accuracy A = 10^{−(0.31·5000+60)} = 10^{−1610}: M(j): (2M+1)^{−(j+1)} < 10^{−1610} → 2M+1 > 10^{1610/(j+1)}. j=100: 10^{15.9} — huge. j=1000: 10^{1.6} = 40 → M=20 ✓. j=300: 10^{5.35} = 224000 — huge. So direct series only wins for j ≳ 800. Hybrid split at j=800: flint zeta for j ≤ 800 (800 zetas at ≤1650+384 digits — fast), direct series for j > 800 (M ≤ 20, instant).
Hmm, actually — wait. Is per-term accuracy 10^{−1610} the right budget? S_f error = Σ_j C(n,j)δ_j. Worst case aligned: 2^n·max δ. Need final S_f to, say, 30 correct digits: δ_max < 10^{−30−0.301·5000} = 10^{−1535}. So A = 10^{−(1535+60)} = 10^{−1595}. Yes ~10^{−1600}.
Actually hmm, hold on: is that budget even right? The C(n,j)·η_{j−1} terms: C(5000, 2500)·η_2499 ~ 10^{1505}·3^{−2500} = 10^{1505−1193} = 10^{312}. To get S_f to 30 digits, need each term to ~30+2 digits relative-to-result... absolute term accuracy 10^{30}: δ_j·C(n,j) < 10^{30} → δ_j < 10^{30−1505} = 10^{−1475} at j=2500. η_2499 ~ 10^{−1193} — relative 10^{−282}. Via flint zeta: need ζ(2501) absolute accuracy: (1−2^{−s})ζ−1 ~ 3^{−2501}: the subtraction error ~10^{−W}: need 10^{−W} < 10^{−1475}·... η error = ζ error ~10^{−W} (ζ~1) → δ_j ~ 10^{−W}: W > 1475. And 0.48j cancellation: the RESULT η_j ~ 10^{−1193} computed from ζ ~ 1: absolute error of result ~10^{−W} regardless → W = 1475+60 suffices?? The cancellation "loss" is automatic: ζ to W absolute digits → η to W absolute digits → relative 10^{−W}/10^{−1193}. So W_j = 1600 constant works for all j?! Wait, but that's what I said: error of (1−2^{−s})ζ(s)−1 computed at precision W: ζ(s) = 1+2^{−s}+... ~ 1: flint gives W SIG digits → abs err 10^{−W}. Multiply by (1−2^{−s}) ~ 1: err 10^{−W}. Subtract 1: result ~3^{−s}, err 10^{−W}. So η_j abs err 10^{−W}. With W = 1650: δ_j ~ 10^{−1650} for ALL j. Σ C(n,j)δ ~ 2^5000·10^{−1650} = 10^{1505−1650} = 10^{−145}. FINE. So uniform W = full_digits = 1650 suffices!!! No 0.48j extra needed!! (My earlier "+0.48j" was confusing relative vs absolute.)
So: recompute flint ζ(j) strings for j = 2..5000 at 1650 digits — THE EXISTING ZETA CACHE ALREADY HAS THESE!!! E-021-zeta-cache.json: ζ(j) at full_digits = 1650 for j ≤ 5000 ✓✓. REUSE! η_j = (−1)^{j+1}·[(1−2^{−(j+1)})·ζ(j+1) − 1 + σ_{j+1}] computed at dps 1700 from the cached strings. σ_{j+1} for j+1 ≤ 24 from Stieltjes-division η... no wait, σ via triangular inversion from λ... simpler: σ_m for m ≤ 24 from η's?! Circular. Options for σ_m (m ≤ 24, need ~1600 digits):
- From λ_1..λ_24 (triangular): need λ to 1600 digits → E-011 machinery at n_max=24: Stieltjes k ≤ 24 via flint (seconds) + series division + plain sums: cheap, VALIDATED. Compute λ_1..24 at dps 1700, invert: σ_1 = λ_1; σ_j = (−1)^{j−1}λ_j − Σ_{i=1}^{j−1}(−1)^{i−1}C(j,i)σ_i... from λ_j = Σ_{i=1}^j (−1)^{i−1}C(j,i)σ_i: σ_j = (−1)^{j−1}[λ_j − Σ_{i=1}^{j−1}(−1)^{i−1}C(j,i)σ_i]... wait solve: λ_j = Σ_i (−1)^{i−1}C(j,i)σ_i; the i=j term: (−1)^{j−1}σ_j → σ_j = (−1)^{j−1}(λ_j − Σ_{i<j}(−1)^{i−1}C(j,i)σ_i). ✓
- OR: η_j for j ≤ 23 directly from Stieltjes division (E-011 machinery, k ≤ 23, seconds) — then no σ needed at all for small j! And for j ≥ 24: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1] (σ_{j+1} omitted: |σ_{j+1}| ≤ 0.047·14^{−23} < 1.4e-28 ≪ 10^{−1600}? NO — 1.4e-28 > 1e-1600. But its S_f impact: C(5000,24)·1.4e-28 = 10^{65.5}·1.4e-28 = 1.4e-37 ✓ negligible).
DESIGN (final):
- η_j for j = 0..23: Stieltjes series division (flint stieltjes k ≤ 23 at precision full_digits+100, recursion at dps full_digits+100).
- η_j for j = 24..N_MAX−1: (−1)^{j+1}·[(1−2^{−(j+1)})·ζ(j+1) − 1] at dps full_digits+50, ζ strings from the EXISTING cache (1650 digits) ✓.
- Cross-validate at j = 20..23: both methods computable (σ from zeros for the τ formula? no — compare Stieltjes-η vs zeta-formula-η with σ omitted at j=20..23: difference should equal (−1)^{j+1}σ_{j+1} ~ 14^{−21} — check consistency to that level). Simple check: |diff| ≤ 14^{1−j}·σ₂ bound.
- η_0: Stieltjes gives −γ exactly ✓ (no σ₁ truncation issue!).
This eliminates mpmath zeta entirely from P2. S_f = plain Σ C(n,j)η_{j−1} (CONFIRMED correct convention — matches Lagarias λ = S_∞ − S_f + 1 with (4.11) S_∞, validated at n=2 and n=200 via E-015).
Wait, one more sanity check on the CONVENTION: S_f(200)[e011-η] = −2.14037668 matched S_∞(200)+1−λ_200(E-015) = −2.14037668 ✓✓. And E-015's λ are consistent with E-008 zero-side within tail bounds ✓. And e011-η ≡ Stieltjes-division η — which is what my fix uses for j ≤ 23 ✓. And for j ≥ 24, the zeta-formula η (with exact σ via Stieltjes-λ inversion... no — σ omitted for j ≥ 24). Is the zeta-formula right? η_j = τ_j + (−1)^{j+1}σ_{j+1} + (−1)^j (Lagarias (4.10) solved) — verified numerically: η_diag[j] ≡ η_e011[j] to ~58 digits at j=88-95 (the mpmath-58-digit ceiling) ✓ formula right. With flint ζ the formula will be accurate to 1650 digits.
Also V1 threshold: worst < 1e-40 relative — with the fixed η, errors ~10^{−145} — pass.
And P1's |R(s)| samples: used mpmath xi (complex ζ at dps 30) — OK to ~1e-10 per E-018 C2 handoff note; A_use=0.9, B0_use=1.0 with 20-30% margins — fine, keep.
Also: N_MAX = 5000 with comment "10000 costs ~2h; cached zeta/zeros make a later 1e4 rerun cheap". Keep 5000 for this run (D-037 needs the curve; the STATE says exact S_∞ to 10⁴ — hmm, task 3.7 says "Exact S_∞(n) computation n ≤ 10⁴". The script has N_MAX=5000 with a note. STATE.md said "Exact S_∞(n) computation n ≤ 10⁴" but the script comment says 5000. The previous session chose 5000 for time. Given the fix needs a rerun anyway, keep 5000 (caches make a later 1e4 extension cheap). Fine.
Implementation: modify E-021 script's P2 section. Replace tau_j/sigma machinery:
- Remove mpmath Hurwitz tau_j usage for η.
- Add: Stieltjes k=0..23 via flint.acb.stieltjes (serial, full precision), series division → η_0..23.
- η_j for j ≥ 24 from cached ζ strings: need ζ(j+1) strings — the zeta cache has j up to N_MAX = 5000; η_j needs ζ(j+1) for j+1 ≤ 5000 → j ≤ 4999 ✓ (η_{4999} is the last needed: S_f(5000) uses η_{j−1}, j ≤ 5000 → η up to η_4999, needs ζ up to ζ(5000) ✓ cache covers).
- Keep σ_m zero-side computation ONLY for the cross-check print (or drop entirely — keep σ_2 print for continuity with D-036? drop; simpler). Actually keep a small validation: compare η_j (Stieltjes) vs η_j (zeta-formula with σ from zeros, m ≤ 16) for j = 10..23 — expect agreement to ~5e-4·14^{2−j}-ish... simpler validation: print max |η_Stieltjes[j] − η_zeta[j]| for j = 24..40 where zeta-formula has σ omitted — should be ≤ 14^{1−j}·0.05. Good check that the two halves stitch.
Wait, but Stieltjes to k=23 at 1750 digits: flint.acb.stieltjes(23) at 1750 digits — how slow? E-011 did k ≤ 1000 at dps 550 in parallel (14 workers) — took some time but k ≤ 23 serial is seconds. ✓. BUT flint stieltjes at high precision: E-015 used dps 1450 for k ≤ 3000 — cost ~k³. k=23 at 1750 digits: trivial.
One question: series-division recursion at dps 1750 for k ≤ 23 — exact, fine.
Let me now also double-check the S_∞ side doesn't use mpmath zeta: P3 uses flint.arb(j).zeta() ✓ safe. P1 uses mpmath complex zeta at dps 30 — acceptable per handoff note. compute_zeros uses mp.zetazero ✓ safe.
Also the CSV/JSON outputs: the failed run's files exist; --force rerun overwrites ✓.
Let me now edit the script. I'll rewrite the P2 section:
Replace:
```
# ---- P2: eta via zero side
print("P2: eta_j via zero-side sigma ...", flush=True)
sigma, sigma_tails = sigma_sums(gam_sample)
...
eta_str[j] = mp.nstr(mp.re(tau_j(j) + (-1)**(j+1)*sig + (-1)**j), full_digits)
```
with flint-based η. Also remove tau_j/sigma_sums functions? They're used only in P2. Remove them (clean). Also gam_sample still needed for P1 (R samples). compute_zeros still needed ✓.
New P2:
```
# ---- P2: eta_j — ALL flint (mpmath zeta untrustworthy >~58 digits;
# E-021 V1 failure root cause, session 006 cont.10).
# j <= 23: Stieltjes series division (E-011 machinery).
# j >= 24: eta_j = (-1)^{j+1} [(1-2^{-(j+1)}) zeta(j+1) - 1]
# (Lagarias (4.10); |sigma_{j+1}| <= 0.05*14^{1-j} < 1.4e-28,
# impact on S_f <= C(n,j)*1.4e-28 <= 1.4e-37 — omitted).
print("P2: eta_j via flint (Stieltjes + arb zeta) ...", flush=True)
K_SPLIT = 24
flint.ctx.prec = int((full_digits + 100) * 3.33) + 200
gam_s = [mp.mpf(flint.acb.stieltjes(k).real.str(full_digits + 100, radius=False)) for k in range(K_SPLIT + 2)]
mp.mp.dps = full_digits + 100
# series division (E-011): -zeta'/zeta(1+u) = (1/u) N/D, eta_k = [u^{k+1}] N/D
N_ = [mp.mpf(0)]*(K_SPLIT+2); D_ = [mp.mpf(0)]*(K_SPLIT+2)
N_[0] = D_[0] = 1
for m in range(0, K_SPLIT+1):
D_[m+1] = (-1)**m * gam_s[m] / mp.factorial(m)
for m in range(1, K_SPLIT+1):
N_[m+1] = -(-1)**m * gam_s[m] / mp.factorial(m-1)
Ev = [mp.mpf(0)]*(K_SPLIT+2)
for k in range(0, K_SPLIT+2):
s = N_[k]
for i in range(1, k+1):
s -= D_[i]*Ev[k-i]
Ev[k] = s
eta_str = {j: mp.nstr(Ev[j+1], full_digits) for j in range(K_SPLIT)}
# j >= K_SPLIT from cached flint zeta strings
...needs zeta_mpf from P3! ORDERING PROBLEM: P2 currently runs before P3's zeta load.
```
Hmm — P2 runs before P3 in main(). The zeta cache is loaded in compute_S_inf. Restructure: load zeta strings at top of P2 (load cache directly, or move P2 after P3). Simplest: in P2, load the zeta cache JSON directly (it exists from the previous run; if not, compute_S_inf would create it — but P2 needs it BEFORE P3. If cache missing, call compute... simplest: move the zeta-string loading into a helper used by both P2 and P3. Minimal edit: in P2, if cache missing, fail with a message? No — first run ever needs to build it. Better: extract zeta-string loading/building into a function get_zeta_strings() called in P2, and compute_S_inf reuses it. But minimal-change principle: the cache already exists (previous run built it). Still, for robustness make P2 build it if missing — I'll factor a small loader.
Actually simpler: reorder — run P3's zeta load first. compute_S_inf prints "S_inf: zeta(j) via flint...". I'll restructure main() to:
1. P1 (unchanged)
2. load/build zeta strings (extracted from compute_S_inf into get_zeta_strings(n_max) returning dict; compute_S_inf takes it as arg)
3. P2 η via Stieltjes + zeta strings
4. P3 S_∞ (using strings)
5. P4, P5 unchanged
Also fix compute_Sf docstring (the wrong "plain is validated" comment — actually plain IS correct! The comment said alternating is wrong — that part is right! The bug was precision, not convention. Keep plain sum; update comment to note the mpmath-precision root cause).
Also remove sigma_sums, tau_j (unused). Update header docstring P2 description.
Precision details: full_digits = int(0.31*N_MAX)+100 = 1650. Stieltjes strings at full_digits+100 digits. Series division at dps full_digits+100. η_j (j≥24): at dps full_digits+50 from zeta_mpf parsed at full_digits+50... zeta strings have 1650 digits; parse at dps full_digits+50 = 1700 ✓; compute (1−2^{−(j+1)})·ζ − 1 at 1700 → abs error ~1e-1700·(ζ~1) ✓. Store nstr(full_digits).
Validation: stitch check j = K_SPLIT..K_SPLIT+20: η_zeta should match η_Stieltjes-extended? Can't extend Stieltjes cheaply beyond 23 — instead check against zero-side σ formula? That needs σ — dropped. Alternative check: |η_j| ~ 3^{−j}: print η_24..30 magnitudes and check |η_{j+1}/η_j| ≈ 1/3. Plus the ULTIMATE check is V1 (λ vs E-015) — that's the real validation. Also add explicit check V4: η_0 = −γ to 1e-100, η_1 = 0.18754623284... hmm η_1 known value: 0.18754623284036556... compare. Add lightweight sanity: |η_0 + γ| < 1e-1400, |η_1 − 0.187546232840365...| small — just print, don't gate.
Also update V1 print and JSON key_values to include stitch check.
Edge: flint.acb.stieltjes — E-011's worker calls flint.acb.stieltjes(k) — module-level function ✓ use that.
Now write the edits.
**ROOT CAUSE FOUND.** `mp.zeta(90, 0.5)` at dps 1700 returns only ~58 correct significant digits — the mpmath-zeta bug on this stack (mpmath 1.3 + Py 3.14) is real and hits Hurwitz zeta too. E-021's P2 computes τ_j = (−1/2)^{j+1}ζ(j+1, 1/2) via mpmath → η_j silently wrong at the 1e-58 level → the delicate binomial cancellation in S_f (terms up to 10^312 at n=5000 canceling to O(1)) explodes. The convention (plain sum) was RIGHT all along — verified: S_f(200) with flint-Stieltjes η = −2.14037668, matching S_∞(200)+1−λ_200(E-015) exactly.
Also confirmed: E-011/E-015 use flint only — ledger #3 is safe. The mpmath breakage is in E-021's P2 only.
Fix: P2 η computation goes all-flint — Stieltjes series division (E-011 machinery) for j ≤ 23, and η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1] from the cached flint ζ strings for j ≥ 24 (σ_{j+1} ~ 14^{−25} negligible there). This also eliminates the zero-truncation errors in σ (η_0 was off by 2.4e-4).
tool: Edit ok
input
{
"file_path": "D:\\Python\\Quantum\\research\\numerics\\scripts\\E-021-sinf-sf-curve.py",
"old_string": "Components:\n P1. D-036 constants: C0(t) from Trudgian; |R(s)| = |zeta'/zeta(s) -\n sum_{|gamma-t|<1} 1/(s-rho)| sampled at ~30 contour points (flint\n acb zeta + fd derivative, zeros via mp.zetazero) -> fit A, B0.\n P2. eta_j via the ZERO side (Lagarias (4.10)):\n eta_j = tau_j + (-1)^{j+1} sigma_{j+1} + (-1)^j,\n sigma_m = sum_rho rho^{-m} (zeros to T_Z = 3e4 via mp.zetazero,\n tail via Trudgian N(T) partial summation),\n tau_j = (-1/2)^{j+1} zeta(j+1, 1/2) (Hurwitz, mpmath).\n sigma_m needed only for m <= ~16 (decays 14^{1-m}); sigma_1 from\n paired zeros (absolute convergence via rho <-> 1-rho).\n P3. S_inf(n) EXACT for n <= N_MAX (Lagarias (4.11)):\n S_inf(n) = sum_{j=1}^n (-1)^j C(n,j) (1-2^{-j}) zeta*(j),\n zeta*(1) = log(4pi)+gamma, zeta*(j) = zeta(j) (flint.arb).\n Cancellation ~2^n -> dps = ceil(0.31*n) + 60.\n P4. S_f(n) = sum_{j=1}^n (-1)^{j-1} C(n,j) eta_{j-1}; lambda_n =\n S_inf - S_f + 1.",
"new_string": "Components:\n P1. D-036 constants: C0(t) from Trudgian; |R(s)| = |zeta'/zeta(s) -\n sum_{|gamma-t|<1} 1/(s-rho)| sampled at ~30 contour points (flint\n acb zeta + fd derivative, zeros via mp.zetazero) -> fit A, B0.\n P2. eta_j \u2014 ALL FLINT (session 006 cont.10 root-cause: mpmath zeta,\n Hurwitz included, silently loses accuracy beyond ~58 digits on\n this stack [mpmath 1.3 + Py 3.14] -> eta_j errors ~1e-58 ->\n S_f binomial cancellation explodes ~(4/3)^n; V1 failed 1.4e143.\n The zero-side sigma route also has eta_0 wrong by 2.4e-4 from\n sigma_1 truncation at T=5000 \u2014 both defects removed here).\n j <= 23: Stieltjes series division (E-011 machinery, validated):\n -zeta'/zeta(1+u) = (1/u) N(u)/D(u), eta_k = [u^{k+1}] N/D.\n j >= 24: Lagarias (4.10) with flint arb zeta:\n eta_j = (-1)^{j+1} [(1-2^{-(j+1)}) zeta(j+1) - 1]\n (|sigma_{j+1}| <= sigma_2*14^{1-j} < 1.4e-28, S_f impact\n <= C(5000,24)*1.4e-28 ~ 1.4e-37 \u2014 omitted).\n P3. S_inf(n) EXACT for n <= N_MAX (Lagarias (4.11)):\n S_inf(n) = sum_{j=1}^n (-1)^j C(n,j) (1-2^{-j}) zeta*(j),\n zeta*(1) = log(4pi)+gamma, zeta*(j) = zeta(j) (flint.arb).\n Cancellation ~2^n -> dps = ceil(0.31*n) + 60.\n P4. S_f(n) = sum_{j=1}^n C(n,j) eta_{j-1} (plain binomial \u2014 the\n E-011/Lagarias-(4.13) convention after the (-1) absorbed into\n the series-eta definition; VALIDATED: S_f(200) = -2.14037668\n matches S_inf(200)+1-lambda_200(E-015)); lambda_n =\n S_inf - S_f + 1."
}
result 2026-08-19 03:09:12Z → 2026-08-27 01:48:49Z
{
"filePath": "D:\\Python\\Quantum\\research\\paper\\paperA.tex",
"oldString": "\\begin{tabular}{@{}l p{4.2cm} p{2.7cm} p{2.2cm}@{}}",
"newString": "\\begin{tabular}{@{}l p{3.9cm} p{2.7cm} p{2.5cm}@{}}",
"originalFile": "% ============================================================\n% NGUYEN-RH-1 \u2014 PAPER A (split 2026-08-20, session 013, from draft.tex)\n% An explicit finite-height Li-positivity theorem, machine-verified.\n% Self-contained artifact per the session-012-end-notes review:\n% \u00a73.1 + Appendices A.1/B of the combined draft, retargeted.\n% The spectral-line material lives in paperB.tex (in preparation).\n% ============================================================\n\\documentclass[11pt]{article}\n\\usepackage{amsmath,amssymb,amsthm,mathtools}\n\\usepackage{microtype}\n\\usepackage[colorlinks=true,linkcolor=blue,citecolor=blue]{hyperref}\n\n% The prose is dense with unhyphenatable compounds (Li-positivity,\n% [proved, ...] tags). Give TeX room to spread the slack instead of\n% running past the right margin.\n\\emergencystretch=2em\n\n\\newtheorem{theorem}{Theorem}\n\\newtheorem{lemma}[theorem]{Lemma}\n\\newtheorem{corollary}[theorem]{Corollary}\n\\theoremstyle{definition}\n\\newtheorem{definition}[theorem]{Definition}\n\\theoremstyle{remark}\n\\newtheorem{remark}[theorem]{Remark}\n\n\\title{An explicit finite-height Li-positivity theorem\\\\\nwith a machine-verified assembly\\thanks{This work was produced with\nsubstantial machine assistance; see the AI Contribution Statement.}}\n\\author{Dan T Nguyen\\thanks{Independent researcher}}\n\\date{Started: 2026-08-17; revised 2026-08-26}\n\n\\begin{document}\n\\maketitle\n\n\\begin{abstract}\n[proved, conditional on computation] The Keiper--Li coefficients of the\nRiemann $\\xi$-function satisfy $\\lambda_n > 0$ for all\n$1 \\le n \\le (T_0-1)^2 \\approx 9\\times10^{24}$, conditional on the\ninterval-arithmetic verification of RH to height $T_0 = 3\\times10^{12}$\n(Platt--Trudgian) and on finite Li-coefficient computations\n(Johansson's rigorous table to $10^5$ and this project's to $3000$),\nwith every constant traced. We have found no previous explicit assembly\nof this chain in the literature; by Voros's sharpening, positivity of\nall sufficiently large $\\lambda_n$ would itself imply RH, so no result\nshort of RH can assert an infinite positive tail. Moreover the full\nreduction is machine-verified in Lean~4 (package \\texttt{NguyenRH1}):\nthe theorem is proved from exactly seven explicit perimeter inputs,\nitemized with provenance in Appendix~B --- three explicit published\nzero-counting bounds of Trudgian and four computational certificates\n(the Platt--Trudgian RH verification, Johansson's rigorous Li table,\na zero-location certificate for the low zeros, and one short-segment\ninterval constant) --- with the traced contour bound\n$|S_f(n)| \\le B(n)$ on $10^5 \\le n \\le (T_0-1)^2$ itself machine-proved\nfrom six of the seven (all but the Li table), and with axiom profile\nexactly the three standard\naxioms (\\texttt{propext}, \\texttt{Classical.choice},\n\\texttt{Quot.sound}) and no \\texttt{sorry} anywhere in the\ndevelopment's Li chain.\n\\end{abstract}\n\n\\section{Introduction}\n\nThe Riemann hypothesis (RH) asserts that every nontrivial zero of\n$\\zeta(s)$ has real part $1/2$. The strongest unconditional density\nresult to date is the (machine-verified) theorem that at least $2/3$\nof the nontrivial zeros are simple and on the critical line, and at\nleast $5/6$ of the zeros in a given range are distinct\n\\cite{anthropic2026riemann}; the underlying certificate method has a\ndocumented bandwidth-one ceiling near $0.682$ of the zeros. Two\nclassical reformulations frame most modern attacks: \\emph{Weil\npositivity} --- positivity of the Weil quadratic form on all of\n$C_c^2(\\mathbb R)$ is equivalent to RH \\cite{weil1952fonctions,\nbombieri2000weil}, and the negative index of its truncations counts\noff-line zero pairs \\cite{bombieri2000weil} --- and \\emph{Li's\ncriterion} --- $\\lambda_n > 0$ for all $n$ is equivalent to RH\n\\cite{li1997, bombieri1999lagarias}, with Voros's sharpening that\npositivity of any tail $\\{\\lambda_n\\}_{n \\ge N_0}$ already implies RH\n\\cite{voros2006sharpenings}.\n\nThis paper reports one theorem-level outcome of a systematic research\nprogram on RH: an explicit finite-height Li-positivity theorem,\nassembled with every constant traced, and with its full reduction ---\nincluding the contour estimate --- machine-verified in Lean~4 modulo a\ndeclared perimeter (computational certificates and explicit\nzero-counting bounds). A companion note (in preparation)\ncovers the spectral-line results of the same program (an exact\nfactorization on Suzuki's operator line and a valley theorem for the\nassociated model spaces). Every claim carries an explicit correctness\ntag, and every numerical input is produced by a deterministic,\narchived script.\n\n\\begin{theorem}[R-004; conditional on computation]\n\\label{thm:finite-height-li-intro}\nAssume (i) the Riemann hypothesis verified to height\n$T_0 = 3\\times 10^{12}$ (Platt--Trudgian \\cite{platt2021riemann},\ninterval arithmetic), and (ii) $\\lambda_n > 0$ for all $n \\le 10^5$\n(finite computation; Section~3, Step~5). Then the Keiper--Li\ncoefficients satisfy\n$\\lambda_n > 0$ for all $1 \\le n \\le (T_0-1)^2 \\approx 9\\times10^{24}$.\n\\end{theorem}\n\nBy Voros's sharpening, eventual positivity of all sufficiently large\n$\\lambda_n$ would itself imply RH, so a result short of RH cannot\nassert an infinite positive tail; an explicit finite-height statement\nis the natural form of partial progress on this route. The statement\nhas an unpublished precursor: Voros \\cite{voros2017li} reports an\nunpublished result of Oesterl\u00e9 \\cite{oesterle2000} that RH to height\n$T_0$ implies $\\lambda_n \\ge 0$ for $n \\le T_0^2$ (the typescript is\nuncirculated; we rely on Voros's citation and have not independently\nverified it). A published weaker form is Lagarias's window with a\n$\\log^2$ denominator (Remark~(i)). The novelty claimed here is not the\n$T^2$ scale itself but the explicit, fully constant-traced,\n\\emph{strict}-positivity assembly --- Lagarias's contour argument\n\\cite{lagarias2007li} with Trudgian's explicit zero-counting bounds\n\\cite{trudgian2014}, an elementary archimedean lower bound, a proved\nmargin convexity, the dog-leg repair of Section~\\ref{subsec:dogleg},\nand the finite verifications --- and its machine verification; that\nassembly we have found nowhere else in the literature.\n\nSection~2 recalls the certificate-method background and the sanity\ngate. Section~3 states and proves the theorem. Section~4 collects the\nobstruction analysis delimiting the method. Appendix~A describes the\nnumerical machinery; Appendix~B the formal-verification status.\n\n\\section{Background: the Weil-form certificate method}\n\nWe recall, in one paragraph, the machinery behind the state-of-the-art\ndensity theorem \\cite{anthropic2026riemann} --- the launchpad of this\nproject and the sanity gate for everything below; details follow that\npaper, and a companion note (in preparation) covers this project's own\nwork on that line. The Weil explicit formula \\cite{weil1952fonctions}\nexpresses, for a bandwidth-one test function, a quadratic form on the\nzeros as a functional of the primes; compressing it via a Gabor frame\nat the critical density yields a finite matrix identity\n$\\tilde G = P + Q$, with the prime side computed unconditionally from\nMontgomery's second moment \\cite{montgomery1973pair}. A rank--trace\ninequality converts that input into a lower bound on the number of\nsimple on-line zeros in a window, whose strength is governed by a\nwindow ratio $R(\\psi)$: $2 - R(\\psi)$ certifies $0.6725$ of zeros\nsimple and on the line and $0.83625$ distinct, and a sharpness analysis\nlocates the bandwidth-one ceiling of the method at $\\approx 0.682$ with\nstructural obstructions beyond (Section~4). One feature of this\nmachinery matters here: the certificate fails, as it must, for the\nDavenport--Heilbronn and Epstein zeta functions (which violate the\nRH-analogue); the main theorem of this paper has been required to pass\nthis gate structurally (project file D-053).\n\n\\section{The finite-height Li theorem (R-004)}\n\nLet $\\lambda_n = \\sum_{\\rho}{}'\\,\\bigl[1-\\bigl(1-\\tfrac1\\rho\\bigr)^n\\bigr]$\nbe the Keiper--Li coefficients of the Riemann $\\xi$-function. Li's\ncriterion states $\\lambda_n > 0$ for all $n \\geq 1$ if and only if the\nRiemann hypothesis holds \\cite{li1997,bombieri1999lagarias}. Voros\n\\cite{voros2006sharpenings} showed that ``$\\lambda_n > 0$ for all\n$n \\geq N_0$'' is already equivalent to RH for any $N_0$: eventual\npositivity of all sufficiently large $\\lambda_n$ would itself imply RH,\nso a result short of RH cannot assert an infinite positive tail. The\nnatural partial statement on this route is an \\emph{explicit\nfinite-height} one.\n\n\\begin{theorem}[R-004; conditional on computation]\n\\label{thm:finite-height-li}\nAssume (i) the Riemann hypothesis verified to height\n$T_0 = 3\\times 10^{12}$ (Platt--Trudgian \\cite{platt2021riemann},\ninterval arithmetic), and (ii) $\\lambda_n > 0$ for all $n \\le 10^5$\n(finite computation; Step~5). Then\n\\[\n\\lambda_n > 0 \\qquad \\text{for all } 1 \\le n \\le N_1 := (T_0-1)^2\n\\approx 9.0\\times 10^{24},\n\\]\nwith $N_1 = 8\\,999\\,999\\,999\\,994\\,000\\,000\\,000\\,001$ exactly.\n\\end{theorem}\n\nThe two assumptions displayed are the two computational certificates.\nThe formal theorem consumes five further explicit perimeter inputs ---\nzero-counting bounds, a zero-location certificate, and one interval\nconstant --- which are established published results or stand-alone\ncertificates, instantiated with provenance in Appendix~B; they enter as\nhypotheses of the Lean reduction, not as additional conjectural\nassumptions.\n\n\\begin{proof}[Proof sketch (full assembly: D-037)]\nBombieri--Lagarias \\cite{bombieri1999lagarias} give\n$\\lambda_n = S_\\infty(n) - S_f(n) + 1$ with $S_\\infty$ the archimedean\nand $S_f$ the finite-place contribution.\n\n\\emph{Step 1 (archimedean lower bound).} From Lagarias's formula\n\\cite[(4.11)]{lagarias2007li},\n$S_\\infty(n) = \\sum_{j=1}^n (-1)^j \\binom{n}{j} a_j$ with\n$a_1 = (\\log 4\\pi + \\gamma)/2$ and $a_j = (1-2^{-j})\\zeta(j)\n= \\sum_{m \\text{ odd}} m^{-j}$ ($j \\ge 2$), the $j$-sum is a finite\ndifference and one obtains the \\emph{exact} identity\n$S_\\infty(n) = (1-a_1)n - 1 + \\sum_{m \\ge 3,\\, m \\text{ odd}}\n\\bigl[(1-\\tfrac1m)^n - 1 + \\tfrac{n}{m}\\bigr]$.\nBernoulli's inequality and the explicit harmonic bounds\n$\\log M + \\gamma + \\tfrac{1}{2M} - \\tfrac{1}{12M^2} \\le H_M \\le\n\\log M + \\gamma + \\tfrac{1}{2M}$ give, for $n \\ge 20$,\n\\[\nS_\\infty(n) \\;\\ge\\; \\tfrac12 n\\log n + (C_1 - \\tfrac{\\gamma}{2})\\,n - 4,\n\\qquad C_1 = \\tfrac{\\gamma - 1 - \\log 2\\pi}{2}.\n\\]\n(Machine-validated against exact values for $20 \\le n \\le 5000$.)\n\n\\emph{Step 2 (finite-part upper bound).} Tracing Lagarias's contour\nargument \\cite[Thm~6.1]{lagarias2007li} with explicit constants\n(Trudgian's $N(T)$ and $S(T)$ bounds \\cite{trudgian2014}, partial\nfractions for $\\zeta'/\\zeta$ with the reference-point estimate\n$|R(s)| \\le 10.5\\log(|t|{+}2) + 48$ for $-5/2 \\le \\sigma \\le 3$,\n$|t| \\ge 10$ (D-056), kernel bounds $e^4+1$, a measured\nshort-segment constant $M_0 = 1.3352$) gives\n$|S_f(n)| \\le B(n)$ with\n\\[\n\\begin{split}\nB(n) =\\;& 4F(T_n) + 4T_n\\bigl[\\tfrac23 Z_2(T_n) + 10.5\\log(T_n{+}2) + 48\\bigr] \\\\\n& + 40M_0 + 2(e^4{+}1)\\,7H(T_n) + 2\\,\\mathrm{DL}(n) + I_{\\mathrm{Maj}}(n) + 1.\n\\end{split}\n\\]\nHere $T_n := \\sqrt n + 1$ is a deterministic majorant height: the\ncontour itself runs at a zero-avoiding height $\\tau_n \\in [\\sqrt n,\n\\sqrt n + 1]$, chosen by a pigeonhole on the unit-window zero count\nwith ordinate clearance $\\ge 1/(9C_0(\\sqrt n + 2))$\n(\\texttt{exists\\_zero\\_avoiding\\_T\\_wide}), and every majorant, being\nnondecreasing in the height, is evaluated at $T_n$. Further, $F$ is the\nhonest zero-count majorant (the formal\ndevelopment's mildly enlarged Trudgian shape), $Z_2(t)$ the explicit\ntwo-unit-interval zero count (including the $\\log\\log$ term),\n$H(T) = 3C_0(T)^2 + 10.5\\log(T{+}2) + 48$ with $C_0$ the unit-interval\ncount, $\\mathrm{DL}(n) = \\tfrac{\\sqrt n+1}{4}(e^{5/2}+1) + 8.38 +\n\\tfrac14 I_{\\mathrm{Maj}}(n)$ the zero-free dog-leg charge for the\nright tail, $I_{\\mathrm{Maj}}(n) = 2(\\sqrt n+1)(e^{\\sqrt n/2}+1)\\cdot\n0.57\\cdot 2^{-(2\\sqrt n-2)}$ the right-vertical majorant, and the\nfinal $1$ the trivial-zero contribution.\\footnote{\\emph{Correction\nnote} (D-071 with E-034): three further adjustments to this $B(n)$\naccount were made during the machine closure of Step 2, and the\ndisplayed formula is the corrected one; the theorem statement is\nunaffected. (i) The bridge is $4F$, not $2N$: the residue sum runs\nover both signs of $\\gamma$ (a factor-2 accounting slip in the first\ntracing). (ii) The left-vertical near-sum charges the two-unit count\n$Z_2$ (its window $|\\gamma - T| \\le 1$ spans two unit intervals), not\nthe unit-interval $C_0$. (iii) The right-vertical kernel is charged\nhonestly as $e^{1/3} I_{\\mathrm{Maj}}(n)$ (the uniform bound is\n$e^{\\sqrt n/2+1/3}+1$), the factor $e^{1/3} \\le 1.4$ being absorbed by\nthe $2\\pi$ normalization of the residue theorem. The fourth and most\nsubstantive correction --- the repair of the right-horizontal estimate\n--- is Section~\\ref{subsec:dogleg}. All are machine-verified in\n\\texttt{NguyenRH1}.}\n\n\\emph{Step 3 (bridge).} For $n \\le (T_0-1)^2$ we have\n$\\tau_n \\le \\sqrt n + 1 \\le T_0$, so by assumption~(i) every zero with\n$|\\gamma| \\le \\tau_n$ is on the line; hence\n$|1-(1-1/\\rho)^n| \\le 2$ per zero and\n$|\\lambda_n(\\tau_n)| \\le 4F(T_n)$ (the residue sum runs over both signs\nof $\\gamma$, the count majorized at $T_n$); all other contour terms are\n\\emph{unconditional}.\n\n\\emph{Step 4 (margin).}\n$\\mathrm{margin}(n) := \\tfrac12 n\\log n + (C_1 - \\gamma/2)n - 4 - B(n) + 1$\nis convex for $n \\ge 20$ (proved: chain-rule reduction to eleven\none-variable sign conditions, each discharged elementarily \u2014 D-057),\nand $\\mathrm{margin}(8\\times 10^4) = 15\\,764 > 0$ with\n$\\mathrm{margin}(10^5) > \\mathrm{margin}(8\\times 10^4)$; by convexity\n(secant slopes increase) hence\n$\\mathrm{margin}(n) > 0$ for all $n \\in [10^5, N_1]$\\footnote{The\nmargin value at $8\\times10^4$ has a documented trail: $16\\,020$ with\nthe Trudgian $F + S_b$ zero-count majorant (E-028); $15\\,764$ with the\nmildly enlarged majorant consumed by the machine verification --- a\nnegative-weight term of $F + S_b$ dropped so that every convexity\nblock has provably negative $\\psi$ (the true majorant's $\\psi$ crosses\nzero near $T \\approx 16$), at a traced cost of $\\approx 0.9\\sqrt n$,\ni.e.\\ $256$ of the $16\\,020$; and $\\ge 8\\,001$ as the certified\nrational interval lower bound that the machine discharge actually\nconsumes (\\texttt{NguyenRH1},\n\\texttt{marginTilde\\_FAlt\\_80000\\_pos}).}\n(also computed to $n = 4\\times10^5$ on a unit grid and to $N_1$ on a\nlogarithmic grid; $\\mathrm{margin}(N_1) = 2.458\\times 10^{26}$).\n\n\\emph{Step 5 (finite verification; the declared certificate\n\\texttt{LiVerifiedUpTo($10^5$)}).} The base range $n < 10^5$ is covered\nby rigorous high-precision computation of the ordinary Keiper--Li\ncoefficients. A normalization remark is required here. Johansson\n\\cite{johansson2015} tabulates the \\emph{Keiper} normalization,\ndefined by\n\\[\n\\log\\xi\\!\\left(\\frac1{1-x}\\right)\n= -\\log 2 + \\sum_{n \\ge 1} \\Lambda_n x^n,\n\\]\nwhich differs from the Li normalization $\\lambda_n$ used in this paper\nby the positive factor\n\\[\n\\lambda_n = n\\,\\Lambda_n \\qquad (n \\ge 1)\n\\]\n(equate coefficients in $x\\,\\frac{d}{dx}\\log\\xi(1/(1-x))$ and use the\nsymmetry $\\rho \\leftrightarrow 1-\\rho$ of the zero set), so positivity\nis identical in the two conventions. Johansson's table\n(interval-arithmetic error bounds throughout) gives\n$\\Lambda_1, \\dots, \\Lambda_{100000}$ all positive, matching the\nRH-true asymptotic, with $\\Lambda_{100000} = 4.6258\\ldots$ certified\nto $\\sim 2900$ digits --- i.e.\\ $\\lambda_{100000} =\n10^5\\,\\Lambda_{100000} \\approx 462\\,580.78$ in the present\nnormalization. Independently, this project verifies $\\lambda_n > 0$\nfor all $n \\le 3000$ in the Li normalization (two methods --- the\narithmetic side via Bombieri--Lagarias\nThm~2 and the zero side --- agreeing to $4.8\\times10^{-25}$ relative,\nand $\\lambda_1$ agreeing with its closed form to better than $10^{-28}$\nrelative). The crossover $N_0 = 8\\times 10^4$ is covered by a factor\n$1.25$.\\footnote{An earlier draft cited Voros's discretized Keiper--Li\ncomputations \\cite{voros2017li} (with Misguich) for this range; those\nconcern a \\emph{deformed} sequence $\\Lambda_n$, not the ordinary\n$\\lambda_n$, and the citation has been replaced by Johansson's rigorous\nordinary-$\\lambda_n$ table.}\n\\end{proof}\n\n\\subsection{Repair of the right-horizontal estimate}\n\\label{subsec:dogleg}\n\nThe geometric-decrease conclusion following\n\\cite[(6.12)]{lagarias2007li} is not implied by the displayed bounds\nwhen $T \\asymp \\sqrt n$: the per-step majorant ratio there is $e/2 > 1$\n(the zeta factor halves per unit step while the kernel ratio is $\\le e$),\nso the right-tail envelope grows like $e^{0.066\\sqrt n}$ rather than\ndecreasing ($\\sim 6\\times 10^{10}$ at $n = 10^5$ measured; E-031). In\nthe zeta specialization we replace this step by the following zero-free\ncontour deformation (D-073/D-074).\n\nKeep the residue cut at the actual contour height\n$\\tau_n \\in [\\sqrt n, \\sqrt n + 1]$ (so the bridge and the endpoint\n$N_1 = (T_0-1)^2$ are untouched) and deform only the right horizontal\nsegment $[3, 2\\sqrt n]$ at height $\\tau_n$ into a \\emph{dog-leg}: lift\nvertically from $3 + i\\tau_n$ to $3 + iU_n$ with\n$U_n := \\tfrac32\\,\\tau_n$ (the\nleft vertical), traverse horizontally at height $U_n$ (the high\nsegment), and drop back at $2\\sqrt n$ (the right vertical). The\nrectangle this traverses lies entirely in $\\Re w \\ge 3$, where $\\zeta$\nis zero-free and pole-free \\emph{unconditionally}, so Cauchy's theorem\ngives the exact identity\n\\[\nH_{\\mathrm{low}} \\;=\\; H_{\\mathrm{high}} - V_{\\mathrm{right}} +\n V_{\\mathrm{left}}\n\\]\n(\\texttt{upper\\_right\\_horizontal\\_eq\\_dogleg} in the formal\ndevelopment). Each dog-leg piece has an honest bound, charged at the\nmajorant height $T_n$: the left vertical has length\n$\\tau_n/2 \\le (\\sqrt n + 1)/2$ and\ncontributes $\\le \\tfrac{\\sqrt n + 1}{4}(e^{5/2}+1)$; the high\nsegment contracts geometrically (the repaired stepping ratio\n$q = e^{4/9}/2 < 1$, certified) and contributes $\\le 8.38$; and the\nright vertical is exponentially small, $\\le \\tfrac14 I_{\\mathrm{Maj}}(n)$.\nThe charge replacing the broken ``$3.3$'' is therefore\n$\\mathrm{DL}(n) = \\tfrac{\\sqrt n + 1}{4}(e^{5/2}+1) + 8.38 +\n\\tfrac14 I_{\\mathrm{Maj}}(n)$ per side, with the margin essentially\nunchanged (margins $13\\,160$ / $88\\,911$ / $2.458\\times10^{26}$ at\n$8\\times10^4$ / $10^5$ / $N_1$). We record for completeness that the\nper-side bound at $T = \\sqrt n$ appears to hold empirically by a strong\nhidden cancellation (E-032: true-integral to envelope ratio down to\n$5.6\\times10^{-10}$); whether that cancellation admits a proof is an\nopen question we do not rely on.\n\n\\begin{remark}\n(i) Using Lagarias's printed bridge window $n \\le T^2/(4\\log^2 T)$\ninstead of the traced proof gives the conservative\n$N_1^* = 2.73\\times 10^{21}$; the theorem is robust either way.\n(ii) The traced worst-case bound $|S_f|$ is $\\sim 170\\times$ loose\nagainst the measured curve ($|S_f| \\le 13.52$ for $n \\le 5000$); the\nslack is structural to contour constants, not a gap.\n(iii) The dependence on computation is explicit and checkable:\nPlatt--Trudgian's interval-arithmetic verification of RH\n\\cite{platt2021riemann} and Johansson's rigorous ordinary-$\\lambda_n$\ntable \\cite{johansson2015}, supplemented by this project's independent\nverification to $n \\le 3000$ (E-011/E-015).\n\\end{remark}\n\n\\section{Obstruction analysis}\n% Documented dead ends from research/graveyard/ where they\n% delimit the method (contributes to success criterion 4).\n\nThe following routes are closed with documented obstructions\n(full files in the project archive: graveyard G-001--G-003;\nderivations D-009--D-031):\n\\begin{itemize}\n\\item \\emph{Certificate extension past $2/3$ in the bandwidth-one\nframework} (Track A): a six-wall map (D-013) shows $>2/3$ is\nimpossible within the current data class; the window-class optimum is\nsaturated in both the $\\xi$ and $\\xi'$ worlds (D-009, D-030), and\nmoment-ladder certificates cap below $2/3$ at every order (G-002).\n\\item \\emph{Multiple-zero bounds as chain input} (G-001): the\n$s_2/p$ substitution symmetry makes depth$\\to$0 off-line pairs\nindistinguishable from double zeros in all two-moment data.\n\\item \\emph{Density theorems $\\to$ de~Bruijn--Newman $\\Lambda$}\n(G-003): one-sided information \u2014 density theorems lower-bound the\non-line fraction while $\\Lambda$ requires an upper bound on the\ncomplex fraction.\n\\item \\emph{$\\xi^{(k)}$-certificate routes} (T4/T4b, D-022, D-031):\nthe strength mechanism (a perfect-square node in the diagonal law)\ndoes not transfer to $\\xi$, and the $s_2/p$ symmetry caps every\nderivative class below $100\\%$.\n\\end{itemize}\n\n\\appendix\n\\section{Numerical experiments}\n% Tables/figures generated from research/numerics/data/ CSVs.\n\nAll experiments are deterministic scripts with CSV+JSON sidecars in the\nproject archive (\\texttt{research/numerics/}); checks as stated.\n\n\\subsection{Li-coefficient machinery (E-011/E-015/E-021/E-023)}\n\\begin{itemize}\n\\item $\\lambda_n > 0$ verified for $n \\le 3000$ in the Li normalization\nof Section~3 from the arithmetic\nside (Bombieri--Lagarias Thm~2, zero-free; \\textsc{flint} Stieltjes +\nArb $\\zeta$, 1000--1450-digit working precision), cross-validated\nagainst the zero-side computation (agreement $4.8\\times10^{-25}$\nrelative) and $\\lambda_1$ agreeing with its closed form to better\nthan $10^{-28}$ relative.\n\\item Exact archimedean part: $S_\\infty(n) = \\tfrac12 n\\log n + C_1 n\n- \\tfrac14 - \\tfrac{1}{24n} + o(1/n)$ measured to $n = 5000$\n($c_0 = -1/4$ identified exactly; residuals match $-1/4 - 1/(24n)$ to\nall printed digits), and $|S_f(n)| \\le 13.52$ for $n \\le 5000$\n(max at $n = 3298$) vs the traced worst-case $\\sim 2280$ there \u2014\nthe contour constants are $\\sim 170\\times$ loose, as documented.\n\\item Margin assembly (E-028, fully traced constants $A = 10.5$,\n$B_0 = 48$): crossover at $n = 75\\,451$; adopted $N_0 = 8\\times10^4$\nwith margin $16\\,020$ and positive derivative ($15\\,764$ with the\nformal development's majorant --- Step-4 footnote); convexity proved\n(D-057) and grid-confirmed to $N_1 \\approx 9\\times10^{24}$;\n$\\mathrm{margin}(N_1) = 2.458\\times10^{26}$. (First-estimate\nconstants $2/2$: crossover $32\\,871$; measured $0.9/1.0$: $30\\,217$.)\n\\end{itemize}\n\n\\section{Formal verification}\n\nThe inherited density theorem \\cite{anthropic2026riemann} is formally\nverified in Lean~4 (repository \\texttt{zeta-23-lean}, tag v1.0); this\nproject performed a full \\texttt{lake} rebuild (9010 jobs) and a live\n\\texttt{\\#print axioms} audit of all comparator statements, confirming\nthe published axiom profile verbatim: no axioms beyond \\texttt{propext},\n\\texttt{Classical.choice}, and \\texttt{Quot.sound}, with \\texttt{sorry}\noccurring only in the trusted challenge-statement stubs.\n\nThe new result of this paper is formalized in the companion\npackage \\texttt{NguyenRH1} (same toolchain, path-linked to the vendored\n\\texttt{zeta-23-lean} and its \\textsc{Mathlib} build; no new axioms are\nintroduced anywhere). The first tier is complete: the archimedean lower\nbound for $S_\\infty(n)$ and the margin convexity are machine-proved\n(\\texttt{sInfty\\_lower\\_bound}, \\texttt{marginTilde\\_convex}, and the\nchain-rule identity \\texttt{chain\\_rule\\_sqrt\\_shift}), each with axiom\nprofile exactly the three standard axioms above. A design note on the\nconvexity proof: the pen-and-paper argument uses eleven one-variable\nsign conditions, but the Lean development proves an eight-block\n$\\psi$-table plus a separate analytic bound for the $I_I$ term\n($\\widetilde B_4$); the divergence from the eleven-row table is that\n$\\widetilde B_4$ is not concave, so it is excluded from the $\\psi$\nmachinery and bounded directly. That direct bound is itself a worked\nexample of this project's measured-to-traced conversion: the grid\ncheck of E-029 (maximum $2n\\,|\\widetilde B_4''(n)| = 0.189$ on\n$[20, 10^4]$, with the decay argument covering the tail) is superseded\nby a fully analytic factor-monotonicity proof of the sufficient\ninequality $\\widetilde\\psi''(s) - \\widetilde\\psi'(s)/s \\le 1.316 < 2$\nfor $s \\ge \\sqrt{20}$, i.e.\\ $\\widetilde B_4''(n) < 1/(2n)$ for all\n$n \\ge 20$ (\\texttt{iimaj\\_bracket\\_bound},\n\\texttt{IIMaj\\_deriv2\\_lt}).\n\nThe second tier is complete; the named analytic hypothesis is\ndischarged. The traced contour bound $|S_f(n)| \\le B(n)$ of Section~3\n(\\texttt{SfBoundProp}) is machine-proved (tier ii$'$), so the closed\nheadline theorem is machine-proved from exactly seven named hypotheses.\nIts final signature, copied verbatim from the development\n(\\texttt{LiClosed.lean}), is\n\\begin{quote}\\ttfamily\\upshape\\small\ntheorem lambda\\_pos\\_finite\\_height\\_closed\\\\\n\\hspace*{2em}(hRH : RHUpTo (3 * 10 \\^{} 12))\\\\\n\\hspace*{2em}(hfinite : LiVerifiedUpTo (10 \\^{} 5))\\\\\n\\hspace*{2em}(hZC : ZeroCountProp) (hZC2 : ZeroCountProp2)\\\\\n\\hspace*{2em}(hZCG : ZeroCountGlobalProp) (hNLZ : NoLowZeros)\\\\\n\\hspace*{2em}(hMZ : MZeroProp) :\\\\\n\\hspace*{2em}$\\forall$ n : $\\mathbb{N}$, 1 $\\leq$ n $\\to$ (n : $\\mathbb{R}$) $\\leq$ (3 * 10 \\^{} 12 $-$ 1) \\^{} 2 $\\to$\\\\\n\\hspace*{2em}0 $<$ (liCoeff n).re\n\\end{quote}\nAll seven hypotheses are trusted inputs --- assumed in the development,\nnot proved within it; every other step of the proof is machine-checked.\nTheir provenance is itemized in the following table.\n\\begin{center}\\scriptsize\n\\setlength{\\tabcolsep}{3pt}\n\\begin{tabular}{@{}l p{4.2cm} p{2.7cm} p{2.2cm}@{}}\n\\hline\nHypothesis & Statement & Source & Status \\\\\n\\hline\n\\texttt{RHUpTo} & $\\operatorname{Re}\\rho = 1/2$ for all zeros with\n $|\\gamma| \\le 3\\times10^{12}$ &\n Platt--Trudgian \\cite{platt2021riemann}, interval arithmetic &\n computational certificate \\\\\n\\texttt{LiVerifiedUpTo} & $\\lambda_n > 0$ for $1 \\le n \\le 10^5$ &\n Johansson \\cite{johansson2015} (Step-5 normalization); this project\n to $n \\le 3000$ (App.~A) & computational certificate \\\\\n\\texttt{ZeroCountProp} & unit-window zero count $\\le C_0(t{+}1)$,\n $t \\ge 2$ & Trudgian \\cite{trudgian2014} &\n published explicit bound \\\\\n\\texttt{ZeroCountProp2} & two-unit zero count $\\le 0.6\\log(t{+}2) +\n 0.886\\log\\log(t{+}2) + 2.7$, $t \\ge 10$ &\n Trudgian \\cite{trudgian2014} & published explicit bound \\\\\n\\texttt{ZeroCountGlobalProp} & global zero count $N(T) \\le F(T)$,\n $T \\ge 2$ & Trudgian \\cite{trudgian2014} (enlarged majorant) &\n published explicit bound \\\\\n\\texttt{NoLowZeros} & $|\\gamma| \\ge 14$ for every nontrivial zero &\n Platt--Trudgian zero-location stage \\cite{platt2021riemann}\n (see below) & computational certificate \\\\\n\\texttt{MZeroProp} & $|\\zeta'/\\zeta(-\\tfrac52 + it)| \\le 1.3352$ for\n $|t| \\le 10$ & this project (E-023), interval arithmetic &\n computational certificate \\\\\n\\hline\n\\end{tabular}\n\\end{center}\nOne row deserves a comment. \\texttt{NoLowZeros} is logically separate\nfrom \\texttt{RHUpTo}: it asserts a location fact about the low zeros,\nnot RH on an initial segment. Its provenance is the zero-location stage\nof the Platt--Trudgian computation, which isolates every zero up to the\nverification height by the Riemann--Siegel formula and confirms the\ntotal count by Turing's method, finding the lowest zero at\n$\\gamma_1 = 14.134725\\ldots$ \\cite{platt2021riemann}; hence no\nnontrivial zero has $|\\gamma| < 14$. \\texttt{MZeroProp} is a grid\nevaluation with a sampled-Lipschitz margin of safety $\\times 2$\n(E-023), in the same interval-arithmetic trust class.\n\nThe proof of \\texttt{SfBoundProp} contains the full complex-analytic\ncontent of Step 2, in the dependency chain\n\\begin{center}\n\\begin{tabular}{c}\npartial fractions \\\\\n$\\downarrow$ \\\\\n$S_f = \\operatorname{Res}_1$ \\\\\n$\\downarrow$ \\\\\nrectangle identity \\\\\n$\\downarrow$ \\\\\nfour side bounds \\\\\n$\\downarrow$ \\\\\n\\boxed{\\texttt{sfBoundProp}} \\\\\n$\\downarrow$ \\\\\n\\boxed{\\texttt{lambda\\_pos\\_finite\\_height\\_closed}}\n\\end{tabular}\n\\end{center}\nwith named capstones \\texttt{rectInt'\\_Jlag} (meromorphic residue\nmachinery on rectangles), \\texttt{partialFraction\\_identity} (the\npartial-fraction identity for $\\zeta'/\\zeta$),\n\\texttt{logDeriv\\_riemannZeta\\_sub\\_nearZeros\\_le\\_tight} (the\nreference-point bound $|R(s)| \\le 10.5\\log(|t|{+}2) + 48$),\n\\texttt{sf\\_eq\\_resW1} (the exact identity\n$S_f(n) = \\mathrm{Res}_1(n)$),\n\\texttt{upper\\_right\\_horizontal\\_eq\\_dogleg} and the\n\\texttt{LiDogLeg} bounds (Section~\\ref{subsec:dogleg}),\n\\texttt{LiSideBounds} (the four side bounds), and the fold\n\\texttt{sfBoundProp}. The two elementary evaluations of the explicit\nmargin function that the assembly consumes\n($\\mathrm{margin}(8{\\cdot}10^4) > 0$ and\n$\\mathrm{margin}(10^5) > \\mathrm{margin}(8{\\cdot}10^4)$) are discharged\nin the development itself, by certified rational interval bounds on\n$\\log$, $\\exp$, and $\\sqrt{\\cdot}$ (\\texttt{LiBasePoints.lean}). The\nmargin majorant in the development is a mildly enlarged Trudgian-shape\nfunction (a negative-weight term dropped, at a cost of $\\approx\n0.9\\sqrt n$ in the bound) chosen so that every convexity block has\nprovably negative $\\psi$; the axiom profile is unchanged --- the three\nstandard axioms, no \\texttt{sorryAx}, audited declaration-by-declaration\non the full chain.\n\nThe finite-height Li theorem remains, by design, \\emph{conditional} on\nits declared perimeter: the four computational certificates of the\ntable above (the Platt--Trudgian verifications, the Li tables, the\nzero-location certificate, and the interval constant) and the three\nexplicit published zero-counting bounds \\cite{trudgian2014}. The\nformal reduction leaves exactly those seven inputs as trusted, which we\nregard as the honest formal target: every other step of the proof is\nmachine-checked.\n\n\\section*{AI Contribution Statement}\nThis research was conducted with substantial assistance from two AI\nsystems: Kimi K3 (Moonshot AI), operated through the Claude Code\nharness (Anthropic), over an archived series of research sessions\n(project ledger: sessions 001--041). Machine contributions included:\nderivation drafting and constant-tracing (D-036/D-037/D-056/D-057),\nthe Lean~4 formalization of the Li chain (package \\texttt{NguyenRH1}:\n\\texttt{sInfty\\_lower\\_bound}, \\texttt{marginTilde\\_convex},\n\\texttt{lambda\\_pos\\_finite\\_height\\_verified},\\\\\n\\texttt{sfBoundProp}, \\texttt{lambda\\_pos\\_finite\\_height\\_closed}),\nthe numerical experiment suite (E-001--E-034), and adversarial\nself-audit (D-060: four independent audit instances, $\\sim$55 claims\nchecked, 10 corrections filed; D-071/D-072/D-074: four further\n$B(n)$-account corrections found and repaired during the machine\nclosure). All research direction, verification decisions,\nperimeter declarations, and final approval are the responsibility of\nthe human author, who serves as guarantor of the work. All\nmachine-produced mathematics was validated by machine-checked proof\n(Lean~4, axiom profiles as stated in Appendix~B), by cross-validated\ndeterministic computation, or is explicitly tagged otherwise in the\ntext. Session logs and audit trails are preserved in the project\narchive.\n\n\\section*{Acknowledgments}\nThe author thanks Moonshot AI (Kimi K3) and Anthropic (the Claude Code\nharness) for making their systems available for research use. The\nsubstantive record of machine assistance is the AI Contribution\nStatement above.\n\n\\bibliographystyle{plain}\n\\bibliography{references}\n\\end{document}\n",
"structuredPatch": [
{
"oldStart": 480,
"oldLines": 7,
"newStart": 480,
"newLines": 7,
"lines": [
" Their provenance is itemized in the following table.",
" \\begin{center}\\scriptsize",
" \\setlength{\\tabcolsep}{3pt}",
"-\\begin{tabular}{@{}l p{4.2cm} p{2.7cm} p{2.2cm}@{}}",
"+\\begin{tabular}{@{}l p{3.9cm} p{2.7cm} p{2.5cm}@{}}",
" \\hline",
" Hypothesis & Statement & Source & Status \\\\",
" \\hline"
]
}
],
"userModified": false,
"replaceAll": false
}
raw content_json (database row)
[{"type":"thinking","thinking":"FOUND IT!!!\n\n`mp.zeta(90, 0.5)` at dps 1700 returns: 1237940039285380274899124224.**00000000000000014183606858897689**\n\nLook at that value: integer part 1237940039285380274899124224 = 2^90 = 1237940039285380274899124224 EXACTLY. Then fractional part 0.00000000000000014183... The true ζ(90, 0.5) = Σ (m+0.5)^{−90} = 2^90·(1 + (2/3)^90·... )... wait: (m+1/2)^{−90} for m=0: 2^90. m=1: (3/2)^{−90} = 2^90/3^90 = 2^90·3^{−90} = 1.24e27·8.7e-43·... = tiny. So fractional part ~ 2^90·3^{−90}·(1+...) ≈ 1.4e-16·... The displayed fraction .000000000000000141836... hmm that looks plausible actually (2^90·3^{−90} = 1.2379e27·8.7279e-43·... wait 3^90 = 8.7279e42, so 2^90/3^90 = 1.2379e27/8.7279e42 = 1.419e-16 ✓ matches the .1418e-15 fraction ✓).\n\nSo zeta(90, 0.5) is computed CORRECTLY. Note the value at dps 300 vs dps 1700 are IDENTICAL strings — meaning mpmath CACHED the value... or the fractional digits beyond a point are wrong-but-cached. eta_d[89] vs eta_fresh identical → same cached value reused ✓ deterministic.\n\ndiff = 6.78e-58 — the REAL diff between flint-Stieltjes η_89 and mpmath-τ η_89. So eta_d[89] is wrong at ~6.8e-58 (relative 6e-15 of η_89 = 1.1e-43; i.e., mpmath τ_89 accurate to ~57 significant digits of the SMALL part, i.e., ζ(90,0.5) accurate to absolute ~10^{27−57−... }). Hmm: η_89 = (−1)^{90}[τ + 1] with τ = −2^{−90}ζ(90,0.5). η error 6.8e-58 → τ error 6.8e-58 → ζ error = 6.8e-58·2^90 = 8.4e-31. In units of the displayed value (1.2e27): relative 6.8e-58·2^90/1.24e27 = 6.8e-58... i.e., ζ(90,0.5) accurate to ~58 SIGNIFICANT digits (10^{27}·10^{−58} = 8.4e-31 ✓). 58 digits ≈ ... where does 58 come from? dps 1700 → error should be 10^{−1700}·1e27 = 1e-1673. NOT 1e-31. So mpmath's Hurwitz zeta at dps 1700 is only accurate to ~58 digits!!! THE MPMATH ZETA BUG IS REAL — but it's ~58 digits, not 16-19.\n\nHmm interesting: 58 digits... The fractional part .00000000000000014183606858897689: 1.4183606858897689e-16. True 2^90·(3^{−90} + 5^{−90}·...): 3^{−90}·2^90 = (2/3)^90 = 1.41835e-16? (2/3)^90: log10 = 90·(−0.17609) = −15.848 → 1.4184e-16 ✓. And next term (2/5)^90 = 10^{−35.8}. So the fraction beyond ~16 digits is ~1e-36 — mpmath printed ...14183606858897689: digits after 1.4184e-16: 3606858897689e-31 — hmm the (2/5)^90 term = 2.5e-36, and (2/7)^90 ~ 1e-49... so the fraction's digits 3606858897689 at 1e-31 scale — mpmath might have those wrong. Whatever — the point is mpmath Hurwitz zeta breaks at ~58 digits.\n\nAnd in the earlier DIFF runs: why did they print 3.5e-102?! The diff runs subtracted at dps 100... eta_e (dps-150 content) ROUNDED to dps 100 = 100 significant digits: eta_e[89] rounded to 100 sig digits ≈ accurate to 1e-43·1e-100 = 1e-143. eta_d[89] content: computed at dps 100 addition from dps-1700 tau — content ~100 sig digits with error 6.8e-58. diff at dps 100: |1.1e-43 values, difference 6.8e-58| — representable, should print 6.8e-58!!! IT PRINTED 3.5e-102. WHY?!\n\nOH MY GOD. I bet mp.nstr or the subtraction... wait. In the FIRST diff run and diag3, the diffs printed ~1e-102 — but just now, same computation at dps 300 printed 6.78e-58. The difference: dps at subtraction time (100 vs 300)! At dps 100: eta_e[89] (150-digit content) gets rounded to 100 digits: 1.14574263767131308339251462596489268573709446921740912101498e-43 → 100 sig digits: chop at ...40912101498 (that's already ~89 digits) → to 100 digits appends nothing meaningful — the mpf holds 89+ sig digits exactly... rounding to dps 100 keeps its first 100 sig digits — the value has ~89 digits, so NO rounding. eta_d[89] holds ~89 digits too (1.14574263767131986428001632534171267967813299191953069549961e-43: count: ~89 chars). Both fully representable at dps 100. Their difference 6.78e-58 representable. So dps-100 subtraction should give 6.78e-58. But it printed 3.5e-102!!\n\nUNLESS the subtraction at dps 100 did something else... you know what, maybe in the earlier runs the eta_d values were DIFFERENT because the dps-switching HISTORY differed (the loop ran j=0..210 with zeta caches built along the way at various dps). mpmath zeta caching keyed by value, not precision → in the full loop, zeta(90, 0.5) might have been cached at a DIFFERENT precision context... Actually here's the thing: in this last script, KMAX=95, and eta_fresh recomputation at dps 1700 gave the SAME digits → cache consistent within this run.\n\nWhatever the micro-cause (mpmath cache/precision handling bugs on Py 3.14), the MACRO conclusion is now solid:\n\n**ROOT CAUSE: mpmath's mp.zeta (Hurwitz and likely integer) on this stack (mpmath 1.3 + Py 3.14) is accurate only to ~58 digits (at least for large s), silently.** The E-021 script computes τ_j = (−1/2)^{j+1}ζ(j+1, 1/2) via mpmath — the η_j errors ~|τ|·10^{−58}·(cancellation-independent, absolute ~10^{−58}·2^{j+1}/2^{j+1} = ...) — wait: ζ(j+1,0.5) error ~ 2^{j+1}·10^{−58} → τ error ~ 10^{−58}·(constant!). Then S_f error ~ Σ C(n,j)·10^{−58} ~ 2^n·10^{−58}: n=200 → 10^{60−58} = 10^2 ~ matches observed 76682?? order 10^{4.9} vs 10^2 — same ballpark (errors not worst-case aligned). n=500: 10^{150−58} = 10^{92}?? observed 10^{60}. Hmm — bigger than observed again. But maybe the \"58 digits\" grows with s... At j=89: error in ζ ~ 8.4e-31 = 10^{27−58}; relative to ζ ~ 10^{−58}. At larger j, maybe relative error stays ~10^{−58}: τ error ~10^{−58} constant. S_f(500) predicted ≤ 10^{92}, observed 10^{60} — off by 10^{32}, and observed per-term ~10^{−90}: so errors DECAY with j?! Maybe mpmath error is ~10^{−58} RELATIVE to the small part... η_j error ~3^{−j}·10^{−58}: Σ C(n,j)3^{−j}10^{−58} = (4/3)^n·10^{−58}: n=500: 10^{62−58} = 10^4?? observed 10^{60}. No.\n\nHonestly the exact error law doesn't matter for the FIX. What matters:\n\n**THE FIX: do not use mpmath zeta at all. Compute η_j via flint only:**\n- Option A (best): η_j via the E-011 Stieltjes-division machinery (flint.acb.stieltjes) — but that needs Stieltjes to k=5000 (expensive: E-015 did 3000 in hours; stieltjes cost ~k³ per memory note → k=5000 ~ 4.6× cost of 3000 — too slow for now).\n- Option B: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] with ζ(j+1) from FLINT arb (fast, rigorous, E-011-validated) — the small part computed with 0.48j-digit cancellation, so use dps = 0.31·N_MAX + 0.48·j + margin... Actually (1−2^{−s})ζ(s) − 1 at s = j+1: value ~3^{−(j+1)}; ζ(s) ~ 1+2^{−s}: need ζ(s) to absolute accuracy ≪ 3^{−s}: flint arb at working precision W digits gives absolute error ~10^{−W}: need W > 0.48j + desired_accuracy. For S_f to n=5000 with error < 10^{-30}: need η_j absolute error < 10^{−30}/2^n·... hmm total budget: Σ C(n,j)δ_j < 10^{−30} → δ_j < 10^{−30}/2^n ~ 10^{−30−0.301n} — at n=5000: 10^{−1535}. And W > 0.48j + 1535. At j=5000: W > 3935. Hmm, large but flint arb zeta is FAST (E-011 used it). Actually, better: for large j, compute the small part DIRECTLY as a series: Σ_{m≥3 odd?} — (1−2^{−s})ζ(s) − 1 = Σ_{m≥3} m^{−s} − 2^{−s}ζ(s)... hmm that's Σ over odd m≥3: Σ_{k≥1}(2k+1)^{−s}: for s ≥ 30, = 3^{−s}(1 + (3/5)^s + (3/7)^s + ...): first term dominates; sum ~3^{−s}(1+ε). Direct evaluation with flint: a handful of terms at modest precision. NO CANCELLATION. \n\n- Option B': η_j = (−1)^{j+1}[Σ_{k≥1}(2k+1)^{−(j+1)} + σ_{j+1}] — direct odd-reciprocal power sum (τ's small part is exactly Σ_{k≥1}(2k+1)^{−(j+1)} per Lagarias's Remark: τ_n = (−1)^{n+1}Σ_{m≥0}(2m+1)^{−(n+1)}; subtract (−1)^{n+1}·1 = the m=0 term). So η_j = (−1)^{j+1}[Σ_{m≥1}(2m+1)^{−(j+1)} + σ_{j+1}]. For j ≥ 20: sum = 3^{−(j+1)} + 5^{−(j+1)} + 7^{−(j+1)} + ... converges in ~j/2 terms to any precision, trivially with mpmath mp.power at dps 100. NO big-number cancellation at all! And σ_{j+1} for j+1 ≤ 16 from zeros (as now), else 0 (|σ| ≤ σ₂·14^{1−j} — wait for j+1 > 16: |σ_{j+1}| ≤ Σ|ρ|^{−(j+1)} ≤ σ₂·(1/14.13)^{j−1} < 10^{−18} for j ≥ 16 — hmm at j=16: σ₂·14^{−15} = 0.046·7.2e-18 = 3.3e-19. negligible vs η_16 ~ 3^{−17} = 1.3e-8? Yes negligible.)\n\nThis is clean, fast, and avoids both mpmath-zeta and the cancellation. For j ≤ 20 use flint for τ... actually use the direct sum for ALL j: Σ_{m=1}^{M}(2m+1)^{−(j+1)}: at j=0: Σ (2m+1)^{−1} DIVERGES! τ_0 is special (has the log term) — keep j=0 as-is (τ_0 = −(log4π+γ)/2 exact, no mpmath zeta). For j ≥ 1 the series converges; for small j (j=1: Σ(2m+1)^{−2} converges like 1/m² — need many terms for high precision! Σ_{m>M}(2m+1)^{−2} ~ 1/(2M): for 1650 digits need M ~ 10^{1650} — IMPOSSIBLE for small j. So for small j use the closed form: Σ_{m≥1}(2m+1)^{−s} = (1−2^{−s})ζ(s) − 1 — with flint arb zeta (rigorous, fast) — cancellation 0.48j digits, affordable for small j (j ≤ 100: 48 extra digits). Strategy:\n- j = 0: η_0 = −γ − σ_1 + 1 + τ... just η_0 = τ_0 − σ_1 + 1 with τ_0 = −(log4π+γ)/2 (no zeta).\n- 1 ≤ j ≤ J_SPLIT (~50): η_j = (−1/2)^{j+1}ζ(j+1,1/2)... OR (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] with ζ via FLINT at dps = full_digits + 0.48j + margin (0.48·50 = 24 extra digits — trivial).\n- j > J_SPLIT: direct odd-power series Σ_{m=1}^{M}(2m+1)^{−(j+1)} truncated when term < 10^{−(digits+10)}; each term via mp.power (exact-ish) — fast.\n\nWait, actually for ALL j ≥ 1, can use flint: (1−2^{−(j+1)})ζ(j+1) − 1 with ζ from flint.arb — cancellation 0.48j digits at j=5000 = 2400 digits on top of 1650+ = ~4100 digits total. flint arb zeta at 4100 digits for 5000 values — E-011 did 2000 zetas at 1000+ digits quickly (arb zeta is fast). Hmm, but simpler & cheaper: hybrid split at J_SPLIT=40: direct series beyond 40 (at j=40: 3^{−41} ~ 1.5e-20, need terms m=1..M with (2M+1)^{−41} < 10^{−1660}: M ~ ... (2M+1)^41 > 10^{1660} → 2M+1 > 10^{40.5} — HUGE M?! No wait — I need the SUM to 1650 digits ABSOLUTE: terms after m=M contribute < (2M)^{−j}: for j=41, (2M)^{−41} < 10^{−1660} → M ~ 10^{40}/2 — impossible!! Hmm no: absolute accuracy needed for η_40 is NOT 10^{−1660} — the S_f error budget per term: C(n,j)·δ_j with C(5000, 41) ~ 5000^41/41! ~ 10^{110}. δ_40 < 10^{−30}/10^{110} = 10^{−140}. So η_j accuracy requirements depend on j: δ_j ≲ 10^{−30}/C(n_max, j). For j ~ n/2 (max C): 10^{−1530}. For j=40: 10^{−140}. Direct series for j=40 to 140 absolute digits: terms (2m+1)^{−41}: 3^{−41} = 1.5e-20; need tail < 10^{−140}: (2M+1)^{−41}·(2M+1)/40 < 10^{−140} → (2M+1)^{−40} ≲ 10^{−140} → 2M+1 ≳ 10^{3.5} = 3162. M ~ 1600 terms at 200 digits — trivial! And for j=2500 (max C): δ needed ~10^{−1530}: 3^{−2501} = 10^{−1194} — SMALLER than required accuracy!!! η_2500 itself (~10^{−1194}) is below the accuracy floor — can set η_j = 0 for j where 3^{−j}·C(n_max,j) < 10^{−40}! log10 C(5000,j) + log10 3^{−j}: max of C at j=2500: 1505; 3^{−2500} = 10^{−1193}: product 10^{312} — NOT negligible!! So η_j matters to full accuracy ~10^{−1530} at j=2500, where η_j ~ 10^{−1193}: relative accuracy 10^{−337}. Direct series: 3^{−2501}(1 + (3/5)^{2501} + ...) — the tail after m=1: (5)^{−2501} = 10^{−1749} — negligible vs 10^{−1530}... need (2m+1)^{−2501} < 10^{−1530}: 2m+1 > 10^{0.61} = 4.1: m ≥ 2 suffices! For large j only a FEW terms needed. \n\nSo the direct-series approach works for all j ≥ J_SPLIT with M(j) small for large j. And the split: for j ≤ J_SPLIT use flint zeta with +0.48j digits (cheap since J_SPLIT small, say 100: flint zeta for 100 values at 1800 digits — seconds).\n\nActually — EVEN SIMPLER: use flint for everything via the same formula: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] with ζ from flint.arb at working precision W_j = full_digits + 0.48·j + 50 (string precision per j). flint arb zeta at ~4000 digits max — is flint zeta fast at 4000 digits? E-021's P3 already computed ζ(j) for j ≤ 5000 at 1650 digits via flint — it did (zeta cache!). But the cancellation needs EXTRA 0.48j digits — recompute zeta strings at precision (0.31·N_MAX + 0.48·j + 100). Total cost similar to P3 (~few minutes). This avoids hybrid complexity. flint is VALIDATED (E-011). \n\nHmm wait — but does (1−2^{−s})ζ(s)−1 via flint at W digits give absolute error ~10^{−(W−0.48j)}? ζ(s) ~ 1: flint computes to W sig digits → absolute error 10^{−W} (value ~1). The subtraction (1−2^{−s})ζ(s) − 1 ~ 3^{−s}: result error ~10^{−W} → relative error 10^{−W}/3^{−s} = 10^{−W+0.48s}. With W = 1650 + 0.48j + 50: relative 10^{−1700}. \n\nSo the FIX for E-021 P2: replace tau_j (mpmath Hurwitz) with flint-based computation of η_j directly:\nη_0 = −(log4π+γ)/2 − σ_1 + 1\nη_j = (−1)^{j+1}·[(1−2^{−(j+1)})·ζ_flint(j+1) − 1 + σ_{j+1}], j ≥ 1\nwith ζ_flint strings at precision scaling 0.48j + base.\n\nAlso NOTE: the same mpmath-zeta issue affects... E-021's P1 uses xi_mp with mp.zeta (complex s) at dps 30 — \"mpmath complex-ζ OK to ~1e-10 (E-018 C2)\" per handoff — P1's |R| sampling is robust (A_use/B0_use have 20-30% margins). Fine.\n\nAlso mpmath zeta appears in E-011's arb_zetas? No — E-011 used flint.arb(j).zeta() ✓. E-015 same ✓. So E-011/E-015 results are SAFE. The mpmath-Hurwitz usage in E-021 P2 is the only place. GOOD — ledger #3 stands.\n\nAlso: the σ_m computed from 7900 zeros via mpc at dps 50-100 — mpmath POWER r**(-m) — plain arithmetic, fine.\n\nHmm, one more check — \"58 digits\": let me characterize the mpmath bug a bit for the record (it contradicts/extends the memory note \"16-19 digits\"): zeta(90, 0.5) at dps 1700 accurate to ~58 sig digits. Actually the memory note says E-011 found mp.zeta broken beyond ~16-19 digits; here we see ~58 at dps 1700. Maybe accuracy scales with dps but with huge losses (Hurwitz via Euler-Maclaurin with Bernoulli cache issues?). For the memory file: mpmath zeta (any form) is untrustworthy beyond double precision on this stack; use flint always. I'll update the memory note.\n\nNow implement the fix in E-021. Plan:\n1. Replace P2's η computation: flint-based, no mpmath zeta.\n2. Keep σ_m from zeros (fine).\n3. Rerun (S_∞ is cached — actually the zeta cache is reusable for S_∞; the η-side needs its own higher-precision zeta strings — separate cache).\n4. Also the CSV/JSON from the failed run will be overwritten (script has --force semantics; CSV gets rewritten at end).\n\nPrecision plan for η_j (j ≥ 1): need absolute error ≤ 10^{−(0.31·N_MAX + 60)} after the 0.48j-digit cancellation → compute ζ(j+1) string at W_j = ceil(0.31·N_MAX) + ceil(0.477·j) + 160 digits via flint.arb(j+1).zeta().str(W_j). Sum over odd m? No — direct: small = (1−2^{−(j+1)})ζ − 1 at mp dps W_j + 50. For j=0: η_0 = τ_0 − σ_1 + 1 (exact constants + σ_1).\n\nWait, also should double check the σ truncation: for j+1 > 16, σ_{j+1} set to 0, true |σ_{j+1}| ≤ σ₂·14^{1−j} ≤ 3e-19 for j ≥ 16. η_j absolute error budget at j=16..: C(5000,j)·3e-19 at j=16: C(5000,16) ~ 10^{44}·3e-19 = 3e-25?? Hmm — that's bigger than 1e-30 target! Extend σ_m to m ≤ 24 (zeros to 5000: σ_2 tail bound 2e-13·... the σ_m themselves for m ≤ 24 are dominated by first zeros, computed fine; truncation of zeros at T=5000 affects σ_m ~ T^{1−m} — negligible for m ≥ 2). With m ≤ 24: omitted σ_{j+1} for j ≥ 24: |σ| ≤ 0.046·14^{−23} ~ 10^{−27}. C(5000,24)·10^{−27}: C ~ 10^{63}·1e-27 = 1e-36 ✓ fine. So SIGMA_M_MAX = 24. Actually at j between 17 and 24 with σ=0: |σ_{j+1}| ≤ 0.046·14^{−(j−1)}: j=17: 0.046·14^{−16} = 2e-20·... 14^{−16} = 4.4e-19 → 2e-20. C(5000,17) ~ 10^{46}·2e-20 = 2e-26 > 1e-30! Marginal. So yes, extend σ to 24: j=24 omitted: 0.046·14^{−23} = 4.6e-2·2.9e-27 = 1.3e-28; C(5000,24) ~ 10^{63}: 1.3e-65?? wait C(5000,24) = 5000^24/24! ~ 10^{88.7}/10^{23.2} = 10^{65.5}. ×1.3e-28 = 1.3e-62 ✓ fine.\n\nHmm wait, actually there's subtlety: the σ_m from only 7900 zeros (T=5000): σ_m = 2Re Σ_{γ≤5000} ρ^{−m} + tail. Tail for m=2: bounded 2e-13-ish (per script log: tail <= printed earlier ~1e-13?). For σ_2, error 1e-13 → η_1 error 1e-13 → C(n,2)·1e-13 ~ n²/2·1e-13: at n=5000: 1.25e7·1e-13 = 1.25e-6!!! THAT breaks the budget too! The V1 check needs λ to 1e-40 relative (~1e-36 absolute at λ~10⁴)... hmm, V1 threshold worst < 1e-40 relative. σ_2 tail 1e-13 → S_f error at j=2: C(5000,2)·1e-13 = 1.25e-6 → λ error 1.25e-6 → rel ~ 1e-10. V1 FAILS?! But wait — this was ALSO true in the ORIGINAL design (STATE.md said η₀ = −0.576975 within σ₁-tail 1.2e-3 ✓ — accepted as expected). Hmm, so the design accepts σ-truncation errors at small j?? But then V1 (λ vs E-015 to 1e-40) can never pass with zeros only to T=5000! σ_1 tail: the paired form Σ 1/(ρ(1−ρ)) tail ~ 2·tail_2 ~ 2.4e-4 (measured η_0 diff 2.4e-4). η_0 error 2.4e-4 → S_f error C(n,1)·2.4e-4 = n·2.4e-4 = 1.2 at n=5000!!! λ error ~1.2!!! V1 hopeless with T_ZEROS = 5000.\n\nHmm!! So E-021's P2 design has an intrinsic zero-truncation wall: η_0 needs σ_1 to ~10^{−35}/n... σ_1 via paired zeros to height T has tail ~ 2Σ_{γ>T}1/γ² ~ 2·logT/(2πT) ~ 2.4e-4 at T=5000. To get σ_1 to 10^{−38} need T ~ 10^{35} — impossible!! \n\nBUT WAIT — we don't need σ_1 from zeros at all! σ_1 is KNOWN in closed form: σ_1 = Σ_ρ 1/ρ = 1 + γ/2 − (1/2)log(4π) = B' — the classical constant ≈ 0.02309570896612103... (λ_1!). Actually λ_1 = σ_1 exactly (λ_1 = Σ(−1)^{j−1}C(1,j)σ_j = σ_1). And λ_1 is known to 102 digits (E-011: 0.0230957089661210338143102479064952916219321271520507...). So η_0 = τ_0 − σ_1 + 1 EXACTLY. \n\nSimilarly σ_2 = 2σ_1 − λ_2? From λ_2 = 2σ_1 − σ_2 → σ_2 = 2σ_1 − λ_2. And generally σ_j via λ_1..λ_j (triangular): σ_j = (−1)^{j−1}[λ_j − Σ_{i<j}(−1)^{i−1}C(j,i)σ_i]. So ALL σ_j (j ≤ 16 or 24) can be computed from λ_1..λ_24 — known from E-015 (λ to n=3000 at dps 1450!!) or E-011's CSV (λ_1..1000). EXACTLY (to 1450 digits)! NO ZERO SUMS NEEDED for σ_m, m ≤ 24!!\n\nEven better: η_j for j ≤ 23 = τ_j + (−1)^{j+1}σ_{j+1} + (−1)^j with σ from λ's (E-015 CSV, 25-digit strings — hmm, E-015 CSV has λ to ~26 digits only! \"306.6557648513447664127226\" — 26 digits. Not enough for 1650-digit η. But E-011's CSV? Also ~12-30 digits. Hmm. λ to full precision: E-015 computed at dps 1450 but the CSV may have truncated... Let me check E-015 CSV format: earlier: \"200,306.6557648513447664127226,1.00951446899\" — 26 digits. NOT enough.\n\nAlternatives: compute λ_1..λ_24 from the zero side? σ_1 = λ_1 known 102 digits (E-011 JSON has lambda_1 to 30+ digits; the LAMBDA1_KNOWN string in E-011 script: 102 digits!). λ_2..λ_24: computable from zero-side with zeros to T=5000 + tail bounds... σ_m for m ≥ 2 converges ABSOLUTELY (Σ|ρ|^{−m} < ∞): zero-truncation tail for σ_m ~ ∫_T^∞ t^{−m} dN ~ T^{1−m}logT/(2π(m−1)): m=2: 10^{−3.7}·... at T=5000: ~2e-4?? Wait earlier the script log printed \"sigma_2 tail <= ...\" — let me check what it printed. Earlier log line: \"sigma_2 = ... (plain-power sum; tail <= X)\" — I didn't see the value. From D-036: tails computed via tail_m. At T=5000, tail_2 ≈ N(T)/T² + (2/2π)[log(T/2πe)/1 + 1]T^{−1} + S(T)/T² ≈ (7900/2.5e7) + 0.318·(6.68+1)/5000 ≈ 3.16e-4 + 4.88e-4 ≈ 8e-4. Hmm that's the BOUND; actual tail ~ log(2πT)... Σ_{γ>T}1/γ²·2 ≈ 2·∫ log(t/2π)/(2πt²) dt ≈ 2·(log(T/2π)+1)/(2πT) ≈ 2·7.68/(31415) = 4.9e-4. So σ_2 known to ~5e-4 only from zeros?! Hmm wait, that contradicts η_1 matching Stieltjes to 8e-12 in diag1?? diag1 η_1: a/b = 0.188026978299 vs true 0.18754623284 — differ by 4.8e-4 ✓ CONSISTENT with σ_2 tail 4.8e-4. Yes! So zero-side σ_2 has 4.8e-4 error (flagged \"a WRONG\" in diag1!). Confirmed.\n\nSo zero-truncation at T=5000 gives σ_m errors ~5e-4·14^{2−m}·... For η to 1650 digits we need σ_m essentially exact → use the triangular inversion from λ_1..λ_m. Where to get high-precision λ_1..λ_24? E-015's underlying computation had dps 1450 but CSV truncated. RERUN E-015 machinery for n ≤ 24? That needs Stieltjes to k=24 — SECONDS via flint. YES: compute η via E-011 machinery directly for j ≤ 24 (Stieltjes division, flint, high precision — cheap for k ≤ 24), and for j > 24 use... hmm, but η_j for j > 24 still needs σ_{j+1} (tiny, ≤ 14^{−25} — set 0 ✓) and τ_j's small part via flint zeta (the (1−2^{−s})ζ(s)−1 formula, cancellation 0.48j digits, affordable). \n\nCLEANEST FINAL DESIGN for P2 (all flint, no mpmath zeta):\n- j = 0..24: η_j via E-011's Stieltjes series-division (flint.acb.stieltjes to k=24 at full precision — seconds). VALIDATED machinery.\n- j ≥ 25: η_j = (−1)^{j+1}·[(1−2^{−(j+1)})·ζ_flint(j+1) − 1], σ omitted (|σ_{j+1}| ≤ σ₂·14^{1−j} < 10^{−27}·0.05 — below budget at these j since C(5000,25)~10^{67}·1.3e-28 = 1.3e-61 ✓).\n ζ_flint(j+1) strings at W_j = full_digits + ceil(0.48j) + 100 digits. NOTE: E-021's existing zeta cache has ζ(j) at full_digits = 1650 — NOT enough for j > ~25 (needs +0.48j). So a second cache \"E-021-zeta-hi-cache.json\" at per-j precision. Cost: 5000 flint zetas at up to ~4100 digits — comparable to P3's cache build (was acceptable; cache reused for the 1e4 rerun later).\n\nHmm wait — actually for j ≥ 25 we could ALSO use the direct odd-power series, avoiding big zeta entirely: Σ_{m≥1}(2m+1)^{−(j+1)}: at j=25: 3^{−26} = 10^{−12.4}; terms: 3^{−26}(1+(3/5)^{26}+...) ≈ 3^{−26}(1+1.7e-6+...): need ~40 terms for 1700 digits?? (2m+1)^{−26} < 10^{−1712}: 2m+1 > 10^{65.9} — no!! For the SUM's absolute accuracy 10^{−1712} at j=25... the sum itself is ~10^{−12.4}, so need relative 10^{−1700}: tail after M: (2M)^{−25}·... < 10^{−12.4−1700}: (2M)^{25} > 10^{1712}: 2M > 10^{68.5}. IMPOSSIBLE. So no — for j=25 direct series needs the sum to RELATIVE 1700 digits → huge M. flint-zeta-with-cancellation is the way (0.48·25 = 12 extra digits — trivial). For j=2500: direct series: sum ~10^{−1193}, need absolute 10^{−1530} (relative 10^{−337}): tail (2M+1)^{−2501} < 10^{−1530}: 2M+1 > 10^{0.612} = 4.1: M=2!! Two terms. So direct series IS better for large j. Hybrid: j ≤ J_SPLIT: flint zeta; j > J_SPLIT: direct series with M(j) = smallest M with (2M+1)^{−(j+1)} < 10^{−(need)}. J_SPLIT where M becomes small... M(j) ≈ (10^{need/(j+1)}−1)/2 with need = 0.31·N_MAX + 60 − log10(3^{−(j+1)})·... hmm need absolute accuracy A = 10^{−(0.31·5000+60)} = 10^{−1610}: M(j): (2M+1)^{−(j+1)} < 10^{−1610} → 2M+1 > 10^{1610/(j+1)}. j=100: 10^{15.9} — huge. j=1000: 10^{1.6} = 40 → M=20 ✓. j=300: 10^{5.35} = 224000 — huge. So direct series only wins for j ≳ 800. Hybrid split at j=800: flint zeta for j ≤ 800 (800 zetas at ≤1650+384 digits — fast), direct series for j > 800 (M ≤ 20, instant). \n\nHmm, actually — wait. Is per-term accuracy 10^{−1610} the right budget? S_f error = Σ_j C(n,j)δ_j. Worst case aligned: 2^n·max δ. Need final S_f to, say, 30 correct digits: δ_max < 10^{−30−0.301·5000} = 10^{−1535}. So A = 10^{−(1535+60)} = 10^{−1595}. Yes ~10^{−1600}.\n\nActually hmm, hold on: is that budget even right? The C(n,j)·η_{j−1} terms: C(5000, 2500)·η_2499 ~ 10^{1505}·3^{−2500} = 10^{1505−1193} = 10^{312}. To get S_f to 30 digits, need each term to ~30+2 digits relative-to-result... absolute term accuracy 10^{30}: δ_j·C(n,j) < 10^{30} → δ_j < 10^{30−1505} = 10^{−1475} at j=2500. η_2499 ~ 10^{−1193} — relative 10^{−282}. Via flint zeta: need ζ(2501) absolute accuracy: (1−2^{−s})ζ−1 ~ 3^{−2501}: the subtraction error ~10^{−W}: need 10^{−W} < 10^{−1475}·... η error = ζ error ~10^{−W} (ζ~1) → δ_j ~ 10^{−W}: W > 1475. And 0.48j cancellation: the RESULT η_j ~ 10^{−1193} computed from ζ ~ 1: absolute error of result ~10^{−W} regardless → W = 1475+60 suffices?? The cancellation \"loss\" is automatic: ζ to W absolute digits → η to W absolute digits → relative 10^{−W}/10^{−1193}. So W_j = 1600 constant works for all j?! Wait, but that's what I said: error of (1−2^{−s})ζ(s)−1 computed at precision W: ζ(s) = 1+2^{−s}+... ~ 1: flint gives W SIG digits → abs err 10^{−W}. Multiply by (1−2^{−s}) ~ 1: err 10^{−W}. Subtract 1: result ~3^{−s}, err 10^{−W}. So η_j abs err 10^{−W}. With W = 1650: δ_j ~ 10^{−1650} for ALL j. Σ C(n,j)δ ~ 2^5000·10^{−1650} = 10^{1505−1650} = 10^{−145}. FINE. So uniform W = full_digits = 1650 suffices!!! No 0.48j extra needed!! (My earlier \"+0.48j\" was confusing relative vs absolute.)\n\nSo: recompute flint ζ(j) strings for j = 2..5000 at 1650 digits — THE EXISTING ZETA CACHE ALREADY HAS THESE!!! E-021-zeta-cache.json: ζ(j) at full_digits = 1650 for j ≤ 5000 ✓✓. REUSE! η_j = (−1)^{j+1}·[(1−2^{−(j+1)})·ζ(j+1) − 1 + σ_{j+1}] computed at dps 1700 from the cached strings. σ_{j+1} for j+1 ≤ 24 from Stieltjes-division η... no wait, σ via triangular inversion from λ... simpler: σ_m for m ≤ 24 from η's?! Circular. Options for σ_m (m ≤ 24, need ~1600 digits):\n- From λ_1..λ_24 (triangular): need λ to 1600 digits → E-011 machinery at n_max=24: Stieltjes k ≤ 24 via flint (seconds) + series division + plain sums: cheap, VALIDATED. Compute λ_1..24 at dps 1700, invert: σ_1 = λ_1; σ_j = (−1)^{j−1}λ_j − Σ_{i=1}^{j−1}(−1)^{i−1}C(j,i)σ_i... from λ_j = Σ_{i=1}^j (−1)^{i−1}C(j,i)σ_i: σ_j = (−1)^{j−1}[λ_j − Σ_{i=1}^{j−1}(−1)^{i−1}C(j,i)σ_i]... wait solve: λ_j = Σ_i (−1)^{i−1}C(j,i)σ_i; the i=j term: (−1)^{j−1}σ_j → σ_j = (−1)^{j−1}(λ_j − Σ_{i<j}(−1)^{i−1}C(j,i)σ_i). ✓\n- OR: η_j for j ≤ 23 directly from Stieltjes division (E-011 machinery, k ≤ 23, seconds) — then no σ needed at all for small j! And for j ≥ 24: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1] (σ_{j+1} omitted: |σ_{j+1}| ≤ 0.047·14^{−23} < 1.4e-28 ≪ 10^{−1600}? NO — 1.4e-28 > 1e-1600. But its S_f impact: C(5000,24)·1.4e-28 = 10^{65.5}·1.4e-28 = 1.4e-37 ✓ negligible).\n\nDESIGN (final):\n- η_j for j = 0..23: Stieltjes series division (flint stieltjes k ≤ 23 at precision full_digits+100, recursion at dps full_digits+100).\n- η_j for j = 24..N_MAX−1: (−1)^{j+1}·[(1−2^{−(j+1)})·ζ(j+1) − 1] at dps full_digits+50, ζ strings from the EXISTING cache (1650 digits) ✓.\n- Cross-validate at j = 20..23: both methods computable (σ from zeros for the τ formula? no — compare Stieltjes-η vs zeta-formula-η with σ omitted at j=20..23: difference should equal (−1)^{j+1}σ_{j+1} ~ 14^{−21} — check consistency to that level). Simple check: |diff| ≤ 14^{1−j}·σ₂ bound.\n- η_0: Stieltjes gives −γ exactly ✓ (no σ₁ truncation issue!).\n\nThis eliminates mpmath zeta entirely from P2. S_f = plain Σ C(n,j)η_{j−1} (CONFIRMED correct convention — matches Lagarias λ = S_∞ − S_f + 1 with (4.11) S_∞, validated at n=2 and n=200 via E-015).\n\nWait, one more sanity check on the CONVENTION: S_f(200)[e011-η] = −2.14037668 matched S_∞(200)+1−λ_200(E-015) = −2.14037668 ✓✓. And E-015's λ are consistent with E-008 zero-side within tail bounds ✓. And e011-η ≡ Stieltjes-division η — which is what my fix uses for j ≤ 23 ✓. And for j ≥ 24, the zeta-formula η (with exact σ via Stieltjes-λ inversion... no — σ omitted for j ≥ 24). Is the zeta-formula right? η_j = τ_j + (−1)^{j+1}σ_{j+1} + (−1)^j (Lagarias (4.10) solved) — verified numerically: η_diag[j] ≡ η_e011[j] to ~58 digits at j=88-95 (the mpmath-58-digit ceiling) ✓ formula right. With flint ζ the formula will be accurate to 1650 digits.\n\nAlso V1 threshold: worst < 1e-40 relative — with the fixed η, errors ~10^{−145} — pass.\n\nAnd P1's |R(s)| samples: used mpmath xi (complex ζ at dps 30) — OK to ~1e-10 per E-018 C2 handoff note; A_use=0.9, B0_use=1.0 with 20-30% margins — fine, keep.\n\nAlso: N_MAX = 5000 with comment \"10000 costs ~2h; cached zeta/zeros make a later 1e4 rerun cheap\". Keep 5000 for this run (D-037 needs the curve; the STATE says exact S_∞ to 10⁴ — hmm, task 3.7 says \"Exact S_∞(n) computation n ≤ 10⁴\". The script has N_MAX=5000 with a note. STATE.md said \"Exact S_∞(n) computation n ≤ 10⁴\" but the script comment says 5000. The previous session chose 5000 for time. Given the fix needs a rerun anyway, keep 5000 (caches make a later 1e4 extension cheap). Fine.\n\nImplementation: modify E-021 script's P2 section. Replace tau_j/sigma machinery:\n- Remove mpmath Hurwitz tau_j usage for η.\n- Add: Stieltjes k=0..23 via flint.acb.stieltjes (serial, full precision), series division → η_0..23.\n- η_j for j ≥ 24 from cached ζ strings: need ζ(j+1) strings — the zeta cache has j up to N_MAX = 5000; η_j needs ζ(j+1) for j+1 ≤ 5000 → j ≤ 4999 ✓ (η_{4999} is the last needed: S_f(5000) uses η_{j−1}, j ≤ 5000 → η up to η_4999, needs ζ up to ζ(5000) ✓ cache covers).\n- Keep σ_m zero-side computation ONLY for the cross-check print (or drop entirely — keep σ_2 print for continuity with D-036? drop; simpler). Actually keep a small validation: compare η_j (Stieltjes) vs η_j (zeta-formula with σ from zeros, m ≤ 16) for j = 10..23 — expect agreement to ~5e-4·14^{2−j}-ish... simpler validation: print max |η_Stieltjes[j] − η_zeta[j]| for j = 24..40 where zeta-formula has σ omitted — should be ≤ 14^{1−j}·0.05. Good check that the two halves stitch.\n\nWait, but Stieltjes to k=23 at 1750 digits: flint.acb.stieltjes(23) at 1750 digits — how slow? E-011 did k ≤ 1000 at dps 550 in parallel (14 workers) — took some time but k ≤ 23 serial is seconds. ✓. BUT flint stieltjes at high precision: E-015 used dps 1450 for k ≤ 3000 — cost ~k³. k=23 at 1750 digits: trivial.\n\nOne question: series-division recursion at dps 1750 for k ≤ 23 — exact, fine.\n\nLet me now also double-check the S_∞ side doesn't use mpmath zeta: P3 uses flint.arb(j).zeta() ✓ safe. P1 uses mpmath complex zeta at dps 30 — acceptable per handoff note. compute_zeros uses mp.zetazero ✓ safe.\n\nAlso the CSV/JSON outputs: the failed run's files exist; --force rerun overwrites ✓.\n\nLet me now edit the script. I'll rewrite the P2 section:\n\nReplace:\n```\n # ---- P2: eta via zero side\n print(\"P2: eta_j via zero-side sigma ...\", flush=True)\n sigma, sigma_tails = sigma_sums(gam_sample)\n ...\n eta_str[j] = mp.nstr(mp.re(tau_j(j) + (-1)**(j+1)*sig + (-1)**j), full_digits)\n```\nwith flint-based η. Also remove tau_j/sigma_sums functions? They're used only in P2. Remove them (clean). Also gam_sample still needed for P1 (R samples). compute_zeros still needed ✓.\n\nNew P2:\n```\n # ---- P2: eta_j — ALL flint (mpmath zeta untrustworthy >~58 digits;\n # E-021 V1 failure root cause, session 006 cont.10).\n # j <= 23: Stieltjes series division (E-011 machinery).\n # j >= 24: eta_j = (-1)^{j+1} [(1-2^{-(j+1)}) zeta(j+1) - 1]\n # (Lagarias (4.10); |sigma_{j+1}| <= 0.05*14^{1-j} < 1.4e-28,\n # impact on S_f <= C(n,j)*1.4e-28 <= 1.4e-37 — omitted).\n print(\"P2: eta_j via flint (Stieltjes + arb zeta) ...\", flush=True)\n K_SPLIT = 24\n flint.ctx.prec = int((full_digits + 100) * 3.33) + 200\n gam_s = [mp.mpf(flint.acb.stieltjes(k).real.str(full_digits + 100, radius=False)) for k in range(K_SPLIT + 2)]\n mp.mp.dps = full_digits + 100\n # series division (E-011): -zeta'/zeta(1+u) = (1/u) N/D, eta_k = [u^{k+1}] N/D\n N_ = [mp.mpf(0)]*(K_SPLIT+2); D_ = [mp.mpf(0)]*(K_SPLIT+2)\n N_[0] = D_[0] = 1\n for m in range(0, K_SPLIT+1):\n D_[m+1] = (-1)**m * gam_s[m] / mp.factorial(m)\n for m in range(1, K_SPLIT+1):\n N_[m+1] = -(-1)**m * gam_s[m] / mp.factorial(m-1)\n Ev = [mp.mpf(0)]*(K_SPLIT+2)\n for k in range(0, K_SPLIT+2):\n s = N_[k]\n for i in range(1, k+1):\n s -= D_[i]*Ev[k-i]\n Ev[k] = s\n eta_str = {j: mp.nstr(Ev[j+1], full_digits) for j in range(K_SPLIT)}\n # j >= K_SPLIT from cached flint zeta strings\n ...needs zeta_mpf from P3! ORDERING PROBLEM: P2 currently runs before P3's zeta load.\n```\n\nHmm — P2 runs before P3 in main(). The zeta cache is loaded in compute_S_inf. Restructure: load zeta strings at top of P2 (load cache directly, or move P2 after P3). Simplest: in P2, load the zeta cache JSON directly (it exists from the previous run; if not, compute_S_inf would create it — but P2 needs it BEFORE P3. If cache missing, call compute... simplest: move the zeta-string loading into a helper used by both P2 and P3. Minimal edit: in P2, if cache missing, fail with a message? No — first run ever needs to build it. Better: extract zeta-string loading/building into a function get_zeta_strings() called in P2, and compute_S_inf reuses it. But minimal-change principle: the cache already exists (previous run built it). Still, for robustness make P2 build it if missing — I'll factor a small loader.\n\nActually simpler: reorder — run P3's zeta load first. compute_S_inf prints \"S_inf: zeta(j) via flint...\". I'll restructure main() to:\n1. P1 (unchanged)\n2. load/build zeta strings (extracted from compute_S_inf into get_zeta_strings(n_max) returning dict; compute_S_inf takes it as arg)\n3. P2 η via Stieltjes + zeta strings\n4. P3 S_∞ (using strings)\n5. P4, P5 unchanged\n\nAlso fix compute_Sf docstring (the wrong \"plain is validated\" comment — actually plain IS correct! The comment said alternating is wrong — that part is right! The bug was precision, not convention. Keep plain sum; update comment to note the mpmath-precision root cause).\n\nAlso remove sigma_sums, tau_j (unused). Update header docstring P2 description.\n\nPrecision details: full_digits = int(0.31*N_MAX)+100 = 1650. Stieltjes strings at full_digits+100 digits. Series division at dps full_digits+100. η_j (j≥24): at dps full_digits+50 from zeta_mpf parsed at full_digits+50... zeta strings have 1650 digits; parse at dps full_digits+50 = 1700 ✓; compute (1−2^{−(j+1)})·ζ − 1 at 1700 → abs error ~1e-1700·(ζ~1) ✓. Store nstr(full_digits).\n\nValidation: stitch check j = K_SPLIT..K_SPLIT+20: η_zeta should match η_Stieltjes-extended? Can't extend Stieltjes cheaply beyond 23 — instead check against zero-side σ formula? That needs σ — dropped. Alternative check: |η_j| ~ 3^{−j}: print η_24..30 magnitudes and check |η_{j+1}/η_j| ≈ 1/3. Plus the ULTIMATE check is V1 (λ vs E-015) — that's the real validation. Also add explicit check V4: η_0 = −γ to 1e-100, η_1 = 0.18754623284... hmm η_1 known value: 0.18754623284036556... compare. Add lightweight sanity: |η_0 + γ| < 1e-1400, |η_1 − 0.187546232840365...| small — just print, don't gate.\n\nAlso update V1 print and JSON key_values to include stitch check.\n\nEdge: flint.acb.stieltjes — E-011's worker calls flint.acb.stieltjes(k) — module-level function ✓ use that.\n\nNow write the edits.","signature":""},{"type":"text","text":"**ROOT CAUSE FOUND.** `mp.zeta(90, 0.5)` at dps 1700 returns only ~58 correct significant digits — the mpmath-zeta bug on this stack (mpmath 1.3 + Py 3.14) is real and hits Hurwitz zeta too. E-021's P2 computes τ_j = (−1/2)^{j+1}ζ(j+1, 1/2) via mpmath → η_j silently wrong at the 1e-58 level → the delicate binomial cancellation in S_f (terms up to 10^312 at n=5000 canceling to O(1)) explodes. The convention (plain sum) was RIGHT all along — verified: S_f(200) with flint-Stieltjes η = −2.14037668, matching S_∞(200)+1−λ_200(E-015) exactly.\n\nAlso confirmed: E-011/E-015 use flint only — ledger #3 is safe. The mpmath breakage is in E-021's P2 only.\n\nFix: P2 η computation goes all-flint — Stieltjes series division (E-011 machinery) for j ≤ 23, and η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1] from the cached flint ζ strings for j ≥ 24 (σ_{j+1} ~ 14^{−25} negligible there). This also eliminates the zero-truncation errors in σ (η_0 was off by 2.4e-4)."},{"type":"tool_use","id":"Edit_37","name":"Edit","input":{"file_path":"D:\\Python\\Quantum\\research\\numerics\\scripts\\E-021-sinf-sf-curve.py","old_string":"Components:\n P1. D-036 constants: C0(t) from Trudgian; |R(s)| = |zeta'/zeta(s) -\n sum_{|gamma-t|<1} 1/(s-rho)| sampled at ~30 contour points (flint\n acb zeta + fd derivative, zeros via mp.zetazero) -> fit A, B0.\n P2. eta_j via the ZERO side (Lagarias (4.10)):\n eta_j = tau_j + (-1)^{j+1} sigma_{j+1} + (-1)^j,\n sigma_m = sum_rho rho^{-m} (zeros to T_Z = 3e4 via mp.zetazero,\n tail via Trudgian N(T) partial summation),\n tau_j = (-1/2)^{j+1} zeta(j+1, 1/2) (Hurwitz, mpmath).\n sigma_m needed only for m <= ~16 (decays 14^{1-m}); sigma_1 from\n paired zeros (absolute convergence via rho <-> 1-rho).\n P3. S_inf(n) EXACT for n <= N_MAX (Lagarias (4.11)):\n S_inf(n) = sum_{j=1}^n (-1)^j C(n,j) (1-2^{-j}) zeta*(j),\n zeta*(1) = log(4pi)+gamma, zeta*(j) = zeta(j) (flint.arb).\n Cancellation ~2^n -> dps = ceil(0.31*n) + 60.\n P4. S_f(n) = sum_{j=1}^n (-1)^{j-1} C(n,j) eta_{j-1}; lambda_n =\n S_inf - S_f + 1.","new_string":"Components:\n P1. D-036 constants: C0(t) from Trudgian; |R(s)| = |zeta'/zeta(s) -\n sum_{|gamma-t|<1} 1/(s-rho)| sampled at ~30 contour points (flint\n acb zeta + fd derivative, zeros via mp.zetazero) -> fit A, B0.\n P2. eta_j — ALL FLINT (session 006 cont.10 root-cause: mpmath zeta,\n Hurwitz included, silently loses accuracy beyond ~58 digits on\n this stack [mpmath 1.3 + Py 3.14] -> eta_j errors ~1e-58 ->\n S_f binomial cancellation explodes ~(4/3)^n; V1 failed 1.4e143.\n The zero-side sigma route also has eta_0 wrong by 2.4e-4 from\n sigma_1 truncation at T=5000 — both defects removed here).\n j <= 23: Stieltjes series division (E-011 machinery, validated):\n -zeta'/zeta(1+u) = (1/u) N(u)/D(u), eta_k = [u^{k+1}] N/D.\n j >= 24: Lagarias (4.10) with flint arb zeta:\n eta_j = (-1)^{j+1} [(1-2^{-(j+1)}) zeta(j+1) - 1]\n (|sigma_{j+1}| <= sigma_2*14^{1-j} < 1.4e-28, S_f impact\n <= C(5000,24)*1.4e-28 ~ 1.4e-37 — omitted).\n P3. S_inf(n) EXACT for n <= N_MAX (Lagarias (4.11)):\n S_inf(n) = sum_{j=1}^n (-1)^j C(n,j) (1-2^{-j}) zeta*(j),\n zeta*(1) = log(4pi)+gamma, zeta*(j) = zeta(j) (flint.arb).\n Cancellation ~2^n -> dps = ceil(0.31*n) + 60.\n P4. S_f(n) = sum_{j=1}^n C(n,j) eta_{j-1} (plain binomial — the\n E-011/Lagarias-(4.13) convention after the (-1) absorbed into\n the series-eta definition; VALIDATED: S_f(200) = -2.14037668\n matches S_inf(200)+1-lambda_200(E-015)); lambda_n =\n S_inf - S_f + 1."},"extra_content":null}]