← Session 27 — ii′-5c/5d: Davenport disc + FE-reflection bounds
thinking (23023 chars)
5e-i committed. Now 5e-ii — the near-axis digamma bound. Per my analysis, three pieces:
(C) the separated reciprocal sum bound Σ_{j<m} ‖w+j‖⁻¹ ≤ 10 + 2 log m (the V-split argument);
(A) the left-plane bound ‖ψ(w)‖ ≤ C·log(2+‖w‖) for dist(w,−ℕ) ≥ 1/4 — via digamma_add_natCast + (C) + ψ(w+m) via StirlingVert/compactness;
(B) the mild right bound re w ≥ 2 ⟹ ‖ψ(w)‖ ≤ C·log(2+‖w‖) — via the Weierstrass series split.
Hmm — wait, let me reconsider the scope. Which of these does 5e-v actually need?
- The near-axis LEFT case (A): for logDeriv ΓR(s) at re s ≈ −R — needed.
- The mild right case (B): for logDeriv ΓR(1−s) at re(1−s) ≈ 1+R with |im| < 1/2 — needed.
- (B) could alternatively be handled by... hmm. Actually wait — for (B), there's a much simpler route I overlooked: |im w'| < 1/2, re w' ≥ 2: use the 5d EM bound?! The 5d bound `norm_digamma_sub_log_le_of_two_le_abs_im` needs |im| ≥ 2. No. What about shifting the ARGUMENT vertically... no. OK (B) via the series split as planned.
Actually — hmm, for (B) there's an even simpler approach: re w ≥ 2: the integral comparison for ψ via... no. Or: ψ(w) = ψ(w) with w real-ish: use logGammaSeq? The definition of digamma in Mathlib: Complex.digamma = deriv Gamma / Gamma. Hmm.
Alternatively for (B): ψ(w) = ψ(⌈re w⌉₊ + 1) − Σ_{j} ... no wait that's moving RIGHT from a left point. For re w ≥ 2 we're already right; the issue is purely that digamma_stirling needs |im| ≥ 1/2. For |im w| < 1/2 with re w ≥ 2: I could apply digamma_stirling at ŵ := w + i·(1/2 − im w)... no, that changes the function value by O(1)·sup|ψ'| — circular.
What about: ψ(w) for re w ≥ 2 via the SERIES but bound more cleverly: Σ'_n (1/(n+1) − 1/(w+n+1)): telescope against log via... the identity Σ_{n=0}^{N−1} [1/(n+1) − 1/(w+n+1)] = H_N − Σ_{n=0}^{N−1} 1/(w+n+1); and Σ_{n<N} 1/(w+n+1) vs log((w+N)/w): via the EM (re w ≥ 2 ⟹ the path w+[0,N] stays at re ≥ 2, NO pole issue — the slit-plane FTC is FINE here since re(w+x) ≥ 2 > 0!): Σ_{j=0}^{N−1} 1/(w+j) = log(w+N) − log w + O(1) via the 5d EM argument (which works for any w with the path avoiding the negative reals — re ≥ 2 ✓✓)! WAIT — the 5d EM bound norm_digamma_sub_log_le_of_two_le_abs_im needed |im w| ≥ 2 ONLY because... let me recheck: the EM step needed (i) slit-plane FTC: w + x ∈ slitPlane — for re w ≥ 2 the path stays at re ≥ 2 ✓ slit regardless of im! (ii) the arctan bound ∫₀ⁿ dx/((x+a)²+c²) ≤ π/c with c = |im w| — for im w ≈ 0 the integral is ∫₀ⁿ dx/(x+a)² = 1/a − 1/(a+n) ≤ 1/a ≤ 1/2 (a = re w ≥ 2)!! The arctan bound π/c was LOSSY — the exact value (1/c)(arctan((n+a)/c) − arctan(a/c)) is fine but the crude c → 0 limit of the exact integral is 1/a (finite!). So the remainder bound should be min(π/c, 1/a·...)-ish: ∫₀ⁿ dx/((x+a)²+c²) ≤ ∫₀^∞ dx/(x+a)² = 1/a when c = 0 — the UNIFORM bound: ∫₀ⁿ dx/((x+a)²+c²) ≤ ∫₀^∞ dx/((x+a)²+c²) = (1/c)(π/2 − arctan(a/c)) = (1/c) arctan(c/a)·... = (1/c)·arctan(c/a) hmm: ∫₀^∞ dx/((x+a)² + c²) = (1/c)[π/2 − arctan(a/c)] = (1/c)·arctan(c/a) (for a, c > 0: arctan(a/c) + arctan(c/a) = π/2 ✓). And (1/c)arctan(c/a) ≤ min(π/(2c), 1/a) (arctan u ≤ min(u, π/2)): arctan(c/a) ≤ c/a ⟹ ≤ 1/a ✓. So the uniform remainder bound: ≤ 1/a ≤ 1/2 for re w ≥ 2 — NO blowup! So the EM comparison Σ 1/(w+j) ≈ log(w+m) − log w works uniformly for re w ≥ 2 ANY im (including real w)!
And the full 5d assembly then gives: ψ(w) − log w = [ψ(v) − log v] + [log v − log w − Σ] with v = w + m — the FIRST bracket needs ψ(v) − log v bounded — that used digamma_stirling (|im| ≥ 1/2) or... for |im v| < 1/2, re v ∈ [2,3]: compactness. Hmm — same compactness need. BUT with the EM machinery now working for re ≥ 2, an alternative for ψ(v): take v real-ish directly: ψ(v) for v ∈ compact [2,3]×[−1/2,1/2] — compactness bound ✓ same as before.
So (B) reduces to: the EM comparison (re ≥ 2 version — a VARIANT of the 5d proof with the integral bound 1/a instead of π/c) + compactness for ψ on [2,3]×[−1/2,1/2]. The EM variant: the 5d proof's E4 bound ∫₀ⁿ ((x+a)²+c²)⁻¹ dx ≤ π/c via arctan — replace by the exact bound ≤ (1/c)arctan(c/a) ≤ 1/a... hmm — the FTC in 5d produced (1/c)(arctan((n+a)/c) − arctan(a/c)) and bounded by π/c. For the uniform-in-c version: (1/c)(arctan((n+a)/c) − arctan(a/c)) ≤ (1/c)·arctan(c/(n+a))·... no: arctan((n+a)/c) − arctan(a/c) = arctan formula... = [π/2 − arctan(c/(n+a))] − [π/2 − arctan(c/a)] = arctan(c/a) − arctan(c/(n+a)) ≤ arctan(c/a) ≤ c/a ⟹ the integral ≤ (1/c)·(c/a) = 1/a ✓ (for c > 0; at c = 0 the FTC has 1/0 issues — the antiderivative form degenerates). Handling c > 0 vs c = 0 (im w = 0, w real ≥ 2): the c = 0 case: ∫ dx/(x+a)² = 1/a − 1/(a+n) directly (real FTC with −(x+a)⁻¹ antiderivative). Ugh — two cases. ALTERNATIVELY bound without FTC: the integrand 1/((x+a)²+c²) ≤ 1/(x+a)² pointwise ✓ (c² ≥ 0) and ∫₀ⁿ 1/(x+a)² dx = 1/a − 1/(a+n) ≤ 1/a — the REAL FTC for 1/(x+a)² (antiderivative −(x+a)⁻¹ — clean real function, no complex log!). So: ∫₀ⁿ ((x+a)²+c²)⁻¹ dx ≤ ∫₀ⁿ (x+a)⁻² dx = 1/a − 1/(a+n) ≤ 1/a ≤ 1/2. The comparison 1/((x+a)²+c²) ≤ 1/(x+a)²: div_le_div... (x+a)²+c² ≥ (x+a)² > 0 ⟹ inv ≤ inv ✓ `one_div_le_one_div_of_le` (ii′-4 used ✓). And ∫₀ⁿ (x+a)⁻² dx = [−(x+a)⁻¹]₀ⁿ: real FTC: HasDerivAt (fun x => −(x+a)⁻¹) ((x+a)⁻²) x: hasDerivAt_inv·neg... real inv derivative: `HasDerivAt.inv` for ℝ→ℝ: (hasDerivAt_id x |>.add_const a).inv (x+a ≠ 0 — x+a ≥ a ≥ 2 > 0 ✓): HasDerivAt ((fun x => x+a)⁻¹) (−(x+a)⁻²·1)... then .neg: −(...)... = −(−(x+a)⁻²) = (x+a)⁻²: signs — HasDerivAt.inv gives derivative −f'/f² = −1/(x+a)² for f = x+a: so (fun x => (x+a)⁻¹) has derivative −(x+a)⁻²; I want antiderivative of +(x+a)⁻²: use fun x => −(x+a)⁻¹: HasDerivAt (−(x+a)⁻¹) (−(−(x+a)⁻²)) = ((x+a)⁻²)?? deriv of −g is −g': g := (x+a)⁻¹, g' = −(x+a)⁻²: −g has derivative +(x+a)⁻² ✓. So ∫₀ⁿ (x+a)⁻² dx = −(n+a)⁻¹ − (−(0+a)⁻¹) = 1/a − 1/(a+n) ✓.
Hmm OK so (B) via the EM comparison variant + compactness — that's basically re-running 5d's §6 with a different integral bound. Doable but ~1/2 of 5d's §6 volume.
ALTERNATIVELY — the Weierstrass split with the telescope tail (my earlier plan): also fine. Both ~equal work. The EM variant reuses more machinery. Let me think about which is actually less Lean code...
Actually — hmm, WAIT. For (B) there's an even cheaper trick: for re w ≥ 2, |im w| ≤ 1/2: ψ(w) = (ψ(w) − ψ(⌈re w⌉₊ + i·im w))?? no. Cheapest: ψ(w) − ψ(w + 1) = −1/w and... no.
OK here's the cheapest: for re w ≥ 2, |im w| ≤ 1/2: ψ(w) = ψ(2 + i·im w) + [ψ(w) − ψ(2 + i·im w)]: the first is on the COMPACT segment {2}×[−1/2,1/2] ✓ bounded by D; the second = the recurrence sum: ψ(w) = ψ(w) hmm w − (2 + i im w) = re w − 2 ≥ 0 real: ψ(w) = ψ(w − (re w − 2)) with re w − 2 ∈ [0, ∞): the recurrence goes BACKWARD by a real amount — not integer steps. No good. Forward: ψ(2 + i·im w) = ψ(w) − ... ψ(w) = ψ(2+i·im w) + Σ? ψ(w) − ψ(v) with w − v = re w − 2 real non-integer — no.
FINE. Decision for (B): the series-split with the telescope tail (Weierstrass route):
ψ(w) = −γ − 1/w + Σ'_n a_n, a_n = 1/(n+1) − 1/(w+n+1).
‖Σ' a_n‖ ≤ Σ ‖a_n‖ (norm_tsum_le_tsum_norm with Summable of norms — Zeta23 has summable_digamma_series ✓).
‖a_n‖ = ‖w‖/((n+1)‖w+n+1‖) ≤ ‖w‖/((n+1)(re w + n + 1)) — wait ‖w+n+1‖ ≥ re(w+n+1) = re w + n + 1 ✓ (re ≥ 2 > 0: abs_re_le_norm... `Complex.abs_re_le_norm`? or `abs_re_le_norm` ✓).
Split at N := ⌈re w⌉₊... hmm actually simpler split at N := ⌈re w⌉₊ (so N ≥ re w ≥ 2):
head n+1 ≤ N ⟹ n < N: ‖a_n‖ ≤ ‖w‖/((n+1)·A) with A := re w: Σ_{n=0}^{N−1} ≤ (‖w‖/A)·H_N.
tail n ≥ N ⟹ n+1 ≥ N+1 > A... hmm n ≥ N: n+1 ≥ N+1: ‖a_n‖ ≤ ‖w‖/(n+1)²·... wait use ‖w+n+1‖ ≥ n+1·... no: for the tail use ‖w+n+1‖ ≥ ‖w‖·... hmm: ‖a_n‖ = ‖w‖/((n+1)‖w+n+1‖): for n ≥ N ≥ A: ‖w+n+1‖ ≥ re w + n + 1 ≥ A + n + 1 ≥ ...: simplest: ‖a_n‖ ≤ ‖w‖/((n+1)·(n+1))·... no — ‖w+n+1‖ ≥ n+1? NO (re w ≥ 2 helps: ‖w+n+1‖ ≥ re w+n+1 ≥ n+3 ≥ n+1 ✓): so ‖a_n‖ ≤ ‖w‖/(n+1)²: tail Σ_{n≥N} ‖w‖/(n+1)² ≤ ‖w‖·(1/N) via the telescope: 1/(n+1)² ≤ 1/(n(n+1)) = 1/n − 1/(n+1) ✓: Σ_{n≥N} 1/(n+1)² ≤ Σ_{n≥N} [1/n − 1/(n+1)] = 1/N.
Total: ‖Σ a_n‖ ≤ (‖w‖/A)·H_N + ‖w‖/N with N = ⌈A⌉₊ ∈ [A, A+1]: ‖w‖/N ≤ ‖w‖/A ≤ √(1+(5/2)²) ≤ 3 (|im| ≤ 5, re ≥ 2: ‖w‖/A = ‖w‖/re w = √(1 + (im/re)²) ≤ √(1+25/4) < 3 ✓); H_N ≤ 1 + log N ≤ 1 + log(A+1) ≤ 1 + log(‖w‖+1)·... So ‖Σ a_n‖ ≤ 3(1 + log(‖w‖+1)) + 3 = 6 + 3 log(‖w‖+1).
Then ‖ψ(w)‖ ≤ γ + ‖w‖⁻¹ + 6 + 3 log(‖w‖+1) ≤ 1 + 1/2 + 6 + 3 log(‖w‖+1) — fold: ≤ C·log(2+‖w‖) with C ≈ 20 (log(2+‖w‖) ≥ log 4 > 1.38 for ‖w‖ ≥ 2: (7.5 + 3 log(‖w‖+1)) ≤ 20·log(2+‖w‖)? at ‖w‖ = 2: LHS ≈ 7.5 + 3·1.1 = 10.8; RHS 20·1.39 = 27.8 ✓ and the ratio improves as ‖w‖ grows since log(2+x) vs log(1+x) converge — fine, nlinarith-style with log monotonicity: 7.5 + 3 log(1+x) ≤ 20 log(2+x) ⟸ 3 log(1+x) ≤ 3 log(2+x) ✓ and 7.5 ≤ 17·log(2+x) ⟸ log(2+x) ≥ log 4 ≥ 7.5/17 = 0.44 ✓ (log 4 = 2 log 2 > 1.38): so ≤ 3 log(2+‖w‖) + 17 log(2+‖w‖) = 20 log(2+‖w‖) ✓.)
Lean pieces for (B): digamma_series (Zeta23.DigammaSeries.digamma_series — namespace check: `end DigammaSeries / end Zeta23` so Zeta23.DigammaSeries.digamma_series — with open Zeta23 it's DigammaSeries.digamma_series); the integerComplement membership for re w ≥ 2 (w ≠ −m for all m : ℕ since re(−m) ≤ 0 < 2 ≤ re w: `Complex.integerComplement` def: {z | ∀ m : ℤ?...} — check the def: probably {z : ℂ | ∀ n : ℤ, z ≠ n}? or ∀ n : ℕ, z ≠ −n: check); norm_tsum_le_tsum_norm (`norm_tsum_le_tsum_norm : Summable (fun i => ‖f i‖) → ‖∑' i, f i‖ ≤ ∑' i, ‖f i‖` ✓ exists); the Summable of ‖a_n‖ via comparison with 1/(n(n+1))-telescope + the head finite sum... The Σ'_n ‖a_n‖ summability: from Zeta23's summable_digamma_series (the SERIES summable — but I need the NORM summable for norm_tsum_le_tsum_norm: the digamma series is ABSOLUTELY summable? summable_digamma_series — check its statement: "Summable (fun n => ‖term‖)"? line 298: `theorem summable_digamma_series {z} (hz) : Summable ...` — probably the norm-summability (that's what's needed for the product/logDeriv applications). Check at build. If it gives Summable (‖·‖) directly ✓ then norm bound via the comparison against a custom summable majorant... The clean way: ‖∑' a_n‖ ≤ ∑' ‖a_n‖ ≤ ∑' (my majorant) — needs my majorant Summable: the majorant: fun n => ‖w‖/((n+1)·(re w + n + 1)) — is it summable? ≤ ‖w‖/(n+1)² summable ✓ via Summable.of_nonneg_of_le (comparison) with summable_one_div_nat_pow-ish (Mathlib: `Summable (fun n => 1/(n+1)^2 : ℝ)`? — `summable_one_div_nat_add_pow`? there are several forms — the (n+1) shift to avoid 0: `summable_one_div_nat_add_pow`? or use the telescope series which is DIRECTLY summable: fun n => 1/(n+1) − 1/(n+2) — telescoping, summable by the partial-sum-tendsto route... hmm.
Actually — for the norm bound I don't need the exact tsum; structure: ∑' ‖a_n‖ ≤ head-sum (finite, n < N) + tail tsum: split via `Summable` machinery: the cleanest: ∑' n, ‖a_n‖ = ∑_{n<N} ‖a_n‖ + ∑'_{n≥N}... — tsum_eq_sum_add_tsum... needs the summable first. Circular-ish. Standard pattern: show Summable (fun n => (bound_n)) with bound_n := if n < N then ‖w‖/((n+1)A) else ‖w‖/(n+1)² — the if-form summable: finite head + telescoping tail: `Summable.if_...`? There's Summable iff eventual: `summable_iff_nat_add` or summable_of_...: a sequence that is eventually ≤ a summable one: `Summable.of_nonneg_of_le (hf : 0 ≤ f) (hfg : f ≤ g) (hg : Summable g)`? exists ✓ (`Summable.of_nonneg_of_le`). The tail-majorant: fun n => ‖w‖ * (1/(n+1) − 1/(n+2))·... — the telescope: 1/(n+1)² ≤ 1/(n+1) − 1/(n+2) = 1/((n+1)(n+2)) ✓ (since (n+2)−(n+1) = 1: 1/(n+1) − 1/(n+2) = 1/((n+1)(n+2)) ≥ 1/(n+1)² ⟺ (n+1)² ≥ (n+1)(n+2)?? NO: 1/(n+1)² vs 1/((n+1)(n+2)): (n+1)(n+2) > (n+1)² ⟹ 1/((n+1)(n+2)) < 1/(n+1)² — WRONG DIRECTION. Use 1/(n(n+1)) = 1/n − 1/(n+1) ≥ 1/(n+1)² ⟺ n+1 ≥ n ✓: so 1/(n+1)² ≤ 1/n − 1/(n+1) for n ≥ 1 ✓. The telescope g n := 1/n − 1/(n+1) for n ≥ 1 (0 for n = 0 — handle via the if or start the comparison at n = 1: the n = 0 term ‖a_0‖ = ‖w‖/(1·‖w+1‖) ≤ ‖w‖/(re w + 1) ≤ 3 — handle separately).
The tsum bound then: ∑'_{n} ‖a_n‖ = ‖a_0‖ + ∑'_{n≥1} ‖a_n‖ and ∑'_{n≥1} ‖a_n‖ ≤ ∑'_{n≥1} (head/tail bounds)... — the cleanest packaging: bound the whole tsum by a single summable comparison: g n := if n = 0 then 3 else (if (n:ℝ) ≤ N then ‖w‖/(A·(n+1))... — ugh the two-regime majorant. Alternative uniform majorant: ‖a_n‖ ≤ ‖w‖/((n+1)(A+n+1)) ≤ ... find a clean summable g with ‖a_n‖ ≤ g n and ∑' g ≤ 3 + 3 log(...): the issue is the (log A) growth — any summable majorant with an O(log A) tsum... The sum Σ_n 1/((n+1)(A+n+1)) has no closed form but the bound via the split is the honest route. So: two-step with the finite head sum:
∑'_{n} ‖a_n‖ ≤ Σ_{n=0}^{N−1} ‖w‖/((n+1)A) + ∑'_{n≥N} ‖w‖/(n+1)²
via: tsum_eq_add_tsum... hmm. The standard Lean pattern for "Σ' ≤ finite head + tail bound":
```
have hsumm : Summable (fun n => ‖a n‖) := ... (comparison with a summable majorant)
calc ∑' n, ‖a n‖ = ∑' n, (if n < N then ‖a n‖ else ‖a n‖) ...
```
Simpler: `tsum_le_tsum` with the majorant g n := if (n+1) ≤ N then ‖w‖/((n+1)·A) else ‖w‖/(n+1)²: g summable: eventually-equal-to-telescoping: `Summable.congr_at_top`? or: g = fun n => if (n+1) ≤ N then ... else ...: the else-branch for n ≥ N−1+...: summable_iff_nat_add N: (fun n => g (n + N)) summable (telescope comparison) and the head finite: `summable_nat_add_iff` : Summable (fun n => f (n + k)) ↔ Summable f ✓ exists (summable_nat_add_iff). So: Summable g ⟸ Summable (fun n => g (n+N)) [via summable_nat_add_iff] with g(n+N) = ‖w‖/(n+N+1)² ≤ ‖w‖·(1/(n+N) − 1/(n+N+1))... the telescope fun n => 1/(n+N) − 1/(n+N+1) is summable with tsum = 1/N (hasSum via partial sums: ∑_{n<M} (1/(n+N) − 1/(n+N+1)) = 1/N − 1/(M+N) → 1/N: `HasSum` of telescopes — is there a Mathlib lemma? `hasSum_... telescoping`: there's `HasSum.tendsto...` — the direct: the series Σ (f n − f (n+1)) hasSum f 0 − lim: I recall `hasSum_of_...`? There's `HasSum.telescope`? or `summable_telescope...`? Hmm — `Summable.hasSum`... Let me just build the telescope tsum via: the partial sums: ∑_{n<M} (f n − f(n+1)) = f 0 − f M (Finset.sum_range_sub' : ∑ (f i − f (i+1)) = f 0 − f M ✓ exists: Finset.sum_range_sub' (f) (n) : ∑ i ∈ range n, (f i − f (i+1)) = f 0 − f n ✓) then Tendsto (f 0 − f M) → f 0 − 0 = 1/N (f M = 1/(M+N) → 0: tendsto_one_div... `Tendsto (fun M => (1:ℝ)/(M+N)) atTop (𝓝 0)` via tendsto_const_div_atTop... `Tendsto.div_atTop`? or squeeze: |1/(M+N)| ≤ 1/M → 0 ✓). So hasSum (fun n => 1/(n+N) − 1/(n+N+1)) (1/N) via `HasSum` def: `hasSum_iff_tendsto_nat`? the equivalence HasSum f a ↔ Tendsto (partial sums) — `hasSum_iff_tendsto_nat_of_nonneg`? or directly `HasSum` via `Summable.hasSum`... The direct: HasSum f a := Tendsto (fun s : Finset ℕ => ∑ i in s, f i) atTop (𝓝 a) — via the range-partial-sum characterization: `hasSum_iff_tendsto_nat_of_summable`? There is `hasSum_iff_tendsto_nat_of_nonneg` (for nonneg terms, HasSum iff partial sums tend to it)? or `Summable.hasSum_iff_tendsto_nat`. I'll use: hasSum_of the range-form: `tendsto_nhds_of_...`: the lemma `HasSum` for telescoping: `hasSum_iff_tendsto_nat_of_nonneg` might need nonneg; 1/(n+N) − 1/(n+N+1) ≥ 0 ✓. So: (hasSum_iff_tendsto_nat_of_nonneg (fun n => by positivity-ish)).mpr (the tendsto of partial sums). Doable ~15 lines.
OK — (B) is the heaviest of the two. And actually — hold on, let me reconsider ONE more time whether (B) can be avoided. The use: logDeriv ΓR(1−s) with 1−s at re ≈ 1+R: ψ((1−s)/2) with re ≈ (1+R)/2 ≥ 2 (for R ≥ 3), |im| = |t|/2 < 5. What if I apply 5d's `logDeriv_Gammaℝ_shift`... to 1−s? No — 1−s is already in re > 0; the shift goes the other way. What about digamma_stirling directly at (1−s)/2 when |t|/2 ≥ 1/2, and for |t| < 1 handle the real-adjacent strip re(1−s) ∈ [1+R−ε, ...] via... the SAME compactness issue at infinity.
Hmm what about a totally different bound for ψ on re ≥ 2: ψ(w) = ∫?... The integral rep ψ(w) = ∫₀^∞ (e^{−t}/t − e^{−wt}/(1−e^{−t}))dt — not in Mathlib surely.
OK (B) via Weierstrass split + telescope as analyzed. And (A) via digamma_add_natCast + (C) + ψ(w+m) compactness/StirlingVert.
For (A)'s ψ(w+m) bound:
- v := w + m, re v ∈ [2, 3] (m = ⌈|re w|⌉₊ + 2 — hmm: re(w+m) = re w + ⌈|re w|⌉₊ + 2: for re w ≥ 0: = re w + ⌈re w⌉ + 2 ∈ [2re w + 2, ...] — for re w > 1 this lands > 3! The landing zone [2,3] only works for re w ≤ 1·... For (A) the scope is the LEFT plane (re w < 2 or wherever) — the dist condition dist(w, −ℕ) ≥ 1/4 is only meaningful for re w < 1. Let me scope (A): re w ≤ 2 (left/critical region) with dist(w,−ℕ) ≥ 1/4, and (B): re w ≥ 2. Overlap at re w = 2 fine.
For re w ≤ 2: m := ⌈2 − re w⌉₊ + 1: re(w+m) = re w + m ∈ [re w + 2 − re w + 1, ...] = [3, 4]: hmm: ⌈2−re w⌉₊ ≥ 2 − re w ⟹ re(w+m) ≥ 3; ⌈2−re w⌉₊ < 2 − re w + 1 (needs 2 − re w ≥ 0: re w ≤ 2 ✓) ⟹ re(w+m) < 4: re v ∈ [3, 4) ✓. |im v| = |im w|.
ψ(v): |im v| ≥ 1/2: digamma_stirling (re v > 0 ✓): ‖ψ(v)‖ ≤ ‖log v‖ + 3/(im v)² + 1/(2‖v‖) ≤ (log‖v‖ + π) + 12 + 1/4 ≤ C log(2+‖v‖)-fold. |im v| < 1/2: compactness on K := {re ∈ [3,4], |im| ≤ 1/2} — ψ continuous on K (no poles: re ≥ 3 > 0 ✓): ∃ D, ∀ v ∈ K, ‖ψ v‖ ≤ D. D is a genuine existential constant (compactness gives an unspecified bound — for the identity's purposes ANY constant works since it folds into B-side... wait — does it? The constants in 5e are loose (they feed the o(R) growth — ANY constant C works). ✓ So the compactness constant D is fine to leave non-explicit!! GREAT — that simplifies: no need to evaluate ψ on K explicitly.
Then ‖ψ(w)‖ ≤ ‖ψ(v)‖ + Σ_{j<m} ‖w+j‖⁻¹ ≤ max(D, C_stirling) + (10 + 2 log m) ≤ C·log(2+‖w‖) — the fold: m ≤ (2 − re w) + 2 ≤ ‖w‖ + 4 (re w ≥ −‖w‖) — log m ≤ log(‖w‖+4) ≤ log(2+‖w‖) + log 2·... and ‖v‖ ≤ ‖w‖ + m ≤ 2‖w‖ + 4: log(2+‖v‖) ≤ log(2+2‖w‖+4) = log(2(‖w‖+3)) = log 2 + log(‖w‖+3) ≤ 1 + (log(2+‖w‖) + 1) = log(2+‖w‖) + 2. So all pieces fold into C·log(2+‖w‖) + C' and then ≤ C''·log(2+‖w‖) for ‖w‖ ≥ 1/4 (log(2+‖w‖) ≥ log(9/4) > 0.8: C' ≤ C'·log(2+‖w‖)/0.8 — so final C := (C_stirling-or-D) + 2 + C'/0.8-ish — take a round 100·(1+D)... The D is existential — the final theorem's C will be existential too?! Hmm — for 5e-v I need to USE the bound — an existential C is fine (the o(R) argument works for any fixed C). So the final form: ∃ C : ℝ, 0 < C ∧ ∀ w, dist(w,−ℕ) ≥ 1/4 → re w ≤ 2 → ‖ψ w‖ ≤ C * Real.log (2 + ‖w‖). Hmm — wait, but for the assembly the cleanest: ∃ C, ∀ w with the conditions, ‖ψ w‖ ≤ C·log(2+‖w‖). The D-from-compactness stays inside the existential ✓.
Hmm wait — actually, do I even need to SPLIT (A) and (B) at re = 2? The (A) machinery (recurrence + separated sum + landing-zone ψ bound) works for ALL w with dist(w,−ℕ) ≥ 1/4 if I take m := ⌈max 0 (2 − re w)⌉₊ + 1 (m = 1 for re w ≥ 2): then re(w+m): for re w ≥ 2: ∈ [3, ∞) — the landing zone unbounded again for large re w... and ψ(w+m) via... For re w ≥ 2 the recurrence with m = 1: ψ(w) = ψ(w+1) − 1/w — that just moves the point, useless for bounding. So no — (B) genuinely needs the series route (or the re ≥ 2 EM route). Keep the split at re w = 2.
Hmm, wait — actually for (B), the EM-comparison variant I analyzed first: ψ(w) − log w for re w ≥ 2 via the EM form: m := 1: ψ(w+1) − ψ(w) = 1/w: no... The EM route for (B): ψ(w) − log w = [ψ(w+m) − log(w+m)] + [log(w+m) − log w − Σ 1/(w+j)]: the second bracket ≤ 1/2 + 1/(2 re w)·... ≤ 1 (the EM remainder with the 1/a bound — NO arctan blowup since the path is at re ≥ 2); the first bracket with v = w+m: re v ∈ [2+m...] — hmm the same landing-zone issue: ψ(v) − log v at re v ≥ 2 needs... the compactness only covers re ∈ [3,4]: take m := 1 always for re w ≥ 2? then v = w+1: re v ≥ 3 but unbounded as re w → ∞ — ψ(v) − log v unbounded-location. NO — for (B) the RIGHT object is ψ(w) − log w DIRECTLY at re w ≥ 2 via the Weierstrass series (the series IS the right tool for the right half-plane since it converges to ψ and the comparison with log is via the split-sum). Confirmed: (B) via Weierstrass.
Hmm — actually hold on, ONE more idea for (B): ψ(w) − log w for re w ≥ 2: use the 5d theorem `norm_digamma_sub_log_le_of_two_le_abs_im` at w AND at its conjugate... no, |im| condition fails. Use digamma_stirling at w + i(1 − im w)?? — not a function value at w. NO. Weierstrass it is.
Let me also double-check (C)'s exact needed form: in (A): Σ_{j=0}^{m−1} ‖(w + ↑j)⁻¹‖ ≤ 10 + 2·log m — my earlier estimate: ≤ 4 (small j) + 2·(4 + H_m)... let me recount with the V-split at j₀ = ⌈−re w⌉₊ (first j with re(w+j) ≥ 0):
- right side j ∈ [j₀, m): re(w+j) ∈ [0, ...): first term (j = j₀): re ∈ [0,1): term = 1/‖w+j₀‖ ≤ 4 (dist condition — ‖w+j₀‖ ≥ 1/4 ✓); j > j₀: re(w+j) ≥ j − j₀ + 0... hmm re(w+j) = re w + j ≥ j − j₀ (since re w + j₀ ≥ 0): 1/‖w+j‖ ≤ 1/re(w+j) ≤ 1/(j−j₀) for j ≥ j₀+1: Σ_{j=j₀+1}^{m−1} ≤ Σ_{i=1}^{m−j₀−1} 1/i ≤ H_m ✓. Right side ≤ 4 + H_m.
- left side j ∈ [0, j₀): re(w+j) < 0: |re(w+j)| = −(re w + j): last term (j = j₀−1): re(w+j₀−1) ∈ [−1, 0): ‖w+j₀−1‖ ≥ 1/4 ⟹ term ≤ 4; j < j₀−1: |re(w+j)| = −re w − j = (−re w − (j₀−1)) + (j₀−1−j) ≥ j₀−1−j (since −re w − (j₀−1) = −(re w + j₀ − 1) ≥ 0 as re w + j₀ − 1 < 0 by j₀−1 < j₀ = ⌈−re w⌉₊ ⟹ j₀−1 < −re w ⟹ re w + j₀ − 1 < 0 ✓): so |re(w+j)| ≥ j₀−1−j: term ≤ 1/(j₀−1−j): Σ_{j=0}^{j₀−2} ≤ Σ_{i=1}^{j₀−1} 1/i ≤ H_{j₀} ≤ H_m ✓. Left side ≤ 4 + H_m.
Total: ≤ 8 + 2H_m. With H_m ≤ 1 + log m (harmonic-log): ≤ 10 + 2 log m.
Edge cases: j₀ = 0 (re w ≥ 0): no left side; j₀ ≥ m (re w + m − 1 < 0 — possible? m chosen so re(w+m) ∈ [3,4): re w + m ≥ 3 ⟹ j₀ ≤ m−... j₀ = ⌈−re w⌉₊ ≤ −re w + 1 and m = ⌈2−re w⌉₊ + 1 ≥ 2−re w + 1 = 3 − re w > j₀ + 1: so j₀ ≤ m − 2·... anyway j₀ < m ✓ the split is interior). For the Lean proof, handle j₀ = 0 (left empty) and j₀ ≤ m via the Ico split.
The harmonic-log bound H_m ≤ 1 + log m: Mathlib — `Real.harmonic_le_log`? Let me grep for it. Actually there IS `Real.harmonic_le_log`? hmm or the integral comparison lemma directly: I'll need to find `Antitone.sum_le_integral`-style: the needed: Σ_{k=1}^{m} 1/k ≤ 1 + ∫₁^m dx/x: via the per-interval 1/k ≤ ∫_{k−1}^{k} dx/x (1/k ≤ 1/x on [k−1, k]) — sum: Σ_{k=2}^{m} 1/k ≤ ∫₁^m dx/x = log m: H_m = 1 + Σ_{k=2}^m 1/k ≤ 1 + log m ✓. The per-interval comparison in Lean: `intervalIntegral`... or the direct lemma: `Antitone.sum_le_integral`? Let me grep Mathlib for harmonic bounds first — I recall `Real.sum_one_div_le_log`?? something like "harmonic" in Mathlib.NumberTheory.Harmonic? there's Mathlib/NumberTheory/Harmonic/... hmm. Grep at build.
OK — this 5e-ii is shaping up to be ~350–450 lines across three theorems (C, A, B) + helpers. That's the rest of this session. Let me start writing. File: add to LiGapCircles.lean? or a new file LiDigammaLeft.lean? The 5e sub-stages: I'll keep 5e-ii in a new file `LiDigammaLeft.lean` (importing LiReflect for digamma_add_natCast + digamma_stirling access... LiReflect brings LiDisc etc. — heavy but built). Hmm — actually for the compactness part I need ψ = logDeriv Gamma continuity: no LiReflect needed; for digamma_add_natCast I need LiReflect. OK import LiReflect (and with it the world).
Let me first check the harmonic bound + integerComplement + summable_digamma_series forms.
5e-i committed (`e28eff6`). Starting 5e-ii — first, checking the remaining inventory (harmonic bounds, the Zeta23 digamma series form, integerComplement).
tool: Bash
input
{
"command": "cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"harmonic_le_log\\|sum_one_div_le_log\\|harmonic.*log\" Mathlib/NumberTheory/Harmonic/*.lean Mathlib/Analysis/SumOverInterval.lean 2>/dev/null | head -5; grep -rn \"integerComplement\" Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean 2>/dev/null | head -3; cd /d/Python/Quantum/zeta-23-lean && sed -n '294,300p' Zeta23/GammaFacts/Series.lean",
"description": "Check harmonic bounds, integerComplement, summable_digamma_series"
}
raw content_json (database row)
[{"type":"thinking","thinking":"5e-i committed. Now 5e-ii — the near-axis digamma bound. Per my analysis, three pieces:\n(C) the separated reciprocal sum bound Σ_{j<m} ‖w+j‖⁻¹ ≤ 10 + 2 log m (the V-split argument);\n(A) the left-plane bound ‖ψ(w)‖ ≤ C·log(2+‖w‖) for dist(w,−ℕ) ≥ 1/4 — via digamma_add_natCast + (C) + ψ(w+m) via StirlingVert/compactness;\n(B) the mild right bound re w ≥ 2 ⟹ ‖ψ(w)‖ ≤ C·log(2+‖w‖) — via the Weierstrass series split.\n\nHmm — wait, let me reconsider the scope. Which of these does 5e-v actually need?\n- The near-axis LEFT case (A): for logDeriv ΓR(s) at re s ≈ −R — needed.\n- The mild right case (B): for logDeriv ΓR(1−s) at re(1−s) ≈ 1+R with |im| < 1/2 — needed.\n- (B) could alternatively be handled by... hmm. Actually wait — for (B), there's a much simpler route I overlooked: |im w'| < 1/2, re w' ≥ 2: use the 5d EM bound?! The 5d bound `norm_digamma_sub_log_le_of_two_le_abs_im` needs |im| ≥ 2. No. What about shifting the ARGUMENT vertically... no. OK (B) via the series split as planned.\n\nActually — hmm, for (B) there's an even simpler approach: re w ≥ 2: the integral comparison for ψ via... no. Or: ψ(w) = ψ(w) with w real-ish: use logGammaSeq? The definition of digamma in Mathlib: Complex.digamma = deriv Gamma / Gamma. Hmm.\n\nAlternatively for (B): ψ(w) = ψ(⌈re w⌉₊ + 1) − Σ_{j} ... no wait that's moving RIGHT from a left point. For re w ≥ 2 we're already right; the issue is purely that digamma_stirling needs |im| ≥ 1/2. For |im w| < 1/2 with re w ≥ 2: I could apply digamma_stirling at ŵ := w + i·(1/2 − im w)... no, that changes the function value by O(1)·sup|ψ'| — circular.\n\nWhat about: ψ(w) for re w ≥ 2 via the SERIES but bound more cleverly: Σ'_n (1/(n+1) − 1/(w+n+1)): telescope against log via... the identity Σ_{n=0}^{N−1} [1/(n+1) − 1/(w+n+1)] = H_N − Σ_{n=0}^{N−1} 1/(w+n+1); and Σ_{n<N} 1/(w+n+1) vs log((w+N)/w): via the EM (re w ≥ 2 ⟹ the path w+[0,N] stays at re ≥ 2, NO pole issue — the slit-plane FTC is FINE here since re(w+x) ≥ 2 > 0!): Σ_{j=0}^{N−1} 1/(w+j) = log(w+N) − log w + O(1) via the 5d EM argument (which works for any w with the path avoiding the negative reals — re ≥ 2 ✓✓)! WAIT — the 5d EM bound norm_digamma_sub_log_le_of_two_le_abs_im needed |im w| ≥ 2 ONLY because... let me recheck: the EM step needed (i) slit-plane FTC: w + x ∈ slitPlane — for re w ≥ 2 the path stays at re ≥ 2 ✓ slit regardless of im! (ii) the arctan bound ∫₀ⁿ dx/((x+a)²+c²) ≤ π/c with c = |im w| — for im w ≈ 0 the integral is ∫₀ⁿ dx/(x+a)² = 1/a − 1/(a+n) ≤ 1/a ≤ 1/2 (a = re w ≥ 2)!! The arctan bound π/c was LOSSY — the exact value (1/c)(arctan((n+a)/c) − arctan(a/c)) is fine but the crude c → 0 limit of the exact integral is 1/a (finite!). So the remainder bound should be min(π/c, 1/a·...)-ish: ∫₀ⁿ dx/((x+a)²+c²) ≤ ∫₀^∞ dx/(x+a)² = 1/a when c = 0 — the UNIFORM bound: ∫₀ⁿ dx/((x+a)²+c²) ≤ ∫₀^∞ dx/((x+a)²+c²) = (1/c)(π/2 − arctan(a/c)) = (1/c) arctan(c/a)·... = (1/c)·arctan(c/a) hmm: ∫₀^∞ dx/((x+a)² + c²) = (1/c)[π/2 − arctan(a/c)] = (1/c)·arctan(c/a) (for a, c > 0: arctan(a/c) + arctan(c/a) = π/2 ✓). And (1/c)arctan(c/a) ≤ min(π/(2c), 1/a) (arctan u ≤ min(u, π/2)): arctan(c/a) ≤ c/a ⟹ ≤ 1/a ✓. So the uniform remainder bound: ≤ 1/a ≤ 1/2 for re w ≥ 2 — NO blowup! So the EM comparison Σ 1/(w+j) ≈ log(w+m) − log w works uniformly for re w ≥ 2 ANY im (including real w)! \n\n And the full 5d assembly then gives: ψ(w) − log w = [ψ(v) − log v] + [log v − log w − Σ] with v = w + m — the FIRST bracket needs ψ(v) − log v bounded — that used digamma_stirling (|im| ≥ 1/2) or... for |im v| < 1/2, re v ∈ [2,3]: compactness. Hmm — same compactness need. BUT with the EM machinery now working for re ≥ 2, an alternative for ψ(v): take v real-ish directly: ψ(v) for v ∈ compact [2,3]×[−1/2,1/2] — compactness bound ✓ same as before.\n\n So (B) reduces to: the EM comparison (re ≥ 2 version — a VARIANT of the 5d proof with the integral bound 1/a instead of π/c) + compactness for ψ on [2,3]×[−1/2,1/2]. The EM variant: the 5d proof's E4 bound ∫₀ⁿ ((x+a)²+c²)⁻¹ dx ≤ π/c via arctan — replace by the exact bound ≤ (1/c)arctan(c/a) ≤ 1/a... hmm — the FTC in 5d produced (1/c)(arctan((n+a)/c) − arctan(a/c)) and bounded by π/c. For the uniform-in-c version: (1/c)(arctan((n+a)/c) − arctan(a/c)) ≤ (1/c)·arctan(c/(n+a))·... no: arctan((n+a)/c) − arctan(a/c) = arctan formula... = [π/2 − arctan(c/(n+a))] − [π/2 − arctan(c/a)] = arctan(c/a) − arctan(c/(n+a)) ≤ arctan(c/a) ≤ c/a ⟹ the integral ≤ (1/c)·(c/a) = 1/a ✓ (for c > 0; at c = 0 the FTC has 1/0 issues — the antiderivative form degenerates). Handling c > 0 vs c = 0 (im w = 0, w real ≥ 2): the c = 0 case: ∫ dx/(x+a)² = 1/a − 1/(a+n) directly (real FTC with −(x+a)⁻¹ antiderivative). Ugh — two cases. ALTERNATIVELY bound without FTC: the integrand 1/((x+a)²+c²) ≤ 1/(x+a)² pointwise ✓ (c² ≥ 0) and ∫₀ⁿ 1/(x+a)² dx = 1/a − 1/(a+n) ≤ 1/a — the REAL FTC for 1/(x+a)² (antiderivative −(x+a)⁻¹ — clean real function, no complex log!). So: ∫₀ⁿ ((x+a)²+c²)⁻¹ dx ≤ ∫₀ⁿ (x+a)⁻² dx = 1/a − 1/(a+n) ≤ 1/a ≤ 1/2. The comparison 1/((x+a)²+c²) ≤ 1/(x+a)²: div_le_div... (x+a)²+c² ≥ (x+a)² > 0 ⟹ inv ≤ inv ✓ `one_div_le_one_div_of_le` (ii′-4 used ✓). And ∫₀ⁿ (x+a)⁻² dx = [−(x+a)⁻¹]₀ⁿ: real FTC: HasDerivAt (fun x => −(x+a)⁻¹) ((x+a)⁻²) x: hasDerivAt_inv·neg... real inv derivative: `HasDerivAt.inv` for ℝ→ℝ: (hasDerivAt_id x |>.add_const a).inv (x+a ≠ 0 — x+a ≥ a ≥ 2 > 0 ✓): HasDerivAt ((fun x => x+a)⁻¹) (−(x+a)⁻²·1)... then .neg: −(...)... = −(−(x+a)⁻²) = (x+a)⁻²: signs — HasDerivAt.inv gives derivative −f'/f² = −1/(x+a)² for f = x+a: so (fun x => (x+a)⁻¹) has derivative −(x+a)⁻²; I want antiderivative of +(x+a)⁻²: use fun x => −(x+a)⁻¹: HasDerivAt (−(x+a)⁻¹) (−(−(x+a)⁻²)) = ((x+a)⁻²)?? deriv of −g is −g': g := (x+a)⁻¹, g' = −(x+a)⁻²: −g has derivative +(x+a)⁻² ✓. So ∫₀ⁿ (x+a)⁻² dx = −(n+a)⁻¹ − (−(0+a)⁻¹) = 1/a − 1/(a+n) ✓.\n\n Hmm OK so (B) via the EM comparison variant + compactness — that's basically re-running 5d's §6 with a different integral bound. Doable but ~1/2 of 5d's §6 volume.\n\n ALTERNATIVELY — the Weierstrass split with the telescope tail (my earlier plan): also fine. Both ~equal work. The EM variant reuses more machinery. Let me think about which is actually less Lean code...\n\n Actually — hmm, WAIT. For (B) there's an even cheaper trick: for re w ≥ 2, |im w| ≤ 1/2: ψ(w) = (ψ(w) − ψ(⌈re w⌉₊ + i·im w))?? no. Cheapest: ψ(w) − ψ(w + 1) = −1/w and... no.\n \n OK here's the cheapest: for re w ≥ 2, |im w| ≤ 1/2: ψ(w) = ψ(2 + i·im w) + [ψ(w) − ψ(2 + i·im w)]: the first is on the COMPACT segment {2}×[−1/2,1/2] ✓ bounded by D; the second = the recurrence sum: ψ(w) = ψ(w) hmm w − (2 + i im w) = re w − 2 ≥ 0 real: ψ(w) = ψ(w − (re w − 2)) with re w − 2 ∈ [0, ∞): the recurrence goes BACKWARD by a real amount — not integer steps. No good. Forward: ψ(2 + i·im w) = ψ(w) − ... ψ(w) = ψ(2+i·im w) + Σ? ψ(w) − ψ(v) with w − v = re w − 2 real non-integer — no.\n\n FINE. Decision for (B): the series-split with the telescope tail (Weierstrass route):\n ψ(w) = −γ − 1/w + Σ'_n a_n, a_n = 1/(n+1) − 1/(w+n+1).\n ‖Σ' a_n‖ ≤ Σ ‖a_n‖ (norm_tsum_le_tsum_norm with Summable of norms — Zeta23 has summable_digamma_series ✓).\n ‖a_n‖ = ‖w‖/((n+1)‖w+n+1‖) ≤ ‖w‖/((n+1)(re w + n + 1)) — wait ‖w+n+1‖ ≥ re(w+n+1) = re w + n + 1 ✓ (re ≥ 2 > 0: abs_re_le_norm... `Complex.abs_re_le_norm`? or `abs_re_le_norm` ✓).\n Split at N := ⌈re w⌉₊... hmm actually simpler split at N := ⌈re w⌉₊ (so N ≥ re w ≥ 2):\n head n+1 ≤ N ⟹ n < N: ‖a_n‖ ≤ ‖w‖/((n+1)·A) with A := re w: Σ_{n=0}^{N−1} ≤ (‖w‖/A)·H_N.\n tail n ≥ N ⟹ n+1 ≥ N+1 > A... hmm n ≥ N: n+1 ≥ N+1: ‖a_n‖ ≤ ‖w‖/(n+1)²·... wait use ‖w+n+1‖ ≥ n+1·... no: for the tail use ‖w+n+1‖ ≥ ‖w‖·... hmm: ‖a_n‖ = ‖w‖/((n+1)‖w+n+1‖): for n ≥ N ≥ A: ‖w+n+1‖ ≥ re w + n + 1 ≥ A + n + 1 ≥ ...: simplest: ‖a_n‖ ≤ ‖w‖/((n+1)·(n+1))·... no — ‖w+n+1‖ ≥ n+1? NO (re w ≥ 2 helps: ‖w+n+1‖ ≥ re w+n+1 ≥ n+3 ≥ n+1 ✓): so ‖a_n‖ ≤ ‖w‖/(n+1)²: tail Σ_{n≥N} ‖w‖/(n+1)² ≤ ‖w‖·(1/N) via the telescope: 1/(n+1)² ≤ 1/(n(n+1)) = 1/n − 1/(n+1) ✓: Σ_{n≥N} 1/(n+1)² ≤ Σ_{n≥N} [1/n − 1/(n+1)] = 1/N.\n Total: ‖Σ a_n‖ ≤ (‖w‖/A)·H_N + ‖w‖/N with N = ⌈A⌉₊ ∈ [A, A+1]: ‖w‖/N ≤ ‖w‖/A ≤ √(1+(5/2)²) ≤ 3 (|im| ≤ 5, re ≥ 2: ‖w‖/A = ‖w‖/re w = √(1 + (im/re)²) ≤ √(1+25/4) < 3 ✓); H_N ≤ 1 + log N ≤ 1 + log(A+1) ≤ 1 + log(‖w‖+1)·... So ‖Σ a_n‖ ≤ 3(1 + log(‖w‖+1)) + 3 = 6 + 3 log(‖w‖+1).\n Then ‖ψ(w)‖ ≤ γ + ‖w‖⁻¹ + 6 + 3 log(‖w‖+1) ≤ 1 + 1/2 + 6 + 3 log(‖w‖+1) — fold: ≤ C·log(2+‖w‖) with C ≈ 20 (log(2+‖w‖) ≥ log 4 > 1.38 for ‖w‖ ≥ 2: (7.5 + 3 log(‖w‖+1)) ≤ 20·log(2+‖w‖)? at ‖w‖ = 2: LHS ≈ 7.5 + 3·1.1 = 10.8; RHS 20·1.39 = 27.8 ✓ and the ratio improves as ‖w‖ grows since log(2+x) vs log(1+x) converge — fine, nlinarith-style with log monotonicity: 7.5 + 3 log(1+x) ≤ 20 log(2+x) ⟸ 3 log(1+x) ≤ 3 log(2+x) ✓ and 7.5 ≤ 17·log(2+x) ⟸ log(2+x) ≥ log 4 ≥ 7.5/17 = 0.44 ✓ (log 4 = 2 log 2 > 1.38): so ≤ 3 log(2+‖w‖) + 17 log(2+‖w‖) = 20 log(2+‖w‖) ✓.)\n \n Lean pieces for (B): digamma_series (Zeta23.DigammaSeries.digamma_series — namespace check: `end DigammaSeries / end Zeta23` so Zeta23.DigammaSeries.digamma_series — with open Zeta23 it's DigammaSeries.digamma_series); the integerComplement membership for re w ≥ 2 (w ≠ −m for all m : ℕ since re(−m) ≤ 0 < 2 ≤ re w: `Complex.integerComplement` def: {z | ∀ m : ℤ?...} — check the def: probably {z : ℂ | ∀ n : ℤ, z ≠ n}? or ∀ n : ℕ, z ≠ −n: check); norm_tsum_le_tsum_norm (`norm_tsum_le_tsum_norm : Summable (fun i => ‖f i‖) → ‖∑' i, f i‖ ≤ ∑' i, ‖f i‖` ✓ exists); the Summable of ‖a_n‖ via comparison with 1/(n(n+1))-telescope + the head finite sum... The Σ'_n ‖a_n‖ summability: from Zeta23's summable_digamma_series (the SERIES summable — but I need the NORM summable for norm_tsum_le_tsum_norm: the digamma series is ABSOLUTELY summable? summable_digamma_series — check its statement: \"Summable (fun n => ‖term‖)\"? line 298: `theorem summable_digamma_series {z} (hz) : Summable ...` — probably the norm-summability (that's what's needed for the product/logDeriv applications). Check at build. If it gives Summable (‖·‖) directly ✓ then norm bound via the comparison against a custom summable majorant... The clean way: ‖∑' a_n‖ ≤ ∑' ‖a_n‖ ≤ ∑' (my majorant) — needs my majorant Summable: the majorant: fun n => ‖w‖/((n+1)·(re w + n + 1)) — is it summable? ≤ ‖w‖/(n+1)² summable ✓ via Summable.of_nonneg_of_le (comparison) with summable_one_div_nat_pow-ish (Mathlib: `Summable (fun n => 1/(n+1)^2 : ℝ)`? — `summable_one_div_nat_add_pow`? there are several forms — the (n+1) shift to avoid 0: `summable_one_div_nat_add_pow`? or use the telescope series which is DIRECTLY summable: fun n => 1/(n+1) − 1/(n+2) — telescoping, summable by the partial-sum-tendsto route... hmm.\n \n Actually — for the norm bound I don't need the exact tsum; structure: ∑' ‖a_n‖ ≤ head-sum (finite, n < N) + tail tsum: split via `Summable` machinery: the cleanest: ∑' n, ‖a_n‖ = ∑_{n<N} ‖a_n‖ + ∑'_{n≥N}... — tsum_eq_sum_add_tsum... needs the summable first. Circular-ish. Standard pattern: show Summable (fun n => (bound_n)) with bound_n := if n < N then ‖w‖/((n+1)A) else ‖w‖/(n+1)² — the if-form summable: finite head + telescoping tail: `Summable.if_...`? There's Summable iff eventual: `summable_iff_nat_add` or summable_of_...: a sequence that is eventually ≤ a summable one: `Summable.of_nonneg_of_le (hf : 0 ≤ f) (hfg : f ≤ g) (hg : Summable g)`? exists ✓ (`Summable.of_nonneg_of_le`). The tail-majorant: fun n => ‖w‖ * (1/(n+1) − 1/(n+2))·... — the telescope: 1/(n+1)² ≤ 1/(n+1) − 1/(n+2) = 1/((n+1)(n+2)) ✓ (since (n+2)−(n+1) = 1: 1/(n+1) − 1/(n+2) = 1/((n+1)(n+2)) ≥ 1/(n+1)² ⟺ (n+1)² ≥ (n+1)(n+2)?? NO: 1/(n+1)² vs 1/((n+1)(n+2)): (n+1)(n+2) > (n+1)² ⟹ 1/((n+1)(n+2)) < 1/(n+1)² — WRONG DIRECTION. Use 1/(n(n+1)) = 1/n − 1/(n+1) ≥ 1/(n+1)² ⟺ n+1 ≥ n ✓: so 1/(n+1)² ≤ 1/n − 1/(n+1) for n ≥ 1 ✓. The telescope g n := 1/n − 1/(n+1) for n ≥ 1 (0 for n = 0 — handle via the if or start the comparison at n = 1: the n = 0 term ‖a_0‖ = ‖w‖/(1·‖w+1‖) ≤ ‖w‖/(re w + 1) ≤ 3 — handle separately).\n \n The tsum bound then: ∑'_{n} ‖a_n‖ = ‖a_0‖ + ∑'_{n≥1} ‖a_n‖ and ∑'_{n≥1} ‖a_n‖ ≤ ∑'_{n≥1} (head/tail bounds)... — the cleanest packaging: bound the whole tsum by a single summable comparison: g n := if n = 0 then 3 else (if (n:ℝ) ≤ N then ‖w‖/(A·(n+1))... — ugh the two-regime majorant. Alternative uniform majorant: ‖a_n‖ ≤ ‖w‖/((n+1)(A+n+1)) ≤ ... find a clean summable g with ‖a_n‖ ≤ g n and ∑' g ≤ 3 + 3 log(...): the issue is the (log A) growth — any summable majorant with an O(log A) tsum... The sum Σ_n 1/((n+1)(A+n+1)) has no closed form but the bound via the split is the honest route. So: two-step with the finite head sum:\n ∑'_{n} ‖a_n‖ ≤ Σ_{n=0}^{N−1} ‖w‖/((n+1)A) + ∑'_{n≥N} ‖w‖/(n+1)² \n via: tsum_eq_add_tsum... hmm. The standard Lean pattern for \"Σ' ≤ finite head + tail bound\":\n ```\n have hsumm : Summable (fun n => ‖a n‖) := ... (comparison with a summable majorant)\n calc ∑' n, ‖a n‖ = ∑' n, (if n < N then ‖a n‖ else ‖a n‖) ...\n ```\n Simpler: `tsum_le_tsum` with the majorant g n := if (n+1) ≤ N then ‖w‖/((n+1)·A) else ‖w‖/(n+1)²: g summable: eventually-equal-to-telescoping: `Summable.congr_at_top`? or: g = fun n => if (n+1) ≤ N then ... else ...: the else-branch for n ≥ N−1+...: summable_iff_nat_add N: (fun n => g (n + N)) summable (telescope comparison) and the head finite: `summable_nat_add_iff` : Summable (fun n => f (n + k)) ↔ Summable f ✓ exists (summable_nat_add_iff). So: Summable g ⟸ Summable (fun n => g (n+N)) [via summable_nat_add_iff] with g(n+N) = ‖w‖/(n+N+1)² ≤ ‖w‖·(1/(n+N) − 1/(n+N+1))... the telescope fun n => 1/(n+N) − 1/(n+N+1) is summable with tsum = 1/N (hasSum via partial sums: ∑_{n<M} (1/(n+N) − 1/(n+N+1)) = 1/N − 1/(M+N) → 1/N: `HasSum` of telescopes — is there a Mathlib lemma? `hasSum_... telescoping`: there's `HasSum.tendsto...` — the direct: the series Σ (f n − f (n+1)) hasSum f 0 − lim: I recall `hasSum_of_...`? There's `HasSum.telescope`? or `summable_telescope...`? Hmm — `Summable.hasSum`... Let me just build the telescope tsum via: the partial sums: ∑_{n<M} (f n − f(n+1)) = f 0 − f M (Finset.sum_range_sub' : ∑ (f i − f (i+1)) = f 0 − f M ✓ exists: Finset.sum_range_sub' (f) (n) : ∑ i ∈ range n, (f i − f (i+1)) = f 0 − f n ✓) then Tendsto (f 0 − f M) → f 0 − 0 = 1/N (f M = 1/(M+N) → 0: tendsto_one_div... `Tendsto (fun M => (1:ℝ)/(M+N)) atTop (𝓝 0)` via tendsto_const_div_atTop... `Tendsto.div_atTop`? or squeeze: |1/(M+N)| ≤ 1/M → 0 ✓). So hasSum (fun n => 1/(n+N) − 1/(n+N+1)) (1/N) via `HasSum` def: `hasSum_iff_tendsto_nat`? the equivalence HasSum f a ↔ Tendsto (partial sums) — `hasSum_iff_tendsto_nat_of_nonneg`? or directly `HasSum` via `Summable.hasSum`... The direct: HasSum f a := Tendsto (fun s : Finset ℕ => ∑ i in s, f i) atTop (𝓝 a) — via the range-partial-sum characterization: `hasSum_iff_tendsto_nat_of_summable`? There is `hasSum_iff_tendsto_nat_of_nonneg` (for nonneg terms, HasSum iff partial sums tend to it)? or `Summable.hasSum_iff_tendsto_nat`. I'll use: hasSum_of the range-form: `tendsto_nhds_of_...`: the lemma `HasSum` for telescoping: `hasSum_iff_tendsto_nat_of_nonneg` might need nonneg; 1/(n+N) − 1/(n+N+1) ≥ 0 ✓. So: (hasSum_iff_tendsto_nat_of_nonneg (fun n => by positivity-ish)).mpr (the tendsto of partial sums). Doable ~15 lines.\n\nOK — (B) is the heaviest of the two. And actually — hold on, let me reconsider ONE more time whether (B) can be avoided. The use: logDeriv ΓR(1−s) with 1−s at re ≈ 1+R: ψ((1−s)/2) with re ≈ (1+R)/2 ≥ 2 (for R ≥ 3), |im| = |t|/2 < 5. What if I apply 5d's `logDeriv_Gammaℝ_shift`... to 1−s? No — 1−s is already in re > 0; the shift goes the other way. What about digamma_stirling directly at (1−s)/2 when |t|/2 ≥ 1/2, and for |t| < 1 handle the real-adjacent strip re(1−s) ∈ [1+R−ε, ...] via... the SAME compactness issue at infinity. \n\nHmm what about a totally different bound for ψ on re ≥ 2: ψ(w) = ∫?... The integral rep ψ(w) = ∫₀^∞ (e^{−t}/t − e^{−wt}/(1−e^{−t}))dt — not in Mathlib surely.\n\nOK (B) via Weierstrass split + telescope as analyzed. And (A) via digamma_add_natCast + (C) + ψ(w+m) compactness/StirlingVert.\n\nFor (A)'s ψ(w+m) bound:\n- v := w + m, re v ∈ [2, 3] (m = ⌈|re w|⌉₊ + 2 — hmm: re(w+m) = re w + ⌈|re w|⌉₊ + 2: for re w ≥ 0: = re w + ⌈re w⌉ + 2 ∈ [2re w + 2, ...] — for re w > 1 this lands > 3! The landing zone [2,3] only works for re w ≤ 1·... For (A) the scope is the LEFT plane (re w < 2 or wherever) — the dist condition dist(w, −ℕ) ≥ 1/4 is only meaningful for re w < 1. Let me scope (A): re w ≤ 2 (left/critical region) with dist(w,−ℕ) ≥ 1/4, and (B): re w ≥ 2. Overlap at re w = 2 fine.\n For re w ≤ 2: m := ⌈2 − re w⌉₊ + 1: re(w+m) = re w + m ∈ [re w + 2 − re w + 1, ...] = [3, 4]: hmm: ⌈2−re w⌉₊ ≥ 2 − re w ⟹ re(w+m) ≥ 3; ⌈2−re w⌉₊ < 2 − re w + 1 (needs 2 − re w ≥ 0: re w ≤ 2 ✓) ⟹ re(w+m) < 4: re v ∈ [3, 4) ✓. |im v| = |im w|.\n ψ(v): |im v| ≥ 1/2: digamma_stirling (re v > 0 ✓): ‖ψ(v)‖ ≤ ‖log v‖ + 3/(im v)² + 1/(2‖v‖) ≤ (log‖v‖ + π) + 12 + 1/4 ≤ C log(2+‖v‖)-fold. |im v| < 1/2: compactness on K := {re ∈ [3,4], |im| ≤ 1/2} — ψ continuous on K (no poles: re ≥ 3 > 0 ✓): ∃ D, ∀ v ∈ K, ‖ψ v‖ ≤ D. D is a genuine existential constant (compactness gives an unspecified bound — for the identity's purposes ANY constant works since it folds into B-side... wait — does it? The constants in 5e are loose (they feed the o(R) growth — ANY constant C works). ✓ So the compactness constant D is fine to leave non-explicit!! GREAT — that simplifies: no need to evaluate ψ on K explicitly.\n Then ‖ψ(w)‖ ≤ ‖ψ(v)‖ + Σ_{j<m} ‖w+j‖⁻¹ ≤ max(D, C_stirling) + (10 + 2 log m) ≤ C·log(2+‖w‖) — the fold: m ≤ (2 − re w) + 2 ≤ ‖w‖ + 4 (re w ≥ −‖w‖) — log m ≤ log(‖w‖+4) ≤ log(2+‖w‖) + log 2·... and ‖v‖ ≤ ‖w‖ + m ≤ 2‖w‖ + 4: log(2+‖v‖) ≤ log(2+2‖w‖+4) = log(2(‖w‖+3)) = log 2 + log(‖w‖+3) ≤ 1 + (log(2+‖w‖) + 1) = log(2+‖w‖) + 2. So all pieces fold into C·log(2+‖w‖) + C' and then ≤ C''·log(2+‖w‖) for ‖w‖ ≥ 1/4 (log(2+‖w‖) ≥ log(9/4) > 0.8: C' ≤ C'·log(2+‖w‖)/0.8 — so final C := (C_stirling-or-D) + 2 + C'/0.8-ish — take a round 100·(1+D)... The D is existential — the final theorem's C will be existential too?! Hmm — for 5e-v I need to USE the bound — an existential C is fine (the o(R) argument works for any fixed C). So the final form: ∃ C : ℝ, 0 < C ∧ ∀ w, dist(w,−ℕ) ≥ 1/4 → re w ≤ 2 → ‖ψ w‖ ≤ C * Real.log (2 + ‖w‖). Hmm — wait, but for the assembly the cleanest: ∃ C, ∀ w with the conditions, ‖ψ w‖ ≤ C·log(2+‖w‖). The D-from-compactness stays inside the existential ✓.\n\n Hmm wait — actually, do I even need to SPLIT (A) and (B) at re = 2? The (A) machinery (recurrence + separated sum + landing-zone ψ bound) works for ALL w with dist(w,−ℕ) ≥ 1/4 if I take m := ⌈max 0 (2 − re w)⌉₊ + 1 (m = 1 for re w ≥ 2): then re(w+m): for re w ≥ 2: ∈ [3, ∞) — the landing zone unbounded again for large re w... and ψ(w+m) via... For re w ≥ 2 the recurrence with m = 1: ψ(w) = ψ(w+1) − 1/w — that just moves the point, useless for bounding. So no — (B) genuinely needs the series route (or the re ≥ 2 EM route). Keep the split at re w = 2.\n\n Hmm, wait — actually for (B), the EM-comparison variant I analyzed first: ψ(w) − log w for re w ≥ 2 via the EM form: m := 1: ψ(w+1) − ψ(w) = 1/w: no... The EM route for (B): ψ(w) − log w = [ψ(w+m) − log(w+m)] + [log(w+m) − log w − Σ 1/(w+j)]: the second bracket ≤ 1/2 + 1/(2 re w)·... ≤ 1 (the EM remainder with the 1/a bound — NO arctan blowup since the path is at re ≥ 2); the first bracket with v = w+m: re v ∈ [2+m...] — hmm the same landing-zone issue: ψ(v) − log v at re v ≥ 2 needs... the compactness only covers re ∈ [3,4]: take m := 1 always for re w ≥ 2? then v = w+1: re v ≥ 3 but unbounded as re w → ∞ — ψ(v) − log v unbounded-location. NO — for (B) the RIGHT object is ψ(w) − log w DIRECTLY at re w ≥ 2 via the Weierstrass series (the series IS the right tool for the right half-plane since it converges to ψ and the comparison with log is via the split-sum). Confirmed: (B) via Weierstrass. \n\n Hmm — actually hold on, ONE more idea for (B): ψ(w) − log w for re w ≥ 2: use the 5d theorem `norm_digamma_sub_log_le_of_two_le_abs_im` at w AND at its conjugate... no, |im| condition fails. Use digamma_stirling at w + i(1 − im w)?? — not a function value at w. NO. Weierstrass it is.\n\nLet me also double-check (C)'s exact needed form: in (A): Σ_{j=0}^{m−1} ‖(w + ↑j)⁻¹‖ ≤ 10 + 2·log m — my earlier estimate: ≤ 4 (small j) + 2·(4 + H_m)... let me recount with the V-split at j₀ = ⌈−re w⌉₊ (first j with re(w+j) ≥ 0):\n - right side j ∈ [j₀, m): re(w+j) ∈ [0, ...): first term (j = j₀): re ∈ [0,1): term = 1/‖w+j₀‖ ≤ 4 (dist condition — ‖w+j₀‖ ≥ 1/4 ✓); j > j₀: re(w+j) ≥ j − j₀ + 0... hmm re(w+j) = re w + j ≥ j − j₀ (since re w + j₀ ≥ 0): 1/‖w+j‖ ≤ 1/re(w+j) ≤ 1/(j−j₀) for j ≥ j₀+1: Σ_{j=j₀+1}^{m−1} ≤ Σ_{i=1}^{m−j₀−1} 1/i ≤ H_m ✓. Right side ≤ 4 + H_m.\n - left side j ∈ [0, j₀): re(w+j) < 0: |re(w+j)| = −(re w + j): last term (j = j₀−1): re(w+j₀−1) ∈ [−1, 0): ‖w+j₀−1‖ ≥ 1/4 ⟹ term ≤ 4; j < j₀−1: |re(w+j)| = −re w − j = (−re w − (j₀−1)) + (j₀−1−j) ≥ j₀−1−j (since −re w − (j₀−1) = −(re w + j₀ − 1) ≥ 0 as re w + j₀ − 1 < 0 by j₀−1 < j₀ = ⌈−re w⌉₊ ⟹ j₀−1 < −re w ⟹ re w + j₀ − 1 < 0 ✓): so |re(w+j)| ≥ j₀−1−j: term ≤ 1/(j₀−1−j): Σ_{j=0}^{j₀−2} ≤ Σ_{i=1}^{j₀−1} 1/i ≤ H_{j₀} ≤ H_m ✓. Left side ≤ 4 + H_m.\n Total: ≤ 8 + 2H_m. With H_m ≤ 1 + log m (harmonic-log): ≤ 10 + 2 log m. \n Edge cases: j₀ = 0 (re w ≥ 0): no left side; j₀ ≥ m (re w + m − 1 < 0 — possible? m chosen so re(w+m) ∈ [3,4): re w + m ≥ 3 ⟹ j₀ ≤ m−... j₀ = ⌈−re w⌉₊ ≤ −re w + 1 and m = ⌈2−re w⌉₊ + 1 ≥ 2−re w + 1 = 3 − re w > j₀ + 1: so j₀ ≤ m − 2·... anyway j₀ < m ✓ the split is interior). For the Lean proof, handle j₀ = 0 (left empty) and j₀ ≤ m via the Ico split.\n\n The harmonic-log bound H_m ≤ 1 + log m: Mathlib — `Real.harmonic_le_log`? Let me grep for it. Actually there IS `Real.harmonic_le_log`? hmm or the integral comparison lemma directly: I'll need to find `Antitone.sum_le_integral`-style: the needed: Σ_{k=1}^{m} 1/k ≤ 1 + ∫₁^m dx/x: via the per-interval 1/k ≤ ∫_{k−1}^{k} dx/x (1/k ≤ 1/x on [k−1, k]) — sum: Σ_{k=2}^{m} 1/k ≤ ∫₁^m dx/x = log m: H_m = 1 + Σ_{k=2}^m 1/k ≤ 1 + log m ✓. The per-interval comparison in Lean: `intervalIntegral`... or the direct lemma: `Antitone.sum_le_integral`? Let me grep Mathlib for harmonic bounds first — I recall `Real.sum_one_div_le_log`?? something like \"harmonic\" in Mathlib.NumberTheory.Harmonic? there's Mathlib/NumberTheory/Harmonic/... hmm. Grep at build.\n\nOK — this 5e-ii is shaping up to be ~350–450 lines across three theorems (C, A, B) + helpers. That's the rest of this session. Let me start writing. File: add to LiGapCircles.lean? or a new file LiDigammaLeft.lean? The 5e sub-stages: I'll keep 5e-ii in a new file `LiDigammaLeft.lean` (importing LiReflect for digamma_add_natCast + digamma_stirling access... LiReflect brings LiDisc etc. — heavy but built). Hmm — actually for the compactness part I need ψ = logDeriv Gamma continuity: no LiReflect needed; for digamma_add_natCast I need LiReflect. OK import LiReflect (and with it the world).\n\nLet me first check the harmonic bound + integerComplement + summable_digamma_series forms.","signature":""},{"type":"text","text":"5e-i committed (`e28eff6`). Starting 5e-ii — first, checking the remaining inventory (harmonic bounds, the Zeta23 digamma series form, integerComplement)."},{"type":"tool_use","id":"Bash_243","name":"Bash","input":{"command":"cd /d/Python/Quantum/zeta-23-lean/.lake/packages/mathlib && grep -rn \"harmonic_le_log\\|sum_one_div_le_log\\|harmonic.*log\" Mathlib/NumberTheory/Harmonic/*.lean Mathlib/Analysis/SumOverInterval.lean 2>/dev/null | head -5; grep -rn \"integerComplement\" Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean 2>/dev/null | head -3; cd /d/Python/Quantum/zeta-23-lean && sed -n '294,300p' Zeta23/GammaFacts/Series.lean","description":"Check harmonic bounds, integerComplement, summable_digamma_series"},"extra_content":null}]