Current task: —

← Session 28 — ii′-5e: partial-fraction identity (zero series + F entire)

#1534 assistant 2026-08-23 17:22:27.703 UTC · 1449→5788 tok open ⤢
thinking (5049 chars)
OK — `ArithmeticFunction.LSeriesSummable_vonMangoldt (hs : 1 < s.re) : LSeriesSummable ↗Λ s`. The Λ: in VerticalLine, `(Λ n : ℂ)` — with opens... they must have `open ArithmeticFunction` or `open scoped ArithmeticFunction`? The grep didn't show the open lines (they're after line 30 maybe). Let me not waste time: in my file I'll write `(ArithmeticFunction.vonMangoldt n : ℂ)` and for the rewrite use the ↗Λ lemma — the bridge: is `LSeries (fun n => (↑(vonMangoldt n) : ℂ)) s` syntactically equal to `L ↗Λ s`? LSeries takes f : ℕ → ℂ: L ↗Λ = LSeries ↗Λ where ↗Λ = (fun n => ↑(vonMangoldt n))?? The coercion ↗f for f : ArithmeticFunction ℝ to ℕ → ℂ: there's a coe instance: `ArithmeticFunction` ℝ→ℂ... The safest: state my Dirichlet lemma via `L ↗Λ` directly: def dirichletC2 : ℝ := ∑' n : ℕ, ‖LSeries.term ↗ArithmeticFunction.vonMangoldt (2 : ℂ) n‖ with the ↗ coe — written in Lean as `↗(ArithmeticFunction.vonMangoldt)`? The coe arrow syntax: `↗f` for f : ArithmeticFunction ℝ into ℕ → ℂ requires a Coe — in the Mathlib file they write `L ↗Λ s` with Λ := ArithmeticFunction.vonMangoldt via `open ArithmeticFunction` (scoped notation Λ?). Check: Mathlib ArithmeticFunction has `scoped notation "Λ" => ArithmeticFunction.vonMangoldt`? probably `open scoped ArithmeticFunction` gives Λ. And ↗ is the coe notation. This is getting into the weeds. DECISION: mirror VerticalLine's working pattern as closely as possible, with `open ArithmeticFunction` locally if needed. I'll write the file and let the compiler tell me. Time to write §0–§2 of LiCircleBound.lean. The Dirichlet lemma (mirror VerticalLine + ZetaBounds): ```lean /-- The Dirichlet majorant constant C₂ (the absolute sum of the von Mangoldt L-series terms at s = 2). -/ def dirichletC2 : ℝ := ∑' n : ℕ, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖ lemma norm_logDeriv_zeta_le_dirichlet {s : ℂ} (hs : 2 ≤ s.re) : ‖logDeriv riemannZeta s‖ ≤ dirichletC2 := by have hs1 : (1 : ℝ) < s.re := by linarith -- −logDeriv ζ s = LSeries Λ s have h1 : -logDeriv riemannZeta s = LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s := by have h2 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs1 rw [logDeriv, Pi.div_apply, h2] ring have hsum2 : Summable (fun n : ℕ => ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖) := by rw [summable_norm_iff] exact ArithmeticFunction.LSeriesSummable_vonMangoldt (by norm_num : (1:ℝ) < (2:ℂ).re) have hsumS : Summable (fun n : ℕ => ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖) := by rw [summable_norm_iff] exact ArithmeticFunction.LSeriesSummable_vonMangoldt hs1 have hle : ‖LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s‖ ≤ dirichletC2 := by rw [LSeries] -- unfold to tsum? LSeries f s := ∑' n, LSeries.term f s n: `rw [LSeries]`?? def — use `show`: LSeries f s = ∑' n, term f s n — `LSeries.def`? There's `LSeries` def + `LSeries_def`? VerticalLine used `rw [Hfn_line, h1, LSeries, ← tsum_mul_left]` — so rw [LSeries] unfolds (equation lemma) ✓. calc ‖∑' n, LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖ ≤ ∑' n, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖ := norm_tsum_le_tsum_norm hsumS -- norm_tsum_le_tsum_norm (hf : Summable (fun i => ‖f i‖)?) : ‖∑' f‖ ≤ ∑' ‖f‖ — from ZetaBounds: `norm_tsum_le_tsum_norm summable_abs_value` ✓ takes the norm-summable. _ ≤ ∑' n, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖ := Summable.tsum_le_tsum (fun n => LSeries.norm_term_le_of_re_le_re _ (by rw [Complex.natCast_re?]: (2:ℂ).re = 2: `by simp`: (2:ℂ).re ≤ s.re: simp then hs) n) hsumS hsum2 _ = dirichletC2 := rfl rw [← h1, norm_neg] -- goal ‖logDeriv ζ s‖ ≤ C₂: ‖logDeriv‖ = ‖−logDeriv‖ (norm_neg backwards): ‖logDeriv ζ s‖ = ‖−logDeriv ζ s‖: rw [← h1] changes goal to ‖−logDeriv ζ s‖?? hmm: goal ‖logDeriv ζ s‖ ≤ C₂: have : ‖logDeriv ζ s‖ = ‖LSeries ... s‖: rw [← norm_neg, h1]: goal ‖LSeries‖ ≤ C₂ = hle ✓: calc ‖logDeriv riemannZeta s‖ = ‖LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s‖ := by rw [← h1, norm_neg] _ ≤ dirichletC2 := hle ``` Check `LSeries.norm_term_le_of_re_le_re (f) {s s'} (h : s.re ≤ s'.re) (n) : ‖term f s' n‖ ≤ ‖term f s n‖` — with s' := s, s := (2:ℂ): h : (2:ℂ).re ≤ s.re: (2:ℂ).re = 2 ✓ simp; hs ✓. And `Summable.tsum_le_tsum (h : ∀ i, f i ≤ g i) (hf : Summable f) (hg : Summable g) : ∑' f ≤ ∑' g` — protected name from journal-027 gotcha ✓ (Summable.tsum_le_tsum ✓). dirichletC2's def with the explicit fun n => (↑(vonMangoldt n) : ℂ): the LSeries.term of that function ✓ matches h1's RHS form ✓. Hmm — LSeries.term signature: `LSeries.term (f : ℕ → ℂ) (s : ℂ) (n : ℕ) : ℂ`? From VerticalLine: `LSeries.term (fun n => (Λ n : ℂ)) (c + t*I) n` ✓ argument order (f, s, n) ✓. Now write the file §0–§2. Also the conj lemma and count bridges. Let me draft the whole §0–§2 and compile.
All patterns confirmed. Writing LiCircleBound.lean §0–§2 (conj symmetry, count bridges, Dirichlet bound).
tool: Write
input
{
  "file_path": "D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiCircleBound.lean",
  "content": "/-\nNguyenRH1/LiCircleBound.lean \u2014 tier ii\u2032 sub-stage ii\u2032-5e-v (D-068 \u00a75):\nthe circle bound for the partial-fraction difference and the squeeze to\nthe capstone identity.\n\n\u00a70: conjugate symmetry of the nontrivial zeros (for the lower-half\n    circle arcs).\n\u00a71: the mult-weighted ordinate-window count bridges from Zeta23's RvM\n    local count (`zeta_local_zero_count`: Ncount(t, t+1] \u2264 A\u2080\u00b7log(|t|+3)\n    with multiplicity, ALL t \u2014 no perimeter): `A0count` + the dyadic\n    interval count `Ncount_le_of_interval`.\n\u00a72: the Dirichlet bound `norm_logDeriv_zeta_le_dirichlet` (\u2016\u03b6\u2032/\u03b6 s\u2016 \u2264\n    dirichletC2 for re s \u2265 2; \u2212\u03b6\u2032/\u03b6 = LSeries \u039b, termwise \u2264 the s = 2\n    majorant) \u2014 the right near-axis arc input.\n\u00a73+: (this file, subsequent sub-stages) the series bound, the logDeriv\n    assembly, the Fexpr circle bound, the Schwarz squeeze, and the\n    capstone `partialFraction_identity`.\n\nArchive references: D-068 \u00a75, journal-029.\n-/\nimport Mathlib\nimport Zeta23.RvM.LocalCount\nimport NguyenRH1.LiFEntire\nimport NguyenRH1.LiGapCircles\n\nopen Zeta23 Complex Filter Topology\n\nnoncomputable section\n\nnamespace NguyenRH1\n\n/-! ## 0. Conjugate symmetry -/\n\n/-- The conjugate of a nontrivial zero is a nontrivial zero. -/\nlemma isNontrivialZero_conj {\u03c1 : \u2102} (h\u03c1 : IsNontrivialZero \u03c1) :\n    IsNontrivialZero ((starRingEnd \u2102) \u03c1) := by\n  refine \u27e8?_, ?_, ?_\u27e9\n  \u00b7 rw [riemannZeta_conj, h\u03c1.1, map_zero]\n  \u00b7 rw [Complex.conj_re]; exact h\u03c1.2.1\n  \u00b7 rw [Complex.conj_re]; exact h\u03c1.2.2\n\n/-- The ordinate of the conjugate. -/\nlemma conj_im' (\u03c1 : \u2102) : ((starRingEnd \u2102) \u03c1).im = -\u03c1.im := Complex.conj_im\n\n/-! ## 1. The mult-weighted window count bridges -/\n\n/-- The local-count constant: from Zeta23's RvM local count\n(`zeta_local_zero_count`, [Tit86 Thm 9.2] \u2014 mult-weighted, two-sided,\nall t, PROVED unconditionally in Zeta23). -/\ndef A0count : \u211d := Classical.choose Zeta23.RvM.zeta_local_zero_count\n\nlemma A0count_ge_one : (1 : \u211d) \u2264 A0count :=\n  (Classical.choose_spec Zeta23.RvM.zeta_local_zero_count).1\n\nlemma A0count_pos : (0 : \u211d) < A0count := lt_of_lt_of_le one_pos A0count_ge_one\n\n/-- The unit-window bound: Ncount(t, t+1] \u2264 A\u2080\u00b7log(|t|+3). -/\nlemma Ncount_window_le (t : \u211d) :\n    (Zeta23.Ncount t (t + 1) : \u211d) \u2264 A0count * Real.log (|t| + 3) :=\n  (Classical.choose_spec Zeta23.RvM.zeta_local_zero_count).2 t\n\n/-- Window additivity: Ncount(a, c] = Ncount(a, b] + Ncount(b, c] for\na \u2264 b \u2264 c (the disjoint union of the ordinate windows). -/\nlemma Ncount_add_of_le {a b c : \u211d} (hab : a \u2264 b) (hbc : b \u2264 c) :\n    Zeta23.Ncount a c = Zeta23.Ncount a b + Zeta23.Ncount b c := by\n  have hunion : Zeta23.zerosIn a c = Zeta23.zerosIn a b \u222a Zeta23.zerosIn b c := by\n    ext \u03c1\n    simp only [Zeta23.zerosIn, Set.mem_setOf_eq, Set.mem_union]\n    constructor\n    \u00b7 rintro \u27e8h\u03c1, ha, hc\u27e9\n      rcases le_or_lt \u03c1.im b with h | h\n      \u00b7 exact Or.inl \u27e8h\u03c1, ha, h\u27e9\n      \u00b7 exact Or.inr \u27e8h\u03c1, h, hc\u27e9\n    \u00b7 rintro (\u27e8h\u03c1, ha, hb\u27e9 | \u27e8h\u03c1, hb, hc\u27e9)\n      \u00b7 exact \u27e8h\u03c1, ha, hb.trans hbc\u27e9\n      \u00b7 exact \u27e8h\u03c1, hab.trans_lt hb, hc\u27e9\n  have hdisj : Disjoint (Zeta23.zerosIn a b) (Zeta23.zerosIn b c) := by\n    rw [Set.disjoint_iff]\n    intro \u03c1 \u27e8h1, h2\u27e9\n    exact absurd (h1.2.2.trans h2.2.1) (lt_irrefl _)\n  rw [Zeta23.Ncount, Zeta23.Ncount, Zeta23.Ncount, hunion]\n  exact_mod_cast finsum_union hdisj (Zeta23.zerosIn_finite a b)\n    (Zeta23.zerosIn_finite b c)\n\n/-- The N-step unit-window chain: Ncount(a, a+N] \u2264 A\u2080\u00b7N\u00b7log(|a|+N+3). -/\nlemma Ncount_chain_le (a : \u211d) (N : \u2115) :\n    (Zeta23.Ncount a (a + (N : \u211d)) : \u211d)\n      \u2264 A0count * (N : \u211d) * Real.log (|a| + (N : \u211d) + 3) := by\n  induction N with\n  | zero =>\n    simp only [Nat.cast_zero, add_zero]\n    have h0 : Zeta23.zerosIn a a = \u2205 := by\n      ext \u03c1\n      simp only [Zeta23.zerosIn, Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false]\n      rintro \u27e8-, h1, h2\u27e9\n      exact absurd (h1.trans h2) (lt_irrefl _)\n    have : Zeta23.Ncount a a = 0 := by\n      simp only [Zeta23.Ncount, h0, finsum_empty]\n    rw [this]\n    positivity\n  | succ N ih =>\n    have hsplit : Zeta23.Ncount a (a + ((N : \u211d) + 1))\n        = Zeta23.Ncount a (a + (N : \u211d)) + Zeta23.Ncount (a + (N : \u211d)) (a + (N : \u211d) + 1) :=\n      Ncount_add_of_le (by linarith) (by linarith)\n    have hcast : a + ((N + 1 : \u2115) : \u211d) = a + ((N : \u211d) + 1) := by push_cast; ring\n    rw [hcast, hsplit]\n    have hwin := Ncount_window_le (a + (N : \u211d))\n    have hlog : Real.log (|a + (N : \u211d)| + 3) \u2264 Real.log (|a| + (N : \u211d) + 3) := by\n      apply Real.log_le_log (by positivity)\n      have h1 : |a + (N : \u211d)| \u2264 |a| + (N : \u211d) :=\n        (abs_add_le _ _).trans (by rw [abs_of_nonneg (Nat.cast_nonneg N)])\n      linarith\n    have hlogpos : (0 : \u211d) \u2264 Real.log (|a| + (N : \u211d) + 3) := by\n      apply Real.log_nonneg\n      have : (1 : \u211d) \u2264 |a| + 3 := by linarith [abs_nonneg a]\n      linarith [Nat.cast_nonneg N]\n    have hlogpos' : (0 : \u211d) \u2264 Real.log (|a| + ((N : \u211d) + 1) + 3) := by\n      apply Real.log_nonneg\n      have : (1 : \u211d) \u2264 |a| + 3 := by linarith [abs_nonneg a]\n      linarith [Nat.cast_nonneg N]\n    push_cast\n    rw [Nat.cast_add, Nat.cast_one]\n    -- goal: \u2191(Ncount a (a+\u2191N)) + \u2191(Ncount (a+\u2191N) (a+\u2191N+1)) \u2264 A\u2080(\u2191N+1)\u00b7log(|a|+(\u2191N+1)+3)\n    have hle1 : A0count * (N : \u211d) * Real.log (|a| + (N : \u211d) + 3)\n        \u2264 A0count * ((N : \u211d) + 1) * Real.log (|a| + ((N : \u211d) + 1) + 3) := by\n      have h1 : (N : \u211d) \u2264 (N : \u211d) + 1 := by linarith\n      have h2 : Real.log (|a| + (N : \u211d) + 3) \u2264 Real.log (|a| + ((N : \u211d) + 1) + 3) :=\n        Real.log_le_log (by positivity) (by linarith)\n      have h3 := mul_le_mul h1 h2 hlogpos hlogpos'\n      calc A0count * (N : \u211d) * Real.log (|a| + (N : \u211d) + 3)\n          \u2264 A0count * ((N : \u211d) + 1) * Real.log (|a| + ((N : \u211d) + 1) + 3) := by\n            have hA0 := A0count_pos.le\n            have h4 : A0count * (N : \u211d) * Real.log (|a| + (N : \u211d) + 3)\n                \u2264 A0count * (N : \u211d) * Real.log (|a| + ((N : \u211d) + 1) + 3) :=\n              mul_le_mul_of_nonneg_left h2 (by positivity)\n            have h5 : A0count * (N : \u211d) * Real.log (|a| + ((N : \u211d) + 1) + 3)\n                \u2264 A0count * ((N : \u211d) + 1) * Real.log (|a| + ((N : \u211d) + 1) + 3) := by\n              apply mul_le_mul_of_nonneg_right _ hlogpos'\n              nlinarith [hA0, Nat.cast_nonneg N]\n            exact h4.trans h5\n    have hle2 : A0count * Real.log (|a + (N : \u211d)| + 3)\n        \u2264 A0count * Real.log (|a| + ((N : \u211d) + 1) + 3) := by\n      apply mul_le_mul_of_nonneg_left _ A0count_pos.le\n      apply Real.log_le_log (by positivity)\n      have h1 : |a + (N : \u211d)| \u2264 |a| + (N : \u211d) :=\n        (abs_add_le _ _).trans (by rw [abs_of_nonneg (Nat.cast_nonneg N)])\n      linarith\n    linarith [ih, hwin, hle1, hle2]\n\n/-- The dyadic-interval count: Ncount(a, b] \u2264 A\u2080\u00b7(b\u2212a+1)\u00b7log(b+4) for\n0 \u2264 a \u2264 b (the unit-window chain + the ceil cover). -/\nlemma Ncount_le_of_interval {a b : \u211d} (ha : 0 \u2264 a) (hab : a \u2264 b) :\n    (Zeta23.Ncount a b : \u211d) \u2264 A0count * (b - a + 1) * Real.log (b + 4) := by\n  set N : \u2115 := \u2308b - a\u2309\u208a with hN\n  have hNb : b \u2264 a + (N : \u211d) := by\n    have h := Nat.le_ceil (b - a)\n    rw [\u2190 hN] at h\n    have h2 : (b - a : \u211d) \u2264 (N : \u211d) := h\n    linarith\n  have hsub : Zeta23.zerosIn a b \u2286 Zeta23.zerosIn a (a + (N : \u211d)) := by\n    intro \u03c1 h\u03c1\n    refine \u27e8h\u03c1.1, h\u03c1.2.1, ?_\u27e9\n    exact h\u03c1.2.2.trans hNb\n  have hle : Zeta23.Ncount a b \u2264 Zeta23.Ncount a (a + (N : \u211d)) := by\n    rw [Zeta23.Ncount, Zeta23.Ncount]\n    rw [finsum_mem_eq_finite_toFinset_sum _ (Zeta23.zerosIn_finite a b),\n      finsum_mem_eq_finite_toFinset_sum _ (Zeta23.zerosIn_finite a (a + (N : \u211d)))]\n    apply Finset.sum_le_sum_of_subset_of_nonneg\n    \u00b7 intro \u03c1 h\u03c1\n      rw [Set.Finite.mem_toFinset] at h\u03c1 \u22a2\n      exact hsub h\u03c1\n    \u00b7 intro \u03c1 _ _\n      exact Nat.cast_nonneg _\n  have hchain := Ncount_chain_le a N\n  have hNle : (N : \u211d) \u2264 b - a + 1 := by\n    have h := Nat.ceil_lt_add_one (sub_nonneg.mpr hab)\n    rw [\u2190 hN] at h\n    have h2 : ((N : \u211d)) < b - a + 1 := by exact_mod_cast h\n    linarith\n  have hlogle : Real.log (|a| + (N : \u211d) + 3) \u2264 Real.log (b + 4) := by\n    apply Real.log_le_log (by positivity)\n    rw [abs_of_nonneg ha]\n    linarith\n  calc (Zeta23.Ncount a b : \u211d)\n      \u2264 (Zeta23.Ncount a (a + (N : \u211d)) : \u211d) := by exact_mod_cast hle\n    _ \u2264 A0count * (N : \u211d) * Real.log (|a| + (N : \u211d) + 3) := hchain\n    _ \u2264 A0count * (b - a + 1) * Real.log (b + 4) := by\n        have hlogpos : (0 : \u211d) \u2264 Real.log (b + 4) := by\n          apply Real.log_nonneg; linarith\n        have h1 : A0count * (N : \u211d) * Real.log (|a| + (N : \u211d) + 3)\n            \u2264 A0count * (N : \u211d) * Real.log (b + 4) :=\n          mul_le_mul_of_nonneg_left hlogle (by positivity)\n        have h2 : A0count * (N : \u211d) * Real.log (b + 4)\n            \u2264 A0count * (b - a + 1) * Real.log (b + 4) := by\n          apply mul_le_mul_of_nonneg_right _ hlogpos\n          nlinarith [A0count_pos, hNle, sub_nonneg.mpr hab]\n        exact h1.trans h2\n\n/-! ## 2. The Dirichlet bound -/\n\n/-- The Dirichlet majorant constant: the absolute sum of the von\nMangoldt L-series terms at s = 2 (summable since 2 > 1). -/\ndef dirichletC2 : \u211d :=\n  \u2211' n : \u2115, \u2016LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) (2 : \u2102) n\u2016\n\n/-- \u2016\u03b6\u2032/\u03b6 s\u2016 \u2264 C\u2082 for re s \u2265 2 (the Dirichlet-series majorant:\n\u2212\u03b6\u2032/\u03b6 = LSeries \u039b for re > 1, termwise \u2264 the s = 2 sum). -/\nlemma norm_logDeriv_zeta_le_dirichlet {s : \u2102} (hs : 2 \u2264 s.re) :\n    \u2016logDeriv riemannZeta s\u2016 \u2264 dirichletC2 := by\n  have hs1 : (1 : \u211d) < s.re := by linarith\n  have h1 : -logDeriv riemannZeta s\n      = LSeries (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) s := by\n    have h2 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs1\n    rw [logDeriv, Pi.div_apply, h2]\n    ring\n  have hsum2 : Summable (fun n : \u2115 =>\n      \u2016LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) (2 : \u2102) n\u2016) := by\n    rw [summable_norm_iff]\n    exact ArithmeticFunction.LSeriesSummable_vonMangoldt (by norm_num)\n  have hsumS : Summable (fun n : \u2115 =>\n      \u2016LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) s n\u2016) := by\n    rw [summable_norm_iff]\n    exact ArithmeticFunction.LSeriesSummable_vonMangoldt hs1\n  have hle : \u2016LSeries (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) s\u2016\n      \u2264 dirichletC2 := by\n    show \u2016\u2211' n : \u2115, LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) s n\u2016 \u2264 _\n    calc \u2016\u2211' n : \u2115, LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) s n\u2016\n        \u2264 \u2211' n : \u2115, \u2016LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) s n\u2016 :=\n          norm_tsum_le_tsum_norm hsumS\n      _ \u2264 \u2211' n : \u2115, \u2016LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) (2 : \u2102) n\u2016 :=\n          Summable.tsum_le_tsum (fun n => LSeries.norm_term_le_of_re_le_re _ (by\n            simp\n            exact hs) n) hsumS hsum2\n      _ = dirichletC2 := rfl\n  calc \u2016logDeriv riemannZeta s\u2016\n      = \u2016LSeries (fun n => (ArithmeticFunction.vonMangoldt n : \u2102)) s\u2016 := by\n        rw [\u2190 h1, norm_neg]\n    _ \u2264 dirichletC2 := hle\n\nend NguyenRH1\n\nend\n"
}
raw content_json (database row)
[{"type":"thinking","thinking":"OK — `ArithmeticFunction.LSeriesSummable_vonMangoldt (hs : 1 < s.re) : LSeriesSummable ↗Λ s`. The Λ: in VerticalLine, `(Λ n : ℂ)` — with opens... they must have `open ArithmeticFunction` or `open scoped ArithmeticFunction`? The grep didn't show the open lines (they're after line 30 maybe). Let me not waste time: in my file I'll write `(ArithmeticFunction.vonMangoldt n : ℂ)` and for the rewrite use the ↗Λ lemma — the bridge: is `LSeries (fun n => (↑(vonMangoldt n) : ℂ)) s` syntactically equal to `L ↗Λ s`? LSeries takes f : ℕ → ℂ: L ↗Λ = LSeries ↗Λ where ↗Λ = (fun n => ↑(vonMangoldt n))?? The coercion ↗f for f : ArithmeticFunction ℝ to ℕ → ℂ: there's a coe instance: `ArithmeticFunction` ℝ→ℂ... The safest: state my Dirichlet lemma via `L ↗Λ` directly: \n\ndef dirichletC2 : ℝ := ∑' n : ℕ, ‖LSeries.term ↗ArithmeticFunction.vonMangoldt (2 : ℂ) n‖\n\nwith the ↗ coe — written in Lean as `↗(ArithmeticFunction.vonMangoldt)`? The coe arrow syntax: `↗f` for f : ArithmeticFunction ℝ into ℕ → ℂ requires a Coe — in the Mathlib file they write `L ↗Λ s` with Λ := ArithmeticFunction.vonMangoldt via `open ArithmeticFunction` (scoped notation Λ?). Check: Mathlib ArithmeticFunction has `scoped notation \"Λ\" => ArithmeticFunction.vonMangoldt`? probably `open scoped ArithmeticFunction` gives Λ. And ↗ is the coe notation.\n\nThis is getting into the weeds. DECISION: mirror VerticalLine's working pattern as closely as possible, with `open ArithmeticFunction` locally if needed. I'll write the file and let the compiler tell me. Time to write §0–§2 of LiCircleBound.lean.\n\nThe Dirichlet lemma (mirror VerticalLine + ZetaBounds):\n\n```lean\n/-- The Dirichlet majorant constant C₂ (the absolute sum of the\nvon Mangoldt L-series terms at s = 2). -/\ndef dirichletC2 : ℝ :=\n  ∑' n : ℕ, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖\n\nlemma norm_logDeriv_zeta_le_dirichlet {s : ℂ} (hs : 2 ≤ s.re) :\n    ‖logDeriv riemannZeta s‖ ≤ dirichletC2 := by\n  have hs1 : (1 : ℝ) < s.re := by linarith\n  -- −logDeriv ζ s = LSeries Λ s\n  have h1 : -logDeriv riemannZeta s\n      = LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s := by\n    have h2 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs1\n    rw [logDeriv, Pi.div_apply, h2]\n    ring\n  have hsum2 : Summable (fun n : ℕ =>\n      ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖) := by\n    rw [summable_norm_iff]\n    exact ArithmeticFunction.LSeriesSummable_vonMangoldt (by norm_num : (1:ℝ) < (2:ℂ).re)\n  have hsumS : Summable (fun n : ℕ =>\n      ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖) := by\n    rw [summable_norm_iff]\n    exact ArithmeticFunction.LSeriesSummable_vonMangoldt hs1\n  have hle : ‖LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s‖ ≤ dirichletC2 := by\n    rw [LSeries]  -- unfold to tsum? LSeries f s := ∑' n, LSeries.term f s n: `rw [LSeries]`?? def — use `show`: LSeries f s = ∑' n, term f s n — `LSeries.def`? There's `LSeries` def + `LSeries_def`? VerticalLine used `rw [Hfn_line, h1, LSeries, ← tsum_mul_left]` — so rw [LSeries] unfolds (equation lemma) ✓.\n    calc ‖∑' n, LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖\n        ≤ ∑' n, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖ :=\n          norm_tsum_le_tsum_norm hsumS  -- norm_tsum_le_tsum_norm (hf : Summable (fun i => ‖f i‖)?) : ‖∑' f‖ ≤ ∑' ‖f‖ — from ZetaBounds: `norm_tsum_le_tsum_norm summable_abs_value` ✓ takes the norm-summable.\n      _ ≤ ∑' n, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖ :=\n          Summable.tsum_le_tsum (fun n => LSeries.norm_term_le_of_re_le_re _ (by\n              rw [Complex.natCast_re?]: (2:ℂ).re = 2: `by simp`: (2:ℂ).re ≤ s.re: simp then hs) n) hsumS hsum2\n      _ = dirichletC2 := rfl\n  rw [← h1, norm_neg]  -- goal ‖logDeriv ζ s‖ ≤ C₂: ‖logDeriv‖ = ‖−logDeriv‖ (norm_neg backwards): ‖logDeriv ζ s‖ = ‖−logDeriv ζ s‖: rw [← h1] changes goal to ‖−logDeriv ζ s‖?? hmm: goal ‖logDeriv ζ s‖ ≤ C₂: have : ‖logDeriv ζ s‖ = ‖LSeries ... s‖: rw [← norm_neg, h1]: goal ‖LSeries‖ ≤ C₂ = hle ✓:\n  calc ‖logDeriv riemannZeta s‖ = ‖LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s‖ := by\n        rw [← h1, norm_neg]\n    _ ≤ dirichletC2 := hle\n```\nCheck `LSeries.norm_term_le_of_re_le_re (f) {s s'} (h : s.re ≤ s'.re) (n) : ‖term f s' n‖ ≤ ‖term f s n‖` — with s' := s, s := (2:ℂ): h : (2:ℂ).re ≤ s.re: (2:ℂ).re = 2 ✓ simp; hs ✓. And `Summable.tsum_le_tsum (h : ∀ i, f i ≤ g i) (hf : Summable f) (hg : Summable g) : ∑' f ≤ ∑' g` — protected name from journal-027 gotcha ✓ (Summable.tsum_le_tsum ✓).\n\ndirichletC2's def with the explicit fun n => (↑(vonMangoldt n) : ℂ): the LSeries.term of that function ✓ matches h1's RHS form ✓.\n\nHmm — LSeries.term signature: `LSeries.term (f : ℕ → ℂ) (s : ℂ) (n : ℕ) : ℂ`? From VerticalLine: `LSeries.term (fun n => (Λ n : ℂ)) (c + t*I) n` ✓ argument order (f, s, n) ✓.\n\nNow write the file §0–§2. Also the conj lemma and count bridges. Let me draft the whole §0–§2 and compile.","signature":""},{"type":"text","text":"All patterns confirmed. Writing LiCircleBound.lean §0–§2 (conj symmetry, count bridges, Dirichlet bound)."},{"type":"tool_use","id":"Write_259","name":"Write","input":{"file_path":"D:\\Python\\Quantum\\research\\lean\\NguyenRH1\\NguyenRH1\\LiCircleBound.lean","content":"/-\nNguyenRH1/LiCircleBound.lean — tier ii′ sub-stage ii′-5e-v (D-068 §5):\nthe circle bound for the partial-fraction difference and the squeeze to\nthe capstone identity.\n\n§0: conjugate symmetry of the nontrivial zeros (for the lower-half\n    circle arcs).\n§1: the mult-weighted ordinate-window count bridges from Zeta23's RvM\n    local count (`zeta_local_zero_count`: Ncount(t, t+1] ≤ A₀·log(|t|+3)\n    with multiplicity, ALL t — no perimeter): `A0count` + the dyadic\n    interval count `Ncount_le_of_interval`.\n§2: the Dirichlet bound `norm_logDeriv_zeta_le_dirichlet` (‖ζ′/ζ s‖ ≤\n    dirichletC2 for re s ≥ 2; −ζ′/ζ = LSeries Λ, termwise ≤ the s = 2\n    majorant) — the right near-axis arc input.\n§3+: (this file, subsequent sub-stages) the series bound, the logDeriv\n    assembly, the Fexpr circle bound, the Schwarz squeeze, and the\n    capstone `partialFraction_identity`.\n\nArchive references: D-068 §5, journal-029.\n-/\nimport Mathlib\nimport Zeta23.RvM.LocalCount\nimport NguyenRH1.LiFEntire\nimport NguyenRH1.LiGapCircles\n\nopen Zeta23 Complex Filter Topology\n\nnoncomputable section\n\nnamespace NguyenRH1\n\n/-! ## 0. Conjugate symmetry -/\n\n/-- The conjugate of a nontrivial zero is a nontrivial zero. -/\nlemma isNontrivialZero_conj {ρ : ℂ} (hρ : IsNontrivialZero ρ) :\n    IsNontrivialZero ((starRingEnd ℂ) ρ) := by\n  refine ⟨?_, ?_, ?_⟩\n  · rw [riemannZeta_conj, hρ.1, map_zero]\n  · rw [Complex.conj_re]; exact hρ.2.1\n  · rw [Complex.conj_re]; exact hρ.2.2\n\n/-- The ordinate of the conjugate. -/\nlemma conj_im' (ρ : ℂ) : ((starRingEnd ℂ) ρ).im = -ρ.im := Complex.conj_im\n\n/-! ## 1. The mult-weighted window count bridges -/\n\n/-- The local-count constant: from Zeta23's RvM local count\n(`zeta_local_zero_count`, [Tit86 Thm 9.2] — mult-weighted, two-sided,\nall t, PROVED unconditionally in Zeta23). -/\ndef A0count : ℝ := Classical.choose Zeta23.RvM.zeta_local_zero_count\n\nlemma A0count_ge_one : (1 : ℝ) ≤ A0count :=\n  (Classical.choose_spec Zeta23.RvM.zeta_local_zero_count).1\n\nlemma A0count_pos : (0 : ℝ) < A0count := lt_of_lt_of_le one_pos A0count_ge_one\n\n/-- The unit-window bound: Ncount(t, t+1] ≤ A₀·log(|t|+3). -/\nlemma Ncount_window_le (t : ℝ) :\n    (Zeta23.Ncount t (t + 1) : ℝ) ≤ A0count * Real.log (|t| + 3) :=\n  (Classical.choose_spec Zeta23.RvM.zeta_local_zero_count).2 t\n\n/-- Window additivity: Ncount(a, c] = Ncount(a, b] + Ncount(b, c] for\na ≤ b ≤ c (the disjoint union of the ordinate windows). -/\nlemma Ncount_add_of_le {a b c : ℝ} (hab : a ≤ b) (hbc : b ≤ c) :\n    Zeta23.Ncount a c = Zeta23.Ncount a b + Zeta23.Ncount b c := by\n  have hunion : Zeta23.zerosIn a c = Zeta23.zerosIn a b ∪ Zeta23.zerosIn b c := by\n    ext ρ\n    simp only [Zeta23.zerosIn, Set.mem_setOf_eq, Set.mem_union]\n    constructor\n    · rintro ⟨hρ, ha, hc⟩\n      rcases le_or_lt ρ.im b with h | h\n      · exact Or.inl ⟨hρ, ha, h⟩\n      · exact Or.inr ⟨hρ, h, hc⟩\n    · rintro (⟨hρ, ha, hb⟩ | ⟨hρ, hb, hc⟩)\n      · exact ⟨hρ, ha, hb.trans hbc⟩\n      · exact ⟨hρ, hab.trans_lt hb, hc⟩\n  have hdisj : Disjoint (Zeta23.zerosIn a b) (Zeta23.zerosIn b c) := by\n    rw [Set.disjoint_iff]\n    intro ρ ⟨h1, h2⟩\n    exact absurd (h1.2.2.trans h2.2.1) (lt_irrefl _)\n  rw [Zeta23.Ncount, Zeta23.Ncount, Zeta23.Ncount, hunion]\n  exact_mod_cast finsum_union hdisj (Zeta23.zerosIn_finite a b)\n    (Zeta23.zerosIn_finite b c)\n\n/-- The N-step unit-window chain: Ncount(a, a+N] ≤ A₀·N·log(|a|+N+3). -/\nlemma Ncount_chain_le (a : ℝ) (N : ℕ) :\n    (Zeta23.Ncount a (a + (N : ℝ)) : ℝ)\n      ≤ A0count * (N : ℝ) * Real.log (|a| + (N : ℝ) + 3) := by\n  induction N with\n  | zero =>\n    simp only [Nat.cast_zero, add_zero]\n    have h0 : Zeta23.zerosIn a a = ∅ := by\n      ext ρ\n      simp only [Zeta23.zerosIn, Set.mem_setOf_eq, Set.mem_empty_iff_false, iff_false]\n      rintro ⟨-, h1, h2⟩\n      exact absurd (h1.trans h2) (lt_irrefl _)\n    have : Zeta23.Ncount a a = 0 := by\n      simp only [Zeta23.Ncount, h0, finsum_empty]\n    rw [this]\n    positivity\n  | succ N ih =>\n    have hsplit : Zeta23.Ncount a (a + ((N : ℝ) + 1))\n        = Zeta23.Ncount a (a + (N : ℝ)) + Zeta23.Ncount (a + (N : ℝ)) (a + (N : ℝ) + 1) :=\n      Ncount_add_of_le (by linarith) (by linarith)\n    have hcast : a + ((N + 1 : ℕ) : ℝ) = a + ((N : ℝ) + 1) := by push_cast; ring\n    rw [hcast, hsplit]\n    have hwin := Ncount_window_le (a + (N : ℝ))\n    have hlog : Real.log (|a + (N : ℝ)| + 3) ≤ Real.log (|a| + (N : ℝ) + 3) := by\n      apply Real.log_le_log (by positivity)\n      have h1 : |a + (N : ℝ)| ≤ |a| + (N : ℝ) :=\n        (abs_add_le _ _).trans (by rw [abs_of_nonneg (Nat.cast_nonneg N)])\n      linarith\n    have hlogpos : (0 : ℝ) ≤ Real.log (|a| + (N : ℝ) + 3) := by\n      apply Real.log_nonneg\n      have : (1 : ℝ) ≤ |a| + 3 := by linarith [abs_nonneg a]\n      linarith [Nat.cast_nonneg N]\n    have hlogpos' : (0 : ℝ) ≤ Real.log (|a| + ((N : ℝ) + 1) + 3) := by\n      apply Real.log_nonneg\n      have : (1 : ℝ) ≤ |a| + 3 := by linarith [abs_nonneg a]\n      linarith [Nat.cast_nonneg N]\n    push_cast\n    rw [Nat.cast_add, Nat.cast_one]\n    -- goal: ↑(Ncount a (a+↑N)) + ↑(Ncount (a+↑N) (a+↑N+1)) ≤ A₀(↑N+1)·log(|a|+(↑N+1)+3)\n    have hle1 : A0count * (N : ℝ) * Real.log (|a| + (N : ℝ) + 3)\n        ≤ A0count * ((N : ℝ) + 1) * Real.log (|a| + ((N : ℝ) + 1) + 3) := by\n      have h1 : (N : ℝ) ≤ (N : ℝ) + 1 := by linarith\n      have h2 : Real.log (|a| + (N : ℝ) + 3) ≤ Real.log (|a| + ((N : ℝ) + 1) + 3) :=\n        Real.log_le_log (by positivity) (by linarith)\n      have h3 := mul_le_mul h1 h2 hlogpos hlogpos'\n      calc A0count * (N : ℝ) * Real.log (|a| + (N : ℝ) + 3)\n          ≤ A0count * ((N : ℝ) + 1) * Real.log (|a| + ((N : ℝ) + 1) + 3) := by\n            have hA0 := A0count_pos.le\n            have h4 : A0count * (N : ℝ) * Real.log (|a| + (N : ℝ) + 3)\n                ≤ A0count * (N : ℝ) * Real.log (|a| + ((N : ℝ) + 1) + 3) :=\n              mul_le_mul_of_nonneg_left h2 (by positivity)\n            have h5 : A0count * (N : ℝ) * Real.log (|a| + ((N : ℝ) + 1) + 3)\n                ≤ A0count * ((N : ℝ) + 1) * Real.log (|a| + ((N : ℝ) + 1) + 3) := by\n              apply mul_le_mul_of_nonneg_right _ hlogpos'\n              nlinarith [hA0, Nat.cast_nonneg N]\n            exact h4.trans h5\n    have hle2 : A0count * Real.log (|a + (N : ℝ)| + 3)\n        ≤ A0count * Real.log (|a| + ((N : ℝ) + 1) + 3) := by\n      apply mul_le_mul_of_nonneg_left _ A0count_pos.le\n      apply Real.log_le_log (by positivity)\n      have h1 : |a + (N : ℝ)| ≤ |a| + (N : ℝ) :=\n        (abs_add_le _ _).trans (by rw [abs_of_nonneg (Nat.cast_nonneg N)])\n      linarith\n    linarith [ih, hwin, hle1, hle2]\n\n/-- The dyadic-interval count: Ncount(a, b] ≤ A₀·(b−a+1)·log(b+4) for\n0 ≤ a ≤ b (the unit-window chain + the ceil cover). -/\nlemma Ncount_le_of_interval {a b : ℝ} (ha : 0 ≤ a) (hab : a ≤ b) :\n    (Zeta23.Ncount a b : ℝ) ≤ A0count * (b - a + 1) * Real.log (b + 4) := by\n  set N : ℕ := ⌈b - a⌉₊ with hN\n  have hNb : b ≤ a + (N : ℝ) := by\n    have h := Nat.le_ceil (b - a)\n    rw [← hN] at h\n    have h2 : (b - a : ℝ) ≤ (N : ℝ) := h\n    linarith\n  have hsub : Zeta23.zerosIn a b ⊆ Zeta23.zerosIn a (a + (N : ℝ)) := by\n    intro ρ hρ\n    refine ⟨hρ.1, hρ.2.1, ?_⟩\n    exact hρ.2.2.trans hNb\n  have hle : Zeta23.Ncount a b ≤ Zeta23.Ncount a (a + (N : ℝ)) := by\n    rw [Zeta23.Ncount, Zeta23.Ncount]\n    rw [finsum_mem_eq_finite_toFinset_sum _ (Zeta23.zerosIn_finite a b),\n      finsum_mem_eq_finite_toFinset_sum _ (Zeta23.zerosIn_finite a (a + (N : ℝ)))]\n    apply Finset.sum_le_sum_of_subset_of_nonneg\n    · intro ρ hρ\n      rw [Set.Finite.mem_toFinset] at hρ ⊢\n      exact hsub hρ\n    · intro ρ _ _\n      exact Nat.cast_nonneg _\n  have hchain := Ncount_chain_le a N\n  have hNle : (N : ℝ) ≤ b - a + 1 := by\n    have h := Nat.ceil_lt_add_one (sub_nonneg.mpr hab)\n    rw [← hN] at h\n    have h2 : ((N : ℝ)) < b - a + 1 := by exact_mod_cast h\n    linarith\n  have hlogle : Real.log (|a| + (N : ℝ) + 3) ≤ Real.log (b + 4) := by\n    apply Real.log_le_log (by positivity)\n    rw [abs_of_nonneg ha]\n    linarith\n  calc (Zeta23.Ncount a b : ℝ)\n      ≤ (Zeta23.Ncount a (a + (N : ℝ)) : ℝ) := by exact_mod_cast hle\n    _ ≤ A0count * (N : ℝ) * Real.log (|a| + (N : ℝ) + 3) := hchain\n    _ ≤ A0count * (b - a + 1) * Real.log (b + 4) := by\n        have hlogpos : (0 : ℝ) ≤ Real.log (b + 4) := by\n          apply Real.log_nonneg; linarith\n        have h1 : A0count * (N : ℝ) * Real.log (|a| + (N : ℝ) + 3)\n            ≤ A0count * (N : ℝ) * Real.log (b + 4) :=\n          mul_le_mul_of_nonneg_left hlogle (by positivity)\n        have h2 : A0count * (N : ℝ) * Real.log (b + 4)\n            ≤ A0count * (b - a + 1) * Real.log (b + 4) := by\n          apply mul_le_mul_of_nonneg_right _ hlogpos\n          nlinarith [A0count_pos, hNle, sub_nonneg.mpr hab]\n        exact h1.trans h2\n\n/-! ## 2. The Dirichlet bound -/\n\n/-- The Dirichlet majorant constant: the absolute sum of the von\nMangoldt L-series terms at s = 2 (summable since 2 > 1). -/\ndef dirichletC2 : ℝ :=\n  ∑' n : ℕ, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖\n\n/-- ‖ζ′/ζ s‖ ≤ C₂ for re s ≥ 2 (the Dirichlet-series majorant:\n−ζ′/ζ = LSeries Λ for re > 1, termwise ≤ the s = 2 sum). -/\nlemma norm_logDeriv_zeta_le_dirichlet {s : ℂ} (hs : 2 ≤ s.re) :\n    ‖logDeriv riemannZeta s‖ ≤ dirichletC2 := by\n  have hs1 : (1 : ℝ) < s.re := by linarith\n  have h1 : -logDeriv riemannZeta s\n      = LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s := by\n    have h2 := ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs1\n    rw [logDeriv, Pi.div_apply, h2]\n    ring\n  have hsum2 : Summable (fun n : ℕ =>\n      ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖) := by\n    rw [summable_norm_iff]\n    exact ArithmeticFunction.LSeriesSummable_vonMangoldt (by norm_num)\n  have hsumS : Summable (fun n : ℕ =>\n      ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖) := by\n    rw [summable_norm_iff]\n    exact ArithmeticFunction.LSeriesSummable_vonMangoldt hs1\n  have hle : ‖LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s‖\n      ≤ dirichletC2 := by\n    show ‖∑' n : ℕ, LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖ ≤ _\n    calc ‖∑' n : ℕ, LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖\n        ≤ ∑' n : ℕ, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s n‖ :=\n          norm_tsum_le_tsum_norm hsumS\n      _ ≤ ∑' n : ℕ, ‖LSeries.term (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) (2 : ℂ) n‖ :=\n          Summable.tsum_le_tsum (fun n => LSeries.norm_term_le_of_re_le_re _ (by\n            simp\n            exact hs) n) hsumS hsum2\n      _ = dirichletC2 := rfl\n  calc ‖logDeriv riemannZeta s‖\n      = ‖LSeries (fun n => (ArithmeticFunction.vonMangoldt n : ℂ)) s‖ := by\n        rw [← h1, norm_neg]\n    _ ≤ dirichletC2 := hle\n\nend NguyenRH1\n\nend\n"},"extra_content":null}]