← Session 21 — Tier ii′ planning + launch: close SfBoundProp in Lean (D-064)
thinking (9254 chars)
`iteratedDeriv_comp_sub_const : iteratedDeriv n (fun z ↦ f (z - s)) = fun t ↦ iteratedDeriv n f (t - s)` ✓ — exactly the shift lemma. So:
iteratedDeriv i (fun w => (w - 1)^n) 1 = iteratedDeriv i (·^n) (1 − 1) = iteratedDeriv i (·^n) 0 = n.descFactorial i * 0^(n−i) = 0 for i < n, and = n! for i = n (0^0 = 1 — descFactorial n n = n!, 0^(n−n) = 0^0 = 1 ✓).
All APIs confirmed. Now let me start writing ii′-1b(i): the w=1 residue value. This is a substantial piece of Lean. Plan the file structure — new file `NguyenRH1/LiResidue.lean`:
Contents:
1. `zetaA w := Function.update (fun w => (w - 1) * riemannZeta w) 1 1` — analytic at 1 with value 1.
- `zetaA_analyticAt_one : AnalyticAt ℂ zetaA 1`
- `zetaA_one : zetaA 1 = 1` (by def: Function.update_self)
- `zetaA_ne_zero_near_one : ∀ᶠ w in 𝓝 1, zetaA w ≠ 0` (from value 1 + continuity)
- `zetaA_apply_ne_one : ∀ w ≠ 1, zetaA w = (w - 1) * riemannZeta w` (Function.update_of_ne)
Analyticity proof: off 1 it's analytic (product of analytic); at 1: (s−1)ζ(s) → 1 (riemannZeta_residue_one) ⟹ removable singularity. Machinery: `AnalyticAt` of the update — approach: show zetaA is analytic on a punctured neighborhood of 1 and bounded near 1 ⟹ extends — the vendored `differentiableOn_update_limUnder_of_bddAbove` (from the snippet: `differentiableOn_update_limUnder_of_bddAbove hc hd hb` — need its exact signature). Let me grep it.
2. `hLi w := 1 - (w - 1) * (deriv zetaA w / zetaA w)` — analytic at 1 (zetaA analytic, zetaA 1 = 1 ≠ 0 ⟹ zetaA ≠ 0 near 1 ⟹ quotient analytic; deriv of analytic is analytic).
- `hLi_analyticAt_one`
- `hLi_one : hLi 1 = 1`
- `hLi_eq (hw : w ≠ 1) : hLi w = (w - 1) * (-deriv riemannZeta w / riemannZeta w)` — via deriv zetaA = ζ + (s−1)ζ′ (product rule: deriv ((w−1)·ζ) = 1·ζ + (w−1)·ζ′ ✓) and zetaA = (w−1)ζ: deriv zetaA / zetaA = (ζ + (w−1)ζ′)/((w−1)ζ) = 1/(w−1) + ζ′/ζ: so hLi = 1 − (w−1)(1/(w−1) + ζ′/ζ) = −(w−1)ζ′/ζ = (w−1)(−ζ′/ζ) ✓.
3. `lcoeff (k : ℕ) : ℂ := iteratedDeriv (k + 1) hLi 1 / (k + 1)!`
(the Laurent coefficients of −ζ′/ζ at 1: −ζ′/ζ(1+u) = u⁻¹ + Σ c_k u^k — identification lemma LATER at ii′-2/3 when needed; for now the def via hLi is operational.)
4. `ResW1 (n : ℕ) : ℂ := iteratedDeriv n (fun w => (w^n - (w - 1)^n) * hLi w) 1 / n !`
theorem `ResW1_eq_sum : ResW1 n = ∑ i ∈ Finset.range n, (n.choose (i+1) : ℂ) * lcoeff i`
— via iteratedDeriv_mul + the A(w) = wⁿ−(w−1)ⁿ derivative computations:
F^{(n)}(1) = Σ_{i=0}^{n} C(n,i)·A^{(i)}(1)·hLi^{(n−i)}(1)
A^{(i)}(1) = n.descFactorial i − [i = n]·n! (0 for i < n from the (w−1)ⁿ part via iteratedDeriv_comp_sub_const + descFactorial; n! for i = n).
Terms: i = 0: C(n,0)·A(1)·hLi^{(n)}(1) = 1·1·hLi^{(n)}(1). i = n: C(n,n)·0·hLi(1) = 0. i ∈ (0,n): C(n,i)·descFactorial i·hLi^{(n−i)}(1).
F^{(n)}(1)/n! = Σ_{i=0}^{n−1} C(n,i)·descFactorial i/n!·hLi^{(n−i)}(1) = Σ_{i=0}^{n−1} hLi^{(n−i)}(1)/(n−i)! — wait: C(n,i)·descFactorial i = n!/(i!(n−i)!)·n!/(n−i)!-hmm: C(n,i) = n!/(i!(n−i)!); descFactorial i = n!/(n−i)!; product = (n!)²/(i!(n−i)!²)?? NO — that's wrong. Let me recompute: A^{(i)}(1) = n.descFactorial i (for i < n) where descFactorial i = n·(n−1)·...·(n−i+1) = n!/(n−i)!. And Leibniz: F^{(n)} = Σ_i C(n,i)·A^{(i)}·h^{(n−i)}. C(n,i)·A^{(i)}(1) = [n!/(i!(n−i)!)]·[n!/(n−i)!] — that's NOT right either — wait n.descFactorial i: descFactorial n i = n!/(n−i)! ✓. So C(n,i)·descFactorial n i = [n!/(i!(n−i)!)]·[n!/(n−i)!] = (n!)²/(i!(n−i)!²). Hmm that's ugly — but it should simplify: I want the final answer Σ_j C(n,j)·h^{(j)}(1)/j!·... = Σ_j C(n,j) c_{j−1}·... and lcoeff(j−1) = h^{(j)}(1)/j!. So the target: F^{(n)}(1)/n! = Σ_{i=0}^{n−1} C(n,i)·hLi^{(n−i)}(1)/(n−i)!·... = Σ_{i=0}^{n−1} C(n,i)·lcoeff(n−i−1). Reindex j = n−i: Σ_{j=1}^{n} C(n,n−j)·lcoeff(j−1) = Σ_{j=1}^n C(n,j)·lcoeff(j−1) ✓ (C(n,n−j) = C(n,j)). So I need: C(n,i)·A^{(i)}(1)/n! = C(n,i)·descFactorial n i/n! = [n!/(i!(n−i)!)]·[n!/(n−i)!]/n! = n!/(i!(n−i)!²). And the target coefficient of h^{(n−i)}(1): C(n,i)/(n−i)!·... = [n!/(i!(n−i)!)]/(n−i)! = n!/(i!(n−i)!²) ✓✓ SAME. Good — consistent.
So ResW1 = Σ_{i=0}^{n−1} [n!/(i!(n−i)!²)]·hLi^{(n−i)}(1)·(1/n!)... hold on let me redo cleanly:
ResW1 n = F^{(n)}(1)/n! = (1/n!)·Σ_{i=0}^{n} C(n,i)·A^{(i)}(1)·h^{(n−i)}(1)
= (1/n!)·Σ_{i=0}^{n−1} C(n,i)·descFac(n,i)·h^{(n−i)}(1) [i = n term is 0]
= Σ_{i=0}^{n−1} [C(n,i)·descFac(n,i)/n!]·h^{(n−i)}(1)
= Σ_{i=0}^{n−1} [n!/(i!(n−i)!·(n−i)!)]·h^{(n−i)}(1) [since C(n,i)·descFac = n!²/(i!(n−i)!²), /n! = n!/(i!(n−i)!²)]
And lcoeff(n−i−1) = h^{(n−i)}(1)/(n−i)!. So the i-term = [n!/(i!(n−i)!)]·lcoeff(n−i−1) = C(n,i)·lcoeff(n−i−1) ✓.
ResW1 = Σ_{i=0}^{n−1} C(n,i)·lcoeff(n−i−1) = Σ_{j=1}^{n} C(n,n−j)·lcoeff(j−1) = Σ_{j=1}^n C(n,j)·lcoeff(j−1) ✓.
The j = 0 (i = n) term of the i-sum: i ranges 0..n−1, j = n−i ranges 1..n ✓.
5. The A(w) derivative lemma:
`Aiter (i n : ℕ) : iteratedDeriv i (fun w => w^n - (w-1)^n) 1 = n.descFactorial i - (if i = n then n.factorial else 0)` — hmm wait: for i < n: descFac n i − 0; for i = n: n! − n! = 0. So A^{(i)}(1) = if i < n then descFac n i else 0 (for i ≤ n). Proof: iteratedDeriv i (wⁿ) 1 = descFac n i · 1^{n−i} = descFac n i (simp iteratedDeriv_pow). iteratedDeriv i (fun w => (w−1)^n) 1 = iteratedDeriv i (·^n) (1−1) = iteratedDeriv i (·^n) 0 = descFac n i · 0^(n−i) = if i < n then 0 else n! (for i = n: descFac n n · 0^0 = n!·1 = n!). Via iteratedDeriv_comp_sub_const with f = (·^n), s = 1: `iteratedDeriv_comp_sub_const i (·^n) 1 : iteratedDeriv i (fun z => (z−1)^n) = fun t => iteratedDeriv i (·^n) (t−1)` — at t = 1: (·^n) at 0 ✓. Need (fun w => (w−1)^n) = (fun z => (z−1)^n) — same form ✓.
Also descFac n n = n! : `Nat.descFactorial_self`.
And 0^(n−i) for i < n = 0 (zero_pow), for i = n: 0^0 = 1 (pow_zero).
Then the iteratedDeriv_mul application: needs ContDiffAt ℂ n for both factors at 1: polynomial A: contDiff (polynomials are smooth); hLi: analytic at 1 ⟹ ContDiff at 1 of any order (AnalyticAt.contDiff? — `AnalyticAt.contDiffAt` or via `ContDiff` of analytic functions: analytic ⟹ C^∞: `AnalyticAt.contDiff`? there's `AnalyticAt.hasStrictDerivAt`... for ContDiff: `AnalyticOnNhd.contDiff`? or `AnalyticAt.contDiffAt (n)`: I believe `AnalyticAt.contDiffAt : AnalyticAt 𝕜 f x → ContDiffAt 𝕜 n f x` exists (analytic ⟹ contDiff of all orders). Check.
That's ii′-1b(i) — sizable but well-defined. Let me write it. First check: AnalyticAt.contDiffAt existence, Function.update API (update_self/update_of_ne), differentiableOn_update_limUnder_of_bddAbove signature (for zetaA analyticity), Nat.descFactorial_self, descFactorial def.
Actually for zetaA analyticity there's a cleaner Mathlib path: `MeromorphicAt` + the removable-singularity criterion — or even simpler: ζ = a/(s−1) with a := zetaA... Actually Mathlib might directly have the analyticity of (s−1)ζ(s) at 1! The completed zeta machinery: `completedRiemannZeta₀` is entire (Differentiable completedZeta₀ ✓ per agent!). completedRiemannZeta₀(s) = s(s−1)·π^{−s/2}Γ(s/2)ζ(s)? Let me check the defs: completedRiemannZeta₀ (s) = s·(s−1)·... hmm. If Λ₀(s) := s(s−1)π^{−s/2}Γ(s/2)ζ(s) is entire and differentiable everywhere (Mathlib `differentiable_completedZeta₀ : Differentiable ℂ completedRiemannZeta₀` ✓), then zetaA(s) = (s−1)ζ(s) = Λ₀(s)/(s·π^{−s/2}Γ(s/2)) — quotient of analytics with nonvanishing denominator near 1 (s·π^{−s/2}Γ(s/2) at 1 = 1·π^{−1/2}·√π = 1 ✓ ≠ 0) ⟹ analytic at 1 ✓✓ and zetaA(1) = Λ₀(1)/1 = Λ₀(1): need Λ₀(1) = 1: Λ₀(1) = 1·0·π^{−1/2}Γ(1/2)ζ(1)?? — 0·ζ(1) = 0 — so Λ₀(1) = 0?? That gives zetaA(1) = 0/1 = 0 ≠ 1. Hmm — so the identity zetaA = Λ₀/(s·π^{−s/2}Γ(s/2)) holds only OFF 1 (where everything is defined); at 1 both sides... Λ₀(1) = lim = 1? Λ₀(s) = s(s−1)π^{−s/2}Γ(s/2)ζ(s): as s→1: (s−1)ζ(s) → 1 ⟹ Λ₀(s) → 1·1·π^{−1/2}·√π·1 = 1 ✓ (continuity of the entire function). So zetaA(s) = Λ₀(s)/(s·π^{−s/2}Γ(s/2)) OFF 1 and both sides are analytic AT 1 (LHS after update) with value... the quotient at 1 = Λ₀(1)/1 and Λ₀(1) = 1 by continuity ✓. So:
- def zetaA := Function.update (fun w => (w−1)*riemannZeta w) 1 1
- AnalyticAt zetaA 1: off 1: (w−1)ζ analytic; at 1: agree with the analytic quotient Q(s) := Λ₀(s)/(s·π^{−s/2}Γ(s/2)) on a punctured neighborhood ⟹ AnalyticAt of update = AnalyticAt of Q ✓ (`AnalyticAt.congr` via EventuallyEq).
Q analytic at 1: Λ₀ differentiable (entire) ✓; denominator: s·π^{−s/2}Γ(s/2): analytic at 1 (Γ analytic at 1/2 ✓ Mathlib differentiableAt_Gamma? — `Complex.differentiableAt_Gamma (s) (hs : ∀ m : ℕ, s ≠ -m)`: at s = 1/2 ✓) and ≠ 0 at 1 (Γ(1/2) = √π ≠ 0, π^{−1/2} ≠ 0, 1 ≠ 0) ✓ quotient analytic ✓.
Λ₀(1) = 1: continuity + limit: Tendsto Λ₀ at 1 → 𝓝 (Λ₀ 1); Λ₀(s) → 1 as computed ⟹ Λ₀(1) = 1 — via Tendsto products: π^{−s/2} → π^{−1/2} (continuous), Γ(s/2) → Γ(1/2) = √π (continuity ✓ Mathlib continuous_Gamma? differentiableAt ⟹ continuousAt ✓), (s−1)ζ(s) → 1 (riemannZeta_residue_one ✓), s → 1: product → 1·π^{−1/2}·√π·1 = 1: need π^{−1/2}·√π = 1: π^{−1/2} = 1/√π ✓ (Real.rpow). Fiddly but fine.
Need completedRiemannZeta₀'s DEFINITION to confirm the factorization: `completedRiemannZeta₀ (s) = s * (s - 1) * (π ^ (-s/2)) * Gamma (s/2) * riemannZeta s`?? — need to check the exact Mathlib def. Let me grep.
This is cleaner than the update+limUnder path. Let me check the def.
`iteratedDeriv_comp_sub_const` confirmed — all API pieces are in place. Let me check `completedRiemannZeta₀`'s definition for the clean analyticity path at w=1.
tool: Bash
input
{
"command": "cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -n \"completedRiemannZeta\u2080\\|def completedRiemannZeta\" Mathlib/NumberTheory/LSeries/RiemannZeta.lean | head -12; grep -rn \"theorem differentiableAt_Gamma\\b\\|differentiable_completedZeta\u2080\" Mathlib/NumberTheory/LSeries/RiemannZeta.lean Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean 2>/dev/null | head -5",
"description": "Check completedRiemannZeta\u2080 definition and Gamma differentiability"
}
raw content_json (database row)
[{"type":"thinking","thinking":"`iteratedDeriv_comp_sub_const : iteratedDeriv n (fun z ↦ f (z - s)) = fun t ↦ iteratedDeriv n f (t - s)` ✓ — exactly the shift lemma. So:\niteratedDeriv i (fun w => (w - 1)^n) 1 = iteratedDeriv i (·^n) (1 − 1) = iteratedDeriv i (·^n) 0 = n.descFactorial i * 0^(n−i) = 0 for i < n, and = n! for i = n (0^0 = 1 — descFactorial n n = n!, 0^(n−n) = 0^0 = 1 ✓).\n\nAll APIs confirmed. Now let me start writing ii′-1b(i): the w=1 residue value. This is a substantial piece of Lean. Plan the file structure — new file `NguyenRH1/LiResidue.lean`:\n\nContents:\n1. `zetaA w := Function.update (fun w => (w - 1) * riemannZeta w) 1 1` — analytic at 1 with value 1.\n - `zetaA_analyticAt_one : AnalyticAt ℂ zetaA 1`\n - `zetaA_one : zetaA 1 = 1` (by def: Function.update_self)\n - `zetaA_ne_zero_near_one : ∀ᶠ w in 𝓝 1, zetaA w ≠ 0` (from value 1 + continuity)\n - `zetaA_apply_ne_one : ∀ w ≠ 1, zetaA w = (w - 1) * riemannZeta w` (Function.update_of_ne)\n \n Analyticity proof: off 1 it's analytic (product of analytic); at 1: (s−1)ζ(s) → 1 (riemannZeta_residue_one) ⟹ removable singularity. Machinery: `AnalyticAt` of the update — approach: show zetaA is analytic on a punctured neighborhood of 1 and bounded near 1 ⟹ extends — the vendored `differentiableOn_update_limUnder_of_bddAbove` (from the snippet: `differentiableOn_update_limUnder_of_bddAbove hc hd hb` — need its exact signature). Let me grep it.\n\n2. `hLi w := 1 - (w - 1) * (deriv zetaA w / zetaA w)` — analytic at 1 (zetaA analytic, zetaA 1 = 1 ≠ 0 ⟹ zetaA ≠ 0 near 1 ⟹ quotient analytic; deriv of analytic is analytic).\n - `hLi_analyticAt_one`\n - `hLi_one : hLi 1 = 1`\n - `hLi_eq (hw : w ≠ 1) : hLi w = (w - 1) * (-deriv riemannZeta w / riemannZeta w)` — via deriv zetaA = ζ + (s−1)ζ′ (product rule: deriv ((w−1)·ζ) = 1·ζ + (w−1)·ζ′ ✓) and zetaA = (w−1)ζ: deriv zetaA / zetaA = (ζ + (w−1)ζ′)/((w−1)ζ) = 1/(w−1) + ζ′/ζ: so hLi = 1 − (w−1)(1/(w−1) + ζ′/ζ) = −(w−1)ζ′/ζ = (w−1)(−ζ′/ζ) ✓.\n\n3. `lcoeff (k : ℕ) : ℂ := iteratedDeriv (k + 1) hLi 1 / (k + 1)!`\n (the Laurent coefficients of −ζ′/ζ at 1: −ζ′/ζ(1+u) = u⁻¹ + Σ c_k u^k — identification lemma LATER at ii′-2/3 when needed; for now the def via hLi is operational.)\n\n4. `ResW1 (n : ℕ) : ℂ := iteratedDeriv n (fun w => (w^n - (w - 1)^n) * hLi w) 1 / n !`\n theorem `ResW1_eq_sum : ResW1 n = ∑ i ∈ Finset.range n, (n.choose (i+1) : ℂ) * lcoeff i`\n — via iteratedDeriv_mul + the A(w) = wⁿ−(w−1)ⁿ derivative computations:\n F^{(n)}(1) = Σ_{i=0}^{n} C(n,i)·A^{(i)}(1)·hLi^{(n−i)}(1)\n A^{(i)}(1) = n.descFactorial i − [i = n]·n! (0 for i < n from the (w−1)ⁿ part via iteratedDeriv_comp_sub_const + descFactorial; n! for i = n).\n Terms: i = 0: C(n,0)·A(1)·hLi^{(n)}(1) = 1·1·hLi^{(n)}(1). i = n: C(n,n)·0·hLi(1) = 0. i ∈ (0,n): C(n,i)·descFactorial i·hLi^{(n−i)}(1).\n F^{(n)}(1)/n! = Σ_{i=0}^{n−1} C(n,i)·descFactorial i/n!·hLi^{(n−i)}(1) = Σ_{i=0}^{n−1} hLi^{(n−i)}(1)/(n−i)! — wait: C(n,i)·descFactorial i = n!/(i!(n−i)!)·n!/(n−i)!-hmm: C(n,i) = n!/(i!(n−i)!); descFactorial i = n!/(n−i)!; product = (n!)²/(i!(n−i)!²)?? NO — that's wrong. Let me recompute: A^{(i)}(1) = n.descFactorial i (for i < n) where descFactorial i = n·(n−1)·...·(n−i+1) = n!/(n−i)!. And Leibniz: F^{(n)} = Σ_i C(n,i)·A^{(i)}·h^{(n−i)}. C(n,i)·A^{(i)}(1) = [n!/(i!(n−i)!)]·[n!/(n−i)!] — that's NOT right either — wait n.descFactorial i: descFactorial n i = n!/(n−i)! ✓. So C(n,i)·descFactorial n i = [n!/(i!(n−i)!)]·[n!/(n−i)!] = (n!)²/(i!(n−i)!²). Hmm that's ugly — but it should simplify: I want the final answer Σ_j C(n,j)·h^{(j)}(1)/j!·... = Σ_j C(n,j) c_{j−1}·... and lcoeff(j−1) = h^{(j)}(1)/j!. So the target: F^{(n)}(1)/n! = Σ_{i=0}^{n−1} C(n,i)·hLi^{(n−i)}(1)/(n−i)!·... = Σ_{i=0}^{n−1} C(n,i)·lcoeff(n−i−1). Reindex j = n−i: Σ_{j=1}^{n} C(n,n−j)·lcoeff(j−1) = Σ_{j=1}^n C(n,j)·lcoeff(j−1) ✓ (C(n,n−j) = C(n,j)). So I need: C(n,i)·A^{(i)}(1)/n! = C(n,i)·descFactorial n i/n! = [n!/(i!(n−i)!)]·[n!/(n−i)!]/n! = n!/(i!(n−i)!²). And the target coefficient of h^{(n−i)}(1): C(n,i)/(n−i)!·... = [n!/(i!(n−i)!)]/(n−i)! = n!/(i!(n−i)!²) ✓✓ SAME. Good — consistent.\n\n So ResW1 = Σ_{i=0}^{n−1} [n!/(i!(n−i)!²)]·hLi^{(n−i)}(1)·(1/n!)... hold on let me redo cleanly:\n ResW1 n = F^{(n)}(1)/n! = (1/n!)·Σ_{i=0}^{n} C(n,i)·A^{(i)}(1)·h^{(n−i)}(1)\n = (1/n!)·Σ_{i=0}^{n−1} C(n,i)·descFac(n,i)·h^{(n−i)}(1) [i = n term is 0]\n = Σ_{i=0}^{n−1} [C(n,i)·descFac(n,i)/n!]·h^{(n−i)}(1)\n = Σ_{i=0}^{n−1} [n!/(i!(n−i)!·(n−i)!)]·h^{(n−i)}(1) [since C(n,i)·descFac = n!²/(i!(n−i)!²), /n! = n!/(i!(n−i)!²)]\n And lcoeff(n−i−1) = h^{(n−i)}(1)/(n−i)!. So the i-term = [n!/(i!(n−i)!)]·lcoeff(n−i−1) = C(n,i)·lcoeff(n−i−1) ✓.\n ResW1 = Σ_{i=0}^{n−1} C(n,i)·lcoeff(n−i−1) = Σ_{j=1}^{n} C(n,n−j)·lcoeff(j−1) = Σ_{j=1}^n C(n,j)·lcoeff(j−1) ✓.\n\n The j = 0 (i = n) term of the i-sum: i ranges 0..n−1, j = n−i ranges 1..n ✓.\n\n5. The A(w) derivative lemma:\n `Aiter (i n : ℕ) : iteratedDeriv i (fun w => w^n - (w-1)^n) 1 = n.descFactorial i - (if i = n then n.factorial else 0)` — hmm wait: for i < n: descFac n i − 0; for i = n: n! − n! = 0. So A^{(i)}(1) = if i < n then descFac n i else 0 (for i ≤ n). Proof: iteratedDeriv i (wⁿ) 1 = descFac n i · 1^{n−i} = descFac n i (simp iteratedDeriv_pow). iteratedDeriv i (fun w => (w−1)^n) 1 = iteratedDeriv i (·^n) (1−1) = iteratedDeriv i (·^n) 0 = descFac n i · 0^(n−i) = if i < n then 0 else n! (for i = n: descFac n n · 0^0 = n!·1 = n!). Via iteratedDeriv_comp_sub_const with f = (·^n), s = 1: `iteratedDeriv_comp_sub_const i (·^n) 1 : iteratedDeriv i (fun z => (z−1)^n) = fun t => iteratedDeriv i (·^n) (t−1)` — at t = 1: (·^n) at 0 ✓. Need (fun w => (w−1)^n) = (fun z => (z−1)^n) — same form ✓.\n Also descFac n n = n! : `Nat.descFactorial_self`.\n And 0^(n−i) for i < n = 0 (zero_pow), for i = n: 0^0 = 1 (pow_zero).\n\nThen the iteratedDeriv_mul application: needs ContDiffAt ℂ n for both factors at 1: polynomial A: contDiff (polynomials are smooth); hLi: analytic at 1 ⟹ ContDiff at 1 of any order (AnalyticAt.contDiff? — `AnalyticAt.contDiffAt` or via `ContDiff` of analytic functions: analytic ⟹ C^∞: `AnalyticAt.contDiff`? there's `AnalyticAt.hasStrictDerivAt`... for ContDiff: `AnalyticOnNhd.contDiff`? or `AnalyticAt.contDiffAt (n)`: I believe `AnalyticAt.contDiffAt : AnalyticAt 𝕜 f x → ContDiffAt 𝕜 n f x` exists (analytic ⟹ contDiff of all orders). Check.\n\nThat's ii′-1b(i) — sizable but well-defined. Let me write it. First check: AnalyticAt.contDiffAt existence, Function.update API (update_self/update_of_ne), differentiableOn_update_limUnder_of_bddAbove signature (for zetaA analyticity), Nat.descFactorial_self, descFactorial def.\n\nActually for zetaA analyticity there's a cleaner Mathlib path: `MeromorphicAt` + the removable-singularity criterion — or even simpler: ζ = a/(s−1) with a := zetaA... Actually Mathlib might directly have the analyticity of (s−1)ζ(s) at 1! The completed zeta machinery: `completedRiemannZeta₀` is entire (Differentiable completedZeta₀ ✓ per agent!). completedRiemannZeta₀(s) = s(s−1)·π^{−s/2}Γ(s/2)ζ(s)? Let me check the defs: completedRiemannZeta₀ (s) = s·(s−1)·... hmm. If Λ₀(s) := s(s−1)π^{−s/2}Γ(s/2)ζ(s) is entire and differentiable everywhere (Mathlib `differentiable_completedZeta₀ : Differentiable ℂ completedRiemannZeta₀` ✓), then zetaA(s) = (s−1)ζ(s) = Λ₀(s)/(s·π^{−s/2}Γ(s/2)) — quotient of analytics with nonvanishing denominator near 1 (s·π^{−s/2}Γ(s/2) at 1 = 1·π^{−1/2}·√π = 1 ✓ ≠ 0) ⟹ analytic at 1 ✓✓ and zetaA(1) = Λ₀(1)/1 = Λ₀(1): need Λ₀(1) = 1: Λ₀(1) = 1·0·π^{−1/2}Γ(1/2)ζ(1)?? — 0·ζ(1) = 0 — so Λ₀(1) = 0?? That gives zetaA(1) = 0/1 = 0 ≠ 1. Hmm — so the identity zetaA = Λ₀/(s·π^{−s/2}Γ(s/2)) holds only OFF 1 (where everything is defined); at 1 both sides... Λ₀(1) = lim = 1? Λ₀(s) = s(s−1)π^{−s/2}Γ(s/2)ζ(s): as s→1: (s−1)ζ(s) → 1 ⟹ Λ₀(s) → 1·1·π^{−1/2}·√π·1 = 1 ✓ (continuity of the entire function). So zetaA(s) = Λ₀(s)/(s·π^{−s/2}Γ(s/2)) OFF 1 and both sides are analytic AT 1 (LHS after update) with value... the quotient at 1 = Λ₀(1)/1 and Λ₀(1) = 1 by continuity ✓. So:\n- def zetaA := Function.update (fun w => (w−1)*riemannZeta w) 1 1\n- AnalyticAt zetaA 1: off 1: (w−1)ζ analytic; at 1: agree with the analytic quotient Q(s) := Λ₀(s)/(s·π^{−s/2}Γ(s/2)) on a punctured neighborhood ⟹ AnalyticAt of update = AnalyticAt of Q ✓ (`AnalyticAt.congr` via EventuallyEq).\n Q analytic at 1: Λ₀ differentiable (entire) ✓; denominator: s·π^{−s/2}Γ(s/2): analytic at 1 (Γ analytic at 1/2 ✓ Mathlib differentiableAt_Gamma? — `Complex.differentiableAt_Gamma (s) (hs : ∀ m : ℕ, s ≠ -m)`: at s = 1/2 ✓) and ≠ 0 at 1 (Γ(1/2) = √π ≠ 0, π^{−1/2} ≠ 0, 1 ≠ 0) ✓ quotient analytic ✓.\n Λ₀(1) = 1: continuity + limit: Tendsto Λ₀ at 1 → 𝓝 (Λ₀ 1); Λ₀(s) → 1 as computed ⟹ Λ₀(1) = 1 — via Tendsto products: π^{−s/2} → π^{−1/2} (continuous), Γ(s/2) → Γ(1/2) = √π (continuity ✓ Mathlib continuous_Gamma? differentiableAt ⟹ continuousAt ✓), (s−1)ζ(s) → 1 (riemannZeta_residue_one ✓), s → 1: product → 1·π^{−1/2}·√π·1 = 1: need π^{−1/2}·√π = 1: π^{−1/2} = 1/√π ✓ (Real.rpow). Fiddly but fine.\n Need completedRiemannZeta₀'s DEFINITION to confirm the factorization: `completedRiemannZeta₀ (s) = s * (s - 1) * (π ^ (-s/2)) * Gamma (s/2) * riemannZeta s`?? — need to check the exact Mathlib def. Let me grep.\n\nThis is cleaner than the update+limUnder path. Let me check the def.","signature":""},{"type":"text","text":"`iteratedDeriv_comp_sub_const` confirmed — all API pieces are in place. Let me check `completedRiemannZeta₀`'s definition for the clean analyticity path at w=1."},{"type":"tool_use","id":"Bash_185","name":"Bash","input":{"command":"cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -n \"completedRiemannZeta₀\\|def completedRiemannZeta\" Mathlib/NumberTheory/LSeries/RiemannZeta.lean | head -12; grep -rn \"theorem differentiableAt_Gamma\\b\\|differentiable_completedZeta₀\" Mathlib/NumberTheory/LSeries/RiemannZeta.lean Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean 2>/dev/null | head -5","description":"Check completedRiemannZeta₀ definition and Gamma differentiability"},"extra_content":null}]