Current task: —

← Session 21 — Tier ii′ planning + launch: close SfBoundProp in Lean (D-064)

#934 assistant 2026-08-21 20:50:08.226 UTC · 3224→2170 tok open ⤢
thinking (5379 chars)
`rectangleIntegral'_mul_logDeriv_of_poles` is EXACTLY the tool — the weighted argument principle with poles: (1/2πi)∮ g·f'/f = Σ_{ρ∈Z} ord_ρ(f)·g(ρ) − Σ_{p∈P} m_p·g(p) Now — can I use it for my J? My integrand: J(w) = k_n(w−1)·(−ζ′/ζ(w)) = g(w)·(f'/f)(w) with: - f := ζ (riemannZeta) — analytic on Rectangle \ {1} ✓ (pole at 1, simple: (s−1)·ζ → 1 via `riemannZeta_residue_one` ✓ matches the hpole shape with m(1) = 1, c = 1) - g := −k_n(w−1) = 1 − (1+1/(w−1))ⁿ — has a POLE at w=1 (order n) — NOT analytic! ✗ So g is not analytic at 1 — direct application fails again. BUT: flip the assignment! Write J differently: J(w) = k_n(w−1)·(−ζ′/ζ(w)). What if I use f := ζ and g := −k_n? g has a pole at 1. What about f := the COMPLETED zeta Λ (completedRiemannZeta)? Λ has poles at 0 and 1 (simple, residues ∓1 per the comment). Then Λ'/Λ = ζ′/ζ + (1/2)log π + (1/2)ψ(s/2)·... hmm — using Λ changes the integrand: J = k_n·(−Λ'/Λ) + k_n·(Λ'/Λ − ζ′/ζ) — the second part is analytic-ish (digamma is meromorphic with poles at 0, −2, −4... inside the rectangle: 0? ψ(s/2) has poles where s/2 ∈ {0,−1,−2,...} = s ∈ {0,−2,−4,...} — INSIDE the rectangle: 0 and −2! More poles — worse. OK so the direct argument-principle application needs g analytic — impossible for our kernel. The P-split remains the plan. BUT WAIT — alternative: use rectangleIntegral'_mul_logDeriv_of_poles on a DIFFERENT contour that EXCLUDES w=1? No — w=1 must be inside. Alternative clever split: J = g·(f'/f) with f = ζ, g = −k_n. Apply the poles-version with pole set P = {1} where BOTH f's pole and g's pole live... the theorem requires g analytic everywhere — no. So: P-split + residueTheorem_finset (for R = J − P, poles = zeros ∪ {−2}) + principal-part integral. OR: another angle — apply residueTheorem_finset DIRECTLY to J with S = zeros ∪ {−2} ∪ {1}?? — no, w=1 pole isn't simple. OR — cleanest hybrid: apply `residueTheorem_finset` to J with S = zeros ∪ {−2} ∪ {1} after proving (J − A p/(s−p)) =O 1 at each p — at w=1 this fails (pole order n+1). So P-split it is. Hmm — actually, one more idea that avoids the explicit P: apply `rectangleIntegral'_mul_logDeriv_of_poles` with f := ζ and g := −k_n, but first MODIFY: J·(w−1)^N?? no. Or: view J as g·(f'/f) where f = (w−1)·... no: f'/f's poles are at zeros+1 with residues = orders; J = k_n(w−1)·(−ζ′/ζ) — take f = ζ, and accept g meromorphic: the theorem's proof structure (residueTheorem_finset induction) would extend to meromorphic g with poles at P... the residue at w=1 of g·(f'/f): g has pole order n, f'/f has residue −1 at 1: product has pole order n+1 with residue = Res₁(n) — the SAME computation. There's no escaping computing Res₁(n) — but we already have it reduced to the Leibniz rule (ii′-1b(i)). FINAL PLAN for ii′-1b(iii): 1. P(w) := Σ_{i=1}^{n+1} A_i/(w−1)^i, A_i = F^{(n+1−i)}(1)/(n+1−i)!, F(w) = (wⁿ−(w−1)ⁿ)·h(w), h(w) = (w−1)(−ζ′/ζ(w)). 2. ∮ P = A_1 (pull-to-square; i ≥ 2 terms vanish by primitive; i = 1 by ResidueTheoremInRectangle) and A_1 = ResW1 n = Σ_{i=1}^n C(n,i)·lcoeff(i−1) [ii′-1b(i)]. 3. R := J − P: holomorphic on Rectangle \ (zeros ∪ {−2}) [order ≥ 0 at 1 by Taylor-remainder] and (R − A_ρ/(s−ρ)) =O 1 at each zero ρ [via NF of ζ at ρ], A_ρ = mult·(1−(ρ/(ρ−1))ⁿ). 4. ∮ R = Σ_{ρ} A_ρ + A_{−2} via residueTheorem_finset. 5. Assemble: ∮ J = ∮ P + ∮ R = ResW1 n + Σ zeros + triv. And ii′-1b(i) [the w=1 residue value] is independent and first. Let me also make sure of one thing — the `residueTheorem_finset` interface: (f − A p/(s−p)) =O[𝓝[≠] p] (1) — for R at zeros ✓ per above. And HolomorphicOn R (Rectangle \ S): need R holomorphic at 1 — the order computation. Plus R = J − P explicitly holomorphic elsewhere (J holomorphic off poles: ζ′/ζ holomorphic off zeros and 1 (vendored LogDerivZetaHoloOn: "ζ'/ζ is holomorphic on any set not containing 1 and where ζ has no zeros" ✓ vendored!); k_n(w−1) holomorphic off 1 ✓). Now — the order-at-1 computation for R (the removable singularity). Approach: R·(w−1)^{n+1} = F − Tayl_n(F) where F = [wⁿ−(w−1)ⁿ]h analytic at 1... wait: (w−1)^{n+1}·R = (w−1)^{n+1}·J − (w−1)^{n+1}·P = F − Σ_i A_i (w−1)^{n+1−i} = F − Tayl_n(F) (Taylor poly of F at 1 of degree n — since A_i = F^{(n+1−i)}(1)/(n+1−i)!). So R = [F − Tayl_n(F)]/(w−1)^{n+1}. F analytic at 1 ⟹ F has a power series; F − Tayl_n(F) = (w−1)^{n+1}·G with G analytic at 1 (power series tail). Hence R = G near 1 (punctured equality) ⟹ R extends analytically (G is the extension). In Lean: `AnalyticAt.exists_...`? The power-series tail: `HasFPowerSeriesAt` API — is there a lemma "f − Σ_{k<n} (iteratedDeriv k f p/k!)(z−p)^k = (z−p)^n · analytic"? There might be `AnalyticAt.exists_eq_pow_mul_...` or via analyticOrderAt: analyticOrderAt (F − Tayl_n F) 1 ≥ n+1 — Mathlib's `AnalyticAt` + `analyticOrderAt`: analyticOrderAt of F − Tayl_n... hmm — there might be `HasFPowerSeriesAt.analyticOrderAt_...`... Alternatively use `iteratedDeriv` API: show (F − Tayl_n F)^{(k)}(1) = 0 for k ≤ n (iteratedDeriv of the Taylor poly is itself at k ≤ n ✓ computable), then use: analytic with first n derivatives 0 ⟹ factors as (w−1)^{n+1}·analytic — is there a Mathlib lemma `AnalyticAt.eq_pow_mul_of_...`? Something like: if f analytic at p and f^{(k)}(p) = 0 for k < m then ∃ g analytic, f(z) = (z−p)^m g(z). Hmm — `AnalyticAt.exists_...`... there might be `AnalyticAt.analyticOrderAt_ge_of_...`... Let me grep for such a lemma.
The design is settled. One more API check — the Taylor-remainder factorization lemma.
tool: Bash
input
{
  "command": "cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"iteratedDeriv_eq_zero\\|eq_pow_mul\\|exists_pow_mul\\|analyticOrderAt.*ge\\|orderAt_ge\" Mathlib/Analysis/Analytic/Order.lean | head -10; grep -rn \"Taylor\" Mathlib/Analysis/Analytic/*.lean -l | head -5",
  "description": "Find Taylor remainder / analytic order API"
}
raw content_json (database row)
[{"type":"thinking","thinking":"`rectangleIntegral'_mul_logDeriv_of_poles` is EXACTLY the tool — the weighted argument principle with poles:\n(1/2πi)∮ g·f'/f = Σ_{ρ∈Z} ord_ρ(f)·g(ρ) − Σ_{p∈P} m_p·g(p)\n\nNow — can I use it for my J? My integrand: J(w) = k_n(w−1)·(−ζ′/ζ(w)) = g(w)·(f'/f)(w) with:\n- f := ζ (riemannZeta) — analytic on Rectangle \\ {1} ✓ (pole at 1, simple: (s−1)·ζ → 1 via `riemannZeta_residue_one` ✓ matches the hpole shape with m(1) = 1, c = 1)\n- g := −k_n(w−1) = 1 − (1+1/(w−1))ⁿ — has a POLE at w=1 (order n) — NOT analytic! ✗\n\nSo g is not analytic at 1 — direct application fails again. BUT: flip the assignment! Write J differently:\nJ(w) = k_n(w−1)·(−ζ′/ζ(w)). What if I use f := ζ and g := −k_n? g has a pole at 1. What about f := the COMPLETED zeta Λ (completedRiemannZeta)? Λ has poles at 0 and 1 (simple, residues ∓1 per the comment). Then Λ'/Λ = ζ′/ζ + (1/2)log π + (1/2)ψ(s/2)·... hmm — using Λ changes the integrand: J = k_n·(−Λ'/Λ) + k_n·(Λ'/Λ − ζ′/ζ) — the second part is analytic-ish (digamma is meromorphic with poles at 0, −2, −4... inside the rectangle: 0? ψ(s/2) has poles where s/2 ∈ {0,−1,−2,...} = s ∈ {0,−2,−4,...} — INSIDE the rectangle: 0 and −2! More poles — worse.\n\nOK so the direct argument-principle application needs g analytic — impossible for our kernel. The P-split remains the plan. BUT WAIT — alternative: use rectangleIntegral'_mul_logDeriv_of_poles on a DIFFERENT contour that EXCLUDES w=1? No — w=1 must be inside.\n\nAlternative clever split: J = g·(f'/f) with f = ζ, g = −k_n. Apply the poles-version with pole set P = {1} where BOTH f's pole and g's pole live... the theorem requires g analytic everywhere — no.\n\nSo: P-split + residueTheorem_finset (for R = J − P, poles = zeros ∪ {−2}) + principal-part integral. OR: another angle — apply residueTheorem_finset DIRECTLY to J with S = zeros ∪ {−2} ∪ {1}?? — no, w=1 pole isn't simple.\n\nOR — cleanest hybrid: apply `residueTheorem_finset` to J with S = zeros ∪ {−2} ∪ {1} after proving (J − A p/(s−p)) =O 1 at each p — at w=1 this fails (pole order n+1). So P-split it is.\n\nHmm — actually, one more idea that avoids the explicit P: apply `rectangleIntegral'_mul_logDeriv_of_poles` with f := ζ and g := −k_n, but first MODIFY: J·(w−1)^N?? no.\n\nOr: view J as g·(f'/f) where f = (w−1)·... no: f'/f's poles are at zeros+1 with residues = orders; J = k_n(w−1)·(−ζ′/ζ) — take f = ζ, and accept g meromorphic: the theorem's proof structure (residueTheorem_finset induction) would extend to meromorphic g with poles at P... the residue at w=1 of g·(f'/f): g has pole order n, f'/f has residue −1 at 1: product has pole order n+1 with residue = Res₁(n) — the SAME computation. There's no escaping computing Res₁(n) — but we already have it reduced to the Leibniz rule (ii′-1b(i)).\n\nFINAL PLAN for ii′-1b(iii): \n1. P(w) := Σ_{i=1}^{n+1} A_i/(w−1)^i, A_i = F^{(n+1−i)}(1)/(n+1−i)!, F(w) = (wⁿ−(w−1)ⁿ)·h(w), h(w) = (w−1)(−ζ′/ζ(w)).\n2. ∮ P = A_1 (pull-to-square; i ≥ 2 terms vanish by primitive; i = 1 by ResidueTheoremInRectangle) and A_1 = ResW1 n = Σ_{i=1}^n C(n,i)·lcoeff(i−1) [ii′-1b(i)].\n3. R := J − P: holomorphic on Rectangle \\ (zeros ∪ {−2}) [order ≥ 0 at 1 by Taylor-remainder] and (R − A_ρ/(s−ρ)) =O 1 at each zero ρ [via NF of ζ at ρ], A_ρ = mult·(1−(ρ/(ρ−1))ⁿ).\n4. ∮ R = Σ_{ρ} A_ρ + A_{−2} via residueTheorem_finset.\n5. Assemble: ∮ J = ∮ P + ∮ R = ResW1 n + Σ zeros + triv.\n\nAnd ii′-1b(i) [the w=1 residue value] is independent and first. Let me also make sure of one thing — the `residueTheorem_finset` interface: (f − A p/(s−p)) =O[𝓝[≠] p] (1) — for R at zeros ✓ per above. And HolomorphicOn R (Rectangle \\ S): need R holomorphic at 1 — the order computation. Plus R = J − P explicitly holomorphic elsewhere (J holomorphic off poles: ζ′/ζ holomorphic off zeros and 1 (vendored LogDerivZetaHoloOn: \"ζ'/ζ is holomorphic on any set not containing 1 and where ζ has no zeros\" ✓ vendored!); k_n(w−1) holomorphic off 1 ✓).\n\nNow — the order-at-1 computation for R (the removable singularity). Approach: R·(w−1)^{n+1} = F − Tayl_n(F) where F = [wⁿ−(w−1)ⁿ]h analytic at 1... wait: (w−1)^{n+1}·R = (w−1)^{n+1}·J − (w−1)^{n+1}·P = F − Σ_i A_i (w−1)^{n+1−i} = F − Tayl_n(F) (Taylor poly of F at 1 of degree n — since A_i = F^{(n+1−i)}(1)/(n+1−i)!). So R = [F − Tayl_n(F)]/(w−1)^{n+1}. F analytic at 1 ⟹ F has a power series; F − Tayl_n(F) = (w−1)^{n+1}·G with G analytic at 1 (power series tail). Hence R = G near 1 (punctured equality) ⟹ R extends analytically (G is the extension). In Lean: `AnalyticAt.exists_...`? The power-series tail: `HasFPowerSeriesAt` API — is there a lemma \"f − Σ_{k<n} (iteratedDeriv k f p/k!)(z−p)^k = (z−p)^n · analytic\"? There might be `AnalyticAt.exists_eq_pow_mul_...` or via analyticOrderAt: analyticOrderAt (F − Tayl_n F) 1 ≥ n+1 — Mathlib's `AnalyticAt` + `analyticOrderAt`: analyticOrderAt of F − Tayl_n... hmm — there might be `HasFPowerSeriesAt.analyticOrderAt_...`... Alternatively use `iteratedDeriv` API: show (F − Tayl_n F)^{(k)}(1) = 0 for k ≤ n (iteratedDeriv of the Taylor poly is itself at k ≤ n ✓ computable), then use: analytic with first n derivatives 0 ⟹ factors as (w−1)^{n+1}·analytic — is there a Mathlib lemma `AnalyticAt.eq_pow_mul_of_...`? Something like: if f analytic at p and f^{(k)}(p) = 0 for k < m then ∃ g analytic, f(z) = (z−p)^m g(z). Hmm — `AnalyticAt.exists_...`... there might be `AnalyticAt.analyticOrderAt_ge_of_...`... Let me grep for such a lemma.","signature":""},{"type":"text","text":"The design is settled. One more API check — the Taylor-remainder factorization lemma."},{"type":"tool_use","id":"Bash_182","name":"Bash","input":{"command":"cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"iteratedDeriv_eq_zero\\|eq_pow_mul\\|exists_pow_mul\\|analyticOrderAt.*ge\\|orderAt_ge\" Mathlib/Analysis/Analytic/Order.lean | head -10; grep -rn \"Taylor\" Mathlib/Analysis/Analytic/*.lean -l | head -5","description":"Find Taylor remainder / analytic order API"},"extra_content":null}]