← Session 21 — Tier ii′ planning + launch: close SfBoundProp in Lean (D-064)
thinking (21914 chars)
Now I understand the full accounting. Let me reconstruct the exact identity structure from D-037 line 63 and §4:
D-037's identity (line 63):
```
S_f(n) = Σ_{|γ|≤T}′ [1 − (ρ/(ρ−1))ⁿ]·(−1) + (1/2πi)(I_I+I_II+I_III+I_IV) + triv(−2)
```
and the bound (4.1): B(n) = 2N(T) + [I_III] + [40M₀] + [horizontals] + [I_I] + 1.
Wait — but where's the "height-window slack" 4C₀ term from D-036 §4? D-036 had "|S_f(n)| ≤ 2N(√n) + 4C₀(√n+1) + |I_I| + |I_II| + |I_IV| + |I_III| + 1" — the 4C₀ is the slack between the truncated sum at √n vs at T. In B(n) as formalized in Lean (Bn def): `2*F T + 4*T*(...) + 40*1.3352 + 2*(exp 4 + 1)*(7*Hhat T + 3.3) + IIMaj n + 1` — the first term is 2F(T) (zero count at T = √n+1, majorizing 2N(T)+slack presumably). OK.
Now the exact identity bookkeeping. S_f is DEFINED (in the Lean code, and effectively in the assembly) as S_∞ + 1 − λ_n. The contour identity must produce: S_∞ + 1 − λ_n = [something bounded by B(n)]. Let me re-derive cleanly:
Residue theorem on the rectangle R_T (T zero-avoiding):
(1/2πi)∮_{∂R_T} k_n(w−1)(−ζ′/ζ(w)) dw = Σ_{poles inside} Res
Poles inside: nontrivial zeros ρ with |γ| < T (Res = 1−(ρ/(ρ−1))ⁿ each, assuming simple; with multiplicity m: residue is m·(1−(ρ/(ρ−1))ⁿ) — since −ζ′/ζ has residue −m), the trivial zero −2 (Res = 1−(2/3)ⁿ), and w = 1 (Res = Σ_{j=1}^n C(n,j)c_{j−1} =: Res₁(n)).
Wait, actually also: does k_n(w−1) = (1+1/(w−1))ⁿ − 1 have other poles? Only at w = 1. And −ζ′/ζ poles: zeros of ζ (nontrivial AND trivial) and w = 1. Also w = 0? −ζ′/ζ at w=0: ζ(0) = −1/2 ≠ 0, so no pole. But k_n(w−1) at w = 0 is fine (k_n(−1) = 0ⁿ−1 = −1). OK so poles: nontrivial zeros inside, −2, −4? (−4 < −2.5 not inside), and w = 1.
So: (1/2πi)∮ = Σ_{|γ|<T} mult·[1−(ρ/(ρ−1))ⁿ] + [1−(2/3)ⁿ] + Res₁(n). (∗)
Now, S_f in the sense of D-037's identity: comparing with line 63, D-037's identity says:
S_f(n) = −Σ_{|γ|≤T}′ [1−(ρ/(ρ−1))ⁿ] + (1/2πi)(sides) + triv(−2)
Substituting (∗): −Σ + sides + triv = −[sides − triv − Res₁] + sides + triv = 2·triv + Res₁(n)?? That gives S_f = Res₁ + 2·triv which is nonsense dimensionally... UNLESS D-037's "triv(−2)" means MINUS the trivial residue, i.e. the identity is:
S_f = −[Σ_{|γ|≤T}(...) + triv] + sides = −(sides − Res₁) + sides = Res₁.
Hmm, that gives S_f = Res₁(n)?? Also nonsense (Res₁ ~ S_∞-scale ~ ½n log n, and |S_f| ≤ 13 measured).
I think D-037's line-63 "identity" has a sign issue or is written in a compressed form where S_f on the LHS means the truncated zero sum (not S_∞ + 1 − λ_n). Let me not relitigate D-037's compressed notation — instead derive the CORRECT identity from scratch, which is what D-064 needs anyway:
DEFINITION (Lean): Sf n = SInfty n + 1 − (liCoeff n).re, liCoeff = paired λ_n.
GOAL: |Sf n| ≤ Bn.
From (∗): Σ_{|γ|<T} mult·[1−(ρ/(ρ−1))ⁿ] = sides − [1−(2/3)ⁿ] − Res₁(n).
λ_n (paired full sum) = Σ_all mult·[1−(1−1/ρ)ⁿ] — and re-indexing by ρ ↦ 1−ρ̄ (reflect) — hmm wait, the pairing in liCoeffP is f(ρ)+f(ρ̄) over all ρ halved... the full sum Σ_all f(ρ) where f(ρ) = 1−(1−1/ρ)ⁿ: re-index ρ ↦ 1−ρ (symmetry of the zero set, multiplicity-preserving): Σ_all f(1−ρ) = Σ_all [1−(1−1/(1−ρ))ⁿ] = Σ_all [1−(ρ/(ρ−1))ⁿ] ✓. So λ_n = Σ_all [1−(ρ/(ρ−1))ⁿ] (equal as convergent sums — with pairing this is fine).
Split: λ_n = Σ_{|γ|<T} [1−(ρ/(ρ−1))ⁿ] + tail(T), where tail(T) = Σ_{|γ|≥T} paired.
Substitute: λ_n = sides − [1−(2/3)ⁿ] − Res₁(n) + tail(T).
Sf = S_∞ + 1 − λ_n = S_∞ + 1 + Res₁(n) + [1−(2/3)ⁿ] − sides − tail(T).
THE KEY IDENTIFICATION (the w=1 crux):
S_∞(n) + 1 + Res₁(n) + [1−(2/3)ⁿ] = 0 ???
i.e. Res₁(n) = −S_∞(n) − 2 + (2/3)ⁿ ??
Check numerically at small n! Let me sanity check with n = 1: λ_1 = Σ[1−(1−1/ρ)] = Σ 1/ρ (paired) = 1 + γ/2 − log(2√π) ≈ 0.0230957 (the classical Keiper λ_1). S_∞(1): from the def SInfty 1 = (1−a₁)·1 − 1 + Σ_{m odd ≥3} [(1−1/m) − 1 + 1/m] = (1−a₁) − 1 + 0 = −a₁ = −(log 4π + γ)/2 ≈ −(2.5310+0.5772)/2 ≈ −1.5541. Sf(1) = S_∞(1) + 1 − λ_1 ≈ −1.5541 + 1 − 0.0231 = −0.5772 = −γ. Hmm interesting: S_f(1) = −γ (the Stieltjes constant γ_0 = γ with sign: S_f(1) should be... BL: λ_1 = S_∞(1) − S_f(1) + 1 ⟹ S_f(1) = S_∞(1) + 1 − λ_1 ✓ consistent.)
Now Res₁(1) = Σ_{j=1}^1 C(1,j)c_{j−1} = c_0 = the constant term of −ζ′/ζ at s=1. −ζ′/ζ(s) = 1/(s−1) − γ + O(s−1) (since ζ′/ζ(s) = −1/(s−1) + γ + ..., from ζ(s) = 1/(s−1) + γ − γ₁(s−1)...: logarithmic derivative: ζ′/ζ = [−1/(s−1)² − γ₁ + ...]/[1/(s−1) + γ + ...] = [−1/(s−1)²(1 + γ₁(s−1)²+...)]·[(s−1)(1 − γ(s−1) + ...)] = −(1/(s−1))(1 − γ(s−1)+...) = −1/(s−1) + γ + O(s−1) ✓). So c_0 = −γ (the constant term of −ζ′/ζ). Res₁(1) = c_0 = −γ.
Check the key identification at n=1: S_∞(1) + 1 + Res₁(1) + [1−(2/3)¹] = −1.5541 + 1 + (−0.5772) + 1/3 = −0.7980?? ≉ 0. Hmm. So the identification S_∞+1+Res₁+triv = 0 FAILS at n=1. Let me recheck.
Actually — wait. Maybe the trivial-zero residue sign: triv = 1−(ρ/(ρ−1))ⁿ at ρ=−2: ρ/(ρ−1) = (−2)/(−3) = 2/3; triv = 1 − (2/3)ⁿ. At n=1: triv = 1/3 ✓ as I had. Hmm.
And Sf(1) = −γ ≈ −0.5772. And −sides − tail... at n=1, can I check the identity Sf = S_∞+1+Res₁+triv − sides − tail? ⟹ −0.5772 = −0.7980 − sides − tail ⟹ sides + tail = −0.2208. Plausible (sides and tail are n-dependent quantities I can't eyeball). So the identity Sf = [S_∞+1+Res₁+triv] − sides − tail is the bookkeeping, and the bracket does NOT vanish at n=1 — fine, because the bracket isn't supposed to vanish in general?! But then bounding |Sf| needs the bracket bounded...
Hmm wait, no. Let me redo. The issue: what does "S_f" MEAN in D-037's bound B(n)? The bound (4.1) has components: 2N(T) [zero sum truncation], sides, triv, NO Res₁ term and NO tail term. For |Sf| = |S_∞ + 1 − λ_n| to be bounded by those pieces, the assembly must be:
λ_n = Σ_{|γ|≤T} + tail, and Σ_{|γ|≤T} = sides − triv − Res₁ (∗), so
Sf = S_∞ + 1 − Σ_{|γ|≤T} − tail = S_∞ + 1 − sides + triv + Res₁ − tail.
|Sf| ≤ |S_∞ + 1 + Res₁ + triv| + |sides| + |tail|.
For B(n) (4.1) to bound this, we need |S_∞+1+Res₁+triv| ≤ 2N(T)??? That's weird. 2N(T) ~ (√n/π)log... and S_∞+1+Res₁+triv at general n: S_∞ ~ ½n log n; Res₁ = Σ_j C(n,j)c_{j−1} — the c's are Stieltjes-scale; this sum is also ~ −½n log n (they cancel!). The DIFFERENCE S_∞+1+Res₁+triv is the small thing... at n=1: −0.798, small ✓. And 2N(T) at n=1: T = 2, N(2) = 0 — hmm, that bound would fail at n=1, but the theorem range is n ≥ 10⁵ anyway.
Hmm, so maybe the actual Lagarias identity is: S_∞(n) + 1 + Res₁(n) + triv(n) = −Σ_{|γ|≤T}′·... no wait. Let me think about what Res₁ actually equals via the GLOBAL argument:
Alternative clean derivation (Lagarias's approach): apply the residue theorem to the SAME integrand but on a DIFFERENT contour family, or evaluate λ_n's truncation directly. Actually the cleanest: consider the contour integral and let T → ∞ along zero-avoiding heights: the sides → 0 (needs decay — the horizontal sides decay, vertical sides: I_III left vertical does NOT decay as T → ∞... so that limit doesn't literally vanish. Hmm, Lagarias variant B uses the finite-T identity as is.)
OK here's the resolution — Lagarias Thm 6.1's actual identity (variant B). I recall now: Lagarias's (6.2)-style identity for the quantity he calls S_f(n) — actually in Lagarias's paper, Theorem 6.1 bounds |S_f(n)| by a contour argument applied DIRECTLY to the representation S_f(n) = −(1/2πi)∮ ... hmm.
Let me look at it differently. The quantity with a clean contour representation is the TRUNCATED zero sum:
Σ_{|γ|<T}′ [1−(ρ/(ρ−1))ⁿ] = sides − triv − Res₁ (∗)
And S_f (BL's finite part) has the zero-sum representation S_f(n) = Σ_ρ′ [1−(ρ/(ρ−1))ⁿ] (full sum, paired) — this is the BL Thm 2 content: λ_n = S_∞ − S_f + 1 with S_f the full zero sum. Then:
Sf(Lean) = S_∞ + 1 − λ_n = S_f(BL's zero sum) [by BL Thm 2].
So the Lean quantity EQUALS the full zero sum (this is a THEOREM to prove: BL Thm 2, i.e. λ_n + S_f,full = S_∞ + 1 — the archimedean/zero split). And the full zero sum splits:
S_f,full = Σ_{|γ|<T} + tail = [sides − triv − Res₁] + tail (∗∗)
|Sf| ≤ |sides| + |triv| + |Res₁| + |tail|. But |Res₁| ~ ½n log n is HUGE — so this decomposition is useless UNLESS Res₁ is small, which it isn't. The resolution: Res₁ must be combined with something. AH — I see it now: the full zero sum S_f,full is only defined via pairing/principal value, and its decomposition (∗∗) has Res₁ large and tail large with cancellation between... no...
Hmm, let me just carefully reconsider. Actually the clean classical statement (Lagarias 6.2):
S_f(n) := lim_{T→∞} [Σ_{|γ|<T}′ 1−(ρ/(ρ−1))ⁿ] exists (conditionally), and the finite-T identity:
Σ_{|γ|<T}′ [1−(ρ/(ρ−1))ⁿ] = (1/2πi)∮_{R_T} − triv − Res₁
is exact. The bound on |S_f| then comes from:
|S_f| ≤ |Σ_{|γ|<T}| + |tail_T| = |sides − triv − Res₁| + |tail_T| — with the Res₁ INSIDE. Since |Res₁| ~ ½n log n, and the sides are O(√n log n), and tail_T = o(1) as T → ∞... this gives |S_f| ≤ ½n log n-ish — TRUE but useless (need √n log n-scale).
Something's off in my residue bookkeeping. Let me recompute the w=1 residue's ROLE. AH WAIT. I think the issue is the sign/direction of the identity: maybe the integrand is k_n(w−1)(−ζ′/ζ) and the identity relates to Σ[1−(ρ/(ρ−1))ⁿ] but S_f's archimedean counterpart... Let me recompute Res₁ for general n and compare with S_∞(n):
Res₁(n) = Σ_{j=1}^n C(n,j) c_{j−1}, c_k = Laurent coeffs of −ζ′/ζ at 1.
Claim (Lagarias (4.11) connection): S_∞(n) = Σ_{j=1}^n (−1)^j C(n,j) a_j, a_1 = (log 4π+γ)/2, a_j = (1−2^{−j})ζ(j) (j ≥ 2).
Is Res₁(n) = −S_∞(n) + (lower)? Let me check at n=1: Res₁(1) = c_0 = −γ ≈ −0.5772. −S_∞(1) = a₁ ≈ 1.5541. Not equal, difference = 1.5541 − 0.5772 = 0.9769 ≈ 1 − 0.0231 = 1 − λ_1!! Indeed: Sf(1) = S_∞(1)+1−λ_1 = −γ = c_0 — SO: S_f(1) = Res₁(1) EXACTLY. Interesting!! So maybe the identity is S_f(n) = Res₁(n) + [trivial-zero contributions]? Check the pattern: S_f(n) = S_∞+1−λ_n. Hmm at n=1 S_f = Res₁. Let me test the hypothesis "Sf(n) = Res₁(n) + Σ_{trivial zeros} [contribution]" at general n via the FUNCTIONAL-EQUATION level: the full zero sum S_f = Σ′_ρ[1−(ρ/(ρ−1))ⁿ] (all nontrivial, paired) and the CLAIM is:
S_∞(n) + 1 − λ_n = S_f(n) [BL] — fine. Now compute S_f via a DIFFERENT contour: integrate k_n(w−1)(−ζ′/ζ) over a contour enclosing ALL nontrivial zeros and nothing else (e.g., the limit of R_T as T→∞, σ₁ → ∞, σ₀ → −∞...). If the integrand decays sufficiently, the total integral over a contour at infinity = 0, giving: Σ_nontrivial + Σ_trivial + Res₁ + Res_{w=0}? = 0... w=0: k_n(w−1) at w=0 fine, −ζ′/ζ at 0: ζ(0) = −1/2 ≠ 0, no pole. So: Σ_nontrivial[1−(ρ/(ρ−1))ⁿ] + Σ_{trivial ρ=−2k}[1−(ρ/(ρ−1))ⁿ] + Res₁ = 0 (if the contour at infinity vanishes).
Σ_trivial: ρ = −2k: ρ/(ρ−1) = 2k/(2k+1): Σ_{k≥1} [1−(2k/(2k+1))ⁿ].
At n=1: Σ [1−2k/(2k+1)] = Σ 1/(2k+1) = DIVERGES! So the contour-at-infinity argument fails / the trivial sum doesn't converge at n=1... for general n: 1−(2k/(2k+1))ⁿ ~ n/(2k) — diverges too. So the trivial zeros sum diverges — consistent with the fact that S_f's zero sum only converges conditionally with specific pairing, and the trivial zeros enter the bookkeeping through the archimedean side. So the "contour at infinity" argument is WRONG as stated — the integrand doesn't decay (left vertical side blows up). This is exactly why the finite-T identity + the archimedean computation is needed.
FINE. The correct classical bookkeeping (Lagarias Thm 6.1 variant B, as D-036/D-037 actually do it): the identity is at FINITE T:
(∗) Σ_{|γ|<T}′ [1−(ρ/(ρ−1))ⁿ] = sides(T) − triv − Res₁(n)
and the quantity bounded is the TRUNCATED sum |Σ_{|γ|<T}′| ≤ |sides| + |triv| + |Res₁|. Then the connection to Sf(Lean) = S_∞ + 1 − λ_n:
Sf = S_∞ + 1 − λ_n = S_∞ + 1 − Σ_{|γ|<T} − tail = S_∞ + 1 + Res₁ + triv − sides − tail.
Now the KEY: identify S_∞(n) + 1 + Res₁(n) + triv(n). Lagarias's content (the archimedean computation): the claim must be
S_∞(n) + 1 + Res₁(n) + [1−(2/3)ⁿ] = 0 ∀n ??? — but I numerically checked n=1: −1.5541+1−0.5772+0.3333 = −0.798 ≠ 0. So FALSE.
Alternative: maybe Res₁ as I defined it is missing a piece: the integrand is k_n(w−1)(−ζ′/ζ(w)). At w=1, k_n(w−1) = (w/(w−1))ⁿ − 1 = Σ_{j=1}^n C(n,j)(w−1)^{−j} ✓ pole order n. −ζ′/ζ ~ 1/(w−1). Product pole order n+1 ✓. Res = Σ_{j=1}^n C(n,j)·[coeff of (w−1)^{j−1} in (−ζ′/ζ)] = Σ_j C(n,j)c_{j−1} ✓. At n=1: c_0 = −γ ✓.
Hmm so at n=1: Sf(1) = −γ = Res₁(1) exactly. And S_∞(1) + 1 + triv(1) = −0.2208... so Sf(1) = Res₁(1) means S_∞+1−λ_1 = Res₁ ⟹ Res₁ − triv + ... hmm: −γ = −γ ✓. So the identity Sf = Res₁ + [S_∞+1+... ] hmm I keep going in circles.
NEW HYPOTHESIS: Sf(n) = Res₁(n) for all n?? Check at n=1 ✓. In general: Sf = S_∞+1−λ_n; Res₁ = Σ_j C(n,j)c_{j−1}. Is S_∞+1−λ_n = Σ_j C(n,j)c_{j−1}? At n=2: λ_2 = 0.09238...; S_∞(2) = (1−a₁)2 − 1 + Σ_{m odd}[(1−1/m)²−1+2/m] = 2−2a₁−1 + Σ[1/m² + 1/m·... (1−1/m)² = 1−2/m+1/m², so summand = 1/m²]. Σ_{m odd≥3} 1/m² = (1−2^{−2})ζ(2) − 1 = (3/4)(π²/6) − 1 = π²/8 − 1 ≈ 0.2337. S_∞(2) = 1 − 2a₁ + 0.2337 = 1 − 3.1082 + 0.2337 = −1.8745. Sf(2) = −1.8745 + 1 − 0.09238 = −0.9669. Res₁(2) = Σ_{j=1}^2 C(2,j)c_{j−1} = 2c_0 + c_1. c_1 = coeff of (s−1) in −ζ′/ζ: from ζ′/ζ = −1/(s−1) + γ + γ₁′(s−1)+...: Stieltjes: ζ(s) = 1/(s−1) + Σ_{k≥0} (−1)^k γ_k/k! (s−1)^k. log ζ = −log(s−1) + log(1 + (s−1)Σ...) = −log(s−1) + γ(s−1) + ...; ζ′/ζ = −1/(s−1) + γ + (γ₁+γ²)(s−1)... let me be careful: log(1 + γ(s−1) − γ₁(s−1)²/2 + ...) = γ(s−1) + [−γ₁/2 − γ²/2](s−1)² + ... So ζ′/ζ(s) = −1/(s−1) + γ + 2(−γ₁/2 − γ²/2)(s−1) + ... = −1/(s−1) + γ − (γ₁+γ²)(s−1) + ... So −ζ′/ζ = 1/(s−1) − γ + (γ₁+γ²)(s−1) + ...: c_0 = −γ, c_1 = γ₁ + γ². Res₁(2) = 2(−γ) + (γ₁+γ²) = γ² − 2γ + γ₁ = 0.3327 − 1.1544 + (−0.0728) = −0.8945. But Sf(2) = −0.9669. NOT EQUAL (−0.8945 vs −0.9669). Difference = 0.0724 ≈ triv(2) = 1−(2/3)² = 5/9 = 0.5556? No. Difference 0.0724... Hmm what's 0.0724? λ-related? Unclear.
So Sf ≠ Res₁ at n=2. Difference Sf − Res₁ = −0.0724. Hmm, and at n=1 difference was 0. So the correct identity is Sf(n) = Res₁(n) + δ(n) with δ(1) = 0, δ(2) = −0.0724. What could δ be? Maybe δ(n) = Σ_{trivial zeros} something that converges... at n=2: trivial ρ=−2: 1−(2/3)² = 5/9 ≈ 0.556; ρ=−4: 1−(4/5)² = 9/25 = 0.36; sum over all trivial = Σ_{k≥1} 1−(2k/(2k+1))² = Σ [(4k+1)/(2k+1)²] ~ Σ 1/k diverges. So no.
Let me reconsider: maybe δ(n) = −[k_n(0)·something]... at w = 0: is there really no pole? −ζ′/ζ(0): ζ(0) = −1/2, ζ′(0) = −(1/2)log(2π): ζ′/ζ(0) = log(2π). No pole ✓.
Alternatively δ(n) might come from my WRONG assumption that S_f's zero sum re-indexes via ρ ↦ 1−ρ. Check at n=1: λ_1 = Σ 1/ρ paired = 2Σ_{upper} Re(1/ρ)... = 0.0231 ✓ classical. Σ[1−(ρ/(ρ−1))ⁿ] at n=1 = Σ[1−ρ/(ρ−1)] = Σ[1/(1−ρ)] = Σ 1/(1−ρ) paired = same value 0.0231 (by ρ ↦ 1−ρ symmetry) ✓ consistent.
OK here's another candidate: the contour residues at zeros give k_n(ρ−1)·(−1) = −[(1+1/(ρ−1))ⁿ − 1] = −[(ρ/(ρ−1))ⁿ − 1] = 1 − (ρ/(ρ−1))ⁿ ✓. Hmm wait — actually is Res(−ζ′/ζ) at a simple zero = −1? ζ′/ζ at simple zero ρ: ζ = (s−ρ)h, ζ′/ζ = 1/(s−ρ) + h′/h, residue +1. So −ζ′/ζ has residue −1 ✓. Res of product = k_n(ρ−1)·(−1) = −(ρ/(ρ−1))ⁿ + 1 = 1 − (ρ/(ρ−1))ⁿ ✓.
And maybe the identity I should check is Sf = −[Σ_{|γ|<T} + triv] + sides with NO Res₁ and NO S_∞ separately — i.e., Lagarias's S_f(n) is DEFINED as the full zero sum (not via S_∞), and BL's identity is λ_n = S_∞ − S_f + 1. In our Lean: Sf := S_∞ + 1 − λ_n, so Sf = S_f(full zero sum) is exactly BL Thm 2 — the identity to PROVE is:
S_∞(n) + 1 − λ_n = Σ_full′[1−(ρ/(ρ−1))ⁿ] (BL2)
and separately the finite-T truncation:
Σ_{|γ|<T}[1−(ρ/(ρ−1))ⁿ] = sides − triv − Res₁ (∗)
Combining: Sf = Σ_full = Σ_{|γ|<T} + tail = sides − triv − Res₁ + tail.
Hmm, STILL has Res₁ (~½n log n, huge) — UNLESS tail ~ −Res₁ (cancellation between tail and Res₁). tail = Σ_{|γ|>T}[1−(ρ/(ρ−1))ⁿ] — paired, each pair ~ 2n(1−σ)... ~ O(n²/γ²)? For γ ≫ n: pair ≈ 2nβ/|ρ|²·... earlier: pair ≈ 2nσ/|ρ|² for the (1−1/ρ) form; for the (ρ/(ρ−1)) form at the reflected zero it's the same set. tail ≈ Σ_{γ>T} 2n/γ² ≈ 2n·log T/(2πT) ≈ (n log T)/(πT) ≈ √n log n/π. NOT ~½n log n. So tail is small and Res₁ is big — they don't cancel; so "Sf = sides − triv − Res₁ + tail" CANNOT be right numerically: at n=2, T=√2+1≈2.41: sides−triv−Res₁+tail should = Sf = −0.9669. Res₁(2) = −0.8945, triv(2) = 5/9 = 0.5556: −triv−Res₁ = −0.5556+0.8945 = 0.3389; tail ≈ small; so sides ≈ −0.9669 − 0.3389 − tail ≈ −1.3-ish. Fine, that's a statement about the sides integral — plausible. So (∗) is consistent after all — the truncated sum Σ_{|γ|<2.41} = 0 (no zeros with |γ| < 2.41!) = sides − triv − Res₁ = −1.3 + ... wait Σ_{|γ|<2.41} = 0 means sides = triv + Res₁ = 0.5556 − 0.8945 = −0.3389. And Sf = 0 + tail = −0.9669 = tail?! tail at n=2 = Σ_{|γ|>2.41} = ALL zeros = λ_2's reindexed form = λ_2 = 0.09238?? But Sf(2) = −0.9669 ≠ 0.0924. CONTRADICTION!
So Sf ≠ Σ_full[1−(ρ/(ρ−1))ⁿ]. I.e., BL2 as I wrote it is WRONG. The BL finite part S_f is NOT Σ[1−(ρ/(ρ−1))ⁿ]. Let me get BL's actual definitions: λ_n = Σ_ρ [1−(1−1/ρ)ⁿ]. And the decomposition λ_n = S_∞ − S_f + 1... From Sf = S_∞+1−λ_n: Sf(1) = −γ, Sf(2) = −0.9669. What is Σ_full[1−(ρ/(ρ−1))ⁿ]? At n=1: Σ 1/(1−ρ) = λ_1 = 0.0231 (by symmetry) — but Sf(1) = −γ = −0.577. So S_f ≠ Σ[1−(ρ/(ρ−1))ⁿ]. CONFIRMED. The contour identity (∗) computes the TRUNCATED version of a sum that is NOT S_f. So how does D-037 connect them??
D-037's line 63: "S_f(n) = Σ_{|γ|≤T}′ [1 − (ρ/(ρ−1))ⁿ]·(−1) + (1/2πi)(I_I+I_II+I_III+I_IV) + triv(−2)". With (∗): Σ_{|γ|≤T} = sides − triv − Res₁, D-037's claim reads: S_f = −(sides − triv − Res₁) + sides + triv(−2) = Res₁ + triv + triv(−2). If triv(−2) = −triv: S_f = Res₁. But numerically Sf(2) = −0.9669 vs Res₁(2) = −0.8945. STILL off by 0.0724.
Hmm!! What is 0.0724... Let me compute Σ_trivial[1−(2k/(2k+1))²] partial: k=1: 5/9=0.5556, k=2: 1−(4/5)²=0.36, k=3: 1−(6/7)²=0.2653, k=4: 0.21, ... diverges. Not that. What about [1−(2/3)ⁿ]−[something]... 0.0724 ≈ γ₁-related? γ₁ = −0.0728. δ(2) = −0.0724 ≈ γ₁ = −0.0728?! Close but let me compute more precisely: Sf(2): λ_2 = Σ[1−(1−1/ρ)²] = Σ[2/ρ − 1/ρ²] paired. λ_2 = 0.092383... let me get more digits: known value λ_2 ≈ 0.09238303922. S_∞(2) = 1 − 2a₁ + π²/8 − 1 = −2a₁ + π²/8: a₁ = (log 4π + γ)/2 = (2.531024 + 0.5772157)/2 = 1.554120. S_∞(2) = −3.108240 + 1.233701 = −1.874539. Sf(2) = −1.874539 + 1 − 0.092383 = −0.966922. Res₁(2) = 2c_0 + c_1 = −2γ + (γ₁ + γ²)... let me recompute c_1 carefully. ζ(s) = 1/(s−1) + Σ_{k=0}^∞ (−1)^k γ_k/k! (s−1)^k. Write u = s−1. ζ = u⁻¹(1 + γu − γ₁u²/2 + γ₂u³/6 − ...). log ζ = −log u + log(1 + γu − γ₁u²/2 + ...) = −log u + [γu − γ₁u²/2 − (γu)²/2 + O(u³)] = −log u + γu − (γ₁+γ²)u²/2 + O(u³). d/ds: ζ′/ζ = −u⁻¹ + γ − (γ₁+γ²)u + O(u²). −ζ′/ζ = u⁻¹ − γ + (γ₁+γ²)u + O(u²). c_0 = −γ ✓, c_1 = γ₁ + γ² ✓. γ₁ = −0.0728158455, γ² = 0.3327 (0.5772157² = 0.333177). c_1 = −0.072816 + 0.333177 = 0.260361. Res₁(2) = 2(−0.577216) + 0.260361 = −1.154432 + 0.260361 = −0.894071. Sf(2) − Res₁(2) = −0.966922 + 0.894071 = −0.072851 ≈ γ₁ = −0.0728158... close but not exact (−0.072851 vs −0.072816, diff 3.5e-5 — probably my λ_2 rounding). Actually let me not chase: the pattern δ(2) ≈ γ₁ suggests δ(n) relates to deeper Stieltjes structure — i.e., Sf(n) ≠ Res₁(n) + simple.
Hmm wait — maybe I have Sf's sign convention wrong vs D-037's "S_f". D-037 uses BL's convention λ_n = S_∞ − S_f + 1, so S_f = S_∞ + 1 − λ_n ✓ matches Lean's Sf ✓. So S_f(2) = −0.9669.
Let me look up what Lagarias's Thm 6.1 actually bounds... In Lagarias's paper (math/0404394, in our archive research/paper/), §6: he defines S_f(n) and proves |S_f(n)| ≤ ... via the contour. The quantity he contours is presumably NOT S_f directly but the zero-sum Σ[1−(ρ/(ρ−1))ⁿ]... and the relationship S_f = that sum MINUS Res₁-type archimedean terms...
I recall now (BL 1999): the finite part S_f(n) is defined as the sum over zeros S_f(n) = Σ_ρ [1 − (ρ/(ρ−1))ⁿ] — NO wait, that's λ-type. Let me think about BL's actual decomposition: they write λ_n = Σ_ρ[1−(1−1/ρ)ⁿ] and split via the Hadamard product into archimedean (S_∞) and zero (S_f) parts: S_f(n) = Σ_ρ [1 − (ρ/(ρ−1))ⁿ]?? The two sums differ: 1−(1−1/ρ)ⁿ at ρ vs 1−(ρ/(ρ−1))ⁿ = 1−(1−1/(1−ρ))ⁿ at 1−ρ — same by symmetry! So Σ[1−(ρ/(ρ−1))ⁿ] = λ_n (reindexed). So S_f(BL) can't be that either.
The actual BL split: λ_n = S_∞(n) − S_f(n) + 1 where
S_∞(n) = Σ_{j=1}^n (−1)^{j+1}... archimedean = the (4.11) sum, and
S_f(n) = ... the "finite primes" part — NO, there are no primes here; S_f = "finite part" = zero-side? In BL's notation: λ_n = S_∞(n) − S_f(n) + 1 with S_∞ the archimedean contribution and S_f the contribution of the finite... hmm, actually I believe BL define: S_f(n) = Σ_ρ [1 − (1 − 1/ρ)^{−n}]?? Note (1−1/ρ)^{−1} = ρ/(ρ−1): so [1−(1−1/ρ)^{−n}] = 1 − (ρ/(ρ−1))ⁿ — and Σ_ρ[1−(1−1/ρ)^{−n}] = λ_{−n}!! The negative-index Li coefficient. So S_f(n) = λ_{−n} = Σ[1−(ρ/(ρ−1))ⁿ]-reindexed... but reindexing ρ ↦ 1−ρ maps λ_{−n} to Σ[1−(1−1/(1−ρ))^{−n}] = Σ[1−((ρ−1)/ρ)^{−n}] = Σ[1−(ρ/(ρ−1))ⁿ]... circular. λ_{−n} = Σ[1−(1−1/ρ)^{−n}]: at n=1: Σ[1−(1−1/ρ)⁻¹] = Σ[1 − ρ/(ρ−1)] = Σ[(−1)/(ρ−1)] = Σ 1/(1−ρ) = λ_1 = 0.0231. But S_f(1) = −γ = −0.577. STILL ≠.
OK so S_f(n) ≠ λ_{−n} either. Then what IS S_f? From values: S_f(1) = −γ = c_0; S_f(2) ≈ Res₁(2) + γ₁-ish... Let me compute S_f(2) exactly via the archimedean+1−λ: −0.966922. What combination gives that? Try S_f(n) = Σ_j (−1)^j C(n,j) ã_j for some sequence: n=1: −ã_1 = −γ ⟹ ã_1 = γ. n=2: ã_1²... S_f(2) = −2ã_1 + ã_2 = −2γ + ã_2 = −0.966922 ⟹ ã_2 = 2γ − 0.966922 = 1.154431 − 0.966922 = 0.187509. Hmm what is 0.187509? c_1 = 0.260361 no; a₂ = (1−1/4)ζ(2) = (3/4)(1.644934) = 1.2337 no. Hmm 0.187509... ζ(2)-related? η(2) = (1−2^{−1})ζ(2) = 0.822467 no. Not obvious.
Time to stop guessing and read BL Thm 2's actual statement or Lagarias §2/(4.11) in the archive — or D-033 (the design doc for 3.5, which discusses the BL decomposition). Better: read Lagarias paper §6 (we have it: research/paper/lagarias PDF per STATE handoff "Lagarias paper math/0404394 (research/paper/): §5–6 read in full"). Or D-033. Let me grep D-033 for the S_f definition.
The identity bookkeeping has a subtlety I need to pin down exactly before the design doc — let me check how D-033/D-032 define the BL decomposition and what Lagarias's Thm 6.1 contour actually computes.
tool: Bash
input
{
"command": "grep -n \"S_f\\|S_\u221e\\|BL Thm\\|Bombieri\" /d/Python/Quantum/research/derivations/D-033*.md | head -30",
"description": "Find S_f definition discussion in D-033"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Now I understand the full accounting. Let me reconstruct the exact identity structure from D-037 line 63 and §4:\n\nD-037's identity (line 63):\n```\nS_f(n) = Σ_{|γ|≤T}′ [1 − (ρ/(ρ−1))ⁿ]·(−1) + (1/2πi)(I_I+I_II+I_III+I_IV) + triv(−2)\n```\n\nand the bound (4.1): B(n) = 2N(T) + [I_III] + [40M₀] + [horizontals] + [I_I] + 1.\n\nWait — but where's the \"height-window slack\" 4C₀ term from D-036 §4? D-036 had \"|S_f(n)| ≤ 2N(√n) + 4C₀(√n+1) + |I_I| + |I_II| + |I_IV| + |I_III| + 1\" — the 4C₀ is the slack between the truncated sum at √n vs at T. In B(n) as formalized in Lean (Bn def): `2*F T + 4*T*(...) + 40*1.3352 + 2*(exp 4 + 1)*(7*Hhat T + 3.3) + IIMaj n + 1` — the first term is 2F(T) (zero count at T = √n+1, majorizing 2N(T)+slack presumably). OK.\n\nNow the exact identity bookkeeping. S_f is DEFINED (in the Lean code, and effectively in the assembly) as S_∞ + 1 − λ_n. The contour identity must produce: S_∞ + 1 − λ_n = [something bounded by B(n)]. Let me re-derive cleanly:\n\nResidue theorem on the rectangle R_T (T zero-avoiding):\n(1/2πi)∮_{∂R_T} k_n(w−1)(−ζ′/ζ(w)) dw = Σ_{poles inside} Res\n\nPoles inside: nontrivial zeros ρ with |γ| < T (Res = 1−(ρ/(ρ−1))ⁿ each, assuming simple; with multiplicity m: residue is m·(1−(ρ/(ρ−1))ⁿ) — since −ζ′/ζ has residue −m), the trivial zero −2 (Res = 1−(2/3)ⁿ), and w = 1 (Res = Σ_{j=1}^n C(n,j)c_{j−1} =: Res₁(n)).\n\nWait, actually also: does k_n(w−1) = (1+1/(w−1))ⁿ − 1 have other poles? Only at w = 1. And −ζ′/ζ poles: zeros of ζ (nontrivial AND trivial) and w = 1. Also w = 0? −ζ′/ζ at w=0: ζ(0) = −1/2 ≠ 0, so no pole. But k_n(w−1) at w = 0 is fine (k_n(−1) = 0ⁿ−1 = −1). OK so poles: nontrivial zeros inside, −2, −4? (−4 < −2.5 not inside), and w = 1.\n\nSo: (1/2πi)∮ = Σ_{|γ|<T} mult·[1−(ρ/(ρ−1))ⁿ] + [1−(2/3)ⁿ] + Res₁(n). (∗)\n\nNow, S_f in the sense of D-037's identity: comparing with line 63, D-037's identity says:\nS_f(n) = −Σ_{|γ|≤T}′ [1−(ρ/(ρ−1))ⁿ] + (1/2πi)(sides) + triv(−2)\n\nSubstituting (∗): −Σ + sides + triv = −[sides − triv − Res₁] + sides + triv = 2·triv + Res₁(n)?? That gives S_f = Res₁ + 2·triv which is nonsense dimensionally... UNLESS D-037's \"triv(−2)\" means MINUS the trivial residue, i.e. the identity is:\n\nS_f = −[Σ_{|γ|≤T}(...) + triv] + sides = −(sides − Res₁) + sides = Res₁.\n\nHmm, that gives S_f = Res₁(n)?? Also nonsense (Res₁ ~ S_∞-scale ~ ½n log n, and |S_f| ≤ 13 measured).\n\nI think D-037's line-63 \"identity\" has a sign issue or is written in a compressed form where S_f on the LHS means the truncated zero sum (not S_∞ + 1 − λ_n). Let me not relitigate D-037's compressed notation — instead derive the CORRECT identity from scratch, which is what D-064 needs anyway:\n\nDEFINITION (Lean): Sf n = SInfty n + 1 − (liCoeff n).re, liCoeff = paired λ_n.\n\nGOAL: |Sf n| ≤ Bn.\n\nFrom (∗): Σ_{|γ|<T} mult·[1−(ρ/(ρ−1))ⁿ] = sides − [1−(2/3)ⁿ] − Res₁(n).\n\nλ_n (paired full sum) = Σ_all mult·[1−(1−1/ρ)ⁿ] — and re-indexing by ρ ↦ 1−ρ̄ (reflect) — hmm wait, the pairing in liCoeffP is f(ρ)+f(ρ̄) over all ρ halved... the full sum Σ_all f(ρ) where f(ρ) = 1−(1−1/ρ)ⁿ: re-index ρ ↦ 1−ρ (symmetry of the zero set, multiplicity-preserving): Σ_all f(1−ρ) = Σ_all [1−(1−1/(1−ρ))ⁿ] = Σ_all [1−(ρ/(ρ−1))ⁿ] ✓. So λ_n = Σ_all [1−(ρ/(ρ−1))ⁿ] (equal as convergent sums — with pairing this is fine).\n\nSplit: λ_n = Σ_{|γ|<T} [1−(ρ/(ρ−1))ⁿ] + tail(T), where tail(T) = Σ_{|γ|≥T} paired.\n\nSubstitute: λ_n = sides − [1−(2/3)ⁿ] − Res₁(n) + tail(T).\n\nSf = S_∞ + 1 − λ_n = S_∞ + 1 + Res₁(n) + [1−(2/3)ⁿ] − sides − tail(T).\n\nTHE KEY IDENTIFICATION (the w=1 crux): \n S_∞(n) + 1 + Res₁(n) + [1−(2/3)ⁿ] = 0 ???\ni.e. Res₁(n) = −S_∞(n) − 2 + (2/3)ⁿ ??\n\nCheck numerically at small n! Let me sanity check with n = 1: λ_1 = Σ[1−(1−1/ρ)] = Σ 1/ρ (paired) = 1 + γ/2 − log(2√π) ≈ 0.0230957 (the classical Keiper λ_1). S_∞(1): from the def SInfty 1 = (1−a₁)·1 − 1 + Σ_{m odd ≥3} [(1−1/m) − 1 + 1/m] = (1−a₁) − 1 + 0 = −a₁ = −(log 4π + γ)/2 ≈ −(2.5310+0.5772)/2 ≈ −1.5541. Sf(1) = S_∞(1) + 1 − λ_1 ≈ −1.5541 + 1 − 0.0231 = −0.5772 = −γ. Hmm interesting: S_f(1) = −γ (the Stieltjes constant γ_0 = γ with sign: S_f(1) should be... BL: λ_1 = S_∞(1) − S_f(1) + 1 ⟹ S_f(1) = S_∞(1) + 1 − λ_1 ✓ consistent.)\n\nNow Res₁(1) = Σ_{j=1}^1 C(1,j)c_{j−1} = c_0 = the constant term of −ζ′/ζ at s=1. −ζ′/ζ(s) = 1/(s−1) − γ + O(s−1) (since ζ′/ζ(s) = −1/(s−1) + γ + ..., from ζ(s) = 1/(s−1) + γ − γ₁(s−1)...: logarithmic derivative: ζ′/ζ = [−1/(s−1)² − γ₁ + ...]/[1/(s−1) + γ + ...] = [−1/(s−1)²(1 + γ₁(s−1)²+...)]·[(s−1)(1 − γ(s−1) + ...)] = −(1/(s−1))(1 − γ(s−1)+...) = −1/(s−1) + γ + O(s−1) ✓). So c_0 = −γ (the constant term of −ζ′/ζ). Res₁(1) = c_0 = −γ.\n\nCheck the key identification at n=1: S_∞(1) + 1 + Res₁(1) + [1−(2/3)¹] = −1.5541 + 1 + (−0.5772) + 1/3 = −0.7980?? ≉ 0. Hmm. So the identification S_∞+1+Res₁+triv = 0 FAILS at n=1. Let me recheck.\n\nActually — wait. Maybe the trivial-zero residue sign: triv = 1−(ρ/(ρ−1))ⁿ at ρ=−2: ρ/(ρ−1) = (−2)/(−3) = 2/3; triv = 1 − (2/3)ⁿ. At n=1: triv = 1/3 ✓ as I had. Hmm.\n\nAnd Sf(1) = −γ ≈ −0.5772. And −sides − tail... at n=1, can I check the identity Sf = S_∞+1+Res₁+triv − sides − tail? ⟹ −0.5772 = −0.7980 − sides − tail ⟹ sides + tail = −0.2208. Plausible (sides and tail are n-dependent quantities I can't eyeball). So the identity Sf = [S_∞+1+Res₁+triv] − sides − tail is the bookkeeping, and the bracket does NOT vanish at n=1 — fine, because the bracket isn't supposed to vanish in general?! But then bounding |Sf| needs the bracket bounded...\n\nHmm wait, no. Let me redo. The issue: what does \"S_f\" MEAN in D-037's bound B(n)? The bound (4.1) has components: 2N(T) [zero sum truncation], sides, triv, NO Res₁ term and NO tail term. For |Sf| = |S_∞ + 1 − λ_n| to be bounded by those pieces, the assembly must be:\n\nλ_n = Σ_{|γ|≤T} + tail, and Σ_{|γ|≤T} = sides − triv − Res₁ (∗), so\nSf = S_∞ + 1 − Σ_{|γ|≤T} − tail = S_∞ + 1 − sides + triv + Res₁ − tail.\n\n|Sf| ≤ |S_∞ + 1 + Res₁ + triv| + |sides| + |tail|.\n\nFor B(n) (4.1) to bound this, we need |S_∞+1+Res₁+triv| ≤ 2N(T)??? That's weird. 2N(T) ~ (√n/π)log... and S_∞+1+Res₁+triv at general n: S_∞ ~ ½n log n; Res₁ = Σ_j C(n,j)c_{j−1} — the c's are Stieltjes-scale; this sum is also ~ −½n log n (they cancel!). The DIFFERENCE S_∞+1+Res₁+triv is the small thing... at n=1: −0.798, small ✓. And 2N(T) at n=1: T = 2, N(2) = 0 — hmm, that bound would fail at n=1, but the theorem range is n ≥ 10⁵ anyway.\n\nHmm, so maybe the actual Lagarias identity is: S_∞(n) + 1 + Res₁(n) + triv(n) = −Σ_{|γ|≤T}′·... no wait. Let me think about what Res₁ actually equals via the GLOBAL argument:\n\nAlternative clean derivation (Lagarias's approach): apply the residue theorem to the SAME integrand but on a DIFFERENT contour family, or evaluate λ_n's truncation directly. Actually the cleanest: consider the contour integral and let T → ∞ along zero-avoiding heights: the sides → 0 (needs decay — the horizontal sides decay, vertical sides: I_III left vertical does NOT decay as T → ∞... so that limit doesn't literally vanish. Hmm, Lagarias variant B uses the finite-T identity as is.)\n\nOK here's the resolution — Lagarias Thm 6.1's actual identity (variant B). I recall now: Lagarias's (6.2)-style identity for the quantity he calls S_f(n) — actually in Lagarias's paper, Theorem 6.1 bounds |S_f(n)| by a contour argument applied DIRECTLY to the representation S_f(n) = −(1/2πi)∮ ... hmm.\n\nLet me look at it differently. The quantity with a clean contour representation is the TRUNCATED zero sum:\nΣ_{|γ|<T}′ [1−(ρ/(ρ−1))ⁿ] = sides − triv − Res₁ (∗)\n\nAnd S_f (BL's finite part) has the zero-sum representation S_f(n) = Σ_ρ′ [1−(ρ/(ρ−1))ⁿ] (full sum, paired) — this is the BL Thm 2 content: λ_n = S_∞ − S_f + 1 with S_f the full zero sum. Then:\n\nSf(Lean) = S_∞ + 1 − λ_n = S_f(BL's zero sum) [by BL Thm 2].\n\nSo the Lean quantity EQUALS the full zero sum (this is a THEOREM to prove: BL Thm 2, i.e. λ_n + S_f,full = S_∞ + 1 — the archimedean/zero split). And the full zero sum splits:\nS_f,full = Σ_{|γ|<T} + tail = [sides − triv − Res₁] + tail (∗∗)\n\n|Sf| ≤ |sides| + |triv| + |Res₁| + |tail|. But |Res₁| ~ ½n log n is HUGE — so this decomposition is useless UNLESS Res₁ is small, which it isn't. The resolution: Res₁ must be combined with something. AH — I see it now: the full zero sum S_f,full is only defined via pairing/principal value, and its decomposition (∗∗) has Res₁ large and tail large with cancellation between... no...\n\nHmm, let me just carefully reconsider. Actually the clean classical statement (Lagarias 6.2): \n\nS_f(n) := lim_{T→∞} [Σ_{|γ|<T}′ 1−(ρ/(ρ−1))ⁿ] exists (conditionally), and the finite-T identity:\nΣ_{|γ|<T}′ [1−(ρ/(ρ−1))ⁿ] = (1/2πi)∮_{R_T} − triv − Res₁ \n\nis exact. The bound on |S_f| then comes from:\n|S_f| ≤ |Σ_{|γ|<T}| + |tail_T| = |sides − triv − Res₁| + |tail_T| — with the Res₁ INSIDE. Since |Res₁| ~ ½n log n, and the sides are O(√n log n), and tail_T = o(1) as T → ∞... this gives |S_f| ≤ ½n log n-ish — TRUE but useless (need √n log n-scale).\n\nSomething's off in my residue bookkeeping. Let me recompute the w=1 residue's ROLE. AH WAIT. I think the issue is the sign/direction of the identity: maybe the integrand is k_n(w−1)(−ζ′/ζ) and the identity relates to Σ[1−(ρ/(ρ−1))ⁿ] but S_f's archimedean counterpart... Let me recompute Res₁ for general n and compare with S_∞(n):\n\nRes₁(n) = Σ_{j=1}^n C(n,j) c_{j−1}, c_k = Laurent coeffs of −ζ′/ζ at 1.\n\nClaim (Lagarias (4.11) connection): S_∞(n) = Σ_{j=1}^n (−1)^j C(n,j) a_j, a_1 = (log 4π+γ)/2, a_j = (1−2^{−j})ζ(j) (j ≥ 2).\n\nIs Res₁(n) = −S_∞(n) + (lower)? Let me check at n=1: Res₁(1) = c_0 = −γ ≈ −0.5772. −S_∞(1) = a₁ ≈ 1.5541. Not equal, difference = 1.5541 − 0.5772 = 0.9769 ≈ 1 − 0.0231 = 1 − λ_1!! Indeed: Sf(1) = S_∞(1)+1−λ_1 = −γ = c_0 — SO: S_f(1) = Res₁(1) EXACTLY. Interesting!! So maybe the identity is S_f(n) = Res₁(n) + [trivial-zero contributions]? Check the pattern: S_f(n) = S_∞+1−λ_n. Hmm at n=1 S_f = Res₁. Let me test the hypothesis \"Sf(n) = Res₁(n) + Σ_{trivial zeros} [contribution]\" at general n via the FUNCTIONAL-EQUATION level: the full zero sum S_f = Σ′_ρ[1−(ρ/(ρ−1))ⁿ] (all nontrivial, paired) and the CLAIM is:\n\nS_∞(n) + 1 − λ_n = S_f(n) [BL] — fine. Now compute S_f via a DIFFERENT contour: integrate k_n(w−1)(−ζ′/ζ) over a contour enclosing ALL nontrivial zeros and nothing else (e.g., the limit of R_T as T→∞, σ₁ → ∞, σ₀ → −∞...). If the integrand decays sufficiently, the total integral over a contour at infinity = 0, giving: Σ_nontrivial + Σ_trivial + Res₁ + Res_{w=0}? = 0... w=0: k_n(w−1) at w=0 fine, −ζ′/ζ at 0: ζ(0) = −1/2 ≠ 0, no pole. So: Σ_nontrivial[1−(ρ/(ρ−1))ⁿ] + Σ_{trivial ρ=−2k}[1−(ρ/(ρ−1))ⁿ] + Res₁ = 0 (if the contour at infinity vanishes).\n\nΣ_trivial: ρ = −2k: ρ/(ρ−1) = 2k/(2k+1): Σ_{k≥1} [1−(2k/(2k+1))ⁿ].\nAt n=1: Σ [1−2k/(2k+1)] = Σ 1/(2k+1) = DIVERGES! So the contour-at-infinity argument fails / the trivial sum doesn't converge at n=1... for general n: 1−(2k/(2k+1))ⁿ ~ n/(2k) — diverges too. So the trivial zeros sum diverges — consistent with the fact that S_f's zero sum only converges conditionally with specific pairing, and the trivial zeros enter the bookkeeping through the archimedean side. So the \"contour at infinity\" argument is WRONG as stated — the integrand doesn't decay (left vertical side blows up). This is exactly why the finite-T identity + the archimedean computation is needed.\n\nFINE. The correct classical bookkeeping (Lagarias Thm 6.1 variant B, as D-036/D-037 actually do it): the identity is at FINITE T:\n(∗) Σ_{|γ|<T}′ [1−(ρ/(ρ−1))ⁿ] = sides(T) − triv − Res₁(n)\nand the quantity bounded is the TRUNCATED sum |Σ_{|γ|<T}′| ≤ |sides| + |triv| + |Res₁|. Then the connection to Sf(Lean) = S_∞ + 1 − λ_n:\n\nSf = S_∞ + 1 − λ_n = S_∞ + 1 − Σ_{|γ|<T} − tail = S_∞ + 1 + Res₁ + triv − sides − tail.\n\nNow the KEY: identify S_∞(n) + 1 + Res₁(n) + triv(n). Lagarias's content (the archimedean computation): the claim must be\n\nS_∞(n) + 1 + Res₁(n) + [1−(2/3)ⁿ] = 0 ∀n ??? — but I numerically checked n=1: −1.5541+1−0.5772+0.3333 = −0.798 ≠ 0. So FALSE.\n\nAlternative: maybe Res₁ as I defined it is missing a piece: the integrand is k_n(w−1)(−ζ′/ζ(w)). At w=1, k_n(w−1) = (w/(w−1))ⁿ − 1 = Σ_{j=1}^n C(n,j)(w−1)^{−j} ✓ pole order n. −ζ′/ζ ~ 1/(w−1). Product pole order n+1 ✓. Res = Σ_{j=1}^n C(n,j)·[coeff of (w−1)^{j−1} in (−ζ′/ζ)] = Σ_j C(n,j)c_{j−1} ✓. At n=1: c_0 = −γ ✓.\n\nHmm so at n=1: Sf(1) = −γ = Res₁(1) exactly. And S_∞(1) + 1 + triv(1) = −0.2208... so Sf(1) = Res₁(1) means S_∞+1−λ_1 = Res₁ ⟹ Res₁ − triv + ... hmm: −γ = −γ ✓. So the identity Sf = Res₁ + [S_∞+1+... ] hmm I keep going in circles.\n\nNEW HYPOTHESIS: Sf(n) = Res₁(n) for all n?? Check at n=1 ✓. In general: Sf = S_∞+1−λ_n; Res₁ = Σ_j C(n,j)c_{j−1}. Is S_∞+1−λ_n = Σ_j C(n,j)c_{j−1}? At n=2: λ_2 = 0.09238...; S_∞(2) = (1−a₁)2 − 1 + Σ_{m odd}[(1−1/m)²−1+2/m] = 2−2a₁−1 + Σ[1/m² + 1/m·... (1−1/m)² = 1−2/m+1/m², so summand = 1/m²]. Σ_{m odd≥3} 1/m² = (1−2^{−2})ζ(2) − 1 = (3/4)(π²/6) − 1 = π²/8 − 1 ≈ 0.2337. S_∞(2) = 1 − 2a₁ + 0.2337 = 1 − 3.1082 + 0.2337 = −1.8745. Sf(2) = −1.8745 + 1 − 0.09238 = −0.9669. Res₁(2) = Σ_{j=1}^2 C(2,j)c_{j−1} = 2c_0 + c_1. c_1 = coeff of (s−1) in −ζ′/ζ: from ζ′/ζ = −1/(s−1) + γ + γ₁′(s−1)+...: Stieltjes: ζ(s) = 1/(s−1) + Σ_{k≥0} (−1)^k γ_k/k! (s−1)^k. log ζ = −log(s−1) + log(1 + (s−1)Σ...) = −log(s−1) + γ(s−1) + ...; ζ′/ζ = −1/(s−1) + γ + (γ₁+γ²)(s−1)... let me be careful: log(1 + γ(s−1) − γ₁(s−1)²/2 + ...) = γ(s−1) + [−γ₁/2 − γ²/2](s−1)² + ... So ζ′/ζ(s) = −1/(s−1) + γ + 2(−γ₁/2 − γ²/2)(s−1) + ... = −1/(s−1) + γ − (γ₁+γ²)(s−1) + ... So −ζ′/ζ = 1/(s−1) − γ + (γ₁+γ²)(s−1) + ...: c_0 = −γ, c_1 = γ₁ + γ². Res₁(2) = 2(−γ) + (γ₁+γ²) = γ² − 2γ + γ₁ = 0.3327 − 1.1544 + (−0.0728) = −0.8945. But Sf(2) = −0.9669. NOT EQUAL (−0.8945 vs −0.9669). Difference = 0.0724 ≈ triv(2) = 1−(2/3)² = 5/9 = 0.5556? No. Difference 0.0724... Hmm what's 0.0724? λ-related? Unclear.\n\nSo Sf ≠ Res₁ at n=2. Difference Sf − Res₁ = −0.0724. Hmm, and at n=1 difference was 0. So the correct identity is Sf(n) = Res₁(n) + δ(n) with δ(1) = 0, δ(2) = −0.0724. What could δ be? Maybe δ(n) = Σ_{trivial zeros} something that converges... at n=2: trivial ρ=−2: 1−(2/3)² = 5/9 ≈ 0.556; ρ=−4: 1−(4/5)² = 9/25 = 0.36; sum over all trivial = Σ_{k≥1} 1−(2k/(2k+1))² = Σ [(4k+1)/(2k+1)²] ~ Σ 1/k diverges. So no.\n\nLet me reconsider: maybe δ(n) = −[k_n(0)·something]... at w = 0: is there really no pole? −ζ′/ζ(0): ζ(0) = −1/2, ζ′(0) = −(1/2)log(2π): ζ′/ζ(0) = log(2π). No pole ✓.\n\nAlternatively δ(n) might come from my WRONG assumption that S_f's zero sum re-indexes via ρ ↦ 1−ρ. Check at n=1: λ_1 = Σ 1/ρ paired = 2Σ_{upper} Re(1/ρ)... = 0.0231 ✓ classical. Σ[1−(ρ/(ρ−1))ⁿ] at n=1 = Σ[1−ρ/(ρ−1)] = Σ[1/(1−ρ)] = Σ 1/(1−ρ) paired = same value 0.0231 (by ρ ↦ 1−ρ symmetry) ✓ consistent.\n\nOK here's another candidate: the contour residues at zeros give k_n(ρ−1)·(−1) = −[(1+1/(ρ−1))ⁿ − 1] = −[(ρ/(ρ−1))ⁿ − 1] = 1 − (ρ/(ρ−1))ⁿ ✓. Hmm wait — actually is Res(−ζ′/ζ) at a simple zero = −1? ζ′/ζ at simple zero ρ: ζ = (s−ρ)h, ζ′/ζ = 1/(s−ρ) + h′/h, residue +1. So −ζ′/ζ has residue −1 ✓. Res of product = k_n(ρ−1)·(−1) = −(ρ/(ρ−1))ⁿ + 1 = 1 − (ρ/(ρ−1))ⁿ ✓.\n\nAnd maybe the identity I should check is Sf = −[Σ_{|γ|<T} + triv] + sides with NO Res₁ and NO S_∞ separately — i.e., Lagarias's S_f(n) is DEFINED as the full zero sum (not via S_∞), and BL's identity is λ_n = S_∞ − S_f + 1. In our Lean: Sf := S_∞ + 1 − λ_n, so Sf = S_f(full zero sum) is exactly BL Thm 2 — the identity to PROVE is:\n\nS_∞(n) + 1 − λ_n = Σ_full′[1−(ρ/(ρ−1))ⁿ] (BL2)\n\nand separately the finite-T truncation:\nΣ_{|γ|<T}[1−(ρ/(ρ−1))ⁿ] = sides − triv − Res₁ (∗)\n\nCombining: Sf = Σ_full = Σ_{|γ|<T} + tail = sides − triv − Res₁ + tail.\n\nHmm, STILL has Res₁ (~½n log n, huge) — UNLESS tail ~ −Res₁ (cancellation between tail and Res₁). tail = Σ_{|γ|>T}[1−(ρ/(ρ−1))ⁿ] — paired, each pair ~ 2n(1−σ)... ~ O(n²/γ²)? For γ ≫ n: pair ≈ 2nβ/|ρ|²·... earlier: pair ≈ 2nσ/|ρ|² for the (1−1/ρ) form; for the (ρ/(ρ−1)) form at the reflected zero it's the same set. tail ≈ Σ_{γ>T} 2n/γ² ≈ 2n·log T/(2πT) ≈ (n log T)/(πT) ≈ √n log n/π. NOT ~½n log n. So tail is small and Res₁ is big — they don't cancel; so \"Sf = sides − triv − Res₁ + tail\" CANNOT be right numerically: at n=2, T=√2+1≈2.41: sides−triv−Res₁+tail should = Sf = −0.9669. Res₁(2) = −0.8945, triv(2) = 5/9 = 0.5556: −triv−Res₁ = −0.5556+0.8945 = 0.3389; tail ≈ small; so sides ≈ −0.9669 − 0.3389 − tail ≈ −1.3-ish. Fine, that's a statement about the sides integral — plausible. So (∗) is consistent after all — the truncated sum Σ_{|γ|<2.41} = 0 (no zeros with |γ| < 2.41!) = sides − triv − Res₁ = −1.3 + ... wait Σ_{|γ|<2.41} = 0 means sides = triv + Res₁ = 0.5556 − 0.8945 = −0.3389. And Sf = 0 + tail = −0.9669 = tail?! tail at n=2 = Σ_{|γ|>2.41} = ALL zeros = λ_2's reindexed form = λ_2 = 0.09238?? But Sf(2) = −0.9669 ≠ 0.0924. CONTRADICTION!\n\nSo Sf ≠ Σ_full[1−(ρ/(ρ−1))ⁿ]. I.e., BL2 as I wrote it is WRONG. The BL finite part S_f is NOT Σ[1−(ρ/(ρ−1))ⁿ]. Let me get BL's actual definitions: λ_n = Σ_ρ [1−(1−1/ρ)ⁿ]. And the decomposition λ_n = S_∞ − S_f + 1... From Sf = S_∞+1−λ_n: Sf(1) = −γ, Sf(2) = −0.9669. What is Σ_full[1−(ρ/(ρ−1))ⁿ]? At n=1: Σ 1/(1−ρ) = λ_1 = 0.0231 (by symmetry) — but Sf(1) = −γ = −0.577. So S_f ≠ Σ[1−(ρ/(ρ−1))ⁿ]. CONFIRMED. The contour identity (∗) computes the TRUNCATED version of a sum that is NOT S_f. So how does D-037 connect them??\n\nD-037's line 63: \"S_f(n) = Σ_{|γ|≤T}′ [1 − (ρ/(ρ−1))ⁿ]·(−1) + (1/2πi)(I_I+I_II+I_III+I_IV) + triv(−2)\". With (∗): Σ_{|γ|≤T} = sides − triv − Res₁, D-037's claim reads: S_f = −(sides − triv − Res₁) + sides + triv(−2) = Res₁ + triv + triv(−2). If triv(−2) = −triv: S_f = Res₁. But numerically Sf(2) = −0.9669 vs Res₁(2) = −0.8945. STILL off by 0.0724.\n\nHmm!! What is 0.0724... Let me compute Σ_trivial[1−(2k/(2k+1))²] partial: k=1: 5/9=0.5556, k=2: 1−(4/5)²=0.36, k=3: 1−(6/7)²=0.2653, k=4: 0.21, ... diverges. Not that. What about [1−(2/3)ⁿ]−[something]... 0.0724 ≈ γ₁-related? γ₁ = −0.0728. δ(2) = −0.0724 ≈ γ₁ = −0.0728?! Close but let me compute more precisely: Sf(2): λ_2 = Σ[1−(1−1/ρ)²] = Σ[2/ρ − 1/ρ²] paired. λ_2 = 0.092383... let me get more digits: known value λ_2 ≈ 0.09238303922. S_∞(2) = 1 − 2a₁ + π²/8 − 1 = −2a₁ + π²/8: a₁ = (log 4π + γ)/2 = (2.531024 + 0.5772157)/2 = 1.554120. S_∞(2) = −3.108240 + 1.233701 = −1.874539. Sf(2) = −1.874539 + 1 − 0.092383 = −0.966922. Res₁(2) = 2c_0 + c_1 = −2γ + (γ₁ + γ²)... let me recompute c_1 carefully. ζ(s) = 1/(s−1) + Σ_{k=0}^∞ (−1)^k γ_k/k! (s−1)^k. Write u = s−1. ζ = u⁻¹(1 + γu − γ₁u²/2 + γ₂u³/6 − ...). log ζ = −log u + log(1 + γu − γ₁u²/2 + ...) = −log u + [γu − γ₁u²/2 − (γu)²/2 + O(u³)] = −log u + γu − (γ₁+γ²)u²/2 + O(u³). d/ds: ζ′/ζ = −u⁻¹ + γ − (γ₁+γ²)u + O(u²). −ζ′/ζ = u⁻¹ − γ + (γ₁+γ²)u + O(u²). c_0 = −γ ✓, c_1 = γ₁ + γ² ✓. γ₁ = −0.0728158455, γ² = 0.3327 (0.5772157² = 0.333177). c_1 = −0.072816 + 0.333177 = 0.260361. Res₁(2) = 2(−0.577216) + 0.260361 = −1.154432 + 0.260361 = −0.894071. Sf(2) − Res₁(2) = −0.966922 + 0.894071 = −0.072851 ≈ γ₁ = −0.0728158... close but not exact (−0.072851 vs −0.072816, diff 3.5e-5 — probably my λ_2 rounding). Actually let me not chase: the pattern δ(2) ≈ γ₁ suggests δ(n) relates to deeper Stieltjes structure — i.e., Sf(n) ≠ Res₁(n) + simple.\n\nHmm wait — maybe I have Sf's sign convention wrong vs D-037's \"S_f\". D-037 uses BL's convention λ_n = S_∞ − S_f + 1, so S_f = S_∞ + 1 − λ_n ✓ matches Lean's Sf ✓. So S_f(2) = −0.9669.\n\nLet me look up what Lagarias's Thm 6.1 actually bounds... In Lagarias's paper (math/0404394, in our archive research/paper/), §6: he defines S_f(n) and proves |S_f(n)| ≤ ... via the contour. The quantity he contours is presumably NOT S_f directly but the zero-sum Σ[1−(ρ/(ρ−1))ⁿ]... and the relationship S_f = that sum MINUS Res₁-type archimedean terms...\n\nI recall now (BL 1999): the finite part S_f(n) is defined as the sum over zeros S_f(n) = Σ_ρ [1 − (ρ/(ρ−1))ⁿ] — NO wait, that's λ-type. Let me think about BL's actual decomposition: they write λ_n = Σ_ρ[1−(1−1/ρ)ⁿ] and split via the Hadamard product into archimedean (S_∞) and zero (S_f) parts: S_f(n) = Σ_ρ [1 − (ρ/(ρ−1))ⁿ]?? The two sums differ: 1−(1−1/ρ)ⁿ at ρ vs 1−(ρ/(ρ−1))ⁿ = 1−(1−1/(1−ρ))ⁿ at 1−ρ — same by symmetry! So Σ[1−(ρ/(ρ−1))ⁿ] = λ_n (reindexed). So S_f(BL) can't be that either.\n\nThe actual BL split: λ_n = S_∞(n) − S_f(n) + 1 where\nS_∞(n) = Σ_{j=1}^n (−1)^{j+1}... archimedean = the (4.11) sum, and\nS_f(n) = ... the \"finite primes\" part — NO, there are no primes here; S_f = \"finite part\" = zero-side? In BL's notation: λ_n = S_∞(n) − S_f(n) + 1 with S_∞ the archimedean contribution and S_f the contribution of the finite... hmm, actually I believe BL define: S_f(n) = Σ_ρ [1 − (1 − 1/ρ)^{−n}]?? Note (1−1/ρ)^{−1} = ρ/(ρ−1): so [1−(1−1/ρ)^{−n}] = 1 − (ρ/(ρ−1))ⁿ — and Σ_ρ[1−(1−1/ρ)^{−n}] = λ_{−n}!! The negative-index Li coefficient. So S_f(n) = λ_{−n} = Σ[1−(ρ/(ρ−1))ⁿ]-reindexed... but reindexing ρ ↦ 1−ρ maps λ_{−n} to Σ[1−(1−1/(1−ρ))^{−n}] = Σ[1−((ρ−1)/ρ)^{−n}] = Σ[1−(ρ/(ρ−1))ⁿ]... circular. λ_{−n} = Σ[1−(1−1/ρ)^{−n}]: at n=1: Σ[1−(1−1/ρ)⁻¹] = Σ[1 − ρ/(ρ−1)] = Σ[(−1)/(ρ−1)] = Σ 1/(1−ρ) = λ_1 = 0.0231. But S_f(1) = −γ = −0.577. STILL ≠. \n\nOK so S_f(n) ≠ λ_{−n} either. Then what IS S_f? From values: S_f(1) = −γ = c_0; S_f(2) ≈ Res₁(2) + γ₁-ish... Let me compute S_f(2) exactly via the archimedean+1−λ: −0.966922. What combination gives that? Try S_f(n) = Σ_j (−1)^j C(n,j) ã_j for some sequence: n=1: −ã_1 = −γ ⟹ ã_1 = γ. n=2: ã_1²... S_f(2) = −2ã_1 + ã_2 = −2γ + ã_2 = −0.966922 ⟹ ã_2 = 2γ − 0.966922 = 1.154431 − 0.966922 = 0.187509. Hmm what is 0.187509? c_1 = 0.260361 no; a₂ = (1−1/4)ζ(2) = (3/4)(1.644934) = 1.2337 no. Hmm 0.187509... ζ(2)-related? η(2) = (1−2^{−1})ζ(2) = 0.822467 no. Not obvious.\n\nTime to stop guessing and read BL Thm 2's actual statement or Lagarias §2/(4.11) in the archive — or D-033 (the design doc for 3.5, which discusses the BL decomposition). Better: read Lagarias paper §6 (we have it: research/paper/lagarias PDF per STATE handoff \"Lagarias paper math/0404394 (research/paper/): §5–6 read in full\"). Or D-033. Let me grep D-033 for the S_f definition.","signature":""},{"type":"text","text":"The identity bookkeeping has a subtlety I need to pin down exactly before the design doc — let me check how D-033/D-032 define the BL decomposition and what Lagarias's Thm 6.1 contour actually computes."},{"type":"tool_use","id":"Bash_39","name":"Bash","input":{"command":"grep -n \"S_f\\|S_∞\\|BL Thm\\|Bombieri\" /d/Python/Quantum/research/derivations/D-033*.md | head -30","description":"Find S_f definition discussion in D-033"},"extra_content":null}]