← Session 27 — ii′-5c/5d: Davenport disc + FE-reflection bounds
thinking (9586 chars)
While the build runs, let me draft §4 (A) and §5 (G) plans carefully so the code goes in cleaner this time (fewer contamination issues — I'll write complete Lean only).
**§4 (A): `norm_digamma_le_of_dist_nat`** — for re w ≤ 2 and ∀ m, c ≤ ‖w + ↑m‖ (c > 0): ‖ψ w‖ ≤ (46 + 2/c) + 23·log(2+‖w‖).
Proof:
- m := ⌈2 − w.re⌉₊ + 1 (so re(w+m) ∈ [3, 4]: re w + m ≥ re w + (2 − re w) + 1 = 3; and m < (2 − re w) + 2 (Nat.ceil_lt_add_one needs 0 ≤ 2 − re w ✓ re w ≤ 2) ⟹ re(w+m) < re w + 4 − re w = 4 ✓).
- digamma_add_natCast (LiReflect): ψ(w + ↑m) = ψ w + Σ_{j<m} (w + ↑j)⁻¹ — hypothesis: w.im ≠ 0?? — WAIT: digamma_add_natCast (hw : w.im ≠ 0) — for the near-axis case, w might be REAL (im w = 0)!! The 5e-v circle's real crossing s = −R: w = s/2 = −R/2 REAL! digamma_add_natCast needs im ≠ 0 (the recurrence steps need w + j ≠ −m via the im argument). For w REAL: w + j ≠ −m iff w ≠ −(m+j) — the dist condition gives ‖w + (m+j)‖ ≥ c > 0 ⟹ w + (m+j) ≠ 0 hmm — I need w + j ≠ −k for all k : ℕ — with w real: w + j = −k ⟺ w = −(k+j) — possible! (w real = −(k+j) violates dist(w, −ℕ) ≥ c? ‖w + (k+j)‖ = 0 < c ✓ CONTRADICTION — so the dist condition DOES exclude w = nonpositive-integer... wait dist(w, −ℕ) ≥ c means ‖w + l‖ ≥ c for ALL l : ℕ — so w + l ≠ 0 for all l ⟹ w ≠ −l ✓. So w + j ≠ −k: if w + j = −k then w = −(j+k) =: −l with l := j+k : ℕ ✓ then ‖w + l‖ = 0 < c contra. So under the dist hypothesis, the recurrence side conditions hold EVEN for real w. But digamma_add_natCast's hypothesis is (hw : w.im ≠ 0) — too strong for real w!! Let me check LiReflect's digamma_add_natCast: `theorem digamma_add_natCast {w : ℂ} (hw : w.im ≠ 0) (n : ℕ)` — its induction used hne : ∀ j m, w + ↑j ≠ −↑m via the im argument. I should GENERALIZE the hypothesis to `∀ k : ℕ, w ≠ -(k : ℂ)` (the natural pole-avoidance) — that's what digamma_apply_add_one needs directly. Let me check how digamma_add_natCast's hypothesis is used... its hne : ∀ j m, w + ↑j ≠ −(m:ℂ) via im. The cleaner hypothesis: (hw : ∀ k : ℕ, w ≠ -(k : ℂ)) — then w + ↑j ≠ −↑m from w ≠ −(j+m)... w + j = −m ⟺ w = −(j+m) = −(j+m : ℕ-cast): excluded by hw (k := j+m) ✓. So generalize digamma_add_natCast's hypothesis. But that EDITS LiReflect.lean — is that within the freeze protocol? The freeze: "no edits to existing Lean proofs except the liCoeff correctness fix" — the freeze is about PAPER files + existing proofs until ii′-7... Hmm — the freeze protocol from D-064 §8: "paper files + existing proofs untouched until ii′-7 — the ONLY exception is the liCoeff correctness fix". Editing digamma_add_natCast's hypothesis = editing an existing Lean proof. To stay within the freeze, I should NOT edit LiReflect's statement. Alternative: in LiDigammaLeft, prove a small wrapper `digamma_add_natCast'` with the pole-avoidance hypothesis, whose proof... can't reuse digamma_add_natCast directly (its hypothesis is im ≠ 0). Options: (a) reprove the induction inline in the new file with the weaker hypothesis (duplicate ~15 lines — acceptable), or (b) weaken LiReflect's hypothesis — technically a small edit to an existing proof. The freeze's intent is protecting the paper-facing claims and proved lemmas from churn; a hypothesis WEAKENING is downstream-safe (any caller passing im ≠ 0 still works since im ≠ 0 ⟹ pole-avoidance... wait no — weakening the hypothesis means the new statement is stronger; callers of the old form pass im ≠ 0 and need to derive the pole-avoidance — that changes the CALL SITES... does anything call digamma_add_natCast? It's used in §6 of LiReflect (norm_digamma_sub_log_le's hshift') — one call site with him : w.im ≠ 0 ✓. If I weaken, that call site must provide the pole-avoidance from him — a one-line change INSIDE LiReflect — an edit to an existing proof. To be strictly freeze-compliant, do (a): a fresh induction in LiDigammaLeft. It's cheap. Decision: (a) — new lemma `digamma_add_natCast_of_ne_neg_nat (hw : ∀ k : ℕ, w ≠ -(k : ℂ)) (n : ℕ) : digamma (w + n) = digamma w + ∑ j ∈ range n, (w + j)⁻¹` — induction, reusing the pattern.
- The landing zone: v := w + ↑m, re v ∈ [3,4): ψ(v) bound: by_cases |im v| ≥ 1/2 (i.e., |im w| ≥ 1/2): StirlingVert digamma_stirling: ‖ψ(v)‖ ≤ ‖log v‖ + 3/(im v)² + 1/(2‖v‖) ≤ (log‖v‖ + π) + 12 + 1/6 ≤ log‖v‖ + 17 (‖v‖ ≥ re v ≥ 3). And log‖v‖ ≤ log(2+‖v‖) ≤ log(2 + ‖w‖ + m) with m ≤ 4 − re w ≤ 4 + ‖w‖: ‖v‖ ≤ ‖w‖ + m ≤ 2‖w‖ + 4: log(2+‖v‖) ≤ log(6+2‖w‖) = log 2 + log(3+‖w‖) ≤ 1 + (1 + log(2+‖w‖)) = 2 + log(2+‖w‖)... the constant folds. |im v| < 1/2: §2's (B) at v (re v ≥ 3 ≥ 2 ✓, |im v| < 1/2 ≤ 5 ✓): ‖ψ v‖ ≤ 20 log(2+‖v‖).
- Assemble: ‖ψ w‖ ≤ ‖ψ v‖ + Σ ≤ [LZ] + (2/c + 2 + 2 log m) [via (C) — needs j₀ := ⌈−re w⌉₊ with j₀+1 ≤ m: j₀ = ⌈−re w⌉₊ ≤ ... m = ⌈2−re w⌉₊ + 1: j₀ ≤ −re w + 1 and m ≥ 2−re w + 1 = 3−re w: j₀ + 1 ≤ −re w + 2 ≤ 3 − re w ≤ m ✓ (needs −re w + 2 ≤ 3 − re w ⟺ 2 ≤ 3 ✓ — with the ceil bounds: j₀ = ⌈−re w⌉₊: for re w > 0: j₀ = 0 ✓ ≤ m; the ceil facts: ⌈−re w⌉₊ ≤ ... hmm Nat.ceil of possibly-negative: for −re w ≤ 0: ⌈⌉₊ = 0 ✓ (Nat.ceil_eq_zero). So j₀ ≤ max(0, −re w + 1) hmm: for −re w ≥ 0: j₀ ≤ −re w + 1 (Nat.ceil_lt_add_one: < −re w + 1... ≤): j₀ + 1 ≤ −re w + 2 ≤ m ⟸ −re w + 2 ≤ ⌈2−re w⌉₊ + 1 ⟸ 1 − re w ≤ ⌈2−re w⌉₊ ⟸ 1 − re w ≤ 2 − re w ✓ (Nat.le_ceil: 2−re w ≤ ⌈2−re w⌉₊ ⟹ suffices 1 − re w ≤ 2 − re w ✓ linarith). OK.
- Final fold: ‖ψ w‖ ≤ 21·(2 + log(2+‖w‖))·... let me just recompute the constant carefully in the write-up — target the affine form (C₁ + C₂/c) + C₃·log(2+‖w‖) with explicit integers: I'll compute during the write and pick safe round numbers.
**§5 (G): `logDeriv_Gammaℝ_eq`** — for im s ≠ 0: logDeriv ΓR s = −(log π)/2 + ½ψ(s/2).
- m := ⌈max 0 (−(s.re/2))⌉₊ + 1: re(s + 2m) = re s + 2m ≥ re s + 2(−re s/2) + 2 = 2 > 0 ✓ hmm: ⌈max 0 (−re s/2)⌉₊ ≥ −re s/2 ⟹ 2m ≥ −re s + 2 ⟹ re(s+2m) ≥ 2 ✓.
- The EventuallyEq: on U := {z | z.im ≠ 0} (open): ΓR(z) = (π:ℂ)^(↑m) · ΓR(z + 2↑m) / ∏_{j<m} (z/2 + ↑j):
From gamma_mul_prod (z/2) m (side conditions: z/2 ≠ −k for k < m: z/2 = −k ⟹ z = −2k real ⟹ im = 0 contra ✓): Γ(z/2)·∏_{j<m}(z/2+j) = Γ(z/2+↑m).
ΓR(z+2m) = π^{−(z+2m)/2}·Γ(z/2+m) [Gammaℝ_def; (z+2m)/2 = z/2+m by ring] = π^{−z/2}·π^{−m}·Γ(z/2)·∏(z/2+j) [the cpow split via exp form as in gammaR_shift_four: π^{−(z+2m)/2} = π^{−z/2}·π^{−m}: cpow_def_of_ne_zero + exp_add + exp(−m log π) = (π^m)⁻¹·... — this time the exponent −m is a NAT cast: Real.exp(−(m:ℝ)·log π) = (π^m)⁻¹: Real.exp(−m·log π) = (exp(log π))^{−m} = π^{−m}: via Real.exp_nat_mul?? no — m is ℕ: Real.exp (−(m:ℝ) * log π) = ((Real.exp (Real.log π)) ^ m)⁻¹-ish: exp(−m·x) = (exp(m·x))⁻¹ = ((exp x)^m)⁻¹ [Real.exp_nat_mul: exp (n*x) = (exp x)^n — banked journal-024] = (π^m)⁻¹ [Real.exp_log]. So (π:ℂ)^{−↑m}... hmm the exponent in the cpow is −(2m)/2 = −m as a ℂ: −(↑m : ℂ): cpow with a nat-cast-neg exponent: ((π:ℂ))^(−(m:ℂ)) = ((π:ℂ)^m)⁻¹: `Complex.cpow_neg`? or via cpow_natCast: (π:ℂ)^(↑m:ℂ) = (π:ℂ)^m then the neg: cpow_neg (hx : x ≠ 0)?: x^(−y) = (x^y)⁻¹: `Complex.cpow_neg (hx : x ≠ 0) (y) : x ^ (-y) = (x ^ y)⁻¹`? I think cpow_neg exists. So: π^{−(z+2m)/2} = exp-form... — reuse gammaR_shift_four's hpi pattern with 2 → 2m: the exponent algebra: log π · (−(z+2m)/2) = log π · (−z/2) + log π · (−↑m): ring ✓ then exp_add: exp(a + b) — the second: exp(↑log π · (−↑m)) = ↑(Real.exp (−m · log π)) = ↑((π^m)⁻¹) = ((π:ℂ)^m)⁻¹: ofReal_exp + the real eval + ofReal-inv/pow pushes... let me do: exp (↑logπ · (−↑m)) = exp (↑(−(m:ℝ) * Real.log π)) [push_cast; ring for the arg] = ↑(Real.exp (−m·logπ)) [ofReal_exp] = ↑((π^m)⁻¹) [the real chain] = ((π:ℂ)^m)⁻¹ [push_cast: ofReal_pow, ofReal_inv...]. OK.
So ΓR(z+2m) = ((π:ℂ)^m)⁻¹ · ΓR(z) · ∏(z/2+j) ⟹ ΓR(z) = (π:ℂ)^m · ΓR(z+2m) / ∏(z/2+j) [divide: product ≠ 0 on U: each z/2+↑j ≠ 0 (im z ≠ 0 ⟹ im(z/2+j) = im z /2 ≠ 0) ✓ prod_ne_zero_iff; and π^m ≠ 0].
- EventuallyEq on U (isOpen: isOpen_ne_fun continuous_im continuous_const — from 5d's usage: that worked ✓).
- logDeriv: logDeriv ΓR s = logDeriv (fun z => (π:ℂ)^↑m · ΓR(z+2m) / ∏_{j<m} (z/2+↑j)) s [logDeriv_congr] = logDeriv (fun z => (π:ℂ)^↑m * ΓR (z+2m)) s − logDeriv (∏...) s [logDeriv_div] = [0 + logDeriv ΓR (s+2m)] − Σ_j logDeriv (·/2+↑j) s [logDeriv_const_mul + the comp-deriv + the prod-logDeriv induction] = −(logπ)/2 + ½ψ((s+2m)/2) − Σ_j (1/2)/(s/2+↑j) [logDeriv_Gammaℝ at s+2m (re > 0 ✓) + per-factor logDeriv: (z/2+j)' = 1/2: logDeriv (fun z => z/2+↑j) s = (1/2)/(s/2+↑j) ✓].
The prod-logDeriv: `logDeriv_prod_range` helper: logDeriv (fun z => ∏ j ∈ range m, (z/2 + ↑j)) s = ∑ j ∈ range m, (1/2)/(s/2+↑j) — induction with logDeriv_mul + logDeriv_const/prod_range_succ: base: ∏ empty = 1: logDeriv (fun _ => 1) = 0 = ∑ empty ✓ (logDeriv_const); step: ∏_{j<k+1} = ∏_{j<k} · (z/2+↑k): logDeriv_mul [nonzero at s: each factor ≠ 0 (im ≠ 0) and the partial product ≠ 0 (prod_ne_zero)] + IH + sum_range_succ ✓.
Per-factor logDeriv: logDeriv (fun z => z/2 + ↑j) s = deriv(...) s / (s/2+↑j): deriv = 1/2: via (hasDerivAt_id' s).div_const 2 |>.add_const: HasDerivAt (fun z => z/2+↑j) (1/2) s: .deriv ✓.
- Then the cancellation: −(logπ)/2 + ½[ψ(s/2) + Σ_j (s/2+↑j)⁻¹] − Σ_j (1/2)/(s/2+↑j): note (1/2)/(s/2+↑j) = (1/2)·(s/2+↑j)⁻¹ = ½·(s/2+↑j)⁻¹: and digamma_add_natCast needs the SIDE-CONDITIONS: ψ(s/2 + m) = ψ(s/2) + Σ (s/2+↑j)⁻¹ — via LiReflect's digamma_add_natCast (im(s/2) = im s/2 ≠ 0 ✓ — its hypothesis is im ≠ 0 ✓ available here since im s ≠ 0). So: = −(logπ)/2 + ½ψ(s/2) + ½Σ(s/2+↑j)⁻¹ − ½Σ(s/2+↑j)⁻¹ = −(logπ)/2 + ½ψ(s/2) ✓ ring.
OK. Given the session is very long now, let me land (T)+(B)+(C) FIRST (the build is running), then continue with §4+§5 in this session if the pacing allows, else close and pick up. Let me check the build.
While the build runs — preparing the audit script for the three completed theorems.
tool: Write ok
input
{
"file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\Scratch.lean",
"content": "/- Session 027 axiom audit: LiDigammaLeft.lean (ii\u2032-5e-ii first half). -/\nimport Mathlib\nimport NguyenRH1.LiDigammaLeft\n\nopen NguyenRH1\n\n#print axioms sum_range_one_div_sub\n#print axioms hasSum_one_div_sub_telescope\n#print axioms tsum_one_div_sub_telescope\n#print axioms digamma_natCast_eq\n#print axioms summable_digamma_majorant\n#print axioms norm_digamma_term_le\n#print axioms sum_one_div_le_one_add_log\n#print axioms norm_digamma_le_of_two_le_re\n#print axioms recip_norm_le_right\n#print axioms recip_norm_le_left\n#print axioms digamma_recip_sum_le\n"
}
result 2026-08-23 11:20:05Z → 2026-08-23 11:20:05Z
{
"type": "update",
"filePath": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\Scratch.lean",
"content": "/- Session 027 axiom audit: LiDigammaLeft.lean (ii\u2032-5e-ii first half). -/\nimport Mathlib\nimport NguyenRH1.LiDigammaLeft\n\nopen NguyenRH1\n\n#print axioms sum_range_one_div_sub\n#print axioms hasSum_one_div_sub_telescope\n#print axioms tsum_one_div_sub_telescope\n#print axioms digamma_natCast_eq\n#print axioms summable_digamma_majorant\n#print axioms norm_digamma_term_le\n#print axioms sum_one_div_le_one_add_log\n#print axioms norm_digamma_le_of_two_le_re\n#print axioms recip_norm_le_right\n#print axioms recip_norm_le_left\n#print axioms digamma_recip_sum_le\n",
"structuredPatch": [
{
"oldStart": 1,
"oldLines": 9,
"newStart": 1,
"newLines": 18,
"lines": [
"-/- Session 027 axiom audit: LiGapCircles.lean (ii\u2032-5e-i) \u2014 all new declarations. -/",
"+/- Session 027 axiom audit: LiDigammaLeft.lean (ii\u2032-5e-ii first half). -/",
" import Mathlib",
"-import NguyenRH1.LiGapCircles",
"+import NguyenRH1.LiDigammaLeft",
" ",
" open NguyenRH1",
" ",
"-#print axioms C0hat_mono",
"-#print axioms exists_gapCircle_radius",
"+#print axioms sum_range_one_div_sub",
"+#print axioms hasSum_one_div_sub_telescope",
"+#print axioms tsum_one_div_sub_telescope",
"+#print axioms digamma_natCast_eq",
"+#print axioms summable_digamma_majorant",
"+#print axioms norm_digamma_term_le",
"+#print axioms sum_one_div_le_one_add_log",
"+#print axioms norm_digamma_le_of_two_le_re",
"+#print axioms recip_norm_le_right",
"+#print axioms recip_norm_le_left",
"+#print axioms digamma_recip_sum_le",
" "
]
}
],
"originalFile": "/- Session 027 axiom audit: LiGapCircles.lean (ii\u2032-5e-i) \u2014 all new declarations. -/\nimport Mathlib\nimport NguyenRH1.LiGapCircles\n\nopen NguyenRH1\n\n#print axioms C0hat_mono\n#print axioms exists_gapCircle_radius\n",
"autoRead": false
}
raw content_json (database row)
[{"type":"thinking","thinking":"While the build runs, let me draft §4 (A) and §5 (G) plans carefully so the code goes in cleaner this time (fewer contamination issues — I'll write complete Lean only).\n\n**§4 (A): `norm_digamma_le_of_dist_nat`** — for re w ≤ 2 and ∀ m, c ≤ ‖w + ↑m‖ (c > 0): ‖ψ w‖ ≤ (46 + 2/c) + 23·log(2+‖w‖).\n\nProof:\n- m := ⌈2 − w.re⌉₊ + 1 (so re(w+m) ∈ [3, 4]: re w + m ≥ re w + (2 − re w) + 1 = 3; and m < (2 − re w) + 2 (Nat.ceil_lt_add_one needs 0 ≤ 2 − re w ✓ re w ≤ 2) ⟹ re(w+m) < re w + 4 − re w = 4 ✓).\n- digamma_add_natCast (LiReflect): ψ(w + ↑m) = ψ w + Σ_{j<m} (w + ↑j)⁻¹ — hypothesis: w.im ≠ 0?? — WAIT: digamma_add_natCast (hw : w.im ≠ 0) — for the near-axis case, w might be REAL (im w = 0)!! The 5e-v circle's real crossing s = −R: w = s/2 = −R/2 REAL! digamma_add_natCast needs im ≠ 0 (the recurrence steps need w + j ≠ −m via the im argument). For w REAL: w + j ≠ −m iff w ≠ −(m+j) — the dist condition gives ‖w + (m+j)‖ ≥ c > 0 ⟹ w + (m+j) ≠ 0 hmm — I need w + j ≠ −k for all k : ℕ — with w real: w + j = −k ⟺ w = −(k+j) — possible! (w real = −(k+j) violates dist(w, −ℕ) ≥ c? ‖w + (k+j)‖ = 0 < c ✓ CONTRADICTION — so the dist condition DOES exclude w = nonpositive-integer... wait dist(w, −ℕ) ≥ c means ‖w + l‖ ≥ c for ALL l : ℕ — so w + l ≠ 0 for all l ⟹ w ≠ −l ✓. So w + j ≠ −k: if w + j = −k then w = −(j+k) =: −l with l := j+k : ℕ ✓ then ‖w + l‖ = 0 < c contra. So under the dist hypothesis, the recurrence side conditions hold EVEN for real w. But digamma_add_natCast's hypothesis is (hw : w.im ≠ 0) — too strong for real w!! Let me check LiReflect's digamma_add_natCast: `theorem digamma_add_natCast {w : ℂ} (hw : w.im ≠ 0) (n : ℕ)` — its induction used hne : ∀ j m, w + ↑j ≠ −↑m via the im argument. I should GENERALIZE the hypothesis to `∀ k : ℕ, w ≠ -(k : ℂ)` (the natural pole-avoidance) — that's what digamma_apply_add_one needs directly. Let me check how digamma_add_natCast's hypothesis is used... its hne : ∀ j m, w + ↑j ≠ −(m:ℂ) via im. The cleaner hypothesis: (hw : ∀ k : ℕ, w ≠ -(k : ℂ)) — then w + ↑j ≠ −↑m from w ≠ −(j+m)... w + j = −m ⟺ w = −(j+m) = −(j+m : ℕ-cast): excluded by hw (k := j+m) ✓. So generalize digamma_add_natCast's hypothesis. But that EDITS LiReflect.lean — is that within the freeze protocol? The freeze: \"no edits to existing Lean proofs except the liCoeff correctness fix\" — the freeze is about PAPER files + existing proofs until ii′-7... Hmm — the freeze protocol from D-064 §8: \"paper files + existing proofs untouched until ii′-7 — the ONLY exception is the liCoeff correctness fix\". Editing digamma_add_natCast's hypothesis = editing an existing Lean proof. To stay within the freeze, I should NOT edit LiReflect's statement. Alternative: in LiDigammaLeft, prove a small wrapper `digamma_add_natCast'` with the pole-avoidance hypothesis, whose proof... can't reuse digamma_add_natCast directly (its hypothesis is im ≠ 0). Options: (a) reprove the induction inline in the new file with the weaker hypothesis (duplicate ~15 lines — acceptable), or (b) weaken LiReflect's hypothesis — technically a small edit to an existing proof. The freeze's intent is protecting the paper-facing claims and proved lemmas from churn; a hypothesis WEAKENING is downstream-safe (any caller passing im ≠ 0 still works since im ≠ 0 ⟹ pole-avoidance... wait no — weakening the hypothesis means the new statement is stronger; callers of the old form pass im ≠ 0 and need to derive the pole-avoidance — that changes the CALL SITES... does anything call digamma_add_natCast? It's used in §6 of LiReflect (norm_digamma_sub_log_le's hshift') — one call site with him : w.im ≠ 0 ✓. If I weaken, that call site must provide the pole-avoidance from him — a one-line change INSIDE LiReflect — an edit to an existing proof. To be strictly freeze-compliant, do (a): a fresh induction in LiDigammaLeft. It's cheap. Decision: (a) — new lemma `digamma_add_natCast_of_ne_neg_nat (hw : ∀ k : ℕ, w ≠ -(k : ℂ)) (n : ℕ) : digamma (w + n) = digamma w + ∑ j ∈ range n, (w + j)⁻¹` — induction, reusing the pattern.\n\n- The landing zone: v := w + ↑m, re v ∈ [3,4): ψ(v) bound: by_cases |im v| ≥ 1/2 (i.e., |im w| ≥ 1/2): StirlingVert digamma_stirling: ‖ψ(v)‖ ≤ ‖log v‖ + 3/(im v)² + 1/(2‖v‖) ≤ (log‖v‖ + π) + 12 + 1/6 ≤ log‖v‖ + 17 (‖v‖ ≥ re v ≥ 3). And log‖v‖ ≤ log(2+‖v‖) ≤ log(2 + ‖w‖ + m) with m ≤ 4 − re w ≤ 4 + ‖w‖: ‖v‖ ≤ ‖w‖ + m ≤ 2‖w‖ + 4: log(2+‖v‖) ≤ log(6+2‖w‖) = log 2 + log(3+‖w‖) ≤ 1 + (1 + log(2+‖w‖)) = 2 + log(2+‖w‖)... the constant folds. |im v| < 1/2: §2's (B) at v (re v ≥ 3 ≥ 2 ✓, |im v| < 1/2 ≤ 5 ✓): ‖ψ v‖ ≤ 20 log(2+‖v‖).\n- Assemble: ‖ψ w‖ ≤ ‖ψ v‖ + Σ ≤ [LZ] + (2/c + 2 + 2 log m) [via (C) — needs j₀ := ⌈−re w⌉₊ with j₀+1 ≤ m: j₀ = ⌈−re w⌉₊ ≤ ... m = ⌈2−re w⌉₊ + 1: j₀ ≤ −re w + 1 and m ≥ 2−re w + 1 = 3−re w: j₀ + 1 ≤ −re w + 2 ≤ 3 − re w ≤ m ✓ (needs −re w + 2 ≤ 3 − re w ⟺ 2 ≤ 3 ✓ — with the ceil bounds: j₀ = ⌈−re w⌉₊: for re w > 0: j₀ = 0 ✓ ≤ m; the ceil facts: ⌈−re w⌉₊ ≤ ... hmm Nat.ceil of possibly-negative: for −re w ≤ 0: ⌈⌉₊ = 0 ✓ (Nat.ceil_eq_zero). So j₀ ≤ max(0, −re w + 1) hmm: for −re w ≥ 0: j₀ ≤ −re w + 1 (Nat.ceil_lt_add_one: < −re w + 1... ≤): j₀ + 1 ≤ −re w + 2 ≤ m ⟸ −re w + 2 ≤ ⌈2−re w⌉₊ + 1 ⟸ 1 − re w ≤ ⌈2−re w⌉₊ ⟸ 1 − re w ≤ 2 − re w ✓ (Nat.le_ceil: 2−re w ≤ ⌈2−re w⌉₊ ⟹ suffices 1 − re w ≤ 2 − re w ✓ linarith). OK.\n- Final fold: ‖ψ w‖ ≤ 21·(2 + log(2+‖w‖))·... let me just recompute the constant carefully in the write-up — target the affine form (C₁ + C₂/c) + C₃·log(2+‖w‖) with explicit integers: I'll compute during the write and pick safe round numbers.\n\n**§5 (G): `logDeriv_Gammaℝ_eq`** — for im s ≠ 0: logDeriv ΓR s = −(log π)/2 + ½ψ(s/2).\n- m := ⌈max 0 (−(s.re/2))⌉₊ + 1: re(s + 2m) = re s + 2m ≥ re s + 2(−re s/2) + 2 = 2 > 0 ✓ hmm: ⌈max 0 (−re s/2)⌉₊ ≥ −re s/2 ⟹ 2m ≥ −re s + 2 ⟹ re(s+2m) ≥ 2 ✓.\n- The EventuallyEq: on U := {z | z.im ≠ 0} (open): ΓR(z) = (π:ℂ)^(↑m) · ΓR(z + 2↑m) / ∏_{j<m} (z/2 + ↑j):\n From gamma_mul_prod (z/2) m (side conditions: z/2 ≠ −k for k < m: z/2 = −k ⟹ z = −2k real ⟹ im = 0 contra ✓): Γ(z/2)·∏_{j<m}(z/2+j) = Γ(z/2+↑m).\n ΓR(z+2m) = π^{−(z+2m)/2}·Γ(z/2+m) [Gammaℝ_def; (z+2m)/2 = z/2+m by ring] = π^{−z/2}·π^{−m}·Γ(z/2)·∏(z/2+j) [the cpow split via exp form as in gammaR_shift_four: π^{−(z+2m)/2} = π^{−z/2}·π^{−m}: cpow_def_of_ne_zero + exp_add + exp(−m log π) = (π^m)⁻¹·... — this time the exponent −m is a NAT cast: Real.exp(−(m:ℝ)·log π) = (π^m)⁻¹: Real.exp(−m·log π) = (exp(log π))^{−m} = π^{−m}: via Real.exp_nat_mul?? no — m is ℕ: Real.exp (−(m:ℝ) * log π) = ((Real.exp (Real.log π)) ^ m)⁻¹-ish: exp(−m·x) = (exp(m·x))⁻¹ = ((exp x)^m)⁻¹ [Real.exp_nat_mul: exp (n*x) = (exp x)^n — banked journal-024] = (π^m)⁻¹ [Real.exp_log]. So (π:ℂ)^{−↑m}... hmm the exponent in the cpow is −(2m)/2 = −m as a ℂ: −(↑m : ℂ): cpow with a nat-cast-neg exponent: ((π:ℂ))^(−(m:ℂ)) = ((π:ℂ)^m)⁻¹: `Complex.cpow_neg`? or via cpow_natCast: (π:ℂ)^(↑m:ℂ) = (π:ℂ)^m then the neg: cpow_neg (hx : x ≠ 0)?: x^(−y) = (x^y)⁻¹: `Complex.cpow_neg (hx : x ≠ 0) (y) : x ^ (-y) = (x ^ y)⁻¹`? I think cpow_neg exists. So: π^{−(z+2m)/2} = exp-form... — reuse gammaR_shift_four's hpi pattern with 2 → 2m: the exponent algebra: log π · (−(z+2m)/2) = log π · (−z/2) + log π · (−↑m): ring ✓ then exp_add: exp(a + b) — the second: exp(↑log π · (−↑m)) = ↑(Real.exp (−m · log π)) = ↑((π^m)⁻¹) = ((π:ℂ)^m)⁻¹: ofReal_exp + the real eval + ofReal-inv/pow pushes... let me do: exp (↑logπ · (−↑m)) = exp (↑(−(m:ℝ) * Real.log π)) [push_cast; ring for the arg] = ↑(Real.exp (−m·logπ)) [ofReal_exp] = ↑((π^m)⁻¹) [the real chain] = ((π:ℂ)^m)⁻¹ [push_cast: ofReal_pow, ofReal_inv...]. OK.\n So ΓR(z+2m) = ((π:ℂ)^m)⁻¹ · ΓR(z) · ∏(z/2+j) ⟹ ΓR(z) = (π:ℂ)^m · ΓR(z+2m) / ∏(z/2+j) [divide: product ≠ 0 on U: each z/2+↑j ≠ 0 (im z ≠ 0 ⟹ im(z/2+j) = im z /2 ≠ 0) ✓ prod_ne_zero_iff; and π^m ≠ 0].\n- EventuallyEq on U (isOpen: isOpen_ne_fun continuous_im continuous_const — from 5d's usage: that worked ✓).\n- logDeriv: logDeriv ΓR s = logDeriv (fun z => (π:ℂ)^↑m · ΓR(z+2m) / ∏_{j<m} (z/2+↑j)) s [logDeriv_congr] = logDeriv (fun z => (π:ℂ)^↑m * ΓR (z+2m)) s − logDeriv (∏...) s [logDeriv_div] = [0 + logDeriv ΓR (s+2m)] − Σ_j logDeriv (·/2+↑j) s [logDeriv_const_mul + the comp-deriv + the prod-logDeriv induction] = −(logπ)/2 + ½ψ((s+2m)/2) − Σ_j (1/2)/(s/2+↑j) [logDeriv_Gammaℝ at s+2m (re > 0 ✓) + per-factor logDeriv: (z/2+j)' = 1/2: logDeriv (fun z => z/2+↑j) s = (1/2)/(s/2+↑j) ✓].\n The prod-logDeriv: `logDeriv_prod_range` helper: logDeriv (fun z => ∏ j ∈ range m, (z/2 + ↑j)) s = ∑ j ∈ range m, (1/2)/(s/2+↑j) — induction with logDeriv_mul + logDeriv_const/prod_range_succ: base: ∏ empty = 1: logDeriv (fun _ => 1) = 0 = ∑ empty ✓ (logDeriv_const); step: ∏_{j<k+1} = ∏_{j<k} · (z/2+↑k): logDeriv_mul [nonzero at s: each factor ≠ 0 (im ≠ 0) and the partial product ≠ 0 (prod_ne_zero)] + IH + sum_range_succ ✓.\n Per-factor logDeriv: logDeriv (fun z => z/2 + ↑j) s = deriv(...) s / (s/2+↑j): deriv = 1/2: via (hasDerivAt_id' s).div_const 2 |>.add_const: HasDerivAt (fun z => z/2+↑j) (1/2) s: .deriv ✓.\n- Then the cancellation: −(logπ)/2 + ½[ψ(s/2) + Σ_j (s/2+↑j)⁻¹] − Σ_j (1/2)/(s/2+↑j): note (1/2)/(s/2+↑j) = (1/2)·(s/2+↑j)⁻¹ = ½·(s/2+↑j)⁻¹: and digamma_add_natCast needs the SIDE-CONDITIONS: ψ(s/2 + m) = ψ(s/2) + Σ (s/2+↑j)⁻¹ — via LiReflect's digamma_add_natCast (im(s/2) = im s/2 ≠ 0 ✓ — its hypothesis is im ≠ 0 ✓ available here since im s ≠ 0). So: = −(logπ)/2 + ½ψ(s/2) + ½Σ(s/2+↑j)⁻¹ − ½Σ(s/2+↑j)⁻¹ = −(logπ)/2 + ½ψ(s/2) ✓ ring.\n\nOK. Given the session is very long now, let me land (T)+(B)+(C) FIRST (the build is running), then continue with §4+§5 in this session if the pacing allows, else close and pick up. Let me check the build.","signature":""},{"type":"text","text":"While the build runs — preparing the audit script for the three completed theorems."},{"type":"tool_use","id":"Write_435","name":"Write","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\Scratch.lean","content":"/- Session 027 axiom audit: LiDigammaLeft.lean (ii′-5e-ii first half). -/\nimport Mathlib\nimport NguyenRH1.LiDigammaLeft\n\nopen NguyenRH1\n\n#print axioms sum_range_one_div_sub\n#print axioms hasSum_one_div_sub_telescope\n#print axioms tsum_one_div_sub_telescope\n#print axioms digamma_natCast_eq\n#print axioms summable_digamma_majorant\n#print axioms norm_digamma_term_le\n#print axioms sum_one_div_le_one_add_log\n#print axioms norm_digamma_le_of_two_le_re\n#print axioms recip_norm_le_right\n#print axioms recip_norm_le_left\n#print axioms digamma_recip_sum_le\n"},"extra_content":null}]