Current task: —

← Session 22 — ii′-1: liCoeff pairing fix + residue machinery

#1061 assistant 2026-08-22 06:13:13.896 UTC · 6652→5263 tok open ⤢
thinking (13868 chars)
- `Complex.differentiableAt_Gamma (s : ℂ) (hs : ∀ m : ℕ, s ≠ −m) : DifferentiableAt ℂ Gamma s` ✓ (line 65). - `Real.differentiableAt_Gamma {s : ℝ} (hs : ∀ m : ℕ, s ≠ −m)` ✓ and `Real.differentiableOn_Gamma_Ioi` ✓ (line 149/154) — for the real side. Now let me write the first part of LiArchimedean.lean: the Gammaℝ logDeriv split + τ₀ evaluation. Plan for the split lemma: ```lean /-- The Gammaℝ logDeriv split: logDeriv Gammaℝ (1+s) = −(log π)/2 + (1/2)·ψ((1+s)/2). -/ lemma logDeriv_Gammaℝ_one_add {s : ℂ} (hs : Complex.Gamma ((1 + s) / 2) ≠ 0) : logDeriv Complex.Gammaℝ (1 + s) = -(Real.log π : ℂ) / 2 + (1 / 2) * Complex.digamma ((1 + s) / 2) := by have hdef : Complex.Gammaℝ (1 + s) = Complex.exp (-(Real.log π : ℂ) / 2 * (1 + s)) * Complex.Gamma ((1 + s) / 2) := by rw [Complex.Gammaℝ_def] -- π ^ (−(1+s)/2) * Gamma ((1+s)/2) congr 1 -- π ^ (−(1+s)/2) = exp (−(log π)/2 · (1+s)) rw [Complex.cpow_def_of_ne_zero (by positivity?...)] -- (↑π)^z = exp (log ↑π * z) ... ``` Hmm — let me structure the split as a function identity valid wherever, then take logDeriv: For the logDeriv of a product: `logDeriv_mul (f g) (x) (hf : f x ≠ 0) (hg : g x ≠ 0) (hf' : DifferentiableAt .. f x) (hg' : ...)` — from the vendored usage (line 257): `logDeriv_mul (f := ...) (g := ...) s (pow_ne_zero _ hsq) hhs (by fun_prop) hhas.differentiableAt` — so signature: logDeriv_mul (x) (hf-ne) (hg-ne) (hf-diff) (hg-diff) : logDeriv (f*g) x = logDeriv f x + logDeriv g x ✓. So: ```lean lemma logDeriv_Gammaℝ_one_add {s : ℂ} (hs : Complex.Gamma ((1 + s) / 2) ≠ 0) (hs2 : ∀ m : ℕ, ((1 + s) / 2) ≠ -m) : logDeriv Complex.Gammaℝ (1 + s) = -(Real.log π : ℂ) / 2 + (1 / 2) * Complex.digamma ((1 + s) / 2) := by have hexp : ∀ w : ℂ, (↑(Real.pi) : ℂ) ^ (-w / 2) = Complex.exp (-(Real.log π : ℂ) / 2 * w) := by intro w rw [Complex.cpow_def_of_ne_zero (by ... : (↑(Real.pi) : ℂ) ≠ 0)] congr 1 -- log ↑π * (−w/2) = −(log π)/2 · w rw [Complex.log_ofReal?...] -- Complex.log ↑π = ↑(Real.log π): `Complex.log_ofReal`? or `Complex.ofReal_log (h : 0 ≤ π)`: `Complex.ofReal_log (hx : 0 ≤ x) : Complex.log ↑x = ↑(Real.log x)`? name check needed push_cast ring rw [Complex.Gammaℝ_def] -- wait Gammaℝ_def is about Gammaℝ s = π^(−s/2) * Gamma (s/2) — the argument is (1+s): Gammaℝ (1+s) = π^(−(1+s)/2) * Gamma ((1+s)/2) ✓ — but I want the FUNCTION-level: logDeriv (fun w => π^(−w/2) * Gamma (w/2)) (1+s) — is logDeriv Gammaℝ (1+s) directly the application? Gammaℝ as a function IS fun w => π^(−w/2)*Gamma(w/2) by Gammaℝ_def (rfl!). So logDeriv Gammaℝ (1+s) — the function Gammaℝ — unfold via Gammaℝ_def (it's `lemma Gammaℝ_def (s : ℂ) : Gammaℝ s = π ^ (-s / 2) * Gamma (s / 2) := rfl` — so Gammaℝ is DEFINITIONALLY that — `rw [Complex.Gammaℝ_def]`? on logDeriv Gammaℝ (1+s) — Gammaℝ_def is an iff-free eq about Gammaℝ s — rewriting Gammaℝ (1+s)?? the term in the goal is `logDeriv Complex.Gammaℝ (1 + s)` — the function `Complex.Gammaℝ` applied — Gammaℝ_def's LHS pattern is `Gammaℝ s` (any s) — rw [Complex.Gammaℝ_def] would rewrite `Gammaℝ (1+s)` inside logDeriv's argument — logDeriv (π^(−(1+s)/2)*Gamma((1+s)/2)) (1+s) — hmm — that's logDeriv OF THE VALUE not the function — wrong. I need logDeriv (fun w => ...) — the FUNCTION: show Complex.Gammaℝ = fun w => ... via funext w; exact Gammaℝ_def w? — Gammaℝ_def is rfl so `Complex.Gammaℝ = fun w => π^(−w/2)*Gamma(w/2)` is rfl ✓: rw [show Complex.Gammaℝ = fun w : ℂ => (↑Real.pi) ^ (-w / 2) * Complex.Gamma (w / 2) from rfl] -- then rewrite the cpow as exp via funext rw [show (fun w : ℂ => (↑Real.pi) ^ (-w / 2) * Complex.Gamma (w / 2)) = (fun w => Complex.exp (-(Real.log π : ℂ) / 2 * w)) * Complex.Gamma ∘ (fun w => w / 2) from ...] ``` Hmm — let me be careful with the composition forms. The function: fun w => exp(c·w) * Gamma(w/2) with c := −(log π)/2. logDeriv at (1+s): logDeriv_mul: - f := fun w => exp(c*w): f(1+s) ≠ 0 (exp_ne_zero ✓ `Complex.exp_ne_zero`); differentiableAt: (differentiableAt_exp.comp? — `Complex.differentiableAt_exp.comp ...`? or fun_prop) ✓. - g := fun w => Gamma (w/2): g(1+s) = Gamma((1+s)/2) ≠ 0 = hs ✓; differentiableAt: differentiableAt_Gamma ((1+s)/2) hs2 .comp — comp with w/2: `DifferentiableAt.comp` ✓. Then logDeriv f (1+s): f = exp ∘ (c·w): deriv f (1+s) = exp(c(1+s))·c (chain rule: deriv_exp + deriv_const_mul/deriv_mul_const); logDeriv f = f'/f = exp·c/exp = c ✓ = −(log π)/2. logDeriv g (1+s) = (Gamma'((1+s)/2)·(1/2))/Gamma((1+s)/2) = (1/2)·digamma((1+s)/2) ✓ (digamma_def : digamma = logDeriv Gamma — so digamma w = deriv Gamma w / Gamma w ✓). Sum: −(log π)/2 + (1/2)·digamma((1+s)/2) ✓. Detailed Lean: ```lean lemma logDeriv_Gammaℝ_one_add {s : ℂ} (hs : Complex.Gamma ((1 + s) / 2) ≠ 0) (hs2 : ∀ m : ℕ, ((1 + s) / 2) ≠ -m) : logDeriv Complex.Gammaℝ (1 + s) = -(Real.log π : ℂ) / 2 + (1 / 2) * Complex.digamma ((1 + s) / 2) := by set c : ℂ := -(Real.log π : ℂ) / 2 with hc have hexp : (fun w : ℂ => (↑Real.pi) ^ (-w / 2)) = fun w => Complex.exp (c * w) := by funext w rw [Complex.cpow_def_of_ne_zero (by exact_mod_cast Real.pi_ne_zero)] -- (↑π : ℂ) ≠ 0 -- exp (log ↑π * (−w/2)) = exp (c·w) congr 1 have hlog : Complex.log (↑(Real.pi) : ℂ) = (Real.log π : ℂ) := by exact Complex.log_ofReal? -- check name: `Complex.log_ofReal`? hmm — maybe `Complex.ofReal_log (Real.pi_nonneg)`? — `Complex.ofReal_log : 0 ≤ x → ↑(Real.log x) = Complex.log ↑x`? something — find it rw [hlog] rw [hc] ring have hfun : Complex.Gammaℝ = (fun w => Complex.exp (c * w)) * fun w => Complex.Gamma (w / 2) := by funext w rw [Pi.mul_apply, Complex.Gammaℝ_def, hexp] -- hmm hexp is a function eq — use its pointwise: (fun w => ...) w — rw [hexp] rewrites the cpow-term ✓ — careful: Gammaℝ_def : Gammaℝ w = π^(−w/2)*Gamma(w/2) — goal: Gammaℝ w = (exp(c·w)) * Gamma(w/2)-applied — rw [Pi.mul_apply] on RHS first? Let me structure: funext w; show Gammaℝ w = Complex.exp (c*w) * Complex.Gamma (w/2) — after Pi.mul_apply... just: funext w; rw [Complex.Gammaℝ_def]; congr 1; exact the pointwise from hexp rw [hfun] rw [logDeriv_mul (f := fun w => Complex.exp (c * w)) (g := fun w => Complex.Gamma (w / 2)) (1 + s) (Complex.exp_ne_zero _) hs ?_ ?_] ... ``` Hmm — logDeriv_mul's exact argument order from the vendored usage: `logDeriv_mul (f := ...) (g := ...) s (pow_ne_zero _ hsq) hhs (by fun_prop) hhas.differentiableAt` — so args: (x) (hfx : f x ≠ 0) (hgx : g x ≠ 0) (hf : DifferentiableAt 𝕜 f x) (hg : DifferentiableAt 𝕜 g x) — keyword (f :=)(g :=) for the functions (implicit). OK. - differentiableAt for exp(c·w): `Complex.differentiableAt_exp.comp ...`? — (Complex.differentiableAt_exp).comp (differentiableAt_const_mul c ...)?? — `differentiableAt_const_mul : DifferentiableAt ℂ (fun w => c * w) x`? — there's `differentiableAt_const_mul (c) (x)`? or fun_prop. Try fun_prop first; fallback manual. - differentiableAt for Gamma(w/2): (Complex.differentiableAt_Gamma _ hs2).comp — wait differentiableAt_Gamma (s) (hs : ∀ m, s ≠ −m) : DifferentiableAt ℂ Gamma s — at (1+s)/2 with hs2 ✓ — .comp (1+s) (differentiableAt_id.div_const? — `differentiableAt_id.div_const 2`? or (differentiableAt_id.div (differentiableAt_const 2) (two_ne_zero)) — hmm — `differentiableAt_id.div_const : DifferentiableAt ℂ (fun w => w / 2) x`? — there's `DifferentiableAt.div_const` ✓ method: differentiableAt_id.div_const 2 ✓. comp: (differentiableAt_Gamma ((1+s)/2) hs2).comp (1+s) (differentiableAt_id.div_const 2)? — DifferentiableAt.comp (x) (hf : DifferentiableAt f (g x)) (hg : DifferentiableAt g x) ✓. Then: ```lean -- the two logDeriv evaluations have h1 : logDeriv (fun w => Complex.exp (c * w)) (1 + s) = c := by rw [logDeriv_apply] have hd : deriv (fun w => Complex.exp (c * w)) (1 + s) = Complex.exp (c * (1 + s)) * c := by have h := (Complex.hasDerivAt_exp (c * (1 + s))).comp (1 + s) (?_) -- hasDerivAt_exp : HasDerivAt exp (exp x) x; comp with the linear: HasDerivAt (exp ∘ (c·w)) (exp(c(1+s)) • c)? — the comp for ℂ: HasDerivAt.comp x hf hg gives (g' • f')? — for ℂ→ℂ: f' * g'?? — earlier established: f' * g' form (mul_one evidence). The linear g := fun w => c * w: HasDerivAt g c (1+s) via `hasDerivAt_const_mul`? — `HasDerivAt.const_mul : HasDerivAt f f' x → HasDerivAt (fun y => c * f y) (c * f') x`? — for f = id: (hasDerivAt_id (1+s)).const_mul c : HasDerivAt (fun y => c * y) (c * 1) (1+s) — simpa → c. Then comp: exp' = exp(c(1+s)), g' = c: HasDerivAt (exp∘g) (exp(c(1+s)) * c) (1+s) ✓ then .deriv. ... rw [hd] field_simp [Complex.exp_ne_zero (c * (1 + s))] have h2 : logDeriv (fun w => Complex.Gamma (w / 2)) (1 + s) = (1/2) * Complex.digamma ((1+s)/2) := by rw [logDeriv_apply] have hd : deriv (fun w => Complex.Gamma (w / 2)) (1 + s) = deriv Complex.Gamma ((1+s)/2) * (1/2) := by have hg : HasDerivAt (fun w : ℂ => w / 2) (1/2) (1+s) := by simpa using (hasDerivAt_id (1+s)).div_const (2:ℂ) -- HasDerivAt.div_const? — hmm — `HasDerivAt.div_const (hf : HasDerivAt f f' x) (c) : HasDerivAt (fun y => f y / c) (f' / c) x` — for id: f' = 1: 1/2 ✓ have hG : HasDerivAt Complex.Gamma (deriv Complex.Gamma ((1+s)/2)) ((1+s)/2) := (Complex.differentiableAt_Gamma _ hs2).hasDerivAt have hcomp := hG.comp (1 + s) hg rw [mul_comm] at hcomp?? — comp gives (Gamma'((1+s)/2)) * (1/2) or (1/2)*... — from the ℂ comp order f' * g' — Gamma' * (1/2) ✓ — the ∘ form: hcomp : HasDerivAt (Gamma ∘ (w/2)) (deriv Gamma ((1+s)/2) * (1/2)) (1+s) — then .deriv + the function eq (Gamma ∘ (w/2)) = (fun w => Gamma (w/2)) rfl ✓. exact hcomp.deriv rw [hd, Complex.digamma_def, logDeriv_apply] field_simp [hs] ring rw [h1, h2, hc] ring ``` h2's final: logDeriv g (1+s) = deriv g (1+s)/g(1+s) = (Gamma'((1+s)/2)·(1/2))/Gamma((1+s)/2) and (1/2)·digamma((1+s)/2) = (1/2)·(Gamma'/Gamma) — field_simp [hs] then ring ✓. And the j = 0 theorem: ```lean /-- τ₀: the value of logDeriv Gammaℝ at 1 is −a₁ (via Mathlib's digamma_one_half). -/ theorem logDeriv_Gammaℝ_one : logDeriv Complex.Gammaℝ 1 = -(lagariasA1 : ℂ) := by have hs : Complex.Gamma ((1 + (0:ℂ)) / 2) ≠ 0 := by norm_num only [add_zero, ...] -- (1+0)/2 = 1/2: Gamma (1/2) = √π ≠ 0: Complex.Gamma_one_half_eq? saw `Gamma_one_half_eq` in digamma_one_half's proof — `Complex.Gamma_one_half_eq : Gamma (1/2) = √π`? then rw + positivity have hs2 : ∀ m : ℕ, ((1 + (0:ℂ)) / 2) ≠ -m := by intro m -- (1+0)/2 = 1/2 ≠ −m (real, positive vs nonpositive) ... have h := logDeriv_Gammaℝ_one_add (s := 0) hs hs2 rw [add_zero] at h -- (1 + 0) → 1 rw [h] -- −(log π)/2 + (1/2)·digamma(1/2) = −(log 4π + γ)/2 rw [Complex.digamma_one_half] -- unfold lagariasA1: (log(4π) + γ)/2 rw [lagariasA1] push_cast -- log(4π) = log 4 + log π = 2 log 2 + log π rw [Real.log_mul (by norm_num) (by positivity)] -- log (4*π) = log 4 + log π have hlog4 : Real.log (4 : ℝ) = 2 * Real.log 2 := by rw [show (4 : ℝ) = 2 ^ 2 from by norm_num, Real.log_pow] -- log 2² = 2 log 2 — Real.log_pow : log (x^n) = n·log x ✓ rw [hlog4] -- digamma_one_half's form: digamma (1/2) = -2 * log 2 - γ — with the ℂ casts: `-(2:ℂ)*↑(Real.log 2) − ↑γ`? — the exact cast structure — push_cast and ring at the end field_simp -- or ring after push_cast — the equation: −(↑logπ)/2 + (1/2)(−2↑log2 − ↑γ) = −((2↑log2 + ↑logπ) + ↑γ)/2 — ring ✓ ring ``` Hmm — the cast dance: lagariasA1 : ℝ = (Real.log (4*π) + γ)/2 — the goal RHS −(lagariasA1 : ℂ) = −↑((log(4π)+γ)/2) — push_cast: −(↑log(4π) + ↑γ)/2. The LHS: −(↑(Real.log π))/2 + (1/2)·(digamma (1/2:ℂ)) — digamma_one_half : digamma (1/2) = -2 * log 2 - ↑γ — what's `log 2` in that statement — need the exact form: from the Digamma.lean line 50: `theorem digamma_one_half : digamma (1 / 2) = - 2 * log 2 - Real.eulerMascheroniConstant` — with `log` = Complex.log? and `2 : ℂ`? — the statement as displayed: `- 2 * log 2 - Real.eulerMascheroniConstant` — digamma returns ℂ so the RHS is ℂ: −2 * Complex.log 2 − ↑γ — Complex.log 2 = ↑(Real.log 2) via Complex.log_ofReal... To make ring close, normalize: Complex.log 2 → ↑(Real.log 2) via `Complex.log_ofReal (by positivity : (0:ℝ) < 2)`? — name: `Complex.log_ofReal : 0 < x → Complex.log ↑x = ↑(Real.log x)`? or ofReal_log. Check at compile: there's `Complex.log_ofReal`? hmm — I recall `Complex.log_ofReal` might not exist but `Complex.ofReal_log : 0 ≤ x → Complex.log ↑x = ↑(Real.log x)`... one of these. And Complex.log ↑π similarly. OK. Rather than over-planning, let me write the file's first part and iterate on compile errors. It's late; I'll do Part 1 (split + τ₀) tonight and commit, then continue with the digamma series next session. Actually — hmm, wait. Let me reconsider the structure of the j ≥ 1 work once more, because there's a possible LARGE simplification I should check: maybe I can get the polygamma values at 1/2 WITHOUT the function series, using the recurrence + a generating identity... No — the polygamma values genuinely need the series. But here's a thought: the trigamma value ψ'(1/2) = π²/2 IS classical and might be in Mathlib via some other route (Fourier series of log sin? — the log-sin integral!). `Complex... `? Probably not. OK the series route it is. One more scoping thought: the j ≥ 1 work needs, in order: 1. Dinf real series + summability (M-test) — moderate. 2. deriv-interchange for ψ_real = Dinf (hasDerivAt_of_tendstoLocallyUniformlyOn ✓). 3. iterated derivatives of Dinf (induction with the interchange per level). 4. Complex bridge (ofReal tsum + identity principle or the CLM comp). 5. The odd reindexing to lagariasA. 6. The (1+s)/2 comp + assembly into iteratedDeriv_logDeriv_Gammaℝ_one_add. Each is 50-150 lines. Realistic: ~500 lines total for piece (A). Let me start with Part 1 tonight (the split + τ₀, ~120 lines), commit, and continue next session.
All ingredients verified. Writing LiArchimedean.lean — Part 1: the Gammaℝ logDeriv split + the τ₀ evaluation (j = 0 case).
tool: Bash
input
{
  "command": "cd \"D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib\" && grep -rn \"theorem log_ofReal\\|lemma log_ofReal\\|theorem ofReal_log\\|lemma ofReal_log\" Mathlib/Analysis/SpecialFunctions/Complex/Log*.lean Mathlib/Analysis/SpecialFunctions/Log/*.lean 2>/dev/null | head -4; grep -rn \"theorem cpow_def_of_ne_zero\\|lemma cpow_def_of_ne_zero\" Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean | head -2; grep -rn \"theorem Gamma_one_half_eq\\|lemma Gamma_one_half_eq\" Mathlib/Analysis/SpecialFunctions/Gamma/ -r | head -2",
  "description": "Check log_ofReal, cpow_def, Gamma_one_half names"
}
raw content_json (database row)
[{"type":"thinking","thinking":"- `Complex.differentiableAt_Gamma (s : ℂ) (hs : ∀ m : ℕ, s ≠ −m) : DifferentiableAt ℂ Gamma s` ✓ (line 65).\n- `Real.differentiableAt_Gamma {s : ℝ} (hs : ∀ m : ℕ, s ≠ −m)` ✓ and `Real.differentiableOn_Gamma_Ioi` ✓ (line 149/154) — for the real side.\n\nNow let me write the first part of LiArchimedean.lean: the Gammaℝ logDeriv split + τ₀ evaluation. \n\nPlan for the split lemma:\n\n```lean\n/-- The Gammaℝ logDeriv split: logDeriv Gammaℝ (1+s) = −(log π)/2 + (1/2)·ψ((1+s)/2). -/\nlemma logDeriv_Gammaℝ_one_add {s : ℂ} (hs : Complex.Gamma ((1 + s) / 2) ≠ 0) :\n    logDeriv Complex.Gammaℝ (1 + s) =\n      -(Real.log π : ℂ) / 2 + (1 / 2) * Complex.digamma ((1 + s) / 2) := by\n  have hdef : Complex.Gammaℝ (1 + s) =\n      Complex.exp (-(Real.log π : ℂ) / 2 * (1 + s)) * Complex.Gamma ((1 + s) / 2) := by\n    rw [Complex.Gammaℝ_def]  -- π ^ (−(1+s)/2) * Gamma ((1+s)/2)\n    congr 1\n    -- π ^ (−(1+s)/2) = exp (−(log π)/2 · (1+s))\n    rw [Complex.cpow_def_of_ne_zero (by positivity?...)]  -- (↑π)^z = exp (log ↑π * z)\n    ...\n```\nHmm — let me structure the split as a function identity valid wherever, then take logDeriv:\n\nFor the logDeriv of a product: `logDeriv_mul (f g) (x) (hf : f x ≠ 0) (hg : g x ≠ 0) (hf' : DifferentiableAt .. f x) (hg' : ...)` — from the vendored usage (line 257): `logDeriv_mul (f := ...) (g := ...) s (pow_ne_zero _ hsq) hhs (by fun_prop) hhas.differentiableAt` — so signature: logDeriv_mul (x) (hf-ne) (hg-ne) (hf-diff) (hg-diff) : logDeriv (f*g) x = logDeriv f x + logDeriv g x ✓.\n\nSo:\n```lean\nlemma logDeriv_Gammaℝ_one_add {s : ℂ}\n    (hs : Complex.Gamma ((1 + s) / 2) ≠ 0)\n    (hs2 : ∀ m : ℕ, ((1 + s) / 2) ≠ -m) :\n    logDeriv Complex.Gammaℝ (1 + s) =\n      -(Real.log π : ℂ) / 2 + (1 / 2) * Complex.digamma ((1 + s) / 2) := by\n  have hexp : ∀ w : ℂ, (↑(Real.pi) : ℂ) ^ (-w / 2) = Complex.exp (-(Real.log π : ℂ) / 2 * w) := by\n    intro w\n    rw [Complex.cpow_def_of_ne_zero (by ... : (↑(Real.pi) : ℂ) ≠ 0)]\n    congr 1\n    -- log ↑π * (−w/2) = −(log π)/2 · w\n    rw [Complex.log_ofReal?...]  -- Complex.log ↑π = ↑(Real.log π): `Complex.log_ofReal`? or `Complex.ofReal_log (h : 0 ≤ π)`: `Complex.ofReal_log (hx : 0 ≤ x) : Complex.log ↑x = ↑(Real.log x)`? name check needed\n    push_cast\n    ring\n  rw [Complex.Gammaℝ_def]  -- wait Gammaℝ_def is about Gammaℝ s = π^(−s/2) * Gamma (s/2) — the argument is (1+s): Gammaℝ (1+s) = π^(−(1+s)/2) * Gamma ((1+s)/2) ✓ — but I want the FUNCTION-level: logDeriv (fun w => π^(−w/2) * Gamma (w/2)) (1+s) — is logDeriv Gammaℝ (1+s) directly the application? Gammaℝ as a function IS fun w => π^(−w/2)*Gamma(w/2) by Gammaℝ_def (rfl!). So logDeriv Gammaℝ (1+s) — the function Gammaℝ — unfold via Gammaℝ_def (it's `lemma Gammaℝ_def (s : ℂ) : Gammaℝ s = π ^ (-s / 2) * Gamma (s / 2) := rfl` — so Gammaℝ is DEFINITIONALLY that — `rw [Complex.Gammaℝ_def]`? on logDeriv Gammaℝ (1+s) — Gammaℝ_def is an iff-free eq about Gammaℝ s — rewriting Gammaℝ (1+s)?? the term in the goal is `logDeriv Complex.Gammaℝ (1 + s)` — the function `Complex.Gammaℝ` applied — Gammaℝ_def's LHS pattern is `Gammaℝ s` (any s) — rw [Complex.Gammaℝ_def] would rewrite `Gammaℝ (1+s)` inside logDeriv's argument — logDeriv (π^(−(1+s)/2)*Gamma((1+s)/2)) (1+s) — hmm — that's logDeriv OF THE VALUE not the function — wrong. I need logDeriv (fun w => ...) — the FUNCTION: show Complex.Gammaℝ = fun w => ... via funext w; exact Gammaℝ_def w? — Gammaℝ_def is rfl so `Complex.Gammaℝ = fun w => π^(−w/2)*Gamma(w/2)` is rfl ✓:\n  rw [show Complex.Gammaℝ = fun w : ℂ => (↑Real.pi) ^ (-w / 2) * Complex.Gamma (w / 2) from rfl]\n  -- then rewrite the cpow as exp via funext\n  rw [show (fun w : ℂ => (↑Real.pi) ^ (-w / 2) * Complex.Gamma (w / 2)) =\n    (fun w => Complex.exp (-(Real.log π : ℂ) / 2 * w)) * Complex.Gamma ∘ (fun w => w / 2) from ...]\n```\nHmm — let me be careful with the composition forms. The function: fun w => exp(c·w) * Gamma(w/2) with c := −(log π)/2. logDeriv at (1+s): logDeriv_mul:\n- f := fun w => exp(c*w): f(1+s) ≠ 0 (exp_ne_zero ✓ `Complex.exp_ne_zero`); differentiableAt: (differentiableAt_exp.comp? — `Complex.differentiableAt_exp.comp ...`? or fun_prop) ✓.\n- g := fun w => Gamma (w/2): g(1+s) = Gamma((1+s)/2) ≠ 0 = hs ✓; differentiableAt: differentiableAt_Gamma ((1+s)/2) hs2 .comp — comp with w/2: `DifferentiableAt.comp` ✓.\nThen logDeriv f (1+s): f = exp ∘ (c·w): deriv f (1+s) = exp(c(1+s))·c (chain rule: deriv_exp + deriv_const_mul/deriv_mul_const); logDeriv f = f'/f = exp·c/exp = c ✓ = −(log π)/2.\nlogDeriv g (1+s) = (Gamma'((1+s)/2)·(1/2))/Gamma((1+s)/2) = (1/2)·digamma((1+s)/2) ✓ (digamma_def : digamma = logDeriv Gamma — so digamma w = deriv Gamma w / Gamma w ✓).\n\nSum: −(log π)/2 + (1/2)·digamma((1+s)/2) ✓.\n\nDetailed Lean:\n```lean\nlemma logDeriv_Gammaℝ_one_add {s : ℂ}\n    (hs : Complex.Gamma ((1 + s) / 2) ≠ 0)\n    (hs2 : ∀ m : ℕ, ((1 + s) / 2) ≠ -m) :\n    logDeriv Complex.Gammaℝ (1 + s) =\n      -(Real.log π : ℂ) / 2 + (1 / 2) * Complex.digamma ((1 + s) / 2) := by\n  set c : ℂ := -(Real.log π : ℂ) / 2 with hc\n  have hexp : (fun w : ℂ => (↑Real.pi) ^ (-w / 2)) = fun w => Complex.exp (c * w) := by\n    funext w\n    rw [Complex.cpow_def_of_ne_zero (by\n      exact_mod_cast Real.pi_ne_zero)]  -- (↑π : ℂ) ≠ 0\n    -- exp (log ↑π * (−w/2)) = exp (c·w)\n    congr 1\n    have hlog : Complex.log (↑(Real.pi) : ℂ) = (Real.log π : ℂ) := by\n      exact Complex.log_ofReal? -- check name: `Complex.log_ofReal`? hmm — maybe `Complex.ofReal_log (Real.pi_nonneg)`? — `Complex.ofReal_log : 0 ≤ x → ↑(Real.log x) = Complex.log ↑x`? something — find it\n    rw [hlog]\n    rw [hc]\n    ring\n  have hfun : Complex.Gammaℝ = (fun w => Complex.exp (c * w)) * fun w => Complex.Gamma (w / 2) := by\n    funext w\n    rw [Pi.mul_apply, Complex.Gammaℝ_def, hexp]  -- hmm hexp is a function eq — use its pointwise: (fun w => ...) w — rw [hexp] rewrites the cpow-term ✓ — careful: Gammaℝ_def : Gammaℝ w = π^(−w/2)*Gamma(w/2) — goal: Gammaℝ w = (exp(c·w)) * Gamma(w/2)-applied — rw [Pi.mul_apply] on RHS first? Let me structure: funext w; show Gammaℝ w = Complex.exp (c*w) * Complex.Gamma (w/2) — after Pi.mul_apply... just: funext w; rw [Complex.Gammaℝ_def]; congr 1; exact the pointwise from hexp\n  rw [hfun]\n  rw [logDeriv_mul (f := fun w => Complex.exp (c * w)) (g := fun w => Complex.Gamma (w / 2)) (1 + s)\n    (Complex.exp_ne_zero _) hs ?_ ?_]\n  ...\n```\nHmm — logDeriv_mul's exact argument order from the vendored usage: `logDeriv_mul (f := ...) (g := ...) s (pow_ne_zero _ hsq) hhs (by fun_prop) hhas.differentiableAt` — so args: (x) (hfx : f x ≠ 0) (hgx : g x ≠ 0) (hf : DifferentiableAt 𝕜 f x) (hg : DifferentiableAt 𝕜 g x) — keyword (f :=)(g :=) for the functions (implicit). OK.\n\n- differentiableAt for exp(c·w): `Complex.differentiableAt_exp.comp ...`? — (Complex.differentiableAt_exp).comp (differentiableAt_const_mul c ...)?? — `differentiableAt_const_mul : DifferentiableAt ℂ (fun w => c * w) x`? — there's `differentiableAt_const_mul (c) (x)`? or fun_prop. Try fun_prop first; fallback manual.\n- differentiableAt for Gamma(w/2): (Complex.differentiableAt_Gamma _ hs2).comp — wait differentiableAt_Gamma (s) (hs : ∀ m, s ≠ −m) : DifferentiableAt ℂ Gamma s — at (1+s)/2 with hs2 ✓ — .comp (1+s) (differentiableAt_id.div_const? — `differentiableAt_id.div_const 2`? or (differentiableAt_id.div (differentiableAt_const 2) (two_ne_zero)) — hmm — `differentiableAt_id.div_const : DifferentiableAt ℂ (fun w => w / 2) x`? — there's `DifferentiableAt.div_const` ✓ method: differentiableAt_id.div_const 2 ✓.\n  comp: (differentiableAt_Gamma ((1+s)/2) hs2).comp (1+s) (differentiableAt_id.div_const 2)? — DifferentiableAt.comp (x) (hf : DifferentiableAt f (g x)) (hg : DifferentiableAt g x) ✓.\n\nThen:\n```lean\n  -- the two logDeriv evaluations\n  have h1 : logDeriv (fun w => Complex.exp (c * w)) (1 + s) = c := by\n    rw [logDeriv_apply]\n    have hd : deriv (fun w => Complex.exp (c * w)) (1 + s) = Complex.exp (c * (1 + s)) * c := by\n      have h := (Complex.hasDerivAt_exp (c * (1 + s))).comp (1 + s) (?_)  -- hasDerivAt_exp : HasDerivAt exp (exp x) x; comp with the linear: HasDerivAt (exp ∘ (c·w)) (exp(c(1+s)) • c)? — the comp for ℂ: HasDerivAt.comp x hf hg gives (g' • f')? — for ℂ→ℂ: f' * g'?? — earlier established: f' * g' form (mul_one evidence). The linear g := fun w => c * w: HasDerivAt g c (1+s) via `hasDerivAt_const_mul`? — `HasDerivAt.const_mul : HasDerivAt f f' x → HasDerivAt (fun y => c * f y) (c * f') x`? — for f = id: (hasDerivAt_id (1+s)).const_mul c : HasDerivAt (fun y => c * y) (c * 1) (1+s) — simpa → c. Then comp: exp' = exp(c(1+s)), g' = c: HasDerivAt (exp∘g) (exp(c(1+s)) * c) (1+s) ✓ then .deriv.\n      ...\n    rw [hd]\n    field_simp [Complex.exp_ne_zero (c * (1 + s))]\n  have h2 : logDeriv (fun w => Complex.Gamma (w / 2)) (1 + s) = (1/2) * Complex.digamma ((1+s)/2) := by\n    rw [logDeriv_apply]\n    have hd : deriv (fun w => Complex.Gamma (w / 2)) (1 + s) = deriv Complex.Gamma ((1+s)/2) * (1/2) := by\n      have hg : HasDerivAt (fun w : ℂ => w / 2) (1/2) (1+s) := by\n        simpa using (hasDerivAt_id (1+s)).div_const (2:ℂ)  -- HasDerivAt.div_const? — hmm — `HasDerivAt.div_const (hf : HasDerivAt f f' x) (c) : HasDerivAt (fun y => f y / c) (f' / c) x` — for id: f' = 1: 1/2 ✓\n      have hG : HasDerivAt Complex.Gamma (deriv Complex.Gamma ((1+s)/2)) ((1+s)/2) :=\n        (Complex.differentiableAt_Gamma _ hs2).hasDerivAt\n      have hcomp := hG.comp (1 + s) hg\n      rw [mul_comm] at hcomp?? — comp gives (Gamma'((1+s)/2)) * (1/2) or (1/2)*... — from the ℂ comp order f' * g' — Gamma' * (1/2) ✓ — the ∘ form: hcomp : HasDerivAt (Gamma ∘ (w/2)) (deriv Gamma ((1+s)/2) * (1/2)) (1+s) — then .deriv + the function eq (Gamma ∘ (w/2)) = (fun w => Gamma (w/2)) rfl ✓.\n      exact hcomp.deriv\n    rw [hd, Complex.digamma_def, logDeriv_apply]\n    field_simp [hs]\n    ring\n  rw [h1, h2, hc]\n  ring\n```\nh2's final: logDeriv g (1+s) = deriv g (1+s)/g(1+s) = (Gamma'((1+s)/2)·(1/2))/Gamma((1+s)/2) and (1/2)·digamma((1+s)/2) = (1/2)·(Gamma'/Gamma) — field_simp [hs] then ring ✓.\n\nAnd the j = 0 theorem:\n```lean\n/-- τ₀: the value of logDeriv Gammaℝ at 1 is −a₁ (via Mathlib's digamma_one_half). -/\ntheorem logDeriv_Gammaℝ_one : logDeriv Complex.Gammaℝ 1 = -(lagariasA1 : ℂ) := by\n  have hs : Complex.Gamma ((1 + (0:ℂ)) / 2) ≠ 0 := by\n    norm_num only [add_zero, ...]  -- (1+0)/2 = 1/2: Gamma (1/2) = √π ≠ 0: Complex.Gamma_one_half_eq? saw `Gamma_one_half_eq` in digamma_one_half's proof — `Complex.Gamma_one_half_eq : Gamma (1/2) = √π`? then rw + positivity\n  have hs2 : ∀ m : ℕ, ((1 + (0:ℂ)) / 2) ≠ -m := by\n    intro m\n    -- (1+0)/2 = 1/2 ≠ −m (real, positive vs nonpositive)\n    ...\n  have h := logDeriv_Gammaℝ_one_add (s := 0) hs hs2\n  rw [add_zero] at h  -- (1 + 0) → 1\n  rw [h]\n  -- −(log π)/2 + (1/2)·digamma(1/2) = −(log 4π + γ)/2\n  rw [Complex.digamma_one_half]\n  -- unfold lagariasA1: (log(4π) + γ)/2\n  rw [lagariasA1]\n  push_cast\n  -- log(4π) = log 4 + log π = 2 log 2 + log π\n  rw [Real.log_mul (by norm_num) (by positivity)]  -- log (4*π) = log 4 + log π\n  have hlog4 : Real.log (4 : ℝ) = 2 * Real.log 2 := by\n    rw [show (4 : ℝ) = 2 ^ 2 from by norm_num, Real.log_pow]  -- log 2² = 2 log 2 — Real.log_pow : log (x^n) = n·log x ✓\n  rw [hlog4]\n  -- digamma_one_half's form: digamma (1/2) = -2 * log 2 - γ — with the ℂ casts: `-(2:ℂ)*↑(Real.log 2) − ↑γ`? — the exact cast structure — push_cast and ring at the end\n  field_simp  -- or ring after push_cast — the equation: −(↑logπ)/2 + (1/2)(−2↑log2 − ↑γ) = −((2↑log2 + ↑logπ) + ↑γ)/2 — ring ✓\n  ring\n```\nHmm — the cast dance: lagariasA1 : ℝ = (Real.log (4*π) + γ)/2 — the goal RHS −(lagariasA1 : ℂ) = −↑((log(4π)+γ)/2) — push_cast: −(↑log(4π) + ↑γ)/2. The LHS: −(↑(Real.log π))/2 + (1/2)·(digamma (1/2:ℂ)) — digamma_one_half : digamma (1/2) = -2 * log 2 - ↑γ — what's `log 2` in that statement — need the exact form: from the Digamma.lean line 50: `theorem digamma_one_half : digamma (1 / 2) = - 2 * log 2 - Real.eulerMascheroniConstant` — with `log` = Complex.log? and `2 : ℂ`? — the statement as displayed: `- 2 * log 2 - Real.eulerMascheroniConstant` — digamma returns ℂ so the RHS is ℂ: −2 * Complex.log 2 − ↑γ — Complex.log 2 = ↑(Real.log 2) via Complex.log_ofReal... To make ring close, normalize: Complex.log 2 → ↑(Real.log 2) via `Complex.log_ofReal (by positivity : (0:ℝ) < 2)`? — name: `Complex.log_ofReal : 0 < x → Complex.log ↑x = ↑(Real.log x)`? or ofReal_log. Check at compile: there's `Complex.log_ofReal`? hmm — I recall `Complex.log_ofReal` might not exist but `Complex.ofReal_log : 0 ≤ x → Complex.log ↑x = ↑(Real.log x)`... one of these. And Complex.log ↑π similarly.\n\nOK. Rather than over-planning, let me write the file's first part and iterate on compile errors. It's late; I'll do Part 1 (split + τ₀) tonight and commit, then continue with the digamma series next session.\n\nActually — hmm, wait. Let me reconsider the structure of the j ≥ 1 work once more, because there's a possible LARGE simplification I should check: maybe I can get the polygamma values at 1/2 WITHOUT the function series, using the recurrence + a generating identity... No — the polygamma values genuinely need the series. But here's a thought: the trigamma value ψ'(1/2) = π²/2 IS classical and might be in Mathlib via some other route (Fourier series of log sin? — the log-sin integral!). `Complex... `? Probably not. OK the series route it is.\n\nOne more scoping thought: the j ≥ 1 work needs, in order:\n1. Dinf real series + summability (M-test) — moderate.\n2. deriv-interchange for ψ_real = Dinf (hasDerivAt_of_tendstoLocallyUniformlyOn ✓).\n3. iterated derivatives of Dinf (induction with the interchange per level).\n4. Complex bridge (ofReal tsum + identity principle or the CLM comp).\n5. The odd reindexing to lagariasA.\n6. The (1+s)/2 comp + assembly into iteratedDeriv_logDeriv_Gammaℝ_one_add.\n\nEach is 50-150 lines. Realistic: ~500 lines total for piece (A). Let me start with Part 1 tonight (the split + τ₀, ~120 lines), commit, and continue next session.","signature":""},{"type":"text","text":"All ingredients verified. Writing LiArchimedean.lean — Part 1: the Gammaℝ logDeriv split + the τ₀ evaluation (j = 0 case)."},{"type":"tool_use","id":"Bash_254","name":"Bash","input":{"command":"cd \"D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib\" && grep -rn \"theorem log_ofReal\\|lemma log_ofReal\\|theorem ofReal_log\\|lemma ofReal_log\" Mathlib/Analysis/SpecialFunctions/Complex/Log*.lean Mathlib/Analysis/SpecialFunctions/Log/*.lean 2>/dev/null | head -4; grep -rn \"theorem cpow_def_of_ne_zero\\|lemma cpow_def_of_ne_zero\" Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean | head -2; grep -rn \"theorem Gamma_one_half_eq\\|lemma Gamma_one_half_eq\" Mathlib/Analysis/SpecialFunctions/Gamma/ -r | head -2","description":"Check log_ofReal, cpow_def, Gamma_one_half names"},"extra_content":null}]