← Session 30 — ii′-5e squeeze capstone + 5f perimeter repair
thinking (9587 chars)
I see the 5d structure: the first-order EM (`sum_eq_integral_add_integral_deriv`) on f(y) = (w+y)⁻¹, with the B̃₁ remainder. For piece 6's sharp remainder, I'd need the SECOND-order EM (B̃₂). That's a heavier build.
BUT — wait. Given the budget for piece 6 is now 2.1 (generous), do I even need the SHARP remainder? Let me reconsider: with the CRUDE 5d bound ‖ψ(w) − log w‖ ≤ 3:
|ψ(w) − ψ(w₀)| ≤ |log w − log w₀| + ‖ψ(w)−log w‖ + ‖ψ(w₀)−log w₀‖ ≤ |log(w/w₀)| + 6.
½·that ≤ ½·0.9 + 3 = 3.45 > 2.1. Just over. Hmm.
Middle route: get ‖ψ(w) − log w‖ ≤ something smaller for |im w| ≥ 5. The 5d bound ≤ 3 is uniform for |im| ≥ 2. For |im| ≥ 5 (our case: im w = t/2 ≥ 5), the bound improves: the B̃₁ remainder ∫ B̃₁(x)/(w+x)² dx ≤ (1/2)·∫ dx/|w+x|² ≤ (1/2)·(π/(2·|im w|))·... — the arctan integral ∫₀^∞ dx/((x+a)²+c²) ≤ π/c with c = |im w| ≥ 5: ≤ π/5 ≈ 0.628. And the boundary terms (w⁻¹ − (w+n)⁻¹)/2 ≤ (1/|w| + 1/|w+n|)/2 ≤ (1/5+1/5)/2 = 0.1. And the StirlingVert part at v (re v > 0, |im v| ≥ 5): ‖ψ(v) − log v‖ ≤ ... the 5d assembly gave 3 total with the crude pieces. For |im| ≥ 5 the remainder pieces shrink: the total ‖ψ(w) − log w‖ ≈ 1/(2|w|) + 0.63 + small ≤ 0.73-ish. Then |ψ-diff| ≤ 0.9 + 2·0.73 = 2.36; ½·2.36 = 1.18 ≤ 2.1 ✓. Hmm — but that requires redoing the 5d assembly with the sharper constants — comparable work to the level-2 EM.
Hold on — actually, is there a slicker approach entirely? The digamma DIFFERENCE directly: ψ(w) − ψ(w₀) = Σ_{j≥0} [1/(w₀+j) − 1/(w+j)] (the Weierstrass series difference — the series Σ_j (1/(w+j) − 1/(w₀+j)) converges since the terms are (w₀−w)/((w+j)(w₀+j)) ~ 1/j²). Zeta23's `DigammaSeries.digamma_series`: ψ(z) = −γ − 1/z + Σ'_n (1/(n+1) − 1/(z+n+1)) — exists (noted in D-068 §1: "Zeta23 DigammaSeries.digamma_series ... exists, axiom-checked"). So:
ψ(w) − ψ(w₀) = −(1/w − 1/w₀) + Σ'_{n≥0} [(1/(n+1) − 1/(w+n+1)) − (1/(n+1) − 1/(w₀+n+1))]
= −(1/w − 1/w₀) + Σ'_{n≥0} (w − w₀)/((w+n+1)(w₀+n+1)).
The series: |w − w₀|·Σ'_n 1/(|w+n+1||w₀+n+1|). Now |w+n+1| ≥ |im w| = t/2 (n+1 real ≥ 0: |w+n+1| ≥ |im(w+n+1)| = t/2 ✓), similarly |w₀+n+1| ≥ t/2. And more precisely |w+n+1| ≥ √((n+1+re w)² + (t/2)²) ≥ √((n + 1 − 5/4)² + 25)... For the sum: Σ_{n≥0} 1/(|w+n+1||w₀+n+1|) ≤ Σ_{n≥0} 1/((n + a)² + (t/2)²) with a = 1 + min(re w, re w₀) hmm re w = σ/2 ∈ [−5/4, 3/2]: n+1+re w ≥ n − 1/4. So |w+n+1|² ≥ (n−1/4)² + (t/2)² and |w₀+n+1|² ≥ (n+2)² + (t/2)². The product sum: ≤ Σ_n 1/(((n−1/4)²+25)^{1/2}·((n+2)²+25)^{1/2})·... ≤ Σ_n 1/((n−1/4)² + 25)^{1/2}((n+2)²+25)^{1/2} — hmm. Bound each: |w+n+1||w₀+n+1| ≥ ((n−1/4)²+25)^{1/2}((n+2)²+25)^{1/2} ≥ ((n−1/4)(n+2) + 25)·... by Cauchy (a₁a₂ + b₁b₂ ≤ √(a₁²+b₁²)√(a₂²+b₂²)) — the reverse: √(a²+c²)√(b²+c²) ≥ ab + c² — hmm that gives |w+n+1||w₀+n+1| ≥ (n−1/4)(n+2) + 25 — for n ≥ 1: (n−1/4)(n+2) ≥ (3/4)·3 = 2.25: so ≥ 27.25 for n ≥ 1, and ≥ 25 for n = 0. Then Σ_n 1/(27.25-ish)?? — that's just the per-term bound 1/25 — DIVERGES (Σ 1/27 over all n). Need the j² decay: the product |w+n+1||w₀+n+1| ~ n² for large n: ≥ (n−1/4)(n+2) + 25 ≥ (n² + (7/4)n − 1/2) + 25 ≥ n² + 25 for n ≥ 1 (n² + 1.75n − 0.5 ≥ n² for n ≥ 0.3 ✓). So the terms ≤ 1/(n² + 25) for n ≥ 1 and ≤ 1/25 for n = 0. Σ_{n≥1} 1/(n²+25) ≤ ∫₀^∞ dx/(x²+25) = π/10 ≈ 0.314. Total ≤ 1/25 + 0.314 = 0.354. Then |series| ≤ 2.25·0.354 = 0.80. Plus |1/w − 1/w₀| = |w−w₀|/(|w||w₀|) ≤ 2.25/25 = 0.09. Total |ψ-diff| ≤ 0.80 + 0.09 = 0.89; ½·0.89 = 0.45.
Hmm — comparable to the log-route's 0.52. Both fine. But the Weierstrass-difference route avoids the log entirely and avoids EM! The catch: (i) need digamma_series from Zeta23 (exists, axiom-checked per D-068), (ii) the termwise difference of the two tsums (tsum_sub — both summable — is the digamma series summable in the Zeta23 form? digamma_series gives ψ(z) = −γ − 1/z + ∑' ... — the ∑' is summable by construction), (iii) the per-term algebra + the norm bound Σ 1/((n−1/4)²+25)-ish ≤ 1/25 + π/10 — the integral ∫₀^∞ dx/(x²+25) = π/10 needs the arctan FTC (5d used arctan-FTC: `∫dx/((x+a)²+c²) ≤ π/c` — machinery EXISTS from 5d ✓).
Hmm — the per-term bound 1/((n−1/4)²+25)^{1/2}((n+2)²+25)^{1/2} ≤ 1/(n²+25) via Cauchy — the Cauchy step in Lean: √((n−1/4)²+25)·√((n+2)²+25) ≥ (n−1/4)(n+2) + 25 — this is Cauchy-Schwarz (a·b + c·c ≤ √(a²+c²)√(b²+c²)) — Mathlib: `Real.inner_le_L2_mul_L2`? or for the explicit form: (a·b + c²)² ≤ (a²+c²)(b²+c²) ⟺ a²b² + 2abc² + c⁴ ≤ a²b² + a²c² + b²c² + c⁴ ⟺ 2ab ≤ a² + b² ✓ — provable via nlinarith/sq_nonneg. But the a = (n−1/4) can be NEGATIVE (n = 0): then ab + c² could be < c² and the inequality √√ ≥ ab + c² with ab < 0: √((n−1/4)²+25)√((n+2)²+25) ≥ |(n−1/4)(n+2)| + 25·... — the safe form: √√ ≥ |ab| + c²? No — Cauchy gives √√ ≥ |ab| (from the c²≥... no: (a²+c²)(b²+c²) ≥ (ab+c²)² — if ab+c² > 0 always (c² = 25 > |ab| for small n): the square form (a²+c²)(b²+c²) ≥ (ab+c²)² holds always ✓ (it expands to (ab−...)... let me verify: (a²+c²)(b²+c²) − (ab+c²)² = a²c² + b²c² − 2abc² = c²(a−b)² ≥ 0 ✓ ALWAYS). So √((n−1/4)²+25)·√((n+2)²+25) ≥ |(n−1/4)(n+2) + 25| ≥ (n−1/4)(n+2) + 25 when the latter ≥ 0 (n ≥ 1: ✓; n = 0: (−1/4)(2) + 25 = 24.5 ≥ 0 ✓). So per-term ≤ 1/((n−1/4)(n+2) + 25) ≤ 1/(n² + 24.5) for n ≥ 1 (since (n−1/4)(n+2) = n² + (7/4)n − 1/2 ≥ n² for n ≥ 1? n² + 1.75n − 0.5 ≥ n² ⟺ 1.75n ≥ 0.5 ⟺ n ≥ 2/7 ✓ n ≥ 1). And n = 0: ≤ 1/24.5. Then Σ_{n≥0} ≤ 1/24.5 + Σ_{n≥1} 1/(n² + 24.5). Σ_{n≥1} 1/(n²+24.5) ≤ ∫₀^∞ dx/(x² + 24.5) = π/(2√24.5) = π/9.899 ≈ 0.317. Total ≤ 0.0408 + 0.317 = 0.358. |series| ≤ 2.25·0.358 = 0.806. Same as before ✓.
The Lean work: (i) the digamma series form from Zeta23 (digamma_series — need to check its exact statement and whether the difference-of-tsums is tractable), (ii) the per-term algebra (1/(w+n+1) − 1/(w₀+n+1)) = (w₀−w)/((w+n+1)(w₀+n+1)) — div_sub_div ✓, (iii) the norm bounds with the Cauchy step (sq_nonneg arithmetic), (iv) the sum bound Σ 1/(n²+24.5) ≤ 1/24.5 + π/(2√24.5) via the arctan-FTC machinery (from 5d: ∫dx/((x+a)²+c²) ≤ π/c exists? — 5d's `sum_eq_integral_add_integral_deriv` + arctan-FTC — let me check what exactly exists for the arctan integral).
Hmm — this is getting substantial too. Let me compare routes:
(A) Level-2 EM remainder |r| ≤ 1.2/|w|²: needs the second-order EM (sum_eq_integral_add_integral_deriv is first-order; is there a B̃₂ version? — the level-2 EM was built in LiRBound for the ζ integral (b2Fun machinery) — but for the DIGAMMA reciprocal sum I'd need sum_eq_integral... at level 2 — does Mathlib have it? The LiRBound b2Fun work was for a specific integral IBP. Building the second-order EM sum formula = significant).
(B) The Weierstrass-difference route: digamma_series difference + per-term norm bounds + the arctan sum bound. ~150-200 lines.
(C) The crude-5d route with sharpened constants for |im| ≥ 5: reuse norm_digamma_sub_log_le_of_two_le_abs_im's proof structure with c = 5: the bound becomes ≈ 1/(2·5) + π/(2·5) + ... hmm — the 5d proof gives ‖ψ(w) − log w‖ ≤ 3 uniformly; a sharper variant ‖ψ(w)−log w‖ ≤ C(|im|) would need re-running the whole 5d argument with the sharper numbers. Then |ψ(w)−ψ(w₀)| ≤ |log(w/w₀)| + 2·C(5). If C(5) ≈ 0.8: 0.9 + 1.6 = 2.5; ½·2.5 = 1.25 ≤ 2.1 ✓. But re-running 5d's proof with different constants is ~as much work as (B).
Actually — WAIT. Much simpler idea: bound the difference via the LOG + the crude 5d bound applied SMARTER. ‖ψ(w) − ψ(w₀)‖ ≤ ‖ψ(w) − log w‖ + ‖log w − log w₀‖ + ‖ψ(w₀) − log w₀‖ ≤ 3 + 0.9 + 3 = 6.9; ½·6.9 = 3.45 > 2.1. Over. Hmm. What if I only need to fit the FINAL assembly — let me recompute the budget precisely with piece 6 = ½·(|log diff| + 6):
Total const: piece1 0.9956 + piece2-const 2.7 + piece3-const 42.599 + pieces45 0.09 + piece6. Constraint: const ≤ 48 − (max of 11.813·LL − 4.560·L over L ≥ 2.485). The max of the LL−L function: critical point L* = 11.813/4.560 = 2.5906 (t = 11.34): value 11.813·log(2.5906) − 4.560·2.5906 = 11.813·0.9518 − 11.813 = 11.243 − 11.813 = −0.570. At L = 2.485 (t = 10): 11.813·0.9103 − 4.560·2.485 = 10.753 − 11.332 = −0.579. So max ≈ −0.57. const budget: 48 + (−0.57) = 48.57. Pieces 1-5 const: 0.9956 + 2.7 + 42.599 + 0.09 = 46.385. Piece 6 budget: 48.57 − 46.385 = 2.185. So ½|ψ-diff| ≤ 2.185 needed; ½(0.9 + 6) = 3.45 > 2.185 ✗. With the C(5)-sharpened 5d: ½(0.9 + 2·0.8) = 1.25 ✓. With the Weierstrass route: ½(0.806+0.09) = 0.45 ✓✓.
Hmm hold on — actually, let me reconsider the log-diff bound once more, because ½(0.9 + 2·3)... the +6 dominates. What if the ψ−log remainder is bounded directly by 1/|im w|-ish for |im| ≥ 5 via the FIRST-order EM remainder estimate that 5d already did but tracking the |im| dependence? 5d's bound ≤ 3 came from: the B̃₁ remainder ≤ π/(2c) (c = |im|) + boundary 1/|w| + StirlingVert part. For c = 5: π/10 = 0.314 + 1/5 = 0.2 + ... The 5d proof's constant 3 was loose. Re-deriving with c = 5: ‖ψ(w) − log w‖ ≤ (pieces) ≈ 0.1 + 0.314 + (StirlingVert diff at v ≈ 1/(6|v|²)·...) — actually the 5d proof's Stirling part: ψ(v) − log v for re v > 0 via digamma_stirling (Zeta23 StirlingVert) — what's the remainder there? digamma_stirling: ψ(v) = log v − 1/(2v) + O(1/|v|²)? The Zeta23 StirlingVert: `digamma_stirling` gives ‖ψ(v) − log v‖ ≤ something·... Let me check what 5d used: "StirlingVert digamma_stirling" — its bound? If digamma_stirling gives ‖ψ(v) − log v + 1/(2v)‖ ≤ C/|v|² then the whole piece 6 is easy: ψ(w) = log w − 1/(2w) + r(w) with |r| ≤ C/|w|² DIRECTLY from digamma_stirling for re w > 0 — and for re w ≤ 0 (our w has re ∈ [−5/4, 3/2]) via the shift w → w+2 (re+2 ∈ [3/4, 7/2] — still need re > 0 for Stirling? re w + 2 ≥ 3/4 > 0 ✓!). Let me check digamma_stirling's exact statement in Zeta23.
Let me check what Zeta23's `digamma_stirling` actually gives (it might make piece 6 nearly free).
tool: Bash
input
{
"command": "grep -rn \"theorem digamma_stirling\\|lemma digamma_stirling\" -A 6 D:/Python/Quantum/zeta-23-lean/Zeta23/ | head -20",
"description": "Read digamma_stirling statement"
}
raw content_json (database row)
[{"type":"thinking","thinking":"I see the 5d structure: the first-order EM (`sum_eq_integral_add_integral_deriv`) on f(y) = (w+y)⁻¹, with the B̃₁ remainder. For piece 6's sharp remainder, I'd need the SECOND-order EM (B̃₂). That's a heavier build.\n\nBUT — wait. Given the budget for piece 6 is now 2.1 (generous), do I even need the SHARP remainder? Let me reconsider: with the CRUDE 5d bound ‖ψ(w) − log w‖ ≤ 3:\n|ψ(w) − ψ(w₀)| ≤ |log w − log w₀| + ‖ψ(w)−log w‖ + ‖ψ(w₀)−log w₀‖ ≤ |log(w/w₀)| + 6.\n½·that ≤ ½·0.9 + 3 = 3.45 > 2.1. Just over. Hmm.\n\nMiddle route: get ‖ψ(w) − log w‖ ≤ something smaller for |im w| ≥ 5. The 5d bound ≤ 3 is uniform for |im| ≥ 2. For |im| ≥ 5 (our case: im w = t/2 ≥ 5), the bound improves: the B̃₁ remainder ∫ B̃₁(x)/(w+x)² dx ≤ (1/2)·∫ dx/|w+x|² ≤ (1/2)·(π/(2·|im w|))·... — the arctan integral ∫₀^∞ dx/((x+a)²+c²) ≤ π/c with c = |im w| ≥ 5: ≤ π/5 ≈ 0.628. And the boundary terms (w⁻¹ − (w+n)⁻¹)/2 ≤ (1/|w| + 1/|w+n|)/2 ≤ (1/5+1/5)/2 = 0.1. And the StirlingVert part at v (re v > 0, |im v| ≥ 5): ‖ψ(v) − log v‖ ≤ ... the 5d assembly gave 3 total with the crude pieces. For |im| ≥ 5 the remainder pieces shrink: the total ‖ψ(w) − log w‖ ≈ 1/(2|w|) + 0.63 + small ≤ 0.73-ish. Then |ψ-diff| ≤ 0.9 + 2·0.73 = 2.36; ½·2.36 = 1.18 ≤ 2.1 ✓. Hmm — but that requires redoing the 5d assembly with the sharper constants — comparable work to the level-2 EM.\n\nHold on — actually, is there a slicker approach entirely? The digamma DIFFERENCE directly: ψ(w) − ψ(w₀) = Σ_{j≥0} [1/(w₀+j) − 1/(w+j)] (the Weierstrass series difference — the series Σ_j (1/(w+j) − 1/(w₀+j)) converges since the terms are (w₀−w)/((w+j)(w₀+j)) ~ 1/j²). Zeta23's `DigammaSeries.digamma_series`: ψ(z) = −γ − 1/z + Σ'_n (1/(n+1) − 1/(z+n+1)) — exists (noted in D-068 §1: \"Zeta23 DigammaSeries.digamma_series ... exists, axiom-checked\"). So:\nψ(w) − ψ(w₀) = −(1/w − 1/w₀) + Σ'_{n≥0} [(1/(n+1) − 1/(w+n+1)) − (1/(n+1) − 1/(w₀+n+1))]\n = −(1/w − 1/w₀) + Σ'_{n≥0} (w − w₀)/((w+n+1)(w₀+n+1)).\nThe series: |w − w₀|·Σ'_n 1/(|w+n+1||w₀+n+1|). Now |w+n+1| ≥ |im w| = t/2 (n+1 real ≥ 0: |w+n+1| ≥ |im(w+n+1)| = t/2 ✓), similarly |w₀+n+1| ≥ t/2. And more precisely |w+n+1| ≥ √((n+1+re w)² + (t/2)²) ≥ √((n + 1 − 5/4)² + 25)... For the sum: Σ_{n≥0} 1/(|w+n+1||w₀+n+1|) ≤ Σ_{n≥0} 1/((n + a)² + (t/2)²) with a = 1 + min(re w, re w₀) hmm re w = σ/2 ∈ [−5/4, 3/2]: n+1+re w ≥ n − 1/4. So |w+n+1|² ≥ (n−1/4)² + (t/2)² and |w₀+n+1|² ≥ (n+2)² + (t/2)². The product sum: ≤ Σ_n 1/(((n−1/4)²+25)^{1/2}·((n+2)²+25)^{1/2})·... ≤ Σ_n 1/((n−1/4)² + 25)^{1/2}((n+2)²+25)^{1/2} — hmm. Bound each: |w+n+1||w₀+n+1| ≥ ((n−1/4)²+25)^{1/2}((n+2)²+25)^{1/2} ≥ ((n−1/4)(n+2) + 25)·... by Cauchy (a₁a₂ + b₁b₂ ≤ √(a₁²+b₁²)√(a₂²+b₂²)) — the reverse: √(a²+c²)√(b²+c²) ≥ ab + c² — hmm that gives |w+n+1||w₀+n+1| ≥ (n−1/4)(n+2) + 25 — for n ≥ 1: (n−1/4)(n+2) ≥ (3/4)·3 = 2.25: so ≥ 27.25 for n ≥ 1, and ≥ 25 for n = 0. Then Σ_n 1/(27.25-ish)?? — that's just the per-term bound 1/25 — DIVERGES (Σ 1/27 over all n). Need the j² decay: the product |w+n+1||w₀+n+1| ~ n² for large n: ≥ (n−1/4)(n+2) + 25 ≥ (n² + (7/4)n − 1/2) + 25 ≥ n² + 25 for n ≥ 1 (n² + 1.75n − 0.5 ≥ n² for n ≥ 0.3 ✓). So the terms ≤ 1/(n² + 25) for n ≥ 1 and ≤ 1/25 for n = 0. Σ_{n≥1} 1/(n²+25) ≤ ∫₀^∞ dx/(x²+25) = π/10 ≈ 0.314. Total ≤ 1/25 + 0.314 = 0.354. Then |series| ≤ 2.25·0.354 = 0.80. Plus |1/w − 1/w₀| = |w−w₀|/(|w||w₀|) ≤ 2.25/25 = 0.09. Total |ψ-diff| ≤ 0.80 + 0.09 = 0.89; ½·0.89 = 0.45. \n\nHmm — comparable to the log-route's 0.52. Both fine. But the Weierstrass-difference route avoids the log entirely and avoids EM! The catch: (i) need digamma_series from Zeta23 (exists, axiom-checked per D-068), (ii) the termwise difference of the two tsums (tsum_sub — both summable — is the digamma series summable in the Zeta23 form? digamma_series gives ψ(z) = −γ − 1/z + ∑' ... — the ∑' is summable by construction), (iii) the per-term algebra + the norm bound Σ 1/((n−1/4)²+25)-ish ≤ 1/25 + π/10 — the integral ∫₀^∞ dx/(x²+25) = π/10 needs the arctan FTC (5d used arctan-FTC: `∫dx/((x+a)²+c²) ≤ π/c` — machinery EXISTS from 5d ✓). \n\nHmm — the per-term bound 1/((n−1/4)²+25)^{1/2}((n+2)²+25)^{1/2} ≤ 1/(n²+25) via Cauchy — the Cauchy step in Lean: √((n−1/4)²+25)·√((n+2)²+25) ≥ (n−1/4)(n+2) + 25 — this is Cauchy-Schwarz (a·b + c·c ≤ √(a²+c²)√(b²+c²)) — Mathlib: `Real.inner_le_L2_mul_L2`? or for the explicit form: (a·b + c²)² ≤ (a²+c²)(b²+c²) ⟺ a²b² + 2abc² + c⁴ ≤ a²b² + a²c² + b²c² + c⁴ ⟺ 2ab ≤ a² + b² ✓ — provable via nlinarith/sq_nonneg. But the a = (n−1/4) can be NEGATIVE (n = 0): then ab + c² could be < c² and the inequality √√ ≥ ab + c² with ab < 0: √((n−1/4)²+25)√((n+2)²+25) ≥ |(n−1/4)(n+2)| + 25·... — the safe form: √√ ≥ |ab| + c²? No — Cauchy gives √√ ≥ |ab| (from the c²≥... no: (a²+c²)(b²+c²) ≥ (ab+c²)² — if ab+c² > 0 always (c² = 25 > |ab| for small n): the square form (a²+c²)(b²+c²) ≥ (ab+c²)² holds always ✓ (it expands to (ab−...)... let me verify: (a²+c²)(b²+c²) − (ab+c²)² = a²c² + b²c² − 2abc² = c²(a−b)² ≥ 0 ✓ ALWAYS). So √((n−1/4)²+25)·√((n+2)²+25) ≥ |(n−1/4)(n+2) + 25| ≥ (n−1/4)(n+2) + 25 when the latter ≥ 0 (n ≥ 1: ✓; n = 0: (−1/4)(2) + 25 = 24.5 ≥ 0 ✓). So per-term ≤ 1/((n−1/4)(n+2) + 25) ≤ 1/(n² + 24.5) for n ≥ 1 (since (n−1/4)(n+2) = n² + (7/4)n − 1/2 ≥ n² for n ≥ 1? n² + 1.75n − 0.5 ≥ n² ⟺ 1.75n ≥ 0.5 ⟺ n ≥ 2/7 ✓ n ≥ 1). And n = 0: ≤ 1/24.5. Then Σ_{n≥0} ≤ 1/24.5 + Σ_{n≥1} 1/(n² + 24.5). Σ_{n≥1} 1/(n²+24.5) ≤ ∫₀^∞ dx/(x² + 24.5) = π/(2√24.5) = π/9.899 ≈ 0.317. Total ≤ 0.0408 + 0.317 = 0.358. |series| ≤ 2.25·0.358 = 0.806. Same as before ✓.\n\nThe Lean work: (i) the digamma series form from Zeta23 (digamma_series — need to check its exact statement and whether the difference-of-tsums is tractable), (ii) the per-term algebra (1/(w+n+1) − 1/(w₀+n+1)) = (w₀−w)/((w+n+1)(w₀+n+1)) — div_sub_div ✓, (iii) the norm bounds with the Cauchy step (sq_nonneg arithmetic), (iv) the sum bound Σ 1/(n²+24.5) ≤ 1/24.5 + π/(2√24.5) via the arctan-FTC machinery (from 5d: ∫dx/((x+a)²+c²) ≤ π/c exists? — 5d's `sum_eq_integral_add_integral_deriv` + arctan-FTC — let me check what exactly exists for the arctan integral).\n\nHmm — this is getting substantial too. Let me compare routes:\n(A) Level-2 EM remainder |r| ≤ 1.2/|w|²: needs the second-order EM (sum_eq_integral_add_integral_deriv is first-order; is there a B̃₂ version? — the level-2 EM was built in LiRBound for the ζ integral (b2Fun machinery) — but for the DIGAMMA reciprocal sum I'd need sum_eq_integral... at level 2 — does Mathlib have it? The LiRBound b2Fun work was for a specific integral IBP. Building the second-order EM sum formula = significant).\n(B) The Weierstrass-difference route: digamma_series difference + per-term norm bounds + the arctan sum bound. ~150-200 lines.\n(C) The crude-5d route with sharpened constants for |im| ≥ 5: reuse norm_digamma_sub_log_le_of_two_le_abs_im's proof structure with c = 5: the bound becomes ≈ 1/(2·5) + π/(2·5) + ... hmm — the 5d proof gives ‖ψ(w) − log w‖ ≤ 3 uniformly; a sharper variant ‖ψ(w)−log w‖ ≤ C(|im|) would need re-running the whole 5d argument with the sharper numbers. Then |ψ(w)−ψ(w₀)| ≤ |log(w/w₀)| + 2·C(5). If C(5) ≈ 0.8: 0.9 + 1.6 = 2.5; ½·2.5 = 1.25 ≤ 2.1 ✓. But re-running 5d's proof with different constants is ~as much work as (B).\n\nActually — WAIT. Much simpler idea: bound the difference via the LOG + the crude 5d bound applied SMARTER. ‖ψ(w) − ψ(w₀)‖ ≤ ‖ψ(w) − log w‖ + ‖log w − log w₀‖ + ‖ψ(w₀) − log w₀‖ ≤ 3 + 0.9 + 3 = 6.9; ½·6.9 = 3.45 > 2.1. Over. Hmm. What if I only need to fit the FINAL assembly — let me recompute the budget precisely with piece 6 = ½·(|log diff| + 6):\n\nTotal const: piece1 0.9956 + piece2-const 2.7 + piece3-const 42.599 + pieces45 0.09 + piece6. Constraint: const ≤ 48 − (max of 11.813·LL − 4.560·L over L ≥ 2.485). The max of the LL−L function: critical point L* = 11.813/4.560 = 2.5906 (t = 11.34): value 11.813·log(2.5906) − 4.560·2.5906 = 11.813·0.9518 − 11.813 = 11.243 − 11.813 = −0.570. At L = 2.485 (t = 10): 11.813·0.9103 − 4.560·2.485 = 10.753 − 11.332 = −0.579. So max ≈ −0.57. const budget: 48 + (−0.57) = 48.57. Pieces 1-5 const: 0.9956 + 2.7 + 42.599 + 0.09 = 46.385. Piece 6 budget: 48.57 − 46.385 = 2.185. So ½|ψ-diff| ≤ 2.185 needed; ½(0.9 + 6) = 3.45 > 2.185 ✗. With the C(5)-sharpened 5d: ½(0.9 + 2·0.8) = 1.25 ✓. With the Weierstrass route: ½(0.806+0.09) = 0.45 ✓✓.\n\nHmm hold on — actually, let me reconsider the log-diff bound once more, because ½(0.9 + 2·3)... the +6 dominates. What if the ψ−log remainder is bounded directly by 1/|im w|-ish for |im| ≥ 5 via the FIRST-order EM remainder estimate that 5d already did but tracking the |im| dependence? 5d's bound ≤ 3 came from: the B̃₁ remainder ≤ π/(2c) (c = |im|) + boundary 1/|w| + StirlingVert part. For c = 5: π/10 = 0.314 + 1/5 = 0.2 + ... The 5d proof's constant 3 was loose. Re-deriving with c = 5: ‖ψ(w) − log w‖ ≤ (pieces) ≈ 0.1 + 0.314 + (StirlingVert diff at v ≈ 1/(6|v|²)·...) — actually the 5d proof's Stirling part: ψ(v) − log v for re v > 0 via digamma_stirling (Zeta23 StirlingVert) — what's the remainder there? digamma_stirling: ψ(v) = log v − 1/(2v) + O(1/|v|²)? The Zeta23 StirlingVert: `digamma_stirling` gives ‖ψ(v) − log v‖ ≤ something·... Let me check what 5d used: \"StirlingVert digamma_stirling\" — its bound? If digamma_stirling gives ‖ψ(v) − log v + 1/(2v)‖ ≤ C/|v|² then the whole piece 6 is easy: ψ(w) = log w − 1/(2w) + r(w) with |r| ≤ C/|w|² DIRECTLY from digamma_stirling for re w > 0 — and for re w ≤ 0 (our w has re ∈ [−5/4, 3/2]) via the shift w → w+2 (re+2 ∈ [3/4, 7/2] — still need re > 0 for Stirling? re w + 2 ≥ 3/4 > 0 ✓!). Let me check digamma_stirling's exact statement in Zeta23.","signature":""},{"type":"text","text":"Let me check what Zeta23's `digamma_stirling` actually gives (it might make piece 6 nearly free)."},{"type":"tool_use","id":"Bash_214","name":"Bash","input":{"command":"grep -rn \"theorem digamma_stirling\\|lemma digamma_stirling\" -A 6 D:/Python/Quantum/zeta-23-lean/Zeta23/ | head -20","description":"Read digamma_stirling statement"},"extra_content":null}]