← Session 22 — ii′-1: liCoeff pairing fix + residue machinery
thinking (3406 chars)
Section 1 compiles. Now Section 2: the uniform convergence + the interchange → ψ_real identity. This is the heart of the real side. Let me write it:
```lean
/-! ## 2. The derivative sequence and its locally uniform limit -/
/-- The n-th partial sum of the digamma series as a function of x. -/
def dpsiPartialR (x : ℝ) (n : ℕ) : ℝ := ∑ m ∈ Finset.range n, dpsiTermR x m
```
The derivative of logGammaSeq x n in x:
logGammaSeq x n = x·log n + log(n!) − Σ_{m ∈ range(n+1)} log(x+m).
deriv = log n − Σ_{m ∈ range(n+1)} 1/(x+m).
Key identity: log n − Σ_{m=0}^n 1/(x+m) = (log n − harmonic n) + (−1/x + Σ_{m ∈ range n} dpsiTermR x m):
- harmonic n = Σ_{i ∈ range n} 1/(i+1) — Mathlib: `harmonic n : ℝ := ∑ i ∈ Finset.range n, (↑(i+1))⁻¹`? let me recall the def: `harmonic (n : ℕ) : ℚ` or ℝ? — `harmonic n := ∑ i ∈ Finset.range n, (i + 1)⁻¹` — it's in ℚ! (NumberTheory/Harmonic) — and tendsto_harmonic_sub_log uses `harmonic n` cast to ℝ: `Tendsto (fun n : ℕ ↦ harmonic n - log n)` with the cast (harmonic n : ℝ) — the harmonic in that lemma: from EulerMascheroni.lean:150: `Tendsto (fun n : ℕ ↦ harmonic n - log n) atTop (𝓝 eulerMascheroniConstant)` — the harmonic n is ℚ cast to ℝ? — `harmonic n` returns ℚ (I think: `harmonic (n : ℕ) : ℚ := ∑ i ∈ range n, (i+1)⁻¹`) and the lemma coerces. The sum Σ_{m=0}^n 1/(x+m) = 1/x + Σ_{m=1}^n 1/(x+m) = 1/x + Σ_{i ∈ range n} 1/(x + (i+1)). And harmonic n = Σ_{i ∈ range n} 1/(i+1) = Σ_{i ∈ range n} (i+1)⁻¹.
So log n − Σ_{m=0}^n 1/(x+m) = (log n − ↑(harmonic n)) + [↑(harmonic n) − Σ_{m=0}^n 1/(x+m)] — and the bracket: ↑(harmonic n) − 1/x − Σ_{i ∈ range n} 1/(x+i+1) = −1/x + Σ_{i ∈ range n} (1/(i+1) − 1/(x+i+1)) = −1/x + Σ_{i ∈ range n} dpsiTermR x i ✓.
The locally uniform limit of the derivative sequence on Ioi 0:
TendstoLocallyUniformlyOn (fun n x => log n − Σ_{m ∈ range(n+1)} 1/(x+m)) (fun x => -γ - 1/x + ∑' m, dpsiTermR x m) atTop (Ioi 0).
Via the decomposition + TendstoLocallyUniformlyOn.add:
- A_n(x) := log n − harmonic n (constant in x) → −γ: TendstoLocallyUniformlyOn — from the pointwise Tendsto (independent of x): `TendstoLocallyUniformlyOn` of a constant family — there might be `TendstoLocallyUniformlyOn.of_...`? hmm — simplest: TendstoUniformlyOn (constant-in-x) on any set: `tendstoUniformlyOn_iff`-free approach: a sequence independent of the point converges uniformlyOn trivially — `tendstoUniformlyOn_of...`? Let me use: TendstoLocallyUniformlyOn F f l s — unfold and prove per-point: for each x, on a small ball: TendstoUniformlyOn — via `Metric.tendstoUniformlyOn_iff`: ∀ ε > 0, ∀ᶠ n, ∀ x ∈ t, dist (F n x) (f x) < ε — with F n x = A_n (indep of x): dist (A_n) (−γ) < ε eventually ✓ from the pointwise tendsto — easy.
Actually there might be a direct lemma: `TendstoUniformlyOn.of_const...`? or `tendstoUniformlyOn_of_tendsto...`? Hmm — I'll do the Metric.tendstoUniformlyOn_iff route if needed.
- B_n(x) := −1/x: constant in n: tendstoLocallyUniformlyOn_const? — `tendstoLocallyUniformlyOn_const : TendstoLocallyUniformlyOn (fun _ => f) f l s`? ✓ probably exists.
- C_n(x) := Σ_{m ∈ range n} dpsiTermR x m → ∑' dpsiTermR: HasSumUniformlyOn via the M-test on compacts then to locally-uniform — HasSumUniformlyOn.of_norm_le_summable (hu : Summable u) (h : ∀ n x ∈ s, ‖f n x‖ ≤ u n)? : HasSumUniformlyOn f (fun x => ∑' n, f n x) s — let me check the exact signature from line 35.
Let me read lines 30-60 of TsumUniformlyOn.lean.
Section 1 green. Reading the M-test lemma signature for section 2.
tool: Bash ok
input
{
"command": "cd \"D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib\" && sed -n '30,58p' Mathlib/Topology/Algebra/InfiniteSum/TsumUniformlyOn.lean; echo ===; grep -rn \"hasSumLocallyUniformlyOn_iff_tendstoLocallyUniformlyOn\" Mathlib/Topology/Algebra/InfiniteSum/*.lean | head -2",
"description": "Read M-test and the iff bridge"
}
result 2026-08-22 06:57:56Z → 2026-08-24 22:06:03Z
NguyenRH1/LiTightR.lean:4430:6: error: Tactic `rewrite` failed: Did not find an occurrence of the pattern
s₀
in the target expression
‖∑ ρ ∈ nearZerosSub t, ↑(zeroMult ↑ρ) / (2 + ↑t * I - ↑ρ)‖ ≤
0.6 * Real.log (t + 2) + 0.886 * Real.log (Real.log (t + 2)) + 2.7
hZC : ZeroCountProp
hZC2 : ZeroCountProp2
hNLZ : NoLowZeros
t : ℝ
ht : 10 ≤ t
s : ℂ
hσlo : -5 / 2 ≤ s.re
hσhi : s.re ≤ 3
him : s.im = t
hζ : riemannZeta s ≠ 0
hs0 : s ≠ 0
hs1 : s ≠ 1
hst : ∀ (n : ℕ), 1 ≤ n → s ≠ -2 * ↑n
s₀ : ℂ := 2 + ↑t * I
hs₀def : s₀ = 2 + ↑t * I
hs₀ : riemannZeta s₀ ≠ 0
hs₀0 : s₀ ≠ 0
hs₀1 : s₀ ≠ 1
hs₀t : ∀ (n : ℕ), 1 ≤ n → s₀ ≠ -2 * ↑n
hdec :
logDeriv riemannZeta s - ∑ ρ ∈ nearZerosSub t, ↑(zeroMult ↑ρ) / (s - ↑ρ) =
(logDeriv riemannZeta s₀ - ∑ ρ ∈ nearZerosSub t, ↑(zeroMult ↑ρ) / (s₀ - ↑ρ) +
∑' (ρ : { ρ // IsNontrivialZero ρ }), if ρ ∈ nearZerosSub t then 0 else seriesDiffTerm s s₀ ρ) -
(1 / s - 1 / s₀) -
(1 / (s - 1) - 1 / (s₀ - 1)) -
((s / 2).digamma - (s₀ / 2).digamma) / 2
h1 : ‖logDeriv riemannZeta s₀‖ ≤ dirichletC2
h1b : dirichletC2 ≤ 1
h2 :
‖∑ ρ ∈ nearZerosSub t, ↑(zeroMult ↑ρ) / (2 + ↑t * I - ↑ρ)‖ ≤
0.6 * Real.log (t + 2) + 0.886 * Real.log (Real.log (t + 2)) + 2.7
h3 :
‖∑' (ρ : { ρ // IsNontrivialZero ρ }), if ρ ∈ nearZerosSub t then 0 else seriesDiffTerm s (2 + ↑t * I) ρ‖ ≤
12.1284 * C0hat (t + 1) + 7.2425
raw content_json (database row)
[{"type":"thinking","thinking":"Section 1 compiles. Now Section 2: the uniform convergence + the interchange → ψ_real identity. This is the heart of the real side. Let me write it:\n\n```lean\n/-! ## 2. The derivative sequence and its locally uniform limit -/\n\n/-- The n-th partial sum of the digamma series as a function of x. -/\ndef dpsiPartialR (x : ℝ) (n : ℕ) : ℝ := ∑ m ∈ Finset.range n, dpsiTermR x m\n```\n\nThe derivative of logGammaSeq x n in x:\nlogGammaSeq x n = x·log n + log(n!) − Σ_{m ∈ range(n+1)} log(x+m).\nderiv = log n − Σ_{m ∈ range(n+1)} 1/(x+m).\n\nKey identity: log n − Σ_{m=0}^n 1/(x+m) = (log n − harmonic n) + (−1/x + Σ_{m ∈ range n} dpsiTermR x m):\n- harmonic n = Σ_{i ∈ range n} 1/(i+1) — Mathlib: `harmonic n : ℝ := ∑ i ∈ Finset.range n, (↑(i+1))⁻¹`? let me recall the def: `harmonic (n : ℕ) : ℚ` or ℝ? — `harmonic n := ∑ i ∈ Finset.range n, (i + 1)⁻¹` — it's in ℚ! (NumberTheory/Harmonic) — and tendsto_harmonic_sub_log uses `harmonic n` cast to ℝ: `Tendsto (fun n : ℕ ↦ harmonic n - log n)` with the cast (harmonic n : ℝ) — the harmonic in that lemma: from EulerMascheroni.lean:150: `Tendsto (fun n : ℕ ↦ harmonic n - log n) atTop (𝓝 eulerMascheroniConstant)` — the harmonic n is ℚ cast to ℝ? — `harmonic n` returns ℚ (I think: `harmonic (n : ℕ) : ℚ := ∑ i ∈ range n, (i+1)⁻¹`) and the lemma coerces. The sum Σ_{m=0}^n 1/(x+m) = 1/x + Σ_{m=1}^n 1/(x+m) = 1/x + Σ_{i ∈ range n} 1/(x + (i+1)). And harmonic n = Σ_{i ∈ range n} 1/(i+1) = Σ_{i ∈ range n} (i+1)⁻¹.\n So log n − Σ_{m=0}^n 1/(x+m) = (log n − ↑(harmonic n)) + [↑(harmonic n) − Σ_{m=0}^n 1/(x+m)] — and the bracket: ↑(harmonic n) − 1/x − Σ_{i ∈ range n} 1/(x+i+1) = −1/x + Σ_{i ∈ range n} (1/(i+1) − 1/(x+i+1)) = −1/x + Σ_{i ∈ range n} dpsiTermR x i ✓.\n \nThe locally uniform limit of the derivative sequence on Ioi 0:\nTendstoLocallyUniformlyOn (fun n x => log n − Σ_{m ∈ range(n+1)} 1/(x+m)) (fun x => -γ - 1/x + ∑' m, dpsiTermR x m) atTop (Ioi 0).\n\nVia the decomposition + TendstoLocallyUniformlyOn.add:\n- A_n(x) := log n − harmonic n (constant in x) → −γ: TendstoLocallyUniformlyOn — from the pointwise Tendsto (independent of x): `TendstoLocallyUniformlyOn` of a constant family — there might be `TendstoLocallyUniformlyOn.of_...`? hmm — simplest: TendstoUniformlyOn (constant-in-x) on any set: `tendstoUniformlyOn_iff`-free approach: a sequence independent of the point converges uniformlyOn trivially — `tendstoUniformlyOn_of...`? Let me use: TendstoLocallyUniformlyOn F f l s — unfold and prove per-point: for each x, on a small ball: TendstoUniformlyOn — via `Metric.tendstoUniformlyOn_iff`: ∀ ε > 0, ∀ᶠ n, ∀ x ∈ t, dist (F n x) (f x) < ε — with F n x = A_n (indep of x): dist (A_n) (−γ) < ε eventually ✓ from the pointwise tendsto — easy.\n Actually there might be a direct lemma: `TendstoUniformlyOn.of_const...`? or `tendstoUniformlyOn_of_tendsto...`? Hmm — I'll do the Metric.tendstoUniformlyOn_iff route if needed.\n- B_n(x) := −1/x: constant in n: tendstoLocallyUniformlyOn_const? — `tendstoLocallyUniformlyOn_const : TendstoLocallyUniformlyOn (fun _ => f) f l s`? ✓ probably exists.\n- C_n(x) := Σ_{m ∈ range n} dpsiTermR x m → ∑' dpsiTermR: HasSumUniformlyOn via the M-test on compacts then to locally-uniform — HasSumUniformlyOn.of_norm_le_summable (hu : Summable u) (h : ∀ n x ∈ s, ‖f n x‖ ≤ u n)? : HasSumUniformlyOn f (fun x => ∑' n, f n x) s — let me check the exact signature from line 35.\n\nLet me read lines 30-60 of TsumUniformlyOn.lean.","signature":""},{"type":"text","text":"Section 1 green. Reading the M-test lemma signature for section 2."},{"type":"tool_use","id":"Bash_311","name":"Bash","input":{"command":"cd \"D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib\" && sed -n '30,58p' Mathlib/Topology/Algebra/InfiniteSum/TsumUniformlyOn.lean; echo ===; grep -rn \"hasSumLocallyUniformlyOn_iff_tendstoLocallyUniformlyOn\" Mathlib/Topology/Algebra/InfiniteSum/*.lean | head -2","description":"Read M-test and the iff bridge"},"extra_content":null}]