← Session 21 — Tier ii′ planning + launch: close SfBoundProp in Lean (D-064)
thinking (4714 chars)
EXCELLENT discovery — `Zeta23/Analytic/RectangleLogDeriv.lean` has EXACTLY what I need:
1. **`residueTheorem_finset`**: residue theorem for finitely many simple poles with the (f − A/(s−p)) =O 1 boundedness form — this handles arbitrary finite pole sets WITHOUT the HasSimplePolesOn scaffold restrictions, using the explicit principal-part-subtraction induction. This is a more flexible interface than RectangleIntegral'_eq_sumResiduesIn!
2. **`rectangleIntegral'_mul_logDeriv`** (line 352/365): "the argument principle with weight": f, g analytic on neighborhood of each point of Rectangle, f ≠ 0 on the border, Z = finite zero set of f in the rectangle ⟹ RectangleIntegral' (g · f'/f) z w = Σ_{ρ∈Z} ord_ρ(f)·g(ρ).
Hmm — item 2 is CLOSE to what I need but not exactly: my integrand is J = k_n(w−1)·(−ζ′/ζ(w)) = g·(ζ′/ζ) with g = −k_n(w−1) — but g is NOT analytic (pole at w=1!). And ζ is not analytic at w=1 either. So rectangleIntegral'_mul_logDeriv doesn't directly apply because of the w=1 pole. BUT — the split approach: J = g·(−ζ′/ζ) where the only non-analyticity is at w=1 (both from g's pole and ζ's pole).
New idea — instead of the P-split at w=1, use a DIFFERENT contour region that avoids w=1: no — w=1 is inside the rectangle necessarily (it's the whole point).
But wait — maybe adapt: apply `residueTheorem_finset` DIRECTLY to J with the pole set S = {zeros} ∪ {−2} ∪ {1}: needs (J − A p/(s−p)) =O 1 near each p — for simple poles only! At w=1 the pole is order n+1, so (J − A/(s−1)) is NOT bounded. So residueTheorem_finset also needs the simple-pole condition. The P-split is still needed for w=1.
OK here's the refined plan for ii′-1b(iii):
- Split J = P + R where P = principal part at 1 (finite rational sum).
- ∮ P = ResW1 n (pull-to-square + primitive-vanishing for i ≥ 2 + ResidueTheoremInRectangle for i = 1).
- ∮ R via `residueTheorem_finset` with S = {zeros inside} ∪ {−2}: R = J − P is holomorphic on Rectangle \ S (at w=1 removable by the order computation) and (R − A p/(s−p)) =O 1 at each zero p with A p = mult·k_n(ρ−1)·(−1)... need the residue boundedness at each zero: near ρ, J = k_n·(−ζ′/ζ): −ζ′/ζ = mult/(s−ρ)·(−1) + bounded (logDeriv at a zero of order mult: residue −mult for −ζ′/ζ) — the boundedness (J − A/(s−ρ)) =O 1 with A = −mult·k_n(ρ−1): from ζ'/ζ = mult/(s−ρ) + bounded — needs the logDeriv-at-zero lemma in =O form. Does Zeta23 have it? rectangleIntegral'_mul_logDeriv's PROOF must contain it (the argument principle with weight proves exactly Σ ord·g(ρ) for ANALYTIC g). Hmm — its proof internally handles the logDeriv residues. For my R (with g = −k_n(w−1) analytic at ρ ✓ — k_n's pole is at w=1 only), the residue computation is: R = J − P = −k_n·(ζ′/ζ) − P; near ρ: ζ′/ζ = m/(s−ρ) + B(s) with B bounded (needs this lemma!); k_n analytic at ρ (pole only at 1 ✓); P analytic at ρ (pole only at 1 ✓). So R + m·k_n(ρ−1)/(s−ρ) = −k_n·B(s) − k_n·m/(s−ρ)... let me redo: R = −k_n(w−1)·(ζ′/ζ) − P. −ζ′/ζ = −m/(s−ρ) − B. R = −k_n·(m/(s−ρ) + B) − P = −m·k_n(ρ−1)/(s−ρ) − m·(k_n(w−1) − k_n(ρ−1))/(s−ρ) − k_n·B − P. The term (k_n(w−1) − k_n(ρ−1))/(s−ρ) → k_n'(ρ−1) bounded ✓. So R − A/(s−ρ) bounded with A = −m·k_n(ρ−1) = mult·(1 − (ρ/(ρ−1))ⁿ) ✓✓ (k_n(ρ−1) = (1+1/(ρ−1))ⁿ − 1 = (ρ/(ρ−1))ⁿ − 1).
- The logDeriv-at-zero boundedness: ζ′/ζ(s) − m/(s−ρ) bounded near ρ. Available? Check Zeta23 for the argument-principle's internal lemma — rectangleIntegral'_mul_logDeriv_of_poles (line 168) might BE it. Or prove from analyticOrderAt API: ζ = (s−ρ)^m·h with h analytic nonvanishing near ρ (analyticOrderAt_eq_natCast / the NF); ζ′/ζ = m/(s−ρ) + h′/h ✓ direct computation. That's a clean self-contained lemma:
```
lemma logDeriv_eq_order_add_bounded {f : ℂ → ℂ} {p : ℂ} {m : ℕ}
(hf : AnalyticAt ℂ f p) (hm : analyticOrderAt f p = m) (hm0 : m ≠ 0) :
(fun s => deriv f s / f s - (m : ℂ) / (s - p)) =O[𝓝[≠] p] (1 : ℂ → ℂ)
```
Prove via NF: f = (s−p)^m·g, g analytic, g(p) ≠ 0: f' = m(s−p)^{m−1}g + (s−p)^m g': f'/f = m/(s−p) + g'/g; g'/g analytic near p (g(p) ≠ 0) ⟹ bounded ✓. The =O form needs: g'/g is continuous at p ⟹ bounded in a neighborhood ⟹ =O 1 ✓ standard.
Actually — hold on. Maybe `rectangleIntegral'_mul_logDeriv` can be adapted to save ALL of this: my integrand is g·(−ζ′/ζ) = (−k_n(w−1))·(ζ′/ζ) with g := −k_n(w−1) — the theorem needs f, g ANALYTIC on a neighborhood of each rectangle point — f := ζ fails at w=1 (pole), g := −k_n(w−1) fails at w=1 (pole). So no direct application. But if I apply it to a MODIFIED setup... no. The P-split + residueTheorem_finset is the way.
Let me also check `rectangleIntegral'_mul_logDeriv_of_poles` (line 168) — maybe it's EXACTLY the version allowing poles: name suggests "with poles"! Let me read its statement.
`Zeta23/Analytic/RectangleLogDeriv.lean` is a goldmine — `residueTheorem_finset` (flexible finite-pole residue theorem) and possibly a poles-allowing log-deriv version. Let me read the key statements.
tool: Bash
input
{
"command": "sed -n '143,200p' /d/Python/Quantum/zeta-23-lean/Zeta23/Analytic/RectangleLogDeriv.lean",
"description": "Read rectangleIntegral'_mul_logDeriv_of_poles statement"
}
raw content_json (database row)
[{"type":"thinking","thinking":"EXCELLENT discovery — `Zeta23/Analytic/RectangleLogDeriv.lean` has EXACTLY what I need:\n\n1. **`residueTheorem_finset`**: residue theorem for finitely many simple poles with the (f − A/(s−p)) =O 1 boundedness form — this handles arbitrary finite pole sets WITHOUT the HasSimplePolesOn scaffold restrictions, using the explicit principal-part-subtraction induction. This is a more flexible interface than RectangleIntegral'_eq_sumResiduesIn!\n\n2. **`rectangleIntegral'_mul_logDeriv`** (line 352/365): \"the argument principle with weight\": f, g analytic on neighborhood of each point of Rectangle, f ≠ 0 on the border, Z = finite zero set of f in the rectangle ⟹ RectangleIntegral' (g · f'/f) z w = Σ_{ρ∈Z} ord_ρ(f)·g(ρ).\n\nHmm — item 2 is CLOSE to what I need but not exactly: my integrand is J = k_n(w−1)·(−ζ′/ζ(w)) = g·(ζ′/ζ) with g = −k_n(w−1) — but g is NOT analytic (pole at w=1!). And ζ is not analytic at w=1 either. So rectangleIntegral'_mul_logDeriv doesn't directly apply because of the w=1 pole. BUT — the split approach: J = g·(−ζ′/ζ) where the only non-analyticity is at w=1 (both from g's pole and ζ's pole). \n\nNew idea — instead of the P-split at w=1, use a DIFFERENT contour region that avoids w=1: no — w=1 is inside the rectangle necessarily (it's the whole point).\n\nBut wait — maybe adapt: apply `residueTheorem_finset` DIRECTLY to J with the pole set S = {zeros} ∪ {−2} ∪ {1}: needs (J − A p/(s−p)) =O 1 near each p — for simple poles only! At w=1 the pole is order n+1, so (J − A/(s−1)) is NOT bounded. So residueTheorem_finset also needs the simple-pole condition. The P-split is still needed for w=1.\n\nOK here's the refined plan for ii′-1b(iii):\n- Split J = P + R where P = principal part at 1 (finite rational sum).\n- ∮ P = ResW1 n (pull-to-square + primitive-vanishing for i ≥ 2 + ResidueTheoremInRectangle for i = 1).\n- ∮ R via `residueTheorem_finset` with S = {zeros inside} ∪ {−2}: R = J − P is holomorphic on Rectangle \\ S (at w=1 removable by the order computation) and (R − A p/(s−p)) =O 1 at each zero p with A p = mult·k_n(ρ−1)·(−1)... need the residue boundedness at each zero: near ρ, J = k_n·(−ζ′/ζ): −ζ′/ζ = mult/(s−ρ)·(−1) + bounded (logDeriv at a zero of order mult: residue −mult for −ζ′/ζ) — the boundedness (J − A/(s−ρ)) =O 1 with A = −mult·k_n(ρ−1): from ζ'/ζ = mult/(s−ρ) + bounded — needs the logDeriv-at-zero lemma in =O form. Does Zeta23 have it? rectangleIntegral'_mul_logDeriv's PROOF must contain it (the argument principle with weight proves exactly Σ ord·g(ρ) for ANALYTIC g). Hmm — its proof internally handles the logDeriv residues. For my R (with g = −k_n(w−1) analytic at ρ ✓ — k_n's pole is at w=1 only), the residue computation is: R = J − P = −k_n·(ζ′/ζ) − P; near ρ: ζ′/ζ = m/(s−ρ) + B(s) with B bounded (needs this lemma!); k_n analytic at ρ (pole only at 1 ✓); P analytic at ρ (pole only at 1 ✓). So R + m·k_n(ρ−1)/(s−ρ) = −k_n·B(s) − k_n·m/(s−ρ)... let me redo: R = −k_n(w−1)·(ζ′/ζ) − P. −ζ′/ζ = −m/(s−ρ) − B. R = −k_n·(m/(s−ρ) + B) − P = −m·k_n(ρ−1)/(s−ρ) − m·(k_n(w−1) − k_n(ρ−1))/(s−ρ) − k_n·B − P. The term (k_n(w−1) − k_n(ρ−1))/(s−ρ) → k_n'(ρ−1) bounded ✓. So R − A/(s−ρ) bounded with A = −m·k_n(ρ−1) = mult·(1 − (ρ/(ρ−1))ⁿ) ✓✓ (k_n(ρ−1) = (1+1/(ρ−1))ⁿ − 1 = (ρ/(ρ−1))ⁿ − 1).\n- The logDeriv-at-zero boundedness: ζ′/ζ(s) − m/(s−ρ) bounded near ρ. Available? Check Zeta23 for the argument-principle's internal lemma — rectangleIntegral'_mul_logDeriv_of_poles (line 168) might BE it. Or prove from analyticOrderAt API: ζ = (s−ρ)^m·h with h analytic nonvanishing near ρ (analyticOrderAt_eq_natCast / the NF); ζ′/ζ = m/(s−ρ) + h′/h ✓ direct computation. That's a clean self-contained lemma:\n```\nlemma logDeriv_eq_order_add_bounded {f : ℂ → ℂ} {p : ℂ} {m : ℕ}\n (hf : AnalyticAt ℂ f p) (hm : analyticOrderAt f p = m) (hm0 : m ≠ 0) :\n (fun s => deriv f s / f s - (m : ℂ) / (s - p)) =O[𝓝[≠] p] (1 : ℂ → ℂ)\n```\nProve via NF: f = (s−p)^m·g, g analytic, g(p) ≠ 0: f' = m(s−p)^{m−1}g + (s−p)^m g': f'/f = m/(s−p) + g'/g; g'/g analytic near p (g(p) ≠ 0) ⟹ bounded ✓. The =O form needs: g'/g is continuous at p ⟹ bounded in a neighborhood ⟹ =O 1 ✓ standard.\n\nActually — hold on. Maybe `rectangleIntegral'_mul_logDeriv` can be adapted to save ALL of this: my integrand is g·(−ζ′/ζ) = (−k_n(w−1))·(ζ′/ζ) with g := −k_n(w−1) — the theorem needs f, g ANALYTIC on a neighborhood of each rectangle point — f := ζ fails at w=1 (pole), g := −k_n(w−1) fails at w=1 (pole). So no direct application. But if I apply it to a MODIFIED setup... no. The P-split + residueTheorem_finset is the way.\n\nLet me also check `rectangleIntegral'_mul_logDeriv_of_poles` (line 168) — maybe it's EXACTLY the version allowing poles: name suggests \"with poles\"! Let me read its statement.","signature":""},{"type":"text","text":"`Zeta23/Analytic/RectangleLogDeriv.lean` is a goldmine — `residueTheorem_finset` (flexible finite-pole residue theorem) and possibly a poles-allowing log-deriv version. Let me read the key statements."},{"type":"tool_use","id":"Bash_181","name":"Bash","input":{"command":"sed -n '143,200p' /d/Python/Quantum/zeta-23-lean/Zeta23/Analytic/RectangleLogDeriv.lean","description":"Read rectangleIntegral'_mul_logDeriv_of_poles statement"},"extra_content":null}]