Current task: —

← Session 25 — ii′-5 R-bound: design + level-2 EM disc bound

#1338 assistant 2026-08-22 22:15:34.074 UTC · 502→9631 tok open ⤢
thinking (25084 chars)
All of §10 compiles now. Update todos and write the main theorem (§11). This is the big one. Let me write it carefully in one edit, following my detailed plan. I'll be extra careful with: - w₀ setup - F w₀ ≠ 0 - EventuallyEq B = F/P - logDeriv computations - J_B obtain + bounds - the algebra - the fold Let me write it now. I'll keep `set` usage minimal (only w₀ and Mbound). One thing to double check — hJderiv's membership condition: hJderiv : ∀ z ∈ Metric.closedBall 0 (3/5), (deriv J_B) z = (deriv B) z / B z — from LogOfAnalyticFunction's third component `(∀ z ∈ Metric.closedBall 0 r, (deriv J_B) z = (deriv B) z / (B z))` with r := 3/5 ✓. For the extras bound I need the pieces from the plan. Let me write the extras bound as a standalone lemma to reduce the main proof's size: ```lean theorem sdiff_sum_norm_le {t : ℝ} (ht : 10 ≤ |t|) {s : ℂ} (hsim : s.im = t) : ‖∑ ρ ∈ (collZeros ht).image (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) \ nearZeros t, (zeroMult ρ : ℂ) / (s - ρ)‖ ≤ Real.log ((9 / 4) * |t| ^ 2) / Real.log (33 / 32) := by classical set img := (collZeros ht).image (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) with himg calc ‖∑ ρ ∈ img \ nearZeros t, (zeroMult ρ : ℂ) / (s - ρ)‖ ≤ ∑ ρ ∈ img \ nearZeros t, ‖(zeroMult ρ : ℂ) / (s - ρ)‖ := norm_sum_le _ _ _ ≤ ∑ ρ ∈ img \ nearZeros t, (zeroMult ρ : ℝ) := by apply Finset.sum_le_sum intro ρ hρ have hρimg : ρ ∈ img := (Finset.mem_sdiff.mp hρ).1 have hρnotnear : ρ ∉ nearZeros t := (Finset.mem_sdiff.mp hρ).2 obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hρimg -- ρ = s₀ + (5/2)w, w collected have hρdisc : discCenter t + (5 / 2 : ℂ) * w ∈ zeroDiscFinset t := by rw [mem_zeroDiscFinset] constructor · rw [Metric.mem_closedBall, Complex.dist_eq, add_sub_cancel_left, norm_mul] have h25 : ‖(5 / 2 : ℂ)‖ = 5 / 2 := by rw [show (5 / 2 : ℂ) = ((5 / 2 : ℝ) : ℂ) by norm_num, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 5 / 2)] rw [h25] have hwle := ((mem_collZeros ht).mp hw).1 calc (5 / 2 : ℝ) * ‖w‖ ≤ (5 / 2) * rC ht := mul_le_mul_of_nonneg_left hwle (by norm_num) _ = collRadius ht := by unfold rC; ring _ ≤ 5 / 2 := (collRadius_le ht).trans (by norm_num) · have hFw : scaledZeta t w = 0 := ((mem_collZeros ht).mp hw).2 unfold scaledZeta at hFw exact (div_eq_zero_iff.mp hFw).resolve_right (fun h0 => by have h := RvM.zeta_lower_bound_two t rw [← show discCenter t = 2 + t * Complex.I from rfl, h0, norm_zero] at h norm_num at h) have himge : 1 ≤ |(discCenter t + (5 / 2 : ℂ) * w).im - t| := by by_contra h push Not at h exact hρnotnear (mem_nearZeros.mpr ⟨hρdisc, h⟩) -- ‖s − ρ‖ ≥ |im(s−ρ)| = |t − im(aff w)| ≥ 1 have hsnorm : (1:ℝ) ≤ ‖s - (discCenter t + (5 / 2 : ℂ) * w)‖ := by have h1 : |s.im - (discCenter t + (5 / 2 : ℂ) * w).im| ≤ ‖s - (discCenter t + (5 / 2 : ℂ) * w)‖ := abs_im_le_norm _ rw [hsim, abs_sub_comm] at h1 linarith rw [norm_div, RCLike.norm_natCast] -- hmm: ‖(m:ℂ)‖ = (m:ℝ): Complex.norm_natCast? rw [← div_one ((zeroMult (discCenter t + (5 / 2 : ℂ) * w) : ℝ))] rw [div_le_div_iff₀ (zero_lt_one.trans_le hsnorm) one_pos] exact mul_le_mul_of_nonneg_left hsnorm (Nat.cast_nonneg _) _ ≤ ∑ ρ ∈ img, (zeroMult ρ : ℝ) := Finset.sum_le_sum_of_subset_of_nonneg Finset.sdiff_subset (fun i _ _ => Nat.cast_nonneg _) _ ≤ Real.log ((9 / 4) * |t| ^ 2) / Real.log (33 / 32) := sum_image_zeroMult_le ht ``` Issues: - After obtain ⟨w, hw, rfl⟩: ρ is replaced by the aff expression. The sum's integrand (zeroMult ρ : ℂ)/(s − ρ) becomes (zeroMult (s₀+(5/2)w) : ℂ)/(s − (s₀+(5/2)w)) ✓. - ‖(m:ℂ)‖: norm_natCast — the name: `Complex.norm_natCast : ‖(n : ℂ)‖ = n`? or `RCLike.norm_natCast : ‖(n : 𝕜)‖ = n` ✓ RCLike.norm_natCast exists (𝕜 := ℂ via RCLike ℂ). Try Complex.norm_natCast first... In this Mathlib: `RCLike.norm_natCast` I think. Or `Complex.norm_natCast`. Use whichever; fallback `by exact_mod_cast` hmm. There's `Complex.norm_natCast (n : ℕ) : ‖(n : ℂ)‖ = n`? hmm might be `norm_natCast` via `RCLike`. I'll write `RCLike.norm_natCast` — if unknown, switch to `Complex.norm_natCast`. Actually the sum_le_sum goal: ‖(m:ℂ)/(s−ρ)‖ ≤ (m:ℝ): rw [norm_div]: ‖(m:ℂ)‖/‖s−ρ‖ ≤ m: rw [norm_natCast-something]: (m:ℝ)/‖s−ρ‖ ≤ m. Hmm — ‖(m : ℂ)‖ = |(m : ℝ)| via Complex.norm_real? (m:ℂ) = ((m:ℝ):ℂ) via Nat.cast... `Complex.norm_real : ‖(r : ℂ)‖ = |r|` — with (↑m : ℂ) = ((↑m : ℝ) : ℂ): push_cast or `Complex.norm_natCast` direct. Let me use: rw [norm_div, Complex.norm_natCast] and if that fails try RCLike.norm_natCast. Since m : ℕ cast to ℂ — there IS `RCLike.norm_natCast (n : ℕ) : ‖(n : 𝕜)‖ = n`? hmm. In Mathlib 2025: `RCLike.norm_natCast : ‖(n : 𝕜)‖ = n` ✓ I'm fairly confident. Fallback chain available. - Wait — the target of the rw [norm_div, ...] is ‖(m:ℂ)/(s−ρ)‖ ≤ (m:ℝ) — hmm the sum's per-term: Finset.sum_le_sum's goal: ‖(m:ℂ)/(s−ρ)‖ ≤ (m:ℝ) hmm the RHS (zeroMult (s₀+(5/2)w) : ℝ) — the cast — fine. Also — `div_le_div_iff₀ (zero_lt_one.trans_le hsnorm) one_pos` : (m:ℝ)/‖s−ρ‖ ≤ (m:ℝ)/1 ⟺ m*1 ≤ m*‖s−ρ‖: after the ← div_one rw, goal: m/‖s−ρ‖ ≤ m/1 ✓ then iff: m*1 ≤ m*‖s−ρ‖ — exact mul_le_mul_of_nonneg_left hsnorm (Nat.cast_nonneg _) : m*1 ≤ m*‖s−ρ‖ ✓ (form a*b ≤ a*c with a := m hmm: mul_le_mul_of_nonneg_left (h : b ≤ c) (ha : 0 ≤ a) : a*b ≤ a*c — b := 1, c := ‖s−ρ‖, a := m: m*1 ≤ m*‖s−ρ‖ ✓ EXACT). But the iff gives goal m*1 ≤ m*‖s−ρ‖ — exactly ✓. Hmm — `zero_lt_one.trans_le hsnorm` : 0 < 1 → 1 ≤ ‖s−ρ‖ → 0 < ‖s−ρ‖ ✓ (LT.lt.trans_le). - hsnorm's proof: |s.im − (aff w).im| ≤ ‖s − aff w‖: abs_im_le_norm (s − aff w) : |(s − aff w).im| ≤ ‖s − aff w‖ — (s − aff w).im = s.im − (aff w).im (sub_im) — is abs_im_le_norm's statement about z.im? `Complex.abs_im_le_norm (z : ℂ) : |z.im| ≤ ‖z‖` ✓; applied to z := s − aff w: |(s − aff w).im| — the goal-form |s.im − (aff w).im| — need sub_im rewrite: rw [sub_im] at... Let me write: ```lean have hsnorm : (1:ℝ) ≤ ‖s - (discCenter t + (5 / 2 : ℂ) * w)‖ := by have h1 := abs_im_le_norm (s - (discCenter t + (5 / 2 : ℂ) * w)) rw [sub_im, hsim] at h1 rw [abs_sub_comm] at h1 linarith ``` h1 : |(s − affw).im| ≤ ‖s − affw‖; rw [sub_im] at h1: |s.im − (affw).im| ≤ ...; hsim: s.im = t: |t − (affw).im| ≤ ...; abs_sub_comm : |t − (affw).im| = |(affw).im − t|: rw: |(affw).im − t| ≤ ‖...‖; linarith [h1, himge]: himge : 1 ≤ |(affw).im − t| ✓ ⟹ 1 ≤ ‖...‖ ✓ linarith ✓. Hmm — abs_sub_comm : |a − b| = |b − a| ✓. - hρdisc's second component: ζ(aff w) = 0: from hFw : scaledZeta t w = 0 — unfold scaledZeta at hFw: ζ(s₀+(5/2)w)/ζ(s₀) = 0 — div_eq_zero_iff.mp : a/b = 0 ↔ a = 0 ∨ b = 0 — .resolve_right (ζ(s₀) ≠ 0) : ζ(aff w) = 0 ✓. But — mem_zeroDiscFinset's second component needs `riemannZeta ρ = 0` with ρ := s₀+(5/2)w ✓ after the rfl-subst ✓. Wait — the div_eq_zero_iff resolve: div_eq_zero_iff : a / b = 0 ↔ a = 0 ∨ b = 0 — is it `div_eq_zero_iff : a / b = 0 ↔ a = 0 ∨ b = 0` ✓ (GroupWithZero). .mp hFw : ζ(aff w) = 0 ∨ ζ(s₀) = 0; .resolve_right (h : ζ(s₀) ≠ 0) : ζ(aff w) = 0 ✓. Also note the dist_eq: Complex.dist_eq : dist a b = ‖a − b‖ ✓; goal dist ρ s₀ ≤ 5/2 with ρ := aff w: dist (s₀+(5/2)w) s₀ = ‖(s₀+(5/2)w) − s₀‖ = ‖(5/2)w‖: add_sub_cancel_left : a + b − a = b ✓ pattern (s₀ + (5/2)w) − s₀ ✓. Also in the calc: (5/2)*‖w‖ ≤ (5/2)*rC ht ✓; = collRadius ht: rC ht = collRadius ht * (2/5) — (5/2)*rC = (5/2)(collRadius·(2/5)) = collRadius: `unfold rC; ring` — the goal (5/2)*rC ht = collRadius ht: unfold rC: (5/2)*(collRadius ht*(2/5)) = collRadius ht: ring ✓ — wait I wrote the calc step as `_ = collRadius ht := by unfold rC; ring` — the step is (5/2)*rC ht = collRadius ht ✓. Then collRadius ht ≤ 5/2: collRadius_le : ≤ 24/10 = 2.4 ≤ 2.5 ✓ .trans (by norm_num) ✓. Now the MAIN theorem. Let me also handle: nearZeros_subset_image gives nearZeros ⊆ img where img = (collZeros ht).image aff — with `classical` for the image decidability. Finset.sum_sdiff (h : s₁ ⊆ s₂) : (∑ i ∈ s₂ \ s₁, f i) + ∑ i ∈ s₁, f i = ∑ i ∈ s₂, f i ✓. Main theorem statement: ```lean /-- **The loose Davenport-disc R-bound** (ii′-5c, D-067 §6): on σ ∈ [1/2, 7/2], |t| ≥ 10, the log-derivative of ζ minus its near-zero sum is O((log|t|)²) with the deliberately loose constant 100000. This is the GROWTH INPUT for the partial-fraction identity (ii′-5e); the tight constants come from the identity's analysis (ii′-5f). -/ theorem logDeriv_riemannZeta_sub_nearZeros_le {t : ℝ} (ht : 10 ≤ |t|) {s : ℂ} (hsim : s.im = t) (hσlo : 1 / 2 ≤ s.re) (hσhi : s.re ≤ 7 / 2) (hs0 : riemannZeta s ≠ 0) : ‖logDeriv riemannZeta s - ∑ ρ ∈ nearZeros t, (zeroMult ρ : ℂ) / (s - ρ)‖ ≤ 100000 * (Real.log |t|) ^ 2 := by ``` Now the body. Full assembly per plan. Let me write it all. ```lean classical -- the application point in the w-coordinate set w₀ : ℂ := (2 / 5 : ℂ) * (s - discCenter t) with hw₀def have haff : discCenter t + (5 / 2 : ℂ) * w₀ = s := by rw [hw₀def]; ring have hw₀norm : ‖w₀‖ ≤ 3 / 5 := by have hsnorm : ‖s - discCenter t‖ = |s.re - 2| := by have heq : s - discCenter t = ((s.re - 2 : ℝ) : ℂ) := by apply Complex.ext_iff.mpr constructor · simp [discCenter, sub_re, add_re, mul_re, ofReal_re, ofReal_im, I_re, I_im] · simp [discCenter, sub_im, add_im, mul_im, ofReal_re, ofReal_im, I_re, I_im, hsim] rw [heq, Complex.norm_real, Real.norm_eq_abs] have h25 : ‖(2 / 5 : ℂ)‖ = 2 / 5 := by rw [show (2 / 5 : ℂ) = ((2 / 5 : ℝ) : ℂ) by norm_num, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2 / 5)] rw [hw₀def, norm_mul, h25, hsnorm] have hσ : |s.re - 2| ≤ 3 / 2 := by rw [abs_le] constructor <;> linarith calc (2 / 5 : ℝ) * |s.re - 2| ≤ (2 / 5) * (3 / 2) := mul_le_mul_of_nonneg_left hσ (by norm_num) _ = 3 / 5 := by norm_num -- F and its nonvanishing at w₀ have hζs0 : riemannZeta (discCenter t) ≠ 0 := by have h := RvM.zeta_lower_bound_two t intro h0 rw [← show discCenter t = 2 + t * Complex.I from rfl, h0, norm_zero] at h norm_num at h have hFw₀ : scaledZeta t w₀ ≠ 0 := by unfold scaledZeta rw [haff] exact div_ne_zero hs0 hζs0 have hw₀notmem : w₀ ∉ SetOfZeros (rC ht) (scaledZeta t) := fun h => hFw₀ h.2 -- B =ᶠ F/P near w₀ have hZclosed : IsClosed (SetOfZeros (rC ht) (scaledZeta t)) := by have hset : SetOfZeros (rC ht) (scaledZeta t) = ↑(collZeros ht) := by ext x rw [Finset.mem_coe, mem_collZeros ht] rw [hset] exact (collZeros ht).finite_toSet.isClosed have hEv1 : ∀ᶠ w in 𝓝 w₀, w ∉ SetOfZeros (rC ht) (scaledZeta t) := hZclosed.isOpen_compl.mem_nhds hw₀notmem have hB_eq : Cf (rC ht) (scaledZeta t) =ᶠ[𝓝 w₀] fun w => scaledZeta t w / collProd ht w := by filter_upwards [hEv1] with w hw1 exact Cf_eq_div_collProd ht hw1 ``` Hmm — hset: x ∈ SetOfZeros ⟺ x ∈ ↑collZeros: Finset.mem_coe : a ∈ ↑s ↔ a ∈ s ✓; mem_collZeros : x ∈ collZeros ht ↔ ‖x‖ ≤ rC ∧ F x = 0; and x ∈ SetOfZeros (rC ht) F ⟺ ... defeq to the ∧ — the Iff: ext x; goal x ∈ SetOfZeros rC F ↔ x ∈ ↑(collZeros ht): rw [Finset.mem_coe, mem_collZeros ht]: goal x ∈ SetOfZeros rC F ↔ ‖x‖ ≤ rC ht ∧ scaledZeta t x = 0: exact Iff.rfl (defeq ✓ hopefully). Add `exact Iff.rfl`. Since rw leaves the goal — if it's Iff.rfl-closed, rw auto-closes? rw closes goals that become rfl — an Iff that's defeq-true: Iff.rfl — rw tries rfl after rewriting ✓ maybe. Add explicit `· exact Iff.rfl` hmm ext gives one goal. Write: ```lean have hset : SetOfZeros (rC ht) (scaledZeta t) = ↑(collZeros ht) := by ext x rw [Finset.mem_coe, mem_collZeros ht] exact Iff.rfl ``` Hmm — `Set.Finite.mem_toFinset`-based mem_collZeros... mem_collZeros ht : w ∈ collZeros ht ↔ ‖w‖ ≤ rC ht ∧ scaledZeta t w = 0 ✓. And x ∈ SetOfZeros (rC ht) (scaledZeta t) — unfolds to the same ∧ ✓ Iff.rfl should work (SetOfZeros is a def with setOf; membership reducible? `SetOfZeros R f : Set ℂ := {ρ : ℂ | ‖ρ‖ ≤ R ∧ f ρ = 0}` — x ∈ {ρ | p ρ} ≡ p x by defeq of Set membership on setOf ✓ Iff.rfl works up to defeq — Iff.rfl : Iff a a — needs the two sides defeq ✓). IsClosed → compl open → mem_nhds: `IsOpen.mem_nhds (hs : IsOpen s) (ha : a ∈ s) : s ∈ 𝓝 a` ✓; the ∀ᶠ form: hZclosed.isOpen_compl : IsClosed S → IsOpen Sᶜ ✓ .mem_nhds (hw₀notmem : w₀ ∈ Sᶜ ⟺ w₀ ∉ S ✓ defeq) : Sᶜ ∈ 𝓝 w₀ — and ∀ᶠ w in 𝓝 w₀, w ∉ S ⟺ Sᶜ ∈ 𝓝 w₀: `Filter.Eventually` def: ∀ᶠ x in l, p x ⟺ {x | p x} ∈ l — the set {x | x ∉ S} vs Sᶜ: defeq (compl is {x | x ∉ s})... `mem_compl_iff`? The eventually predicate w ∉ S — {x | x ∉ S} = Sᶜ definitionally ✓. The term hZclosed.isOpen_compl.mem_nhds hw₀notmem : Sᶜ ∈ 𝓝 w₀; the target ∀ᶠ w in 𝓝 w₀, w ∉ SetOfZeros... — these are defeq but the elaborator needs to see it — might work directly; if not: `exact hZclosed.isOpen_compl.mem_nhds hw₀notmem` after `show SetOfZeros (rC ht) (scaledZeta t)ᶜ ∈ 𝓝 w₀`? Or use `Filter.eventually_iff_exists_mem`... Let me preemptively use a robust form: ```lean have hEv1 : ∀ᶠ w in 𝓝 w₀, w ∉ SetOfZeros (rC ht) (scaledZeta t) := by exact hZclosed.isOpen_compl.mem_nhds hw₀notmem ``` if that fails: ```lean apply Filter.eventually_iff_exists_mem.mpr exact ⟨_, hZclosed.isOpen_compl.mem_nhds hw₀notmem, fun x hx => hx⟩ ``` hmm — eventually_iff_exists_mem : (∀ᶠ x in l, p x) ↔ ∃ s ∈ l, ∀ x ∈ s, p x. The set Sᶜ ∈ 𝓝 w₀ with ∀ x ∈ Sᶜ, x ∉ S ✓. I'll try the direct first. Continuing the main proof — the logDeriv identities: ```lean have hF_an : AnalyticAt ℂ (scaledZeta t) w₀ := scaledZeta_analytic ht w₀ (by rw [Metric.mem_closedBall, dist_zero_right] exact hw₀norm.trans (by norm_num)) have hP_an : AnalyticAt ℂ (collProd ht) w₀ := analyticAt_finset_prod_sub_pow _ _ _ have hP_ne : collProd ht w₀ ≠ 0 := by unfold collProd apply Finset.prod_ne_zero_iff.mpr intro ρ hρ have hρ0 : scaledZeta t ρ = 0 := ((mem_collZeros ht).mp hρ).2 exact pow_ne_zero _ (sub_ne_zero.mpr (fun h => hFw₀ (by rw [h]; exact hρ0))) have hlogB : logDeriv (fun w => scaledZeta t w / collProd ht w) w₀ = logDeriv (scaledZeta t) w₀ - logDeriv (collProd ht) w₀ := logDeriv_div w₀ hFw₀ hP_ne hF_an.differentiableAt hP_an.differentiableAt ``` collProd ht as a function of w — collProd ht w₀: the def collProd {t} (ht) (w) — as a function `collProd ht` ✓. analyticAt_finset_prod_sub_pow (s : Finset ℂ) (g : ℂ → ℕ) (w : ℂ) : AnalyticAt ℂ (fun z => ∏ ρ ∈ s, (z − ρ) ^ g ρ) w — collProd ht w := ∏ ρ ∈ collZeros ht, (w − ρ)^analyticOrderNatAt (scaledZeta t) ρ ✓ matches with g := fun ρ => analyticOrderNatAt (scaledZeta t) ρ — `analyticAt_finset_prod_sub_pow _ _ _` unifies ✓ (maybe needs show/unfold — collProd ht is the def; AnalyticAt ℂ (collProd ht) w₀ vs AnalyticAt ℂ (fun z => ∏ ...) w₀: defeq via delta ✓ exact should accept. If not: `exact analyticAt_finset_prod_sub_pow (collZeros ht) _ w₀` with a show.) hlogF: ```lean have hsne1 : s ≠ 1 := by intro h1 rw [h1, Complex.one_im] at hsim rw [← hsim, abs_zero] at ht norm_num at ht have hζs_diff : DifferentiableAt ℂ riemannZeta s := (analyticAt_riemannZeta_of_ne_one hsne1).differentiableAt have hζs_diff' : DifferentiableAt ℂ riemannZeta (discCenter t + (5 / 2 : ℂ) * w₀) := haff.symm ▸ hζs_diff have haff_diff : DifferentiableAt ℂ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀ := by fun_prop have hderiv_aff : deriv (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀ = 5 / 2 := by have h1 : (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) = fun w => (5 / 2 : ℂ) * w + discCenter t := funext fun w => by ring rw [h1] have hh : HasDerivAt (fun w : ℂ => (5 / 2 : ℂ) * w + discCenter t) ((5 / 2 : ℂ) * 1) w₀ := ((hasDerivAt_id w₀).const_mul (5 / 2 : ℂ)).add_const _ exact hh.deriv.trans (by ring) have hlogF : logDeriv (scaledZeta t) w₀ = (5 / 2 : ℂ) * logDeriv riemannZeta s := by have hFeq : scaledZeta t = fun w : ℂ => (riemannZeta ∘ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w)) w / riemannZeta (discCenter t) := funext fun w => rfl rw [hFeq] have hga : (riemannZeta ∘ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w)) w₀ ≠ 0 := by rw [Function.comp_apply, haff] exact hs0 rw [logDeriv_div w₀ hga hζs0 (hζs_diff'.comp w₀ haff_diff) (differentiableAt_const _)] have hlogconst : logDeriv (fun _ : ℂ => riemannZeta (discCenter t)) w₀ = 0 := by rw [logDeriv_apply, deriv_const, zero_div] have hlogcomp : logDeriv (riemannZeta ∘ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w)) w₀ = logDeriv riemannZeta ((fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀) * deriv (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀ := logDeriv_comp hζs_diff' haff_diff rw [hlogcomp, hlogconst, sub_zero, hderiv_aff] show logDeriv riemannZeta (discCenter t + (5 / 2 : ℂ) * w₀) * (5 / 2 : ℂ) = _ rw [haff] ring ``` Issues: - hlogcomp's statement — logDeriv_comp : logDeriv (f ∘ g) x = logDeriv f (g x) * deriv g x ✓ with f := riemannZeta, g := the affine lambda. hζs_diff' : DifferentiableAt ℂ riemannZeta (discCenter t + (5/2)*w₀) — needed: DifferentiableAt ℂ f (g w₀) where g w₀ = (fun w => ...) w₀ ≡ discCenter t + (5/2)*w₀ — defeq beta ✓ should unify. - After rw [hFeq], goal: logDeriv (fun w => (ζ∘aff) w / c) w₀ = (5/2)*logDeriv ζ s. logDeriv_div w₀ hga hζs0 hdf hdg : logDeriv (fun z => f z / g z) w₀ = logDeriv f w₀ − logDeriv g w₀ with f := (ζ∘aff), g := fun _ => c ✓. rw transforms goal to logDeriv (ζ∘aff) w₀ − logDeriv (fun _ => c) w₀ = (5/2)*logDeriv ζ s ✓ then rw [hlogcomp, hlogconst, sub_zero, hderiv_aff]: goal logDeriv ζ ((fun w => ...) w₀) * (5/2) = (5/2)*logDeriv ζ s — the ((fun w => ...) w₀) is a beta-redex — `show ... (discCenter t + (5/2)*w₀) ...` via defeq ✓ then rw [haff] → logDeriv ζ s * (5/2) = (5/2)*logDeriv ζ s: ring ✓. Wait — hderiv_aff's hh: ((hasDerivAt_id w₀).const_mul (5/2)) : HasDerivAt (fun x => (5/2)*id x) ((5/2)*1) w₀?? HasDerivAt.const_mul (c : 𝕜) (h : HasDerivAt f f' x) : HasDerivAt (fun x => c * f x) (c * f') x — signature order: `HasDerivAt.const_mul (c) (hf)` or (hf).const_mul c — dot: (hasDerivAt_id w₀).const_mul (5/2:ℂ) : HasDerivAt (fun x => (5/2) * id x) ((5/2)*1) w₀ — hmm const_mul's function: fun x => c * f x with f := id: fun x => (5/2) * id x — vs our (fun w => (5/2)*w + c')... .add_const _ : HasDerivAt (fun x => (5/2) * id x + discCenter t) ((5/2)*1) w₀ — the lambda (fun x => (5/2)*id x + c) vs goal (fun w => (5/2)*w + c): id x vs x — defeq but hh.deriv : deriv (fun x => (5/2)*id x + c) w₀ = (5/2)*1 — the goal after rw [h1]: deriv (fun w => (5/2)*w + discCenter t) w₀ = 5/2: hh.deriv's type mentions id x — exact hh.deriv.trans (by ring) — the deriv-application: deriv (fun x => (5/2)*id x + discCenter t) w₀ vs goal's deriv (fun w => (5/2)*w + discCenter t) w₀ — defeq (id x ≡ x) — .trans's unification uses defeq ✓ probably fine. If problems: `hasDerivAt_id'` variant. Let me preempt: does `hasDerivAt_id'` exist? Hmm. Alternative safe route: ```lean have hh : HasDerivAt (fun w : ℂ => (5 / 2 : ℂ) * w + discCenter t) ((5 / 2 : ℂ) * 1) w₀ := by apply HasDerivAt.add_const exact HasDerivAt.const_mul (5 / 2 : ℂ) (hasDerivAt_id w₀) ``` same lambda issue. You know what — hasDerivAt_id w₀ : HasDerivAt id 1 w₀. There might also be `hasDerivAt_id'` : HasDerivAt (fun x => x) 1 x — I'm not sure. Let me just try and fix at compile. - The hFeq funext rfl: scaledZeta t w = riemannZeta (discCenter t + (5/2)*w) / riemannZeta (discCenter t) (by def unfold) vs (ζ∘aff) w / c = ζ(aff w)/c where aff w := discCenter t + (5/2)*w ✓ defeq ✓ rfl works (funext fun w => rfl — rfl at each w: scaledZeta t w ≡ (ζ∘aff) w / c — delta scaledZeta + beta comp ✓). hlogP: ```lean have hlogP : logDeriv (collProd ht) w₀ = ∑ ρ ∈ collZeros ht, (analyticOrderNatAt (scaledZeta t) ρ : ℂ) / (w₀ - ρ) := by unfold collProd rw [logDeriv_prod (fun ρ hρ => pow_ne_zero _ (sub_ne_zero.mpr (fun h => hFw₀ (by rw [h]; exact ((mem_collZeros ht).mp hρ).2)))) (fun ρ hρ => ((analyticAt_id.sub analyticAt_const).pow _).differentiableAt)] apply Finset.sum_congr rfl intro ρ hρ rw [logDeriv_fun_pow (differentiableAt_id.sub (differentiableAt_const _))] rw [logDeriv_apply] have hd : deriv (fun w : ℂ => w - ρ) w₀ = 1 := by rw [deriv_sub_const] exact deriv_id'' w₀ -- name check rw [hd, mul_one_div] ``` Concern spots: logDeriv_prod with the function `(∏ i ∈ s, f i ·)` — after unfold collProd the goal's function: fun w => ∏ ρ ∈ collZeros ht, (w − ρ) ^ analyticOrderNatAt (scaledZeta t) ρ. The lemma LHS: logDeriv (∏ i ∈ s, f i ·) x — note `(∏ i ∈ s, f i ·)` IS `fun x => ∏ i ∈ s, f i x`?? The notation ∏ i ∈ s, f i where f i is applied to the · placeholder... `(∏ i ∈ s, f i ·)` elaborates to fun x => ∏ i ∈ s, f i x ✓. rw unification: f := fun ρ w => (w − ρ)^order_ρ — should match. Hmm — actually wait: logDeriv_prod's hf : ∀ i ∈ s, f i x ≠ 0 — my lambda `fun ρ hρ => pow_ne_zero _ (...)` : ∀ ρ ∈ s, ((w₀ − ρ)^order_ρ) ≠ 0 ✓ with f ρ w₀ = (w₀−ρ)^order — f ρ := fun w => (w−ρ)^order_ρ ✓. And hd : ∀ i ∈ s, DifferentiableAt 𝕜 (f i) x: f ρ = fun w => (w−ρ)^order: DifferentiableAt: (analyticAt_id.sub analyticAt_const).pow _ : AnalyticAt ℂ (fun w => (w−ρ)^order) w₀ — analyticAt_id.sub analyticAt_const : AnalyticAt ℂ (id − fun _ => ρ)?? AnalyticAt.sub : AnalyticAt f → AnalyticAt g → AnalyticAt (f − g) — id − const: fun w => id w − ρ = fun w => w − ρ ✓ defeq-ish; .pow _ : AnalyticAt ((id−const)^order) hmm — AnalyticAt.pow : AnalyticAt f → (n) → AnalyticAt (f ^ n) — (f ^ n) w = (f w)^n ✓. The target DifferentiableAt ℂ (fun w => (w−ρ)^order) w₀ — from AnalyticAt ℂ ((fun w => w−ρ)^order)... — hmm (f ^ n) as function: (f^n) w = (f w)^n — Pi.pow_apply — vs fun w => (w−ρ)^order — defeq ✓ .differentiableAt ✓. Risk of mismatch — compile will tell. deriv_sub_const: check existence — `deriv_sub_const (c : F) : deriv (fun x => f x − c) x = deriv f x`? If it exists: rw gives deriv (fun w => w) w₀... then deriv_id'' hmm — `deriv_id'' : deriv id x = 1`? hmm deriv_id' might be `deriv id = fun _ => 1`. Let me hedge: `simp [deriv_sub_const]` or use `((hasDerivAt_id w₀).sub_const ρ).deriv` — with the id-vs-lambda issue... HasDerivAt.sub_const (c) : HasDerivAt (fun x => f x − c) f' x — with f := id: (fun x => id x − ρ) — displays as (fun x => x − ρ)? `id x` — the TERM is id applied — but hasDerivAt_id w₀'s f is `id` — so sub_const gives fun x => id x − ρ. deriv of that = 1 − 0 = 1... .deriv : deriv (fun x => id x − ρ) w₀ = 1. Our goal: deriv (fun w : ℂ => w − ρ) w₀ = 1. The lambdas fun x => id x − ρ and fun w => w − ρ are defeq (id x ≡ x) but rw-matching fails. Use `show` to bridge: `show deriv (fun w : ℂ => id w - ρ) w₀ = 1` — defeq ✓ then exact ((hasDerivAt_id w₀).sub_const ρ).deriv — the value: sub_const keeps f' = 1 ✓ (HasDerivAt.sub_const : HasDerivAt f f' x → (c) → HasDerivAt (fun x => f x − c) f' x — value UNCHANGED f' = 1 ✓ so .deriv : deriv ... = 1 ✓). Hmm wait — does HasDerivAt.sub_const exist with that exact behavior? journal-011 gotcha: "HasDerivAt.add_const adds to VALUE (use .comp for precomposition)" — that was about a DIFFERENT thing (they wanted precomposition f(x+c) but add_const gives f(x)+c). For me: `HasDerivAt.add_const (h : HasDerivAt f f' x) (c : F) : HasDerivAt (fun y => f y + c) f' y` ✓ exists. sub_const analog: `HasDerivAt.sub_const (h : HasDerivAt f f' x) (c : F) : HasDerivAt (fun y => f y − c) f' y`? hmm — maybe not existing; add_const with −c... Let me use: (hasDerivAt_id w₀).add_const (−ρ) : HasDerivAt (fun x => id x + (−ρ)) 1 w₀ — fun x => id x + (−ρ) vs fun w => w − ρ: + (−ρ) vs − ρ: defeq (sub = add neg ✓ via sub_eq_add_neg — defeq? sub_eq_add_neg is a theorem (a − b = a + −b) — in a division ring, a − b is DEFINED as a + −b ✓ defeq (SubNegMonoid: sub a b := a + -b ✓ definitional)). So: ```lean have hd : deriv (fun w : ℂ => w - ρ) w₀ = 1 := by show deriv (fun w : ℂ => id w + -ρ) w₀ = 1 exact ((hasDerivAt_id w₀).add_const (-ρ)).deriv ``` Hmm the show: deriv (fun w => w − ρ) w₀ vs deriv (fun w => id w + −ρ) w₀ — defeq: id w ≡ w ✓, w − ρ ≡ w + −ρ ✓ (definitional) — show should accept. If fussy: alternative `by simp [deriv_sub_const]`? — deriv_sub_const might not exist; `by fun_prop`-no that's for differentiability. Another robust: `by rw [deriv_sub_const (f := fun w : ℂ => w) (x := w₀) (c := ρ)]; exact deriv_id'' w₀`? — deriv_id'' hmm. Actually I recall clearly now: Mathlib has `deriv_id'' : deriv id = fun _ => 1`?? and `deriv_id' : deriv id x = 1`?? Let me check quickly via grep rather than guessing — I'll grep both deriv_sub_const and deriv_id names before writing. Also `hasDerivAt_id`. Let me do that grep now, plus HasDerivAt.add_const/sub_const, Real.log_le_log signature, norm_sum_le, Finset.sum_sdiff, RCLike.norm_natCast/Complex.norm_natCast.
All §10 compiles. Before writing the main theorem, verifying the exact names I'll need.
tool: Bash
input
{
  "command": "cd \"D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib\" && grep -rn \"theorem deriv_sub_const\\|theorem deriv_id'\\|lemma deriv_id'\\|theorem deriv_id''\" Mathlib/Analysis/Calculus/Deriv/*.lean 2>/dev/null | head -6; echo ---; grep -rn \"theorem HasDerivAt.add_const \\|theorem HasDerivAt.sub_const \" Mathlib/Analysis/Calculus/Deriv/Add.lean Mathlib/Analysis/Calculus/FDeriv/*.lean 2>/dev/null | head -4; echo ---; grep -rn \"theorem log_le_log \\|lemma log_le_log \\|theorem Real.log_le_log \" Mathlib/Analysis/SpecialFunctions/Log/Basic.lean | head -4; echo ---; grep -rn \"theorem norm_sum_le\\b\\|lemma norm_sum_le\\b\" Mathlib/Analysis/ -r 2>/dev/null | head -3; echo ---; grep -rn \"theorem sum_sdiff\\b\" Mathlib/Algebra/BigOperators/ -r 2>/dev/null | head -3; echo ---; grep -rn \"norm_natCast\" Mathlib/Analysis/RCLike/Basic.lean | head -3",
  "description": "Verify exact lemma names for the main theorem"
}
raw content_json (database row)
[{"type":"thinking","thinking":"All of §10 compiles now. Update todos and write the main theorem (§11). This is the big one. Let me write it carefully in one edit, following my detailed plan. I'll be extra careful with:\n\n- w₀ setup\n- F w₀ ≠ 0\n- EventuallyEq B = F/P\n- logDeriv computations\n- J_B obtain + bounds\n- the algebra\n- the fold\n\nLet me write it now. I'll keep `set` usage minimal (only w₀ and Mbound).\n\nOne thing to double check — hJderiv's membership condition: hJderiv : ∀ z ∈ Metric.closedBall 0 (3/5), (deriv J_B) z = (deriv B) z / B z — from LogOfAnalyticFunction's third component `(∀ z ∈ Metric.closedBall 0 r, (deriv J_B) z = (deriv B) z / (B z))` with r := 3/5 ✓.\n\nFor the extras bound I need the pieces from the plan. Let me write the extras bound as a standalone lemma to reduce the main proof's size:\n\n```lean\ntheorem sdiff_sum_norm_le {t : ℝ} (ht : 10 ≤ |t|) {s : ℂ} (hsim : s.im = t) :\n    ‖∑ ρ ∈ (collZeros ht).image (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) \\ nearZeros t,\n        (zeroMult ρ : ℂ) / (s - ρ)‖\n      ≤ Real.log ((9 / 4) * |t| ^ 2) / Real.log (33 / 32) := by\n  classical\n  set img := (collZeros ht).image (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) with himg\n  calc ‖∑ ρ ∈ img \\ nearZeros t, (zeroMult ρ : ℂ) / (s - ρ)‖\n      ≤ ∑ ρ ∈ img \\ nearZeros t, ‖(zeroMult ρ : ℂ) / (s - ρ)‖ := norm_sum_le _ _\n    _ ≤ ∑ ρ ∈ img \\ nearZeros t, (zeroMult ρ : ℝ) := by\n        apply Finset.sum_le_sum\n        intro ρ hρ\n        have hρimg : ρ ∈ img := (Finset.mem_sdiff.mp hρ).1\n        have hρnotnear : ρ ∉ nearZeros t := (Finset.mem_sdiff.mp hρ).2\n        obtain ⟨w, hw, rfl⟩ := Finset.mem_image.mp hρimg\n        -- ρ = s₀ + (5/2)w, w collected\n        have hρdisc : discCenter t + (5 / 2 : ℂ) * w ∈ zeroDiscFinset t := by\n          rw [mem_zeroDiscFinset]\n          constructor\n          · rw [Metric.mem_closedBall, Complex.dist_eq, add_sub_cancel_left, norm_mul]\n            have h25 : ‖(5 / 2 : ℂ)‖ = 5 / 2 := by\n              rw [show (5 / 2 : ℂ) = ((5 / 2 : ℝ) : ℂ) by norm_num, Complex.norm_real,\n                Real.norm_eq_abs, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 5 / 2)]\n            rw [h25]\n            have hwle := ((mem_collZeros ht).mp hw).1\n            calc (5 / 2 : ℝ) * ‖w‖ ≤ (5 / 2) * rC ht :=\n                  mul_le_mul_of_nonneg_left hwle (by norm_num)\n              _ = collRadius ht := by unfold rC; ring\n              _ ≤ 5 / 2 := (collRadius_le ht).trans (by norm_num)\n          · have hFw : scaledZeta t w = 0 := ((mem_collZeros ht).mp hw).2\n            unfold scaledZeta at hFw\n            exact (div_eq_zero_iff.mp hFw).resolve_right (fun h0 => by\n              have h := RvM.zeta_lower_bound_two t\n              rw [← show discCenter t = 2 + t * Complex.I from rfl, h0, norm_zero] at h\n              norm_num at h)\n        have himge : 1 ≤ |(discCenter t + (5 / 2 : ℂ) * w).im - t| := by\n          by_contra h\n          push Not at h\n          exact hρnotnear (mem_nearZeros.mpr ⟨hρdisc, h⟩)\n        -- ‖s − ρ‖ ≥ |im(s−ρ)| = |t − im(aff w)| ≥ 1\n        have hsnorm : (1:ℝ) ≤ ‖s - (discCenter t + (5 / 2 : ℂ) * w)‖ := by\n          have h1 : |s.im - (discCenter t + (5 / 2 : ℂ) * w).im| ≤\n              ‖s - (discCenter t + (5 / 2 : ℂ) * w)‖ := abs_im_le_norm _\n          rw [hsim, abs_sub_comm] at h1\n          linarith\n        rw [norm_div, RCLike.norm_natCast]  -- hmm: ‖(m:ℂ)‖ = (m:ℝ): Complex.norm_natCast? \n        rw [← div_one ((zeroMult (discCenter t + (5 / 2 : ℂ) * w) : ℝ))]\n        rw [div_le_div_iff₀ (zero_lt_one.trans_le hsnorm) one_pos]\n        exact mul_le_mul_of_nonneg_left hsnorm (Nat.cast_nonneg _)\n    _ ≤ ∑ ρ ∈ img, (zeroMult ρ : ℝ) :=\n        Finset.sum_le_sum_of_subset_of_nonneg Finset.sdiff_subset (fun i _ _ => Nat.cast_nonneg _)\n    _ ≤ Real.log ((9 / 4) * |t| ^ 2) / Real.log (33 / 32) := sum_image_zeroMult_le ht\n```\n\nIssues:\n- After obtain ⟨w, hw, rfl⟩: ρ is replaced by the aff expression. The sum's integrand (zeroMult ρ : ℂ)/(s − ρ) becomes (zeroMult (s₀+(5/2)w) : ℂ)/(s − (s₀+(5/2)w)) ✓.\n- ‖(m:ℂ)‖: norm_natCast — the name: `Complex.norm_natCast : ‖(n : ℂ)‖ = n`? or `RCLike.norm_natCast : ‖(n : 𝕜)‖ = n` ✓ RCLike.norm_natCast exists (𝕜 := ℂ via RCLike ℂ). Try Complex.norm_natCast first... In this Mathlib: `RCLike.norm_natCast` I think. Or `Complex.norm_natCast`. Use whichever; fallback `by exact_mod_cast` hmm. There's `Complex.norm_natCast (n : ℕ) : ‖(n : ℂ)‖ = n`? hmm might be `norm_natCast` via `RCLike`. I'll write `RCLike.norm_natCast` — if unknown, switch to `Complex.norm_natCast`. Actually the sum_le_sum goal: ‖(m:ℂ)/(s−ρ)‖ ≤ (m:ℝ): rw [norm_div]: ‖(m:ℂ)‖/‖s−ρ‖ ≤ m: rw [norm_natCast-something]: (m:ℝ)/‖s−ρ‖ ≤ m. Hmm — ‖(m : ℂ)‖ = |(m : ℝ)| via Complex.norm_real? (m:ℂ) = ((m:ℝ):ℂ) via Nat.cast... `Complex.norm_real : ‖(r : ℂ)‖ = |r|` — with (↑m : ℂ) = ((↑m : ℝ) : ℂ): push_cast or `Complex.norm_natCast` direct. Let me use: rw [norm_div, Complex.norm_natCast] and if that fails try RCLike.norm_natCast. Since m : ℕ cast to ℂ — there IS `RCLike.norm_natCast (n : ℕ) : ‖(n : 𝕜)‖ = n`? hmm. In Mathlib 2025: `RCLike.norm_natCast : ‖(n : 𝕜)‖ = n` ✓ I'm fairly confident. Fallback chain available.\n- Wait — the target of the rw [norm_div, ...] is ‖(m:ℂ)/(s−ρ)‖ ≤ (m:ℝ) — hmm the sum's per-term: Finset.sum_le_sum's goal: ‖(m:ℂ)/(s−ρ)‖ ≤ (m:ℝ) hmm the RHS (zeroMult (s₀+(5/2)w) : ℝ) — the cast — fine.\n\nAlso — `div_le_div_iff₀ (zero_lt_one.trans_le hsnorm) one_pos` : (m:ℝ)/‖s−ρ‖ ≤ (m:ℝ)/1 ⟺ m*1 ≤ m*‖s−ρ‖: after the ← div_one rw, goal: m/‖s−ρ‖ ≤ m/1 ✓ then iff: m*1 ≤ m*‖s−ρ‖ — exact mul_le_mul_of_nonneg_left hsnorm (Nat.cast_nonneg _) : m*1 ≤ m*‖s−ρ‖ ✓ (form a*b ≤ a*c with a := m hmm: mul_le_mul_of_nonneg_left (h : b ≤ c) (ha : 0 ≤ a) : a*b ≤ a*c — b := 1, c := ‖s−ρ‖, a := m: m*1 ≤ m*‖s−ρ‖ ✓ EXACT). But the iff gives goal m*1 ≤ m*‖s−ρ‖ — exactly ✓.\n\nHmm — `zero_lt_one.trans_le hsnorm` : 0 < 1 → 1 ≤ ‖s−ρ‖ → 0 < ‖s−ρ‖ ✓ (LT.lt.trans_le).\n\n- hsnorm's proof: |s.im − (aff w).im| ≤ ‖s − aff w‖: abs_im_le_norm (s − aff w) : |(s − aff w).im| ≤ ‖s − aff w‖ — (s − aff w).im = s.im − (aff w).im (sub_im) — is abs_im_le_norm's statement about z.im? `Complex.abs_im_le_norm (z : ℂ) : |z.im| ≤ ‖z‖` ✓; applied to z := s − aff w: |(s − aff w).im| — the goal-form |s.im − (aff w).im| — need sub_im rewrite: rw [sub_im] at... Let me write:\n```lean\n        have hsnorm : (1:ℝ) ≤ ‖s - (discCenter t + (5 / 2 : ℂ) * w)‖ := by\n          have h1 := abs_im_le_norm (s - (discCenter t + (5 / 2 : ℂ) * w))\n          rw [sub_im, hsim] at h1\n          rw [abs_sub_comm] at h1\n          linarith\n```\nh1 : |(s − affw).im| ≤ ‖s − affw‖; rw [sub_im] at h1: |s.im − (affw).im| ≤ ...; hsim: s.im = t: |t − (affw).im| ≤ ...; abs_sub_comm : |t − (affw).im| = |(affw).im − t|: rw: |(affw).im − t| ≤ ‖...‖; linarith [h1, himge]: himge : 1 ≤ |(affw).im − t| ✓ ⟹ 1 ≤ ‖...‖ ✓ linarith ✓.\n\nHmm — abs_sub_comm : |a − b| = |b − a| ✓.\n\n- hρdisc's second component: ζ(aff w) = 0: from hFw : scaledZeta t w = 0 — unfold scaledZeta at hFw: ζ(s₀+(5/2)w)/ζ(s₀) = 0 — div_eq_zero_iff.mp : a/b = 0 ↔ a = 0 ∨ b = 0 — .resolve_right (ζ(s₀) ≠ 0) : ζ(aff w) = 0 ✓. But — mem_zeroDiscFinset's second component needs `riemannZeta ρ = 0` with ρ := s₀+(5/2)w ✓ after the rfl-subst ✓.\n\nWait — the div_eq_zero_iff resolve: div_eq_zero_iff : a / b = 0 ↔ a = 0 ∨ b = 0 — is it `div_eq_zero_iff : a / b = 0 ↔ a = 0 ∨ b = 0` ✓ (GroupWithZero). .mp hFw : ζ(aff w) = 0 ∨ ζ(s₀) = 0; .resolve_right (h : ζ(s₀) ≠ 0) : ζ(aff w) = 0 ✓.\n\nAlso note the dist_eq: Complex.dist_eq : dist a b = ‖a − b‖ ✓; goal dist ρ s₀ ≤ 5/2 with ρ := aff w: dist (s₀+(5/2)w) s₀ = ‖(s₀+(5/2)w) − s₀‖ = ‖(5/2)w‖: add_sub_cancel_left : a + b − a = b ✓ pattern (s₀ + (5/2)w) − s₀ ✓.\n\nAlso in the calc: (5/2)*‖w‖ ≤ (5/2)*rC ht ✓; = collRadius ht: rC ht = collRadius ht * (2/5) — (5/2)*rC = (5/2)(collRadius·(2/5)) = collRadius: `unfold rC; ring` — the goal (5/2)*rC ht = collRadius ht: unfold rC: (5/2)*(collRadius ht*(2/5)) = collRadius ht: ring ✓ — wait I wrote the calc step as `_ = collRadius ht := by unfold rC; ring` — the step is (5/2)*rC ht = collRadius ht ✓. Then collRadius ht ≤ 5/2: collRadius_le : ≤ 24/10 = 2.4 ≤ 2.5 ✓ .trans (by norm_num) ✓.\n\nNow the MAIN theorem. Let me also handle: nearZeros_subset_image gives nearZeros ⊆ img where img = (collZeros ht).image aff — with `classical` for the image decidability. Finset.sum_sdiff (h : s₁ ⊆ s₂) : (∑ i ∈ s₂ \\ s₁, f i) + ∑ i ∈ s₁, f i = ∑ i ∈ s₂, f i ✓.\n\nMain theorem statement:\n\n```lean\n/-- **The loose Davenport-disc R-bound** (ii′-5c, D-067 §6): on\nσ ∈ [1/2, 7/2], |t| ≥ 10, the log-derivative of ζ minus its near-zero\nsum is O((log|t|)²) with the deliberately loose constant 100000. This is\nthe GROWTH INPUT for the partial-fraction identity (ii′-5e); the tight\nconstants come from the identity's analysis (ii′-5f). -/\ntheorem logDeriv_riemannZeta_sub_nearZeros_le {t : ℝ} (ht : 10 ≤ |t|) {s : ℂ}\n    (hsim : s.im = t) (hσlo : 1 / 2 ≤ s.re) (hσhi : s.re ≤ 7 / 2)\n    (hs0 : riemannZeta s ≠ 0) :\n    ‖logDeriv riemannZeta s - ∑ ρ ∈ nearZeros t, (zeroMult ρ : ℂ) / (s - ρ)‖\n      ≤ 100000 * (Real.log |t|) ^ 2 := by\n```\n\nNow the body. Full assembly per plan. Let me write it all.\n\n```lean\n  classical\n  -- the application point in the w-coordinate\n  set w₀ : ℂ := (2 / 5 : ℂ) * (s - discCenter t) with hw₀def\n  have haff : discCenter t + (5 / 2 : ℂ) * w₀ = s := by rw [hw₀def]; ring\n  have hw₀norm : ‖w₀‖ ≤ 3 / 5 := by\n    have hsnorm : ‖s - discCenter t‖ = |s.re - 2| := by\n      have heq : s - discCenter t = ((s.re - 2 : ℝ) : ℂ) := by\n        apply Complex.ext_iff.mpr\n        constructor\n        · simp [discCenter, sub_re, add_re, mul_re, ofReal_re, ofReal_im, I_re, I_im]\n        · simp [discCenter, sub_im, add_im, mul_im, ofReal_re, ofReal_im, I_re, I_im, hsim]\n      rw [heq, Complex.norm_real, Real.norm_eq_abs]\n    have h25 : ‖(2 / 5 : ℂ)‖ = 2 / 5 := by\n      rw [show (2 / 5 : ℂ) = ((2 / 5 : ℝ) : ℂ) by norm_num, Complex.norm_real,\n        Real.norm_eq_abs, abs_of_nonneg (by norm_num : (0:ℝ) ≤ 2 / 5)]\n    rw [hw₀def, norm_mul, h25, hsnorm]\n    have hσ : |s.re - 2| ≤ 3 / 2 := by\n      rw [abs_le]\n      constructor <;> linarith\n    calc (2 / 5 : ℝ) * |s.re - 2| ≤ (2 / 5) * (3 / 2) :=\n          mul_le_mul_of_nonneg_left hσ (by norm_num)\n      _ = 3 / 5 := by norm_num\n  -- F and its nonvanishing at w₀\n  have hζs0 : riemannZeta (discCenter t) ≠ 0 := by\n    have h := RvM.zeta_lower_bound_two t\n    intro h0\n    rw [← show discCenter t = 2 + t * Complex.I from rfl, h0, norm_zero] at h\n    norm_num at h\n  have hFw₀ : scaledZeta t w₀ ≠ 0 := by\n    unfold scaledZeta\n    rw [haff]\n    exact div_ne_zero hs0 hζs0\n  have hw₀notmem : w₀ ∉ SetOfZeros (rC ht) (scaledZeta t) := fun h => hFw₀ h.2\n  -- B =ᶠ F/P near w₀\n  have hZclosed : IsClosed (SetOfZeros (rC ht) (scaledZeta t)) := by\n    have hset : SetOfZeros (rC ht) (scaledZeta t) = ↑(collZeros ht) := by\n      ext x\n      rw [Finset.mem_coe, mem_collZeros ht]\n    rw [hset]\n    exact (collZeros ht).finite_toSet.isClosed\n  have hEv1 : ∀ᶠ w in 𝓝 w₀, w ∉ SetOfZeros (rC ht) (scaledZeta t) :=\n    hZclosed.isOpen_compl.mem_nhds hw₀notmem\n  have hB_eq : Cf (rC ht) (scaledZeta t) =ᶠ[𝓝 w₀]\n      fun w => scaledZeta t w / collProd ht w := by\n    filter_upwards [hEv1] with w hw1\n    exact Cf_eq_div_collProd ht hw1\n```\nHmm — hset: x ∈ SetOfZeros ⟺ x ∈ ↑collZeros: Finset.mem_coe : a ∈ ↑s ↔ a ∈ s ✓; mem_collZeros : x ∈ collZeros ht ↔ ‖x‖ ≤ rC ∧ F x = 0; and x ∈ SetOfZeros (rC ht) F ⟺ ... defeq to the ∧ — the Iff: ext x; goal x ∈ SetOfZeros rC F ↔ x ∈ ↑(collZeros ht): rw [Finset.mem_coe, mem_collZeros ht]: goal x ∈ SetOfZeros rC F ↔ ‖x‖ ≤ rC ht ∧ scaledZeta t x = 0: exact Iff.rfl (defeq ✓ hopefully). Add `exact Iff.rfl`. Since rw leaves the goal — if it's Iff.rfl-closed, rw auto-closes? rw closes goals that become rfl — an Iff that's defeq-true: Iff.rfl — rw tries rfl after rewriting ✓ maybe. Add explicit `· exact Iff.rfl` hmm ext gives one goal. Write:\n```lean\n    have hset : SetOfZeros (rC ht) (scaledZeta t) = ↑(collZeros ht) := by\n      ext x\n      rw [Finset.mem_coe, mem_collZeros ht]\n      exact Iff.rfl\n```\nHmm — `Set.Finite.mem_toFinset`-based mem_collZeros... mem_collZeros ht : w ∈ collZeros ht ↔ ‖w‖ ≤ rC ht ∧ scaledZeta t w = 0 ✓. And x ∈ SetOfZeros (rC ht) (scaledZeta t) — unfolds to the same ∧ ✓ Iff.rfl should work (SetOfZeros is a def with setOf; membership reducible? `SetOfZeros R f : Set ℂ := {ρ : ℂ | ‖ρ‖ ≤ R ∧ f ρ = 0}` — x ∈ {ρ | p ρ} ≡ p x by defeq of Set membership on setOf ✓ Iff.rfl works up to defeq — Iff.rfl : Iff a a — needs the two sides defeq ✓).\n\nIsClosed → compl open → mem_nhds: `IsOpen.mem_nhds (hs : IsOpen s) (ha : a ∈ s) : s ∈ 𝓝 a` ✓; the ∀ᶠ form: hZclosed.isOpen_compl : IsClosed S → IsOpen Sᶜ ✓ .mem_nhds (hw₀notmem : w₀ ∈ Sᶜ ⟺ w₀ ∉ S ✓ defeq) : Sᶜ ∈ 𝓝 w₀ — and ∀ᶠ w in 𝓝 w₀, w ∉ S ⟺ Sᶜ ∈ 𝓝 w₀: `Filter.Eventually` def: ∀ᶠ x in l, p x ⟺ {x | p x} ∈ l — the set {x | x ∉ S} vs Sᶜ: defeq (compl is {x | x ∉ s})... `mem_compl_iff`? The eventually predicate w ∉ S — {x | x ∉ S} = Sᶜ definitionally ✓. The term hZclosed.isOpen_compl.mem_nhds hw₀notmem : Sᶜ ∈ 𝓝 w₀; the target ∀ᶠ w in 𝓝 w₀, w ∉ SetOfZeros... — these are defeq but the elaborator needs to see it — might work directly; if not: `exact hZclosed.isOpen_compl.mem_nhds hw₀notmem` after `show SetOfZeros (rC ht) (scaledZeta t)ᶜ ∈ 𝓝 w₀`? Or use `Filter.eventually_iff_exists_mem`... Let me preemptively use a robust form:\n```lean\n  have hEv1 : ∀ᶠ w in 𝓝 w₀, w ∉ SetOfZeros (rC ht) (scaledZeta t) := by\n    exact hZclosed.isOpen_compl.mem_nhds hw₀notmem\n```\nif that fails: \n```lean\n    apply Filter.eventually_iff_exists_mem.mpr\n    exact ⟨_, hZclosed.isOpen_compl.mem_nhds hw₀notmem, fun x hx => hx⟩\n```\nhmm — eventually_iff_exists_mem : (∀ᶠ x in l, p x) ↔ ∃ s ∈ l, ∀ x ∈ s, p x. The set Sᶜ ∈ 𝓝 w₀ with ∀ x ∈ Sᶜ, x ∉ S ✓. I'll try the direct first.\n\nContinuing the main proof — the logDeriv identities:\n\n```lean\n  have hF_an : AnalyticAt ℂ (scaledZeta t) w₀ :=\n    scaledZeta_analytic ht w₀ (by\n      rw [Metric.mem_closedBall, dist_zero_right]\n      exact hw₀norm.trans (by norm_num))\n  have hP_an : AnalyticAt ℂ (collProd ht) w₀ := analyticAt_finset_prod_sub_pow _ _ _\n  have hP_ne : collProd ht w₀ ≠ 0 := by\n    unfold collProd\n    apply Finset.prod_ne_zero_iff.mpr\n    intro ρ hρ\n    have hρ0 : scaledZeta t ρ = 0 := ((mem_collZeros ht).mp hρ).2\n    exact pow_ne_zero _ (sub_ne_zero.mpr (fun h => hFw₀ (by rw [h]; exact hρ0)))\n  have hlogB : logDeriv (fun w => scaledZeta t w / collProd ht w) w₀\n      = logDeriv (scaledZeta t) w₀ - logDeriv (collProd ht) w₀ :=\n    logDeriv_div w₀ hFw₀ hP_ne hF_an.differentiableAt hP_an.differentiableAt\n```\ncollProd ht as a function of w — collProd ht w₀: the def collProd {t} (ht) (w) — as a function `collProd ht` ✓. analyticAt_finset_prod_sub_pow (s : Finset ℂ) (g : ℂ → ℕ) (w : ℂ) : AnalyticAt ℂ (fun z => ∏ ρ ∈ s, (z − ρ) ^ g ρ) w — collProd ht w := ∏ ρ ∈ collZeros ht, (w − ρ)^analyticOrderNatAt (scaledZeta t) ρ ✓ matches with g := fun ρ => analyticOrderNatAt (scaledZeta t) ρ — `analyticAt_finset_prod_sub_pow _ _ _` unifies ✓ (maybe needs show/unfold — collProd ht is the def; AnalyticAt ℂ (collProd ht) w₀ vs AnalyticAt ℂ (fun z => ∏ ...) w₀: defeq via delta ✓ exact should accept. If not: `exact analyticAt_finset_prod_sub_pow (collZeros ht) _ w₀` with a show.)\n\nhlogF:\n```lean\n  have hsne1 : s ≠ 1 := by\n    intro h1\n    rw [h1, Complex.one_im] at hsim\n    rw [← hsim, abs_zero] at ht\n    norm_num at ht\n  have hζs_diff : DifferentiableAt ℂ riemannZeta s :=\n    (analyticAt_riemannZeta_of_ne_one hsne1).differentiableAt\n  have hζs_diff' : DifferentiableAt ℂ riemannZeta (discCenter t + (5 / 2 : ℂ) * w₀) :=\n    haff.symm ▸ hζs_diff\n  have haff_diff : DifferentiableAt ℂ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀ := by\n    fun_prop\n  have hderiv_aff : deriv (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀ = 5 / 2 := by\n    have h1 : (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w)\n        = fun w => (5 / 2 : ℂ) * w + discCenter t := funext fun w => by ring\n    rw [h1]\n    have hh : HasDerivAt (fun w : ℂ => (5 / 2 : ℂ) * w + discCenter t) ((5 / 2 : ℂ) * 1) w₀ :=\n      ((hasDerivAt_id w₀).const_mul (5 / 2 : ℂ)).add_const _\n    exact hh.deriv.trans (by ring)\n  have hlogF : logDeriv (scaledZeta t) w₀ = (5 / 2 : ℂ) * logDeriv riemannZeta s := by\n    have hFeq : scaledZeta t = fun w : ℂ =>\n        (riemannZeta ∘ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w)) w /\n          riemannZeta (discCenter t) := funext fun w => rfl\n    rw [hFeq]\n    have hga : (riemannZeta ∘ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w)) w₀ ≠ 0 := by\n      rw [Function.comp_apply, haff]\n      exact hs0\n    rw [logDeriv_div w₀ hga hζs0 (hζs_diff'.comp w₀ haff_diff) (differentiableAt_const _)]\n    have hlogconst : logDeriv (fun _ : ℂ => riemannZeta (discCenter t)) w₀ = 0 := by\n      rw [logDeriv_apply, deriv_const, zero_div]\n    have hlogcomp : logDeriv (riemannZeta ∘ (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w)) w₀\n        = logDeriv riemannZeta ((fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀) *\n          deriv (fun w : ℂ => discCenter t + (5 / 2 : ℂ) * w) w₀ :=\n      logDeriv_comp hζs_diff' haff_diff\n    rw [hlogcomp, hlogconst, sub_zero, hderiv_aff]\n    show logDeriv riemannZeta (discCenter t + (5 / 2 : ℂ) * w₀) * (5 / 2 : ℂ) = _\n    rw [haff]\n    ring\n```\nIssues:\n- hlogcomp's statement — logDeriv_comp : logDeriv (f ∘ g) x = logDeriv f (g x) * deriv g x ✓ with f := riemannZeta, g := the affine lambda. hζs_diff' : DifferentiableAt ℂ riemannZeta (discCenter t + (5/2)*w₀) — needed: DifferentiableAt ℂ f (g w₀) where g w₀ = (fun w => ...) w₀ ≡ discCenter t + (5/2)*w₀ — defeq beta ✓ should unify.\n- After rw [hFeq], goal: logDeriv (fun w => (ζ∘aff) w / c) w₀ = (5/2)*logDeriv ζ s. logDeriv_div w₀ hga hζs0 hdf hdg : logDeriv (fun z => f z / g z) w₀ = logDeriv f w₀ − logDeriv g w₀ with f := (ζ∘aff), g := fun _ => c ✓. rw transforms goal to logDeriv (ζ∘aff) w₀ − logDeriv (fun _ => c) w₀ = (5/2)*logDeriv ζ s ✓ then rw [hlogcomp, hlogconst, sub_zero, hderiv_aff]: goal logDeriv ζ ((fun w => ...) w₀) * (5/2) = (5/2)*logDeriv ζ s — the ((fun w => ...) w₀) is a beta-redex — `show ... (discCenter t + (5/2)*w₀) ...` via defeq ✓ then rw [haff] → logDeriv ζ s * (5/2) = (5/2)*logDeriv ζ s: ring ✓.\n\nWait — hderiv_aff's hh: ((hasDerivAt_id w₀).const_mul (5/2)) : HasDerivAt (fun x => (5/2)*id x) ((5/2)*1) w₀?? HasDerivAt.const_mul (c : 𝕜) (h : HasDerivAt f f' x) : HasDerivAt (fun x => c * f x) (c * f') x — signature order: `HasDerivAt.const_mul (c) (hf)` or (hf).const_mul c — dot: (hasDerivAt_id w₀).const_mul (5/2:ℂ) : HasDerivAt (fun x => (5/2) * id x) ((5/2)*1) w₀ — hmm const_mul's function: fun x => c * f x with f := id: fun x => (5/2) * id x — vs our (fun w => (5/2)*w + c')... .add_const _ : HasDerivAt (fun x => (5/2) * id x + discCenter t) ((5/2)*1) w₀ — the lambda (fun x => (5/2)*id x + c) vs goal (fun w => (5/2)*w + c): id x vs x — defeq but hh.deriv : deriv (fun x => (5/2)*id x + c) w₀ = (5/2)*1 — the goal after rw [h1]: deriv (fun w => (5/2)*w + discCenter t) w₀ = 5/2: hh.deriv's type mentions id x — exact hh.deriv.trans (by ring) — the deriv-application: deriv (fun x => (5/2)*id x + discCenter t) w₀ vs goal's deriv (fun w => (5/2)*w + discCenter t) w₀ — defeq (id x ≡ x) — .trans's unification uses defeq ✓ probably fine. If problems: `hasDerivAt_id'` variant. Let me preempt: does `hasDerivAt_id'` exist? Hmm. Alternative safe route:\n```lean\n    have hh : HasDerivAt (fun w : ℂ => (5 / 2 : ℂ) * w + discCenter t) ((5 / 2 : ℂ) * 1) w₀ := by\n      apply HasDerivAt.add_const\n      exact HasDerivAt.const_mul (5 / 2 : ℂ) (hasDerivAt_id w₀)\n```\nsame lambda issue. You know what — hasDerivAt_id w₀ : HasDerivAt id 1 w₀. There might also be `hasDerivAt_id'` : HasDerivAt (fun x => x) 1 x — I'm not sure. Let me just try and fix at compile.\n\n- The hFeq funext rfl: scaledZeta t w = riemannZeta (discCenter t + (5/2)*w) / riemannZeta (discCenter t) (by def unfold) vs (ζ∘aff) w / c = ζ(aff w)/c where aff w := discCenter t + (5/2)*w ✓ defeq ✓ rfl works (funext fun w => rfl — rfl at each w: scaledZeta t w ≡ (ζ∘aff) w / c — delta scaledZeta + beta comp ✓).\n\nhlogP:\n```lean\n  have hlogP : logDeriv (collProd ht) w₀\n      = ∑ ρ ∈ collZeros ht, (analyticOrderNatAt (scaledZeta t) ρ : ℂ) / (w₀ - ρ) := by\n    unfold collProd\n    rw [logDeriv_prod (fun ρ hρ => pow_ne_zero _ (sub_ne_zero.mpr (fun h => hFw₀ (by\n        rw [h]; exact ((mem_collZeros ht).mp hρ).2))))\n      (fun ρ hρ => ((analyticAt_id.sub analyticAt_const).pow _).differentiableAt)]\n    apply Finset.sum_congr rfl\n    intro ρ hρ\n    rw [logDeriv_fun_pow (differentiableAt_id.sub (differentiableAt_const _))]\n    rw [logDeriv_apply]\n    have hd : deriv (fun w : ℂ => w - ρ) w₀ = 1 := by\n      rw [deriv_sub_const]\n      exact deriv_id'' w₀  -- name check\n    rw [hd, mul_one_div]\n```\nConcern spots: logDeriv_prod with the function `(∏ i ∈ s, f i ·)` — after unfold collProd the goal's function: fun w => ∏ ρ ∈ collZeros ht, (w − ρ) ^ analyticOrderNatAt (scaledZeta t) ρ. The lemma LHS: logDeriv (∏ i ∈ s, f i ·) x — note `(∏ i ∈ s, f i ·)` IS `fun x => ∏ i ∈ s, f i x`?? The notation ∏ i ∈ s, f i where f i is applied to the · placeholder... `(∏ i ∈ s, f i ·)` elaborates to fun x => ∏ i ∈ s, f i x ✓. rw unification: f := fun ρ w => (w − ρ)^order_ρ — should match.\n\nHmm — actually wait: logDeriv_prod's hf : ∀ i ∈ s, f i x ≠ 0 — my lambda `fun ρ hρ => pow_ne_zero _ (...)` : ∀ ρ ∈ s, ((w₀ − ρ)^order_ρ) ≠ 0 ✓ with f ρ w₀ = (w₀−ρ)^order — f ρ := fun w => (w−ρ)^order_ρ ✓. And hd : ∀ i ∈ s, DifferentiableAt 𝕜 (f i) x: f ρ = fun w => (w−ρ)^order: DifferentiableAt: (analyticAt_id.sub analyticAt_const).pow _ : AnalyticAt ℂ (fun w => (w−ρ)^order) w₀ — analyticAt_id.sub analyticAt_const : AnalyticAt ℂ (id − fun _ => ρ)?? AnalyticAt.sub : AnalyticAt f → AnalyticAt g → AnalyticAt (f − g) — id − const: fun w => id w − ρ = fun w => w − ρ ✓ defeq-ish; .pow _ : AnalyticAt ((id−const)^order) hmm — AnalyticAt.pow : AnalyticAt f → (n) → AnalyticAt (f ^ n) — (f ^ n) w = (f w)^n ✓. The target DifferentiableAt ℂ (fun w => (w−ρ)^order) w₀ — from AnalyticAt ℂ ((fun w => w−ρ)^order)... — hmm (f ^ n) as function: (f^n) w = (f w)^n — Pi.pow_apply — vs fun w => (w−ρ)^order — defeq ✓ .differentiableAt ✓. Risk of mismatch — compile will tell.\n\nderiv_sub_const: check existence — `deriv_sub_const (c : F) : deriv (fun x => f x − c) x = deriv f x`? If it exists: rw gives deriv (fun w => w) w₀... then deriv_id'' hmm — `deriv_id'' : deriv id x = 1`? hmm deriv_id' might be `deriv id = fun _ => 1`. Let me hedge: `simp [deriv_sub_const]` or use `((hasDerivAt_id w₀).sub_const ρ).deriv` — with the id-vs-lambda issue... HasDerivAt.sub_const (c) : HasDerivAt (fun x => f x − c) f' x — with f := id: (fun x => id x − ρ) — displays as (fun x => x − ρ)? `id x` — the TERM is id applied — but hasDerivAt_id w₀'s f is `id` — so sub_const gives fun x => id x − ρ. deriv of that = 1 − 0 = 1... .deriv : deriv (fun x => id x − ρ) w₀ = 1. Our goal: deriv (fun w : ℂ => w − ρ) w₀ = 1. The lambdas fun x => id x − ρ and fun w => w − ρ are defeq (id x ≡ x) but rw-matching fails. Use `show` to bridge: `show deriv (fun w : ℂ => id w - ρ) w₀ = 1` — defeq ✓ then exact ((hasDerivAt_id w₀).sub_const ρ).deriv — the value: sub_const keeps f' = 1 ✓ (HasDerivAt.sub_const : HasDerivAt f f' x → (c) → HasDerivAt (fun x => f x − c) f' x — value UNCHANGED f' = 1 ✓ so .deriv : deriv ... = 1 ✓).\n\nHmm wait — does HasDerivAt.sub_const exist with that exact behavior? journal-011 gotcha: \"HasDerivAt.add_const adds to VALUE (use .comp for precomposition)\" — that was about a DIFFERENT thing (they wanted precomposition f(x+c) but add_const gives f(x)+c). For me: `HasDerivAt.add_const (h : HasDerivAt f f' x) (c : F) : HasDerivAt (fun y => f y + c) f' y` ✓ exists. sub_const analog: `HasDerivAt.sub_const (h : HasDerivAt f f' x) (c : F) : HasDerivAt (fun y => f y − c) f' y`? hmm — maybe not existing; add_const with −c... Let me use: (hasDerivAt_id w₀).add_const (−ρ) : HasDerivAt (fun x => id x + (−ρ)) 1 w₀ — fun x => id x + (−ρ) vs fun w => w − ρ: + (−ρ) vs − ρ: defeq (sub = add neg ✓ via sub_eq_add_neg — defeq? sub_eq_add_neg is a theorem (a − b = a + −b) — in a division ring, a − b is DEFINED as a + −b ✓ defeq (SubNegMonoid: sub a b := a + -b ✓ definitional)). So:\n```lean\n    have hd : deriv (fun w : ℂ => w - ρ) w₀ = 1 := by\n      show deriv (fun w : ℂ => id w + -ρ) w₀ = 1\n      exact ((hasDerivAt_id w₀).add_const (-ρ)).deriv\n```\nHmm the show: deriv (fun w => w − ρ) w₀ vs deriv (fun w => id w + −ρ) w₀ — defeq: id w ≡ w ✓, w − ρ ≡ w + −ρ ✓ (definitional) — show should accept. If fussy: alternative `by simp [deriv_sub_const]`? — deriv_sub_const might not exist; `by fun_prop`-no that's for differentiability. Another robust: `by rw [deriv_sub_const (f := fun w : ℂ => w) (x := w₀) (c := ρ)]; exact deriv_id'' w₀`? — deriv_id'' hmm. Actually I recall clearly now: Mathlib has `deriv_id'' : deriv id = fun _ => 1`?? and `deriv_id' : deriv id x = 1`?? Let me check quickly via grep rather than guessing — I'll grep both deriv_sub_const and deriv_id names before writing. Also `hasDerivAt_id`. Let me do that grep now, plus HasDerivAt.add_const/sub_const, Real.log_le_log signature, norm_sum_le, Finset.sum_sdiff, RCLike.norm_natCast/Complex.norm_natCast.","signature":""},{"type":"text","text":"All §10 compiles. Before writing the main theorem, verifying the exact names I'll need."},{"type":"tool_use","id":"Bash_90","name":"Bash","input":{"command":"cd \"D:/Python/Quantum/zeta-23-lean/.lake/packages/mathlib\" && grep -rn \"theorem deriv_sub_const\\|theorem deriv_id'\\|lemma deriv_id'\\|theorem deriv_id''\" Mathlib/Analysis/Calculus/Deriv/*.lean 2>/dev/null | head -6; echo ---; grep -rn \"theorem HasDerivAt.add_const \\|theorem HasDerivAt.sub_const \" Mathlib/Analysis/Calculus/Deriv/Add.lean Mathlib/Analysis/Calculus/FDeriv/*.lean 2>/dev/null | head -4; echo ---; grep -rn \"theorem log_le_log \\|lemma log_le_log \\|theorem Real.log_le_log \" Mathlib/Analysis/SpecialFunctions/Log/Basic.lean | head -4; echo ---; grep -rn \"theorem norm_sum_le\\b\\|lemma norm_sum_le\\b\" Mathlib/Analysis/ -r 2>/dev/null | head -3; echo ---; grep -rn \"theorem sum_sdiff\\b\" Mathlib/Algebra/BigOperators/ -r 2>/dev/null | head -3; echo ---; grep -rn \"norm_natCast\" Mathlib/Analysis/RCLike/Basic.lean | head -3","description":"Verify exact lemma names for the main theorem"},"extra_content":null}]