{"id":"I7","label":"I7","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_7(\\nu , \\epsilon , X, T, \\sigma _1) := \\frac{1}{2\\pi i} \\int _{3}^{T} \\left( \\frac{-\\zeta '}\\zeta (\\sigma _1 + t i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma _1 + t i) X^{\\sigma _1 + t i} \\ i \\ dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₇","latex_link":"sect0003.html#I7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₇","lean_decl_name":"I₇","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I7\"\n (title := \"I₇\")\n (statement := /--\n $$\n I_7(\\nu, \\epsilon, X, T, \\sigma_1) := \\frac{1}{2\\pi i} \\int_{3}^{T}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma_1 + t i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_1 + t i)\n X^{\\sigma_1 + t i} \\ i \\ dt\n $$\n -/)]\nnoncomputable def I₇ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t in (3 : ℝ)..T,\n SmoothedChebyshevIntegrand SmoothingF ε X (σ₁ + t * I)))","line":946,"end_line":961,"proof_status":"formalized"} {"id":"SmoothedChebyshevPull2","label":"SmoothedChebyshevPull2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["I7","I5","I6","Smooth1LeOne","Smooth1Properties_above","Smooth1Nonneg","Smooth1ContinuousAt","I37","I3","I4","HolomorphicOn.vanishesOnRectangle"],"nlp_text":"We have that \\[ I_{37} = I_3 - I_4 + I_5 + I_6 + I_7 . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull2","latex_link":"sect0003.html#SmoothedChebyshevPull2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull2","lean_decl_name":"SmoothedChebyshevPull2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevPull2\")\n (statement := /--\n We have that\n $$\n I_{37} =\n I_3 - I_4 + I_5 + I_6 + I_7\n .\n $$\n -/)\n (proof := /-- Mimic the proof of Lemma \\ref{SmoothedChebyshevPull1}. -/)\n (latexEnv := \"lemma\")]\ntheorem SmoothedChebyshevPull2 {SmoothingF : ℝ → ℝ} {ε : ℝ} (ε_pos : 0 < ε) (ε_lt_one : ε < 1)\n (X : ℝ) (_ : 3 < X)\n {T : ℝ} (T_pos : 3 < T) {σ₁ σ₂ : ℝ}\n (σ₂_pos : 0 < σ₂) (σ₁_lt_one : σ₁ < 1)\n (σ₂_lt_σ₁ : σ₂ < σ₁)\n (holoOn : HolomorphicOn (ζ' / ζ) ((Icc σ₁ 2) ×ℂ (Icc (-T) T) \\ {1}))\n (holoOn2 : HolomorphicOn (SmoothedChebyshevIntegrand SmoothingF ε X)\n (Icc σ₂ 2 ×ℂ Icc (-3) 3 \\ {1}))\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x)\n (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1)\n (diff_SmoothingF : ContDiff ℝ 1 SmoothingF) :\n I₃₇ SmoothingF ε T X σ₁ =\n I₃ SmoothingF ε T X σ₁ -\n I₄ SmoothingF ε X σ₁ σ₂ +\n I₅ SmoothingF ε X σ₂ +\n I₆ SmoothingF ε X σ₁ σ₂ +\n I₇ SmoothingF ε T X σ₁ := by\n let z : ℂ := σ₂ - 3 * I\n let w : ℂ := σ₁ + 3 * I\n have σ₁_pos : 0 < σ₁ := by linarith\n -- Step (1)\n -- Show that the Rectangle is in a given subset of holomorphicity\n have sub : z.Rectangle w ⊆ Icc σ₂ 2 ×ℂ Icc (-3) 3 \\ {1} := by\n -- for every point x in the Rectangle\n intro x hx\n constructor\n · -- x is in the locus of holomorphicity\n simp only [Rectangle, uIcc] at hx\n rw [Complex.mem_reProdIm] at hx ⊢\n obtain ⟨hx_re, hx_im⟩ := hx\n -- the real part of x is in the correct interval\n have hzw_re : z.re < w.re := by\n dsimp [z, w]\n linarith\n have x_re_bounds : z.re ≤ x.re ∧ x.re ≤ w.re := by\n exact interval_membership x.re z.re w.re hx_re hzw_re\n have x_re_in_Icc : x.re ∈ Icc σ₂ 2 := by\n have ⟨h_left, h_right⟩ := x_re_bounds\n have h_left' : σ₂ ≤ x.re := by\n dsimp [z] at h_left\n linarith\n have h_right' : x.re ≤ 2 := by\n apply le_trans h_right\n dsimp [w]\n linarith\n exact ⟨h_left', h_right'⟩\n -- the imaginary part of x is in the correct interval\n have hzw_im : z.im < w.im := by\n dsimp [z, w]\n linarith\n have x_im_bounds : z.im ≤ x.im ∧ x.im ≤ w.im := by\n exact interval_membership x.im z.im w.im hx_im hzw_im\n have x_im_in_Icc : x.im ∈ Icc (-3) 3 := by\n have ⟨h_left, h_right⟩ := x_im_bounds\n have h_left' : -3 ≤ x.im := by\n dsimp [z] at h_left\n linarith\n have h_right' : x.im ≤ 3 := by\n dsimp [w] at h_right\n linarith\n exact ⟨h_left', h_right'⟩\n exact ⟨x_re_in_Icc, x_im_in_Icc⟩\n -- x is not in {1} by contradiction\n · simp only [mem_singleton_iff]\n -- x has real part less than 1\n have x_re_upper: x.re ≤ σ₁ := by\n simp only [Rectangle, uIcc] at hx\n rw [Complex.mem_reProdIm] at hx\n obtain ⟨hx_re, _⟩ := hx\n -- the real part of x is in the interval\n have hzw_re : z.re < w.re := by\n dsimp [z, w]\n linarith\n have x_re_bounds : z.re ≤ x.re ∧ x.re ≤ w.re := by\n exact interval_membership x.re z.re w.re hx_re hzw_re\n have x_re_upper' : x.re ≤ w.re := by exact x_re_bounds.2\n dsimp [w] at x_re_upper'\n linarith\n -- by contracdiction\n have h_x_ne_one : x ≠ 1 := by\n intro h_eq\n have h_re : x.re = 1 := by rw [h_eq, Complex.one_re]\n have h1 : 1 ≤ σ₁ := by\n rw [← h_re]\n exact x_re_upper\n linarith\n exact h_x_ne_one\n have zero_over_box := HolomorphicOn.vanishesOnRectangle holoOn2 sub\n have splitting : I₃₇ SmoothingF ε T X σ₁ =\n I₃ SmoothingF ε T X σ₁ + I₅ SmoothingF ε X σ₁ + I₇ SmoothingF ε T X σ₁ := by\n unfold I₃₇ I₃ I₅ I₇\n apply verticalIntegral_split_three_finite'\n · apply ContinuousOn.integrableOn_Icc\n unfold SmoothedChebyshevIntegrand\n apply ContinuousOn.mul\n · apply ContinuousOn.mul\n · apply SmoothedChebyshevPull2_aux1 σ₁_lt_one holoOn\n · apply continuousOn_of_forall_continuousAt\n intro t t_mem\n have := Smooth1MellinDifferentiable diff_SmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩\n SmoothingFnonneg mass_one (s := ↑σ₁ + ↑t * I) (by simpa)\n simpa using realDiff_of_complexDiff _ this\n · apply continuousOn_of_forall_continuousAt\n intro t t_mem\n apply ContinuousAt.comp\n · refine continuousAt_const_cpow' ?_\n intro h\n have : σ₁ = 0 := by\n have h_real : (↑σ₁ + ↑t * I).re = (0 : ℂ).re := by\n rw [h]\n simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one,\n sub_self, add_zero, zero_re] at h_real\n exact h_real\n linarith\n · -- continuity -- failed\n apply ContinuousAt.add\n · exact continuousAt_const\n · apply ContinuousAt.mul\n · apply continuous_ofReal.continuousAt\n · exact continuousAt_const\n · refine ⟨by linarith, by linarith, by linarith⟩\n calc I₃₇ SmoothingF ε T X σ₁ =\n I₃₇ SmoothingF ε T X σ₁ - (1 / (2 * π * I)) * (0 : ℂ) := by simp\n _ = I₃₇ SmoothingF ε T X σ₁ - (1 / (2 * π * I)) *\n (RectangleIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z w) := by rw [← zero_over_box]\n _ = I₃₇ SmoothingF ε T X σ₁ - (1 / (2 * π * I)) *\n (HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re z.im\n - HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re w.im\n + VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im\n - VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by\n simp [RectangleIntegral]\n _ = I₃₇ SmoothingF ε T X σ₁ -\n ((1 / (2 * π * I)) * HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re z.im\n - (1 / (2 * π * I)) * HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re w.im\n + (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im\n - (1 / (2 * π * I)) *\n VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by ring\n _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂\n - (1 / (2 * π * I)) * HIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re w.re w.im\n + (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im\n - (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by\n simp only [one_div, mul_inv_rev, inv_I, neg_mul, HIntegral, sub_im, ofReal_im, mul_im,\n re_ofNat, I_im, mul_one, im_ofNat, I_re, mul_zero, add_zero, zero_sub, ofReal_neg,\n ofReal_ofNat, sub_re, ofReal_re, mul_re, sub_self, sub_zero, add_re, add_im, zero_add,\n sub_neg_eq_add, I₄, sub_right_inj, add_left_inj, neg_inj, mul_eq_mul_left_iff, mul_eq_zero,\n I_ne_zero, inv_eq_zero, ofReal_eq_zero, OfNat.ofNat_ne_zero, or_false, false_or, z, w]\n left\n rfl\n _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂\n - I₆ SmoothingF ε X σ₁ σ₂\n + (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) w.re z.im w.im\n - (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by\n simp only [one_div, mul_inv_rev, inv_I, neg_mul, HIntegral, add_im, ofReal_im, mul_im,\n re_ofNat, I_im, mul_one, im_ofNat, I_re, mul_zero, add_zero, zero_add, ofReal_ofNat, sub_re,\n ofReal_re, mul_re, sub_self, sub_zero, add_re, sub_neg_eq_add, sub_im, zero_sub, I₆, w, z]\n _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂\n - I₆ SmoothingF ε X σ₁ σ₂\n + I₅ SmoothingF ε X σ₁\n - (1 / (2 * π * I)) * VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) z.re z.im w.im) := by\n simp only [one_div, mul_inv_rev, inv_I, neg_mul, VIntegral, add_re, ofReal_re, mul_re,\n re_ofNat, I_re, mul_zero, im_ofNat, I_im, mul_one, sub_self, add_zero, sub_im, ofReal_im,\n mul_im, zero_sub, add_im, zero_add, smul_eq_mul, sub_re, sub_zero, sub_neg_eq_add, I₅,\n w, z]\n _ = I₃₇ SmoothingF ε T X σ₁ - (I₄ SmoothingF ε X σ₁ σ₂\n - I₆ SmoothingF ε X σ₁ σ₂\n + I₅ SmoothingF ε X σ₁\n - I₅ SmoothingF ε X σ₂) := by\n simp only [I₅, one_div, mul_inv_rev, inv_I, neg_mul, VIntegral, sub_re, ofReal_re, mul_re,\n re_ofNat, I_re, mul_zero, im_ofNat, I_im, mul_one, sub_self, sub_zero, sub_im, ofReal_im,\n mul_im, add_zero, zero_sub, add_im, zero_add, smul_eq_mul, sub_neg_eq_add, z, w]\n --- starting from now, we split the integral `I₃₇` into `I₃ σ₂ + I₅ σ₁ + I₇ σ₁` using `verticalIntegral_split_three_finite`\n _ = I₃ SmoothingF ε T X σ₁\n + I₅ SmoothingF ε X σ₁\n + I₇ SmoothingF ε T X σ₁\n - (I₄ SmoothingF ε X σ₁ σ₂\n - I₆ SmoothingF ε X σ₁ σ₂\n + I₅ SmoothingF ε X σ₁\n - I₅ SmoothingF ε X σ₂) := by\n rw [splitting]\n _ = I₃ SmoothingF ε T X σ₁\n - I₄ SmoothingF ε X σ₁ σ₂\n + I₅ SmoothingF ε X σ₂\n + I₆ SmoothingF ε X σ₁ σ₂\n + I₇ SmoothingF ε T X σ₁ := by\n ring\n","line":1411,"end_line":1608,"proof_status":"formalized"} {"id":"MediumPNT","label":"MediumPNT","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["SmoothedChebyshevPull2","SmoothedChebyshevPull1","I5Bound","LogDerivZetaHolcLargeT","I3Bound","LogDerivZetaBndUnif","I8Bound","I1Bound","LogDerivZetaHolcSmallT","MellinOfSmooth1c","SmoothedChebyshevClose","I4Bound","SmoothExistence"],"nlp_text":"We have \\[ \\sum _{n \\leq x} \\Lambda (n) = x + O(x \\exp (-c(\\log x)^{1/10})). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MediumPNT","latex_link":"sect0003.html#MediumPNT","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MediumPNT","lean_decl_name":"MediumPNT","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"theorem MediumPNT : ∃ c > 0,\n (ψ - id) =O[atTop]\n fun (x : ℝ) ↦ x * Real.exp (-c * (Real.log x) ^ ((1 : ℝ) / 10)) := by\n have ⟨ν, ContDiffν, ν_nonneg', ν_supp, ν_massOne'⟩ := SmoothExistence\n have ContDiff1ν : ContDiff ℝ 1 ν := by\n exact ContDiffν.of_le (by simp)\n have ν_nonneg : ∀ x > 0, 0 ≤ ν x := fun x _ ↦ ν_nonneg' x\n have ν_massOne : ∫ x in Ioi 0, ν x / x = 1 := by\n rwa [← integral_Ici_eq_integral_Ioi]\n clear ContDiffν ν_nonneg' ν_massOne'\n obtain ⟨c_close, c_close_pos, h_close⟩ :=\n SmoothedChebyshevClose ContDiff1ν ν_supp ν_nonneg ν_massOne\n obtain ⟨ε_main, C_main, ε_main_pos, C_main_pos, h_main⟩ := MellinOfSmooth1cExplicit ContDiff1ν ν_supp ν_massOne\n obtain ⟨A, C_bnd, C_bnd_pos, A_in_Ioc, zeta_bnd, holo1⟩ := LogDerivZetaBoundedAndHolo\n obtain ⟨σ₂', σ₂'_lt_one, holo2'⟩ := LogDerivZetaHolcSmallT\n let σ₂ : ℝ := max σ₂' (1 / 2)\n have σ₂_pos : 0 < σ₂ := by bound\n have σ₂_lt_one : σ₂ < 1 := by bound\n have holo2 : HolomorphicOn (fun s ↦ ζ' s / ζ s) (uIcc σ₂ 2 ×ℂ uIcc (-3) 3 \\ {1}) := by\n apply holo2'.mono\n intro s hs\n simp only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le, mem_diff, mem_reProdIm, mem_Icc,\n mem_singleton_iff] at hs ⊢\n refine ⟨?_, hs.2⟩\n refine ⟨?_, hs.1.2⟩\n rcases hs.1.1 with ⟨left, right⟩\n constructor\n · apply le_trans _ left\n apply min_le_min_right\n apply le_max_left\n · rw [max_eq_right (by linarith)] at right ⊢\n exact right\n\n clear holo2' σ₂'_lt_one\n\n obtain ⟨c₁, c₁pos, hc₁⟩ := I1Bound ν_supp ContDiff1ν ν_nonneg ν_massOne\n obtain ⟨c₂, c₂pos, hc₂⟩ := I2Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc\n obtain ⟨c₃, c₃pos, hc₃⟩ := I3Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc\n obtain ⟨c₅, c₅pos, hc₅⟩ := I5Bound ν_supp ContDiff1ν holo2 ⟨σ₂_pos, σ₂_lt_one⟩\n obtain ⟨c₇, c₇pos, hc₇⟩ := I7Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc\n obtain ⟨c₈, c₈pos, hc₈⟩ := I8Bound ν_supp ContDiff1ν zeta_bnd C_bnd_pos A_in_Ioc\n obtain ⟨c₉, c₉pos, hc₉⟩ := I9Bound ν_supp ContDiff1ν ν_nonneg ν_massOne\n\n obtain ⟨c₄, c₄pos, Tlb₄, Tlb₄bnd, hc₄⟩ := I4Bound ν_supp ContDiff1ν\n holo2 ⟨σ₂_pos, σ₂_lt_one⟩ A_in_Ioc\n\n obtain ⟨c₆, c₆pos, Tlb₆, Tlb₆bnd, hc₆⟩ := I6Bound ν_supp ContDiff1ν\n holo2 ⟨σ₂_pos, σ₂_lt_one⟩ A_in_Ioc\n\n let C' := c_close + C_main\n","line":3804,"end_line":3853,"proof_status":"formalized"} {"id":"bklnw-eq_A_17","label":"bklnw-eq_A_17","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq_A_16"],"nlp_text":"We define \\[ c_3(\\sigma , x_0) = 2 \\exp \\left( -2 \\left( \\frac{\\log x_0}{R} \\right)^{1/2} \\right) (\\log x_0)^2 k(\\sigma , x_0). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.c3","latex_link":"primary-chapter.html#bklnw-eq_A_17","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.c3","lean_decl_name":"BKLNW_app.Inputs.c3","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"noncomputable def Inputs.c3 (I : Inputs) (σ x₀ : ℝ) : ℝ :=\n 2 * exp (-2 * (log x₀ / I.R)^(1/2)) * (log x₀)^2 * I.k σ x₀\n\n","line":627,"end_line":629,"proof_status":"formalized"} {"id":"bklnw-eq_A_20","label":"bklnw-eq_A_20","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq_A_17","bklnw-eq_A_18","bklnw-eq_A_19"],"nlp_text":"We define \\[ A(\\sigma , x_0) = 2.0025 \\cdot 25^{-2 \\sigma } \\cdot c_1(\\sigma ) + c_3(\\sigma , x_0) + c_4(\\sigma , x_0) + c_5(\\sigma , x_0). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.A","latex_link":"primary-chapter.html#bklnw-eq_A_20","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.A","lean_decl_name":"BKLNW_app.Inputs.A","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"noncomputable def A (x₀ : ℝ) : ℝ :=\n if log x₀ < 1000 then 0 -- junk value\n else if log x₀ < 2000 then 338.3058\n else if log x₀ < 3000 then 263.2129\n else if log x₀ < 4000 then 233.0775\n else if log x₀ < 5000 then 215.8229\n else if log x₀ < 6000 then 204.2929\n else if log x₀ < 7000 then 195.8842\n else if log x₀ < 8000 then 189.3959\n else if log x₀ < 9000 then 184.1882\n else if log x₀ < 10000 then 179.8849\n else if log x₀ < 20000 then 176.2484\n else if log x₀ < 30000 then 156.4775\n else if log x₀ < 40000 then 147.5424\n else if log x₀ < 50000 then 142.1006\n else if log x₀ < 60000 then 138.3136\n else if log x₀ < 70000 then 135.4686\n else if log x₀ < 80000 then 133.2221\n else if log x₀ < 90000 then 131.3849\n else if log x₀ < 100000 then 129.8428\n else if log x₀ < 200000 then 128.5221\n else if log x₀ < 300000 then 121.0360\n else if log x₀ < 400000 then 117.4647\n else if log x₀ < 500000 then 115.2251\n else if log x₀ < 600000 then 113.6357\n else if log x₀ < 700000 then 112.4241\n else if log x₀ < 800000 then 111.4565\n else if log x₀ < 900000 then 110.6577\n else if log x₀ < 1e6 then 109.9819\n else if log x₀ < 1e7 then 109.3992\n else if log x₀ < 1e8 then 100.5097\n else if log x₀ < 1e9 then 96.0345\n else 93.6772\n","line":585,"end_line":617,"proof_status":"formalized"} {"id":"bklnw-thm-14","label":"bklnw-thm-14","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq_A_20","bklnw-eq_A_21","Epsi-def"],"nlp_text":"Let \\(x_0 \\geq 1000\\) and let \\(\\sigma \\in [0.75, 1)\\). For all \\(x \\geq e^{x_0}\\), \\[ \\frac{|\\psi (x) - x|}{x} \\leq A \\left( \\frac{\\log x}{R} \\right)^B \\exp \\left( -C \\left( \\frac{\\log x}{R} \\right)^{1/2} \\right) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.thm_14","latex_link":"primary-chapter.html#bklnw-thm-14","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.thm_14","lean_decl_name":"BKLNW_app.thm_14","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"theorem thm_14 {I : Inputs} {x₀ σ x : ℝ} (hx₀ : x₀ ≥ 1000) (hσ : 0.75 ≤ σ ∧ σ < 1) (hx : x ≥ exp x₀) :\n Eψ x ≤ I.A σ x₀ * (log x / I.R)^(I.B σ) * exp (-I.C σ * (log x / I.R)^(1/2:ℝ)) := by sorry\n\n","line":677,"end_line":679,"proof_status":"statement_formalized"} {"id":"prelim-decay-3","label":"prelim-decay-3","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["prelim-decay-2"],"nlp_text":"If \\(\\psi :\\mathbb {R}\\to \\mathbb {C}\\) is absolutely integrable, absolutely continuous, and \\(\\psi '\\) is of bounded variation, then \\[ |\\hat\\psi (u)| \\leq \\| \\psi ' \\| _{TV} / (2\\pi |u|)^2 \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prelim_decay_3","latex_link":"sect0002.html#prelim-decay-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prelim_decay_3","lean_decl_name":"prelim_decay_3","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (statement := /--\nIf $\\psi:\\R \\to \\C$ is absolutely integrable, absolutely continuous, and $\\psi'$ is of bounded\nvariation, then\n$$ |\\hat \\psi(u)| \\leq \\| \\psi' \\|_{TV} / (2\\pi |u|)^2$$\nfor all non-zero $u \\in \\R$.\n -/)\n (proof := /-- Should follow from previous lemma. -/)\n (proofUses := [\"prelim-decay-2\"])\n (latexEnv := \"lemma\")\n (discussion := 563)]\ntheorem prelim_decay_3 (ψ : ℝ → ℂ) (hψ : Integrable ψ)\n (habscont : AbsolutelyContinuous ψ)\n (hvar : BoundedVariationOn (deriv ψ) Set.univ) (u : ℝ) (hu : u ≠ 0) :\n ‖𝓕 (ψ : ℝ → ℂ) u‖ ≤ (eVariationOn (deriv ψ) Set.univ).toReal / (2 * π * ‖u‖) ^ 2 := by sorry\n\n@[blueprint \"decay-alt\"\n","line":329,"end_line":344,"proof_status":"statement_formalized"} {"id":"decay-alt","label":"decay-alt","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["prelim-decay-3","prelim-decay","decay"],"nlp_text":"If \\(\\psi :\\mathbb {R}\\to \\mathbb {C}\\) is absolutely integrable, absolutely continuous, and \\(\\psi '\\) is of bounded variation, then \\[ |\\hat\\psi (u)| \\leq ( \\| \\psi \\| _1 + \\| \\psi ' \\| _{TV} / (2\\pi )^2) / (1+|u|^2) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/decay_alt","latex_link":"sect0002.html#decay-alt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/decay_alt","lean_decl_name":"decay_alt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (statement := /--\nIf $\\psi:\\R \\to \\C$ is absolutely\nintegrable, absolutely continuous, and $\\psi'$ is of bounded variation, then\n$$ |\\hat \\psi(u)| \\leq ( \\|\\psi\\|_1 + \\| \\psi' \\|_{TV} / (2\\pi)^2) / (1+|u|^2)$$\nfor all $u \\in \\R$. -/)\n (proof := /-- Should follow from previous lemmas. -/)\n (proofUses := [\"prelim-decay\", \"prelim-decay-3\", \"decay\"])\n (latexEnv := \"lemma\")\n (discussion := 564)]\ntheorem decay_alt (ψ : ℝ → ℂ) (hψ : Integrable ψ) (habscont : AbsolutelyContinuous ψ)\n (hvar : BoundedVariationOn (deriv ψ) Set.univ) (u : ℝ) :\n ‖𝓕 (ψ : ℝ → ℂ) u‖ ≤\n ((∫ t, ‖ψ t‖) + (eVariationOn (deriv ψ) Set.univ).toReal / (2 * π) ^ 2) /\n (1 + ‖u‖ ^ 2) := by\n rw [le_div_iff₀' <| one_add_sq_pos ‖u‖]\n by_cases hu : u = 0\n · subst hu\n simp only [norm_zero, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true, zero_pow, add_zero,\n one_mul]\n calc ‖𝓕 ψ 0‖ ≤ ∫ t, ‖ψ t‖ := prelim_decay ψ 0\n _ ≤ (∫ t, ‖ψ t‖) + (eVariationOn (deriv ψ) Set.univ).toReal / (2 * π) ^ 2 := by\n have : 0 ≤ (eVariationOn (deriv ψ) Set.univ).toReal / (2 * π) ^ 2 := by positivity\n linarith\n · have bound1 : ‖𝓕 ψ u‖ ≤ ∫ t, ‖ψ t‖ := prelim_decay ψ u\n have bound2 : ‖𝓕 ψ u‖ ≤ (eVariationOn (deriv ψ) Set.univ).toReal / (2 * π * ‖u‖) ^ 2 :=\n prelim_decay_3 ψ hψ habscont hvar u hu\n have : (2 * π * ‖u‖) ^ 2 = (2 * π) ^ 2 * ‖u‖ ^ 2 := by ring\n calc (1 + ‖u‖ ^ 2) * ‖𝓕 ψ u‖\n = ‖𝓕 ψ u‖ * 1 + ‖𝓕 ψ u‖ * ‖u‖ ^ 2 := by ring\n _ ≤ (∫ t, ‖ψ t‖) * 1 +\n (eVariationOn (deriv ψ) Set.univ).toReal / (2 * π * ‖u‖) ^ 2 * ‖u‖ ^ 2 := by\n gcongr\n _ = (∫ t, ‖ψ t‖) + (eVariationOn (deriv ψ) Set.univ).toReal / (2 * π) ^ 2 := by\n rw [mul_one, this, div_mul_eq_div_div]\n congr 1\n rw [div_mul_eq_mul_div, div_eq_iff (pow_ne_zero 2 <| norm_ne_zero_iff.mpr hu)]\n\nlemma decay_bounds_key (f : W21) (u : ℝ) : ‖𝓕 (f : ℝ → ℂ) u‖ ≤ ‖f‖ * (1 + u ^ 2)⁻¹ := by\n","line":346,"end_line":383,"proof_status":"formalized"} {"id":"Dusart_prop_4_4","label":"Dusart_prop_4_4","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"For \\(x {\\gt} 0\\), we have \\[ \\psi (x) - \\vartheta (x) - \\vartheta (\\sqrt{x}) {\\lt} 1.777745 x^{1/3}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_4_4","latex_link":"secondary-chapter.html#Dusart_prop_4_4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_4_4","lean_decl_name":"Dusart.proposition_4_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_4_4\"\n (title := \"Dusart Proposition 4.4\")\n (statement := /--\n For $x > 0$, we have\n \\[\n \\psi(x) - \\vartheta(x) - \\vartheta(\\sqrt{x}) < 1.777745 x^{1/3}.\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_4_4 {x : ℝ} (hx : x > 0) :\n ψ x - θ x - θ (sqrt x) < 1.777745 * x ^ (1 / 3 : ℝ) := by sorry\n","line":182,"end_line":192,"proof_status":"formalized"} {"id":"ZetaNoZerosOn1Line","label":"ZetaNoZerosOn1Line","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The zeta function does not vanish on the 1-line.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNoZerosOn1Line","latex_link":"sect0003.html#ZetaNoZerosOn1Line","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNoZerosOn1Line","lean_decl_name":"ZetaNoZerosOn1Line","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaNoZerosOn1Line\")\n (statement := /-- The zeta function does not vanish on the 1-line. -/)\n (proof := /-- This fact is already proved in Stoll's work. -/)]\nlemma ZetaNoZerosOn1Line (t : ℝ) : ζ (1 + t * I) ≠ 0 := by\n refine riemannZeta_ne_zero_of_one_le_re ?_\n simp\n","line":3256,"end_line":3262,"proof_status":"formalized"} {"id":"SmoothedChebyshevPull1","label":"SmoothedChebyshevPull1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ResidueTheoremOnRectangleWithSimplePole","I2","I1","SmoothedChebyshev","I37","I8","I9","SmoothedChebyshevPull1_aux_integrable","ResidueMult","riemannZetaLogDerivResidue","BddAbove_to_IsBigO"],"nlp_text":"We have that \\[ \\psi _{\\epsilon }(X) = \\mathcal{M}(\\widetilde{1_{\\epsilon }})(1) X^{1} + I_1 - I_2 +I_{37} + I_8 + I_9 . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull1","latex_link":"sect0003.html#SmoothedChebyshevPull1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull1","lean_decl_name":"SmoothedChebyshevPull1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevPull1\")\n (statement := /--\n We have that\n $$\\psi_{\\epsilon}(X) =\n \\mathcal{M}(\\widetilde{1_{\\epsilon}})(1)\n X^{1} +\n I_1 - I_2 +I_{37} + I_8 + I_9\n .\n $$\n -/)\n (proof := /-- Pull rectangle contours and evaluate the pole at $s=1$. -/)]\ntheorem SmoothedChebyshevPull1 {SmoothingF : ℝ → ℝ} {ε : ℝ} (ε_pos : 0 < ε)\n (ε_lt_one : ε < 1)\n (X : ℝ) (X_gt : 3 < X)\n {T : ℝ} (T_pos : 0 < T) {σ₁ : ℝ}\n (σ₁_pos : 0 < σ₁) (σ₁_lt_one : σ₁ < 1)\n (holoOn : HolomorphicOn (ζ' / ζ) ((Icc σ₁ 2) ×ℂ (Icc (-T) T) \\ {1}))\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x)\n (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) :\n SmoothedChebyshev SmoothingF ε X =\n I₁ SmoothingF ε X T -\n I₂ SmoothingF ε T X σ₁ +\n I₃₇ SmoothingF ε T X σ₁ +\n I₈ SmoothingF ε T X σ₁ +\n I₉ SmoothingF ε X T\n + 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) 1 * X := by\n unfold SmoothedChebyshev\n unfold VerticalIntegral'\n have X_eq_gt_one : 1 < 1 + (Real.log X)⁻¹ := by\n nth_rewrite 1 [← add_zero 1]\n bound\n have X_eq_lt_two : (1 + (Real.log X)⁻¹) < 2 := by\n rw[← one_add_one_eq_two]\n gcongr\n exact inv_lt_one_of_one_lt₀ <| logt_gt_one X_gt.le\n have X_eq_le_two : 1 + (Real.log X)⁻¹ ≤ 2 := X_eq_lt_two.le\n rw [verticalIntegral_split_three (a := -T) (b := T)]\n swap\n · exact SmoothedChebyshevPull1_aux_integrable ε_pos ε_lt_one X_gt X_eq_gt_one\n X_eq_le_two suppSmoothingF SmoothingFnonneg mass_one ContDiffSmoothingF\n · have temp : ↑(1 + (Real.log X)⁻¹) = (1 : ℂ) + ↑(Real.log X)⁻¹ := by simp\n unfold I₁\n simp only [smul_eq_mul, mul_add, temp, sub_eq_add_neg, add_assoc, add_left_cancel_iff]\n unfold I₉\n nth_rewrite 6 [add_comm]\n simp only [← add_assoc]\n rw [add_right_cancel_iff,\n ← add_right_inj (1 / (2 * ↑π * I) *\n -VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) (1 + (Real.log X)⁻¹) (-T) T),\n ← mul_add, ← sub_eq_neg_add, sub_self, mul_zero]\n unfold VIntegral I₂ I₃₇ I₈\n simp only [smul_eq_mul, temp, ← add_assoc, ← mul_neg, ← mul_add]\n let fTempRR : ℝ → ℝ → ℂ := fun x ↦ fun y ↦\n SmoothedChebyshevIntegrand SmoothingF ε X ((x : ℝ) + (y : ℝ) * I)\n let fTempC : ℂ → ℂ := fun z ↦ fTempRR z.re z.im\n have : ∫ (y : ℝ) in -T..T,\n SmoothedChebyshevIntegrand SmoothingF ε X (1 + ↑(Real.log X)⁻¹ + ↑y * I) =\n ∫ (y : ℝ) in -T..T, fTempRR (1 + (Real.log X)⁻¹) y := by\n unfold fTempRR\n simp only [temp]\n rw[this]\n have : ∫ (σ₀ : ℝ) in σ₁..1 + (Real.log X)⁻¹,\n SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₀ - ↑T * I) =\n ∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x (-T) := by\n unfold fTempRR\n simp only [ofReal_neg, neg_mul, sub_eq_add_neg]\n rw[this]\n have : ∫ (t : ℝ) in -T..T,\n SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₁ + ↑t * I) =\n ∫ (y : ℝ) in -T..T, fTempRR σ₁ y := by rfl\n rw[this]\n have : ∫ (σ₀ : ℝ) in σ₁..1 + (Real.log X)⁻¹,\n SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₀ + ↑T * I) =\n ∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x T := by rfl\n rw[this]\n have : (((I * -∫ (y : ℝ) in -T..T, fTempRR (1 + (Real.log X)⁻¹) y) +\n -∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x (-T)) +\n I * ∫ (y : ℝ) in -T..T, fTempRR σ₁ y) +\n ∫ (x : ℝ) in σ₁..1 + (Real.log X)⁻¹, fTempRR x T =\n -(2 * ↑π * I) * RectangleIntegral' fTempC (σ₁ - T * I) (1 + ↑(Real.log X)⁻¹ + T * I) := by\n unfold RectangleIntegral' RectangleIntegral HIntegral VIntegral fTempC\n simp only [mul_neg, one_div, mul_inv_rev, inv_I, neg_mul, sub_im, ofReal_im, mul_im,\n ofReal_re, I_im, mul_one, I_re, mul_zero, add_zero, zero_sub, ofReal_neg, add_re,\n neg_re, mul_re, sub_self, neg_zero, add_im, neg_im, zero_add, sub_re, sub_zero,\n ofReal_inv, one_re, inv_re, normSq_ofReal, div_self_mul_self', one_im, inv_im,\n zero_div, ofReal_add, ofReal_one, smul_eq_mul, neg_neg]\n ring_nf\n simp only [I_sq, neg_mul, one_mul, ne_eq, ofReal_eq_zero, pi_ne_zero, not_false_eq_true,\n mul_inv_cancel_right₀, sub_neg_eq_add, I_pow_three]\n ring_nf\n rw[this]\n field_simp\n rw[mul_comm, eq_comm, neg_add_eq_zero]\n\n have pInRectangleInterior :\n (Rectangle (σ₁ - ↑T * I) (1 + (Real.log X)⁻¹ + T * I) ∈ nhds 1) := by\n refine rectangle_mem_nhds_iff.mpr ?_\n refine mem_reProdIm.mpr ?_\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal, div_self_mul_self', add_zero,\n sub_im, mul_im, zero_sub, add_im, one_im, inv_im, neg_zero, zero_div, zero_add]\n constructor\n · unfold uIoo\n rw [min_eq_left (by linarith), max_eq_right (by linarith)]\n exact mem_Ioo.mpr ⟨σ₁_lt_one, (by linarith)⟩\n · unfold uIoo\n rw [min_eq_left (by linarith), max_eq_right (by linarith)]\n exact mem_Ioo.mpr ⟨(by linarith), (by linarith)⟩\n\n apply ResidueTheoremOnRectangleWithSimplePole'\n · simp; linarith\n · simp; linarith\n · simp only [one_div]\n exact pInRectangleInterior\n · apply DifferentiableOn.mul\n · apply DifferentiableOn.mul\n · simp only [re_add_im]\n have : (fun z ↦ -ζ' z / ζ z) = -(ζ' / ζ) := by ext; simp; ring\n rw [this]\n apply DifferentiableOn.neg\n apply holoOn.mono\n apply diff_subset_diff_left\n apply reProdIm_subset_iff'.mpr\n left\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, one_div, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal,\n div_self_mul_self', add_zero, sub_im, mul_im, zero_sub, add_im, one_im, inv_im,\n neg_zero, zero_div, zero_add]\n constructor <;> apply uIcc_subset_Icc <;> constructor <;> linarith\n · intro s hs\n apply DifferentiableAt.differentiableWithinAt\n simp only [re_add_im]\n apply Smooth1MellinDifferentiable ContDiffSmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩\n SmoothingFnonneg mass_one\n have := mem_reProdIm.mp hs.1 |>.1\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, one_div, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal,\n div_self_mul_self', add_zero] at this\n rw [uIcc_of_le (by linarith)] at this\n linarith [this.1]\n · intro s hs\n apply DifferentiableAt.differentiableWithinAt\n simp only [re_add_im]\n apply DifferentiableAt.const_cpow (by fun_prop)\n left\n norm_cast\n linarith\n · let U : Set ℂ := Rectangle (σ₁ - ↑T * I) (1 + (Real.log X)⁻¹ + T * I)\n let f : ℂ → ℂ := fun z ↦ -ζ' z / ζ z\n let g : ℂ → ℂ := fun z ↦ 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) z * ↑X ^ z\n unfold fTempC fTempRR SmoothedChebyshevIntegrand\n simp only [re_add_im]\n have g_holc : HolomorphicOn g U := by\n intro u uInU\n apply DifferentiableAt.differentiableWithinAt\n simp only [g]\n apply DifferentiableAt.mul\n · apply Smooth1MellinDifferentiable ContDiffSmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩\n SmoothingFnonneg mass_one\n simp only [ofReal_inv, U] at uInU\n unfold Rectangle at uInU\n rw[Complex.mem_reProdIm] at uInU\n have := uInU.1\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, add_re, one_re, inv_re, normSq_ofReal, div_self_mul_self', add_zero] at this\n rw [uIcc_of_le (by linarith)] at this\n linarith [this.1]\n · unfold HPow.hPow instHPow\n apply DifferentiableAt.const_cpow differentiableAt_fun_id\n left\n norm_cast\n linarith\n have f_near_p : (f - fun (z : ℂ) => 1 * (z - 1)⁻¹) =O[nhdsWithin 1 {1}ᶜ] (1 : ℂ → ℂ) := by\n simp only [one_mul, f]\n exact riemannZetaLogDerivResidueBigO\n convert ResidueMult g_holc pInRectangleInterior f_near_p using 1\n ext\n simp [f, g]\n ring\n","line":1161,"end_line":1342,"proof_status":"formalized"} {"id":"StrongPNT","label":"StrongPNT","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["I5NewBound","SmoothedChebyshevPull3","I4NewBound","MellinOfSmooth1c","SmoothedChebyshevClose","I3NewBound"],"nlp_text":"We have \\[ \\sum _{n\\leq x}\\Lambda (n)=x+O\\left(x\\exp (-c\\sqrt{\\log x})\\right). \\]","doc_url":null,"latex_link":"sect0004.html#StrongPNT","lean_link":null,"lean_decl_name":"StrongPNT","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"fks-theorem-1-2b","label":"fks-theorem-1-2b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["classical-bound-psi"],"nlp_text":"If \\(\\log x_0 \\geq 1000\\) then we have an admissible bound for \\(E_\\psi \\) with the indicated choice of \\(A(x_0)\\), \\(B = 3/2\\), \\(C = 2\\), and \\(R = 5.5666305\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_1_2b","latex_link":"primary-chapter.html#fks-theorem-1-2b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_1_2b","lean_decl_name":"FKS.theorem_1_2b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-theorem-1-2b\"\n (title := \"FKS Theorem 1.2b\")\n (statement := /--\n If $\\log x_0 \\geq 1000$ then we have an admissible bound for $E_\\psi$ with the indicated choice\n of $A(x_0)$, $B = 3/2$, $C = 2$, and $R = 5.5666305$.\n -/)]\ntheorem theorem_1_2b (x₀ : ℝ) (h : log x₀ ≥ 1000) :\n Eψ.classicalBound (A x₀) (3 / 2) 2 5.5666305 x₀ := by sorry\n","line":619,"end_line":627,"proof_status":"formalized"} {"id":"bklnw-cor-5-1","label":"bklnw-cor-5-1","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-def-a-2","bklnw-def-a-1","bklnw-inputs"],"nlp_text":"Let \\(b \\geq 7\\). Then for all \\(x \\geq e^b\\) we have \\(\\psi (x) - \\vartheta (x) {\\lt} a_1 x^{1/2} + a_2 x^{1/3}\\), where \\(a_1 = a_1(b) = 1 + 1.93378 \\times 10^{-8}\\) if \\(b \\leq 38 \\log 10\\), \\(1 + \\varepsilon (b/2)\\) if \\(b {\\gt} 38 \\log 10\\), and \\(a_2 = a_2(b) = (1 + 1.93378 \\times 10^{-8}) \\max \\left( f(e^b), f(2^{\\lfloor \\frac{b}{\\log 2} \\rfloor + 1}) \\right)\\), where \\(f\\) is defined by (2.4) and values for \\(\\varepsilon (b/2)\\) are from Table 8.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.cor_5_1","latex_link":"secondary-chapter.html#bklnw-cor-5-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.cor_5_1","lean_decl_name":"BKLNW.cor_5_1","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" (log 5e5, ![2.6724e-2, 3.5744e-1, 4.7808e0, 6.3944e1, 1.3441e5]),\n (log 1e6, ![2.3240e-2, 3.2309e-1, 4.4916e0, 6.2444e1, 1.3441e5]),\n (log 5e6, ![1.0236e-2, 1.5952e-1, 2.4860e0, 5.7184e1, 1.3441e5]),\n (log 1e7, ![8.4725e-3, 1.3675e-1, 2.2071e0, 5.7184e1, 1.3441e5]),\n (log 5e7, ![3.8550e-3, 6.8701e-2, 1.2244e0, 5.7184e1, 1.3441e5]),\n (log 1e8, ![2.7457e-3, 5.0612e-2, 9.4259e-1, 5.7184e1, 1.3441e5]),\n (log 1e9, ![9.5913e-4, 2.0087e-2, 4.2065e-1, 5.7184e1, 1.3441e5]),\n (log 1e10, ![3.7787e-4, 8.7526e-3, 2.0274e-1, 5.7184e1, 1.3441e5]),\n","line":466,"end_line":473,"proof_status":"statement_formalized"} {"id":"rs-417","label":"rs-417","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"\\[ \\pi (x) = \\frac{\\vartheta (x)}{\\log x} + \\int _2^x \\frac{\\vartheta (y)\\ dy}{y \\log ^2 y}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_417","latex_link":"secondary-chapter.html#rs-417","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_417","lean_decl_name":"RS_prime.eq_417","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"theorem eq_417 {x : ℝ} (hx : 2 ≤ x) :\n pi x = θ x / log x + ∫ y in 2..x, θ y / (y * log y ^ 2) := by\n exact Chebyshev.primeCounting_eq_theta_div_log_add_integral hx\n\n","line":188,"end_line":191,"proof_status":"formalized"} {"id":"fks2-eq-17","label":"fks2-eq-17","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["rs-417","li-def"],"nlp_text":"For any \\(2 \\leq x_0 {\\lt} x\\) one has \\[ (\\pi (x) - \\operatorname {Li}(x)) - (\\pi (x_0) - \\operatorname {Li}(x_0)) = \\frac{\\theta (x) - x}{\\log x} - \\frac{\\theta (x_0) - x_0}{\\log x_0} + \\int _{x_0}^x \\frac{\\theta (t) - t}{t \\log ^2 t} dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.eq_17","latex_link":"secondary-chapter.html#fks2-eq-17","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.eq_17","lean_decl_name":"FKS2.eq_17","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"theorem eq_17 {x₀ x : ℝ} (hx₀ : 2 ≤ x₀) (hx : x₀ < x) :\n (pi x - Li x) - (pi x₀ - Li x₀) =\n (θ x - x) / log x - (θ x₀ - x₀) / log x₀ +\n ∫ t in x₀..x, (θ t - t) / (t * log t ^ 2) :=\n have px : 2 ≤ x := by linarith\n have l0 {x} (hx : 2 ≤ x) : ContinuousOn (fun t ↦ (t * log t ^ 2)⁻¹) (Set.uIcc 2 x) := by\n refine ContinuousOn.inv₀ (continuousOn_id.mul (ContinuousOn.pow (ContinuousOn.log\n continuousOn_id fun y hy => ?_) 2)) fun y hy => ?_\n repeat simp_all; grind\n have l1 {x} (hx : 2 ≤ x) : IntervalIntegrable (fun t ↦ θ t / (t * log t ^ 2)) volume 2 x := by\n simpa [div_eq_mul_inv] using IntervalIntegrable.mul_continuousOn\n theta_mono.intervalIntegrable (l0 hx)\n have l2 {x} (hx : 2 ≤ x) : IntervalIntegrable (fun t ↦ t / (t * log t ^ 2)) volume 2 x := by\n simpa [div_eq_mul_inv] using IntervalIntegrable.mul_continuousOn\n intervalIntegral.intervalIntegrable_id (l0 hx)\n have hL {x} (hx : 2 ≤ x) : Li x = x / log x - 2 / log 2 + ∫ t in 2..x, 1 / (log t ^ 2) := by\n have hnt {t} (ht : t ∈ Set.uIcc 2 x) : t ≠ 0 := by simp_all; linarith\n rw [Li, funext fun t => (mul_one (1 / log t)).symm,\n intervalIntegral.integral_mul_deriv_eq_deriv_mul (u := fun t => 1 / log t)\n (u' := fun t => -(1 / t) / log t ^ 2) _ (fun t _ => hasDerivAt_id' t) _\n intervalIntegrable_const]\n · suffices ∫ (x : ℝ) in 2..x, - (1 / x) / log x ^ 2 * x\n = ∫ (x : ℝ) in 2..x, - (1 / (log x ^ 2)) from by\n rw [this, intervalIntegral.integral_neg]; ring\n refine intervalIntegral.integral_congr fun t ht => ?_\n ring_nf\n rw [mul_inv_cancel₀ (hnt ht), one_mul]\n · intro t ht\n simpa using HasDerivAt.inv (hasDerivAt_log (hnt ht)) (by simp_all; grind)\n · simp only [neg_div, div_div]\n simpa using (l0 hx).intervalIntegrable.neg\n have he {x} (hx : 2 ≤ x) : pi x - Li x = (θ x - x) / log x + 2 / log 2\n + ∫ t in 2..x, (θ t - t) / (t * log t ^ 2) := by\n simp only [RS_prime.eq_417 hx, hL hx, sub_div, intervalIntegral.integral_sub (l1 hx) (l2 hx)]\n rw [intervalIntegral.integral_congr fun t ht => div_mul_cancel_left₀ _ ((log t) ^ 2)]\n · ring_nf\n · simp_all; grind\n calc\n _ = (θ x - x) / log x - (θ x₀ - x₀) / log x₀ + ((∫ t in 2..x, (θ t - t) / (t * log t ^ 2)) -\n ∫ t in 2..x₀, (θ t - t) / (t * log t ^ 2)) := by rw [he px, he hx₀]; ring\n _ = (θ x - x) / log x - (θ x₀ - x₀) / log x₀ + ∫ t in x₀..x, (θ t - t) / (t * log t ^ 2) := by\n rw [intervalIntegral.integral_interval_sub_left]\n · simpa [sub_div] using IntervalIntegrable.sub (l1 px) (l2 px)\n · simpa [sub_div] using IntervalIntegrable.sub (l1 hx₀) (l2 hx₀)\n\n","line":50,"end_line":94,"proof_status":"formalized"} {"id":"buthe-eq-1-4","label":"buthe-eq-1-4","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"\\(\\pi ^*(x) = \\sum _{k \\geq 1} \\pi (x^{1/k}) / k\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.pi_star","latex_link":"secondary-chapter.html#buthe-eq-1-4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.pi_star","lean_decl_name":"Buthe.pi_star","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Buthe.lean","lean4_code":"@[blueprint\n \"buthe-eq-1-4\"\n (title := \"Buthe Equation (1.4)\")\n (statement := /-- $\\pi^*(x) = \\sum_{k \\geq 1} \\pi(x^{1/k}) / k$. --/)]\nnoncomputable def pi_star (x : ℝ) : ℝ :=\n ∑' (k : ℕ), pi (x ^ (1 / (k:ℝ))) / (k:ℝ)\n","line":17,"end_line":22,"proof_status":"formalized"} {"id":"buthe-theorem-2d","label":"buthe-theorem-2d","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["buthe-eq-1-4","li-def"],"nlp_text":"If \\(2 \\leq x \\leq 10^{19}\\), then \\(|\\operatorname {li}(x) - \\pi ^*(x)| {\\lt} \\frac{\\sqrt{x}}{\\log x}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2d","latex_link":"secondary-chapter.html#buthe-theorem-2d","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2d","lean_decl_name":"Buthe.theorem_2d","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Buthe.lean","lean4_code":"@[blueprint\n \"buthe-theorem-2d\"\n (title := \"Buthe Theorem 2(d)\")\n (statement := /-- If $2 \\leq x \\leq 10^{19}$, then $|\\mathrm{li}(x) - \\pi^*(x)| < \\frac{\\sqrt{x}}{\\log x}$. --/)\n (latexEnv := \"theorem\")]\ntheorem theorem_2d {x : ℝ} (hx1 : 2 ≤ x) (hx2 : x ≤ 10 ^ 19) :\n abs (li x - pi_star x) < sqrt x / log x := by sorry\n","line":48,"end_line":54,"proof_status":"formalized"} {"id":"lcm-criterion","label":"lcm-criterion","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"In the next few subsections we assume that \\(n \\geq 1\\) and that \\(p_1,p_2,p_3,q_1,q_2,q_3\\) are primes satisfiying \\[ \\sqrt{n} {\\lt} p_1 {\\lt} p_2 {\\lt} p_3 {\\lt} q_1 {\\lt} q_2 {\\lt} q_3 {\\lt} n \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion","latex_link":"tertiary-chapter.html#lcm-criterion","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion","lean_decl_name":"Lcm.Criterion","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lcm-criterion\"\n (statement := /--\n In the next few subsections we assume that $n \\geq 1$ and that \\(p_1,p_2,p_3,q_1,q_2,q_3\\) are\n primes satisfiying\n \\[\n \\sqrt{n} < p_1 < p_2 < p_3 < q_1 < q_2 < q_3 < n\n \\]\n and the key criterion\n \\begin{equation}\\label{eq:main-ineq}\n \\prod_{i=1}^3\\Bigl(1+\\frac{1}{q_i}\\Bigr)\n \\le\n \\Biggl( \\prod_{i=1}^3 \\Bigl(1+\\frac{1}{p_i(p_i+1)}\\Bigr) \\Biggr)\n \\Bigl(1 + \\frac{3}{8n}\\Bigr)\n \\Biggl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Biggr).\n \\end{equation}\n\n NOTE: In the Lean formalization of this argument, we index the primes from 0 to 2 rather than\n from 1 to 3.\n -/)]\nstructure Criterion where\n n : ℕ\n hn : n ≥ 1\n p : Fin 3 → ℕ\n hp : ∀ i, Nat.Prime (p i)\n hp_mono : StrictMono p\n q : Fin 3 → ℕ\n hq : ∀ i, Nat.Prime (q i)\n hq_mono : StrictMono q\n h_ord_1 : √(n : ℝ) < p 0\n h_ord_2 : p 2 < q 0\n h_ord_3 : q 2 < n\n h_crit : ∏ i, (1 + (1 : ℝ) / q i) ≤\n (∏ i, (1 + (1 : ℝ) / (p i * (p i + 1)))) * (1 + (3 : ℝ) / (8 * n)) *\n (1 - 4 * (∏ i, (p i : ℝ)) / ∏ i, (q i : ℝ))\n","line":88,"end_line":122,"proof_status":"formalized"} {"id":"lem:Lprime-def","label":"Lprime-def","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lcm-criterion","Ln-def"],"nlp_text":"There exists a positive integer \\(L'\\) such that \\[ L_n = q_1 q_2 q_3 \\, L' \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.ln_eq","latex_link":"tertiary-chapter.html#lem:Lprime-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.ln_eq","lean_decl_name":"Lcm.Criterion.ln_eq","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:Lprime-def\"\n (title := \"Factorisation of \\\\(L_n\\\\)\")\n (statement := /--\n There exists a positive integer \\(L'\\) such that\n \\[\n L_n = q_1 q_2 q_3 \\, L'\n \\]\n and each prime \\(q_i\\) divides \\(L_n\\) exactly once and does not divide \\(L'\\).\n -/)\n (proof := /--\n Since \\(q_i < n\\), the prime \\(q_i\\) divides \\(L_n\\) exactly once (as \\(q_i^2 > n\\)).\n Hence we may write \\(L_n = q_1 q_2 q_3 L'\\) where \\(L'\\) is the quotient obtained by removing\n these prime factors. By construction, \\(q_i \\nmid L'\\) for each \\(i\\).\n -/)\n (latexEnv := \"lemma\")]\ntheorem Criterion.ln_eq (c : Criterion) : L c.n = c.q 0 * c.q 1 * c.q 2 * c.L' := by\n rw [L', ← Fin.prod_univ_three, Nat.mul_div_cancel' <| Fintype.prod_dvd_of_isRelPrime ?_ ?_]\n · refine fun i j h ↦ Nat.coprime_iff_isRelPrime.mp ?_\n exact Nat.coprime_primes (c.hq i) (c.hq j) |>.mpr <| c.hq_mono.injective.ne h\n refine fun i ↦\n Finset.dvd_lcm <| Finset.mem_Icc.mpr ⟨c.hq i |>.one_le, le_trans ?_ c.h_ord_3.le⟩\n exact c.hq_mono.monotone <| Fin.le_last i","line":267,"end_line":289,"proof_status":"formalized"} {"id":"div-remainder","label":"div-remainder","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lcm-criterion"],"nlp_text":"There exist integers \\(m \\ge 0\\) and \\(r\\) satisfying \\(0 {\\lt} r {\\lt} 4 p_1 p_2 p_3\\) and \\[ q_1 q_2 q_3 = 4 p_1 p_2 p_3 m + r \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.r_ge","latex_link":"tertiary-chapter.html#div-remainder","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.r_ge","lean_decl_name":"Lcm.Criterion.r_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"div-remainder\"\n (statement := /--\n There exist integers \\(m \\ge 0\\) and \\(r\\) satisfying \\(0 < r < 4 p_1 p_2 p_3\\) and\n \\[q_1 q_2 q_3 = 4 p_1 p_2 p_3 m + r \\]\n -/)\n (proof := /-- This is division with remainder. -/)\n (latexEnv := \"lemma\")]\ntheorem Criterion.r_ge (c : Criterion) : 0 < c.r := by\n simp only [r, Nat.pos_iff_ne_zero, ne_eq]\n intro h\n have h_dvd : c.p 2 ∣ ∏ i, c.q i :=\n (Finset.dvd_prod_of_mem _ (Finset.mem_univ 2)).trans <|\n (Nat.dvd_mul_left _ 4).trans (Nat.dvd_of_mod_eq_zero h)\n obtain ⟨i, _, hi⟩ := (c.hp 2).prime.exists_mem_finset_dvd h_dvd\n have : c.p 2 = c.q i := ((c.hq i).dvd_iff_eq (c.hp 2).ne_one).mp hi |>.symm\n exact absurd this (c.h_ord_2.trans_le (c.hq_mono.monotone (zero_le i))).ne","line":403,"end_line":419,"proof_status":"formalized"} {"id":"lcm-M-def","label":"lcm-M-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lcm-criterion","Ln-def"],"nlp_text":"With \\(m,r\\) as above, define the competitor \\[ M := 4 p_1 p_2 p_3 m L'. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.M","latex_link":"tertiary-chapter.html#lcm-M-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.M","lean_decl_name":"Lcm.Criterion.M","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":" \\item \\(M < L_n\\).\n \\item\n \\[\n 1 < \\frac{L_n}{M} = \\Bigl(1 - \\frac{r}{q_1 q_2 q_3}\\Bigr)^{-1}\n < \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)^{-1}.\n \\]\n \\end{enumerate}\n -/)\n (proof := /--\n","line":447,"end_line":455,"proof_status":"formalized"} {"id":"lem:4p3q3","label":"4p3q3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lcm-criterion"],"nlp_text":"We have \\(4 p_1 p_2 p_3 {\\lt} q_1 q_2 q_3\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.prod_p_le_prod_q","latex_link":"tertiary-chapter.html#lem:4p3q3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.prod_p_le_prod_q","lean_decl_name":"Lcm.Criterion.prod_p_le_prod_q","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:4p3q3\"\n (statement := /-- We have $4 p_1 p_2 p_3 < q_1 q_2 q_3$. -/)\n (proof := /-- Obvious from the non-negativity of the left-hand side of \\eqref{eq:main-ineq}. -/)\n (latexEnv := \"lemma\")]\ntheorem Criterion.prod_p_le_prod_q (c : Criterion) : 4 * ∏ i, c.p i < ∏ i, c.q i := by\n have hBC_pos : 0 < (∏ i, (1 + (1 : ℝ) / (c.p i * (c.p i + 1)))) * (1 + 3 / (8 * c.n)) := by\n positivity\n have hR_pos : 0 < 1 - 4 * (∏ i, (c.p i : ℝ)) / ∏ i, (c.q i : ℝ) := by\n by_contra h\n exact absurd (c.h_crit.trans (mul_nonpos_of_nonneg_of_nonpos hBC_pos.le (not_lt.mp h)))\n (not_le.mpr <| prod_pos fun i _ ↦ by positivity)\n rw [sub_pos, div_lt_one <| prod_pos fun i _ ↦ cast_pos.mpr (c.hq i).pos] at hR_pos\n exact_mod_cast hR_pos","line":124,"end_line":137,"proof_status":"formalized"} {"id":"prop:ineq-holds-large-n","label":"ineq-holds-large-n","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lcm-criterion","lem:eps-bounds","lem:pi-product","lem:final-comparison","lem:qi-product","lem:pq-ratio","lem:poly-ineq"],"nlp_text":"For every integer \\(n \\ge X_0^2 = 89693^2 \\approx 8.04\\times 10^9\\), the primes \\(p_i,q_i\\) constructed in Lemmas 10.1.9 and 10.1.10 satisfy the inequality 1.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.mk'","latex_link":"tertiary-chapter.html#prop:ineq-holds-large-n","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.mk'","lean_decl_name":"Lcm.Criterion.mk'","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"prop:ineq-holds-large-n\"\n (title := \"Verification of \\\\eqref{eq:main-ineq} for large \\\\(n\\\\)\")\n (statement := /-- For every integer \\(n \\ge X_0^2 = 89693^2 \\approx 8.04\\times 10^9\\), the\n primes \\(p_i,q_i\\) constructed in Lemmas~\\ref{lem:choose-pi} and \\ref{lem:choose-qi} satisfy the\n inequality \\eqref{eq:main-ineq}. -/)\n (proof := /-- Combine Lemma~\\ref{lem:qi-product}, Lemma~\\ref{lem:pi-product}, and\n Lemma~\\ref{lem:pq-ratio}. Then apply Lemma~\\ref{lem:eps-bounds} and set \\(\\varepsilon = 1/n\\).\n The products are bounded by the expressions in Lemma~\\ref{lem:poly-ineq}, and the inequality in\n Lemma~\\ref{lem:final-comparison} then ensures that \\eqref{eq:main-ineq} holds. -/)\n (proofUses := [\"lem:eps-bounds\", \"lem:qi-product\", \"lem:final-comparison\", \"lem:poly-ineq\",\n \"lem:pq-ratio\", \"lem:pi-product\"])\n (latexEnv := \"proposition\")\n (discussion := 512)]\nnoncomputable def Criterion.mk' {n : ℕ} (hn : n ≥ X₀ ^ 2) : Criterion where\n n := n\n p := (exists_p_primes hn).choose\n q := (exists_q_primes hn).choose\n hn := le_trans (by decide : 1 ≤ 89693 ^ 2) hn\n hp := (exists_p_primes hn).choose_spec.1\n hp_mono := (exists_p_primes hn).choose_spec.2.1\n hq := (exists_q_primes hn).choose_spec.1\n hq_mono := (exists_q_primes hn).choose_spec.2.1\n h_ord_1 := (exists_p_primes hn).choose_spec.2.2.2\n h_ord_2 := by\n have hn_pos : (0 : ℝ) < n := by positivity\n have hp' : ((exists_p_primes hn).choose 2 : ℝ) ≤ √n * (1 + 1 / (log √n) ^ 3) ^ 3 := by\n convert (exists_p_primes hn).choose_spec.2.2.1 2 using 2; norm_cast\n have hq' : n * (1 + 1 / (log √n) ^ 3) ^ (-3 : ℝ) ≤ (exists_q_primes hn).choose 0 := by\n convert (exists_q_primes hn).choose_spec.2.2.1 0 using 2\n norm_num\n have hε_pos := hε_pos hn\n have hmid :\n √n * (1 + 1 / (log √n) ^ 3) ^ 3 < n * (1 + 1 / (log √n) ^ 3) ^ (-3 : ℝ) := by\n norm_cast\n norm_num [rpow_neg_one] at *\n rw [← div_eq_mul_inv, lt_div_iff₀ <| pow_pos hε_pos 3]\n have : (1 + ((log √n) ^ 3)⁻¹) ^ 6 < 2 :=\n calc (1 + ((log √n) ^ 3)⁻¹) ^ 6 < (1 + (11 ^ 3 : ℝ)⁻¹) ^ 6 := by gcongr; linarith [hlog hn]\n _ ≤ 2 := by norm_num\n nlinarith [mul_self_sqrt (Nat.cast_nonneg n), hsqrt_ge hn]\n exact_mod_cast hp'.trans_lt <| hmid.trans_le hq'\n h_ord_3 := (exists_q_primes hn).choose_spec.2.2.2\n h_crit := by\n have hn₀ : 0 ≤ Real.log √n := by\n grw [hn]\n simp [log_nonneg]\n have h₁ : 1 - (4 : ℝ) *\n (∏ i, (exists_p_primes hn).choose i : ℝ) / ∏ i, ((exists_q_primes hn).choose i : ℝ) ≥\n 1 - 4 * (1 + 0.000675) ^ 12 * ((1 / 89693) * (1 / n)) := by\n grw [pq_ratio_ge hn, inv_cube_log_sqrt_le hn, ← inv_n_pow_3_div_2_le hn]\n simp [field]\n have : 0 ≤ 1 - 4 * (1 + 0.000675 : ℝ) ^ 12 * ((1 / 89693) * (1 / n)) := by\n grw [hn]\n norm_num\n have := this.trans h₁\n have hn' : (0 : ℝ) ≤ 1 / ↑n ∧ (1 : ℝ) / ↑n ≤ 1 / 89693 ^ 2 := ⟨by simp, by grw [hn]; simp⟩\n grw [Lcm.prod_q_ge hn, Lcm.prod_p_ge hn, h₁]\n simp_rw [div_eq_mul_one_div (_ ^ (_ : ℝ) : ℝ) (n : ℝ),\n show 3 / (8 * n : ℝ) = 3 / 8 * (1 / n) by field_simp, ← one_div_mul_one_div]\n grw [inv_cube_log_sqrt_le hn, inv_n_add_sqrt_ge hn]\n set ε : ℝ := 1 / n\n calc\n _ ≤ ∏ i : Fin 3, (1 + (1 + 0.000675 : ℝ) ^ (i + 1 : ℝ) * ε) := by gcongr\n _ = ∏ i : Fin 3, (1 + (1.000675 : ℝ) ^ (i + 1 : ℝ) * ε) := by norm_num [div_eq_mul_inv]\n _ ≤ _ := (prod_epsilon_le (ε := ε) hn')\n _ ≤ _ := final_comparison hn'\n _ ≤ _ := by\n grw [← prod_epsilon_ge hn']\n apply le_of_eq\n simp [field]\n ring_nf","line":1580,"end_line":1651,"proof_status":"formalized"} {"id":"lem:sigmaLn","label":"sigmaLn","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:Lprime-def","sigma-def"],"nlp_text":"Let \\(L'\\) be as in Lemma 10.1.2. Then \\begin{equation} \\label{eq:sigmaLn} \\frac{\\sigma (L_n)}{L_n} \\; =\\; \\frac{\\sigma (L')}{L'} \\prod _{i=1}^3 \\Bigl(1 + \\frac{1}{q_i}\\Bigr). \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.σnorm_ln_eq","latex_link":"tertiary-chapter.html#lem:sigmaLn","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.σnorm_ln_eq","lean_decl_name":"Lcm.Criterion.σnorm_ln_eq","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:sigmaLn\"\n (title := \"Normalised divisor sum for \\\\(L_n\\\\)\")\n (statement := /--\n Let \\(L'\\) be as in Lemma~\\ref{lem:Lprime-def}. Then\n \\begin{equation}\\label{eq:sigmaLn}\n \\frac{\\sigma(L_n)}{L_n}\n \\;=\\;\n \\frac{\\sigma(L')}{L'} \\prod_{i=1}^3 \\Bigl(1 + \\frac{1}{q_i}\\Bigr).\n \\end{equation}\n -/)\n (proof := /--\n Use the multiplicativity of \\(\\sigma(\\cdot)\\) and the fact that each \\(q_i\\) occurs to the first\n power in \\(L_n\\). Then\n \\[\n \\sigma(L_n)\n = \\sigma(L') \\prod_{i=1}^3 \\sigma(q_i)\n = \\sigma(L') \\prod_{i=1}^3 (1+q_i).\n \\]\n Dividing by \\(L_n = L' \\prod_{i=1}^3 q_i\\) gives\n \\[\n \\frac{\\sigma(L_n)}{L_n}\n = \\frac{\\sigma(L')}{L'} \\prod_{i=1}^3 \\frac{1+q_i}{q_i}\n = \\frac{\\sigma(L')}{L'} \\prod_{i=1}^3 \\Bigl(1 + \\frac{1}{q_i}\\Bigr).\n \\]\n -/)\n (proofUses := [\"lem:Lprime-def\"])\n (latexEnv := \"lemma\")]\ntheorem Criterion.σnorm_ln_eq (c : Criterion) :\n σnorm (L c.n) = σnorm c.L' * ∏ i, (1 + (1 : ℝ) / c.q i) := by\n have hcop : ∀ i j, i ≠ j → (c.q i).Coprime (c.q j) := fun i j h ↦\n (coprime_primes (c.hq i) (c.hq j)).mpr (c.hq_mono.injective.ne h)\n have hcopL' : ∀ i, (c.q i).Coprime c.L' := fun i ↦\n (c.hq i).coprime_iff_not_dvd.mpr (c.q_not_dvd_L' i)\n have hσ_prime : ∀ i, sigma 1 (c.q i) = 1 + c.q i := fun i ↦ by\n rw [← pow_one (c.q i), sigma_one_apply_prime_pow (c.hq i), sum_range_succ, range_one,\n sum_singleton, pow_zero, pow_one]\n simp only [σnorm, σ, c.L_eq_prod_q_mul_L', Fin.prod_univ_three]\n rw [show c.q 0 * c.q 1 * c.q 2 * c.L' = (c.q 0 * c.q 1 * c.q 2) * c.L' by ring,\n isMultiplicative_sigma.map_mul_of_coprime (coprime_mul_iff_left.mpr\n ⟨coprime_mul_iff_left.mpr ⟨hcopL' 0, hcopL' 1⟩, hcopL' 2⟩),\n show c.q 0 * c.q 1 * c.q 2 = c.q 0 * (c.q 1 * c.q 2) by ring,\n isMultiplicative_sigma.map_mul_of_coprime (coprime_mul_iff_right.mpr\n ⟨hcop 0 1 Fin.zero_ne_one, hcop 0 2 <| not_eq_of_beq_eq_false rfl⟩),\n isMultiplicative_sigma.map_mul_of_coprime (hcop 1 2 <| not_eq_of_beq_eq_false rfl),\n hσ_prime, hσ_prime, hσ_prime]\n have hq_ne : ∀ i, (c.q i : ℝ) ≠ 0 := fun i ↦ (cast_pos.mpr (c.hq i).pos).ne'\n field_simp [hq_ne, (cast_pos.mpr c.L'_pos).ne']\n grind","line":349,"end_line":397,"proof_status":"formalized"} {"id":"lem:M-basic","label":"M-basic","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["div-remainder","lcm-M-def","lem:4p3q3"],"nlp_text":"With notation as above, we have: \\(M {\\lt} L_n\\). \\[ 1 {\\lt} \\frac{L_n}{M} = \\Bigl(1 - \\frac{r}{q_1 q_2 q_3}\\Bigr)^{-1} {\\lt} \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)^{-1}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.M_lt","latex_link":"tertiary-chapter.html#lem:M-basic","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.M_lt","lean_decl_name":"Lcm.Criterion.M_lt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:M-basic\"\n (title := \"Basic properties of \\\\(M\\\\)\")\n (statement := /--\n With notation as above, we have:\n \\begin{enumerate}\n \\item \\(M < L_n\\).\n \\item\n \\[\n 1 < \\frac{L_n}{M} = \\Bigl(1 - \\frac{r}{q_1 q_2 q_3}\\Bigr)^{-1}\n < \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)^{-1}.\n \\]\n \\end{enumerate}\n -/)\n (proof := /--\n The first item is by construction of the division algorithm.\n For the second, note that\n \\[\n L_n = q_1 q_2 q_3 L' = (4 p_1 p_2 p_3 m + r) L' > 4 p_1 p_2 p_3 m L' = M,\n \\]\n since \\(r>0\\). For the third,\n \\[\n \\frac{L_n}{M} = \\frac{4 p_1 p_2 p_3 m + r}{4 p_1 p_2 p_3 m}\n = 1 + \\frac{r}{4 p_1 p_2 p_3 m}\n = \\Bigl(1 - \\frac{r}{4 p_1 p_2 p_3 m + r}\\Bigr)^{-1}\n = \\Bigl(1 - \\frac{r}{q_1 q_2 q_3}\\Bigr)^{-1}.\n \\]\n Since \\(0 < r < 4p_1p_2p_3\\) and \\(4p_1p_2p_3 < q_1q_2q_3\\), we have\n \\[\n 0<\\frac{r}{q_1 q_2 q_3}<\\frac{4p_1p_2p_3}{q_1 q_2 q_3},\n \\]\n so\n \\[\n \\Bigl(1-\\frac{r}{q_1 q_2 q_3}\\Bigr)^{-1}\n < \\Bigl(1-\\frac{4p_1p_2p_3}{q_1 q_2 q_3}\\Bigr)^{-1}.\n \\]\n -/)\n (latexEnv := \"lemma\")]\ntheorem Criterion.M_lt (c : Criterion) : c.M < L c.n := by\n calc c.M < ((4 * ∏ i, c.p i) * c.m + c.r) * c.L' :=\n mul_lt_mul_of_pos_right (Nat.lt_add_of_pos_right c.r_ge) c.L'_pos\n _ = (∏ i, c.q i) * c.L' := by rw [← c.prod_q_eq]\n _ = L c.n := c.L_eq_prod_q_mul_L'.symm","line":502,"end_line":544,"proof_status":"formalized"} {"id":"lem:sigmaM-lower-final","label":"sigmaM-lower-final","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lcm-M-def","lem:4p3q3","sigma-def"],"nlp_text":"With notation as above, \\[ \\frac{\\sigma (M)}{M} \\ge \\frac{\\sigma (L')}{L'} \\Biggl( \\prod _{i=1}^3 \\Bigl(1 + \\frac{1}{p_i(p_i+1)}\\Bigr) \\Biggr) \\Bigl(1 + \\frac{3}{8n}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.σnorm_M_ge_σnorm_L'_mul","latex_link":"tertiary-chapter.html#lem:sigmaM-lower-final","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.σnorm_M_ge_σnorm_L'_mul","lean_decl_name":"Lcm.Criterion.σnorm_M_ge_σnorm_L'_mul","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint \"lem:sigmaM-lower-final\"\n (title := \"Lower bound for \\\\(\\\\sigma(M)/M\\\\)\")\n (statement := /--\n With notation as above,\n \\[\n \\frac{\\sigma(M)}{M}\n \\ge\n \\frac{\\sigma(L')}{L'}\n \\Biggl( \\prod_{i=1}^3 \\Bigl(1 + \\frac{1}{p_i(p_i+1)}\\Bigr) \\Biggr)\n \\Bigl(1 + \\frac{3}{8n}\\Bigr).\n \\]\n -/)\n (proof := /--\n By multiplicativity, we have\n $$\n \\frac{\\sigma(M)}{M}\n = \\frac{\\sigma(L')}{L'}\n \\prod_p \\frac{1+p^{-1}+\\dots+p^{-\\nu_p(M)}}{1+p^{-1}+\\dots+p^{-\\nu_p(L')}}.\n $$\n The contribution of $p=p_i$ is\n \\[\n \\frac{(1+p_i^{-1}+p_i^{-2})}{1+p^{-1}_i}\n = 1 + \\frac{1}{p_i(p_i+1)}.\n \\]\n The contribution of $p=2$ is\n \\[\n \\frac{1+2^{-1}+\\dots+2^{-k-2}}{1+2^{-1}+\\dots+2^{-k}},\n \\]\n where \\(k\\) is the largest integer such that \\(2^k \\le n\\).\n A direct calculation yields\n \\[\n \\frac{(1+2^{-1}+\\dots+2^{-k-2})}{1+2^{-1}+\\dots+2^{-k}}\n = \\frac{2^{k+3}-1}{2^{k+3}-4}\n = 1 + \\frac{3}{2^{k+3}-4},\n \\]\n Finally, since \\(2^k \\le n < 2^{k+1}\\), we have \\(2^{k+3} < 8n\\), so\n \\[\n \\frac{3}{2^{k+3}-4} \\ge \\frac{3}{8n},\n \\]\n So the contribution from the prime \\(2\\) is at least \\(1 + 3/(8n)\\).\n\n Finally, the contribution of all other primes is at least \\(1\\).\n -/)\n (latexEnv := \"lemma\")\n (discussion := 664)]\ntheorem Criterion.σnorm_M_ge_σnorm_L'_mul (c : Criterion) :\n σnorm c.M ≥\n σnorm c.L' * (∏ i, (1 + 1 / (c.p i * (c.p i + 1 : ℝ)))) * (1 + 3 / (8 * c.n)) := by\n have h_sigma_norm_M : (σnorm c.M) = (σnorm (c.L' : ℕ)) * (∏ p ∈ Nat.primeFactors c.M,\n ((∑ i ∈ Finset.range (Nat.factorization c.M p + 1), (1 / p : ℝ) ^ i) /\n (∑ i ∈ Finset.range (Nat.factorization (c.L' : ℕ) p + 1), (1 / p : ℝ) ^ i))) := by\n have h_sigma_norm_prod : ∀ {n : ℕ}, n ≠ 0 → (σnorm n : ℝ) = (∏ p ∈ Nat.primeFactors n,\n ((∑ i ∈ Finset.range (Nat.factorization n p + 1), (1 / p : ℝ) ^ i))) := by\n intro n hn_ne_zero\n have h_sigma_def : ((σ n) : ℝ) = (∏ p ∈ Nat.primeFactors n, (∑ i ∈ Finset.range\n (Nat.factorization n p + 1), (p ^ i : ℝ))) := by\n unfold σ\n have h_sigma_def : ∀ {n : ℕ}, n ≠ 0 → (Nat.divisors n).sum (fun d ↦ d) =\n ∏ p ∈ n.primeFactors, (∑ i ∈ Finset.range (Nat.factorization n p + 1), p ^ i) := by\n exact fun {n} a ↦ sum_divisors a\n convert congr_arg (( ↑ ) : ℕ → ℝ) (h_sigma_def hn_ne_zero) using 1 <;>\n norm_num [ArithmeticFunction.sigma]\n have h_sigma_def : (n : ℝ) = (∏ p ∈ Nat.primeFactors n, (p ^ (Nat.factorization n p) : ℝ)) :=\n mod_cast Eq.symm (Nat.factorization_prod_pow_eq_self hn_ne_zero)\n simp_all only [div_eq_mul_inv]\n rw [← div_eq_mul_inv, ← Finset.prod_div_distrib]\n refine Finset.prod_congr rfl fun p hp ↦ ?_\n field_simp\n rw [Finset.mul_sum _ _ _, ← Finset.sum_flip]\n exact Finset.sum_congr rfl fun i hi ↦ by\n rw [show ((1:ℝ) / ↑p) ^ i = 1 / ((↑p) ^ i) by simp]\n rw [mul_one_div, eq_div_iff (pow_ne_zero _ <| Nat.cast_ne_zero.mpr <| Nat.ne_of_gt <|\n Nat.pos_of_mem_primeFactors hp), ←pow_add, Nat.sub_add_cancel <|\n Finset.mem_range_succ_iff.mp hi]\n by_cases hM : c.M = 0 <;> by_cases hL' : c.L' = 0\n · simp_all\n · exact absurd hM (Nat.ne_of_gt (Criterion.M_pos c))\n · exact absurd hL' (Nat.ne_of_gt (Criterion.L'_pos c))\n · simp_all only [ne_eq, one_div, inv_pow, not_false_eq_true, prod_div_distrib]\n rw [mul_div, eq_div_iff]\n · rw [mul_comm, ← Finset.prod_subset (show c.L'.primeFactors ⊆ c.M.primeFactors from ?_)]\n · intro p hp hpn; rw [Nat.factorization_eq_zero_of_not_dvd] <;> aesop\n · intro p hp; simp_all only [mem_primeFactors, ne_eq, not_false_eq_true, and_true, true_and]\n exact dvd_trans hp.2 (by exact ⟨(4 * ∏ i, c.p i) * c.m, by rw [Criterion.M]; ring⟩)\n · exact Finset.prod_ne_zero_iff.mpr fun p hp ↦ ne_of_gt <| Finset.sum_pos\n (fun _ _ ↦ inv_pos.mpr <| pow_pos (Nat.cast_pos.mpr <| Nat.pos_of_mem_primeFactors hp) _)\n <| by norm_num\n have h_ratio_terms (p : ℕ) (hp : p ∈ Nat.primeFactors c.M) : (∑ i ∈ Finset.range\n (Nat.factorization c.M p + 1), (1 / p : ℝ) ^ i) / (∑ i ∈ Finset.range\n (Nat.factorization (c.L' : ℕ) p + 1), (1 / p : ℝ) ^ i) ≥ if p ∈ Finset.image c.p Finset.univ\n then (1 + 1 / (p * (p + 1) : ℝ)) else if p = 2 then (1 + 3 / (8 * c.n : ℝ)) else 1 := by\n split_ifs\n · obtain ⟨i, hi⟩ : ∃ i : Fin 3, p = c.p i := by grind\n have h_ratio_p_i : (∑ i ∈ Finset.range (Nat.factorization c.M p + 1), (1 / p : ℝ) ^ i) /\n (∑ i ∈ Finset.range (Nat.factorization (c.L' : ℕ) p + 1), (1 / p : ℝ) ^ i) ≥\n (∑ i ∈ Finset.range 3, (1 / p : ℝ) ^ i) / (∑ i ∈ Finset.range 2, (1 / p : ℝ) ^ i) := by\n rw [show Nat.factorization (c.L' : ℕ) p = 1 from hi ▸ c.val_p_L' i]\n exact div_le_div_of_nonneg_right (Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono\n (by grind [c.val_p_M_ge_two i])) fun _ _ _ ↦ by positivity)\n (Finset.sum_nonneg fun _ _ ↦ by positivity)\n convert h_ratio_p_i using 1; norm_num [Finset.sum_range_succ]; ring_nf; field_simp; grind\n · have h_geo_series : (∑ i ∈ Finset.range (Nat.factorization c.M 2 + 1), (1 / 2 : ℝ) ^ i)\n / (∑ i ∈ Finset.range (Nat.factorization c.L' 2 + 1), (1 / 2 : ℝ) ^ i) ≥\n (1 + 3 / (8 * c.n : ℝ)) := by\n have h_geo_series : (∑ i ∈ Finset.range (Nat.factorization c.M 2 + 1), (1 / 2 : ℝ) ^ i)\n / (∑ i ∈ Finset.range (Nat.factorization (c.L' : ℕ) 2 + 1), (1 / 2 : ℝ) ^ i) ≥\n (∑ i ∈ Finset.range (Nat.factorization (c.L' : ℕ) 2 + 3), (1 / 2 : ℝ) ^ i) /\n (∑ i ∈ Finset.range (Nat.factorization (c.L' : ℕ) 2 + 1), (1 / 2 : ℝ) ^ i) := by\n exact div_le_div_of_nonneg_right (Finset.sum_le_sum_of_subset_of_nonneg\n (Finset.range_mono (by linarith [val_two_M_ge_L' c])) fun _ _ _ ↦ by positivity)\n (Finset.sum_nonneg fun _ _ ↦ by positivity)\n refine le_trans ?_ h_geo_series\n convert σnorm_ratio_ge_aux c.n _ using 1\n exact c.val_two_L'.symm ▸ Nat.pow_log_le_self 2 (by linarith [c.hn])\n aesop\n · rw [ge_iff_le, le_div_iff₀] <;> norm_num\n · refine Finset.sum_le_sum_of_subset_of_nonneg (Finset.range_mono (Nat.succ_le_succ ?_))\n fun ?_ ?_ ?_ ↦ by positivity\n have h_div : c.L' ∣ c.M := by\n exact dvd_mul_left _ _\n exact (Nat.factorization_le_iff_dvd (by aesop) (by aesop)) |>.2 h_div p\n · exact Finset.sum_pos (fun _ _ ↦ inv_pos.mpr (pow_pos (Nat.cast_pos.mpr\n (Nat.pos_of_mem_primeFactors hp)) _)) (by norm_num)\n have h_prod_ratio_terms : (∏ p ∈ Nat.primeFactors c.M,\n ((∑ i ∈ Finset.range (Nat.factorization c.M p + 1), (1 / p : ℝ) ^ i) /\n (∑ i ∈ Finset.range (Nat.factorization (c.L' : ℕ) p + 1), (1 / p : ℝ) ^ i))) ≥\n (∏ p ∈ Finset.image c.p Finset.univ, (1 + 1/(p * (p + 1) : ℝ)))*(1 + 3 / (8 * c.n : ℝ)) := by\n refine le_trans ?_ (Finset.prod_le_prod ?_ h_ratio_terms)\n · rw [Finset.prod_ite]\n refine mul_le_mul ?_ ?_ (by positivity) (Finset.prod_nonneg fun _ _ ↦ by positivity)\n · rw [Finset.prod_subset]\n · simp only [mem_image, mem_univ, true_and, subset_iff, mem_filter, mem_primeFactors,\n forall_exists_index, forall_apply_eq_imp_iff, exists_apply_eq_apply, and_true]\n intro i; exact ⟨c.hp i, by\n exact dvd_mul_of_dvd_left (dvd_mul_of_dvd_left (dvd_mul_of_dvd_right\n (Finset.dvd_prod_of_mem _ (Finset.mem_univ _)) _) _) _, by\n exact Nat.ne_of_gt (Criterion.M_pos c)⟩\n · aesop\n · rw [Finset.prod_ite]\n by_cases h : 2 ∈ c.M.primeFactors <;> simp_all +decide only\n [mem_primeFactors, true_and, prod_const]\n · simp only [one_pow, mul_one]\n refine le_self_pow₀ (M₀ := ℝ) (by norm_num ; positivity) ?_\n · norm_num; exact ⟨2, Nat.prime_two, h.1, h.2, fun i ↦ by linarith [c.p_gt_two i], rfl⟩\n · contrapose! h\n refine ⟨dvd_mul_of_dvd_left ?_ _, Nat.ne_of_gt (Criterion.M_pos c)⟩\n · exact dvd_mul_of_dvd_left (dvd_mul_of_dvd_left (by decide) _) _\n · intro p hp; split_ifs <;> positivity\n simp_all\n rw [Finset.prod_image] at h_prod_ratio_terms <;> norm_num [Finset.prod_range_succ] at *\n · simpa only [mul_assoc] using mul_le_mul_of_nonneg_left h_prod_ratio_terms <|\n show 0 ≤ σnorm c.L' by exact div_nonneg (Nat.cast_nonneg _) <| Nat.cast_nonneg _\n · simp [c.hp_mono.injective]","line":788,"end_line":940,"proof_status":"formalized"} {"id":"thm:large-n-final","label":"large-n-final","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["prop:ineq-holds-large-n","thm:criterion"],"nlp_text":"For every integer \\(n \\ge 89693^2\\), the integer \\(L_n\\) is not highly abundant.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.L_not_HA_of_ge","latex_link":"tertiary-chapter.html#thm:large-n-final","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.L_not_HA_of_ge","lean_decl_name":"Lcm.L_not_HA_of_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"thm:large-n-final\"\n (title := \"Non-highly abundant for large \\\\(n\\\\)\")\n (statement := /-- For every integer \\(n \\ge 89693^2\\), the integer \\(L_n\\) is not highly\n abundant. -/)\n (proof := /-- By Proposition~\\ref{prop:ineq-holds-large-n}, there exist primes\n \\(p_1,p_2,p_3,q_1,q_2,q_3\\) satisfying the hypotheses of Theorem~\\ref{thm:criterion}.\n Hence \\(L_n\\) is not highly abundant. -/)\n (proofUses := [\"prop:ineq-holds-large-n\", \"thm:criterion\"])]\ntheorem L_not_HA_of_ge (n : ℕ) (hn : n ≥ 89693 ^ 2) : ¬HighlyAbundant (L n) :=\n (Criterion.mk' hn).not_highlyAbundant","line":1657,"end_line":1667,"proof_status":"formalized"} {"id":"lem:criterion-reduced","label":"criterion-reduced","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:sigmaLn","lem:criterion-sufficient"],"nlp_text":"If \\begin{equation} \\label{eq:sigmaM-lower} \\frac{\\sigma (M)}{M} \\; \\ge \\; \\frac{\\sigma (L')}{L'} \\Biggl( \\prod _{i=1}^3 \\Bigl(1+\\frac{1}{p_i(p_i+1)}\\Bigr) \\Biggr) \\Bigl(1 + \\frac{3}{8n}\\Bigr), \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.not_highlyAbundant_2","latex_link":"tertiary-chapter.html#lem:criterion-reduced","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.not_highlyAbundant_2","lean_decl_name":"Lcm.Criterion.not_highlyAbundant_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:criterion-reduced\"\n (title := \"Reduction to a lower bound for \\\\(\\\\sigma(M)/M\\\\)\")\n (statement := /--\n If\n \\begin{equation}\\label{eq:sigmaM-lower}\n \\frac{\\sigma(M)}{M}\n \\;\\ge\\;\n \\frac{\\sigma(L')}{L'}\n \\Biggl( \\prod_{i=1}^3 \\Bigl(1+\\frac{1}{p_i(p_i+1)}\\Bigr) \\Biggr)\n \\Bigl(1 + \\frac{3}{8n}\\Bigr),\n \\end{equation}\n then $L_n$ is not highly abundant.\n -/)\n (proof := /--\n Insert \\eqref{eq:sigmaM-lower} and \\eqref{eq:sigmaLn} into the desired inequality and compare\n with the assumed bound \\eqref{eq:main-ineq}; this is a straightforward rearrangement.\n -/)\n (proofUses := [\"lem:sigmaLn\", \"lem:criterion-sufficient\"])\n (latexEnv := \"lemma\")]\ntheorem Criterion.not_highlyAbundant_2 (c : Criterion)\n (h : σnorm c.M ≥ σnorm c.L' * (∏ i, (1 + 1 / (c.p i * (c.p i + 1 : ℝ)))) *\n (1 + (3 : ℝ) / (8 * c.n))) : ¬HighlyAbundant (L c.n) := by\n refine c.not_highlyAbundant_1 ?_\n have hL'_pos : 0 < σnorm c.L' := by\n rw [σnorm]; exact div_pos (cast_pos.mpr <| by rw [σ, sigma_pos_iff]; exact c.L'_pos)\n (cast_pos.mpr c.L'_pos)\n have hR_pos : (0 : ℝ) < 1 - 4 * (∏ i, c.p i) / (∏ i, c.q i) := by\n rw [sub_pos, div_lt_one (cast_pos.mpr <| prod_pos fun i _ ↦ (c.hq i).pos)]\n exact_mod_cast c.prod_p_le_prod_q\n have hcrit : (∏ i, (1 + (1 : ℝ) / c.q i)) ≤ (∏ i, (1 + 1 / (c.p i * (c.p i + 1 : ℝ)))) *\n (1 + 3 / (8 * c.n)) * (1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i)) := by\n convert c.h_crit using 3; simp only [prod_natCast]\n rw [c.σnorm_ln_eq]\n calc σnorm c.L' * ∏ i, (1 + (1 : ℝ) / c.q i)\n ≤ σnorm c.L' * ((∏ i, (1 + 1 / (c.p i * (c.p i + 1 : ℝ)))) * (1 + 3 / (8 * c.n)) *\n (1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i))) :=\n mul_le_mul_of_nonneg_left hcrit hL'_pos.le\n _ = σnorm c.L' * (∏ i, (1 + 1 / (c.p i * (c.p i + 1 : ℝ)))) * (1 + 3 / (8 * c.n)) *\n (1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i)) := by ring\n _ ≤ σnorm c.M * (1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i)) :=\n mul_le_mul_of_nonneg_right h hR_pos.le","line":728,"end_line":769,"proof_status":"formalized"} {"id":"thm:criterion","label":"criterion","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:criterion-reduced","lem:sigmaM-lower-final"],"nlp_text":"Let \\(n \\geq 1\\). Suppose that primes \\(p_1,p_2,p_3,q_1,q_2,q_3\\) satisfy \\[ \\sqrt{n} {\\lt} p_1 {\\lt} p_2 {\\lt} p_3 {\\lt} q_1 {\\lt} q_2 {\\lt} q_3 {\\lt} n \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.not_highlyAbundant","latex_link":"tertiary-chapter.html#thm:criterion","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.not_highlyAbundant","lean_decl_name":"Lcm.Criterion.not_highlyAbundant","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"thm:criterion\"\n (statement := /--\n Let $n \\geq 1$.\n Suppose that primes \\(p_1,p_2,p_3,q_1,q_2,q_3\\) satisfy\n \\[\n \\sqrt{n} < p_1 < p_2 < p_3 < q_1 < q_2 < q_3 < n\n \\]\n and the key criterion \\eqref{eq:main-ineq}.\n Then \\(L_n\\) is not highly abundant.\n -/)\n (proof := /--\n By Lemma~\\ref{lem:sigmaM-lower-final}, the condition \\eqref{eq:sigmaM-lower} holds.\n By Lemma~\\ref{lem:criterion-reduced} this implies\n \\[\n \\frac{\\sigma(M)}{M}\n \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)\n \\ge \\frac{\\sigma(L_n)}{L_n}.\n \\]\n Applying Lemma~\\ref{lem:criterion-sufficient}, we obtain \\(\\sigma(M) \\ge \\sigma(L_n)\\) with\n \\(M < L_n\\), so \\(L_n\\) cannot be highly abundant.\n -/)]\ntheorem Criterion.not_highlyAbundant (c : Criterion) : ¬HighlyAbundant (L c.n) :=\n c.not_highlyAbundant_2 c.σnorm_M_ge_σnorm_L'_mul","line":949,"end_line":972,"proof_status":"formalized"} {"id":"lem:criterion-sufficient","label":"criterion-sufficient","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:M-basic","highlyabundant-def"],"nlp_text":"Suppose \\[ \\frac{\\sigma (M)}{M} \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr) \\; \\ge \\; \\frac{\\sigma (L_n)}{L_n}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.not_highlyAbundant_1","latex_link":"tertiary-chapter.html#lem:criterion-sufficient","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.Criterion.not_highlyAbundant_1","lean_decl_name":"Lcm.Criterion.not_highlyAbundant_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:criterion-sufficient\"\n (title := \"A sufficient inequality\")\n (statement := /--\n Suppose\n \\[\n \\frac{\\sigma(M)}{M}\n \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)\n \\;\\ge\\; \\frac{\\sigma(L_n)}{L_n}.\n \\]\n Then \\(\\sigma(M) \\ge \\sigma(L_n)\\), and so \\(L_n\\) is not highly abundant.\n -/)\n (proof := /--\n By Lemma~\\ref{lem:M-basic},\n \\[\n \\frac{L_n}{M} < \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)^{-1}.\n \\]\n Hence\n \\[\n \\frac{\\sigma(M)}{M} \\ge \\frac{\\sigma(L_n)}{L_n}\n \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)^{-1}\n > \\frac{\\sigma(L_n)}{L_n} \\cdot \\frac{M}{L_n}.\n \\]\n Multiplying both sides by \\(M\\) gives\n \\[\n \\sigma(M) > \\sigma(L_n) \\cdot \\frac{M}{L_n}\n \\]\n and hence\n \\[\n \\sigma(M) \\ge \\sigma(L_n),\n \\]\n since \\(M/L_n<1\\) and both sides are integers.\n -/)\n (proofUses := [\"lem:M-basic\"])\n (latexEnv := \"lemma\")]\ntheorem Criterion.not_highlyAbundant_1 (c : Criterion)\n (h : σnorm c.M * (1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i)) ≥ σnorm (L c.n)) :\n ¬HighlyAbundant (L c.n) := by\n intro hHA\n have hM_pos : (0 : ℝ) < c.M := cast_pos.mpr c.M_pos\n have hLn_pos : (0 : ℝ) < L c.n := cast_pos.mpr c.L_pos\n have hσnorm_Ln_pos : 0 < σnorm (L c.n) := by\n rw [σnorm]; exact div_pos (cast_pos.mpr <| by rw [σ, sigma_pos_iff]; exact c.L_pos) hLn_pos\n have hprod_q_pos : (0 : ℝ) < (∏ i, c.q i) := cast_pos.mpr (prod_pos fun i _ ↦ (c.hq i).pos)\n have h1_sub_pos : (0 : ℝ) < 1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i) := by\n rw [sub_pos, div_lt_one hprod_q_pos]; exact_mod_cast c.prod_p_le_prod_q\n have h1_sub_lt : 1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i) < c.M / L c.n := by\n have hinv_lt := c.Ln_div_M_lt\n rw [lt_inv_comm₀ (div_pos hLn_pos hM_pos) h1_sub_pos, inv_div] at hinv_lt\n exact hinv_lt\n have hσM_gt : (σ c.M : ℝ) > σ (L c.n) := by\n have hσnorm_gt : σnorm c.M > σnorm (L c.n) * (L c.n / c.M) :=\n calc σnorm c.M ≥ σnorm (L c.n) / (1 - (4 : ℝ) * (∏ i, c.p i) / (∏ i, c.q i)) := by\n rw [ge_iff_le, div_le_iff₀ h1_sub_pos]; exact h\n _ > σnorm (L c.n) / (c.M / L c.n) := by gcongr\n _ = σnorm (L c.n) * (L c.n / c.M) := by rw [div_div_eq_mul_div, mul_div_assoc]\n calc (σ c.M : ℝ) = σnorm c.M * c.M := by field_simp [σnorm]\n _ > σnorm (L c.n) * (L c.n / c.M) * c.M := by nlinarith\n _ = σ (L c.n) := by field_simp [σnorm, c.M_pos.ne']\n exact not_lt.mpr (cast_lt.mp hσM_gt).le (hHA c.M c.M_lt)","line":662,"end_line":721,"proof_status":"formalized"} {"id":"cauchy_formula_deriv","label":"cauchy_formula_deriv","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(f\\) be analytic on \\(|z|\\leq R\\). For any \\(z\\) with \\(|z|\\leq r\\) and any \\(r'\\) with \\(0 {\\lt} r {\\lt} r' {\\lt} R\\) we have \\[ f'(z)=\\frac{1}{2\\pi i}\\oint _{|w|=r'}\\frac{f(w)}{(w-z)^2}\\, dw=\\frac{1}{2\\pi } \\int _0^{2\\pi }\\frac{r'e^{it}\\, f(r'e^{it})}{(r'e^{it}-z)^2}\\, dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/cauchy_formula_deriv","latex_link":"sect0004.html#cauchy_formula_deriv","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/cauchy_formula_deriv","lean_decl_name":"cauchy_formula_deriv","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint \"cauchy_formula_deriv\"\n (title := \"cauchy-formula-deriv\")\n (statement := /-- Let $f$ be analytic on $|z|\\leq R$. For any $z$ with $|z|\\leq r$ and any $r'$\n with $0 < r < r' < R$ we have\n $$f'(z)=\\frac{1}{2\\pi i}\\oint_{|w|=r'}\\frac{f(w)}{(w-z)^2}\\,dw=\\frac{1}{2\\pi}\n \\int_0^{2\\pi}\\frac{r'e^{it}\\,f(r'e^{it})}{(r'e^{it}-z)^2}\\,dt.$$ -/)\n (proof := /-- This is just Cauchy's integral formula for derivatives. -/)\n (latexEnv := \"lemma\")]\nlemma cauchy_formula_deriv {f : ℂ → ℂ} {R r r' : ℝ}\n (hf_domain : ∃ U, IsOpen U ∧ Metric.closedBall 0 R ⊆ U ∧ DifferentiableOn ℂ f U)\n (r_lt_r' : r < r') (r'_lt_R : r' < R) {z : ℂ} (hz : z ∈ Metric.closedBall 0 r) :\n deriv f z = (1 / (2 * Real.pi * I)) • ∮ w in C(0, r'), (w - z)⁻¹ ^ 2 • f w := by\n obtain ⟨_, _, h_subset, hf_diff⟩ := hf_domain\n have hz_in_ball : z ∈ Metric.ball 0 r' :=\n Metric.mem_ball.mpr <| (Metric.mem_closedBall.mp hz).trans_lt r_lt_r'\n have hf_on_ball : DifferentiableOn ℂ f (Metric.ball 0 R) :=\n hf_diff.mono <| Metric.ball_subset_closedBall.trans h_subset\n simp [← Complex.two_pi_I_inv_smul_circleIntegral_sub_sq_inv_smul_of_differentiable\n Metric.isOpen_ball (Metric.closedBall_subset_ball r'_lt_R) hf_on_ball hz_in_ball]\n","line":28,"end_line":46,"proof_status":"formalized"} {"id":"DerivativeBound","label":"DerivativeBound","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["cauchy_formula_deriv","borelCaratheodory-closedBall"],"nlp_text":"Let \\(R,\\, M{\\gt}0\\) and \\(0 {\\lt} r {\\lt} r' {\\lt} R\\). Let \\(f\\) be analytic on \\(|z|\\leq R\\) such that \\(f(0)=0\\) and suppose \\(\\Re f(z)\\leq M\\) for all \\(|z|\\leq R\\). Then we have that \\[ |f'(z)|\\leq \\frac{2M(r')^2}{(R-r')(r'-r)^2} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/derivativeBound","latex_link":"sect0004.html#DerivativeBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/derivativeBound","lean_decl_name":"derivativeBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/DerivativeBound.lean","lean4_code":"@[blueprint \"DerivativeBound\"\n (title := \"DerivativeBound\")\n (statement := /--\n Let $R,\\,M>0$ and $0 < r < r' < R$. Let $f$ be analytic on $|z|\\leq R$ such that $f(0)=0$ and\n suppose $\\Re f(z)\\leq M$ for all $|z|\\leq R$. Then we have that\n $$|f'(z)|\\leq\\frac{2M(r')^2}{(R-r')(r'-r)^2}$$\n for all $|z|\\leq r$.\n -/)\n (proof := /--\n By Cauchy's integral formula we know that\n $$f'(z)=\\frac{1}{2\\pi i}\\oint_{|w|=r'}\\frac{f(w)}{(w-z)^2}\\,dw=\n \\frac{1}{2\\pi }\\int_0^{2\\pi}\\frac{r'e^{it}\\,f(r'e^{it})}{(r'e^{it}-z)^2}\\,dt.$$\n Thus,\n \\begin{equation}\\label{pickupPoint1}\n |f'(z)|=\\left|\\frac{1}{2\\pi}\\int_0^{2\\pi}\\frac{r'e^{it}\\,f(r'e^{it})}{(r'e^{it}-z)^2}\\,dt\\right|\n \\leq\\frac{1}{2\\pi}\\int_0^{2\\pi}\\left|\\frac{r'e^{it}\\,f(r'e^{it})}{(r'e^{it}-z)^2}\\right|\\,dt.\n \\end{equation}\n Now applying Theorem \\ref{borelCaratheodory-closedBall}, and noting that $r'-r\\leq|r'e^{it}-z|$,\n we have that\n $$\\left|\\frac{r'e^{it}\\,f(r'e^{it})}{(r'e^{it}-z)^2}\\right|\n \\leq\\frac{2M(r')^2}{(R-r')(r'-r)^2}.$$\n Substituting this into Equation (\\ref{pickupPoint1}) and evaluating the integral completes the\n proof.\n -/)\n (proofUses := [\"borelCaratheodory-closedBall\"])]\ntheorem derivativeBound {R M r r' : ℝ} {z : ℂ} {f : ℂ → ℂ}\n (analytic_f : AnalyticOn ℂ f (Metric.closedBall 0 R))\n (f_zero_at_zero : f 0 = 0)\n (re_f_le_M : ∀ z ∈ Metric.closedBall 0 R, (f z).re ≤ M)\n (pos_r : 0 < r) (z_in_r : z ∈ Metric.closedBall 0 r)\n (r_le_r' : r < r') (r'_le_R : r' < R) :\n ‖(deriv f) z‖ ≤ 2 * M * (r')^2 / ((R - r') * (r' - r)^2) := by sorry\n","line":27,"end_line":58,"proof_status":"statement_formalized"} {"id":"BorelCaratheodoryDeriv","label":"BorelCaratheodoryDeriv","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DerivativeBound"],"nlp_text":"Let \\(R,\\, M{\\gt}0\\). Let \\(f\\) be analytic on \\(|z|\\leq R\\) such that \\(f(0)=0\\) and suppose \\(\\Re f(z)\\leq M\\) for all \\(|z|\\leq R\\). Then for any \\(0 {\\lt} r {\\lt} R\\), \\[ |f'(z)|\\leq \\frac{16MR^2}{(R-r)^3} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BorelCaratheodoryDeriv","latex_link":"sect0004.html#BorelCaratheodoryDeriv","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BorelCaratheodoryDeriv","lean_decl_name":"BorelCaratheodoryDeriv","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint \"BorelCaratheodoryDeriv\"\n (title := \"BorelCaratheodoryDeriv\")\n (statement := /--\n Let $R,\\,M>0$. Let $f$ be analytic on $|z|\\leq R$ such that $f(0)=0$ and suppose\n $\\Re f(z)\\leq M$ for all $|z|\\leq R$. Then for any $0 < r < R$,\n $$|f'(z)|\\leq\\frac{16MR^2}{(R-r)^3}$$\n for all $|z|\\leq r$.\n -/)\n (proof := /--\n Using Lemma \\ref{DerivativeBound} with $r'=(R+r)/2$, and noting that $r < R$,\n we have that\n $$|f'(z)|\\leq\\frac{4M(R+r)^2}{(R-r)^3}\\leq\\frac{16MR^2}{(R-r)^3}.$$\n -/)\n (latexEnv := \"theorem\")]\ntheorem BorelCaratheodoryDeriv {M R r : ℝ} {z : ℂ} {f : ℂ → ℂ}\n (rpos : 0 < r) (analytic_f : AnalyticOn ℂ f (Metric.closedBall 0 R))\n (zeroAtZero : f 0 = 0) (Mpos : 0 < M)\n (realPartBounded : ∀ z ∈ Metric.closedBall 0 R, (f z).re ≤ M)\n (hyp_r : r < R) (hyp_z : z ∈ Metric.closedBall 0 r)\n (hf_domain : ∃ U, IsOpen U ∧ Metric.closedBall 0 R ⊆ U ∧ DifferentiableOn ℂ f U) :\n ‖deriv f z‖ ≤ 16 * M * R ^ 2 / (R - r) ^ 3 := by\n let r' : ℝ := (R + r) / 2\n calc\n ‖deriv f z‖ ≤ 4 * M * (R + r) ^ 2 / (R - r) ^ 3 := by\n have : 4 * M * (R + r) ^ 2 / (R - r) ^ 3 = 2 * M * (r') ^ 2 / ((R - r') * (r' - r) ^ 2) := by\n simp[r']\n field_simp\n ring_nf\n rw[this]\n refine DerivativeBound Mpos analytic_f zeroAtZero hf_domain realPartBounded rpos hyp_z ?_ ?_\n · simp[r']\n linarith\n · simp[r']\n linarith\n _ ≤ 16 * M * R ^ 2 / (R - r) ^ 3 := by\n have : 16 * M * R ^ 2 = 4 * M * (2 * R) ^ 2 := by ring_nf\n rw[this]\n bound\n","line":139,"end_line":176,"proof_status":"formalized"} {"id":"JBlaschkeDerivBound","label":"JBlaschkeDerivBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["BorelCaratheodoryDeriv","JBlaschke","DiskBound","LogOfAnalyticFunction"],"nlp_text":"Let \\(B{\\gt}1\\) and \\(0 {\\lt} r' {\\lt} r {\\lt} R{\\lt}1\\). If \\(f:\\mathbb {C}\\to \\mathbb {C}\\) is a function analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)=1\\) and \\(|f(z)|\\leq B\\) for all \\(|z|\\leq R\\), then for all \\(|z|\\leq r'\\) \\[ |L_f'(z)|\\leq \\frac{16\\log (B)\\, r^2}{(r-r')^3} \\]","doc_url":null,"latex_link":"sect0004.html#JBlaschkeDerivBound","lean_link":null,"lean_decl_name":"JBlaschkeDerivBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"hasDerivAt_conj_conj","label":"hasDerivAt_conj_conj","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(f : \\mathbb {C} \\to \\mathbb {C}\\) be a complex differentiable function at \\(p \\in \\mathbb {C}\\) with derivative \\(a\\). Then the function \\(g(z) = \\overline{f(\\overline{z})}\\) is complex differentiable at \\(\\overline{p}\\) with derivative \\(\\overline{a}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/hasDerivAt_conj_conj","latex_link":"sect0003.html#hasDerivAt_conj_conj","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/hasDerivAt_conj_conj","lean_decl_name":"hasDerivAt_conj_conj","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaConj.lean","lean4_code":"@[blueprint\n (title := \"hasDerivAt-conj-conj\")\n (statement := /--\n Let $f : \\mathbb{C} \\to \\mathbb{C}$ be a complex differentiable function at $p \\in \\mathbb{C}$\n with derivative $a$. Then the function $g(z) = \\overline{f(\\overline{z})}$ is complex\n differentiable at $\\overline{p}$ with derivative $\\overline{a}$.\n -/)\n (proof := /-- We expand the definition of the derivative and compute. -/)]\ntheorem hasDerivAt_conj_conj {f : ℂ → ℂ} {p a : ℂ} (hf : HasDerivAt f a p) :\n HasDerivAt (fun z ↦ conj (f (conj z))) (conj a) (conj p) := by\n rw [hasDerivAt_iff_tendsto] at hf ⊢\n have := Complex.continuous_conj.tendsto (conj p)\n rw [Complex.conj_conj] at this\n have := Filter.Tendsto.comp hf this\n convert this with z\n simp only [Complex.conj_conj, smul_eq_mul, Function.comp_apply]\n congr 1\n · congr 1\n rw [← Complex.norm_conj]\n simp\n · rw [← Complex.norm_conj]\n simp\n","line":10,"end_line":31,"proof_status":"formalized"} {"id":"deriv_conj_conj","label":"deriv_conj_conj","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["hasDerivAt_conj_conj"],"nlp_text":"Let \\(f : \\mathbb {C} \\to \\mathbb {C}\\) be a function at \\(p \\in \\mathbb {C}\\) with derivative \\(a\\). Then the derivative of the function \\(g(z) = \\overline{f(\\overline{z})}\\) at \\(\\overline{p}\\) is \\(\\overline{a}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/deriv_conj_conj","latex_link":"sect0003.html#deriv_conj_conj","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/deriv_conj_conj","lean_decl_name":"deriv_conj_conj","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaConj.lean","lean4_code":"@[blueprint\n (title := \"deriv-conj-conj\")\n (statement := /--\n Let $f : \\mathbb{C} \\to \\mathbb{C}$ be a function at $p \\in \\mathbb{C}$ with derivative $a$.\n Then the derivative of the function $g(z) = \\overline{f(\\overline{z})}$ at $\\overline{p}$ is\n $\\overline{a}$.\n -/)\n (proof := /--\n We proceed by case analysis on whether $f$ is differentiable at $p$. If $f$ is differentiable\n at $p$, then we can apply the previous theorem. If $f$ is not differentiable at $p$, then\n neither is $g$, and both derivatives have the default value of zero.\n -/)]\ntheorem deriv_conj_conj (f : ℂ → ℂ) (p : ℂ) :\n deriv (fun z ↦ conj (f (conj z))) (conj p) = conj (deriv f p) := by\n -- Case analysis on whether f is differentiable at p\n set g := fun z ↦ conj (f (conj z))\n by_cases hf : DifferentiableAt ℂ f p\n · exact (hasDerivAt_conj_conj hf.hasDerivAt).deriv\n · by_cases hg : DifferentiableAt ℂ g (conj p)\n · -- If the conjugated function were differentiable, then f would be differentiable\n have : DifferentiableAt ℂ f p := by\n convert (hasDerivAt_conj_conj hg.hasDerivAt).differentiableAt using 2 <;> simp [g]\n contradiction\n · -- Both derivatives are zero when the functions are not differentiable\n rw [deriv_zero_of_not_differentiableAt hg, deriv_zero_of_not_differentiableAt hf, map_zero]\n","line":36,"end_line":60,"proof_status":"formalized"} {"id":"conj_riemannZeta_conj","label":"conj_riemannZeta_conj","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["hasDerivAt_conj_conj","conj_riemannZeta_conj_aux1"],"nlp_text":"Conjugation symmetry of the Riemann zeta function. Let \\(s \\in \\mathbb {C}\\). Then \\[ \\overline{\\zeta (\\overline{s})} = \\zeta (s). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/conj_riemannZeta_conj","latex_link":"sect0003.html#conj_riemannZeta_conj","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/conj_riemannZeta_conj","lean_decl_name":"conj_riemannZeta_conj","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaConj.lean","lean4_code":"@[blueprint\n (title := \"conj-riemannZeta-conj\")\n (statement := /--\n Conjugation symmetry of the Riemann zeta function. Let $s \\in \\mathbb{C}$. Then\n $$\\overline{\\zeta(\\overline{s})} = \\zeta(s).$$\n -/)\n (proof := /--\n By the previous lemma, the two sides are equal on the half-plane\n $\\{s \\in \\mathbb{C} : \\Re(s) > 1\\}$. Then, by analytic continuation, they are equal on the\n whole complex plane.\n -/)]\ntheorem conj_riemannZeta_conj (s : ℂ) : conj (riemannZeta (conj s)) = riemannZeta s := by\n by_cases hs1 : s = 1\n · subst hs1\n rw [map_one, Complex.conj_eq_iff_real]\n rw [riemannZeta_one]\n use (Real.eulerMascheroniConstant - Real.log (4 * Real.pi)) / 2\n norm_cast\n rw [← Complex.ofReal_log]\n · push_cast\n rfl\n · positivity\n · let U : Set ℂ := {1}ᶜ\n let g := fun s ↦ conj (riemannZeta (conj s))\n suffices Set.EqOn g riemannZeta U by\n apply this\n rwa [Set.mem_compl_singleton_iff]\n apply AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq (𝕜 := ℂ) (z₀ := 2)\n · simp [U]\n · rw [Filter.eventuallyEq_iff_exists_mem]\n set V := Complex.re ⁻¹' (Set.Ioi 1)\n use V\n constructor\n · have Vopen : IsOpen V := Continuous.isOpen_preimage Complex.continuous_re _ isOpen_Ioi\n have two_in_V : 2 ∈ V := by simp [V]\n exact IsOpen.mem_nhds Vopen two_in_V\n · intro s hs\n exact conj_riemannZeta_conj_aux1 s hs\n · refine DifferentiableOn.analyticOnNhd ?_ isOpen_compl_singleton\n intro s₁ hs₁\n have hs₁' : conj s₁ ≠ 1 :=\n (map_ne_one_iff (starRingEnd ℂ) (RingHom.injective (starRingEnd ℂ))).mpr hs₁\n convert (hasDerivAt_conj_conj\n (differentiableAt_riemannZeta hs₁').hasDerivAt).differentiableAt.differentiableWithinAt\n (s := U)\n rw [Complex.conj_conj]\n · refine DifferentiableOn.analyticOnNhd ?_ isOpen_compl_singleton\n intro s₁ hs₁\n exact (differentiableAt_riemannZeta hs₁).differentiableWithinAt\n · refine (?_ : IsConnected U).isPreconnected\n refine isConnected_compl_singleton_of_one_lt_rank ?_ 1\n simp\n","line":94,"end_line":145,"proof_status":"formalized"} {"id":"deriv_riemannZeta_conj","label":"deriv_riemannZeta_conj","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["deriv_conj_conj","conj_riemannZeta_conj"],"nlp_text":"Conjugation symmetry of the derivative of the Riemann zeta function. Let \\(s \\in \\mathbb {C}\\). Then \\[ \\zeta '(\\overline{s}) = \\overline{\\zeta '(s)}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/deriv_riemannZeta_conj","latex_link":"sect0003.html#deriv_riemannZeta_conj","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/deriv_riemannZeta_conj","lean_decl_name":"deriv_riemannZeta_conj","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaConj.lean","lean4_code":"@[blueprint\n (title := \"deriv-riemannZeta-conj\")\n (statement := /--\n Conjugation symmetry of the derivative of the Riemann zeta function. Let $s \\in \\mathbb{C}$.\n Then $$\\zeta'(\\overline{s}) = \\overline{\\zeta'(s)}.$$\n -/)\n (proof := /--\n We apply the derivative conjugation symmetry to the Riemann zeta function and use the\n conjugation symmetry of the Riemann zeta function itself.\n -/)]\ntheorem deriv_riemannZeta_conj (s : ℂ) :\n deriv riemannZeta (conj s) = conj (deriv riemannZeta s) := by\n simp [← deriv_conj_conj, conj_riemannZeta_conj]\n","line":164,"end_line":176,"proof_status":"formalized"} {"id":"riemannZeta_conj","label":"riemannZeta_conj","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["conj_riemannZeta_conj"],"nlp_text":"Conjugation symmetry of the Riemann zeta function. Let \\(s \\in \\mathbb {C}\\). Then \\[ \\zeta (\\overline{s}) = \\overline{\\zeta (s)}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta_conj","latex_link":"sect0003.html#riemannZeta_conj","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta_conj","lean_decl_name":"riemannZeta_conj","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaConj.lean","lean4_code":"@[blueprint\n (title := \"conj-riemannZeta-conj\")\n (statement := /--\n Conjugation symmetry of the Riemann zeta function. Let $s \\in \\mathbb{C}$. Then\n $$\\overline{\\zeta(\\overline{s})} = \\zeta(s).$$\n -/)\n (proof := /--\n By the previous lemma, the two sides are equal on the half-plane\n $\\{s \\in \\mathbb{C} : \\Re(s) > 1\\}$. Then, by analytic continuation, they are equal on the\n whole complex plane.\n -/)]\ntheorem conj_riemannZeta_conj (s : ℂ) : conj (riemannZeta (conj s)) = riemannZeta s := by\n by_cases hs1 : s = 1\n · subst hs1\n rw [map_one, Complex.conj_eq_iff_real]\n rw [riemannZeta_one]\n use (Real.eulerMascheroniConstant - Real.log (4 * Real.pi)) / 2\n norm_cast\n rw [← Complex.ofReal_log]\n · push_cast\n rfl\n · positivity\n · let U : Set ℂ := {1}ᶜ\n let g := fun s ↦ conj (riemannZeta (conj s))\n suffices Set.EqOn g riemannZeta U by\n apply this\n rwa [Set.mem_compl_singleton_iff]\n apply AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq (𝕜 := ℂ) (z₀ := 2)\n · simp [U]\n · rw [Filter.eventuallyEq_iff_exists_mem]\n set V := Complex.re ⁻¹' (Set.Ioi 1)\n use V\n constructor\n · have Vopen : IsOpen V := Continuous.isOpen_preimage Complex.continuous_re _ isOpen_Ioi\n have two_in_V : 2 ∈ V := by simp [V]\n exact IsOpen.mem_nhds Vopen two_in_V\n · intro s hs\n exact conj_riemannZeta_conj_aux1 s hs\n · refine DifferentiableOn.analyticOnNhd ?_ isOpen_compl_singleton\n intro s₁ hs₁\n have hs₁' : conj s₁ ≠ 1 :=\n (map_ne_one_iff (starRingEnd ℂ) (RingHom.injective (starRingEnd ℂ))).mpr hs₁\n convert (hasDerivAt_conj_conj\n (differentiableAt_riemannZeta hs₁').hasDerivAt).differentiableAt.differentiableWithinAt\n (s := U)\n rw [Complex.conj_conj]\n · refine DifferentiableOn.analyticOnNhd ?_ isOpen_compl_singleton\n intro s₁ hs₁\n exact (differentiableAt_riemannZeta hs₁).differentiableWithinAt\n · refine (?_ : IsConnected U).isPreconnected\n refine isConnected_compl_singleton_of_one_lt_rank ?_ 1\n simp\n","line":94,"end_line":145,"proof_status":"formalized"} {"id":"I5NewBound","label":"I5NewBound","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["deriv_riemannZeta_conj","riemannZeta_conj","I1NewBound","I5New"],"nlp_text":"We have that \\[ |I_5(\\nu ,\\varepsilon ,X,T)|\\ll \\frac{X}{\\varepsilon \\sqrt{T}}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I5NewBound","latex_link":"sect0004.html#I5NewBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I5NewBound","lean_decl_name":"I5NewBound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I5NewBound\")\n (statement := /--\n We have that\n $$|I_5(\\nu,\\varepsilon,X,T)|\\ll\\frac{X}{\\varepsilon\\sqrt{T}}.$$\n -/)\n (proof := /--\n By symmetry, note that\n $$|I_1(\\nu,\\varepsilon,X,T)|=|\\overline{I_5(\\nu,\\varepsilon,X,T)}|=|I_5(\\nu,\\varepsilon,X,T)|.$$\n Applying Lemma \\ref{I1NewBound} completes the proof.\n -/)\n (latexEnv := \"lemma\")]\nlemma I5NewBound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) :\n ∃ (C : ℝ) (_ : 0 ≤ C),\n ∀ {ε X T : ℝ} (_ : ε ∈ Ioo 0 1) (_ : 3 < X) (_ : 3 < T),\n ‖I5New SmoothingF ε X T‖ ≤ C * (X / (ε * Real.sqrt T)) := by\n obtain ⟨C, Cnonneg, hI1NewBound⟩ := I1NewBound suppSmoothingF ContDiffSmoothingF\n use C, Cnonneg\n intro ε X T εinIoo Xgt3 Tgt3\n have I1NewI5New : I5New SmoothingF ε X T = conj (I1New SmoothingF ε X T) := by\n unfold I1New I5New\n simp only [map_mul, map_div₀, conj_I, conj_ofReal, conj_ofNat, map_one]\n rw [neg_mul, mul_neg, ← neg_mul]\n congr\n · ring\n · rw [← integral_conj, ← integral_comp_neg_Ioi, integral_Ici_eq_integral_Ioi]\n apply setIntegral_congr_fun <| measurableSet_Ioi\n intro x hx\n simp only []\n rw[← smoothedChebyshevIntegrand_conj (by linarith)]\n simp only [ofReal_inv, ofReal_neg, neg_mul, map_add, map_one, map_inv₀, conj_ofReal,\n map_neg, map_mul, conj_I, mul_neg, neg_neg]\n rw[I1NewI5New, RCLike.norm_conj]\n exact hI1NewBound εinIoo Xgt3 Tgt3\n","line":1129,"end_line":1164,"proof_status":"formalized"} {"id":"I8I2","label":"I8I2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["deriv_riemannZeta_conj","riemannZeta_conj","I2","I8","intervalIntegral_conj"],"nlp_text":"Symmetry between \\(I_2\\) and \\(I_8\\): \\[ I_8(\\nu , \\epsilon , X, T) = -\\overline{I_2(\\nu , \\epsilon , X, T)} . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I8I2","latex_link":"sect0003.html#I8I2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I8I2","lean_decl_name":"I8I2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":" · positivity\n _ = C' * X / (ε * T) := by\n field_simp\n\n\n\n\n@[blueprint\n (title := \"I8I2\")\n (statement := /--\n Symmetry between $I_2$ and $I_8$:\n $$\n I_8(\\nu, \\epsilon, X, T) = -\\overline{I_2(\\nu, \\epsilon, X, T)}\n .\n $$\n -/)\n (proof := /-- This is a direct consequence of the definitions of $I_2$ and $I_8$. -/)\n (latexEnv := \"lemma\")]\nlemma I8I2 {SmoothingF : ℝ → ℝ}\n {X ε T σ₁ : ℝ} (T_gt : 3 < T) :\n I₈ SmoothingF ε X T σ₁ = -conj (I₂ SmoothingF ε X T σ₁) := by\n unfold I₂ I₈\n rw[map_mul, ← neg_mul]\n congr\n · simp[conj_ofNat]\n","line":2416,"end_line":2440,"proof_status":"formalized"} {"id":"I4NewBound","label":"I4NewBound","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["deriv_riemannZeta_conj","riemannZeta_conj","I2NewBound","I4New","intervalIntegral_conj"],"nlp_text":"We have that \\[ |I_4(\\nu ,\\varepsilon ,X,T)|\\ll \\frac{X}{\\varepsilon \\sqrt{T}}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I4NewBound","latex_link":"sect0004.html#I4NewBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I4NewBound","lean_decl_name":"I4NewBound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I4NewBound\")\n (statement := /--\n We have that\n $$|I_4(\\nu,\\varepsilon,X,T)|\\ll\\frac{X}{\\varepsilon\\sqrt{T}}.$$\n -/)\n (proof := /--\n By symmetry, note that\n $$|I_2(\\nu,\\varepsilon,X,T)|=|\\overline{I_4(\\nu,\\varepsilon,X,T)}|=|I_4(\\nu,\\varepsilon,X,T)|.$$\n Applying Lemma \\ref{I2NewBound} completes the proof.\n -/)\n (latexEnv := \"lemma\")]\nlemma I4NewBound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) :\n ∃ (C : ℝ) (_ : 0 ≤ C),\n ∀ {ε X T : ℝ} (_ : ε ∈ Ioo 0 1) (_ : 3 < X) (_ : 3 < T),\n let σ' := 1 - F / Real.log T\n ‖I4New SmoothingF ε X T σ'‖ ≤ C * (X / (ε * Real.sqrt T)) := by\n obtain ⟨C, Cnonneg, hI2NewBound⟩ := I2NewBound suppSmoothingF ContDiffSmoothingF\n use C, Cnonneg\n intro ε X T εinIoo Xgt3 Tgt3 σ'\n have I2NewI4New : I4New SmoothingF ε X T σ' = -conj (I2New SmoothingF ε X T σ') := by\n unfold I2New I4New\n simp only [map_mul, map_div₀, conj_I, conj_ofReal, conj_ofNat, map_one]\n rw [mul_neg, div_neg, neg_mul_comm, ← mul_neg]\n congr\n rw [← intervalIntegral_conj, neg_neg]\n apply intervalIntegral.integral_congr\n intro x hx\n simp only []\n rw[← smoothedChebyshevIntegrand_conj (by linarith)]\n simp only [map_sub, conj_ofReal, map_mul, conj_I, mul_neg, sub_neg_eq_add]\n rw[I2NewI4New, norm_neg, RCLike.norm_conj]\n exact hI2NewBound εinIoo Xgt3 Tgt3\n","line":1219,"end_line":1253,"proof_status":"formalized"} {"id":"costa-pereira-theorem-1a","label":"costa-pereira-theorem-1a","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-7"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\(\\psi (x) - \\theta (x) \\leqslant \\psi (x^{1/2}) + \\psi (x^{1/3}) + \\psi (x^{1/5})\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.theorem_1a","latex_link":"secondary-chapter.html#costa-pereira-theorem-1a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.theorem_1a","lean_decl_name":"CostaPereira.theorem_1a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":"@[blueprint\n \"costa-pereira-theorem-1a\"\n (title := \"Costa-Pereira Theorem 1a\")\n (statement := /-- For every $x > 0$ we have\n $\\psi(x) - \\theta(x) \\leqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\psi(x^{1/5})$. -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-7} and\n Sublemma \\ref{costa-pereira-sublemma-1-2}. -/)\n (latexEnv := \"theorem\")\n (discussion := 684)]\ntheorem theorem_1a {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≤ ψ (x ^ (1 / 2 : ℝ)) + ψ (x ^ (1 / 3 : ℝ)) + ψ (x ^ (1 / 5 : ℝ)) :=\n sublemma_1_2 hx 5 ▸ sublemma_1_7 hx","line":422,"end_line":433,"proof_status":"formalized"} {"id":"fks2-theorem-6-1","label":"fks2-theorem-6-1","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def","Etheta-def"],"nlp_text":"With the hypotheses of Theorem 9.6.2, for all \\(x \\geq x_1\\) we have \\[ E_\\pi (x) \\leq \\varepsilon _{θ,num}(x_1) + \\frac{\\log x}{x} \\frac{x_0}{\\log x_0} (E_\\pi (x_0) + E_\\theta (x_0)) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6_1","latex_link":"secondary-chapter.html#fks2-theorem-6-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6_1","lean_decl_name":"FKS2.theorem_6_1","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-theorem-6-1\"\n (title := \"FKS2 Theorem 6, substep 1\")\n (statement := /-- With the hypotheses of Theorem \\ref{fks2-theorem-6}, for all $x \\geq x_1$ we have\n $$ E_\\pi(x) \\leq \\varepsilon_{θ,num}(x_1) + \\frac{\\log x}{x} \\frac{x_0}{\\log x_0} (E_\\pi(x_0) + E_\\theta(x_0))$$\n $$ + \\frac{\\log x}{x} \\sum_{i=1}^{N-1} \\varepsilon_{\\theta,num}(e^{b_i}) \\left( \\Li(e^{b_{i+1}}) - \\Li(e^{b_i}) + \\frac{e^{b_i}}{b_i} - \\frac{e^{b_{i+1}}}{b_{i+1}} \\right) $$\n $$ + \\varepsilon_{\\theta,num}(x_1) \\frac{\\log x}{x} \\int_{x_1}^{x} \\frac{1}{(\\log t)^2} \\, dt. $$ -/)\n (proof := /-- This is obtained by combining Sublemma \\ref{fks2-eq-30} with the admissibility of $\\varepsilon_{\\theta,num}$ and Lemma \\ref{fks2-lemma-19}.\n -/)\n (latexEnv := \"sublemma\")\n (discussion := 715)]\ntheorem theorem_6_1 {x₀ x₁ : ℝ} (h : x₁ ≥ max x₀ 14)\n {N : ℕ} (b : Fin (N + 1) → ℝ) (hmono : Monotone b)\n (h_b_start : b 0 = log x₀)\n (h_b_end : b (Fin.last N) = log x₁)\n (εθ_num : ℝ → ℝ)\n (h_εθ_num : Eθ.numericalBound x₁ εθ_num) (x : ℝ) (hx : x ≥ x₁) :\n Eπ x ≤ εθ_num x₁ + (log x / x) * (x₀ / log x₀) * (Eπ x₀ + Eθ x₀) +\n (log x / x) * ∑ i ∈ Finset.Iio (Fin.last N),\n εθ_num (exp (b i)) *\n (Li (exp (b (i + 1))) - Li (exp (b i)) +\n exp (b i) / b i - exp (b (i + 1)) / b (i + 1)) +\n εθ_num x₁ * (log x / x) * ∫ t in x₁..x, 1 / (log t) ^ 2 :=\n sorry","line":603,"end_line":626,"proof_status":"statement_formalized"} {"id":"Ln-def","label":"Ln-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For each integer \\(n \\ge 1\\), define \\[ L_n := \\mathrm{lcm}(1,2,\\dots ,n). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.L","latex_link":"tertiary-chapter.html#Ln-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.L","lean_decl_name":"Lcm.L","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"Ln-def\"\n (statement := /--\n For each integer \\(n \\ge 1\\), define\n \\[\n L_n := \\mathrm{lcm}(1,2,\\dots,n).\n \\]\n We call \\((L_n)_{n \\ge 1}\\) the \\emph{least common multiple sequence}.\n -/)]\ndef L (n : ℕ) : ℕ := (Finset.Icc 1 n).lcm _root_.id\n","line":41,"end_line":50,"proof_status":"formalized"} {"id":"Dusart_prop_5_11b","label":"Dusart_prop_5_11b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"We have for \\(p_k \\geq 10^{15}\\), \\[ \\vartheta (p_k) \\geq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2.04}{\\log k}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_11b","latex_link":"secondary-chapter.html#Dusart_prop_5_11b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_11b","lean_decl_name":"Dusart.proposition_5_11b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_5_11b\"\n (title := \"Dusart Proposition 5.11\")\n (statement := /--\n We have for $p_k \\geq 10^{15}$,\n \\[\n \\vartheta(p_k) \\geq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2.04}{\\log k}.\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_5_11b {k : ℕ} (hk : nth Nat.Prime k ≥ 10 ^ 15) :\n θ (nth Nat.Prime k) ≥ k * Real.log k + Real.log (Real.log k) - 1 + (Real.log (Real.log k) - 2.04) / (Real.log k) := by sorry\n","line":444,"end_line":454,"proof_status":"formalized"} {"id":"ZerosBound","label":"ZerosBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DiskBound"],"nlp_text":"Let \\(B{\\gt}1\\) and \\(0{\\lt} r {\\lt} R{\\lt}1\\). If \\(f:\\mathbb {C}\\to \\mathbb {C}\\) is a function analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)=1\\) and \\(|f(z)|\\leq B\\) for \\(|z|\\leq R\\), then \\[ \\sum _{\\rho \\in \\mathcal{K}_f(r)}m_f(\\rho )\\leq \\frac{\\log B}{\\log (R/r)}. \\]","doc_url":null,"latex_link":"sect0004.html#ZerosBound","lean_link":null,"lean_decl_name":"ZerosBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"FinalBound","label":"FinalBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZerosBound","JBlaschkeDerivBound","CFunction"],"nlp_text":"Let \\(B{\\gt}1\\) and \\(0 {\\lt} r' {\\lt} r {\\lt} R' {\\lt} R{\\lt}1\\). If \\(f:\\mathbb {C}\\to \\mathbb {C}\\) is a function analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)=1\\) and \\(|f(z)|\\leq B\\) for all \\(|z|\\leq R\\), then for all \\(z\\in \\overline{\\mathbb {D}_{R'}}\\setminus \\mathcal{K}_f(R')\\) we have \\[ \\left|\\frac{f'}{f}(z)-\\sum _{\\rho \\in \\mathcal{K}_f(R')}\\frac{m_f(\\rho )}{z-\\rho }\\right| \\leq \\left(\\frac{16r^2}{(r-r')^3}+\\frac{1}{(R^2/R'-R')\\, \\log (R/R')}\\right)\\log B. \\]","doc_url":null,"latex_link":"sect0004.html#FinalBound","lean_link":null,"lean_decl_name":"FinalBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"LogDerivZetaFinalBound","label":"LogDerivZetaFinalBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["FinalBound","GlobalBound","ZetaFixedLowerBound"],"nlp_text":"Let \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 2\\) and \\(0 {\\lt} r' {\\lt} r {\\lt} R' {\\lt} R{\\lt}1\\). If \\(f(z)=\\zeta (z+3/2+it)\\), then for all \\(z\\in \\overline{\\mathbb {D}_R'}\\setminus \\mathcal{K}_f(R')\\) we have that \\[ \\left|\\frac{f'}{f}(z)-\\sum _{\\rho \\in \\mathcal{K}_f(R')}\\frac{m_f(\\rho )}{z-\\rho }\\right| \\ll \\left(\\frac{16r^2}{(r-r')^3}+\\frac{1}{(R^2/R'-R')\\, \\log (R/R')}\\right)\\log |t|. \\]","doc_url":null,"latex_link":"sect0004.html#LogDerivZetaFinalBound","lean_link":null,"lean_decl_name":"LogDerivZetaFinalBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"SumBoundI","label":"SumBoundI","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["LogDerivZetaFinalBound"],"nlp_text":"For all \\(\\delta \\in (0,1)\\) and \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 2\\) we have \\[ \\left|\\frac{\\zeta '}{\\zeta }(1+\\delta +it) -\\sum _{\\rho \\in \\mathcal{Z}_t}\\frac{m_\\zeta (\\rho )}{1+\\delta +it-\\rho }\\right|\\ll \\log |t|. \\]","doc_url":null,"latex_link":"sect0004.html#SumBoundI","lean_link":null,"lean_decl_name":"SumBoundI","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"LogDerivZetaUniformLogSquaredBoundStrip","label":"LogDerivZetaUniformLogSquaredBoundStrip","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["SumBoundII","GapSize"],"nlp_text":"There exists a constant \\(F\\in (0,1/2)\\) such that for all \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 3\\) one has \\[ 1-\\frac{F}{\\log |t|}\\leq \\sigma \\leq 3/2\\implies \\left|\\frac{\\zeta '}{\\zeta }(\\sigma +it)\\right|\\ll \\log ^2|t| \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaUniformLogSquaredBoundStrip","latex_link":"sect0004.html#LogDerivZetaUniformLogSquaredBoundStrip","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaUniformLogSquaredBoundStrip","lean_decl_name":"LogDerivZetaUniformLogSquaredBoundStrip","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"LogDerivZetaUniformLogSquaredBoundStrip\")\n (statement := /--\n There exists a constant $F\\in(0,1/2)$ such that for all $t\\in\\mathbb{R}$ with $|t|\\geq 3$ one has\n $$1-\\frac{F}{\\log|t|}\\leq\\sigma\\leq 3/2\\implies\\left|\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right|\\ll\\log^2|t|$$\n where the implied constant is uniform in $\\sigma$.\n -/)\n (proof := /--\n Take $F=E/3$ where $E$ comes from Theorem \\ref{ZeroInequality}. Then we have that $\\sigma\\geq 1-\\delta_t/3$. So, we apply Lemma \\ref{SumBoundII}, which gives us that\n $$\\left|\\frac{\\zeta'}{\\zeta}(z)-\\sum_{\\rho\\in\\mathcal{Z}_t}\\frac{m_\\zeta(\\rho)}{z-\\rho}\\right|\\ll\\log|t|.$$\n Using the reverse triangle inequality and rearranging, we have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(z)\\right|\\leq\\sum_{\\rho\\in\\mathcal{Z}_t}\\frac{m_\\zeta(\\rho)}{|z-\\rho|}+C\\,\\log|t|$$\n where $C$ is the implied constant in Lemma \\ref{SumBoundII}. Now applying Lemma \\ref{GapSize} we have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(z)\\right|\\leq\\frac{6}{\\delta_t}\\sum_{\\rho\\in\\mathcal{Z}_t}m_\\zeta(\\rho)+C\\,\\log|t|.$$\n Now let $f(z)=\\zeta(z+3/2+it)/\\zeta(3/2+it)$ with $\\rho=\\rho'+3/2+it$. Then if $\\rho\\in\\mathcal{Z}_t$ we have that\n $$0=\\zeta(\\rho)=\\zeta(\\rho'+3/2+it)=f(\\rho')$$\n with the same multiplicity of zero, that is $m_\\zeta(\\rho)=m_f(\\rho')$. And also if $\\rho\\in\\mathcal{Z}_t$ then\n $$5/6\\geq|\\rho-(3/2+it)|=|\\rho'|.$$\n Thus we change variables to have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(z)\\right|\\leq\\frac{6}{\\delta_t}\\sum_{\\rho'\\in\\mathcal{K}_f(5/6)}m_f(\\rho')+C\\,\\log|t|.$$\n Now note that $f(0)=1$ and for $|z|\\leq 8/9$ we have\n $$|f(z)|=\\frac{|\\zeta(z+3/2+it)|}{|\\zeta(3/2+it)|}\\leq\\frac{\\zeta(3/2)}{\\zeta(3)}\\cdot(7+2\\,|t|)\\leq\\frac{13\\,\\zeta(3/2)}{3\\,\\zeta(3)}\\,|t|$$\n by Theorems \\ref{ZetaFixedLowerBound} and \\ref{GlobalBound}. Thus by Theorem \\ref{ZerosBound} we have that\n $$\\sum_{\\rho'\\in\\mathcal{K}_f(5/6)}m_f(\\rho')\\leq\\frac{\\log|t|+\\log(13\\,\\zeta(3/2)/(3\\,\\zeta(3)))}{\\log((8/9)/(5/6))}\\leq D\\log|t|$$\n where $D$ is taken to be sufficiently large. Recall, by definition that, $\\delta_t=E/\\log|t|$ with $E$ coming from Theorem \\ref{ZeroInequality}. By using this fact and the above, we have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(z)\\right|\\ll\\log^2|t|+\\log|t|$$\n where the implied constant is taken to be bigger than $\\max(6D/E,C)$. We know that the RHS is bounded above by $\\ll\\log^2|t|$; so the result follows.\n -/)\n (proofUses := [\"ZetaFixedLowerBound\", \"ZerosBound\", \"GlobalBound\", \"SumBoundII\", \"ZeroInequality\", \"GapSize\"])\n (latexEnv := \"lemma\")]\nlemma LogDerivZetaUniformLogSquaredBoundStrip : ∃ (F : ℝ) (Fequ : F = E / 3) (C : ℝ) (Cnonneg : 0 ≤ C),\n ∀ (σ t : ℝ),\n 3 ≤ |t| →\n σ ∈ Set.Icc (1 - F / Real.log |t|) (3 / 2) →\n ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ C * (Real.log |t|) ^ 2 := by\n use E / 3\n refine exists_prop.mpr ?_\n constructor\n · rfl\n · sorry\n","line":955,"end_line":994,"proof_status":"formalized"} {"id":"LogDerivZetaUniformLogSquaredBound","label":"LogDerivZetaUniformLogSquaredBound","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["LogDerivZetaUniformLogSquaredBoundStrip"],"nlp_text":"There exists a constant \\(F\\in (0,1/2)\\) such that for all \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 3\\) one has \\[ 1-\\frac{F}{\\log |t|}\\leq \\sigma \\implies \\left|\\frac{\\zeta '}{\\zeta }(\\sigma +it)\\right|\\ll \\log ^2|t| \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaUniformLogSquaredBound","latex_link":"sect0004.html#LogDerivZetaUniformLogSquaredBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaUniformLogSquaredBound","lean_decl_name":"LogDerivZetaUniformLogSquaredBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"LogDerivZetaUniformLogSquaredBound\")\n (statement := /--\n There exists a constant $F\\in(0,1/2)$ such that for all $t\\in\\mathbb{R}$ with $|t|\\geq 3$ one has\n $$1-\\frac{F}{\\log|t|}\\leq\\sigma\\implies\\left|\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right|\\ll\\log^2|t|$$\n where the implied constant is uniform in $\\sigma$.\n -/)\n (proof := /-- Note that\n $$\\left|\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right|=\\sum_{1\\leq n}\\frac{\\Lambda(n)}{|n^{\\sigma+it}|}=\\sum_{1\\leq n}\\frac{\\Lambda(n)}{n^\\sigma}=-\\frac{\\zeta'}{\\zeta}(\\sigma)\\leq\\left|\\frac{\\zeta'}{\\zeta}(\\sigma)\\right|.$$\n From Theorem \\ref{riemannZetaLogDerivResidue}, and applying the triangle inequality we know that\n $$\\left|\\frac{\\zeta'}{\\zeta}(s)\\right|\\leq\\frac{1}{|s-1|}+C.$$\n where $C>0$ is some constant. Thus, for $\\sigma\\geq 3/2$ we have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right|\\leq\\left|\\frac{\\zeta'}{\\zeta}(\\sigma)\\right|\\leq\\frac{1}{\\sigma-1}+C\\leq 2+C\\ll 1\\ll\\log^2|t|.$$\n Putting this together with Lemma \\ref{LogDerivZetaUniformLogSquaredBoundStrip} completes the proof. -/)\n (proofUses := [\"riemannZetaLogDerivResidue\", \"LogDerivZetaUniformLogSquaredBoundStrip\"])\n (latexEnv := \"theorem\")]\ntheorem LogDerivZetaUniformLogSquaredBound : ∃ (C : ℝ) (Cnonneg : 0 ≤ C),\n ∀ (σ t : ℝ),\n 3 < |t| →\n σ ∈ Set.Ici (1 - F / Real.log |t|) →\n ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ C * Real.log |t| ^ 2 := by\n sorry\n","line":1016,"end_line":1037,"proof_status":"statement_formalized"} {"id":"I1NewBound","label":"I1NewBound","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["LogDerivZetaUniformLogSquaredBound","MellinOfSmooth1b","I1New"],"nlp_text":"We have that \\[ |I_1(\\nu ,\\varepsilon ,X,T)|\\ll \\frac{X}{\\varepsilon \\sqrt{T}}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I1NewBound","latex_link":"sect0004.html#I1NewBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I1NewBound","lean_decl_name":"I1NewBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I1NewBound\")\n (statement := /--\n We have that\n $$|I_1(\\nu,\\varepsilon,X,T)|\\ll\\frac{X}{\\varepsilon\\sqrt{T}}.$$\n -/)\n (proof := /--\n Note that $|I_1(\\nu,\\varepsilon,X,T)|=$\n $$\\left|\\frac{1}{2\\pi i}\\int_{-\\infty}^{-T}\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma+it)\\,X^{\\sigma+it}\\,dt\\right|\\ll\\int_{-\\infty}^{-T}\\left|\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right|\\cdot|\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma+it)|\\cdot X^\\sigma\\,dt.$$\n Applying Theorem \\ref{LogDerivZetaUniformLogSquaredBound} and Lemma \\ref{MellinOfSmooth1b}, we have that\n $$|I_1(\\nu,\\varepsilon,X,T)|\\ll\\int_{-\\infty}^{-T}\\log^2|t|\\cdot\\frac{X^\\sigma}{\\varepsilon\\,|\\sigma+it|^2}\\,dt\\ll\\frac{X}{\\varepsilon}\\int_T^\\infty\\frac{\\sqrt{t}\\,dt}{t^2}\\ll\\frac{X}{\\varepsilon\\sqrt{T}}.$$\n Here we are using the fact that $\\log^2 t$ grows slower than $\\sqrt{t}$, $|\\sigma+it|^2\\geq t^2$, and $X^\\sigma=X\\cdot X^{1/\\log X}=eX$.\n -/)\n (proofUses := [\"LogDerivZetaUniformLogSquaredBound\", \"MellinOfSmooth1b\"])\n (latexEnv := \"lemma\")]\nlemma I1NewBound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) : ∃ (C : ℝ) (Cnonneg : 0 ≤ C),\n ∀ {ε X T : ℝ} (εinIoo : ε ∈ Ioo 0 1) (Xgt3 : 3 < X) (Tgt3 : 3 < T),\n ‖I1New SmoothingF ε X T‖ ≤ C * (X / (ε * Real.sqrt T)) := by\n sorry\n","line":1105,"end_line":1125,"proof_status":"statement_formalized"} {"id":"I2NewBound","label":"I2NewBound","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["LogDerivZetaUniformLogSquaredBound","I2New","MellinOfSmooth1b"],"nlp_text":"We have that \\[ |I_2(\\nu ,\\varepsilon ,X,T)|\\ll \\frac{X}{\\varepsilon \\sqrt{T}}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I2NewBound","latex_link":"sect0004.html#I2NewBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I2NewBound","lean_decl_name":"I2NewBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I2NewBound\")\n (statement := /--\n We have that\n $$|I_2(\\nu,\\varepsilon,X,T)|\\ll\\frac{X}{\\varepsilon\\sqrt{T}}.$$\n -/)\n (proof := /--\n Note that $|I_2(\\nu,\\varepsilon,X,T)|=$\n $$\\left|\\frac{1}{2\\pi i}\\int_{\\sigma'}^\\sigma\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma_0-iT)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma_0-iT)\\,X^{\\sigma_0-iT}\\,d\\sigma_0\\right|\\ll\\int_{\\sigma'}^\\sigma\\left|\\frac{\\zeta'}{\\zeta}(\\sigma_0-iT)\\right|\\cdot|\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma_0-iT)|\\cdot X^{\\sigma_0}\\,d\\sigma_0.$$\n Applying Theorem \\ref{LogDerivZetaUniformLogSquaredBound} and Lemma \\ref{MellinOfSmooth1b}, we have that\n $$|I_2(\\nu,\\varepsilon,X,T)|\\ll\\int_{\\sigma'}^\\sigma\\log^2 T\\cdot\\frac{X^{\\sigma_0}}{\\varepsilon\\,|\\sigma_0-iT|^2}\\,d\\sigma_0\\ll\\frac{X\\,\\log^2T}{\\varepsilon\\,T^2}\\int_{\\sigma'}^\\sigma d\\,\\sigma_0=\\frac{X\\,\\log^2T}{\\varepsilon\\,T^2}\\,(\\sigma-\\sigma').$$\n Here we are using the fact that $X^{\\sigma_0}\\leq X^\\sigma=X\\cdot X^{1/\\log X}=eX$ and $|\\sigma_0-iT|^2\\geq T^2$. Now note that\n $$|I_2(\\nu,\\varepsilon,X,T)|\\ll\\frac{X\\,\\log^2T}{\\varepsilon\\,T^2}\\,(\\sigma-\\sigma')=\\frac{X\\,\\log^2T}{\\varepsilon\\,T^2\\,\\log X}+\\frac{FX\\,\\log T}{\\varepsilon\\,T^2}\\ll\\frac{X}{\\varepsilon\\sqrt{T}}.$$\n Here we are using the fact that $\\log T\\ll T^{3/2}$, $\\log^2T\\ll T^{3/2}$, and $X/\\log X\\ll X$.\n -/)\n (proofUses := [\"LogDerivZetaUniformLogSquaredBound\", \"MellinOfSmooth1b\"])\n (latexEnv := \"lemma\")]\nlemma I2NewBound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) : ∃ (C : ℝ) (Cnonneg : 0 ≤ C),\n ∀ {ε X T : ℝ} (εinIoo : ε ∈ Ioo 0 1) (Xgt3 : 3 < X) (Tgt3 : 3 < T),\n let σ' := 1 - F / Real.log T\n ‖I2New SmoothingF ε X T σ'‖ ≤ C * (X / (ε * Real.sqrt T)) := by\n sorry\n","line":1192,"end_line":1215,"proof_status":"statement_formalized"} {"id":"LogDerivZetaLogSquaredBoundSmallt","label":"LogDerivZetaLogSquaredBoundSmallt","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["LogDerivZetaUniformLogSquaredBound"],"nlp_text":"For \\(T{\\gt}0\\) and \\(\\sigma '=1-\\delta _T/3=1-F/\\log T\\), if \\(|t|\\leq T\\) then we have that \\[ \\left|\\frac{\\zeta '}{\\zeta }(\\sigma '+it)\\right|\\ll \\log ^2(2+T). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaLogSquaredBoundSmallt","latex_link":"sect0004.html#LogDerivZetaLogSquaredBoundSmallt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaLogSquaredBoundSmallt","lean_decl_name":"LogDerivZetaLogSquaredBoundSmallt","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"LogDerivZetaLogSquaredBoundSmallt\")\n (statement := /--\n For $T>0$ and $\\sigma'=1-\\delta_T/3=1-F/\\log T$, if $|t|\\leq T$ then we have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(\\sigma'+it)\\right|\\ll\\log^2(2+T).$$\n -/)\n (proof := /--\n Note that if $|t|\\geq 3$ then from Theorem \\ref{LogDerivZetaUniformLogSquaredBound} we have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(\\sigma'+it)\\right|\\ll\\log^2|t|\\leq\\log^2T\\leq\\log^2(2+T).$$\n Otherwise, if $|t|\\leq 3$, then from Theorem \\ref{riemannZetaLogDerivResidue} and applying the triangle inequality we know\n $$\\left|\\frac{\\zeta'}{\\zeta}(\\sigma'+it)\\right|\\leq\\frac{1}{|(\\sigma'-1)+it|}+C\\leq\\frac{\\log T}{F}+C$$\n where $C\\geq 0$. Thus, we have that\n $$\\left|\\frac{\\zeta'}{\\zeta}(\\sigma'+it)\\right|\\leq\\left(\\frac{\\log T}{F\\,\\log 2}+\\frac{C}{\\log 2}\\right)\\,\\log(2+|t|)\\leq\\left(\\frac{\\log(2+T)}{F\\,\\log 2}+\\frac{C}{\\log 2}\\right)\\log(2+T)\\ll\\log^2(2+T).$$\n -/)\n (proofUses := [\"LogDerivZetaUniformLogSquaredBound\", \"riemannZetaLogDerivResidue\"])\n (latexEnv := \"theorem\")]\ntheorem LogDerivZetaLogSquaredBoundSmallt : ∃ (C : ℝ) (Cnonneg : C ≥ 0),\n ∀ (σ t T : ℝ) (Tpos: T > 0),\n |t| ≤ T →\n σ = 1 - F / Real.log T →\n ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ C * Real.log (2 + T) ^ 2 := by\n sorry\n","line":1041,"end_line":1062,"proof_status":"statement_formalized"} {"id":"thm:gourdon-demichel2004","label":"gourdon-demichel2004","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} \\exp (60)\\), then there is a prime in the interval \\[ \\left( x\\left(1 - \\frac{1}{14500755538}\\right), x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/GourdonDemichel2004.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:gourdon-demichel2004","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/GourdonDemichel2004.has_prime_in_interval","lean_decl_name":"GourdonDemichel2004.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:gourdon-demichel2004\"\n (title := \"Gourdon-Demichel 2004\")\n (statement := /-- If $x > \\exp(60)$, then there is a prime in the interval\n \\[ \\left( x\\left(1 - \\frac{1}{14500755538}\\right), x \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem GourdonDemichel2004.has_prime_in_interval (x : ℝ) (hx : x > exp 60) :\n HasPrimeInInterval (x*(1-1/14500755538)) (x/14500755538) := by sorry","line":158,"end_line":166,"proof_status":"formalized"} {"id":"I5","label":"I5","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_5(\\nu , \\epsilon , X, \\sigma _2) := \\frac{1}{2\\pi i} \\int _{-3}^{3} \\left( \\frac{-\\zeta '}\\zeta (\\sigma _2 + t i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma _2 + t i) X^{\\sigma _2 + t i} \\ i \\ dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₅","latex_link":"sect0003.html#I5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₅","lean_decl_name":"I₅","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I5\"\n (title := \"I₅\")\n (statement := /--\n $$\n I_5(\\nu, \\epsilon, X, \\sigma_2) := \\frac{1}{2\\pi i} \\int_{-3}^{3}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma_2 + t i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_2 + t i)\n X^{\\sigma_2 + t i} \\ i \\ dt\n $$\n -/)]\nnoncomputable def I₅ (SmoothingF : ℝ → ℝ) (ε X σ₂ : ℝ) : ℂ :=\n (1 / (2 * π * I)) *\n (I * (∫ t in (-3)..3, SmoothedChebyshevIntegrand SmoothingF ε X (σ₂ + t * I)))","line":1001,"end_line":1016,"proof_status":"formalized"} {"id":"I5Bound","label":"I5Bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["I5","MellinOfSmooth1b"],"nlp_text":"We have that \\[ \\left|I_{5}(\\nu , \\epsilon , X, \\sigma _2)\\right| \\ll \\frac{X^{\\sigma _2}}{\\epsilon }. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I5Bound","latex_link":"sect0003.html#I5Bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I5Bound","lean_decl_name":"I5Bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":" rwa [I6I4 (by linarith), norm_neg, norm_conj]\n\n\n\n\n\n\n@[blueprint\n (title := \"I5Bound\")\n (statement := /--\n We have that\n $$\n \\left|I_{5}(\\nu, \\epsilon, X, \\sigma_2)\\right| \\ll \\frac{X^{\\sigma_2}}{\\epsilon}.\n $$\n -/)\n (proof := /--\n Here $\\zeta'/\\zeta$ is absolutely bounded on the compact interval $\\sigma_2 + i [-3,3]$, and\n $X^s$ is bounded by $X^{\\sigma_2}$. Using Theorem \\ref{MellinOfSmooth1b} gives the bound $1/(\\epsilon |s|^2)$, which is bounded by $C'/\\epsilon$.\n Putting these together gives the result.\n -/)\n (latexEnv := \"lemma\")]\nlemma I5Bound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF)\n {σ₂ : ℝ} (h_logDeriv_holo : LogDerivZetaIsHoloSmall σ₂) (hσ₂ : σ₂ ∈ Ioo 0 1)\n : ∃ (C : ℝ) (_ : 0 < C),\n ∀ (X : ℝ) (_ : 3 < X) {ε : ℝ} (_ : 0 < ε)\n (_ : ε < 1),\n ‖I₅ SmoothingF ε X σ₂‖ ≤ C * X ^ σ₂ / ε := by\n unfold LogDerivZetaIsHoloSmall HolomorphicOn at h_logDeriv_holo\n let zeta'_zeta_on_line := fun (t : ℝ) ↦ ζ' (σ₂ + t * I) / ζ (σ₂ + t * I)\n\n have subst : {σ₂} ×ℂ uIcc (-3) 3 ⊆ (uIcc σ₂ 2 ×ℂ uIcc (-3) 3) \\ {1} := by\n simp! only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le]\n simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, neg_le_self_iff,\n Nat.ofNat_nonneg, uIcc_of_le]\n intro z\n intro hyp_z\n simp only [mem_reProdIm, mem_singleton_iff, mem_Icc] at hyp_z\n simp only [mem_diff, mem_reProdIm, mem_Icc, mem_singleton_iff]\n constructor\n · constructor\n · rw [hyp_z.1]\n apply left_mem_uIcc\n · exact hyp_z.2\n · push_neg\n by_contra h\n rw [h] at hyp_z\n simp only [one_re, one_im, Left.neg_nonpos_iff, Nat.ofNat_nonneg, and_self, and_true] at hyp_z\n linarith [hσ₂.2]\n\n have zeta'_zeta_cont := (h_logDeriv_holo.mono subst).continuousOn\n\n\n have is_compact' : IsCompact ({σ₂} ×ℂ uIcc (-3) 3) := by\n refine IsCompact.reProdIm ?_ ?_\n · exact isCompact_singleton\n · exact isCompact_uIcc\n\n let ⟨zeta_bound, zeta_prop⟩ :=\n IsCompact.exists_bound_of_continuousOn (is_compact') zeta'_zeta_cont\n\n let ⟨M, ⟨M_is_pos, M_bounds_mellin_hard⟩⟩ :=\n MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF\n\n clear is_compact' zeta'_zeta_cont subst zeta'_zeta_on_line h_logDeriv_holo\n\n\n unfold I₅\n unfold SmoothedChebyshevIntegrand\n\n let mellin_prop : ∀ (t ε : ℝ),\n 0 < ε → ε < 1 → ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ ≤ M * (ε * ‖↑σ₂ + ↑t * I‖ ^ 2)⁻¹ :=\n fun (t : ℝ) ↦ (M_bounds_mellin_hard σ₂ (by linarith[hσ₂.1]) (σ₂ + t * I) (by simp only [add_re,\n ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero, le_refl]) (by simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero]; linarith[hσ₂.2]))\n\n simp only [mul_inv_rev] at mellin_prop\n\n let Const := 1 + (σ₂^2)⁻¹ * (abs zeta_bound) * M\n\n let C := |π|⁻¹ * 2⁻¹ * 6 * Const\n use C\n have C_pos : 0 < C := by positivity\n use C_pos\n\n clear C_pos\n\n intros X X_gt ε ε_pos ε_lt_one\n\n have mellin_bound := fun (t : ℝ) ↦ mellin_prop t ε ε_pos ε_lt_one\n\n have U: 0 < σ₂^2 := by\n exact sq_pos_of_pos (by linarith[hσ₂.1])\n\n have easy_bound : ∀(t : ℝ), (‖↑σ₂ + ↑t * I‖^2)⁻¹ ≤ (σ₂^2)⁻¹ :=\n by\n intro t\n rw [inv_le_inv₀]\n · rw [Complex.sq_norm, Complex.normSq_apply]\n simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n add_zero, add_im, mul_im, zero_add]\n ring_nf\n simp only [le_add_iff_nonneg_right]\n exact zpow_two_nonneg t\n · rw [Complex.sq_norm, Complex.normSq_apply]\n simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n add_zero, add_im, mul_im, zero_add]\n ring_nf\n positivity\n positivity\n\n have T1 : ∀(t : ℝ), t ∈ uIoc (-3) (3 : ℝ) → ‖-ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I) * 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ₂ + ↑t * I) *\n (↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ ≤ Const * ε⁻¹ * X ^ σ₂ := by\n intro t\n intro hyp_t\n have Z := by\n calc\n ‖(-ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I)) * (𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)) *\n (↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ = ‖-ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by simp only [Complex.norm_mul,\n Complex.norm_div, norm_neg]\n _ ≤ ‖ζ' (↑σ₂ + ↑t * I) / ζ (↑σ₂ + ↑t * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by simp only [Complex.norm_div,\n norm_neg, le_refl]\n _ ≤ zeta_bound * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ :=\n by\n have U := zeta_prop (↑σ₂ + t * I) (by\n simp only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le]\n simp only [mem_reProdIm, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im,\n mul_one, sub_self, add_zero, mem_singleton_iff, add_im, mul_im, zero_add, mem_Icc]\n constructor\n · trivial\n · refine mem_Icc.mp ?_\n · refine mem_Icc_of_Ioc ?_\n · have T : (-3 : ℝ) ≤ 3 := by simp only [neg_le_self_iff, Nat.ofNat_nonneg]\n rw [←Set.uIoc_of_le T]\n exact hyp_t)\n simp only [Complex.norm_div] at U\n simp only [Complex.norm_div, ge_iff_le]\n linear_combination U * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖\n _ ≤ abs zeta_bound * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by\n have U : zeta_bound ≤ abs zeta_bound := by simp only [le_abs_self]\n linear_combination (U * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₂ + ↑t * I)‖ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ )\n _ ≤ abs zeta_bound * M * ((‖↑σ₂ + ↑t * I‖ ^ 2)⁻¹ * ε⁻¹) * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by\n have U := mellin_bound t\n linear_combination (abs zeta_bound) * U * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖\n _ ≤ abs zeta_bound * M * (σ₂^2)⁻¹ * ε⁻¹ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖ := by\n linear_combination (abs zeta_bound * M * easy_bound t * ε⁻¹ * ‖(↑X : ℂ) ^ (↑σ₂ + ↑t * I)‖)\n _ = abs zeta_bound * M * (σ₂^2)⁻¹ * ε⁻¹ * X ^ (σ₂) := by\n rw [Complex.norm_cpow_eq_rpow_re_of_pos]\n · simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one,\n sub_self, add_zero]\n positivity\n _ ≤ Const * ε⁻¹ * X ^ σ₂ := by\n unfold Const\n ring_nf\n simp only [inv_pow, le_add_iff_nonneg_right, inv_pos, mul_nonneg_iff_of_pos_left, ε_pos]\n positivity\n\n exact Z\n\n -- Now want to apply the triangle inequality\n -- and bound everything trivially\n simp only [one_div, mul_inv_rev, inv_I, neg_mul, norm_neg, Complex.norm_mul, norm_I, norm_inv,\n norm_real, norm_eq_abs, Complex.norm_ofNat, one_mul, ge_iff_le]\n have Z :=\n intervalIntegral.norm_integral_le_of_norm_le_const T1\n","line":3509,"end_line":3673,"proof_status":"formalized"} {"id":"fks-corollary-2-9","label":"fks-corollary-2-9","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound"],"nlp_text":"For each \\(\\sigma _1, \\sigma _2, \\tilde c_1, \\tilde c_2\\) given in Table 8, we have \\(N(\\sigma ,T) \\leq \\tilde c_1 T^{p(\\sigma )} \\log ^{q(\\sigma )} + \\tilde c_2 \\log ^2 T\\) for \\(\\sigma _1 \\leq \\sigma \\leq \\sigma _2\\) with \\(p(\\sigma ) = 8/3 (1-\\sigma )\\) and \\(q(σ) = 5-2\\sigma \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_2_9","latex_link":"primary-chapter.html#fks-corollary-2-9","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_2_9","lean_decl_name":"FKS.corollary_2_9","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-corollary-2-9\"\n (title := \"FKS Corollary 2.9\")\n (statement := /--\n For each $\\sigma_1, \\sigma_2, \\tilde c_1, \\tilde c_2$ given in Table 8, we have\n $N(\\sigma,T) \\leq \\tilde c_1 T^{p(\\sigma)} \\log^{q(\\sigma)} + \\tilde c_2 \\log^2 T$ for\n $\\sigma_1 \\leq \\sigma \\leq \\sigma_2$ with $p(\\sigma) = 8/3 (1-\\sigma)$ and $q(σ) = 5-2\\sigma$.\n -/)]\nnoncomputable def corollary_2_9 {σ₁ σ₂ α δ d CC_1 c₁ CC_2 c₂ : ℝ}\n (h : (σ₁, σ₂, α, δ, d, CC_1, c₁, CC_2, c₂) ∈ table_8) : zero_density_bound := {\n T₀ := 3e12\n σ_range := Set.Icc σ₁ σ₂\n c₁ σ := c₁\n c₂ σ := c₂\n p σ := 8 / 3 * (1 - σ)\n q σ := 5 - 2 * σ\n bound := by sorry\n}\n","line":129,"end_line":146,"proof_status":"statement_formalized"} {"id":"prelim-decay","label":"prelim-decay","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(\\psi :\\mathbb {R}\\to \\mathbb {C}\\) is absolutely integrable then \\[ |\\hat\\psi (u)| \\leq \\| \\psi \\| _1 \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prelim_decay","latex_link":"sect0002.html#prelim-decay","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prelim_decay","lean_decl_name":"prelim_decay","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (statement := /--\n If $\\psi:\\R \\to \\C$ is absolutely integrable then $$ |\\hat \\psi(u)| \\leq \\| \\psi \\|_1 $$\n for all $u \\in \\R$. where $C$ is an absolute constant.\n -/)\n (proof := /-- Immediate from the triangle inequality. -/)\n (latexEnv := \"lemma\")\n (discussion := 561)]\ntheorem prelim_decay (ψ : ℝ → ℂ) (u : ℝ) : ‖𝓕 (ψ : ℝ → ℂ) u‖ ≤ ∫ t, ‖ψ t‖ :=\n VectorFourier.norm_fourierIntegral_le_integral_norm ..\n\n@[blueprint \"prelim-decay-2\"\n","line":298,"end_line":308,"proof_status":"formalized"} {"id":"ZetaZeroFree","label":"ZetaZeroFree","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaLowerBnd"],"nlp_text":"There is an \\(A{\\gt}0\\) so that for \\(1-A/\\log ^9 |t| \\le \\sigma {\\lt} 1\\) and \\(3 {\\lt} |t|\\), \\[ \\zeta (\\sigma +it) \\ne 0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaZeroFree","latex_link":"sect0003.html#ZetaZeroFree","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaZeroFree","lean_decl_name":"ZetaZeroFree","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaZeroFree\")\n (statement := /--\n There is an $A>0$ so that for $1-A/\\log^9 |t| \\le \\sigma < 1$ and $3 < |t|$,\n $$\n \\zeta(\\sigma+it) \\ne 0.\n $$\n -/)\n (proof := /-- Apply Lemma \\ref{ZetaLowerBnd}. -/)\n (latexEnv := \"lemma\")]\nlemma ZetaZeroFree :\n ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)),\n ∀ (σ : ℝ)\n (t : ℝ) (_ : 3 < |t|)\n (_ : σ ∈ Ico (1 - A / (Real.log |t|) ^ 9) 1),\n ζ (σ + t * I) ≠ 0 := by\n obtain ⟨A, hA, c, hc, h_lower⟩ := ZetaLowerBnd\n\n -- Use the same A for our result\n refine ⟨A, hA, ?_⟩\n\n -- Now prove that ζ has no zeros in this region\n intro σ t ht hσ h_zero\n\n have := h_lower σ t ht hσ\n\n rw [h_zero, norm_zero] at this\n\n have pos_bound : 0 < c / (Real.log |t|) ^ (7 : ℝ) := by\n apply div_pos hc\n apply Real.rpow_pos_of_pos\n apply Real.log_pos\n linarith\n\n linarith\n","line":3145,"end_line":3179,"proof_status":"formalized"} {"id":"LogDerivZetaHolcLargeT","label":"LogDerivZetaHolcLargeT","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaZeroFree","ZetaNoZerosInBox"],"nlp_text":"There is an \\(A{\\gt}0\\) so that for all \\(T{\\gt}3\\), the function \\( \\frac{\\zeta '}{\\zeta }(s) \\) is holomorphic on \\(\\{ 1-A/\\log ^9 T \\le \\Re s \\le 2, |\\Im s|\\le T \\} \\setminus \\{ 1\\} \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaHolcLargeT","latex_link":"sect0003.html#LogDerivZetaHolcLargeT","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaHolcLargeT","lean_decl_name":"LogDerivZetaHolcLargeT","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"LogDerivZetaHolcLargeT\")\n (statement := /--\n There is an $A>0$ so that for all $T>3$, the function\n $\n \\frac {\\zeta'}{\\zeta}(s)\n $\n is holomorphic on $\\{1-A/\\log^9 T \\le \\Re s \\le 2, |\\Im s|\\le T \\}\\setminus\\{1\\}$.\n -/)\n (proof := /--\n The derivative of $\\zeta$ is holomorphic away from $s=1$; the denominator $\\zeta(s)$ is nonzero\n in this range by Lemma \\ref{ZetaZeroFree}.\n -/)\n (latexEnv := \"lemma\")]\ntheorem LogDerivZetaHolcLargeT :\n ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)), ∀ (T : ℝ) (_ : 3 ≤ T),\n HolomorphicOn (fun (s : ℂ) ↦ ζ' s / (ζ s))\n (( (Icc ((1 : ℝ) - A / Real.log T ^ 9) 2) ×ℂ (Icc (-T) T) ) \\ {1}) := by\n obtain ⟨A, A_inter, restOfZetaZeroFree⟩ := ZetaZeroFree\n obtain ⟨σ₁, σ₁_lt_one, noZerosInBox⟩ := ZetaNoZerosInBox 3\n let A₀ := min A ((1 - σ₁) * Real.log 3 ^ 9)\n refine ⟨A₀, ?_, ?_⟩\n · constructor\n · apply lt_min A_inter.1\n bound\n · exact le_trans (min_le_left _ _) A_inter.2\n intro T hT\n apply LogDerivZetaHoloOn\n · exact notMem_diff_of_mem rfl\n intro s hs\n rcases le_or_gt 1 s.re with one_le|lt_one\n · exact riemannZeta_ne_zero_of_one_le_re one_le\n rw [← re_add_im s]\n have := Complex.mem_reProdIm.mp hs.1\n rcases lt_or_ge 3 |s.im| with gt3|le3\n · apply restOfZetaZeroFree _ _ gt3\n refine ⟨?_, lt_one⟩\n calc\n _ ≤ 1 - A₀ / Real.log T ^ 9 := by\n gcongr\n · exact A_inter.1.le\n · bound\n · bound\n · bound\n · exact abs_le.mpr ⟨this.2.1, this.2.2⟩\n _ ≤ _:= by exact this.1.1\n\n · apply noZerosInBox _ le3\n calc\n _ ≥ 1 - A₀ / Real.log T ^ 9 := by exact this.1.1\n _ ≥ 1 - A₀ / Real.log 3 ^ 9 := by\n gcongr\n apply le_min A_inter.1.le\n bound\n _ ≥ 1 - (((1 - σ₁) * Real.log 3 ^ 9)) / Real.log 3 ^ 9:= by\n gcongr\n apply min_le_right\n _ = _ := by field_simp; simp\n","line":3473,"end_line":3530,"proof_status":"formalized"} {"id":"log_pow_over_xsq_integral_bounded","label":"log_pow_over_xsq_integral_bounded","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For every \\(n\\) there is some absolute constant \\(C{\\gt}0\\) such that \\[ \\int _3^T \\frac{(\\log x)^9}{x^2}dx {\\lt} C \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_pow_over_xsq_integral_bounded","latex_link":"sect0003.html#log_pow_over_xsq_integral_bounded","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_pow_over_xsq_integral_bounded","lean_decl_name":"log_pow_over_xsq_integral_bounded","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":" use C, hC\n intro X hX ε hε0 hε1 T hT σ₁\n let i2Bound := i2Bound X hX hε0 hε1 hT\n rw[I8I2 hX, norm_neg, norm_conj]\n exact i2Bound\n\n\n@[blueprint\n (title := \"log-pow-over-xsq-integral-bounded\")\n (statement := /--\n For every $n$ there is some absolute constant $C>0$ such that\n $$\n \\int_3^T \\frac{(\\log x)^9}{x^2}dx < C\n $$\n -/)\n (proof := /-- Induct on n and just integrate by parts. -/)\n (latexEnv := \"lemma\")]\nlemma log_pow_over_xsq_integral_bounded :\n ∀ n : ℕ, ∃ C : ℝ, 0 < C ∧ ∀ T >3, ∫ x in Ioo 3 T, (Real.log x)^n / x^2 < C := by\n have log3gt1: 1 < Real.log 3 := logt_gt_one le_rfl\n intro n\n induction n with\n | zero =>\n use 1\n constructor\n · norm_num\n · intro T hT\n simp only [pow_zero]\n have h1 :(0 ≤ (-2) ∨ (-2) ≠ (-1) ∧ 0 ∉ Set.uIcc 3 T) := by\n right\n constructor\n · linarith\n · refine notMem_uIcc_of_lt ?_ ?_\n · exact three_pos\n · linarith\n have integral := integral_zpow h1\n ring_nf at integral\n\n have swap_int_kind : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), 1 / x ^ 2 = ∫ (x : ℝ) in Ioo 3 T, 1 / x ^ 2 := by\n rw [intervalIntegral.integral_of_le (by linarith)]\n exact MeasureTheory.integral_Ioc_eq_integral_Ioo\n rw [← swap_int_kind]\n have change_int_power : ∫ (x : ℝ) in (3 : ℝ)..T, (1 : ℝ) / x ^ (↑ 2)\n = ∫ (x : ℝ) in (3 : ℝ).. T, x ^ (-2 : ℤ) := by\n apply intervalIntegral.integral_congr\n intro x hx\n simp\n rfl\n rw [change_int_power, integral]\n have : T ^ (-1 : ℤ) > 0 := by\n refine zpow_pos ?_ (-1)\n linarith\n linarith\n | succ d ih =>\n obtain ⟨Cd, Cdpos, IH⟩ := ih\n use ((Real.log 3)^(d+1) / 3) + (d+1) * Cd\n constructor\n · have logpowpos : (Real.log 3) ^ (d + 1) > 0 := by\n refine pow_pos ?_ (d + 1)\n linarith\n have : Real.log 3 ^ (d + 1) / 3 + (↑d + 1) * Cd > 0 / 3 + 0 := by\n have term2_pos : 0 < (↑d + 1) * Cd := by\n refine (mul_pos_iff_of_pos_right Cdpos).mpr ?_\n exact Nat.cast_add_one_pos d\n refine add_lt_add ?_ term2_pos\n refine div_lt_div₀ logpowpos ?_ ?_ ?_\n · linarith\n · linarith\n · linarith\n ring_nf at this\n ring_nf\n exact this\n · intro T Tgt3\n let u := fun x : ℝ ↦ (Real.log x) ^ (d + 1)\n let v := fun x : ℝ ↦ -1 / x\n let u' := fun x : ℝ ↦ (d + 1 : ℝ) * (Real.log x)^d / x\n let v' := fun x : ℝ ↦ 1 / x^2\n\n\n have swap_int_type : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ (d + 1) / x ^ 2\n = ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ (d + 1) / x ^ 2 := by\n rw [intervalIntegral.integral_of_le (by linarith)]\n exact MeasureTheory.integral_Ioc_eq_integral_Ioo\n\n rw [← swap_int_type]\n\n have uIcc_is_Icc : Set.uIcc 3 T = Set.Icc 3 T := by\n exact uIcc_of_lt Tgt3\n\n have cont_u : ContinuousOn u (Set.uIcc 3 T) := by\n unfold u\n rw[uIcc_is_Icc]\n refine ContinuousOn.pow ?_ (d + 1)\n refine continuousOn_of_forall_continuousAt ?_\n intro x hx\n refine continuousAt_log ?_\n linarith [hx.1]\n\n have cont_v : ContinuousOn v (Set.uIcc 3 T) := by\n unfold v\n rw[uIcc_is_Icc]\n refine continuousOn_of_forall_continuousAt ?_\n intro x hx\n have cont2 : ContinuousAt (fun (x : ℝ) ↦ 1 / x) (-x) := by\n refine ContinuousAt.div₀ ?_ (fun ⦃U⦄ a ↦ a) ?_\n · exact continuousAt_const\n · linarith [hx.1]\n have fun1 : (fun (x : ℝ) ↦ -1 / x) = (fun (x : ℝ) ↦ 1 / (-x)) := by\n ext x\n ring_nf\n rw [fun1]\n exact ContinuousAt.comp cont2 (HasDerivAt.neg (hasDerivAt_id x)).continuousAt\n\n have deriv_u :\n (∀ x ∈ Set.Ioo (3 ⊓ T) (3 ⊔ T), HasDerivAt u (u' x) x) := by\n intro x hx\n have min3t : min 3 T = 3 := by\n exact min_eq_left_of_lt Tgt3\n have max3t : max 3 T = T := by\n exact max_eq_right_of_lt Tgt3\n rw[min3t, max3t] at hx\n unfold u u'\n have xne0 : x ≠ 0 := by linarith [hx.1]\n have deriv2 := (Real.hasDerivAt_log xne0).pow (d + 1)\n have fun2 : (↑d + 1) * Real.log x ^ d / x = (↑d + 1) * Real.log x ^ d * x⁻¹:= by\n exact rfl\n rw [fun2]\n convert deriv2 using 1\n rw [Nat.add_sub_cancel]\n rw [Nat.cast_add, Nat.cast_one]\n\n have deriv_v : (∀ x ∈ Set.Ioo (3 ⊓ T) (3 ⊔ T), HasDerivAt v (v' x) x) := by\n intro x hx\n have min3t : min 3 T = 3 := by\n exact min_eq_left_of_lt Tgt3\n have max3t : max 3 T = T := by\n exact max_eq_right_of_lt Tgt3\n rw[min3t, max3t] at hx\n have xne0 : x ≠ 0 := by linarith [hx.1]\n unfold v v'\n have deriv1 := hasDerivAt_inv xne0\n have fun1 : (fun (x : ℝ) ↦ x⁻¹) = (fun (x : ℝ) ↦ 1 / x) := by\n ext x\n exact inv_eq_one_div x\n rw [fun1] at deriv1\n have fun2 : -(x ^ 2)⁻¹ = - 1 / x ^ 2 := by\n field_simp\n rw [fun2] at deriv1\n convert HasDerivAt.neg deriv1 using 1\n · ext x\n rw [neg_eq_neg_one_mul]\n field_simp\n simp\n · field_simp\n\n have cont_u' : ContinuousOn u' (Set.uIcc 3 T) := by\n rw[uIcc_is_Icc]\n unfold u'\n refine ContinuousOn.div₀ ?_ ?_ ?_\n · refine ContinuousOn.mul ?_ ?_\n · exact continuousOn_const\n · refine ContinuousOn.pow ?_ d\n refine continuousOn_of_forall_continuousAt ?_\n intro x hx\n refine continuousAt_log ?_\n linarith [hx.1]\n · exact continuousOn_id' (Icc 3 T)\n · intro x hx\n linarith [hx.1]\n\n have cont_v' : ContinuousOn v' (Set.uIcc 3 T) := by\n rw[uIcc_is_Icc]\n unfold v'\n refine ContinuousOn.div₀ ?_ ?_ ?_\n · exact continuousOn_const\n · exact continuousOn_pow 2\n · intro x hx\n refine pow_ne_zero 2 ?_\n linarith [hx.1]\n\n have int_u': IntervalIntegrable u' MeasureTheory.volume 3 T := by\n exact ContinuousOn.intervalIntegrable cont_u'\n\n have int_v': IntervalIntegrable v' MeasureTheory.volume 3 T := by\n exact ContinuousOn.intervalIntegrable cont_v'\n\n have IBP := intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt cont_u cont_v deriv_u deriv_v int_u' int_v'\n\n unfold u u' v v' at IBP\n\n have int1 : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ (d + 1) * (1 / x ^ 2)\n = ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ (d + 1) / x ^ 2 := by\n refine intervalIntegral.integral_congr ?_\n intro x hx\n field_simp\n\n rw[int1] at IBP\n rw[IBP]\n\n\n have int2 : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), (↑d + 1) * Real.log x ^ d / x * (-1 / x)\n = -(↑d + 1) * ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ d / x ^ 2 := by\n have : ∀ x, (↑d + 1) * Real.log x ^ d / x * (-1 / x)\n = -((↑d + 1) * Real.log x ^ d / x ^ 2) := by\n intro x\n field_simp\n have : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), (↑d + 1) * Real.log x ^ d / x * (-1 / x)\n = ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), -((↑d + 1) * Real.log x ^ d / x ^ 2) := by\n exact intervalIntegral.integral_congr fun ⦃x⦄ a ↦ this x\n rw [this]\n rw [←intervalIntegral.integral_const_mul]\n ring_nf\n\n rw[int2]\n\n have int3 : ∫ (x : ℝ) in (3 : ℝ)..(T : ℝ), Real.log x ^ d / x ^ 2\n = ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d / x ^ 2 := by\n rw [intervalIntegral.integral_of_le (by linarith)]\n exact MeasureTheory.integral_Ioc_eq_integral_Ioo\n\n rw[int3]\n\n have IHbound : ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d / x ^ 2 < Cd := by\n exact IH T Tgt3\n\n ring_nf\n have bound2 : (Real.log T * Real.log T ^ d * T⁻¹) ≥ 0 := by\n have logTpos : Real.log T ≥ 0 := by\n refine log_nonneg ?_\n linarith\n apply mul_nonneg\n · apply mul_nonneg\n · exact logTpos\n · exact pow_nonneg logTpos d\n · field_simp\n simp\n let S := Real.log T * Real.log T ^ d * T⁻¹\n have : (-(Real.log T * Real.log T ^ d * T⁻¹) + Real.log 3 * Real.log 3 ^ d * (1 / 3) +\n ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2) +\n ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2 = (-S + Real.log 3 * Real.log 3 ^ d * (1 / 3) +\n ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2) +\n ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2 := by\n unfold S\n rfl\n rw [this]\n\n have GetRidOfS : (-S + Real.log 3 * Real.log 3 ^ d * (1 / 3)\n + ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2)\n + ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2\n ≤ ( Real.log 3 * Real.log 3 ^ d * (1 / 3)\n + ↑d * ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2)\n + ∫ (x : ℝ) in Ioo 3 T, Real.log x ^ d * x⁻¹ ^ 2 := by\n linarith\n apply lt_of_le_of_lt GetRidOfS\n rw [add_assoc]\n\n have bound4 : ∫ x in Ioo 3 T, Real.log x ^ d / x ^ 2 < Cd := IHbound\n\n have bound5 : ↑d * ∫ x in Ioo 3 T, Real.log x ^ d / x ^ 2 ≤ ↑d * Cd := by\n","line":2477,"end_line":2735,"proof_status":"formalized"} {"id":"I3Bound","label":"I3Bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["log_pow_over_xsq_integral_bounded","MellinOfSmooth1b","I3"],"nlp_text":"Assuming a bound of the form of Lemma 3.4.28 we have that \\[ \\left|I_{3}(\\nu , \\epsilon , X, T)\\right| \\ll \\frac{X}{\\epsilon }\\, X^{-\\frac{A}{(\\log T)^9}} . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I3Bound","latex_link":"sect0003.html#I3Bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I3Bound","lean_decl_name":"I3Bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"\n\n\n\n\nset_option maxHeartbeats 400000 in\n-- Slow\n@[blueprint\n (title := \"I3Bound\")\n (statement := /--\n Assuming a bound of the form of Lemma \\ref{LogDerivZetaBndUnif} we have that\n $$\n \\left|I_{3}(\\nu, \\epsilon, X, T)\\right| \\ll \\frac{X}{\\epsilon}\\, X^{-\\frac{A}{(\\log T)^9}}\n .\n $$\n Same with $I_7$.\n -/)\n (proof := /--\n Unfold the definitions and apply the triangle inequality.\n $$\n \\left|I_{3}(\\nu, \\epsilon, X, T, \\sigma_1)\\right| =\n \\left|\\frac{1}{2\\pi i} \\int_{-T}^3\n \\left(\\frac{-\\zeta'}\\zeta(\\sigma_1 + t i) \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_1 + t i)\n X^{\\sigma_1 + t i}\n \\ i \\ dt\n \\right|\n $$\n $$\\leq\n \\frac{1}{2\\pi}\n \\int_{-T}^3\n C \\cdot \\log t ^ 9\n \\frac{C'}{\\epsilon|\\sigma_1 + t i|^2}\n X^{\\sigma_1}\n \\ dt\n ,\n $$\n where we used Theorems \\ref{MellinOfSmooth1b} and the hypothesised bound on zeta.\n Now we estimate $X^{\\sigma_1} = X \\cdot X^{-A/ \\log T^9}$, and the integral is absolutely bounded.\n -/)\n (latexEnv := \"lemma\")]\ntheorem I3Bound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF)\n {A Cζ : ℝ} (hCζ : LogDerivZetaHasBound A Cζ) (Cζpos : 0 < Cζ) (hA : A ∈ Ioc 0 (1 / 2)) :\n ∃ (C : ℝ) (_ : 0 < C),\n ∀ (X : ℝ) (_ : 3 < X)\n {ε : ℝ} (_ : 0 < ε) (_ : ε < 1)\n {T : ℝ} (_ : 3 < T),\n let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9\n ‖I₃ SmoothingF ε T X σ₁‖ ≤ C * X * X ^ (- A / (Real.log T ^ 9)) / ε := by\n obtain ⟨CM, CMpos, CMhyp⟩ := MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF\n obtain ⟨Cint, Cintpos, Cinthyp⟩ := log_pow_over_xsq_integral_bounded 9\n use Cint * CM * Cζ\n have : Cint * CM > 0 := mul_pos Cintpos CMpos\n have : Cint * CM * Cζ > 0 := mul_pos this Cζpos\n use this\n intro X Xgt3 ε εgt0 εlt1 T Tgt3 σ₁\n unfold I₃\n unfold SmoothedChebyshevIntegrand\n\n have Xpos := zero_lt_three.trans Xgt3\n have Tgt3' : -T < -3 := neg_lt_neg_iff.mpr Tgt3\n\n have t_bounds : ∀ t ∈ Ioo (-T) (-3), 3 < |t| ∧ |t| < T := by\n intro t ht\n have : |t| = -t := by\n refine abs_of_neg ?_\n exact ht.2.trans (by norm_num)\n rw [← Set.neg_mem_Ioo_iff, mem_Ioo] at ht\n rwa [this]\n\n have logt9gt1_bounds :\n ∀ t, t ∈ Set.Icc (-T) (-3) → Real.log |t| ^ 9 > 1 := by\n intro t ht\n refine one_lt_pow₀ (logt_gt_one ?_) ?_\n · have : |t| = -t := by\n refine abs_of_neg ?_\n exact ht.2.trans_lt (by norm_num)\n rw [this, le_neg]\n exact ht.2\n · norm_num\n\n have Aoverlogt9gtAoverlogT9_bounds : ∀ t, 3 < |t| ∧ |t| < T →\n A / Real.log |t| ^ 9 > A / Real.log T ^ 9 := by\n intro t ht\n have h9 : 9 ≠ 0 := by norm_num\n refine div_lt_div_of_pos_left hA.1 ?_ ?_\n · exact zero_lt_one.trans <| one_lt_pow₀ (logt_gt_one ht.1.le) h9\n · have h1 := log_lt_log (zero_lt_three.trans ht.1) ht.2\n have h2 := logt_gt_one ht.1.le\n have h3 : 0 ≤ Real.log |t| := zero_le_one.trans h2.le\n exact pow_lt_pow_left₀ h1 h3 h9\n\n have AoverlogT9in0half: A / Real.log T ^ 9 ∈ Ioo 0 (1/2) := by\n have logT9gt1 : 1 < Real.log T ^ 9 := by\n have logt_gt_one : 1 < Real.log T := logt_gt_one Tgt3.le\n refine (one_lt_pow_iff_of_nonneg ?_ ?_).mpr logt_gt_one\n · exact zero_le_one.trans logt_gt_one.le\n · norm_num\n have logT9pos := zero_lt_one.trans logT9gt1\n constructor\n · exact div_pos hA.1 logT9pos\n · rw [div_lt_comm₀ logT9pos one_half_pos, div_lt_iff₀' one_half_pos]\n apply hA.2.trans_lt\n rwa [lt_mul_iff_one_lt_right one_half_pos]\n\n have σ₁lt1 : σ₁ < 1 := by\n unfold σ₁\n linarith[AoverlogT9in0half.1]\n\n have σ₁pos : 0 < σ₁ := by\n unfold σ₁\n linarith[AoverlogT9in0half.2]\n\n have quotient_bound :\n ∀ t ∈ Ioo (-T) (-3), Real.log |t| ^ 9 / (σ₁ ^ 2 + t ^ 2) ≤ Real.log |t| ^ 9 / t ^ 2 := by\n intro t ht\n have loght := logt9gt1_bounds t (Ioo_subset_Icc_self ht)\n have logpos : Real.log |t| ^ 9 > 0 := zero_lt_one.trans loght\n have denom_le : t ^ 2 ≤ σ₁ ^ 2 + t ^ 2 := (le_add_iff_nonneg_left _).mpr <| sq_nonneg σ₁\n have denom_pos : 0 < t ^ 2 := by\n apply sq_pos_of_ne_zero\n rintro rfl\n norm_num [mem_Ioo] at ht\n have denom2_pos : 0 < σ₁ ^ 2 + t ^ 2 := add_pos_of_nonneg_of_pos (sq_nonneg _) denom_pos\n exact (div_le_div_iff_of_pos_left logpos denom2_pos denom_pos).mpr denom_le\n\n have MellinBound : ∀ (t : ℝ),\n ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (σ₁ + t * I)‖ ≤\n CM * (ε * ‖(σ₁ + t * I)‖ ^ 2)⁻¹ := by\n intro t\n refine CMhyp σ₁ σ₁pos _ ?_ ?_ _ εgt0 εlt1 <;> simp [σ₁lt1.le.trans one_le_two]\n\n have logzetabnd : ∀ t : ℝ, 3 < |t| ∧ |t| < T → ‖ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)‖ ≤ Cζ * Real.log (|t| : ℝ) ^ 9 := by\n intro t tbounds\n apply hCζ\n · exact tbounds.1\n · unfold σ₁\n rw [mem_Ici, sub_le_sub_iff_left]\n exact (Aoverlogt9gtAoverlogT9_bounds t tbounds).le\n\n let f t := (-ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)) *\n 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ₁ + ↑t * I) *\n ↑X ^ (↑σ₁ + ↑t * I)\n\n let g t := Cζ * CM * Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) * X ^ σ₁\n\n have bound_integral : ∀ t ∈ Ioo (-T) (-3), ‖f t‖ ≤ g t := by\n intro t ht\n unfold f\n\n have : ‖(-ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)) *\n 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₁ + ↑t * I) *\n ↑X ^ (↑σ₁ + ↑t * I)‖ ≤ ‖ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)‖ *\n ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₁ + ↑t * I)‖ *\n ‖(↑(X : ℝ) : ℂ) ^ (↑σ₁ + ↑t * I)‖ := by\n simp [norm_neg]\n\n have : ‖ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I)‖ *\n ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑σ₁ + ↑t * I)‖ *\n ‖(↑X : ℂ) ^ (↑σ₁ + ↑t * I)‖ ≤ (Cζ * Real.log |t| ^ 9) *\n (CM * (ε * ‖↑σ₁ + ↑t * I‖ ^ 2)⁻¹) * X ^ σ₁:= by\n have Xσ_bound : ‖↑(X : ℂ) ^ (↑σ₁ + ↑t * I)‖ = X ^ σ₁ := by\n simp [norm_cpow_eq_rpow_re_of_pos Xpos]\n obtain ⟨ht_gt3, ht_ltT⟩ := t_bounds _ ht\n have logtgt1 : 1 < Real.log |t| := logt_gt_one ht_gt3.le\n have hζ := logzetabnd t ⟨ht_gt3, ht_ltT⟩\n have h𝓜 := MellinBound t\n rw[Xσ_bound]\n gcongr\n\n have : (Cζ * Real.log |t| ^ 9) * (CM * (ε * ‖↑σ₁ + ↑t * I‖ ^ 2)⁻¹) * X ^ σ₁ = g t := by\n unfold g\n ring_nf\n linarith\n\n have int_with_f :\n ∫ (t : ℝ) in (-T)..(-3),\n -ζ' (↑σ₁ + ↑t * I) / ζ (↑σ₁ + ↑t * I) *\n 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ₁ + ↑t * I) *\n ↑X ^ (↑σ₁ + ↑t * I) =\n ∫ (t : ℝ) in (-T)..(-3), f t := by\n simp only [f]\n rw[int_with_f]\n\n apply (norm_mul_le _ _).trans\n rw [Complex.norm_mul, Complex.norm_I, one_mul]\n\n have : ‖1 / (2 * ↑π * I)‖ * ‖∫ (t : ℝ) in (-T)..(-3), f ↑t‖ ≤ ‖∫ (t : ℝ) in (-T)..(-3), f ↑t‖ := by\n apply mul_le_of_le_one_left\n · apply norm_nonneg\n · simp only [one_div, norm_inv]\n apply inv_le_one_of_one_le₀\n simp only [Complex.norm_mul, Complex.norm_ofNat, norm_real, norm_eq_abs, pi_nonneg,\n abs_of_nonneg, norm_I, mul_one]\n apply one_le_mul_of_one_le_of_one_le one_le_two\n exact le_trans (by norm_num) pi_gt_three.le\n apply le_trans this\n\n apply le_trans (intervalIntegral.norm_integral_le_integral_norm Tgt3'.le)\n\n have ne_zero_of_mem_uIcc (x) (hx : x ∈ uIcc (-T) (-3)) : x ≠ 0 := by\n rintro rfl\n norm_num [mem_uIcc] at hx\n linarith\n\n have cont1 : ContinuousOn (fun t ↦ Real.log |t| ^ 9) (uIcc (-T) (-3)) :=\n _root_.continuous_abs.continuousOn.log\n (fun x hx => abs_ne_zero.mpr <| ne_zero_of_mem_uIcc x hx) |>.pow 9\n\n have g_cont : ContinuousOn g (uIcc (-T) (-3)) := by\n unfold g\n refine .mul ?_ continuousOn_const\n refine ContinuousOn.div ?_ ?_ ?_\n · exact continuousOn_const.mul cont1\n · fun_prop\n · intro x hx\n apply mul_ne_zero εgt0.ne'\n have : 0 < σ₁ ^ 2 + x ^ 2 := add_pos_of_pos_of_nonneg (sq_pos_of_pos σ₁pos) (sq_nonneg x)\n simp only [Complex.sq_norm, normSq_add_mul_I, ne_eq, this.ne', not_false_eq_true]\n\n have int_normf_le_int_g: ∫ (t : ℝ) in (-T)..(-3), ‖f ↑t‖\n ≤ ∫ (t : ℝ) in (-T)..(-3), g ↑t := by\n by_cases h_int : IntervalIntegrable (fun t : ℝ ↦ ‖f t‖) volume (-T) (-3)\n · exact intervalIntegral.integral_mono_on_of_le_Ioo\n Tgt3'.le h_int g_cont.intervalIntegrable bound_integral\n · rw [intervalIntegral.integral_undef h_int]\n apply intervalIntegral.integral_nonneg Tgt3'.le\n intro t ht\n unfold g\n have := logt9gt1_bounds t ht\n positivity\n\n apply le_trans int_normf_le_int_g\n unfold g\n\n simp only [σ₁]\n\n have : X ^ (1 - A / Real.log T ^ 9) = X * X ^ (- A / Real.log T ^ 9) := by\n rw [sub_eq_add_neg, Real.rpow_add Xpos, Real.rpow_one, neg_div]\n\n rw[this]\n\n have Bound_of_log_int: ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) ≤ Cint / ε := by\n have : ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2)\n = (1 / ε) * ∫ t in (-T)..(-3), Real.log |t| ^ 9 / ‖↑σ₁ + ↑t * I‖ ^ 2 := by\n rw [← intervalIntegral.integral_const_mul]\n congr with t\n field_simp [εgt0]\n rw[this]\n\n have bound : ∫ t in (-T)..(-3), Real.log |t| ^ 9 / ‖↑σ₁ + ↑t * I‖ ^ 2 ≤ Cint := by\n simp_rw [Complex.sq_norm, normSq_add_mul_I]\n\n have : ∫ t in (-T)..(-3), Real.log |t| ^ 9 / (σ₁ ^ 2 + t ^ 2)\n ≤ ∫ t in (-T)..(-3), Real.log |t| ^ 9 / t ^ 2 := by\n refine intervalIntegral.integral_mono_on_of_le_Ioo Tgt3'.le ?_ ?_ ?_\n · have cont : ContinuousOn (fun t ↦ Real.log |t| ^ 9 / (σ₁ ^ 2 + t ^ 2)) (Set.uIcc (-T) (-3)) := by\n refine ContinuousOn.div cont1 ?_ ?_\n · refine ContinuousOn.add ?_ ?_\n · exact continuousOn_const\n · refine ContinuousOn.pow ?_ 2\n exact continuousOn_id' _\n · intro t ht\n have h1 : 0 < t ^ 2 := pow_two_pos_of_ne_zero (ne_zero_of_mem_uIcc t ht)\n have h2 : 0 < σ₁ ^ 2 := sq_pos_of_pos σ₁pos\n exact (add_pos_of_pos_of_nonneg h2 h1.le).ne'\n apply cont.intervalIntegrable\n · have cont : ContinuousOn (fun t ↦ Real.log |t| ^ 9 / t ^ 2) (Set.uIcc (-T) (-3)) := by\n refine ContinuousOn.div cont1 ?_ ?_\n · refine ContinuousOn.pow ?_ 2\n exact continuousOn_id' _\n · intro t ht\n exact pow_ne_zero 2 (ne_zero_of_mem_uIcc t ht)\n apply cont.intervalIntegrable\n · intro x hx\n exact quotient_bound x hx\n apply le_trans this\n rw [← intervalIntegral.integral_comp_neg]\n simp only [abs_neg, log_abs, even_two, Even.neg_pow]\n rw [intervalIntegral.integral_of_le Tgt3.le, MeasureTheory.integral_Ioc_eq_integral_Ioo]\n exact (Cinthyp T Tgt3).le\n rw [mul_comm]\n rw [← mul_div_assoc, mul_one]\n exact (div_le_div_iff_of_pos_right εgt0).mpr bound\n\n have factor_out_constants :\n ∫ (t : ℝ) in (-T)..(-3), Cζ * CM * Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) * (X * X ^ (-A / Real.log T ^ 9))\n = Cζ * CM * (X * X ^ (-A / Real.log T ^ 9)) * ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2) := by\n rw [mul_assoc, ← mul_assoc (Cζ * CM), ← mul_assoc]\n field_simp\n simp only [log_abs]\n rw [← intervalIntegral.integral_const_mul]\n apply intervalIntegral.integral_congr\n intro t ht\n ring_nf\n\n rw [factor_out_constants]\n\n have : Cζ * CM * (X * X ^ (-A / Real.log T ^ 9)) * ∫ (t : ℝ) in (-T)..(-3), Real.log |t| ^ 9 / (ε * ‖↑σ₁ + ↑t * I‖ ^ 2)\n ≤ Cζ * CM * ((X : ℝ) * X ^ (-A / Real.log T ^ 9)) * (Cint / ε) := by\n apply mul_le_mul_of_nonneg_left\n","line":2744,"end_line":3046,"proof_status":"formalized"} {"id":"GlobalBound","label":"GlobalBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaExtend"],"nlp_text":"For all \\(s\\in \\mathbb {C}\\) with \\(|s|\\leq 1\\) and \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 2\\), we have that \\[ |\\zeta (s+3/2+it)|\\leq 7+2\\, |t|. \\]","doc_url":null,"latex_link":"sect0004.html#GlobalBound","lean_link":null,"lean_decl_name":"GlobalBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"ShiftOneBound","label":"ShiftOneBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["SumBoundI"],"nlp_text":"There exists \\(C{\\gt}0\\) such that for all \\(\\delta \\in (0,1)\\) and \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 3\\); if \\(\\zeta (\\rho )=0\\) with \\(\\rho =\\sigma +it\\), then \\[ -\\Re \\left(\\frac{\\zeta '}{\\zeta }(1+\\delta +it)\\right) \\leq -\\frac{1}{1+\\delta -\\sigma }+C\\log |t|. \\]","doc_url":null,"latex_link":"sect0004.html#ShiftOneBound","lean_link":null,"lean_decl_name":"ShiftOneBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"ShiftTwoBound","label":"ShiftTwoBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["SumBoundI"],"nlp_text":"For all \\(\\delta \\in (0,1)\\) and \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 2\\) we have \\[ -\\Re \\left(\\frac{\\zeta '}{\\zeta }(1+\\delta +2it)\\right)\\ll \\log |t|. \\]","doc_url":null,"latex_link":"sect0004.html#ShiftTwoBound","lean_link":null,"lean_decl_name":"ShiftTwoBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"bklnw-eq_A_10","label":"bklnw-eq_A_10","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-sigma_1_def"],"nlp_text":"We have \\[ |\\Sigma _1| \\leq x^{-\\delta } \\left(\\frac{1}{2\\pi }(\\log (T/2\\pi ))^2 + 1.8642\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_10","latex_link":"primary-chapter.html#bklnw-eq_A_10","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_10","lean_decl_name":"BKLNW_app.bklnw_eq_A_10","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_10\"\n (title := \"Equation (A.10)\")\n (statement := /-- We have\n $$ |\\Sigma_1| \\leq x^{-\\delta} \\left(\\frac{1}{2\\pi}(\\log(T/2\\pi))^2 + 1.8642\\right). $$ -/)\n (proof := /-- See \\cite[Lemma 2.10]{STD2015}. -/)\n (latexEnv := \"sublemma\")]\ntheorem bklnw_eq_A_10 (x T δ : ℝ) (hδ : 0.001 ≤ δ) : ‖Sigma₁ x T δ‖ ≤ exp (-δ * log x) * (1 / (2 * π) * (log (T / (2 * π)))^2 + 1.8642) := by sorry","line":68,"end_line":75,"proof_status":"statement_formalized"} {"id":"rs-420","label":"rs-420","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Mertens-constant"],"nlp_text":"\\[ \\sum _{p \\leq x} \\frac{\\log p}{p} = \\log x + E + \\frac{\\vartheta (x) - x}{x} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.mertens_first_theorem","latex_link":"secondary-chapter.html#rs-420","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.mertens_first_theorem","lean_decl_name":"RS_prime.mertens_first_theorem","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"@[blueprint\n \"rs-420\"]\ntheorem mertens_first_theorem : Filter.atTop.Tendsto (fun x : ℝ ↦\n ∑ p ∈ filter Nat.Prime (range ⌊x⌋₊), Real.log p / p - log x - mertensConstant) (nhds 0) := by sorry","line":432,"end_line":435,"proof_status":"statement_formalized"} {"id":"theta-stieltjes","label":"theta-stieltjes","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The function \\(\\vartheta (x) = \\sum _{p \\leq x} \\log p\\) defines a Stieltjes function (monotone and right continuous).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.θ.Stieltjes","latex_link":"secondary-chapter.html#theta-stieltjes","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.θ.Stieltjes","lean_decl_name":"RS_prime.θ.Stieltjes","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"@[blueprint\n \"theta-stieltjes\"\n (title := \"The Chebyshev function is Stieltjes\")\n (statement := /-- The function $\\vartheta(x) = \\sum_{p \\leq x} \\log p$ defines a Stieltjes function (monotone and right continuous). -/)\n (proof := /-- Trivial -/)\n (latexEnv := \"sublemma\")\n (discussion := 598)]\nnoncomputable def θ.Stieltjes : StieltjesFunction ℝ := {\n toFun := θ\n mono' := theta_mono\n right_continuous' := fun x ↦ by\n rw [ContinuousWithinAt, theta_eq_theta_coe_floor x]\n refine Filter.Tendsto.congr' ?_ tendsto_const_nhds\n obtain hx | hx := le_total 0 x\n · filter_upwards [Ico_mem_nhdsGE_of_mem ⟨floor_le hx, lt_floor_add_one x⟩] with y hy\n rw [theta_eq_theta_coe_floor y, floor_eq_on_Ico _ _ hy]\n · filter_upwards [Ico_mem_nhdsGE (by grind : x < 1)] with y hy\n simp [floor_of_nonpos hx, theta_eq_theta_coe_floor y, floor_eq_zero.mpr hy.2]\n}\n","line":32,"end_line":50,"proof_status":"formalized"} {"id":"rs-pre-413","label":"rs-pre-413","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-stieltjes"],"nlp_text":"\\(\\sum _{p \\leq x} f(p) = \\int _{2}^x \\frac{f(y)}{\\log y}\\ d\\vartheta (y)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.pre_413","latex_link":"secondary-chapter.html#rs-pre-413","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.pre_413","lean_decl_name":"RS_prime.pre_413","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"@[blueprint\n \"rs-pre-413\"\n (title := \"RS-prime display before (4.13)\")\n (statement := /-- $\\sum_{p \\leq x} f(p) = \\int_{2}^x \\frac{f(y)}{\\log y}\\ d\\vartheta(y)$. -/)\n (proof := /-- This follows from the definition of the Stieltjes integral. -/)\n (latexEnv := \"sublemma\")\n (discussion := 599)]\ntheorem pre_413 {f : ℝ → ℝ} (hf : ContinuousOn f (Set.Ici 2)) {x : ℝ} (hx : 2 ≤ x) :\n ∑ p ∈ filter Prime (Iic ⌊x⌋₊), f p =\n ∫ y in Set.Icc 2 x, f y / log y ∂θ.Stieltjes.measure := by sorry\n","line":52,"end_line":61,"proof_status":"statement_formalized"} {"id":"Mertens-constant","label":"Mertens-constant","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(E := \\lim _{x \\to \\infty } \\left( \\sum _{p \\leq x} \\frac{\\log p}{p} - \\log x \\right)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/mertensConstant","latex_link":"secondary-chapter.html#Mertens-constant","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/mertensConstant","lean_decl_name":"mertensConstant","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"Mertens-constant\"\n (title := \"Mertens constant E\")\n (statement := /--\n $E := \\lim_{x \\to \\infty} \\left( \\sum_{p \\leq x} \\frac{\\log p}{p} - \\log x \\right)$. -/)]\nnoncomputable def mertensConstant : ℝ :=\n lim (Filter.atTop.comap (fun x : ℝ ↦ ∑ p ∈ Finset.filter Nat.Prime (Finset.range ⌊x⌋₊), Real.log p / p - log x))","line":166,"end_line":172,"proof_status":"formalized"} {"id":"Dusart_thm_5_7","label":"Dusart_thm_5_7","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Mertens-constant"],"nlp_text":"We have for \\(x \\geq 912560\\), \\[ \\sum _{p \\leq x} \\frac{\\log p}{p} = \\log x + E + O^*\\Bigl(\\frac{0.3}{\\log ^2 x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_7","latex_link":"secondary-chapter.html#Dusart_thm_5_7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_7","lean_decl_name":"Dusart.theorem_5_7","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_thm_5_7\"\n (title := \"Dusart Theorem 5.7\")\n (statement := /--\n We have for $x \\geq 912560$,\n \\[\n \\sum_{p \\leq x} \\frac{\\log p}{p} = \\log x + E + O^*\\Bigl(\\frac{0.3}{\\log^2 x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem theorem_5_7 {x : ℝ} (hx : x ≥ 912560) : ∃ E,\n ( (∑ p ∈ Finset.filter Prime (Finset.range (⌊x⌋₊ + 1)), Real.log p / p) = log x\n + mertensConstant + E ∧ |E| ≤ 0.3 / (log x) ^ 2 ) := by sorry\n","line":366,"end_line":377,"proof_status":"formalized"} {"id":"zero-counting-function","label":"zero-counting-function","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta"],"nlp_text":"The number of zeroes of imaginary part between 0 and T, counting multiplicity","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.N","latex_link":"zeta-chapter.html#zero-counting-function","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.N","lean_decl_name":"riemannZeta.N","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaDefinitions.lean","lean4_code":"@[blueprint\n \"zero-counting-function\"\n (title := \"Zero counting function N(T)\")\n (statement := /--\n The number of zeroes of imaginary part between 0 and T, counting multiplicity\n -/)]\nnoncomputable def riemannZeta.N (T : ℝ) : ℝ := zeroes_sum Set.univ (Set.Ioo 0 T) (fun _ ↦ 1)\n","line":56,"end_line":62,"proof_status":"formalized"} {"id":"zero-density-bound","label":"zero-density-bound","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-counting-function"],"nlp_text":"An estimate of the form \\(N(\\sigma ,T) \\leq c₁ T^p \\log ^q T + c₂ \\log ^2 T - \\frac{T}{2\\pi } \\log \\frac{T}{2\\pi e} + \\frac{7}{8}| \\leq b_1 \\log T + b_2 \\log \\log T + b_3\\) for \\(T \\geq 2\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/zero_density_bound","latex_link":"zeta-chapter.html#zero-density-bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/zero_density_bound","lean_decl_name":"zero_density_bound","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaDefinitions.lean","lean4_code":"@[blueprint\n \"zero-density-bound\"\n (title := \"Zero density bound\")\n (statement := /--\n An estimate of the form $N(\\sigma,T) \\leq c₁ T^p \\log^q T + c₂ \\log^2 T -\n \\frac{T}{2\\pi} \\log \\frac{T}{2\\pi e} + \\frac{7}{8}| \\leq b_1 \\log T + b_2 \\log\\log T + b_3$\n for $T \\geq 2$.\n -/)]\nstructure zero_density_bound where\n T₀ : ℝ\n σ_range : Set ℝ\n c₁ : ℝ → ℝ\n c₂ : ℝ → ℝ\n p : ℝ → ℝ\n q : ℝ → ℝ\n bound : ∀ T ≥ T₀, ∀ σ ∈ σ_range,\n riemannZeta.N' σ T ≤ (c₁ σ) * T ^ (p σ) * (log T) ^ (q σ) + (c₂ σ) * (log T) ^ 2\n","line":89,"end_line":105,"proof_status":"formalized"} {"id":"Riemann-von-Mangoldt-estimate","label":"Riemann-von-Mangoldt-estimate","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-counting-function"],"nlp_text":"An estimate of the form \\(N(T) - \\frac{T}{2\\pi } \\log \\frac{T}{2\\pi e} + \\frac{7}{8}| \\leq b_1 \\log T + b_2 \\log \\log T + b_3\\) for \\(T \\geq 2\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.RvM","latex_link":"zeta-chapter.html#Riemann-von-Mangoldt-estimate","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.RvM","lean_decl_name":"riemannZeta.RvM","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"noncomputable def Inputs.RvM (I : Inputs) (U : ℝ) : ℝ := riemannZeta.RvM I.b₁ I.b₂ I.b₃ U\n\n","line":177,"end_line":178,"proof_status":"formalized"} {"id":"fks-theorem-2-7","label":"fks-theorem-2-7","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"Let \\(H_0\\) denote a verification height for RH. Let \\(10^9/H_0≤ k \\leq 1\\), \\(t {\\gt} 0\\), \\(H \\in [1002, H_0)\\), \\(α {\\gt} 0\\), \\(δ ≥ 1\\), \\(\\eta _0 = 0.23622\\), \\(1 + \\eta _0 \\leq \\mu \\leq 1+\\eta \\), and \\(\\eta \\in (\\eta _0, 1/2)\\) be fixed. Let \\(\\sigma {\\gt} 1/2 + d / \\log H_0\\). Then for any \\(T \\geq H_0\\), one has \\[ N(\\sigma ,T) \\leq (T-H) \\log T / (2\\pi d) * \\log ( 1 + CC_1(\\log (kT))^{2\\sigma } (\\log T)^{4(1-\\sigma )} T^{8/3(1-\\sigma )} / (T-H) ) + CC_2 * \\log ^2 T / 2 \\pi d \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_2_7","latex_link":"primary-chapter.html#fks-theorem-2-7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_2_7","lean_decl_name":"FKS.theorem_2_7","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-theorem-2-7\"\n (title := \"FKS Theorem 2.7\")\n (statement := /--\n Let $H_0$ denote a verification height for RH. Let $10^9/H_0≤ k \\leq 1$, $t > 0$,\n $H \\in [1002, H_0)$, $α > 0$, $δ ≥ 1$, $\\eta_0 = 0.23622$, $1 + \\eta_0 \\leq \\mu \\leq 1+\\eta$,\n and $\\eta \\in (\\eta_0, 1/2)$ be fixed. Let $\\sigma > 1/2 + d / \\log H_0$. Then for any\n $T \\geq H_0$, one has\n $$ N(\\sigma,T) \\leq (T-H) \\log T / (2\\pi d) *\n \\log ( 1 + CC_1(\\log(kT))^{2\\sigma} (\\log T)^{4(1-\\sigma)} T^{8/3(1-\\sigma)} / (T-H) )\n + CC_2 * \\log^2 T / 2 \\pi d$$\n and\n $$ N(\\sigma,T) \\leq \\frac{CC_1}{2\\pi d} (\\log kT)^{2\\sigma} (\\log T)^{5-4*\\sigma}\n T^{8/3(1-\\sigma)} + CC_2 * \\log^2 T / 2 \\pi d$$.\n -/)]\ntheorem theorem_2_7 (I : Inputs) {k δ α d η₀ η μ σ H T : ℝ}\n (hk : k ∈ Set.Icc ((10 ^ 9) / I.H₀) 1)\n (hα : α > 0)\n (hδ : δ ≥ 1)\n (hη₀ : η₀ = 0.23622)\n (hμ : μ ∈ Set.Icc (1 + η₀) (1 + η))\n (hη : η ∈ Set.Ioo η₀ 0.5)\n (hσ : σ > 0.5 + d / log I.H₀)\n (hH : H ∈ Set.Ico 1002 I.H₀)\n (hT : T ≥ I.H₀) :\n riemannZeta.N' σ T ≤ ((T - H) * log T) / (2 * π * d) *\n log (1 + KLN.CC₁ I.H₀ α d δ k H σ * (log (k * T)) ^ (2 * σ) *\n (log T) ^ (4 * (1 - σ)) * T ^ (8 / 3 * (1 - σ)) / (T - H)) +\n KLN.CC₂ I.H₀ d η k H μ σ * (log T) ^ 2 / (2 * π * d)\n ∧\n riemannZeta.N' σ T ≤ KLN.CC₁ I.H₀ α d δ k H σ * (log (k * T)) ^ (2 * σ) *\n (log T) ^ (5 - 4 * σ) * T ^ (8 / 3 * (1 - σ)) / (2 * π * d) +\n KLN.CC₂ I.H₀ d η k H μ σ * (log T) ^ 2 / (2 * π * d) := by sorry\n","line":94,"end_line":126,"proof_status":"formalized"} {"id":"fks-proposition-3-11","label":"fks-proposition-3-11","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"Let \\(5/8 {\\lt} \\sigma _2 \\leq 1\\), \\(t_0 = t_0(\\sigma _2,x) = \\max (H_{\\sigma _2}, \\exp ( \\sqrt{\\log x}/R))\\) and \\(T {\\gt} 0\\). Let \\(K \\geq 2\\) and consider a strictly increasing sequence \\((t_k)_{k=0}^K\\) such that \\(t_k = T\\). Then \\(\\Sigma _{\\sigma _2}^1 ≤ 2 N(\\sigma _2,T) x^{-1/R\\log t_0}/t_0\\) and \\(\\Sigma _{\\sigma _2}^1 ≤ 2 ((\\sum _{k=1}^{K-1} N(\\sigma _2, t_k) (x^{-1/R\\log t_{k-1}} / t_{k-1} - x^{-1/(R \\log t_k)}/t_k)) + x^{-1/R \\log t_{K-1}}/t_{K-1} N(\\sigma _2,T))\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_11","latex_link":"primary-chapter.html#fks-proposition-3-11","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_11","lean_decl_name":"FKS.proposition_3_11","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-proposition-3-11\"\n (title := \"FKS Proposition 3.11\")\n (statement := /--\n Let $5/8 < \\sigma_2 \\leq 1$, $t_0 = t_0(\\sigma_2,x) = \\max(H_{\\sigma_2},\n \\exp( \\sqrt{\\log x}/R))$ and $T > 0$. Let $K \\geq 2$ and consider a strictly increasing\n sequence $(t_k)_{k=0}^K$ such that $t_k = T$. Then\n $\\Sigma_{\\sigma_2}^1 ≤ 2 N(\\sigma_2,T) x^{-1/R\\log t_0}/t_0$ and\n $\\Sigma_{\\sigma_2}^1 ≤ 2 ((\\sum_{k=1}^{K-1} N(\\sigma_2, t_k)\n (x^{-1/R\\log t_{k-1}} / t_{k-1} - x^{-1/(R \\log t_k)}/t_k)) +\n x^{-1/R \\log t_{K-1}}/t_{K-1} N(\\sigma_2,T))$.\n -/)]\ntheorem proposition_3_11 (I : Inputs) {σ₂ T x : ℝ} (K : ℕ) (hσ₂ : σ₂ ∈ Set.Ioc (5 / 8) 1)\n (t_seq : Fin (K + 2) → ℝ)\n (ht0 : t_seq 0 = max (Hσ I.H₀ I.R σ₂) (exp (sqrt (log x) / I.R)))\n (htK : t_seq (Fin.last (K + 1)) = T) (ht_incr : StrictMono t_seq) :\n riemannZeta.Sigma T x σ₂ 1 ≤\n 2 * (riemannZeta.N' σ₂ T) * x ^ (-1 / (I.R * log (t_seq 0))) / (t_seq 0)\n ∧\n riemannZeta.Sigma T x σ₂ 1 ≤ 2 * (∑ k ∈ Finset.Ioo 0 (Fin.last (K + 1)),\n riemannZeta.N' σ₂ (t_seq k) *\n (x ^ (-1 / (I.R * log (t_seq (k - 1)))) / (t_seq (k - 1)) -\n x ^ (-1 / (I.R * log (t_seq k))) / (t_seq k))) +\n x ^ (-1 / (I.R * log (t_seq (Fin.last K).castSucc))) /\n (t_seq (Fin.last K).castSucc) * riemannZeta.N' σ₂ T := by sorry\n","line":399,"end_line":423,"proof_status":"formalized"} {"id":"fks-corollary_2_3","label":"fks-corollary_2_3","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"For each pair \\(T_0,S_0\\) in Table 1 we have, for all \\(V {\\gt} T_0\\), \\(\\sum _{0 {\\lt} \\gamma {\\lt} V} 1/\\gamma {\\lt} S_0 + B_1(T_0,V)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_2_3","latex_link":"primary-chapter.html#fks-corollary_2_3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_2_3","lean_decl_name":"FKS.corollary_2_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-corollary_2_3\"\n (title := \"FKS Corollary 2.3\")\n (statement := /--\n For each pair $T_0,S_0$ in Table 1 we have, for all $V > T_0$,\n $\\sum_{0 < \\gamma < V} 1/\\gamma < S_0 + B_1(T_0,V)$.\n -/)]\ntheorem corollary_2_3 (I : Inputs) {V : ℝ} (hV : V > I.T₀) :\n riemannZeta.zeroes_sum Set.univ (Set.Ioo 0 V) (fun ρ ↦ 1 / ρ.im) < I.S₀ + I.B₁ I.T₀ V := by\n sorry\n","line":193,"end_line":202,"proof_status":"formalized"} {"id":"fks-proposition-3-6","label":"fks-proposition-3-6","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"Let \\(\\sigma _1 \\in (1/2,1)\\) and let \\((T_0,S_0)\\) be taken from Table 1. Then \\(\\Sigma _0^{\\sigma _1} ≤ 2 x^{-1/2} (S_0 + B_1(T_0,T)) + (x_1^{\\sigma _1-1} - x^{-1/2}) B_1(H_0,T)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_6","latex_link":"primary-chapter.html#fks-proposition-3-6","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_6","lean_decl_name":"FKS.proposition_3_6","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-proposition-3-6\"\n (title := \"FKS Proposition 3.6\")\n (statement := /--\n Let $\\sigma_1 \\in (1/2,1)$ and let $(T_0,S_0)$ be taken from Table 1. Then\n $\\Sigma_0^{\\sigma_1} ≤ 2 x^{-1/2} (S_0 + B_1(T_0,T)) + (x_1^{\\sigma_1-1} - x^{-1/2}) B_1(H_0,T)$.\n -/)]\ntheorem proposition_3_6 (I : Inputs) {σ₁ T x : ℝ} (hσ_1 : σ₁ ∈ Set.Icc 0.5 1) (hT : T > I.T₀)\n (x : ℝ) :\n riemannZeta.Sigma T x 0 σ₁ ≤ ε₂ I x σ₁ T := by sorry\n","line":334,"end_line":343,"proof_status":"formalized"} {"id":"bklnw-eq_A_21","label":"bklnw-eq_A_21","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","RH-up-to","classical-zero-free-region"],"nlp_text":"We define \\[ B = 5/2 - \\sigma , \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.B","latex_link":"primary-chapter.html#bklnw-eq_A_21","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.B","lean_decl_name":"BKLNW_app.Inputs.B","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"noncomputable def Inputs.B₁ (I : Inputs) (U V : ℝ) : ℝ :=\n (1 / (2 * π) + ((I.b₁ * log U) + I.b₂) / (U * (log U) * (log (U / (2 * π))))) *\n (log (V / U) * (log (sqrt (V * U) / (2 * π)))) + 2 * (I.RvM U) / U\n\n","line":179,"end_line":182,"proof_status":"formalized"} {"id":"fks-corollary-3-12","label":"fks-corollary-3-12","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"Let \\(5/8 {\\lt} \\sigma _2 \\leq 1\\), \\(t_0 = t_0(\\sigma _2, x) = \\max \\left(H_{\\sigma _2}, \\exp \\left(\\sqrt{\\frac{\\log x}{R}}\\right)\\right)\\), \\(T {\\gt} t_0\\). Let \\(K \\geq 2\\), \\(\\lambda = (T/t_0)^{1/K}\\), and consider \\((t_k)_{k=0}^K\\) the sequence given by \\(t_k = t_0 \\lambda ^k\\). Then \\[ \\Sigma ^1_{\\sigma _2} = 2 \\sum _{\\substack {0 {\\lt} \\gamma {\\lt} T \\\\ \\sigma _2 \\leq \\beta {\\lt} 1}} \\frac{x^{\\beta -1}}{\\gamma } \\leq \\varepsilon _4(x, \\sigma _2, K, T), \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_3_12","latex_link":"primary-chapter.html#fks-corollary-3-12","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_3_12","lean_decl_name":"FKS.corollary_3_12","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-corollary-3-12\"\n (title := \"FKS Corollary 3.12\")\n (statement := /--\n Let $5/8 < \\sigma_2 \\leq 1$, $t_0 = t_0(\\sigma_2, x) = \\max\\left(H_{\\sigma_2},\n \\exp\\left(\\sqrt{\\frac{\\log x}{R}}\\right)\\right)$, $T > t_0$. Let $K \\geq 2$,\n $\\lambda = (T/t_0)^{1/K}$, and consider $(t_k)_{k=0}^K$ the sequence given by\n $t_k = t_0 \\lambda^k$. Then\n \\[\n \\Sigma^1_{\\sigma_2} = 2 \\sum_{\\substack{0 < \\gamma < T \\\\ \\sigma_2 \\leq \\beta < 1}}\n \\frac{x^{\\beta-1}}{\\gamma} \\leq \\varepsilon_4(x, \\sigma_2, K, T),\n \\]\n where\n \\[\n \\varepsilon_4(x, \\sigma_2, K, T) = 2 \\sum_{k=1}^{K-1} \\frac{x^{-\\frac{1}{R \\log t_k}}}{t_k}\n \\left( \\tilde{N}(\\sigma_2, t_{k+1}) - \\tilde{N}(\\sigma_2, t_k) \\right) +\n 2\\tilde{N}(\\sigma_2, t_1) \\frac{x^{-\\frac{1}{R(\\log t_0)}}}{t_0},\n \\]\n and $\\tilde{N}(\\sigma, T)$ satisfy (ZDB) $N(\\sigma, T) \\leq \\tilde{N}(\\sigma, T)$.\n -/)]\ntheorem corollary_3_12 (I : Inputs) {σ₂ t₀ T x : ℝ} (K : ℕ) (hσ₂ : σ₂ ∈ Set.Ioc (5 / 8) 1)\n (ht₀ : t₀ = max (Hσ I.H₀ I.R σ₂) (exp (sqrt (log x) / I.R))) (hT : T > t₀)\n (ZDB : zero_density_bound) :\n riemannZeta.Sigma T x σ₂ 1 ≤ ε₄ I t₀ x σ₂ K T := by sorry\n","line":432,"end_line":455,"proof_status":"formalized"} {"id":"fks-theorem-1-1","label":"fks-theorem-1-1","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region","Epsi-def"],"nlp_text":"For any \\(x_0\\) with \\(\\log x_0 {\\gt} 1000\\), and all \\(0.9 {\\lt} \\sigma _2 {\\lt} 1\\), \\(2 \\leq c \\leq 30\\), and \\(N, K \\geq 1\\) the formula \\(\\varepsilon (x_0) := \\varepsilon (x_0, \\sigma _2, c, N, K)\\) as defined in (4.1) gives an effectively computable bound \\[ E_\\psi (x) \\leq \\varepsilon (x_0) \\quad \\text{for all } x \\geq x_0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_1_1","latex_link":"primary-chapter.html#fks-theorem-1-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_1_1","lean_decl_name":"FKS.theorem_1_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-theorem-1-1\"\n (title := \"FKS Theorem 1.1\")\n (statement := /--\n For any $x_0$ with $\\log x_0 > 1000$, and all $0.9 < \\sigma_2 < 1$, $2 \\leq c \\leq 30$, and\n $N, K \\geq 1$ the formula $\\varepsilon(x_0) := \\varepsilon(x_0, \\sigma_2, c, N, K)$ as defined\n in (4.1) gives an effectively computable bound\n \\[\n E_\\psi(x) \\leq \\varepsilon(x_0) \\quad \\text{for all } x \\geq x_0.\n \\]\n -/)]\ntheorem theorem_1_1 (I : Inputs) (x₀ σ₂ c : ℝ) (N K : ℕ) (hlog : log x₀ > 1000)\n (hσ₂ : σ₂ ∈ Set.Ioo 0.9 1) (hc : c ∈ Set.Icc 2 30) (hN : N ≥ 1) (hK : K ≥ 1) :\n ∀ x ≥ x₀, Eψ x ≤ ε I x₀ σ₂ c N K := by sorry\n","line":495,"end_line":508,"proof_status":"formalized"} {"id":"fks-proposition-3-8","label":"fks-proposition-3-8","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"Let \\(N \\geq 2\\) be an integer. If \\(5/8 \\leq \\sigma _1 {\\lt} \\sigma _2 \\leq 1\\), \\(T \\geq H_0\\), then \\(\\Sigma _{\\sigma _1}^{\\sigma _2} ≤ 2 x^{-(1-\\sigma _1)+(\\sigma _2-\\sigma _1/N)}B_0(\\sigma _1, H_{\\sigma _1}, T) + 2 x^{(1-\\sigma _1)} (1 - x^{-(\\sigma _2-\\sigma _1)/N}) \\sum _{n=1}^{N-1} B_0(\\sigma ^{(n)}, H^{(n)}, T) x^{(\\sigma _2-\\sigma _1) (n+1)/N}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_8","latex_link":"primary-chapter.html#fks-proposition-3-8","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_8","lean_decl_name":"FKS.proposition_3_8","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-proposition-3-8\"\n (title := \"FKS Proposition 3.8\")\n (statement := /--\n Let $N \\geq 2$ be an integer. If $5/8 \\leq \\sigma_1 < \\sigma_2 \\leq 1$, $T \\geq H_0$, then\n $\\Sigma_{\\sigma_1}^{\\sigma_2} ≤ 2 x^{-(1-\\sigma_1)+(\\sigma_2-\\sigma_1/N)}B_0(\\sigma_1,\n H_{\\sigma_1}, T) + 2 x^{(1-\\sigma_1)} (1 - x^{-(\\sigma_2-\\sigma_1)/N})\n \\sum_{n=1}^{N-1} B_0(\\sigma^{(n)}, H^{(n)}, T) x^{(\\sigma_2-\\sigma_1) (n+1)/N}$.\n -/)]\ntheorem proposition_3_8 (I : Inputs) (x : ℝ) {σ₁ σ₂ : ℝ} (N : ℕ) (T : ℝ)\n (hσ₁ : σ₁ ∈ Set.Icc (5 / 8) 1) (hσ₂ : σ₂ ∈ Set.Ioc σ₁ 1)\n (hσ : Set.Icc σ₁ σ₂ ⊆ I.ZDB.σ_range) (hT : T ≥ I.H₀) :\n riemannZeta.Sigma T x σ₁ σ₂ ≤ ε₃ I x σ₁ σ₂ N T := by sorry\n","line":378,"end_line":390,"proof_status":"formalized"} {"id":"fks-lemma-2-1","label":"fks-lemma-2-1","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"If \\(|N(T) - (T/2\\pi \\log (T/2\\pi e) + 7/8)| \\leq R(T)\\) then \\(\\sum _{U \\leq \\gamma {\\lt} V} 1/\\gamma \\leq B_1(U,V)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_2_1","latex_link":"primary-chapter.html#fks-lemma-2-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_2_1","lean_decl_name":"FKS.lemma_2_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-lemma-2-1\"\n (title := \"FKS Lemma 2.1\")\n (statement := /--\n If $|N(T) - (T/2\\pi \\log(T/2\\pi e) + 7/8)| \\leq R(T)$ then\n $\\sum_{U \\leq \\gamma < V} 1/\\gamma \\leq B_1(U,V)$.\n -/)]\ntheorem lemma_2_1 (I : Inputs) {U V : ℝ} (hU : U ≥ 1) (hV : V ≥ U) :\n riemannZeta.zeroes_sum Set.univ (Set.Ico U V) (fun ρ ↦ 1 / ρ.im) ≤ I.B₁ U V := by sorry\n","line":183,"end_line":191,"proof_status":"formalized"} {"id":"bklnw-eq_A_13","label":"bklnw-eq_A_13","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","RH-up-to","bklnw-sigma_2_def","classical-zero-free-region"],"nlp_text":"We have \\[ |\\Sigma _2| \\leq \\frac{2\\lambda }{T} \\sum _{k=0}^{K-1} \\lambda ^k x^{-\\frac{1}{R \\log (T/\\lambda ^k)}} \\left(c_1 \\left(\\frac{T}{\\lambda ^k}\\right)^{\\frac{8\\delta }{3}} (\\log (T/\\lambda ^k))^{3+2\\delta } + c_2 (\\log (T/\\lambda ^k))^2\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_13","latex_link":"primary-chapter.html#bklnw-eq_A_13","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_13","lean_decl_name":"BKLNW_app.bklnw_eq_A_13","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_13\"\n (title := \"Equation (A.13)\")\n (statement := /-- We have\n $$ |\\Sigma_2| \\leq \\frac{2\\lambda}{T} \\sum_{k=0}^{K-1} \\lambda^k x^{-\\frac{1}{R \\log(T/\\lambda^k)}} \\left(c_1 \\left(\\frac{T}{\\lambda^k}\\right)^{\\frac{8\\delta}{3}} (\\log(T/\\lambda^k))^{3+2\\delta} + c_2 (\\log(T/\\lambda^k))^2\\right). $$ -/)\n (proof := /-- Inserting (A.6) into the result of (A.12). -/)\n (latexEnv := \"sublemma\")\n (discussion := 751)]\ntheorem bklnw_eq_A_13 (I : Inputs) (x T δ lambda : ℝ) (hlambda : 1 < lambda) :\n let K := ⌊ log (T / I.H) / log lambda ⌋₊ + 1\n ‖Sigma₂ x T δ‖ ≤ (2 * lambda / T) *\n ∑ k ∈ Finset.range K,\n exp (k * log lambda - (log x) / (I.R * (log T - k * log lambda))) *\n ((I.ZDB.c₁ (1-δ)) * (T / lambda^k)^(8 * δ / 3) * (log (T / lambda^k))^(3 + 2 * δ) + (I.ZDB.c₂ (1-δ)) * (log (T / lambda^k))^2) := by sorry","line":95,"end_line":108,"proof_status":"statement_formalized"} {"id":"fks-proposition-3-14","label":"fks-proposition-3-14","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"Fix \\(K \\geq 2\\) and \\(c {\\gt} 1\\), and set \\(t_0\\), \\(T\\), and \\(\\sigma _2\\) as functions of \\(x\\) defined by \\begin{equation} t_0 = t_0(x) = \\exp \\left(\\sqrt{\\frac{\\log x}{R}}\\right), \\quad T = t_0^c, \\quad \\text{and} \\quad \\sigma _2 = 1 - \\frac{2}{R \\log t_0}. \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_14","latex_link":"primary-chapter.html#fks-proposition-3-14","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_14","lean_decl_name":"FKS.proposition_3_14","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-proposition-3-14\"\n (title := \"FKS Proposition 3-14\")\n (statement := /--\n Fix $K \\geq 2$ and $c > 1$, and set $t_0$, $T$, and $\\sigma_2$ as functions of $x$ defined by\n \\begin{equation}\n t_0 = t_0(x) = \\exp\\left(\\sqrt{\\frac{\\log x}{R}}\\right), \\quad T = t_0^c, \\quad \\text{and}\n \\quad \\sigma_2 = 1 - \\frac{2}{R \\log t_0}.\n \\end{equation}\n Then, with $\\varepsilon_4(x, \\sigma_2, K, T)$ as defined in (3.22), we have that as\n $x \\to \\infty$,\n \\begin{equation}\n \\varepsilon_4(x, \\sigma_2, K, T) = (1 + o(1)) C\n \\frac{(\\log t_0)^{3 + \\frac{4}{R \\log t_0}}}{t_0^2}, \\quad \\text{with }\n C = 2c_1 e^{\\frac{16w_1}{3R}} w_1^3, \\text{ and } w_1 = 1 + \\frac{c-1}{K},\n \\end{equation}\n where $c_1$ is an admissible value for (ZDB) on some interval $[\\sigma_1, 1]$. Moreover, both\n $\\varepsilon_4(x, \\sigma_2, K, T)$ and\n $\\frac{\\varepsilon_4(x, \\sigma_2, K, T) t_0^2}{(\\log t_0)^3}$ are decreasing in $x$ for\n $x > \\exp(Re^2)$.\n -/)]\ntheorem proposition_3_14 (I : Inputs) {c : ℝ} (K : ℕ) (hc : c > 1) (hK : K ≥ 2) :\n let t₀ : ℝ → ℝ := fun x ↦ exp (sqrt (log x) / I.R)\n let T : ℝ → ℝ := fun x ↦ (t₀ x) ^ c\n let σ₂ : ℝ → ℝ := fun x ↦ 1 - 2 / (I.R * log (t₀ x))\n let w₁ : ℝ := 1 + (c - 1) / K\n let C := 2 * (I.ZDB.c₁ (σ₂ 1)) * exp (16 * w₁ / (3 * I.R)) * w₁ ^ 3\n let f : ℝ → ℝ := fun x ↦ C * (log (t₀ x)) ^ (3 + 4 / (I.R * log (t₀ x))) / (t₀ x) ^ 2\n Asymptotics.IsEquivalent Filter.atTop (fun x ↦ ε₄ I (t₀ x) x (σ₂ x) K (T x)) f\n ∧ AntitoneOn (fun x ↦ ε₄ I (t₀ x) x (σ₂ x) K (T x)) (Set.Ioi (exp (I.R * exp 2)))\n ∧ AntitoneOn (fun x ↦ (ε₄ I (t₀ x) x (σ₂ x) K (T x)) * (t₀ x) ^ 2 / (log (t₀ x)) ^ 3)\n (Set.Ioi (exp (I.R * exp 2))) := by sorry\n","line":457,"end_line":488,"proof_status":"formalized"} {"id":"bklnw-eq_A_14","label":"bklnw-eq_A_14","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","RH-up-to","classical-zero-free-region"],"nlp_text":"We denote \\begin{align} s_2(b, \\lambda , K, T) & = \\frac{2\\lambda }{T} \\sum _{k=0}^{K-1} \\exp \\left(k \\log \\lambda - \\frac{b}{R(\\log T - k \\log \\lambda )}\\right) \\\\ & \\quad \\times \\left(c_1 \\left(\\frac{T}{\\lambda ^k}\\right)^{\\frac{8\\delta }{3}} (\\log (T/\\lambda ^k))^{3+2\\delta } + c_2 (\\log (T/\\lambda ^k))^2\\right). \\notag \\end{align}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.s₂","latex_link":"primary-chapter.html#bklnw-eq_A_14","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.s₂","lean_decl_name":"BKLNW_app.Inputs.s₂","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_14\"\n (title := \"Equation (A.14)\")\n (statement := /-- We denote\n \\begin{align}\n s_2(b, \\lambda, K, T) &= \\frac{2\\lambda}{T} \\sum_{k=0}^{K-1} \\exp\\left(k \\log \\lambda - \\frac{b}{R(\\log T - k \\log \\lambda)}\\right) \\\\\n &\\quad \\times \\left(c_1 \\left(\\frac{T}{\\lambda^k}\\right)^{\\frac{8\\delta}{3}} (\\log(T/\\lambda^k))^{3+2\\delta} + c_2 (\\log(T/\\lambda^k))^2\\right). \\notag\n \\end{align} -/)]\nnoncomputable def Inputs.s₂ (I : Inputs) (δ b : ℝ) (K : ℕ) (lambda T : ℝ) : ℝ :=\n (2 * lambda / T) *\n ∑ k ∈ Finset.range K,\n exp (k * log lambda - b / (I.R * (log T - k * log lambda))) *\n ((I.ZDB.c₁ (1-δ)) * (T / lambda^k)^(8 * δ / 3) * (log (T / lambda^k))^(3 + 2 * δ) + (I.ZDB.c₂ (1-δ)) * (log (T / lambda^k))^2)","line":110,"end_line":122,"proof_status":"formalized"} {"id":"fks-lemma-2-5","label":"fks-lemma-2-5","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","Riemann-von-Mangoldt-estimate","RH-up-to","classical-zero-free-region"],"nlp_text":"Let \\(T_0 \\geq 2\\) and \\(\\gamma {\\gt} 0\\). Assume that there exist \\(c_1, c_2, p, q, T_0\\) for which one has a zero density bound. Assume \\(\\sigma \\geq 5/8\\) and \\(T_0 \\leq U {\\lt} V\\). Then \\(s_0(σ,U,V) \\leq B_0(\\sigma ,U,V)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_2_5","latex_link":"primary-chapter.html#fks-lemma-2-5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_2_5","lean_decl_name":"FKS.lemma_2_5","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-lemma-2-5\"\n (title := \"FKS Lemma 2.5\")\n (statement := /--\n Let $T_0 \\geq 2$ and $\\gamma > 0$. Assume that there exist $c_1, c_2, p, q, T_0$ for which\n one has a zero density bound. Assume $\\sigma \\geq 5/8$ and $T_0 \\leq U < V$. Then\n $s_0(σ,U,V) \\leq B_0(\\sigma,U,V)$.\n -/)]\ntheorem lemma_2_5 (I : Inputs) {σ U V : ℝ}\n (hT₀ : I.ZDB.T₀ ≥ 2)\n (hσ : σ ≥ 5 / 8)\n (hσ' : σ ∈ I.ZDB.σ_range)\n (hU : U ≥ I.ZDB.T₀)\n (hV : V > U) :\n s₀ σ U V ≤ I.B₀ σ U V := by sorry\n","line":221,"end_line":235,"proof_status":"formalized"} {"id":"bklnw-eq_A_12","label":"bklnw-eq_A_12","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","RH-up-to","bklnw-sigma_2_def","classical-zero-free-region"],"nlp_text":"We have \\[ |\\Sigma _2| \\leq 2 \\sum _{k=0}^{K-1} \\frac{\\lambda ^{k+1} x^{-\\frac{1}{R \\log (T/\\lambda ^k)}}}{T} N\\left(1 - \\delta , \\frac{T}{\\lambda ^k}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_12","latex_link":"primary-chapter.html#bklnw-eq_A_12","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_12","lean_decl_name":"BKLNW_app.bklnw_eq_A_12","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_12\"\n (title := \"Equation (A.12)\")\n (statement := /-- We have\n $$ |\\Sigma_2| \\leq 2 \\sum_{k=0}^{K-1} \\frac{\\lambda^{k+1} x^{-\\frac{1}{R \\log(T/\\lambda^k)}}}{T} N\\left(1 - \\delta, \\frac{T}{\\lambda^k}\\right). $$ -/)\n (proof := /-- An argument of Pintz \\cite[Pintz1980] is employed. The interval $[0,T]$ is split into subintervals $[T/\\lambda^{k+1}, T/\\lambda^k]$ where $\\lambda > 1$, $0 \\leq k \\leq K-1$, and $K = \\lfloor \\frac{\\log T/H}{\\log \\lambda} \\rfloor + 1$. Then use the zero-free region to bound $\\Re \\rho$. -/)\n (latexEnv := \"sublemma\")]\ntheorem bklnw_eq_A_12 (I : Inputs) (x T δ lambda : ℝ) (hlambda : 1 < lambda) :\n let K := ⌊ log (T / I.H) / log lambda ⌋₊ + 1\n ‖Sigma₂ x T δ‖ ≤ 2 * ∑ k ∈ Finset.range K, (lambda^(k+1) * x^(- (1 / I.R * log (T / lambda^k))) / T) * I.ZDB.N (1 - δ) (T / lambda^k) := by sorry","line":84,"end_line":93,"proof_status":"statement_formalized"} {"id":"bklnw-eq_A_16","label":"bklnw-eq_A_16","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zero-density-bound","RH-up-to","classical-zero-free-region"],"nlp_text":"We define \\[ k(\\sigma , x_0) = \\left( \\exp \\left(\\frac{10 - 16 \\sigma }{3} \\left( \\frac{\\log x_0}{R} \\right)^{1/2} \\right) \\left( \\frac{\\log x_0}{R} \\right)^{5 - 2 \\sigma } \\right)^{-1}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.k","latex_link":"primary-chapter.html#bklnw-eq_A_16","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.k","lean_decl_name":"BKLNW_app.Inputs.k","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"noncomputable def Inputs.k (I : Inputs) (σ x₀ : ℝ) : ℝ := (exp ((10 - 16 * σ) / 3 * (log x₀ / I.R)^(1/2)) * (log x₀ / I.R)^(5 - 2 * σ))^(-1:ℝ)\n\n","line":619,"end_line":620,"proof_status":"formalized"} {"id":"RS_theorem_19","label":"RS_theorem_19","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Riemann-von-Mangoldt-estimate"],"nlp_text":"One has a Riemann von Mangoldt estimate with parameters 0.137, 0.443, and 1.588.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS.theorem_19","latex_link":"zeta-chapter.html#RS_theorem_19","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS.theorem_19","lean_decl_name":"RS.theorem_19","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/RosserSchoenfeldZeta.lean","lean4_code":"@[blueprint\n \"RS_theorem_19\"\n (title := \"Rosser--Schoenfeld Theorem 19\")\n (statement := /--\n One has a Riemann von Mangoldt estimate with parameters 0.137, 0.443, and 1.588.\n -/)]\ntheorem theorem_19 : riemannZeta.Riemann_vonMangoldt_bound 0.137 0.443 1.588 := by sorry\n","line":14,"end_line":20,"proof_status":"formalized"} {"id":"bklnw-thm-13","label":"bklnw-thm-13","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq_A_14","bklnw-eq_A_11","bklnw-eq_A_8"],"nlp_text":"Let \\(b_1, b_2\\) satisfy \\(1000 \\leq b_1 {\\lt} b_2\\). Let \\(0.001 \\leq \\delta \\leq 0.025\\), \\(\\lambda {\\gt} 1\\), \\(H {\\lt} T {\\lt} e^{b_1}\\), and \\(K = \\left\\lfloor \\frac{\\log \\frac{T}{H}}{\\log \\lambda } \\right\\rfloor + 1\\). Then for all \\(x \\in [e^{b_1}, e^{b_2}]\\) \\[ \\left|\\frac{\\psi (x) - x}{x}\\right| \\leq s_0(b_2, T) + s_1(b_1, \\delta , T) + s_2(b_1, \\delta , \\lambda , K, T), \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_thm_15","latex_link":"primary-chapter.html#bklnw-thm-13","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_thm_15","lean_decl_name":"BKLNW_app.bklnw_thm_15","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-thm-13\"\n (title := \"Theorem 13\")\n (statement := /-- Let $b_1, b_2$ satisfy $1000 \\leq b_1 < b_2$. Let $0.001 \\leq \\delta \\leq 0.025$, $\\lambda > 1$, $H < T < e^{b_1}$, and $K = \\left\\lfloor \\frac{\\log \\frac{T}{H}}{\\log \\lambda} \\right\\rfloor + 1$. Then for all $x \\in [e^{b_1}, e^{b_2}]$\n $$ \\left|\\frac{\\psi(x) - x}{x}\\right| \\leq s_0(b_2, T) + s_1(b_1, \\delta, T) + s_2(b_1, \\delta, \\lambda, K, T), $$ where $s_0, s_1, s_2$ are respectively defined in Definitions \\ref{bklnw-eq_A_8}, \\ref{bklnw-eq_A_11}, and \\ref{bklnw-eq_A_14} -/)\n (proof := /-- Follows from combining Sublemmas \\ref{bklnw_eq_A_7}, \\ref{bklnw_eq_A_9}, \\ref{bklnw_eq_A_10}, and \\ref{bklnw_eq_A_13}. -/)\n (latexEnv := \"theorem\")\n (discussion := 752)]\ntheorem bklnw_thm_15 (I : Inputs) (b₁ b₂ δ lambda T x : ℝ) (hb : 1000 ≤ b₁) (hb' : b₁ < b₂)\n (hδ : 0.001 ≤ δ) (hlambda : 1 < lambda) (hT1 : I.H < T) (hT2 : T < exp b₁) (hx : x ∈ Set.Icc (exp b₁) (exp b₂)) :\n let K := ⌊ log (T / I.H) / log lambda ⌋₊ + 1\n ‖(ψ x - x) / x‖ ≤ bklnw_eq_A_8 b₂ T + s₁ b₁ δ T + I.s₂ δ b₁ K lambda T := by sorry","line":124,"end_line":135,"proof_status":"statement_formalized"} {"id":"bklnw-eq_A_18","label":"bklnw-eq_A_18","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq_A_16"],"nlp_text":"We define \\[ c_4(\\sigma , x_0) = x_0^{\\sigma - 1} \\left( \\frac{2 \\log x_0}{\\pi R} + 1.8642 \\right) k(\\sigma , x_0). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.c4","latex_link":"primary-chapter.html#bklnw-eq_A_18","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.c4","lean_decl_name":"BKLNW_app.Inputs.c4","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"noncomputable def Inputs.c4 (I : Inputs) (σ x₀ : ℝ) : ℝ :=\n x₀^(σ - 1:ℝ) * (2 * log x₀ / π / I.R + 1.8642) * I.k σ x₀\n\n","line":636,"end_line":638,"proof_status":"formalized"} {"id":"bklnw-eq_A_19","label":"bklnw-eq_A_19","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq_A_16"],"nlp_text":"We define \\[ c_5(\\sigma , x_0) = 8.01 \\cdot c_2(\\sigma ) \\exp \\left( -2 \\left( \\frac{\\log x_0}{R} \\right)^{1/2} \\right) \\frac{\\log x_0}{R} k(\\sigma , x_0). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.c5","latex_link":"primary-chapter.html#bklnw-eq_A_19","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Inputs.c5","lean_decl_name":"BKLNW_app.Inputs.c5","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"noncomputable def Inputs.c5 (I : Inputs) (σ x₀ : ℝ) : ℝ :=\n 8.01 * I.c2 σ * exp (-2 * (log x₀ / I.R)^(1/2)) * (log x₀ / I.R) * I.k σ x₀\n\n","line":645,"end_line":647,"proof_status":"formalized"} {"id":"fks2-def-5","label":"fks2-def-5","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def"],"nlp_text":"Let \\(x_0 {\\gt} 2\\). We say a (step) function \\(ε_{\\diamond ,num}(x_0)\\) gives an admissible numerical bound for \\(E_\\diamond (x)\\) if \\(E_\\diamond (x) \\leq ε_{\\diamond ,num}(x_0)\\) for all \\(x \\geq x_0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eπ.numericalBound","latex_link":"secondary-chapter.html#fks2-def-5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eπ.numericalBound","lean_decl_name":"Eπ.numericalBound","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"noncomputable def μ_num_2 {N : ℕ} (b : Fin (N + 1) → ℝ) (εθ_num : ℝ → ℝ) (x₀ x₁ : ℝ) : ℝ :=\n (x₀ * log x₁) / (εθ_num x₁ * x₁ * log x₀) * |Eπ x₀ - Eθ x₀| +\n (log x₁) / (εθ_num x₁ * x₁) *\n (∑ i ∈ Finset.Iio (Fin.last N), εθ_num (exp (b i)) *\n (Li (exp (b (i + 1))) - Li (exp (b i)) +\n exp (b i) / b i - exp (b (i + 1)) / b (i + 1))) +\n 1 / (log x₁ + log (log x₁) - 1)\n","line":348,"end_line":354,"proof_status":"formalized"} {"id":"vertIntBound","label":"vertIntBound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["VerticalIntegral","integralPosAux"],"nlp_text":"Let \\(x{\\gt}0\\) and \\(\\sigma {\\gt}1\\). Then \\[ \\left| \\int _{(\\sigma )}\\frac{x^s}{s(s+1)}ds\\right| \\leq x^\\sigma \\int _\\mathbb {R}\\frac{1}{|(1+t ^2)(2+t ^2)|^{1/2}}dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.vertIntBound","latex_link":"sect0003.html#vertIntBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.vertIntBound","lean_decl_name":"Perron.vertIntBound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"vertIntBound\"\n (title := \"vertIntBound\")\n (statement := /--\n Let $x>0$ and $\\sigma>1$. Then\n $$\\left|\n \\int_{(\\sigma)}\\frac{x^s}{s(s+1)}ds\\right| \\leq\n x^\\sigma \\int_\\R\\frac{1}{|(1+t ^ 2)(2+t ^ 2)|^{1/2}}dt.$$\n -/)\n (proof := /-- Triangle inequality and pointwise estimate. -/)\n (latexEnv := \"lemma\")]\nlemma vertIntBound (xpos : 0 < x) (σ_gt_one : 1 < σ) :\n ‖VerticalIntegral (f x) σ‖ ≤\n x ^ σ * ∫ (t : ℝ), 1 / ((1 + t ^ 2).sqrt * (2 + t ^ 2).sqrt) := by\n calc\n _ = ‖∫ (t : ℝ), x ^ (σ + t * I) / ((σ + t * I) * (σ + t * I + 1))‖ := ?_\n _ ≤ ∫ (t : ℝ), ‖x ^ (σ + t * I) / ((σ + t * I) * (σ + t * I + 1))‖ :=\n norm_integral_le_integral_norm _\n _ = ∫ (t : ℝ), x ^ σ / ‖((σ + t * I) * (σ + t * I + 1))‖ := ?_\n _ = x ^ σ * ∫ (t : ℝ), 1 / (‖σ + t * I‖ * ‖σ + t * I + 1‖) := ?_\n _ ≤ x ^ σ * ∫ (t : ℝ), 1 / ((1 + t ^ 2).sqrt * (2 + t ^ 2).sqrt) :=\n mul_le_mul_of_nonneg_left ?_ (rpow_nonneg xpos.le _)\n · simp [VerticalIntegral]\n · simp [Complex.norm_cpow_eq_rpow_re_of_pos xpos]\n · simp [integral_const_mul, div_eq_mul_inv]\n · by_cases hint : Integrable fun (a : ℝ) ↦ 1 / (‖σ + a * I‖ * ‖σ + a * I + 1‖)\n swap\n · rw [integral_undef hint]; exact integral_nonneg <| fun t ↦ by positivity\n conv => rhs; rhs; intro a; rhs\n apply integral_mono hint\n · have := integralPosAux\n contrapose! this\n simp_rw [integral_undef this, le_rfl]\n rw [Pi.le_def]\n intro t\n gcongr <;> apply sqrt_le_sqrt\n · simp_rw [normSq_add_mul_I, add_le_add_iff_right, one_le_pow₀ σ_gt_one.le]\n · rw [add_right_comm, ← ofReal_one, ← ofReal_add, normSq_add_mul_I, add_le_add_iff_right]\n nlinarith\n rfl\n","line":381,"end_line":420,"proof_status":"formalized"} {"id":"formulaLtOne","label":"formulaLtOne","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["vertIntBound","tendsto_rpow_atTop_nhds_zero_of_norm_lt_one","RectangleIntegral_tendsTo_VerticalIntegral","isIntegrable","zeroTendstoDiff","limitOfConstant","tendsto_zero_Lower","Perron.tendsto_zero_Upper"],"nlp_text":"For \\(x{\\gt}0\\), \\(\\sigma {\\gt}0\\), and \\(x{\\lt}1\\), we have \\[ \\frac1{2\\pi i} \\int _{(\\sigma )}\\frac{x^s}{s(s+1)}ds =0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.formulaLtOne","latex_link":"sect0003.html#formulaLtOne","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.formulaLtOne","lean_decl_name":"Perron.formulaLtOne","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"formulaLtOne\"\n (title := \"formulaLtOne\")\n (statement := /--\n For $x>0$, $\\sigma>0$, and $x<1$, we have\n $$\n \\frac1{2\\pi i}\n \\int_{(\\sigma)}\\frac{x^s}{s(s+1)}ds =0.\n $$\n -/)\n (latexEnv := \"lemma\")]\nlemma formulaLtOne (xpos : 0 < x) (x_lt_one : x < 1) (σ_pos : 0 < σ)\n : VerticalIntegral (f x) σ = 0 := by\n /--\n Let $f(s) = x^s/(s(s+1))$. Then $f$ is holomorphic on the half-plane\n $\\{s\\in\\mathbb{C}:\\Re(s)>0\\}$. The rectangle integral of $f$ with corners $\\sigma-iT$ and\n $\\sigma+iT$ is zero. The limit of this rectangle integral as $T\\to\\infty$ is\n $\\int_{(\\sigma')}-\\int_{(\\sigma)}$. Therefore, $\\int_{(\\sigma')}=\\int_{(\\sigma)}$.\n -/\n have h_contourPull (σ' σ'' : ℝ) (σ'pos : 0 < σ') (σ''pos : 0 < σ'') :\n VerticalIntegral (f x) σ' = VerticalIntegral (f x) σ'' :=\n contourPull xpos (notMem_uIcc_of_lt σ'pos σ''pos)\n (notMem_uIcc_of_lt (by linarith) (by linarith))\n /--\n But we also have the bound $\\int_{(\\sigma')} \\leq x^{\\sigma'} * C$, where\n $C=\\int_\\R\\frac{1}{|(1+t)(1+t+1)|}dt$.\n -/\n have VertIntBound : ∃ C > 0, ∀ σ' > 1, ‖VerticalIntegral (f x) σ'‖ ≤ x^σ' * C := by\n let C := ∫ (t : ℝ), 1 / ((1 + t ^ 2).sqrt * (2 + t ^ 2).sqrt)\n exact ⟨C, integralPosAux, fun _ ↦ vertIntBound xpos⟩\n /-- Therefore $\\int_{(\\sigma')}\\to 0$ as $\\sigma'\\to\\infty$. -/\n have AbsVertIntTendsto : Tendsto ((‖·‖ : ℂ → ℝ) ∘ (VerticalIntegral (f x))) atTop (𝓝 0) := by\n obtain ⟨C, _, hC⟩ := VertIntBound\n have := tendsto_rpow_atTop_nhds_zero_of_norm_lt_one xpos x_lt_one C\n apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds this\n · filter_upwards; exact fun _ ↦ norm_nonneg _\n · filter_upwards [eventually_gt_atTop 1]; exact hC\n have VertIntTendsto : Tendsto (VerticalIntegral (f x)) atTop (𝓝 0) :=\n tendsto_zero_iff_norm_tendsto_zero.mpr AbsVertIntTendsto\n /-- So pulling contours gives $\\int_{(\\sigma)}=0$. -/\n exact limitOfConstant σ_pos h_contourPull VertIntTendsto\n","line":616,"end_line":656,"proof_status":"formalized"} {"id":"lem:abadeulmac'","label":"abadeulmac'","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Zeta0EqZeta"],"nlp_text":"Let \\(b{\\gt}0\\), \\(b\\in \\mathbb {Z}\\). Then, for all \\(s\\in \\mathbb {C}\\setminus \\{ 1\\} \\) with \\(\\Re s {\\gt} 0\\), \\begin{equation} \\label{eq:abak1'} \\sum _{n \\leq b} \\frac{1}{n^s} = \\zeta (s) + \\frac{b^{1-s}}{1-s} + \\frac{b^{-s}}{2} + s \\int _b^\\infty \\left(\\{ y\\} -\\frac{1}{2}\\right) \\frac{dy}{y^{s+1}}. \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeulmac'","latex_link":"zeta-chapter.html#lem:abadeulmac'","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeulmac'","lean_decl_name":"ZetaAppendix.lemma_abadeulmac'","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadeulmac'\"\n (title := \"Identity for a partial sum of zeta(s) for integer b\")\n (statement := /--\nLet $b>0$, $b\\in \\mathbb{Z}$.\nThen, for all $s\\in \\mathbb{C}\\setminus \\{1\\}$ with $\\Re s > 0$,\n\\begin{equation}\\label{eq:abak1'}\n \\sum_{n \\leq b} \\frac{1}{n^s} = \\zeta(s) + \\frac{b^{1-s}}{1-s} + \\frac{b^{-s}}{2}\n + s \\int_b^\\infty \\left(\\{y\\}-\\frac{1}{2}\\right) \\frac{dy}{y^{s+1}}.\n\\end{equation}\n-/)\n (proof := /--\nAssume first that $\\Re s > 1$. By first-order Euler-Maclaurin,\n\\[\\sum_{n > b}\\frac{1}{n^s} = \\int_b^\\infty \\frac{dy}{y^s} + \\int_b^\\infty\n \\left(\\{y\\}-\\frac{1}{2}\\right) d\\left(\\frac{1}{y^s}\\right).\n\\]\nHere $\\int_b^\\infty \\frac{dy}{y^s} = -\\frac{b^{1-s}}{1-s}$ and\n$d\\left(\\frac{1}{y^s}\\right) = - \\frac{s}{y^{s+1}} dy$.\nHence, by $\\sum_{n\\leq b} \\frac{1}{n^s} = \\zeta(s) - \\sum_{n>b} \\frac{1}{n^s}$\nfor $\\Re s > 1$,\n$$\\sum_{n\\leq b} \\frac{1}{n^s} = \\zeta(s) + \\frac{b^{1-s}}{1-s} +\n\\int_b^\\infty \\left(\\{y\\}-\\frac{1}{2}\\right) \\frac{s}{y^{s+1}} dy.$$\nSince the integral converges absolutely for $\\Re s > 0$, both sides extend holomorphically\nto $\\{s\\in \\mathbb{C}: \\Re s>0, s\\ne 1\\}$; thus, the equation holds throughout that region.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 566)]\ntheorem lemma_abadeulmac' {b : ℕ} (hb : 0 < b) {s : ℂ}\n (hs1 : s ≠ 1) (hsigma : 0 < s.re) :\n ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) =\n riemannZeta s + (b ^ (1 - s) : ℂ) / (1 - s) + (b ^ (-s) : ℂ) / (2) +\n s * ∫ y in Set.Ioi (b : ℝ), (Int.fract y - 1 / 2) * ((y : ℂ) ^ (-(s + 1))) := by\n rw [← Zeta0EqZeta hb (by linarith) hs1]\n unfold riemannZeta0\n rw [show ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) = (∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s)) + 0 by ring]\n rw [show ∑ n ∈ range (b + 1), 1 / (n : ℂ) ^ s = ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) by\n rw [range_eq_Ico]\n rw [sum_eq_sum_Ico_succ_bot (by linarith)]\n norm_cast\n rw [zero_cpow (by aesop)]\n simp only [div_zero, zero_add, one_div]\n rw [← Finset.Ico_succ_right_eq_Icc]\n congr\n ext x\n rw [cpow_neg]]\n rw [show (∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) + -(b : ℂ) ^ (1 - s) / (1 - s) + -(b : ℂ) ^ (-s) / 2 +\n s * ∫ (x : ℝ) in Set.Ioi ↑b, (⌊x⌋ + 1 / 2 - x : ℂ) / (x : ℂ) ^ (s + 1)) +\n (b : ℂ) ^ (1 - s) / (1 - s) +\n (b : ℂ) ^ (-s) / 2 +\n s * ∫ (y : ℝ) in Set.Ioi ↑b, ((Int.fract y) - 1 / 2) * (y : ℂ) ^ (-(s + 1)) =\n ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) + (\n s * (∫ (x : ℝ) in Set.Ioi ↑b, (⌊x⌋ + 1 / 2 - x : ℂ) / (x : ℂ) ^ (s + 1)) +\n s * ∫ (y : ℝ) in Set.Ioi ↑b, ((Int.fract y) - 1 / 2) * (y : ℂ) ^ (-(s + 1))) by ring]\n congr! 1\n suffices h : ∫ (x : ℝ) in Set.Ioi ↑b, (⌊x⌋ + 1 / 2 - x : ℂ) / ↑x ^ (s + 1) =\n -∫ (y : ℝ) in Set.Ioi ↑b, ((Int.fract y) - 1 / 2 : ℂ) * ↑y ^ (-(s + 1)) by\n rw [h]; ring\n rw [← MeasureTheory.integral_neg]\n congr 1\n ext x\n unfold Int.fract\n rw [show (x : ℂ) ^ (-(s + 1)) = 1 / (↑x : ℂ) ^ (s + 1) by\n rw [cpow_neg, one_div]]\n rw [mul_one_div, ← neg_div]\n congr\n ring_nf\n push_cast\n ring_nf","line":1099,"end_line":1166,"proof_status":"formalized"} {"id":"lem:abadeulmac","label":"abadeulmac","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:abadeulmac'"],"nlp_text":"Let \\(b{\\gt}0\\), \\(b\\in \\mathbb {Z} + \\frac{1}{2}\\). Then, for all \\(s\\in \\mathbb {C}\\setminus \\{ 1\\} \\) with \\(\\Re s {\\gt} 0\\), \\begin{equation} \\label{eq:abak1} \\sum _{n\\leq b} \\frac{1}{n^s} = \\zeta (s) + \\frac{b^{1-s}}{1-s} + s \\int _b^\\infty \\left(\\{ y\\} -\\frac{1}{2}\\right) \\frac{dy}{y^{s+1}}. \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeulmac","latex_link":"zeta-chapter.html#lem:abadeulmac","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeulmac","lean_decl_name":"ZetaAppendix.lemma_abadeulmac","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadeulmac'\"\n (title := \"Identity for a partial sum of zeta(s) for integer b\")\n (statement := /--\nLet $b>0$, $b\\in \\mathbb{Z}$.\nThen, for all $s\\in \\mathbb{C}\\setminus \\{1\\}$ with $\\Re s > 0$,\n\\begin{equation}\\label{eq:abak1'}\n \\sum_{n \\leq b} \\frac{1}{n^s} = \\zeta(s) + \\frac{b^{1-s}}{1-s} + \\frac{b^{-s}}{2}\n + s \\int_b^\\infty \\left(\\{y\\}-\\frac{1}{2}\\right) \\frac{dy}{y^{s+1}}.\n\\end{equation}\n-/)\n (proof := /--\nAssume first that $\\Re s > 1$. By first-order Euler-Maclaurin,\n\\[\\sum_{n > b}\\frac{1}{n^s} = \\int_b^\\infty \\frac{dy}{y^s} + \\int_b^\\infty\n \\left(\\{y\\}-\\frac{1}{2}\\right) d\\left(\\frac{1}{y^s}\\right).\n\\]\nHere $\\int_b^\\infty \\frac{dy}{y^s} = -\\frac{b^{1-s}}{1-s}$ and\n$d\\left(\\frac{1}{y^s}\\right) = - \\frac{s}{y^{s+1}} dy$.\nHence, by $\\sum_{n\\leq b} \\frac{1}{n^s} = \\zeta(s) - \\sum_{n>b} \\frac{1}{n^s}$\nfor $\\Re s > 1$,\n$$\\sum_{n\\leq b} \\frac{1}{n^s} = \\zeta(s) + \\frac{b^{1-s}}{1-s} +\n\\int_b^\\infty \\left(\\{y\\}-\\frac{1}{2}\\right) \\frac{s}{y^{s+1}} dy.$$\nSince the integral converges absolutely for $\\Re s > 0$, both sides extend holomorphically\nto $\\{s\\in \\mathbb{C}: \\Re s>0, s\\ne 1\\}$; thus, the equation holds throughout that region.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 566)]\ntheorem lemma_abadeulmac' {b : ℕ} (hb : 0 < b) {s : ℂ}\n (hs1 : s ≠ 1) (hsigma : 0 < s.re) :\n ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) =\n riemannZeta s + (b ^ (1 - s) : ℂ) / (1 - s) + (b ^ (-s) : ℂ) / (2) +\n s * ∫ y in Set.Ioi (b : ℝ), (Int.fract y - 1 / 2) * ((y : ℂ) ^ (-(s + 1))) := by\n rw [← Zeta0EqZeta hb (by linarith) hs1]\n unfold riemannZeta0\n rw [show ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) = (∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s)) + 0 by ring]\n rw [show ∑ n ∈ range (b + 1), 1 / (n : ℂ) ^ s = ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) by\n rw [range_eq_Ico]\n rw [sum_eq_sum_Ico_succ_bot (by linarith)]\n norm_cast\n rw [zero_cpow (by aesop)]\n simp only [div_zero, zero_add, one_div]\n rw [← Finset.Ico_succ_right_eq_Icc]\n congr\n ext x\n rw [cpow_neg]]\n rw [show (∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) + -(b : ℂ) ^ (1 - s) / (1 - s) + -(b : ℂ) ^ (-s) / 2 +\n s * ∫ (x : ℝ) in Set.Ioi ↑b, (⌊x⌋ + 1 / 2 - x : ℂ) / (x : ℂ) ^ (s + 1)) +\n (b : ℂ) ^ (1 - s) / (1 - s) +\n (b : ℂ) ^ (-s) / 2 +\n s * ∫ (y : ℝ) in Set.Ioi ↑b, ((Int.fract y) - 1 / 2) * (y : ℂ) ^ (-(s + 1)) =\n ∑ n ∈ Icc 1 b, (n : ℂ) ^ (-s) + (\n s * (∫ (x : ℝ) in Set.Ioi ↑b, (⌊x⌋ + 1 / 2 - x : ℂ) / (x : ℂ) ^ (s + 1)) +\n s * ∫ (y : ℝ) in Set.Ioi ↑b, ((Int.fract y) - 1 / 2) * (y : ℂ) ^ (-(s + 1))) by ring]\n congr! 1\n suffices h : ∫ (x : ℝ) in Set.Ioi ↑b, (⌊x⌋ + 1 / 2 - x : ℂ) / ↑x ^ (s + 1) =\n -∫ (y : ℝ) in Set.Ioi ↑b, ((Int.fract y) - 1 / 2 : ℂ) * ↑y ^ (-(s + 1)) by\n rw [h]; ring\n rw [← MeasureTheory.integral_neg]\n congr 1\n ext x\n unfold Int.fract\n rw [show (x : ℂ) ^ (-(s + 1)) = 1 / (↑x : ℂ) ^ (s + 1) by\n rw [cpow_neg, one_div]]\n rw [mul_one_div, ← neg_div]\n congr\n ring_nf\n push_cast\n ring_nf\n","line":1099,"end_line":1166,"proof_status":"formalized"} {"id":"lem:abadtoabsum","label":"abadtoabsum","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:abadeulmac"],"nlp_text":"Let \\(b{\\gt}a{\\gt}0\\), \\(b\\in \\mathbb {Z} + \\frac{1}{2}\\). Then, for all \\(s\\in \\mathbb {C}\\setminus \\{ 1\\} \\) with \\(\\sigma = \\Re s {\\gt} 0\\), \\[ \\sum _{n\\leq a} \\frac{1}{n^s} = -\\sum _{a {\\lt} n\\leq b} \\frac{1}{n^s} + \\zeta (s) + \\frac{b^{1-s}}{1-s} + O^*\\left(\\frac{|s|}{2 \\sigma b^\\sigma }\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadtoabsum","latex_link":"zeta-chapter.html#lem:abadtoabsum","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadtoabsum","lean_decl_name":"ZetaAppendix.lemma_abadtoabsum","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadtoabsum\"\n (title := \"Estimate for a partial sum of $\\\\zeta(s)$\")\n (statement := /--\nLet $b>a>0$, $b\\in \\mathbb{Z} + \\frac{1}{2}$.\nThen, for all $s\\in \\mathbb{C}\\setminus \\{1\\}$ with $\\sigma = \\Re s > 0$,\n$$\\sum_{n\\leq a} \\frac{1}{n^s} = -\\sum_{a < n\\leq b} \\frac{1}{n^s} + \\zeta(s)\n + \\frac{b^{1-s}}{1-s} + O^*\\left(\\frac{|s|}{2 \\sigma b^\\sigma}\\right).$$\n-/)\n (proof := /--\nBy Lemma \\ref{lem:abadeulmac}, $\\sum_{n\\leq a} = \\sum_{n\\leq b} - \\sum_{a < n\\leq b}$,\n$\\left|\\{y\\}-\\frac{1}{2}\\right| \\leq \\frac{1}{2}$ and\n$\\int_b^\\infty \\frac{dy}{|y^{s+1}|} = \\frac{1}{\\sigma b^\\sigma}$.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 567)]\ntheorem lemma_abadtoabsum {a b : ℝ} (ha : 0 < a) (hb' : b.IsHalfInteger) (hab : b > a) {s : ℂ}\n (hs1 : s ≠ 1) (hsigma : 0 < s.re) :\n ∃ E, ∑ n ∈ Icc 1 ⌊a⌋₊, (n : ℂ) ^ (-s) = -∑ n ∈ Ioc ⌊a⌋₊ ⌊b⌋₊,\n (n : ℂ) ^ (-s) + riemannZeta s + (b ^ (1 - s) : ℂ) / (1 - s) + E ∧\n ‖E‖ ≤ ‖s‖ / (2 * s.re * (b ^ s.re : ℝ)) := by\n have hb_pos : 0 < b := ha.trans hab\n have hmac := lemma_abadeulmac hb_pos hb' hs1 hsigma\n let E := s * ∫ y in Set.Ioi b, (Int.fract y - 1 / 2 : ℂ) * ((y : ℂ) ^ (-(s + 1)))\n refine ⟨E, ?_, ?_⟩\n · have hfinset : (Icc 1 ⌊b⌋₊ : Finset ℕ) = Finset.Icc 1 ⌊a⌋₊ ∪ Ioc ⌊a⌋₊ ⌊b⌋₊ := by\n ext n; simp only [Finset.mem_union, Finset.mem_Icc, Finset.mem_Ioc]\n refine ⟨fun ⟨h1, hn⟩ ↦ ?_, fun h ↦ ?_⟩\n · by_cases hn' : n ≤ ⌊a⌋₊\n · exact Or.inl ⟨h1, hn'⟩\n · exact Or.inr ⟨Nat.lt_of_not_le hn', hn⟩\n · rcases h with ⟨h1, hn⟩ | ⟨hn1, hn2⟩\n · exact ⟨h1, hn.trans <| Nat.floor_mono hab.le⟩\n · exact ⟨by omega, hn2⟩\n have hdisjoint : Disjoint (Finset.Icc 1 ⌊a⌋₊) (Ioc ⌊a⌋₊ ⌊b⌋₊) :=\n disjoint_left.mpr fun x hx₁ hx₂ ↦ by simp only [Finset.mem_Icc] at hx₁; simp only [Finset.mem_Ioc] at hx₂; omega\n rw [hfinset, sum_union hdisjoint] at hmac\n linear_combination' hmac\n · have h_integral_bound : ‖∫ y in Set.Ioi b, (Int.fract y - 1 / 2 : ℂ) * ((y : ℂ) ^ (-(s + 1)))‖ ≤\n (1 / 2) * (1 / (s.re * b ^ s.re)) := by\n have hstep1 : ‖∫ y in Set.Ioi b, (Int.fract y - 1 / 2 : ℂ) * ((y : ℂ) ^ (-(s + 1)))‖ ≤\n ∫ y in Set.Ioi b, ‖(Int.fract y - 1 / 2 : ℂ) * ((y : ℂ) ^ (-(s + 1)))‖ :=\n norm_integral_le_integral_norm _\n have : ∫ y in Set.Ioi b, ‖(Int.fract y - 1 / 2 : ℂ) * ((y : ℂ) ^ (-(s + 1)))‖ ≤\n ∫ y in Set.Ioi b, (1 / 2 : ℝ) * (y : ℝ) ^ (-(s.re + 1)) := by\n apply integral_mono_of_nonneg (Filter.Eventually.of_forall fun _ ↦ norm_nonneg _)\n ((integrableOn_Ioi_rpow_of_lt (by linarith) hb_pos).const_mul _) _\n filter_upwards [ae_restrict_mem measurableSet_Ioi] with y hy\n simp only [norm_mul, norm_cpow_eq_rpow_re_of_pos (hb_pos.trans hy), neg_add_rev, add_re,\n neg_re, one_re]\n apply mul_le_mul_of_nonneg_right _ (rpow_nonneg (hb_pos.trans hy).le _)\n rw [norm_sub_rev]\n have hfract_bound : ‖(1 / 2 : ℂ) - ↑(Int.fract y)‖ ≤ 1 / 2 := by\n have : (1 / 2 : ℂ) - ↑(Int.fract y) = ↑((1 / 2 : ℝ) - (Int.fract y : ℝ)) := by\n simp only [ofReal_sub, ofReal_div, ofReal_one, ofReal_ofNat]\n rw [this, norm_real, norm_eq_abs, abs_le]\n constructor <;> linarith [Int.fract_nonneg y, Int.fract_lt_one y]\n exact hfract_bound\n have : ∫ y in Set.Ioi b, (1 / 2 : ℝ) * (y : ℝ) ^ (-(s.re + 1)) =\n (1 / 2) * (1 / (s.re * b ^ s.re)) := by\n rw [integral_const_mul, integral_Ioi_rpow_of_lt (by linarith : -(s.re + 1) < -1) hb_pos]\n have : -(s.re + 1) + 1 = -s.re := by ring\n have : b ^ (-s.re) = (b ^ s.re)⁻¹ := rpow_neg hb_pos.le s.re\n aesop\n linarith\n calc ‖E‖ = ‖s‖ * ‖∫ y in Set.Ioi b, (Int.fract y - 1 / 2 : ℂ) * ((y : ℂ) ^ (-(s + 1)))‖ := by simp only [E, norm_mul]\n _ ≤ ‖s‖ * ((1 / 2) * (1 / (s.re * b ^ s.re))) := mul_le_mul_of_nonneg_left h_integral_bound (norm_nonneg _)\n _ = ‖s‖ / (2 * s.re * b ^ s.re) := by ring\n","line":1264,"end_line":1331,"proof_status":"formalized"} {"id":"lem:eps-bounds","label":"eps-bounds","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For all \\(n \\ge X_0^2 = 89693^2\\) we have \\[ \\frac{1}{\\log ^3 \\sqrt{n}} \\le 0.000675, \\qquad \\frac{1}{n^{3/2}} \\le \\frac{1}{89693}\\cdot \\frac{1}{n}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.inv_cube_log_sqrt_le","latex_link":"tertiary-chapter.html#lem:eps-bounds","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.inv_cube_log_sqrt_le","lean_decl_name":"Lcm.inv_cube_log_sqrt_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":" abundant. -/)\n (proof := /-- By Proposition~\\ref{prop:ineq-holds-large-n}, there exist primes\n \\(p_1,p_2,p_3,q_1,q_2,q_3\\) satisfying the hypotheses of Theorem~\\ref{thm:criterion}.\n Hence \\(L_n\\) is not highly abundant. -/)\n (proofUses := [\"prop:ineq-holds-large-n\", \"thm:criterion\"])]\ntheorem L_not_HA_of_ge (n : ℕ) (hn : n ≥ 89693 ^ 2) : ¬HighlyAbundant (L n) :=\n (Criterion.mk' hn).not_highlyAbundant\n\nend Lcm\n","line":1397,"end_line":1423,"proof_status":"formalized"} {"id":"WeakPNT-character","label":"WeakPNT-character","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(q ≥ 1\\) and \\(a\\) is coprime to \\(q\\), and \\(\\mathrm{Re} s {\\gt} 1\\), we have \\[ \\sum _{n: n = a\\ (q)} \\frac{\\Lambda (n)}{n^s} = - \\frac{1}{\\varphi (q)} \\sum _{\\chi \\ (q)} \\overline{\\chi (a)} \\frac{L'(s,\\chi )}{L(s,\\chi )}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT_character","latex_link":"sect0002.html#WeakPNT-character","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT_character","lean_decl_name":"WeakPNT_character","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":"\n@[blueprint \"WienerIkehara2\"\n (title := \"Wiener-Ikehara Theorem (2)\")\n (statement := /-- We have $$ \\sum_{n\\leq x} f(n) = A x + o(x).$$ -/)\n (proof := /-- Use Corollary \\ref{auto-cheby} to remove the Chebyshev hypothesis in Theorem \\ref{WienerIkehara}. -/)\n (latexEnv := \"theorem\")]\ntheorem WienerIkeharaTheorem'' (hpos : 0 ≤ f) (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ'))\n (hG : ContinuousOn F {s | 1 ≤ s.re})\n (hG' : Set.EqOn F (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re}) :\n Tendsto (fun N => cumsum f N / N) atTop (𝓝 A) :=\n WienerIkeharaTheorem' hpos hf (auto_cheby hpos hf hG hG') hG hG'\n\n\n\nend auto_cheby\n\nblueprint_comment /--\n\\section{The prime number theorem in arithmetic progressions}\n\n-/\n\n@[blueprint \"WeakPNT-character\"\n (title := \"WeakPNT-character\")\n (statement := /--\n If $q ≥ 1$ and $a$ is coprime to $q$, and $\\mathrm{Re} s > 1$, we have\n $$\n \\sum_{n: n = a\\ (q)} \\frac{\\Lambda(n)}{n^s} = - \\frac{1}{\\varphi(q)} \\sum_{\\chi\\ (q)}\n \\overline{\\chi(a)} \\frac{L'(s,\\chi)}{L(s,\\chi)}.$$\n -/)\n (proof := /--\n From the Fourier inversion formula on the multiplicative group $(\\Z/q\\Z)^\\times$, we have\n $$ 1_{n=a\\ (q)} = \\frac{\\varphi(q)}{q} \\sum_{\\chi\\ (q)} \\overline{\\chi(a)} \\chi(n).$$\n On the other hand, from standard facts about L-series we have for each character $\\chi$ that\n $$\n \\sum_{n} \\frac{\\Lambda(n) \\chi(n)}{n^s} = - \\frac{L'(s,\\chi)}{L(s,\\chi)}.$$\n Combining these two facts, we obtain the claim.\n -/)\n","line":3904,"end_line":3940,"proof_status":"formalized"} {"id":"WeakPNT-AP-prelim","label":"WeakPNT-AP-prelim","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WeakPNT-character","ChebyshevPsi"],"nlp_text":"If \\(q ≥ 1\\) and \\(a\\) is coprime to \\(q\\), the Dirichlet series \\(\\sum _{n \\leq x: n = a\\ (q)} \\frac{\\Lambda (n)}{n^s}\\) converges for \\(\\mathrm{Re}(s) {\\gt} 1\\) to \\(\\frac{1}{\\varphi (q)} \\frac{1}{s-1} + G(s)\\) where \\(G\\) has a continuous extension to \\(\\mathrm{Re}(s)=1\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT_AP_prelim","latex_link":"sect0002.html#WeakPNT-AP-prelim","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT_AP_prelim","lean_decl_name":"WeakPNT_AP_prelim","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" {q a : ℕ} (hq : q ≥ 1) (ha : Nat.Coprime a q) (ha' : a < q) {s : ℂ} (hs : 1 < s.re) :\n LSeries (fun n ↦ if n % q = a then Λ n else 0) s =\n - (∑' χ : DirichletCharacter ℂ q,\n ((starRingEnd ℂ) (χ a) * ((deriv (LSeries (fun n:ℕ ↦ χ n)) s)) /\n (LSeries (fun n:ℕ ↦ χ n) s))) / (Nat.totient q : ℂ) := by\n have : NeZero q := ⟨by omega⟩\n convert vonMangoldt.LSeries_residueClass_eq ((ZMod.isUnit_iff_coprime a q).mpr ha) hs using 1\n · congr with n\n have : n % q = a ↔ (n : ZMod q) = a := by\n rw [ZMod.natCast_eq_natCast_iff', Nat.mod_eq_of_lt ha']\n simp [this]\n split_ifs <;> simp [*]\n · rw [div_eq_inv_mul, neg_mul_comm, tsum_fintype]\n congr 3 with χ\n rw [DirichletCharacter.deriv_LFunction_eq_deriv_LSeries _ hs,\n DirichletCharacter.LFunction_eq_LSeries _ hs, mul_div]\n congr 2\n rw [starRingEnd_apply, MulChar.star_apply', MulChar.inv_apply_eq_inv',\n ← ZMod.coe_unitOfCoprime a ha, ZMod.inv_coe_unit, map_units_inv]\n\n\n\n\n@[blueprint \"WeakPNT-AP-prelim\"\n (title := \"WeakPNT-AP-prelim\")\n (statement := /--\n If $q ≥ 1$ and $a$ is coprime to $q$, the Dirichlet series\n $\\sum_{n \\leq x: n = a\\ (q)} \\frac{\\Lambda(n)}{n^s}$ converges for $\\mathrm{Re}(s) > 1$ to\n $\\frac{1}{\\varphi(q)} \\frac{1}{s-1} + G(s)$ where $G$ has a continuous extension to\n $\\mathrm{Re}(s)=1$.\n -/)\n (proof := /--\n We expand out the left-hand side using Lemma \\ref{WeakPNT-character}. The contribution of the\n non-principal characters $\\chi$ extend continuously to $\\mathrm{Re}(s) = 1$ thanks to the\n non-vanishing of $L(s,\\chi)$ on this line (which should follow from another component of\n this project), so it suffices to show that for the principal character $\\chi_0$, that\n $$ -\\frac{L'(s,\\chi_0)}{L(s,\\chi_0)} - \\frac{1}{s-1}$$\n","line":3943,"end_line":3979,"proof_status":"formalized"} {"id":"WeakPNT-AP","label":"WeakPNT-AP","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WeakPNT-AP-prelim","WienerIkehara2"],"nlp_text":"If \\(q ≥ 1\\) and \\(a\\) is coprime to \\(q\\), we have \\[ \\sum _{n \\leq x: n = a\\ (q)} \\Lambda (n) = \\frac{x}{\\varphi (q)} + o(x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT_AP","latex_link":"sect0002.html#WeakPNT-AP","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT_AP","lean_decl_name":"WeakPNT_AP","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" refine ⟨1 / ε, by positivity, fun n hn ↦ ?_⟩\n have := log_le_sub_one_of_pos (by positivity : 0 < (n : ℝ) ^ ε)\n rw [log_rpow (by positivity)] at this\n nlinarith [rpow_pos_of_pos (by positivity : 0 < (n : ℝ)) ε, mul_div_cancel₀ 1 hε_pos.ne']\n refine ⟨C, hC_pos, fun n hn ↦ ?_⟩\n rw [rpow_sub (by positivity)]\n exact le_trans (div_le_div_of_nonneg_right (hC n hn) (by positivity)) (by rw [div_eq_mul_inv]; ring_nf; norm_num)\n obtain ⟨C, _, hC⟩ : ∃ C > 0, ∀ n : ℕ, n ≥ 2 → Real.log n / (n : ℝ) ^ s ≤ C * (n : ℝ) ^ ((s - 1) / 2 - s) :=\n h_log_le_n_eps ((s - 1) / 2) (by linarith)\n rw [← summable_nat_add_iff 2]\n exact Summable.of_nonneg_of_le (fun n ↦ div_nonneg (log_nonneg (by norm_cast; omega))\n (rpow_nonneg (by positivity) _)) (fun n ↦ hC _ (by omega)) (Summable.mul_left _ <| by\n simpa using summable_nat_add_iff 2 |>.2 <| summable_nat_rpow.2 <| by linarith)\n\n@[blueprint \"WeakPNT-AP\"\n (title := \"WeakPNT-AP\")\n (statement := /--\n If $q ≥ 1$ and $a$ is coprime to $q$, we have\n $$ \\sum_{n \\leq x: n = a\\ (q)} \\Lambda(n) = \\frac{x}{\\varphi(q)} + o(x).$$\n -/)\n (proof := /-- Apply Theorem \\ref{WienerIkehara} (or Theorem \\ref{WienerIkehara2} to avoid\n checking the Chebyshev condition) using Proposition \\ref{WeakPNT-AP-prelim}.-/)\n (proofUses := [\"WienerIkehara\", \"WeakPNT-AP-prelim\"])]\ntheorem WeakPNT_AP {q : ℕ} {a : ℕ} (hq : q ≥ 1) (ha : a.Coprime q) (ha' : a < q) :\n Tendsto (fun N ↦ cumsum (fun n ↦ if n % q = a then Λ n else 0) N / N) atTop (𝓝 (1 / q.totient)) := by\n have h_summable : ∀ s : ℝ, 1 < s → Summable (fun n ↦ (if n % q = a then Λ n else 0) / n ^ s) := by\n intro s hs\n refine .of_nonneg_of_le (fun n ↦ ?_) (fun n ↦ ?_) (summable_vonMangoldt_div_rpow hs)\n · split_ifs <;> first | positivity | exact div_nonneg (not_not.mp fun h ↦ by\n have := Nat.Prime.pos (by contrapose! h; aesop : n.Prime); aesop) (rpow_nonneg (Nat.cast_nonneg _) _)\n · split_ifs <;> norm_num; exact div_nonneg vonMangoldt_nonneg (by positivity)\n obtain ⟨G, hG₁, hG₂⟩ := WeakPNT_AP_prelim hq ha ha'\n convert WienerIkeharaTheorem'' _ _ _ _ using 1\n · use G\n · intro n\n simp_all only [ge_iff_le, one_div, mul_inv_rev, Pi.ofNat_apply]\n split\n","line":4004,"end_line":4040,"proof_status":"formalized"} {"id":"chebyshev_asymptotic_pnt","label":"chebyshev_asymptotic_pnt","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WeakPNT-AP"],"nlp_text":"If \\(a\\ (q)\\) is a primitive residue class, then one has \\[ \\sum _{p \\leq x: p = a\\ (q)} \\log p = \\frac{x}{\\phi (q)} + o(x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/chebyshev_asymptotic_pnt","latex_link":"sect0005.html#chebyshev_asymptotic_pnt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/chebyshev_asymptotic_pnt","lean_decl_name":"chebyshev_asymptotic_pnt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"Prime number theorem in AP\")\n (statement := /--\n If $a\\ (q)$ is a primitive residue class, then one has\n $$ \\sum_{p \\leq x: p = a\\ (q)} \\log p = \\frac{x}{\\phi(q)} + o(x).$$\n -/)\n (proof := /--\n This is a routine modification of the proof of Theorem \\ref{chebyshev_asymptotic}.\n -/)\n (proofUses := [\"chebyshev_asymptotic\"])\n (latexEnv := \"theorem\")]\ntheorem chebyshev_asymptotic_pnt\n {q : ℕ} {a : ℕ} (hq : q ≥ 1) (ha : a.Coprime q) (ha' : a < q) :\n (fun x ↦ ∑ p ∈ filter Nat.Prime (Iic ⌊x⌋₊), if p % q = a then log p else 0) ~[atTop]\n fun x ↦ x / q.totient := by\n let ψ_aq : ℝ → ℝ := fun x ↦ ∑ n ∈ Icc 1 ⌊x⌋₊, if n % q = a then Λ n else 0\n have htot_pos : (0 : ℝ) < q.totient := cast_pos.mpr (totient_pos.mpr hq)\n have hψ_equiv : ψ_aq ~[atTop] fun x ↦ x / q.totient := by\n have hW := WeakPNT_AP hq ha ha'\n simp only [cumsum, ← Iio_eq_range] at hW\n have hψ_eq x : ψ_aq x = ∑ n ∈ Iio (⌊x⌋₊ + 1), if n % q = a then Λ n else 0 := by\n simp only [ψ_aq, show Icc 1 ⌊x⌋₊ = (Iio (⌊x⌋₊ + 1)).filter (1 ≤ ·) by\n ext n; simp [mem_Icc, mem_filter]; tauto, sum_filter]\n refine sum_congr rfl fun n _ ↦ ?_\n by_cases hn : 1 ≤ n <;> simp only [hn, ↓reduceIte]\n push_neg at hn; interval_cases n; simp\n refine (isEquivalent_iff_tendsto_one ?_).mpr ?_\n · filter_upwards [eventually_ge_atTop 1] with x hx; exact div_ne_zero (by linarith) htot_pos.ne'\n have hlim1 : Tendsto (fun x : ℝ ↦ (∑ n ∈ Iio (⌊x⌋₊ + 1), if n % q = a then Λ n else 0) /\n (⌊x⌋₊ + 1 : ℝ)) atTop (nhds (1 / q.totient)) := by\n have heq : (fun x : ℝ ↦ (∑ n ∈ Iio (⌊x⌋₊ + 1), if n % q = a then Λ n else 0) /\n (⌊x⌋₊ + 1 : ℝ)) = (fun N ↦ (∑ n ∈ Iio N, if n % q = a then Λ n else 0) / N) ∘\n (fun x : ℝ ↦ ⌊x⌋₊ + 1) := by ext x; simp [Function.comp_apply]\n exact heq ▸ hW.comp ((tendsto_add_atTop_nat 1).comp tendsto_nat_floor_atTop)\n have hgoal_eq : (ψ_aq / fun x ↦ x / (q.totient : ℝ)) =\n fun x ↦ ψ_aq x / x * q.totient := by ext x; simp only [Pi.div_apply, div_div_eq_mul_div]; ring\n rw [hgoal_eq, show (1 : ℝ) = 1 / q.totient * 1 * q.totient by field_simp]\n refine Tendsto.mul ?_ tendsto_const_nhds\n have heq' : (fun x ↦ ψ_aq x / x) =ᶠ[atTop]\n fun x ↦ (∑ n ∈ Iio (⌊x⌋₊ + 1), if n % q = a then Λ n else 0) / (⌊x⌋₊ + 1 : ℝ) * ((⌊x⌋₊ + 1 : ℝ) / x) := by\n filter_upwards [eventually_gt_atTop 0] with x hx\n simp only [hψ_eq]; field_simp\n exact Tendsto.congr' heq'.symm (hlim1.mul tendsto_floor_add_one_div_self)\n refine hψ_equiv.add_isLittleO'' (IsBigO.trans_isLittleO (g := fun x ↦ 2 * x.sqrt * x.log) ?_ ?_)\n · rw [isBigO_iff']; refine ⟨1, one_pos, eventually_atTop.mpr ⟨2, fun x hx ↦ ?_⟩⟩\n simp only [Pi.sub_apply, norm_eq_abs, one_mul]\n have hdiff_nonneg : 0 ≤ ψ_aq x - ∑ p ∈ filter Nat.Prime (Iic ⌊x⌋₊), if p % q = a then log p else 0 := by\n simp only [ψ_aq, sub_nonneg]\n calc (∑ p ∈ filter Nat.Prime (Iic ⌊x⌋₊), if p % q = a then log p else (0 : ℝ))\n ≤ ∑ p ∈ filter Nat.Prime (Iic ⌊x⌋₊), if p % q = a then Λ p else (0 : ℝ) :=\n sum_le_sum fun p hp ↦ by split_ifs <;> simp [vonMangoldt_apply_prime (mem_filter.mp hp).2]\n _ ≤ ∑ n ∈ Icc 1 ⌊x⌋₊, if n % q = a then Λ n else (0 : ℝ) :=\n sum_le_sum_of_subset_of_nonneg\n (fun p hp ↦ by simp only [mem_filter, mem_Iic, mem_Icc] at hp ⊢; exact ⟨hp.2.one_lt.le, hp.1⟩)\n (fun n _ _ ↦ by split_ifs <;> [exact vonMangoldt_nonneg; rfl])\n have hdiff_le : ψ_aq x - (∑ p ∈ filter Nat.Prime (Iic ⌊x⌋₊), if p % q = a then log p else (0 : ℝ)) ≤ ψ x - θ x := by\n simp only [ψ_aq, Chebyshev.psi_eq_sum_Icc, Chebyshev.theta_eq_sum_Icc]\n conv_rhs => rw [Icc_zero_eq_insert, sum_insert (by simp : (0 : ℕ) ∉ Icc 1 ⌊x⌋₊),\n show Λ 0 = 0 by simp only [ArithmeticFunction.map_zero], zero_add,\n show filter Nat.Prime (insert 0 (Icc 1 ⌊x⌋₊)) = filter Nat.Prime (Icc 1 ⌊x⌋₊) by\n simp [filter_insert, Nat.not_prime_zero]]\n rw [filter_prime_Iic_eq_Icc, ← sum_filter_add_sum_filter_not (Icc 1 ⌊x⌋₊) Nat.Prime,\n show (∑ p ∈ filter Nat.Prime (Icc 1 ⌊x⌋₊), if p % q = a then log p else (0 : ℝ)) =\n ∑ p ∈ filter Nat.Prime (Icc 1 ⌊x⌋₊), if p % q = a then Λ p else (0 : ℝ) from\n sum_congr rfl fun p hp ↦ by simp only [mem_filter] at hp; split_ifs <;> simp [vonMangoldt_apply_prime hp.2],\n ← sum_filter_add_sum_filter_not (Icc 1 ⌊x⌋₊) Nat.Prime,\n show (∑ p ∈ filter Nat.Prime (Icc 1 ⌊x⌋₊), Λ p) = ∑ p ∈ filter Nat.Prime (Icc 1 ⌊x⌋₊), log p from\n sum_congr rfl fun p hp ↦ vonMangoldt_apply_prime (mem_filter.mp hp).2]\n have h1 : (∑ n ∈ (Icc 1 ⌊x⌋₊).filter (¬Nat.Prime ·), if n % q = a then Λ n else (0 : ℝ)) ≤\n ∑ n ∈ (Icc 1 ⌊x⌋₊).filter (¬Nat.Prime ·), Λ n :=\n sum_le_sum fun n _ ↦ by split_ifs <;> [exact le_refl _; exact vonMangoldt_nonneg]\n linarith\n rw [abs_of_nonneg hdiff_nonneg, abs_of_nonneg (by bound)]\n exact hdiff_le.trans ((le_abs_self _).trans (Chebyshev.abs_psi_sub_theta_le_sqrt_mul_log (by linarith)))\n · simpa only [mul_assoc] using\n (isLittleO_sqrt_mul_log.const_mul_left 2).trans_isTheta (isTheta_self_div_const htot_pos.ne')\n","line":2441,"end_line":2516,"proof_status":"formalized"} {"id":"Chebotarev-cyclic","label":"Chebotarev-cyclic","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WeakPNT-AP","Dedekind-PNT"],"nlp_text":"For any \\(a\\) coprime to \\(m\\), \\[ \\sum _{N \\mathfrak {p} \\leq x; N \\mathfrak {p} = a\\ (m)} \\log N \\mathfrak {p} = \\frac{1}{|G|} \\sum _{N \\mathfrak {p} \\leq x} \\log N \\mathfrak {p}. \\]","doc_url":null,"latex_link":"sect0005.html#Chebotarev-cyclic","lean_link":null,"lean_decl_name":"Chebotarev-cyclic","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"Dedekind-factor","label":"Dedekind-factor","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have \\[ \\zeta _L(s) = \\prod _{\\chi } L(\\chi ,s) \\]","doc_url":null,"latex_link":"sect0002.html#Dedekind-factor","lean_link":null,"lean_decl_name":"Dedekind-factor","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"Dedekind-nonvanishing","label":"Dedekind-nonvanishing","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Dedekind-factor","Dedekind-pole"],"nlp_text":"For any non-principal character \\(\\chi \\) of \\(Gal(K/L)\\), \\(L(\\chi ,s)\\) does not vanish for \\(\\Re (s)=1\\).","doc_url":null,"latex_link":"sect0002.html#Dedekind-nonvanishing","lean_link":null,"lean_decl_name":"Dedekind-nonvanishing","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"Dedekind-PNT","label":"Dedekind-PNT","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Dedekind-nonvanishing"],"nlp_text":"For any non-principal character \\(\\chi \\) of \\(Gal(K/L)\\), \\[ \\sum _{N \\mathfrak {p} \\leq x} \\chi (\\mathfrak {p}) \\log N \\mathfrak {p} = o(x). \\]","doc_url":null,"latex_link":"sect0002.html#Dedekind-PNT","lean_link":null,"lean_decl_name":"Dedekind-PNT","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"bklnw-lemma_15","label":"bklnw-lemma_15","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"Let \\(B_0\\), \\(B\\), and \\(c\\) be positive constants such that \\begin{equation} \\tag {A.27} |(x-\\psi (x))/\\sqrt{x}| ≤ c \\hbox{ for all } B_0 {\\lt} x \\leq B \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_lemma_15","latex_link":"primary-chapter.html#bklnw-lemma_15","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_lemma_15","lean_decl_name":"BKLNW_app.bklnw_lemma_15","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-lemma_15\"\n (title := \"Lemma 15\")\n (statement := /-- Let $B_0$, $B$, and $c$ be positive constants such that\n\\begin{equation}\\tag{A.27}\n|(x-\\psi(x))/\\sqrt{x}| ≤ c \\hbox{ for all } B_0 < x \\leq B\n\\end{equation}\n is known. Furthermore, assume for every $b_0 > 0$ there exists $\\varepsilon(b_0) > 0$ such that\n\\begin{equation}\\tag{A.28}\n|\\psi(x) - x| \\leq \\varepsilon(b_0) x \\quad \\text{for all } x \\geq e^{b_0}.\n\\end{equation}\nLet $b$ be positive such that $e^b \\in (B_0, B]$. Then, for all $x \\geq e^b$ we have\n\\begin{equation}\\tag{A.29}\n\\left|\\frac{\\psi(x) - x}{x}\\right| \\leq \\max (\\frac{c}{e^{\\frac{b}{2}}}, \\varepsilon(\\log B)).\\end{equation} -/)\n (proof := /-- Multiplying both sides of \\eqref{A.27} by $\\frac{1}{\\sqrt{x}}$ gives\n\\[\n\\left|\\frac{\\psi(x) - x}{x}\\right| \\leq \\frac{c}{e^{\\frac{b}{2}}} \\quad \\text{for all } e^b \\leq x \\leq B\n\\]\nas $\\frac{1}{\\sqrt{x}} \\leq \\frac{1}{e^{\\frac{b}{2}}}$. Then, for $x \\geq B$ we apply \\eqref{A.28} with $b_0 = \\log B$. Combining these bounds, we derive \\eqref{A.29}. -/)\n (latexEnv := \"lemma\")\n (discussion := 753)]\ntheorem bklnw_lemma_15 (c B₀ B : ℝ)\n (hbound : ∀ x ∈ Set.Ioc B₀ B, Eψ x ≤ c / sqrt x)\n (ε : ℝ → ℝ)\n (hε : ∀ b₀ > 0, ∀ x ≥ exp b₀, Eψ x ≤ ε b₀)\n (b : ℝ)\n (hb : exp b ∈ Set.Ioc B₀ B) :\n ∀ x ≥ exp b, Eψ x ≤ max (c / exp (b / 2)) (ε (log B)) := by sorry","line":216,"end_line":243,"proof_status":"statement_formalized"} {"id":"fks2-lemma-20a","label":"fks2-lemma-20a","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["li-def"],"nlp_text":"The function \\(\\operatorname {Li}(x) - \\frac{x}{\\log x}\\) is strictly increasing for \\(x {\\gt} 6.58\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_20_a","latex_link":"secondary-chapter.html#fks2-lemma-20a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_20_a","lean_decl_name":"FKS2.lemma_20_a","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" $$ \\varepsilon_{\\pi, num}(x_1) :=\n \\max_{1 \\leq i \\leq M-1}\\varepsilon_{\\pi, num}(\\exp(b'_i), \\exp(b'_{i+1})).$$\n Then $E_\\pi(x) \\leq \\varepsilon_{\\pi,num}(x_1)$ for all $x \\geq x_1$.\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_8 {x₁ : ℝ} (hx₁ : x₁ ≥ 14)\n {M : ℕ} (b' : Fin (M + 1) → EReal) (hmono : Monotone b')\n (h_b_start : b' 0 = log x₁)\n (h_b_end : b' (Fin.last M) = ⊤)\n (εθ_num : ℝ → ℝ)\n (h_εθ_num : Eθ.numericalBound x₁ εθ_num) (x : ℝ) (hx : x ≥ x₁) :\n Eπ x ≤ iSup (fun i : Finset.Iio (Fin.last M) ↦\n επ_num (fun j : Fin (i.val.val+1) ↦ (b' ⟨ j.val, by grind ⟩).toReal)\n εθ_num x₁ (exp (b' i.val).toReal)\n (if (i+1) = Fin.last M then ⊤ else exp (b' (i+1)).toReal)) :=\n","line":572,"end_line":586,"proof_status":"statement_formalized"} {"id":"fks_cor_13","label":"fks_cor_13","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["classical-bound-psi"],"nlp_text":"For all x > 2 we have \\(E_ψ(x) \\leq 121.096 (\\log x/R)^{3/2} \\exp (-2 \\sqrt{\\log x/R})\\) with \\(R = 5.5666305\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.FKS_corollary_1_3","latex_link":"primary-chapter.html#fks_cor_13","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.FKS_corollary_1_3","lean_decl_name":"FKS.FKS_corollary_1_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint \"fks_cor_13\"\n (title := \"FKS1 Corollary 1.3\")\n (statement := /--\n For all x > 2 we have\n $E_ψ(x) \\leq 121.096 (\\log x/R)^{3/2} \\exp(-2 \\sqrt{\\log x/R})$ with $R = 5.5666305$.\n -/)\n (uses := [\"classical-bound-psi\"])\n (latexEnv := \"theorem\")]\ntheorem FKS_corollary_1_3 :\n Eψ.classicalBound 121.096 (3 / 2) 2 5.5666305 2 := sorry\n","line":630,"end_line":639,"proof_status":"formalized"} {"id":"bklnw-thm-1a","label":"bklnw-thm-1a","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-inputs"],"nlp_text":"For any fixed \\(X_0 \\geq 1\\), there exists \\(m_0 {\\gt} 0\\) such that, for all \\(x \\geq X_0\\) \\[ x(1 - m_0) \\leq \\theta (x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.thm_1a","latex_link":"secondary-chapter.html#bklnw-thm-1a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.thm_1a","lean_decl_name":"BKLNW.thm_1a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"noncomputable def Inputs.c3 (I : Inputs) (σ x₀ : ℝ) : ℝ :=\n 2 * exp (-2 * (log x₀ / I.R)^(1/2)) * (log x₀)^2 * I.k σ x₀\n\n@[blueprint\n \"bklnw-eq_A_18\"\n (title := \"Equation (A.18)\")\n (statement := /-- We define\n $$ c_4(\\sigma, x_0) = x_0^{\\sigma - 1} \\left( \\frac{2 \\log x_0}{\\pi R} + 1.8642 \\right) k(\\sigma, x_0). $$\n -/)]\nnoncomputable def Inputs.c4 (I : Inputs) (σ x₀ : ℝ) : ℝ :=\n x₀^(σ - 1:ℝ) * (2 * log x₀ / π / I.R + 1.8642) * I.k σ x₀\n\n@[blueprint\n \"bklnw-eq_A_19\"\n (title := \"Equation (A.19)\")\n (statement := /-- We define\n $$ c_5(\\sigma, x_0) = 8.01 \\cdot c_2(\\sigma) \\exp\\left( -2 \\left( \\frac{\\log x_0}{R} \\right)^{1/2} \\right) \\frac{\\log x_0}{R} k(\\sigma, x_0). $$\n","line":627,"end_line":643,"proof_status":"formalized"} {"id":"Meissel-Mertens-constant","label":"Meissel-Mertens-constant","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["rs-416"],"nlp_text":"\\(B := \\lim _{x \\to \\infty } \\left( \\sum _{p \\leq x} \\frac{1}{p} - \\log \\log x \\right)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/meisselMertensConstant","latex_link":"secondary-chapter.html#Meissel-Mertens-constant","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/meisselMertensConstant","lean_decl_name":"meisselMertensConstant","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"noncomputable def meisselMertensConstant : ℝ :=\n lim (Filter.atTop.comap (fun x : ℝ ↦ ∑ p ∈ Finset.filter Nat.Prime (Finset.range ⌊x⌋₊), 1 / p - log (log x)))\n\n","line":92,"end_line":94,"proof_status":"formalized"} {"id":"Dusart_thm_5_6","label":"Dusart_thm_5_6","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Meissel-Mertens-constant"],"nlp_text":"We have for \\(x \\geq 2278383\\), \\[ \\sum _{p \\leq x} \\frac{1}{p} = \\log \\log x + M + O^*\\Bigl(\\frac{0.2}{\\log ^3 x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_6","latex_link":"secondary-chapter.html#Dusart_thm_5_6","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_6","lean_decl_name":"Dusart.theorem_5_6","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_thm_5_6\"\n (title := \"Dusart Theorem 5.6\")\n (statement := /--\n We have for $x \\geq 2278383$,\n \\[\n \\sum_{p \\leq x} \\frac{1}{p} = \\log \\log x + M + O^*\\Bigl(\\frac{0.2}{\\log^3 x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem theorem_5_6 {x : ℝ} (hx : x ≥ 2278383) : ∃ E,\n ( (∑ p ∈ Finset.filter Prime (Finset.range (⌊x⌋₊ + 1)), 1 / p) = log (log x) + meisselMertensConstant + E ∧ |E| ≤ 0.2 / (log x) ^ 3 ) := by sorry\n","line":354,"end_line":364,"proof_status":"formalized"} {"id":"rs-419","label":"rs-419","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Meissel-Mertens-constant","rs-415","rs-pnt"],"nlp_text":"\\[ \\sum _{p \\leq x} \\frac{1}{p} = \\log \\log x + B + \\frac{\\vartheta (x) - x}{x \\log x} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.mertens_second_theorem","latex_link":"secondary-chapter.html#rs-419","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.mertens_second_theorem","lean_decl_name":"RS_prime.mertens_second_theorem","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"@[blueprint\n \"rs-419\"]\ntheorem mertens_second_theorem : Filter.atTop.Tendsto (fun x : ℝ ↦\n ∑ p ∈ filter Nat.Prime (Iic ⌊x⌋₊), 1 / (p : ℝ) - log (log x)) (𝓝 meisselMertensConstant) := by\n have lem : ∀ᶠ x in atTop, meisselMertensConstant + ((θ x - x) / (x * log x) +\n ∫ y in Set.Ioi x, (θ y - y) * deriv (fun s ↦ 1 / s / Real.log s) y) =\n ∑ p ∈ filter Nat.Prime (Iic ⌊x⌋₊), 1 / (p : ℝ) - log (log x):= by\n filter_upwards [Ici_mem_atTop 2] with y hy\n rw [meisselMertensConstant_identity hy]\n ring\n rw [← add_zero meisselMertensConstant, ← add_zero 0]\n refine (tendsto_const_nhds.add (Tendsto.add ?_\n (ioiIntegral_tendsto_zero 2 integrableOn_deriv_inv.1 tendsto_id))).congr' lem\n · obtain ⟨C, hC⟩ := pnt\n refine squeeze_zero_norm' (a := fun x => C / Real.log x ^ 3) ?_ ?_\n · filter_upwards [Ici_mem_atTop 2] with y hy\n have h1 {y : ℝ} (hy : y ∈ Set.Ici 2) : 0 < y := by grind\n have h2 {y : ℝ} (hy : y ∈ Set.Ici 2) : 0 ≤ log y := log_nonneg (by grind)\n simp only [norm_div, norm_mul, norm_of_nonneg (h1 hy).le, norm_eq_abs, norm_of_nonneg (h2 hy)]\n grw [hC.2 y hy]\n · rw [div_right_comm, ← div_div, mul_div_cancel_right₀ _ (by grind)]; field_simp; rfl\n · exact mul_nonneg (h1 hy).le (h2 hy)\n · exact ((tendsto_pow_atTop (by linarith : 3 ≠ 0)).comp tendsto_log_atTop).const_div_atTop C","line":357,"end_line":379,"proof_status":"formalized"} {"id":"fks2-eq-9","label":"fks2-eq-9","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def","Etheta-def","fks2-eq-19"],"nlp_text":"For \\(x_0,x_1 {\\gt} 0\\), we define \\[ \\mu _{asymp}(x_0,x_1) := \\frac{x_0 \\log (x_1)}{\\epsilon _{\\theta ,asymp}(x_1) x_1 \\log (x_0)} \\left|\\frac{\\pi (x_0) - \\operatorname {Li}(x_0)}{x_0/\\log x_0} - \\frac{\\theta (x_0) - x_0}{x_0}\\right| + \\frac{2D_+(\\sqrt{\\log (x_1)} - \\frac{C}{2\\sqrt{R}}}{\\sqrt{\\log x_1}} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.μ_asymp","latex_link":"secondary-chapter.html#fks2-eq-9","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.μ_asymp","lean_decl_name":"FKS2.μ_asymp","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" bound for $E_\\diamond(x)$ if $E_\\diamond(x) \\leq ε_{\\diamond,num}(x_0)$ for all $x \\geq x_0$. -/)]\ndef _root_.Eπ.numericalBound (x₀ : ℝ) (ε : ℝ → ℝ) : Prop := ∀ x ≥ x₀, Eπ x ≤ (ε x₀)\n\ndef _root_.Eθ.numericalBound (x₀ : ℝ) (ε : ℝ → ℝ) : Prop := ∀ x ≥ x₀, Eθ x ≤ (ε x₀)\n\nnoncomputable def μ_num_1 {N : ℕ} (b : Fin (N + 1) → ℝ) (εθ_num : ℝ → ℝ) (x₀ x₁ x₂ : ℝ) : ℝ :=\n (x₀ * log x₁) / (εθ_num x₁ * x₁ * log x₀) * |Eπ x₀ - Eθ x₀| +\n (log x₁) / (εθ_num x₁ * x₁) *\n (∑ i ∈ Finset.Iio (Fin.last N), εθ_num (exp (b i)) *\n (Li (exp (b (i + 1))) - Li (exp (b i)) +\n exp (b i) / b i - exp (b (i + 1)) / b (i + 1))) +\n (log x₂) / x₂ * (Li x₂ - x₂ / log x₂ - Li x₁ + x₁ / log x₁)\n","line":335,"end_line":346,"proof_status":"formalized"} {"id":"fks2-corollary-21","label":"fks2-corollary-21","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-eq-9","classical-bound-pi","bklnw-def-a-2","bklnw-def-a-1","bklnw-inputs","classical-bound-psi"],"nlp_text":"Let \\(B \\geq \\max (\\frac{3}{2}, 1 + \\frac{C^2}{16R})\\). Let \\(x_0, x_1 {\\gt} 0\\) with \\(x_1 \\geq \\max (x_0, \\exp ( (1 + \\frac{C}{2\\sqrt{R}})^2))\\). If \\(E_\\psi \\) satisfies an admissible classical bound with parameters \\(A_\\psi ,B,C,R,x_0\\), then \\(E_\\pi \\) satisfies an admissible classical bound with \\(A_\\pi , B, C, R, x_1\\), where \\[ A_\\pi = (1 + \\nu _{asymp}(x_0)) (1 + \\mu _{asymp}(x_0, x_1)) A_\\psi \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_21","latex_link":"secondary-chapter.html#fks2-corollary-21","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_21","lean_decl_name":"FKS2.corollary_21","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-corollary-21\"\n (title := \"FKS2 Corollary 21\")\n (statement := /--\n Let $B \\geq \\max(\\frac{3}{2}, 1 + \\frac{C^2}{16R})$. Let $x_0, x_1 > 0$ with\n $x_1 \\geq \\max(x_0, \\exp( (1 + \\frac{C}{2\\sqrt{R}})^2))$. If $E_\\psi$ satisfies an admissible\n classical bound with parameters $A_\\psi,B,C,R,x_0$, then $E_\\pi$ satisfies an admissible\n classical bound with $A_\\pi, B, C, R, x_1$, where\n $$ A_\\pi = (1 + \\nu_{asymp}(x_0)) (1 + \\mu_{asymp}(x_0, x_1)) A_\\psi$$\n for all $x \\geq x_0$, where\n $$ |E_\\theta(x)| \\leq \\varepsilon_{\\theta,asymp}(x) :=\n A (1 + \\mu_{asymp}(x_0,x)) \\exp(-C \\sqrt{\\frac{\\log x}{R}})$$\n where\n $$ \\nu_{asymp}(x_0) = \\frac{1}{A_\\psi} (\\frac{R}{\\log x_0})^B\n \\exp(C \\sqrt{\\frac{\\log x_0}{R}}) (a_1 (\\log x_0) x_0^{-1/2} + a_2 (\\log x_0) x_0^{-2/3})$$\n and\n $$ \\mu_{asymp}(x_0,x_1) = \\frac{x_0 \\log x_1}{\\eps_{\\theta,asymp}(x_1)x_1 \\log x_0}\n |E_\\pi(x_0) - E_\\theta(x_0)| + \\frac{2 D_+(\\sqrt{\\log x} - \\frac{C}{2\\sqrt{R}})}\n {\\sqrt{\\log x_1}}.$$\n -/)\n (proof := /-- This follows by applying Theorem \\ref{fks2-theorem-3} with Proposition \\ref{fks2-proposition-13}.-/)\n (latexEnv := \"corollary\")\n (discussion := 720)]\ntheorem corollary_21\n (Aψ B C R x₀ x₁ : ℝ)\n (hB : B ≥ max (3 / 2) (1 + C ^ 2 / (16 * R)))\n (hx0 : x₀ > 0)\n (hx1 : x₁ ≥ max x₀ (exp ((1 + C / (2 * sqrt R)) ^ 2)))\n (hEψ : Eψ.classicalBound Aψ B C R x₀) :\n let Aθ := Aψ * (1 + ν_asymp Aψ B C R x₀)\n Eπ.classicalBound (Aθ * (1 + (μ_asymp Aθ B C R x₀ x₁))) B C R x₁ :=\n sorry","line":745,"end_line":776,"proof_status":"statement_formalized"} {"id":"fks2-theorem-3","label":"fks2-theorem-3","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-eq-9","classical-bound-pi","classical-bound-theta"],"nlp_text":"If \\(B \\geq \\max (3/2, 1 + C^2/16 R)\\), \\(x_0 {\\gt} 0\\), and one has an admissible asymptotic bound with parameters \\(A,B,C,x_0\\) for \\(E_\\theta \\), and \\[ x_1 \\geq \\max ( x_0, \\exp ( (1 + \\frac{C}{2\\sqrt{R}}))^2), \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_3","latex_link":"secondary-chapter.html#fks2-theorem-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_3","lean_decl_name":"FKS2.theorem_3","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" and finally when $x \\geq 10^{95}$,\n $$\\psi(x^{1/2}) + \\psi(x^{1/3}) + \\psi(x^{1/5}) \\leq 1.00000002(x^{1/2} + x^{1/3} + x^{1/5}).$$\n The result follows by combining the worst coefficients from all cases and dividing by $x$. -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_17 {x x₀ : ℝ} (hx : x > x₀) (hx₀ : x₀ > 2) (εψ : ℝ → ℝ)\n (hEψ : Eψ x ≤ εψ x₀) :\n -εθ_from_εψ εψ x₀ ≤ (θ x - x) / x ∧ (θ x - x) / x ≤ εψ x₀ ∧\n εψ x₀ ≤ εθ_from_εψ εψ x₀ := by sorry\n\n@[blueprint\n \"fks2-lemma-19\"\n (title := \"FKS2 Lemma 19\")\n (statement := /--\n Let $x_1 > x_0 \\geq 2$, $N \\in \\N$, and let $(b_i)_{i=1}^N$ be a finite partition of\n $[x_0,x_1]$. Then\n $$ |\\int_{x_0}^{x_1} \\frac{\\theta(t)-t}{t \\log^2 t}\\ dt|\n \\leq \\sum_{i=1}^{N-1} \\eps_{\\theta,num}(e^{b_i})\n ( \\Li(e^{b_{i+1}}) - \\Li(e^{b_i}) + \\frac{e^{b_i}}{b_i} - \\frac{e^{b_{i+1}}}{b_{i+1}}).$$ -/)\n (latexEnv := \"lemma\")]\ntheorem lemma_19 {x₀ x₁ : ℝ} (hx₁ : x₁ > x₀) (hx₀ : x₀ ≥ 2)\n {N : ℕ} (b : Fin (N + 1) → ℝ) (hmono : Monotone b)\n (h_b_start : b 0 = log x₀)\n (h_b_end : b (Fin.last N) = log x₁)\n (εθ_num : ℝ → ℝ)\n (h_εθ_num : Eθ.numericalBound x₁ εθ_num) :\n |∫ t in x₀..x₁, (θ t - t) / (t * log t ^ 2)| ≤\n ∑ i ∈ Finset.Iio (Fin.last N),\n εθ_num (exp (b i)) *\n (Li (exp (b (i + 1))) - Li (exp (b i)) +\n exp (b i) / b i - exp (b (i + 1)) / b (i + 1)) :=\n sorry\n\n@[blueprint\n \"fks2-lemma-20\"]\ntheorem lemma_20_a : StrictAntiOn (fun x ↦ Li x - x / log x) (Set.Ioi 6.58) := sorry\n","line":466,"end_line":500,"proof_status":"statement_formalized"} {"id":"ZetaInvBnd","label":"ZetaInvBnd","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaInvBound2","Zeta_diff_Bnd"],"nlp_text":"For any \\(A{\\gt}0\\) sufficiently small, there is a constant \\(C{\\gt}0\\) so that whenever \\(1- A / \\log ^9 |t| \\le \\sigma {\\lt} 1+A/\\log ^9 |t|\\) and \\(3 {\\lt} |t|\\), we have that: \\[ 1/|\\zeta (\\sigma +it)| \\le C \\log ^7 |t|. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaInvBnd","latex_link":"sect0003.html#ZetaInvBnd","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaInvBnd","lean_decl_name":"ZetaInvBnd","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaInvBnd\")\n (statement := /--\n For any $A>0$ sufficiently small, there is a constant $C>0$ so that\n whenever $1- A / \\log^9 |t| \\le \\sigma < 1+A/\\log^9 |t|$ and $3 < |t|$, we have that:\n $$\n 1/|\\zeta(\\sigma+it)| \\le C \\log^7 |t|.\n $$\n -/)\n (proof := /--\n Let $\\sigma$ be given in the prescribed range, and set $\\sigma' := 1+ A / \\log^9 |t|$.\n Then\n $$\n |\\zeta(\\sigma+it)| \\ge\n |\\zeta(\\sigma'+it)| - |\\zeta(\\sigma+it) - \\zeta(\\sigma'+it)|\n \\ge\n C (\\sigma'-1)^{3/4}\\log |t|^{-1/4} - C \\log^2 |t| (\\sigma'-\\sigma)\n $$\n $$\n \\ge\n C A^{3/4} \\log |t|^{-7} - C \\log^2 |t| (2 A / \\log^9 |t|),\n $$\n where we used Lemma \\ref{ZetaInvBound2} and Lemma \\ref{Zeta_diff_Bnd}.\n Now by making $A$ sufficiently small (in particular, something like $A = 1/16$ should work), we can guarantee that\n $$\n |\\zeta(\\sigma+it)| \\ge \\frac C 2 (\\log |t|)^{-7},\n $$\n as desired.\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaInvBnd :\n ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|)\n (_ : σ ∈ Ico (1 - A / (Real.log |t|) ^ 9) (1 + A / (Real.log |t|) ^ 9)),\n 1 / ‖ζ (σ + t * I)‖ ≤ C * (Real.log |t|) ^ (7 : ℝ) := by\n obtain ⟨C', C'pos, hC₁⟩ := ZetaInvBound2\n obtain ⟨A', hA', C₂, C₂pos, hC₂⟩ := Zeta_diff_Bnd\n set C₁ := 1 / C'\n let A := min A' <| (1 / 2 : ℝ) * (C₁ / (C₂ * 2)) ^ (4 : ℝ)\n have Apos : 0 < A := by have := hA'.1; positivity\n have Ale : A ≤ 1 / 2 := by dsimp only [A]; apply min_le_iff.mpr; left; exact hA'.2\n set C := (C₁ * A ^ (3 / 4 : ℝ) - C₂ * 2 * A)⁻¹\n have Cpos : 0 < C := by\n refine ZetaInvBnd_aux2 (by positivity) (by positivity) (by positivity) ?_\n apply min_le_right\n refine ⟨A, ⟨Apos, by linarith [hA'.2]⟩ , C, Cpos, ?_⟩\n intro σ t t_gt hσ\n have logt_gt_one := logt_gt_one t_gt.le\n have σ_ge : 1 - A / Real.log |t| ≤ σ := by\n apply le_trans ?_ hσ.1\n suffices A / Real.log |t| ^ 9 ≤ A / Real.log |t| by linarith\n exact div_le_div₀ Apos.le (by rfl) (by positivity) <| ZetaInvBnd_aux logt_gt_one\n obtain ⟨_, _, neOne⟩ := UpperBnd_aux ⟨Apos, Ale⟩ t_gt σ_ge\n set σ' := 1 + A / Real.log |t| ^ 9\n have σ'_gt : 1 < σ' := by simp only [σ', lt_add_iff_pos_right]; positivity\n have σ'_le : σ' ≤ 2 := by\n simp only [σ']\n suffices A / Real.log |t| ^ 9 < 1 by linarith\n apply div_lt_one (by positivity) |>.mpr\n exact lt_trans₄ (by linarith) logt_gt_one <| ZetaInvBnd_aux' logt_gt_one\n set s := σ + t * I\n set s' := σ' + t * I\n by_cases h0 : ‖ζ s‖ ≠ 0\n swap\n · simp only [ne_eq, not_not] at h0; simp only [h0, div_zero]; positivity\n apply div_le_iff₀ (by positivity) |>.mpr <| div_le_iff₀' (by positivity) |>.mp ?_\n have pos_aux : 0 < (σ' - 1) := by linarith\n calc\n _ ≥ ‖ζ s'‖ - ‖ζ s - ζ s'‖ := ?_\n _ ≥ C₁ * (σ' - 1) ^ ((3 : ℝ)/ 4) * Real.log |t| ^ ((-1 : ℝ)/ 4) - C₂ * Real.log |t| ^ 2 * (σ' - σ) := ?_\n _ ≥ C₁ * (A / Real.log |t| ^ (9 : ℝ)) ^ ((3 : ℝ)/ 4) * Real.log |t| ^ ((-1 : ℝ)/ 4) - C₂ * Real.log |t| ^ (2 : ℝ) * 2 * A / Real.log |t| ^ (9 : ℝ) := ?_\n _ ≥ C₁ * A ^ ((3 : ℝ)/ 4) * Real.log |t| ^ (-7 : ℝ) - C₂ * 2 * A * Real.log |t| ^ (-7 : ℝ) := ?_\n _ = (C₁ * A ^ ((3 : ℝ)/ 4) - C₂ * 2 * A) * Real.log |t| ^ (-7 : ℝ) := by ring\n _ ≥ _ := ?_\n · apply ge_iff_le.mpr\n convert norm_sub_norm_le (a := ζ s') (b := ζ s' - ζ s) using 1\n · rw [(by simp : ζ s' - ζ s = -(ζ s - ζ s'))]; simp only [norm_neg]\n · simp\n · apply sub_le_sub\n · have := one_div_le ?_ (by positivity) |>.mp <| hC₁ ⟨σ'_gt, σ'_le⟩ t t_gt\n · convert this using 1\n rw [one_div, mul_inv_rev, mul_comm, mul_inv_rev, mul_comm _ C'⁻¹]\n simp only [one_div C', C₁]\n congr <;> (rw [← Real.rpow_neg (by linarith), neg_div]); rw [neg_neg]\n · apply norm_pos_iff.mpr <| riemannZeta_ne_zero_of_one_lt_re (by simp [σ'_gt])\n · rw [(by simp : ζ s - ζ s' = -(ζ s' - ζ s)), norm_neg]\n refine hC₂ σ σ' t t_gt ?_ σ'_le <| by rw [Set.mem_Ico] at hσ; exact hσ.2\n apply le_trans ?_ hσ.1\n rw [tsub_le_iff_right, ← add_sub_right_comm, le_sub_iff_add_le, add_le_add_iff_left]\n exact div_le_div₀ hA'.1.le (by simp [A]) (by positivity) <| ZetaInvBnd_aux logt_gt_one\n · apply sub_le_sub (by simp only [add_sub_cancel_left, σ']; exact_mod_cast le_rfl) ?_\n rw [mul_div_assoc, mul_assoc _ 2 _]\n apply mul_le_mul (by exact_mod_cast le_rfl) ?_ (by linarith [hσ.2]) (by positivity)\n suffices h : σ' + (1 - A / Real.log |t| ^ 9) ≤ (1 + A / Real.log |t| ^ 9) + σ by\n simp only [tsub_le_iff_right]\n convert le_sub_right_of_add_le h using 1; ring_nf; norm_cast; simp\n exact add_le_add (by linarith) (by linarith [hσ.1])\n · simp_rw [tsub_le_iff_right, div_eq_mul_inv _ (Real.log |t| ^ (9 : ℝ))]\n rw [← Real.rpow_neg (by positivity), Real.mul_rpow (by positivity) (by positivity)]\n rw [← Real.rpow_mul (by positivity)]\n ring_nf\n conv => rhs; lhs; rw [mul_assoc, ← Real.rpow_add (by positivity)]\n conv => rhs; rhs; rhs; rw [mul_comm _ A]; lhs; rw [mul_assoc, mul_assoc C₂]\n rw [← Real.rpow_add (by positivity)]; norm_num; group; exact le_rfl\n · apply div_le_iff₀ (by positivity) |>.mpr\n conv => rw [mul_assoc]; rhs; rhs; rw [mul_comm C, ← mul_assoc, ← Real.rpow_add (by positivity)]\n have := inv_inv C ▸ mul_inv_cancel₀ (a := C⁻¹) (by positivity) |>.symm.le\n simpa [C] using this\n","line":2886,"end_line":2992,"proof_status":"formalized"} {"id":"LogDerivZetaBnd","label":"LogDerivZetaBnd","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaInvBnd"],"nlp_text":"There is an \\(A{\\gt}0\\) so that for \\(1-A/\\log ^9 |t| \\le \\sigma {\\lt} 1+A/\\log ^9 |t|\\) and \\(3 {\\lt} |t|\\), \\[ |\\frac{\\zeta '}{\\zeta } (\\sigma +it)| \\ll \\log ^9 |t|. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaBnd","latex_link":"sect0003.html#LogDerivZetaBnd","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaBnd","lean_decl_name":"LogDerivZetaBnd","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"LogDerivZetaBnd\")\n (statement := /--\n There is an $A>0$ so that for $1-A/\\log^9 |t| \\le \\sigma < 1+A/\\log^9 |t|$ and $3 < |t|$,\n $$\n |\\frac {\\zeta'}{\\zeta} (\\sigma+it)| \\ll \\log^9 |t|.\n $$\n -/)\n (proof := /--\n Combine the bound on $|\\zeta'|$ from Lemma \\ref{ZetaDerivUpperBnd} with the\n bound on $1/|\\zeta|$ from Lemma \\ref{ZetaInvBnd}.\n -/)\n (latexEnv := \"lemma\")]\nlemma LogDerivZetaBnd :\n ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|)\n (_ : σ ∈ Ico (1 - A / Real.log |t| ^ 9) (1 + A / Real.log |t| ^ 9)), ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤\n C * Real.log |t| ^ 9 := by\n obtain ⟨A, hA, C, hC, h⟩ := ZetaInvBnd\n obtain ⟨A', hA', C', hC', h'⟩ := ZetaDerivUpperBnd\n use min A A', ⟨lt_min hA.1 hA'.1, min_le_of_right_le hA'.2⟩, C * C', mul_pos hC hC'\n intro σ t t_gt ⟨σ_ge, σ_lt⟩\n have logt_gt : (1 : ℝ) < Real.log |t| := logt_gt_one t_gt.le\n have σ_ge' : 1 - A / Real.log |t| ^ 9 ≤ σ := by\n apply le_trans (tsub_le_tsub_left ?_ 1) σ_ge\n apply div_le_div_of_nonneg_right (min_le_left A A')\n exact pow_nonneg (zero_le_one.trans logt_gt.le) _\n have σ_ge'' : 1 - A' / Real.log |t| ≤ σ := by\n apply le_trans (tsub_le_tsub_left ?_ 1) σ_ge\n apply div_le_div₀ hA'.1.le (min_le_right A A') (lt_trans (by norm_num) logt_gt) ?_\n exact le_self_pow₀ logt_gt.le (by norm_num)\n replace h := h σ t t_gt ⟨σ_ge', by calc\n σ < 1 + min A A' / Real.log |t| ^ 9 := σ_lt\n _ ≤ 1 + A / Real.log |t| ^ 9 := by gcongr; simp⟩\n replace h' := h' σ t t_gt ⟨σ_ge'', by\n calc\n σ ≤ 1 + min A A' / Real.log |t| ^ 9 := by linarith [σ_lt]\n\n _ ≤ 1 + (1/2) / Real.log |t| ^ 9 := by gcongr; simp [Set.mem_Ioc] at hA' hA ⊢ ; simp [hA.2]\n\n _ ≤ 1 + (1/2) / 1 := by\n gcongr\n calc\n 1 ≤ Real.log |t| := by linarith\n _ ≤ (Real.log |t|)^9 := Real.self_le_rpow_of_one_le (by linarith) (by linarith)\n norm_cast\n\n _ ≤ 2 := by linarith\n ⟩\n simp only [norm_div]\n convert mul_le_mul h h' (by simp) ?_ using 1 <;> (norm_cast; ring_nf); positivity\n","line":3182,"end_line":3231,"proof_status":"formalized"} {"id":"LogDerivZetaBndUnif","label":"LogDerivZetaBndUnif","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["LogDerivZetaBnd","riemannZetaLogDerivResidue"],"nlp_text":"There exist \\(A, C {\\gt} 0\\) such that \\[ |\\frac{\\zeta '}{\\zeta }(\\sigma + it)|\\leq C \\log |t|^9 \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaBndUnif","latex_link":"sect0003.html#LogDerivZetaBndUnif","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaBndUnif","lean_decl_name":"LogDerivZetaBndUnif","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"LogDerivZetaBndUnif\")\n (statement := /--\n There exist $A, C > 0$ such that\n $$|\\frac{\\zeta'}{\\zeta}(\\sigma + it)|\\leq C \\log |t|^9$$\n whenever $|t|>3$ and $\\sigma > 1 - A/\\log |t|^9$.\n -/)\n (proof := /--\n For $\\sigma$ close to $1$ use Lemma \\ref{LogDerivZetaBnd}, otherwise estimate trivially.\n -/)\n (latexEnv := \"lemma\")]\nlemma LogDerivZetaBndUnif :\n ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ : ℝ) (t : ℝ) (_ : 3 < |t|)\n (_ : σ ∈ Ici (1 - A / Real.log |t| ^ 9)), ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤\n C * Real.log |t| ^ 9 := by\n let ⟨A, pf_A, C, C_pos, ζbd_in⟩ := LogDerivZetaBnd\n let ⟨C_triv, ⟨pf_C_triv, ζbd_out⟩⟩ := triv_bound_zeta\n have T0 : A > 0 := pf_A.1\n\n have ha : 1 ≤ A⁻¹ := by\n simp only [one_div, mem_Ioc, true_and, T0] at pf_A\n have U := (inv_le_inv₀ (by positivity) (by positivity)).mpr pf_A\n simp only [inv_inv] at U\n linarith\n\n refine ⟨A, pf_A, ((1 + C + C_triv) * A⁻¹), (by positivity), fun σ t hyp_t hyp_σ ↦ ?_⟩\n have logt_gt' : (1 : ℝ) < Real.log |t| ^ 9 := by\n calc\n 1 < Real.log |t| := logt_gt_one hyp_t.le\n _ ≤ (Real.log |t|) ^ 9 := ZetaInvBnd_aux (logt_gt_one hyp_t.le)\n\n have logt_gt'' : (1 : ℝ) < 1 + A / Real.log |t| ^ 9 := by\n simp only [lt_add_iff_pos_right, div_pos_iff_of_pos_left, T0]\n positivity\n\n have T1 : ∀⦃σ : ℝ⦄, 1 + A / Real.log |t| ^ 9 ≤ σ → 1 < σ := by\n intros\n linarith\n\n have T2 : ∀⦃σ : ℝ⦄, 1 + A / Real.log |t| ^ 9 ≤ σ → A / Real.log |t| ^ 9 ≤ σ - 1 := by\n intro σ'\n intro hyp_σ'\n calc\n A / Real.log |t| ^ 9 = (1 + A / Real.log |t| ^ 9) - 1 := by ring_nf\n _ ≤ σ' - 1 := by gcongr\n\n\n by_cases h : σ ∈ Ico (1 - A / Real.log |t| ^ 9) (1 + A / Real.log |t| ^ 9)\n · calc\n ‖ζ' (↑σ + ↑t * I) / ζ (↑σ + ↑t * I)‖ ≤ C * Real.log |t| ^ 9 := ζbd_in σ t hyp_t h\n _ ≤ ((1 + C + C_triv) * A⁻¹) * Real.log |t| ^ 9 := by\n gcongr\n · calc\n C ≤ 1 + C := by simp only [le_add_iff_nonneg_left, zero_le_one]\n _ ≤ (1 + C + C_triv) * 1 := by simp only [mul_one, le_add_iff_nonneg_right]; positivity\n _ ≤ (1 + C + C_triv) * A⁻¹ := by gcongr\n\n · simp only [mem_Ico, tsub_le_iff_right, not_and, not_lt, mem_Ici] at h hyp_σ\n replace h := h hyp_σ\n calc\n ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ = ‖-ζ' (σ + t * I) / ζ (σ + t * I)‖ := by simp only [Complex.norm_div,\n norm_neg]\n\n _ ≤ (σ - 1)⁻¹ + C_triv := ζbd_out σ t (by exact T1 h)\n\n _ ≤ (A / Real.log |t| ^ 9)⁻¹ + C_triv := by\n gcongr\n · exact T2 h\n\n _ ≤ (A / Real.log |t| ^ 9)⁻¹ + C_triv * A⁻¹ := by\n gcongr\n exact le_mul_of_one_le_right pf_C_triv ha\n\n _ ≤ (1 + C_triv) * A⁻¹ * Real.log |t| ^ 9 := by\n simp only [inv_div]\n ring_nf\n gcongr\n · simp only [inv_pos, le_mul_iff_one_le_left, T0]\n linarith\n\n","line":3774,"end_line":3853,"proof_status":"formalized"} {"id":"initial-score-bound","label":"initial-score-bound","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","score-def"],"nlp_text":"The initial score is bounded by \\[ n \\log (1-1/M)^{-1} + \\sum _{p \\leq n/L} M \\log n + \\sum _{p \\leq \\sqrt{n}} M \\log ^2 n / \\log 2 + \\sum _{n/L {\\lt} p \\leq n} \\frac{n}{p} \\log \\frac{n}{p} + \\sum _{p \\leq L} (M \\log n + M L \\pi (n)) \\log L. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.score_bound","latex_link":"tertiary-chapter.html#initial-score-bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.score_bound","lean_decl_name":"Erdos392.Params.initial.score_bound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-score-bound\"\n (statement := /-- The initial score is bounded by\n $$ n \\log(1-1/M)^{-1} + \\sum_{p \\leq n/L} M \\log n + \\sum_{p \\leq \\sqrt{n}} M \\log^2 n / \\log 2\n + \\sum_{n/L < p \\leq n} \\frac{n}{p} \\log \\frac{n}{p}\n + \\sum_{p \\leq L} (M \\log n + M L \\pi(n)) \\log L.$$ -/)\n (latexEnv := \"proposition\")\n (proof := /-- Combine Lemma \\ref{initial-factorization-waste},\n Sublemma \\ref{initial-factorization-large-prime-le},\n Sublemma \\ref{initial-factorization-large-prime-ge},\n Sublemma \\ref{initial-factorization-medium-prime-le},\n Sublemma \\ref{initial-factorization-medium-prime-ge},\n Sublemma \\ref{initial-factorization-small-prime-le},\n Sublemma \\ref{initial-factorization-small-prime-ge}, and\n Sublemma \\ref{initial-factorization-tiny-prime-ge}, and combine $\\log p$ and $\\log (n/p)$ to $\\log n$.-/)\n (discussion := 665)]\ntheorem Params.initial.score_bound (P : Params) :\n P.initial.score P.L ≤ P.n * log (1 - 1 / (P.M : ℝ))⁻¹ +\n ∑ p ∈ Finset.filter (·.Prime) (Finset.Iic (P.n / P.L)), P.M * Real.log P.n +\n ∑ p ∈ Finset.filter (·.Prime) (Finset.Iic ⌊(Real.sqrt P.n)⌋₊),\n P.M * Real.log P.n * Real.log P.n / Real.log 2 +\n ∑ p ∈ Finset.filter (·.Prime) (Finset.Icc (P.n / P.L + 1) P.n),\n (P.n / p) * Real.log (P.n / p) +\n ∑ p ∈ Finset.filter (·.Prime) (Finset.Iic P.L),\n (P.M * Real.log P.n + P.M * P.L^2 * primeCounting P.n) * Real.log P.L := by sorry","line":1865,"end_line":1889,"proof_status":"statement_formalized"} {"id":"initial-score","label":"initial-score","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-score-bound","bound-score-4","bound-score-2","bound-score-3","bound-score-1","bound-score-5"],"nlp_text":"The score of the initial factorization can be taken to be \\(o(n)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.score","latex_link":"tertiary-chapter.html#initial-score","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.score","lean_decl_name":"Erdos392.Params.initial.score","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"score-def\"\n (statement := /--\n The score of a factorization (relative to a cutoff parameter $L$) is equal to its waste,\n plus $\\log p$ for every surplus prime $p$, $\\log (n/p)$ for every deficit prime above $L$,\n $\\log L$ for every deficit prime below $L$ and an additional $\\log n$ if one is not in\n total balance.\n -/)]\nnoncomputable def Factorization.score {n : ℕ} (f : Factorization n) (L : ℕ) : ℝ :=\n f.waste\n + (if f.total_imbalance > 0 then Real.log n else 0)\n + ∑ p ∈ (n+1).primesBelow,\n if f.balance p > 0 then (f.balance p) * (Real.log p)\n else if p ≤ L then (-f.balance p) * (Real.log L)\n else (-f.balance p) * (Real.log (n/p))\n","line":117,"end_line":131,"proof_status":"formalized"} {"id":"erdos-sol-1","label":"erdos-sol-1","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-score","card-bound"],"nlp_text":"One can find a balanced factorization of \\(n!\\) with cardinality at most \\(n - n / \\log n + o(n / \\log n)\\).-","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Solution_1","latex_link":"tertiary-chapter.html#erdos-sol-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Solution_1","lean_decl_name":"Erdos392.Solution_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"erdos-sol-1\"\n (statement := /-- One can find a balanced factorization of $n!$ with cardinality at most\n $n - n / \\log n + o(n / \\log n)$.--/)\n (proof := /-- Combine Proposition \\ref{initial-score} with Proposition \\ref{card-bound} and\n the Stirling approximation.-/)\n (latexEnv := \"theorem\")\n (discussion := 648)]\ntheorem Solution_1 (ε : ℝ) (hε : ε > 0) : ∀ᶠ n in .atTop, ∃ f : Factorization n,\n f.total_imbalance = 0 ∧ f.a.card ≤ n - n / Real.log n + ε * n / Real.log n := by\n have h_stirling : ∀ᶠ n : ℕ in .atTop, log (n ! : ℝ) ≤ n * Real.log n - n + (ε / 4) * n := by\n have h_ratio : Filter.Tendsto (fun n : ℕ ↦ (n ! : ℝ) / (sqrt (2 * n * π) * (n / exp 1) ^ n)) .atTop (nhds 1) := by\n have h := Stirling.factorial_isEquivalent_stirling\n rw [isEquivalent_iff_tendsto_one] at h\n · exact h\n · filter_upwards [Filter.eventually_gt_atTop 0] with n hn; positivity\n have h_ratio_le : ∀ᶠ n : ℕ in .atTop,\n (n ! : ℝ) / (sqrt (2 * n * π) * (n / exp 1) ^ n) ≤ 2 :=\n h_ratio.eventually (Metric.ball_mem_nhds 1 one_pos) |>.mono fun n hn ↦ by\n simp only [Real.dist_eq] at hn; linarith [abs_sub_lt_iff.mp hn]\n have h_log_o := isLittleO_log_id_atTop.def (by linarith : (0 : ℝ) < ε / 16)\n have h_const : ∀ᶠ n : ℕ in .atTop, Real.log 2 + log (2 * π) / 2 ≤ (ε / 16) * n := by\n let c := Real.log 2 + log (2 * π) / 2\n filter_upwards [Filter.eventually_ge_atTop (ceil (c / (ε / 16)) + 1)] with n hn\n calc c = (ε / 16) * (c / (ε / 16)) := by field_simp\n _ ≤ (ε / 16) * (ceil (c / (ε / 16)) + 1) := by\n gcongr; exact (le_ceil _).trans (le_add_of_nonneg_right (by norm_num))\n _ ≤ (ε / 16) * n := by gcongr; exact_mod_cast hn\n filter_upwards [h_ratio_le, h_log_o.natCast_atTop, h_const, Filter.eventually_gt_atTop 0]\n with n h_rat h_logn h_c hn_pos\n have hn : (0 : ℝ) < n := cast_pos.mpr hn_pos\n have h_fact : (n ! : ℝ) ≤ 2 * sqrt (2 * n * π) * (n / exp 1) ^ n := by\n calc (n ! : ℝ) = (n ! : ℝ) / (sqrt (2 * n * π) * (n / exp 1) ^ n) *\n have h_denom_pos : sqrt (2 * n * π) * (n / exp 1) ^ n > 0 := by positivity\n (sqrt (2 * n * π) * (n / exp 1) ^ n) := by field_simp\n _ ≤ 2 * (sqrt (2 * n * π) * (n / exp 1) ^ n) := by gcongr\n _ = 2 * sqrt (2 * n * π) * (n / exp 1) ^ n := by ring\n simp only [id, norm_eq_abs] at h_logn\n have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast one_le_iff_ne_zero.mpr (pos_iff_ne_zero.mp hn_pos)\n rw [abs_of_nonneg (Real.log_nonneg hn1), abs_of_nonneg hn.le] at h_logn\n have h2npi : (0 : ℝ) < 2 * n * π := by positivity\n have h2pi : (0 : ℝ) < 2 * π := by positivity\n have hsqrt : sqrt (2 * n * π) > 0 := by positivity\n have hpow : (n / exp 1 : ℝ) ^ n > 0 := by positivity\n calc Real.log (n ! : ℝ)\n ≤ log (2 * sqrt (2 * n * π) * (n / exp 1) ^ n) := log_le_log (by positivity) h_fact\n _ = Real.log 2 + log (2 * n * π) / 2 + n * Real.log n - n := by\n rw [show (2 : ℝ) * sqrt (2 * n * π) * (n / exp 1) ^ n =\n 2 * (sqrt (2 * n * π) * (n / exp 1) ^ n) by ring, log_mul (by norm_num)\n (mul_pos hsqrt hpow).ne', log_mul hsqrt.ne' hpow.ne', sqrt_eq_rpow, log_rpow h2npi,\n Real.log_pow, log_div hn.ne' (exp_pos 1).ne', log_exp]\n ring\n _ = Real.log 2 + Real.log (2 * π) / 2 + Real.log n / 2 + n * Real.log n - n := by\n have : Real.log (2 * n * π) = Real.log (2 * π) + Real.log n := by\n rw [show (2 : ℝ) * n * π = 2 * π * n by ring, log_mul h2pi.ne' hn.ne']\n linarith [this]\n _ ≤ (ε / 16) * n + (ε / 16) * n / 2 + n * Real.log n - n := by gcongr\n _ = n * Real.log n - n + (3 * ε / 32) * n := by ring\n _ ≤ n * Real.log n - n + (ε / 4) * n := by nlinarith\n filter_upwards [Params.initial.score (ε / 2) (by linarith), h_stirling, Filter.eventually_gt_atTop 1]\n with n ⟨P, hPn, hP_score⟩ h_stir hn\n obtain ⟨f, hf_bal, hf_card⟩ := Factorization.card_bound P.initial P.L\n subst hPn\n refine ⟨f, hf_bal, ?_⟩\n have hlogn_pos : Real.log P.n > 0 := Real.log_pos (by exact_mod_cast hn)\n calc (f.a.card : ℝ)\n ≤ (Real.log P.n.factorial + P.initial.score P.L) / Real.log P.n := by rw [le_div_iff₀ hlogn_pos]; exact hf_card\n _ ≤ (P.n * Real.log P.n - P.n + (ε / 4) * P.n + (ε / 2) * P.n) / Real.log P.n := by gcongr\n _ = P.n - P.n / Real.log P.n + (3 * ε / 4) * P.n / Real.log P.n := by field_simp; ring\n _ ≤ P.n - P.n / Real.log P.n + ε * P.n / Real.log P.n := by gcongr; linarith\n","line":2390,"end_line":2459,"proof_status":"formalized"} {"id":"erdos-sol-2","label":"erdos-sol-2","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["erdos-sol-1"],"nlp_text":"One can factorize \\(n!\\) into at most \\(n/2 - n / 2\\log n + o(n / \\log n)\\) numbers of size at most \\(n^2\\).-","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Solution_2","latex_link":"tertiary-chapter.html#erdos-sol-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Solution_2","lean_decl_name":"Erdos392.Solution_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"erdos-sol-2\"\n (statement := /-- One can factorize $n!$ into at most $n/2 - n / 2\\log n + o(n / \\log n)$\n numbers of size at most $n^2$.--/)\n (proof := /-- Group the factorization arising in Theorem \\ref{erdos-sol-1} into pairs, using\n Lemma \\ref{balance-zero}.-/)\n (latexEnv := \"theorem\")\n (discussion := 649)]\ntheorem Solution_2 (ε : ℝ) (hε : ε > 0) :\n ∀ᶠ n in .atTop, ∃ (t : ℕ) (a : Fin t → ℕ), ∏ i, a i = n.factorial ∧ ∀ i, a i ≤ n ^ 2 ∧\n t ≤ (n / 2) - n / (2 * Real.log n) + ε * n / Real.log n := by\n have h_large : ∀ᶠ n : ℕ in .atTop, (1 : ℝ) / 2 ≤ (ε / 4) * n / Real.log n := by\n have h := isLittleO_log_id_atTop.def (by linarith : (0 : ℝ) < ε / 8)\n filter_upwards [h.natCast_atTop, Filter.eventually_gt_atTop 1] with n hlogn hn\n simp only [id, norm_eq_abs] at hlogn\n rw [abs_of_pos <| log_pos <| one_lt_cast.mpr hn, abs_of_pos <| cast_pos.mpr (lt_of_succ_lt hn)] at hlogn\n have hdiv : n / Real.log n ≥ 8 / ε := by\n rw [ge_iff_le, le_div_iff₀ <| log_pos <| one_lt_cast.mpr hn]\n calc 8 / ε * Real.log n ≤ 8 / ε * ((ε / 8) * n) := by gcongr\n _ = n := by field_simp\n calc (1 : ℝ) / 2 ≤ (ε / 4) * (8 / ε) / 2 := by field_simp; norm_num\n _ ≤ (ε / 4) * (n / Real.log n) / 2 := by gcongr\n _ = (ε / 4) * n / Real.log n / 2 := by ring\n _ ≤ (ε / 4) * n / Real.log n := by\n linarith [div_pos (by positivity : (ε / 4) * n > 0) <| log_pos <| one_lt_cast.mpr hn]\n filter_upwards [Solution_1 (ε / 2) (by linarith), Filter.eventually_gt_atTop 1, h_large]\n with n ⟨f, hf_bal, hf_card⟩ hn hn_large\n refine ⟨(pairProd f.a.toList).length, fun i ↦ (pairProd f.a.toList).get i, ?_, ?_⟩\n · rw [← List.prod_ofFn, List.ofFn_get]\n have hprod : f.prod id = n.factorial := f.zero_total_imbalance hf_bal\n simp only [Factorization.prod, Multiset.map_id] at hprod\n rw [← hprod, ← Multiset.prod_toList]\n exact (pairProd_prod f.a.toList).symm\n · have ht_bound : ((pairProd f.a.toList).length : ℝ) ≤ n / 2 - n / (2 * Real.log n) + ε * n / Real.log n := by\n change ((pairProd f.a.toList).length : ℝ) ≤ _\n rw [pairProd_length f.a.toList, length_toList f.a]\n calc (((f.a.card + 1) / 2 : ℕ) : ℝ) ≤ (f.a.card + 1 : ℕ) / 2 := cast_div_le\n _ = (f.a.card : ℝ) / 2 + 1 / 2 := by simp only [cast_add, cast_one]; ring\n _ ≤ (n - n / Real.log n + (ε / 2) * n / Real.log n) / 2 + 1 / 2 := by gcongr\n _ = n / 2 - n / (2 * Real.log n) + (ε / 4) * n / Real.log n + 1 / 2 := by field_simp; ring\n _ ≤ n / 2 - n / (2 * Real.log n) + (ε / 4) * n / Real.log n + (ε / 4) * n / Real.log n := by\n linarith [hn_large]\n _ = n / 2 - n / (2 * Real.log n) + (ε / 2) * n / Real.log n := by ring\n _ ≤ n / 2 - n / (2 * Real.log n) + ε * n / Real.log n := by gcongr; linarith\n intro i\n exact ⟨pairProd_bound f.a.toList n (fun x hx ↦ f.ha x (mem_toList.mp hx)) _ (List.get_mem ..), ht_bound⟩\n","line":2500,"end_line":2545,"proof_status":"formalized"} {"id":"Dusart_thm_5_9a","label":"Dusart_thm_5_9a","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have for \\(x \\geq 2278382\\), \\[ \\prod _{p \\leq x} \\Bigl(1 - \\frac{1}{p}\\Bigr) = \\frac{e^{-\\gamma }}{\\log x} \\Bigl(1 + O^*\\Bigl(\\frac{0.2}{\\log ^3 x}\\Bigr)\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_9a","latex_link":"secondary-chapter.html#Dusart_thm_5_9a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_9a","lean_decl_name":"Dusart.theorem_5_9a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_thm_5_9a\"\n (title := \"Dusart Theorem 5.9 (a)\")\n (statement := /--\n We have for $x \\geq 2278382$,\n \\[\n \\prod_{p \\leq x} \\Bigl(1 - \\frac{1}{p}\\Bigr) = \\frac{e^{-\\gamma}}{\\log x} \\Bigl(1 + O^*\\Bigl(\\frac{0.2}{\\log^3 x}\\Bigr)\\Bigr).\n \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem theorem_5_9a {x : ℝ} (hx : x ≥ 2278382) : ∃ E,\n ( (∏ p ∈ Finset.filter Prime (Finset.range (⌊x⌋₊ + 1)), (1 - 1 / p)) = exp (-eulerMascheroniConstant) / log x * (1 + E) ∧ |E| ≤ 0.2 / (log x) ^ 3 ) := by sorry\n","line":379,"end_line":389,"proof_status":"formalized"} {"id":"thm:trudgian2016","label":"trudgian2016","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} 2,898,242\\), then there is a prime in the interval \\[ \\left[ x, x\\left(1 + \\frac{1}{111(\\log x)^2}\\right) \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Trudgian2016.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:trudgian2016","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Trudgian2016.has_prime_in_interval","lean_decl_name":"Trudgian2016.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:trudgian2016\"\n (title := \"Trudgian 2016\")\n (statement := /-- If $x > 2,898,242$, then there\n is a prime in the interval\n \\[ \\left[ x, x\\left(1 + \\frac{1}{111(\\log x)^2}\\right) \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem Trudgian2016.has_prime_in_interval (x : ℝ) (hx : x > 2898242) :\n HasPrimeInInterval x (x / (111 * (log x) ^ 2)) := by sorry","line":201,"end_line":210,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-3","label":"costa-pereira-sublemma-1-3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-2"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\[ \\psi (x) = \\theta (x) + \\psi (x^{1/2}) + \\sum _{k \\geqslant 1} \\theta (x^{1/(2k+1)}). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_3","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_3","lean_decl_name":"CostaPereira.sublemma_1_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":" simp_rw [sublemma_1_1 (rpow_pos_of_pos hx _), ← rpow_mul (le_of_lt hx), _root_.div_mul_div_comm, one_mul]\n\n@[blueprint\n \"costa-pereira-sublemma-1-3\"\n (title := \"Costa-Pereira Sublemma 1.3\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) = \\theta(x) + \\psi(x^{1/2}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(2k+1)}).\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-1} and Sublemma \\ref{costa-pereira-sublemma-1-2}. -/)\n (latexEnv := \"sublemma\")\n (discussion := 678)]\ntheorem sublemma_1_3 {x : ℝ} (hx : 0 < x) :\n ψ x = θ x + ψ (x ^ (1 / 2:ℝ)) + ∑' k, θ (x ^ (1 / (2 * (k:ℝ) + 1))) := by sorry\n\n@[blueprint\n \"costa-pereira-sublemma-1-4\"\n (title := \"Costa-Pereira Sublemma 1.4\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) - \\theta(x) = \\psi(x^{1/2}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k-3)}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k-1)}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k+1)}).\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-3} and rearranging the sum. -/)\n (latexEnv := \"sublemma\")\n (discussion := 679)]\ntheorem sublemma_1_4 {x : ℝ} (hx : 0 < x) :\n ψ x - θ x =\n ψ (x ^ (1 / 2:ℝ)) +\n","line":67,"end_line":96,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-4","label":"costa-pereira-sublemma-1-4","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-3"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\[ \\psi (x) - \\theta (x) = \\psi (x^{1/2}) + \\sum _{k \\geqslant 1} \\theta (x^{1/(6k-3)}) + \\sum _{k \\geqslant 1} \\theta (x^{1/(6k-1)}) + \\sum _{k \\geqslant 1} \\theta (x^{1/(6k+1)}). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_4","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_4","lean_decl_name":"CostaPereira.sublemma_1_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":" ∑' k, θ (x ^ (1 / (6 * (k:ℝ) - 1))) +\n ∑' k, θ (x ^ (1 / (6 * (k:ℝ) + 1))) := by sorry\n\n@[blueprint\n \"costa-pereira-sublemma-1-5\"\n (title := \"Costa-Pereira Sublemma 1.5\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x^{1/3}) = \\sum_{k \\geqslant 1} \\theta(x^{1/(6k-3)}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k)}).\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-2} and substitution. -/)\n (latexEnv := \"sublemma\")\n (discussion := 680)]\ntheorem sublemma_1_5 {x : ℝ} (hx : 0 < x) :\n ψ (x ^ (1 / 3:ℝ)) =\n ∑' k, θ (x ^ (1 / (6 * (k:ℝ) - 3))) +\n ∑' k, θ (x ^ (1 / (6 * (k:ℝ)))) := by sorry\n\n@[blueprint\n \"costa-pereira-sublemma-1-6\"\n (title := \"Costa-Pereira Sublemma 1.6\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) - \\theta(x) = \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k-1)}) - \\sum_{k \\geqslant 1} \\theta(x^{1/(6k)}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k+1)}).\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-4} and Sublemma \\ref{costa-pereira-sublemma-1-5}. -/)\n (latexEnv := \"sublemma\")\n (discussion := 681)]\ntheorem sublemma_1_6 {x : ℝ} (hx : 0 < x) :\n ψ x - θ x =\n ψ (x ^ (1 / 2:ℝ)) +\n ψ (x ^ (1 / 3:ℝ)) +\n ∑' k, θ (x ^ (1 / (6 * (k:ℝ) - 1))) -\n ∑' k, θ (x ^ (1 / (6 * (k:ℝ)))) +\n ∑' k, θ (x ^ (1 / (6 * (k:ℝ) + 1))) := by sorry\n\n@[blueprint\n \"costa-pereira-sublemma-1-7\"\n (title := \"Costa-Pereira Sublemma 1.7\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) - \\theta(x) \\leqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\sum_{k \\geqslant 1} \\theta(x^{1/5k}\n \\]\n","line":98,"end_line":142,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-6","label":"costa-pereira-sublemma-1-6","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-4","costa-pereira-sublemma-1-5"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\[ \\psi (x) - \\theta (x) = \\psi (x^{1/2}) + \\psi (x^{1/3}) + \\sum _{k \\geqslant 1} \\theta (x^{1/(6k-1)}) - \\sum _{k \\geqslant 1} \\theta (x^{1/(6k)}) + \\sum _{k \\geqslant 1} \\theta (x^{1/(6k+1)}). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_6","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-6","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_6","lean_decl_name":"CostaPereira.sublemma_1_6","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":"@[blueprint\n \"costa-pereira-sublemma-1-6\"\n (title := \"Costa-Pereira Sublemma 1.6\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) - \\theta(x) = \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k-1)}) - \\sum_{k \\geqslant 1} \\theta(x^{1/(6k)}) + \\sum_{k \\geqslant 1} \\theta(x^{1/(6k+1)}).\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-4} and Sublemma \\ref{costa-pereira-sublemma-1-5}. -/)\n (latexEnv := \"sublemma\")\n (discussion := 681)]\ntheorem sublemma_1_6 {x : ℝ} (hx : 0 < x) :\n ψ x - θ x =\n ψ (x ^ (1 / 2:ℝ)) +\n ψ (x ^ (1 / 3:ℝ)) +\n ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ) - 1))) -\n ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ)))) +\n ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ) + 1))) := by\n rw [sublemma_1_4 hx, sublemma_1_5 hx]; ring","line":211,"end_line":229,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-7","label":"costa-pereira-sublemma-1-7","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-6"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\[ \\psi (x) - \\theta (x) \\leqslant \\psi (x^{1/2}) + \\psi (x^{1/3}) + \\sum _{k \\geqslant 1} \\theta (x^{1/5k} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_7","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_7","lean_decl_name":"CostaPereira.sublemma_1_7","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":"@[blueprint\n \"costa-pereira-sublemma-1-7\"\n (title := \"Costa-Pereira Sublemma 1.7\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) - \\theta(x) \\leqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\sum_{k \\geqslant 1} \\theta(x^{1/5k}\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-6} and the fact that $\\theta$\n is an increasing function. -/)\n (latexEnv := \"sublemma\")\n (discussion := 682)]\ntheorem sublemma_1_7 {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≤ ψ (x ^ (1 / 2 : ℝ)) + ψ (x ^ (1 / 3 : ℝ)) + ∑' (k : ℕ), θ (x ^ (1 / (5 * ((k.succ : ℕ) : ℝ)))) := by\n have h_split :\n ψ x - θ x ≤ ψ (x ^ (1 / 2 : ℝ)) + ψ (x ^ (1 / 3 : ℝ)) +\n ∑' k : ℕ, θ (x ^ (1 / (6 * (k.succ : ℝ) - 1 : ℝ))) := by\n rw [sublemma_1_6 hx]\n norm_num [sub_add]\n refine Summable.tsum_le_tsum ?_ ?_ ?_\n · field_simp\n intro i\n apply_rules [sum_le_sum_of_subset_of_nonneg]\n · intro p hp\n have hp1 := mem_filter.mp hp |>.1\n have hp2 := mem_filter.mp hp |>.2\n refine mem_filter.mpr ⟨mem_Ioc.mpr ⟨?_, ?_⟩, hp2⟩\n · exact mem_Ioc.mp hp1 |>.1\n · refine (mem_Ioc.mp hp1 |>.2).trans (Nat.floor_mono ?_)\n refine Real.rpow_le_rpow_of_exponent_le ?_ (by gcongr; linarith)\n show 1 ≤ x\n by_contra h\n push_neg at h\n rw [Nat.floor_eq_zero.mpr <| Real.rpow_lt_one hx.le h <| by positivity] at hp\n simp_all\n · exact fun _ _ _ ↦ Real.log_nonneg <| Nat.one_le_cast.2 <| Nat.Prime.pos <| by simp_all\n · have h_theta_zero : ∀ᶠ k : ℕ in atTop, θ (x ^ (1 / (6 * (k + 1) + 1 : ℝ))) = 0 := by\n have h_theta_zero : Tendsto (fun k : ℕ ↦ x ^ (1 / (6 * (k + 1) + 1 : ℝ))) atTop (nhds 1) := by\n simpa using tendsto_const_nhds.rpow (tendsto_inv_atTop_zero.comp <|\n tendsto_atTop_mono (fun k ↦ by linarith) tendsto_natCast_atTop_atTop) (by simp [hx.ne'])\n filter_upwards [h_theta_zero.eventually (gt_mem_nhds one_lt_two)] with k hk\n rw [theta_eq_zero_of_lt_two hk]\n obtain ⟨N, hN⟩ := eventually_atTop.mp h_theta_zero\n rw [← summable_nat_add_iff N]\n exact ⟨_, hasSum_single 0 fun n hn ↦ by\n simpa using hN (n + N) (by omega)⟩\n · refine summable_of_ne_finset_zero (s := range (floor (Real.logb 2 x) + 1)) fun b hb ↦ ?_\n rw [theta_eq_zero_of_lt_two]\n rw [← log_lt_log_iff (by positivity) zero_lt_two, Real.log_rpow hx]\n field_simp\n contrapose! hb\n refine mem_range.mpr <| Nat.lt_succ_of_le <| Nat.le_floor ?_\n rw [Real.logb, le_div_iff₀ <| Real.log_pos <| by norm_num]\n nlinarith [Real.log_pos one_lt_two]\n refine h_split.trans (add_le_add_right (Summable.tsum_le_tsum ?_ ?_ ?_) _)\n · intro i\n apply_rules [sum_le_sum_of_subset_of_nonneg]\n · intro p hp\n refine mem_filter.mpr ⟨mem_Ioc.mpr ⟨mem_Ioc.mp (mem_filter.mp hp |>.1) |>.1, ?_⟩, mem_filter.mp hp |>.2⟩\n refine (mem_Ioc.mp (mem_filter.mp hp |>.1) |>.2).trans (Nat.floor_mono ?_)\n have : 1 ≤ x := by\n by_contra h\n push_neg at h\n have hpos : (0 : ℝ) < 1 / (6 * (i.succ : ℝ) - 1) := one_div_pos.mpr <| by\n linarith [show (i.succ : ℝ) ≥ 1 by simp]\n rw [Nat.floor_eq_zero.mpr <| rpow_lt_one hx.le h hpos] at hp\n simp_all\n refine rpow_le_rpow_of_exponent_le this ?_\n rw [div_le_div_iff₀] <;> nlinarith [show (i.succ : ℝ) ≥ 1 by simp]\n · exact fun _ _ _ ↦ log_nonneg <| Nat.one_le_cast.2 <| Nat.Prime.pos <| by simp_all\n · refine summable_of_ne_finset_zero (s := range (floor (logb 2 x) + 1)) ?_\n simp only [mem_range, Order.lt_add_one_iff, not_le, succ_eq_add_one, cast_add, cast_one, one_div]\n intro k hk\n rw [theta_eq_zero_of_lt_two]\n rw [← log_lt_log_iff (rpow_pos_of_pos hx ..) zero_lt_two, log_rpow hx, inv_mul_lt_iff₀ (by linarith)]\n have := Nat.lt_of_floor_lt hk\n rw [logb, div_lt_iff₀ (log_pos one_lt_two)] at this\n nlinarith [Real.log_pos one_lt_two]\n · refine summable_of_ne_finset_zero (s := range (Nat.floor (log x / Real.log 5) + 1)) fun k hk ↦ ?_\n rw [theta_eq_zero_of_lt_two]\n norm_num\n rw [← log_lt_log_iff (by positivity) (by positivity), log_rpow hx, inv_mul_eq_div, div_mul_eq_mul_div,\n div_lt_iff₀] <;> norm_num at *\n · have := Nat.lt_of_floor_lt hk\n rw [div_lt_iff₀ (by positivity)] at this\n rw [show (5 : ℝ) = 2 ^ 2 * 1.25 by norm_num, log_mul, Real.log_pow] at this <;> norm_num at *\n nlinarith [Real.log_pos one_lt_two, log_le_log (by norm_num) (by norm_num : (5 : ℝ) / 4 ≤ 2)]\n · positivity","line":231,"end_line":318,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-8","label":"costa-pereira-sublemma-1-8","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-6"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\[ \\psi (x) - \\theta (x) \\geqslant \\psi (x^{1/2}) + \\psi (x^{1/3}) + \\sum _{k \\geqslant 1} \\theta (x^{1/7k} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_8","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-8","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_8","lean_decl_name":"CostaPereira.sublemma_1_8","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":"@[blueprint\n \"costa-pereira-sublemma-1-8\"\n (title := \"Costa-Pereira Sublemma 1.8\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) - \\theta(x) \\geqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\sum_{k \\geqslant 1} \\theta(x^{1/7k}\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-6} and the fact that $\\theta$\n is an increasing function. -/)\n (latexEnv := \"sublemma\")\n (discussion := 683)]\ntheorem sublemma_1_8 {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≥ ψ (x ^ (1 / 2 : ℝ)) + ψ (x ^ (1 / 3 : ℝ)) + ∑' (k : ℕ), θ (x ^ (1 / (7 * ((k.succ : ℕ) : ℝ)))) := by\n have h_sublemma : ψ x - θ x = ψ (x ^ (1 / 2 : ℝ)) + ψ (x ^ (1 / 3 : ℝ)) +\n ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ) - 1))) -\n ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ)))) +\n ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ) + 1))) :=\n sublemma_1_6 hx\n have h_sum_bound1 : ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ) + 1))) ≥\n ∑' (k : ℕ), θ (x ^ (1 / (7 * ((k.succ : ℕ) : ℝ)))) := by\n refine Summable.tsum_le_tsum ?_ ?_ ?_\n · intro k\n apply_rules [sum_le_sum_of_subset_of_nonneg]\n · exact fun p hp ↦ mem_filter.mpr\n ⟨mem_Ioc.mpr\n ⟨mem_Ioc.mp (mem_filter.mp hp |>.1) |>.1,\n (mem_Ioc.mp (mem_filter.mp hp |>.1) |>.2).trans\n (floor_mono <| rpow_le_rpow_of_exponent_le\n (show 1 ≤ x from le_of_not_gt fun h ↦ by\n rw [floor_eq_zero.mpr <|\n rpow_lt_one hx.le h <| by positivity] at hp\n simp_all)\n (by rw [div_le_div_iff₀] <;> norm_num <;> linarith))⟩,\n mem_filter.mp hp |>.2⟩\n · exact fun _ _ _ ↦ log_nonneg <|\n one_le_cast.2 <| Prime.pos <| by simp_all\n · have h_finite : ∃ N : ℕ, ∀ k ≥ N, θ (x ^ (1 / (7 * (k.succ : ℝ)))) = 0 := by\n use ceil (log x / Real.log 2) + 1\n intro k hk\n rw [theta_eq_zero_of_lt_two]\n norm_num\n rw [← log_lt_log_iff (by positivity) (by positivity), log_rpow hx,\n inv_mul_eq_div, div_mul_eq_mul_div, div_lt_iff₀] <;>\n nlinarith [le_ceil (log x / Real.log 2), Real.log_pos one_lt_two,\n mul_div_cancel₀ (log x) (ne_of_gt (log_pos one_lt_two)),\n show (k : ℝ) ≥ ⌈log x / Real.log 2⌉₊ + 1 by exact_mod_cast hk]\n exact summable_of_ne_finset_zero (s := range h_finite.choose)\n fun k hk ↦ h_finite.choose_spec k <| le_of_not_gt fun hk' ↦ hk <|\n mem_range.mpr hk'\n · have h_finite : ∃ N : ℕ, ∀ k ≥ N, θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ) + 1))) = 0 := by\n use ceil (log x / Real.log 2) + 1\n intro k hk\n rw [theta_eq_zero_of_lt_two]\n norm_num\n rw [← log_lt_log_iff (rpow_pos_of_pos hx ..) zero_lt_two, log_rpow hx, inv_mul_lt_iff₀] <;>\n nlinarith [le_ceil (log x / Real.log 2), Real.log_pos one_lt_two,\n mul_div_cancel₀ (log x) (ne_of_gt (log_pos one_lt_two)),\n show (k : ℝ) ≥ ⌈Real.log x / Real.log 2⌉₊ + 1 by exact_mod_cast hk]\n exact summable_of_ne_finset_zero\n fun k hk ↦ h_finite.choose_spec k <| le_of_not_gt fun hk' ↦ hk <|\n mem_range.mpr hk'\n have h_sum_bound2 : ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ) - 1))) ≥\n ∑' (k : ℕ), θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ)))) := by\n refine Summable.tsum_le_tsum ?_ ?_ ?_\n · intro k\n apply_rules [sum_le_sum_of_subset_of_nonneg] <;> norm_num\n · field_simp\n exact fun p hp ↦ mem_filter.mpr\n ⟨mem_Ioc.mpr\n ⟨mem_Ioc.mp (mem_filter.mp hp |>.1) |>.1,\n (mem_Ioc.mp (mem_filter.mp hp |>.1) |>.2).trans\n (floor_mono <| rpow_le_rpow_of_exponent_le\n (show 1 ≤ x from le_of_not_gt fun h ↦ by\n rw [floor_eq_zero.mpr <| rpow_lt_one hx.le h <| by positivity] at hp\n simp_all) (by rw [div_le_div_iff₀] <;> nlinarith))⟩, mem_filter.mp hp |>.2⟩\n · exact fun _ _ _ _ _ ↦ log_nonneg <| one_le_cast.2 <| Prime.pos ‹_›\n · have h_finite : ∃ N : ℕ, ∀ k ≥ N, θ (x ^ (1 / (6 * ((k.succ : ℕ) : ℝ)))) = 0 := by\n use ceil (log x / Real.log 2) + 1\n intro k hk\n rw [theta_eq_zero_of_lt_two]\n norm_num\n rw [← log_lt_log_iff (by positivity) zero_lt_two, log_rpow hx,\n inv_mul_eq_div, div_mul_eq_mul_div, div_lt_iff₀] <;>\n nlinarith [le_ceil (log x / Real.log 2), Real.log_pos one_lt_two,\n mul_div_cancel₀ (log x) (ne_of_gt (Real.log_pos one_lt_two)),\n show (k : ℝ) ≥ ⌈log x / Real.log 2⌉₊ + 1 by exact_mod_cast hk]\n exact summable_of_ne_finset_zero (s := range h_finite.choose)\n fun k hk ↦ h_finite.choose_spec k <| le_of_not_gt fun hk' ↦ hk <| mem_range.mpr hk'\n · refine summable_of_ne_finset_zero (s := range (ceil (log x / Real.log 2) + 1)) ?_\n simp only [mem_range, Order.lt_add_one_iff, not_le, succ_eq_add_one, cast_add, cast_one, one_div]\n intro k hk\n rw [theta_eq_zero_of_lt_two]\n have := lt_of_ceil_lt hk\n rw [div_lt_iff₀ (log_pos one_lt_two)] at this\n have hx_pow : x < 2 ^ (k : ℕ) := by rw [← log_lt_log_iff hx (by positivity), Real.log_pow]; linarith\n exact (rpow_lt_rpow (le_of_lt hx) hx_pow (inv_pos.mpr (by linarith))).trans_le\n (by rw [← rpow_natCast, ← rpow_mul zero_le_two]\n exact (rpow_le_rpow_of_exponent_le one_le_two\n (show (k : ℝ) / (6 * (k + 1) - 1) ≤ 1 by rw [div_le_iff₀] <;> linarith)).trans (by norm_num))\n grind","line":320,"end_line":420,"proof_status":"formalized"} {"id":"ResidueTheoremOnRectangleWithSimplePole","label":"ResidueTheoremOnRectangleWithSimplePole","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RectangleBorder","HolomorphicOn.vanishesOnRectangle"],"nlp_text":"Suppose that \\(f\\) is a holomorphic function on a rectangle, except for a simple pole at \\(p\\). By the latter, we mean that there is a function \\(g\\) holomorphic on the rectangle such that, \\(f = g + A/(s-p)\\) for some \\(A\\in \\mathbb {C}\\). Then the integral of \\(f\\) over the rectangle is \\(A\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueTheoremOnRectangleWithSimplePole","latex_link":"sect0003.html#ResidueTheoremOnRectangleWithSimplePole","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueTheoremOnRectangleWithSimplePole","lean_decl_name":"ResidueTheoremOnRectangleWithSimplePole","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"@[blueprint\n (title := \"ResidueTheoremOnRectangleWithSimplePole\")\n (statement := /--\n Suppose that $f$ is a holomorphic function on a rectangle, except for a simple pole at $p$.\n By the latter, we mean that there is a function $g$ holomorphic on the rectangle such that,\n $f = g + A/(s-p)$ for some $A\\in\\C$. Then the integral of $f$ over the rectangle is $A$.\n -/)\n (proof := /--\n Replace $f$ with $g + A/(s-p)$ in the integral.\n The integral of $g$ vanishes by Lemma \\ref{HolomorphicOn.vanishesOnRectangle}.\n To evaluate the integral of $1/(s-p)$, pull everything to a square about the origin using\n Lemma \\ref{RectanglePullToNhdOfPole}, and rescale by $c$; what remains is handled by\n Lemma \\ref{ResidueTheoremAtOrigin}.\n -/)\n (latexEnv := \"lemma\")]\nlemma ResidueTheoremOnRectangleWithSimplePole {f g : ℂ → ℂ} {z w p A : ℂ}\n (zRe_le_wRe : z.re ≤ w.re) (zIm_le_wIm : z.im ≤ w.im)\n (pInRectInterior : Rectangle z w ∈ 𝓝 p)\n (gHolo : HolomorphicOn g (Rectangle z w))\n (principalPart : Set.EqOn (f - fun s ↦ A / (s - p)) (g) (Rectangle z w \\ {p})) :\n RectangleIntegral' f z w = A := by\n\n have principalPart' : Set.EqOn f (g + (fun s ↦ A / (s - p))) (Rectangle z w \\ {p}) :=\n fun s hs => by rw [Pi.add_apply, ← principalPart hs, Pi.sub_apply, sub_add_cancel]\n\n have : Set.EqOn f (g + (fun s ↦ A / (s - p))) (RectangleBorder z w) :=\n principalPart'.mono <| Set.subset_diff.mpr ⟨rectangleBorder_subset_rectangle z w,\n disjoint_singleton_right.mpr (not_mem_rectangleBorder_of_rectangle_mem_nhds pInRectInterior)⟩\n rw [RectangleIntegral'_congr this]\n\n have t1 : RectangleBorderIntegrable g z w := gHolo.rectangleBorderIntegrable\n have t2 : HolomorphicOn (fun s ↦ A / (s - p)) (Rectangle z w \\ {p}) := by\n apply DifferentiableOn.mono (t := {p}ᶜ)\n · apply DifferentiableOn.div\n · exact differentiableOn_const _\n · exact DifferentiableOn.sub differentiableOn_id (differentiableOn_const _)\n · exact fun x hx => by rw [sub_ne_zero]; exact hx\n · rintro s ⟨_, hs⟩ ; exact hs\n have t3 : RectangleBorderIntegrable (fun s ↦ A / (s - p)) z w :=\n HolomorphicOn.rectangleBorderIntegrable' t2 pInRectInterior\n\n rw [RectangleIntegral', RectangleBorderIntegrable.add t1 t3, smul_add]\n rw [gHolo.vanishesOnRectangle (by rfl), smul_zero, zero_add]\n\n exact ResidueTheoremInRectangle zRe_le_wRe zIm_le_wIm pInRectInterior\n","line":503,"end_line":547,"proof_status":"formalized"} {"id":"SmoothedChebyshevPull3","label":"SmoothedChebyshevPull3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ResidueTheoremOnRectangleWithSimplePole","I2New","SmoothedChebyshev","I5New","I1New","I3New","I4New","SmoothedChebyshevPull1_aux_integrable","ResidueMult","riemannZetaLogDerivResidue","BddAbove_to_IsBigO"],"nlp_text":"We have that \\[ \\psi _\\varepsilon (X)=\\mathcal{M}(\\tilde{1}_\\varepsilon )(1)\\, X^1+I_1-I_2+I_3+I_4+I_5. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull3","latex_link":"sect0004.html#SmoothedChebyshevPull3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull3","lean_decl_name":"SmoothedChebyshevPull3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevPull3\")\n (statement := /--\n We have that\n $$\\psi_\\varepsilon(X)=\\mathcal{M}(\\tilde{1}_\\varepsilon)(1)\\,X^1+I_1-I_2+I_3+I_4+I_5.$$\n -/)\n (proof := /-- Pull contours and accumulate the pole of $\\zeta'/\\zeta$ at $s=1$. -/)]\ntheorem SmoothedChebyshevPull3 {SmoothingF : ℝ → ℝ} {ε : ℝ} (ε_pos : 0 < ε)\n (ε_lt_one : ε < 1)\n (X : ℝ) (X_gt : 3 < X)\n {T : ℝ} (T_pos : 0 < T) {σ' : ℝ}\n (σ'_pos : 0 < σ') (σ'_lt_one : σ' < 1)\n (holoOn : HolomorphicOn (ζ' / ζ) ((Icc σ' 2) ×ℂ (Icc (-T) T) \\ {1}))\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x)\n (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) :\n SmoothedChebyshev SmoothingF ε X =\n I1New SmoothingF ε X T -\n I2New SmoothingF ε T X σ' +\n I3New SmoothingF ε T X σ' +\n I4New SmoothingF ε T X σ' +\n I5New SmoothingF ε X T\n + 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) 1 * X := by\n unfold SmoothedChebyshev VerticalIntegral'\n have X_eq_gt_one : 1 < 1 + (Real.log X)⁻¹ := by\n nth_rewrite 1 [← add_zero 1]\n bound\n have X_eq_lt_two : (1 + (Real.log X)⁻¹) < 2 := by\n rw[← one_add_one_eq_two]\n gcongr\n exact inv_lt_one_of_one_lt₀ <| logt_gt_one X_gt.le\n have X_eq_le_two : 1 + (Real.log X)⁻¹ ≤ 2 := X_eq_lt_two.le\n rw [verticalIntegral_split_three (a := -T) (b := T)]\n swap\n · exact SmoothedChebyshevPull1_aux_integrable ε_pos ε_lt_one X_gt X_eq_gt_one\n X_eq_le_two suppSmoothingF SmoothingFnonneg mass_one ContDiffSmoothingF\n · have temp : ↑(1 + (Real.log X)⁻¹) = (1 : ℂ) + ↑(Real.log X)⁻¹ := by simp\n unfold I1New\n simp only [smul_eq_mul, mul_add, temp, sub_eq_add_neg, add_assoc, add_left_cancel_iff]\n unfold I5New\n nth_rewrite 6 [add_comm]\n simp only [← add_assoc]\n rw[add_right_cancel_iff, ← add_right_inj (1 / (2 * ↑π * I) *\n -VIntegral (SmoothedChebyshevIntegrand SmoothingF ε X) (1 + (Real.log X)⁻¹) (-T) T),\n ← mul_add, ← sub_eq_neg_add, sub_self, mul_zero]\n unfold VIntegral I2New I3New I4New\n simp only [smul_eq_mul, temp, ← add_assoc, ← mul_neg, ← mul_add]\n let fTempRR : ℝ → ℝ → ℂ := fun x ↦ fun y ↦\n SmoothedChebyshevIntegrand SmoothingF ε X ((x : ℝ) + (y : ℝ) * I)\n let fTempC : ℂ → ℂ := fun z ↦ fTempRR z.re z.im\n have : ∫ (y : ℝ) in -T..T,\n SmoothedChebyshevIntegrand SmoothingF ε X (1 + ↑(Real.log X)⁻¹ + ↑y * I) =\n ∫ (y : ℝ) in -T..T, fTempRR (1 + (Real.log X)⁻¹) y := by\n unfold fTempRR\n simp only [temp]\n rw[this]\n have : ∫ (σ₀ : ℝ) in σ'..1 + (Real.log X)⁻¹,\n SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₀ - ↑T * I) =\n ∫ (x : ℝ) in σ'..1 + (Real.log X)⁻¹, fTempRR x (-T) := by\n unfold fTempRR\n simp only [ofReal_neg, neg_mul, sub_eq_add_neg]\n rw[this]\n have : ∫ (t : ℝ) in -T..T,\n SmoothedChebyshevIntegrand SmoothingF ε X (↑σ' + ↑t * I) =\n ∫ (y : ℝ) in -T..T, fTempRR σ' y := by rfl\n rw[this]\n have : ∫ (σ₀ : ℝ) in σ'..1 + (Real.log X)⁻¹,\n SmoothedChebyshevIntegrand SmoothingF ε X (↑σ₀ + ↑T * I) =\n ∫ (x : ℝ) in σ'..1 + (Real.log X)⁻¹, fTempRR x T := by rfl\n rw[this]\n have : (((I * -∫ (y : ℝ) in -T..T, fTempRR (1 + (Real.log X)⁻¹) y) +\n -∫ (x : ℝ) in σ'..1 + (Real.log X)⁻¹, fTempRR x (-T)) +\n I * ∫ (y : ℝ) in -T..T, fTempRR σ' y) +\n ∫ (x : ℝ) in σ'..1 + (Real.log X)⁻¹, fTempRR x T =\n -(2 * ↑π * I) * RectangleIntegral' fTempC (σ' - T * I) (1 + ↑(Real.log X)⁻¹ + T * I) := by\n unfold RectangleIntegral' RectangleIntegral HIntegral VIntegral fTempC\n simp only [mul_neg, one_div, mul_inv_rev, inv_I, neg_mul, sub_im, ofReal_im, mul_im,\n ofReal_re, I_im, mul_one, I_re, mul_zero, add_zero, zero_sub, ofReal_neg, add_re,\n neg_re, mul_re, sub_self, neg_zero, add_im, neg_im, zero_add, sub_re, sub_zero,\n ofReal_inv, one_re, inv_re, normSq_ofReal, div_self_mul_self', one_im, inv_im,\n zero_div, ofReal_add, ofReal_one, smul_eq_mul, neg_neg]\n ring_nf\n simp only [I_sq, neg_mul, one_mul, ne_eq, ofReal_eq_zero, pi_ne_zero, not_false_eq_true,\n mul_inv_cancel_right₀, sub_neg_eq_add, I_pow_three]\n ring_nf\n rw[this]\n field_simp\n rw[mul_comm, eq_comm, neg_add_eq_zero]\n\n have pInRectangleInterior : (Rectangle (σ' - ↑T * I) (1 + (Real.log X)⁻¹ + T * I) ∈ nhds 1) := by\n refine rectangle_mem_nhds_iff.mpr ?_\n refine mem_reProdIm.mpr ?_\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal, div_self_mul_self', add_zero,\n sub_im, mul_im, zero_sub, add_im, one_im, inv_im, neg_zero, zero_div, zero_add]\n constructor\n · unfold uIoo\n rw [min_eq_left (by linarith), max_eq_right (by linarith)]\n exact mem_Ioo.mpr ⟨σ'_lt_one, (by linarith)⟩\n · unfold uIoo\n rw [min_eq_left (by linarith), max_eq_right (by linarith)]\n exact mem_Ioo.mpr ⟨(by linarith), (by linarith)⟩\n\n apply ResidueTheoremOnRectangleWithSimplePole'\n · simp; linarith\n · simp; linarith\n · simp only [one_div]\n exact pInRectangleInterior\n · apply DifferentiableOn.mul\n · apply DifferentiableOn.mul\n · simp only [re_add_im]\n have : (fun z ↦ -ζ' z / ζ z) = -(ζ' / ζ) := by ext; simp; ring\n rw [this]\n apply DifferentiableOn.neg\n apply holoOn.mono\n apply diff_subset_diff_left\n apply reProdIm_subset_iff'.mpr\n left\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, one_div, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal,\n div_self_mul_self', add_zero, sub_im, mul_im, zero_sub, add_im, one_im, inv_im,\n neg_zero, zero_div, zero_add]\n constructor <;> apply uIcc_subset_Icc <;> constructor <;> linarith\n · intro s hs\n apply DifferentiableAt.differentiableWithinAt\n simp only [re_add_im]\n apply Smooth1MellinDifferentiable ContDiffSmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩ SmoothingFnonneg mass_one\n have := mem_reProdIm.mp hs.1 |>.1\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, one_div, ofReal_inv, add_re, one_re, inv_re, normSq_ofReal,\n div_self_mul_self', add_zero] at this\n rw [uIcc_of_le (by linarith)] at this\n linarith [this.1]\n · intro s hs\n apply DifferentiableAt.differentiableWithinAt\n simp only [re_add_im]\n apply DifferentiableAt.const_cpow (by fun_prop)\n left\n norm_cast\n linarith\n · let U : Set ℂ := Rectangle (σ' - ↑T * I) (1 + (Real.log X)⁻¹ + T * I)\n let f : ℂ → ℂ := fun z ↦ -ζ' z / ζ z\n let g : ℂ → ℂ := fun z ↦ 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) z * ↑X ^ z\n unfold fTempC fTempRR SmoothedChebyshevIntegrand\n simp only [re_add_im]\n have g_holc : HolomorphicOn g U := by\n intro u uInU\n apply DifferentiableAt.differentiableWithinAt\n simp only [g]\n apply DifferentiableAt.mul\n · apply Smooth1MellinDifferentiable ContDiffSmoothingF suppSmoothingF ⟨ε_pos, ε_lt_one⟩ SmoothingFnonneg mass_one\n simp only [ofReal_inv, U] at uInU\n unfold Rectangle at uInU\n rw[Complex.mem_reProdIm] at uInU\n have := uInU.1\n simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero, add_re, one_re, inv_re, normSq_ofReal, div_self_mul_self', add_zero] at this\n rw [uIcc_of_le (by linarith)] at this\n linarith [this.1]\n · unfold HPow.hPow instHPow\n apply DifferentiableAt.const_cpow differentiableAt_fun_id\n left\n norm_cast\n linarith\n have f_near_p : (f - fun (z : ℂ) => 1 * (z - 1)⁻¹) =O[nhdsWithin 1 {1}ᶜ] (1 : ℂ → ℂ) := by\n simp only [one_mul, f]\n exact riemannZetaLogDerivResidueBigO\n convert ResidueMult g_holc pInRectangleInterior f_near_p using 1\n ext\n simp [f, g]\n ring\n","line":1298,"end_line":1469,"proof_status":"formalized"} {"id":"residueAtNegOne","label":"residueAtNegOne","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ResidueTheoremOnRectangleWithSimplePole","isHolomorphicOn","existsDifferentiableOn_of_bddAbove","diffBddAtNegOne"],"nlp_text":"Let \\(x{\\gt}0\\). Then for all sufficiently small \\(c{\\gt}0\\), we have that \\[ \\frac1{2\\pi i} \\int _{-c-i*c-1}^{c+ i*c-1}\\frac{x^s}{s(s+1)}ds = -\\frac1x. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residueAtNegOne","latex_link":"sect0003.html#residueAtNegOne","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residueAtNegOne","lean_decl_name":"Perron.residueAtNegOne","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"residueAtNegOne\"\n (title := \"residueAtNegOne\")\n (statement := /--\n Let $x>0$. Then for all sufficiently small $c>0$, we have that\n $$\n \\frac1{2\\pi i}\n \\int_{-c-i*c-1}^{c+ i*c-1}\\frac{x^s}{s(s+1)}ds = -\\frac1x.\n $$\n -/)\n (proof := /-- Compute the integral. -/)\n (latexEnv := \"lemma\")]\nlemma residueAtNegOne (xpos : 0 < x) : ∀ᶠ (c : ℝ) in 𝓝[>] 0,\n RectangleIntegral' (f x) (-c - c * I - 1) (c + c * I - 1) = -x⁻¹ := by\n filter_upwards [Ioo_mem_nhdsGT (by linarith : (0 : ℝ) < 1 / 2), diffBddAtNegOne xpos]\n intro c hc bddAbove\n obtain ⟨cpos, _⟩ := hc\n have h_mem {s : ℂ} (hs : s ∈ Square (-1) c) :\n -c ≤ s.re + 1 ∧ s.re + 1 ≤ c ∧ -c ≤ s.im ∧ s.im ≤ c := by\n rw [Square, mem_Rect (by simpa using by linarith) (by simp [cpos.le])] at hs\n simpa using hs\n have RectSub : Square (-1) c \\ {-1} ⊆ {0, -1}ᶜ := by\n refine fun s ⟨hs, hs1⟩ ↦ not_or.mpr ⟨?_, hs1⟩\n simpa [Complex.ext_iff] using fun _ _ ↦ by linarith [h_mem hs]\n have fHolo : HolomorphicOn (f x) (Square (-1) c \\ {-1}) := (isHolomorphicOn xpos).mono RectSub\n have f1Holo :\n HolomorphicOn ((f x) - (fun (s : ℂ) ↦ -x⁻¹ / (s + 1))) (Square (-1) c \\ {-1}) := by\n refine fHolo.sub <| (differentiableOn_const _).neg.div ?_\n fun x hx ↦ sPlusOneNeZero hx.2\n exact differentiableOn_id.add (differentiableOn_const 1)\n have RectMemNhds : Square (-1) c ∈ 𝓝 (-1) := square_mem_nhds (-1) (ne_of_gt cpos)\n obtain ⟨g, gHolo, g_eq_fDiff⟩ := existsDifferentiableOn_of_bddAbove RectMemNhds f1Holo bddAbove\n simp_rw [Square] at fHolo gHolo RectMemNhds\n refine ResidueTheoremOnRectangleWithSimplePole ?_ ?_ RectMemNhds gHolo ?_\n · simpa using cpos.le\n · simpa using cpos.le\n · convert g_eq_fDiff using 3; simp\n","line":848,"end_line":884,"proof_status":"formalized"} {"id":"residueAtZero","label":"residueAtZero","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ResidueTheoremOnRectangleWithSimplePole","diffBddAtZero","isHolomorphicOn","existsDifferentiableOn_of_bddAbove"],"nlp_text":"Let \\(x{\\gt}0\\). Then for all sufficiently small \\(c{\\gt}0\\), we have that \\[ \\frac1{2\\pi i} \\int _{-c-i*c}^{c+ i*c}\\frac{x^s}{s(s+1)}ds = 1. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residueAtZero","latex_link":"sect0003.html#residueAtZero","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residueAtZero","lean_decl_name":"Perron.residueAtZero","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"residueAtZero\"\n (title := \"residueAtZero\")\n (statement := /--\n Let $x>0$. Then for all sufficiently small $c>0$, we have that\n $$\n \\frac1{2\\pi i}\n \\int_{-c-i*c}^{c+ i*c}\\frac{x^s}{s(s+1)}ds = 1.\n $$\n -/)\n (latexEnv := \"lemma\")]\nlemma residueAtZero (xpos : 0 < x) : ∀ᶠ (c : ℝ) in 𝓝[>] 0,\n RectangleIntegral' (f x) (-c - c * I) (c + c * I) = 1 := by\n /-- For $c>0$ sufficiently small, -/\n filter_upwards [Ioo_mem_nhdsGT (by linarith : (0 : ℝ) < 1 / 2), diffBddAtZero xpos]\n intro c hc bddAbove\n obtain ⟨cpos, _⟩ := hc\n have RectSub : Square 0 c \\ {0} ⊆ {0, -1}ᶜ := by\n refine fun s ⟨hs, hs0⟩ ↦ not_or.mpr ⟨hs0, ?_⟩\n rw [Square, mem_Rect (by simpa using by linarith) (by simp [cpos.le])] at hs\n replace hs : -c ≤ s.re ∧ s.re ≤ c ∧ -c ≤ s.im ∧ s.im ≤ c := by simpa using hs\n simpa [Complex.ext_iff] using fun h ↦ by linarith\n have fHolo : HolomorphicOn (f x) (Square 0 c \\ {0}) := (isHolomorphicOn xpos).mono RectSub\n have f1Holo : HolomorphicOn ((f x) - (fun (s : ℂ) ↦ 1 / s)) (Square 0 c \\ {0}) :=\n fHolo.sub (by simpa using differentiableOn_inv.mono fun s hs ↦ hs.2)\n\n have RectMemNhds : Square 0 c ∈ 𝓝 0 := square_mem_nhds 0 (ne_of_gt cpos)\n /--\n $x^s/(s(s+1))$ is equal to $1/s$ plus a function, $g$, say,\n holomorphic in the whole rectangle (by Lemma \\ref{diffBddAtZero}).\n -/\n obtain ⟨g, gHolo, g_eq_fDiff⟩ := existsDifferentiableOn_of_bddAbove RectMemNhds f1Holo bddAbove\n simp_rw [Square, add_zero] at fHolo gHolo RectMemNhds\n /-- Now apply Lemma \\ref{ResidueTheoremOnRectangleWithSimplePole}. -/\n refine ResidueTheoremOnRectangleWithSimplePole ?_ ?_ RectMemNhds gHolo ?_\n any_goals simpa using cpos.le\n convert g_eq_fDiff using 3 <;> simp [Square]\n","line":808,"end_line":844,"proof_status":"formalized"} {"id":"residuePull2","label":"residuePull2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["residueAtNegOne","RectangleIntegral_tendsTo_VerticalIntegral","isIntegrable","tendsto_zero_Lower","Perron.tendsto_zero_Upper"],"nlp_text":"For \\(x{\\gt}1\\), we have \\[ \\frac1{2\\pi i} \\int _{(-1/2)}\\frac{x^s}{s(s+1)}ds = -1/x + \\frac1{2\\pi i} \\int _{(-3/2)}\\frac{x^s}{s(s+1)}ds. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residuePull2","latex_link":"sect0003.html#residuePull2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residuePull2","lean_decl_name":"Perron.residuePull2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"residuePull2\"\n (title := \"residuePull2\")\n (statement := /--\n For $x>1$, we have\n $$\n \\frac1{2\\pi i}\n \\int_{(-1/2)}\\frac{x^s}{s(s+1)}ds = -1/x +\n \\frac 1{2\\pi i}\n \\int_{(-3/2)}\\frac{x^s}{s(s+1)}ds.\n $$\n -/)\n (proof := /-- Pull contour from $(-1/2)$ to $(-3/2)$. -/)\n (latexEnv := \"lemma\")]\nlemma residuePull2 (x_gt_one : 1 < x) :\n VerticalIntegral' (fun s ↦ x ^ s / (s * (s + 1))) (-1 / 2)\n = -1 / x + VerticalIntegral' (fun s ↦ x ^ s / (s * (s + 1))) (-3 / 2) := by\n apply eq_add_of_sub_eq\n have xpos : 0 < x := zero_lt_one.trans x_gt_one\n have hf : HolomorphicOn (f x) (Icc (-3 / 2) (-1 / 2) ×ℂ univ \\ {-1}) :=\n (isHolomorphicOn xpos).mono fun s ⟨⟨⟨_, _⟩, _⟩, hs1⟩ hc ↦ hc.casesOn\n (fun hc ↦ by linarith [show s.re = 0 from congrArg _ hc]) (fun hc ↦ hs1 hc)\n have := (residueAtNegOne xpos).and <| verticalIntegral_sub_verticalIntegral_eq_squareIntegral\n (by simpa using ⟨by linarith, by linarith⟩) hf\n (tendsto_zero_Lower xpos _ _) (tendsto_zero_Upper xpos _ _)\n (isIntegrable xpos (by norm_num) (by norm_num))\n (isIntegrable xpos (by norm_num) (by norm_num))\n obtain ⟨c, hcf, hc⟩ := this.exists_mem\n obtain ⟨ε, hε, hεc⟩ := Metric.mem_nhdsWithin_iff.mp hcf\n replace hε := hc (ε/2)\n (hεc ⟨mem_ball_iff_norm.mpr (by simp [abs_of_pos, hε]), half_pos hε⟩)\n rw [VerticalIntegral', ← smul_sub, hε.2, ← RectangleIntegral', neg_div, one_div, ← ofReal_inv]\n exact hε.1\n","line":926,"end_line":958,"proof_status":"formalized"} {"id":"residuePull1","label":"residuePull1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["residueAtZero","RectangleIntegral_tendsTo_VerticalIntegral","isIntegrable","tendsto_zero_Lower","Perron.tendsto_zero_Upper"],"nlp_text":"For \\(x{\\gt}1\\) (of course \\(x{\\gt}0\\) would suffice) and \\(\\sigma {\\gt}0\\), we have \\[ \\frac1{2\\pi i} \\int _{(\\sigma )}\\frac{x^s}{s(s+1)}ds =1 + \\frac1{2\\pi i} \\int _{(-1/2)}\\frac{x^s}{s(s+1)}ds. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residuePull1","latex_link":"sect0003.html#residuePull1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.residuePull1","lean_decl_name":"Perron.residuePull1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"residuePull1\"\n (title := \"residuePull1\")\n (statement := /--\n For $x>1$ (of course $x>0$ would suffice) and $\\sigma>0$, we have\n $$\n \\frac1{2\\pi i}\n \\int_{(\\sigma)}\\frac{x^s}{s(s+1)}ds =1\n +\n \\frac 1{2\\pi i}\n \\int_{(-1/2)}\\frac{x^s}{s(s+1)}ds.\n $$\n -/)\n (proof := /--\n We pull to a square with corners at $-c-i*c$ and $c+i*c$ for $c>0$\n sufficiently small.\n By Lemma \\ref{residueAtZero}, the integral over this square is equal to $1$.\n -/)\n (latexEnv := \"lemma\")]\nlemma residuePull1 (x_gt_one : 1 < x) (σ_pos : 0 < σ) :\n VerticalIntegral' (f x) σ = 1 + VerticalIntegral' (f x) (-1 / 2) := by\n\n apply eq_add_of_sub_eq\n have xpos : 0 < x := zero_lt_one.trans x_gt_one\n have hf : HolomorphicOn (f x) (Icc (-1 / 2) σ ×ℂ univ \\ {0}) :=\n (isHolomorphicOn xpos).mono fun s ⟨⟨⟨_, _⟩, _⟩, hs0⟩ hc ↦ hc.casesOn\n (fun hc ↦ hs0 hc) (fun hc ↦ by linarith [show s.re = -1 from congrArg _ hc])\n have := (residueAtZero xpos).and <| verticalIntegral_sub_verticalIntegral_eq_squareIntegral\n (by simpa using ⟨by linarith, by linarith⟩) hf\n (tendsto_zero_Lower xpos _ _) (tendsto_zero_Upper xpos _ _)\n (isIntegrable xpos (by norm_num) (by norm_num))\n (isIntegrable xpos (by linarith) (by linarith))\n obtain ⟨c, hcf, hc⟩ := this.exists_mem\n obtain ⟨ε, hε, hεc⟩ := Metric.mem_nhdsWithin_iff.mp hcf\n obtain hε := hc (ε/2)\n (hεc ⟨mem_ball_iff_norm.mpr (by simp [abs_of_pos hε, hε]), half_pos hε⟩)\n rw [VerticalIntegral', ← smul_sub, hε.2, ← RectangleIntegral', add_zero, add_zero, hε.1]\n","line":887,"end_line":923,"proof_status":"formalized"} {"id":"formulaGtOne","label":"formulaGtOne","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["residuePull2","residuePull1","tendsto_rpow_atTop_nhds_zero_of_norm_gt_one","vertIntBoundLeft","contourPull3","limitOfConstantLeft"],"nlp_text":"For \\(x{\\gt}1\\) and \\(\\sigma {\\gt}0\\), we have \\[ \\frac1{2\\pi i} \\int _{(\\sigma )}\\frac{x^s}{s(s+1)}ds =1-1/x. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.formulaGtOne","latex_link":"sect0003.html#formulaGtOne","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.formulaGtOne","lean_decl_name":"Perron.formulaGtOne","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"formulaGtOne\"\n (title := \"formulaGtOne\")\n (statement := /--\n For $x>1$ and $\\sigma>0$, we have\n $$\n \\frac1{2\\pi i}\n \\int_{(\\sigma)}\\frac{x^s}{s(s+1)}ds =1-1/x.\n $$\n -/)\n (latexEnv := \"lemma\")]\nlemma formulaGtOne (x_gt_one : 1 < x) (σ_pos : 0 < σ) :\n VerticalIntegral' (fun s ↦ x^s / (s * (s + 1))) σ = 1 - 1 / x := by\n /-- Let $f(s) = x^s/(s(s+1))$. Then $f$ is holomorphic on $\\C \\setminus {0,-1}$. -/\n set f : ℂ → ℂ := (fun s ↦ x^s / (s * (s + 1)))\n /-- First pull the contour from $(\\sigma)$ to $(-1/2)$, picking up a residue $1$ at $s=0$. -/\n rw [residuePull1 x_gt_one σ_pos]\n /-- Next pull the contour from $(-1/2)$ to $(-3/2)$, picking up a residue $-1/x$ at\n $s=-1$. -/\n rw [residuePull2 x_gt_one]\n /-- Then pull the contour all the way to $(\\sigma')$ with $\\sigma'<-3/2$. -/\n have contourPull₃ (σ' σ'' : ℝ) (hσ' : σ' ≤ -3/2) (hσ'' : σ'' ≤ -3/2) :\n VerticalIntegral' f σ' = VerticalIntegral' f σ'' :=\n contourPull3 x_gt_one hσ' hσ''\n /-- For $\\sigma' < -3/2$, the integral is bounded by\n $x^{\\sigma'}\\int_\\R\\frac{1}{|(1+t ^ 2)(2+t ^ 2)|^{1/2}}dt$. -/\n have VertIntBound : ∃ C, ∀ σ' < -3/2, ‖VerticalIntegral' f σ'‖ ≤ C * x ^ σ' :=\n vertIntBoundLeft (by linarith : 0 < x)\n /-- Therefore $\\int_{(\\sigma')}\\to 0$ as $\\sigma'\\to\\infty$. -/\n have AbsVertIntTendsto : Tendsto ((‖·‖ : ℂ → ℝ) ∘ (VerticalIntegral' f)) atBot (𝓝 0) := by\n obtain ⟨C, hC⟩ := VertIntBound\n have := tendsto_rpow_atTop_nhds_zero_of_norm_gt_one x_gt_one C\n apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds this\n · filter_upwards using fun _ ↦ norm_nonneg _\n · filter_upwards [eventually_lt_atBot (-3/2)]\n (conv at hC => intro σ hσ; rw [mul_comm]); exact fun _ ↦ hC _\n /-- So pulling contours gives $\\int_{(-3/2)}=0$. -/\n rw [limitOfConstantLeft (σ := -3/2) (Eq.le rfl) contourPull₃ ?_]\n · ring\n · exact tendsto_zero_iff_norm_tendsto_zero.mpr AbsVertIntTendsto\n","line":985,"end_line":1024,"proof_status":"formalized"} {"id":"score-lowest","label":"score-lowest","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["score-lower-3"],"nlp_text":"One can bring any factorization into balance without increasing the score.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lowest_score","latex_link":"tertiary-chapter.html#score-lowest","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lowest_score","lean_decl_name":"Erdos392.Factorization.lowest_score","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"score-lowest\"\n (statement := /-- One can bring any factorization into balance without increasing the score. -/)\n (proof := /-- Apply strong induction on the total imbalance of the factorization and use the\n previous three sublemmas.-/)\n (latexEnv := \"lemma\")]\ntheorem Factorization.lowest_score {n : ℕ} (f : Factorization n) (L : ℕ) :\n ∃ f' : Factorization n, f'.total_imbalance = 0 ∧ f'.score L ≤ f.score L := by\n induction h : f.total_imbalance using Nat.strong_induction_on generalizing f with\n | _ k ih =>\n obtain rfl | hk := k.eq_zero_or_pos\n · exact ⟨f, h, le_refl _⟩\n · have step : ∀ g : Factorization n, g.total_imbalance < k →\n ∃ f' : Factorization n, f'.total_imbalance = 0 ∧ f'.score L ≤ g.score L :=\n fun g hg ↦ ih g.total_imbalance (h ▸ hg) g rfl\n have reduce (f₁ : Factorization n) (hlt : f₁.total_imbalance < f.total_imbalance)\n (hle : f₁.score L ≤ f.score L) :\n ∃ f' : Factorization n, f'.total_imbalance = 0 ∧ f'.score L ≤ f.score L :=\n let ⟨f', hbal, hle'⟩ := step f₁ (h ▸ hlt); ⟨f', hbal, hle'.trans hle⟩\n by_cases h1 : ∃ p ∈ (n + 1).primesBelow, f.balance p > 0\n · exact let ⟨f₁, hlt, hle⟩ := lower_score_1 f L h1; reduce f₁ hlt hle\n · by_cases h2 : ∃ p ∈ (n + 1).primesBelow, p > L ∧ f.balance p < 0\n · exact let ⟨f₁, hlt, hle⟩ := lower_score_2 f L h2; reduce f₁ hlt hle\n · have h3 : ∃ p ∈ (n + 1).primesBelow, p ≤ L ∧ f.balance p < 0 := by\n push_neg at h1 h2; by_contra hc; push_neg at hc\n exact hk.ne' <| h ▸ sum_eq_zero fun p hp ↦ by\n have := h1 p hp; have := if hpL : p ≤ L then hc p hp hpL\n else h2 p hp (lt_of_not_ge hpL); omega\n exact let ⟨f₁, hlt, hle⟩ := lower_score_3 f L h3; reduce f₁ hlt hle","line":836,"end_line":864,"proof_status":"formalized"} {"id":"card-bound","label":"card-bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["score-lowest","waste-eq"],"nlp_text":"Starting from any factorization \\(f\\), one can find a factorization \\(f'\\) in balance whose cardinality is at most \\(\\log n!\\) plus the score of \\(f\\), divided by \\(\\log n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.card_bound","latex_link":"tertiary-chapter.html#card-bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.card_bound","lean_decl_name":"Erdos392.Factorization.card_bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":true,"source_repo":"mathlib","source_path":"./Mathlib/Combinatorics/SimpleGraph/Triangle/Removal.lean","lean4_code":"private lemma card_bound (hP₁ : P.IsEquipartition) (hP₃ : #P.parts ≤ bound (ε / 8) ⌈4 / ε⌉₊)\n (hX : s ∈ P.parts) : card α / (2 * bound (ε / 8) ⌈4 / ε⌉₊ : ℝ) ≤ #s := by\n cases isEmpty_or_nonempty α\n · simp [Fintype.card_eq_zero]\n have := Finset.Nonempty.card_pos ⟨_, hX⟩\n calc\n _ ≤ card α / (2 * #P.parts : ℝ) := by gcongr\n _ ≤ ↑(card α / #P.parts) :=\n (div_le_iff₀' (by positivity)).2 <| mod_cast (aux ‹_› P.card_parts_le_card).le\n _ ≤ (#s : ℝ) := mod_cast hP₁.average_le_card_part hX\n\nprivate lemma triangle_removal_aux (hε : 0 < ε) (hP₁ : P.IsEquipartition)\n (hP₃ : #P.parts ≤ bound (ε / 8) ⌈4 / ε⌉₊)\n (ht : t ∈ (G.regularityReduced P (ε / 8) (ε / 4)).cliqueFinset 3) :\n triangleRemovalBound ε * card α ^ 3 ≤ #(G.cliqueFinset 3) := by\n rw [mem_cliqueFinset_iff, is3Clique_iff] at ht\n obtain ⟨x, y, z, ⟨-, s, hX, Y, hY, xX, yY, nXY, uXY, dXY⟩,\n ⟨-, X', hX', Z, hZ, xX', zZ, nXZ, uXZ, dXZ⟩,\n ⟨-, Y', hY', Z', hZ', yY', zZ', nYZ, uYZ, dYZ⟩, rfl⟩ := ht\n cases P.disjoint.elim hX hX' (not_disjoint_iff.2 ⟨x, xX, xX'⟩)\n cases P.disjoint.elim hY hY' (not_disjoint_iff.2 ⟨y, yY, yY'⟩)\n cases P.disjoint.elim hZ hZ' (not_disjoint_iff.2 ⟨z, zZ, zZ'⟩)\n have dXY := P.disjoint hX hY nXY\n have dXZ := P.disjoint hX hZ nXZ\n have dYZ := P.disjoint hY hZ nYZ\n have that : 2 * (ε/8) = ε/4 := by ring\n have : 0 ≤ 1 - 2 * (ε / 8) := by\n have : ε / 4 ≤ 1 := ‹ε / 4 ≤ _›.trans (by exact mod_cast G.edgeDensity_le_one _ _); linarith\n calc\n _ ≤ (1 - ε/4) * (ε/(16 * bound (ε/8) ⌈4/ε⌉₊))^3 * card α ^ 3 := by\n gcongr; exact min_le_right _ _\n _ = (1 - 2 * (ε / 8)) * (ε / 8) ^ 3 * (card α / (2 * bound (ε / 8) ⌈4 / ε⌉₊)) *\n (card α / (2 * bound (ε / 8) ⌈4 / ε⌉₊)) * (card α / (2 * bound (ε / 8) ⌈4 / ε⌉₊)) := by\n ring\n _ ≤ (1 - 2 * (ε / 8)) * (ε / 8) ^ 3 * #s * #Y * #Z := by\n gcongr <;> exact card_bound hP₁ hP₃ ‹_›\n _ ≤ _ :=\n triangle_counting G (by rwa [that]) uXY dXY (by rwa [that]) uXZ dXZ (by rwa [that]) uYZ dYZ\n\n","line":57,"end_line":95,"proof_status":"formalized"} {"id":"Dusart_prop_5_12","label":"Dusart_prop_5_12","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"We have for \\(k \\geq 781\\), \\[ \\vartheta (p_k) \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2}{\\log k} - \\frac{0.782}{\\log ^2 k}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_12","latex_link":"secondary-chapter.html#Dusart_prop_5_12","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_12","lean_decl_name":"Dusart.proposition_5_12","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_5_12\"\n (title := \"Dusart Proposition 5.12\")\n (statement := /--\n We have for $k \\geq 781$,\n \\[\n \\vartheta(p_k) \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2}{\\log k} - \\frac{0.782}{\\log^2 k}.\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_5_12 {k : ℕ} (hk : k ≥ 781) :\n θ (nth Nat.Prime k) ≤ k * Real.log k + Real.log (Real.log k) - 1 + (Real.log (Real.log k) - 2) / (Real.log k) - 0.782 / (Real.log k) ^ 2 := by sorry\n","line":456,"end_line":466,"proof_status":"formalized"} {"id":"RectanglePullToNhdOfPole","label":"RectanglePullToNhdOfPole","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RectangleBorder","HolomorphicOn.vanishesOnRectangle"],"nlp_text":"If \\(f\\) is holomorphic on a rectangle \\(z\\) and \\(w\\) except at a point \\(p\\), then the integral of \\(f\\) over the rectangle with corners \\(z\\) and \\(w\\) is the same as the integral of \\(f\\) over a small square centered at \\(p\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectanglePullToNhdOfPole","latex_link":"sect0003.html#RectanglePullToNhdOfPole","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectanglePullToNhdOfPole","lean_decl_name":"RectanglePullToNhdOfPole","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"lemma RectanglePullToNhdOfPole' [CompleteSpace E] {z₀ z₁ z₂ z₃ p : ℂ}\n (h_orientation : z₀.re ≤ z₃.re ∧ z₀.im ≤ z₃.im ∧ z₁.re ≤ z₂.re ∧ z₁.im ≤ z₂.im)\n (hp : Rectangle z₁ z₂ ∈ 𝓝 p) (hz : Rectangle z₁ z₂ ⊆ Rectangle z₀ z₃)\n (fHolo : HolomorphicOn f (Rectangle z₀ z₃ \\ {p})) :\n RectangleIntegral f z₀ z₃ = RectangleIntegral f z₁ z₂ := by\n obtain ⟨hz₀_re, hz₀_im, hz₁_re, hz₁_im⟩ := h_orientation\n have := rect_subset_iff.mp hz\n rw [Rectangle, uIcc_of_le hz₀_re, uIcc_of_le hz₀_im] at this\n obtain ⟨⟨⟨_, _⟩, ⟨_, _⟩⟩, ⟨_, _⟩, ⟨_, _⟩⟩ := this\n obtain ⟨⟨_, _⟩, ⟨_, _⟩⟩ := (uIoo_of_le hz₁_re) ▸ (uIoo_of_le hz₁_im) ▸ rectangle_mem_nhds_iff.mp hp\n obtain ⟨_, _, _, _⟩ := show p.re < z₂.re ∧ p.re < z₃.re ∧ p.im < z₂.im ∧ p.im < z₃.im from\n ⟨by linarith, by linarith, by linarith, by linarith⟩\n obtain ⟨_, _, _, _⟩ := show z₀.re < p.re ∧ z₁.re < p.re ∧ z₀.im < p.im ∧ z₁.im < p.im from\n ⟨by linarith, by linarith, by linarith, by linarith⟩\n\n have fCont := fHolo.continuousOn\n\n have hbot : RectangleBorderIntegrable f (↑z₀.re + ↑z₀.im * I) (↑z₃.re + ↑z₃.im * I) := ?_\n have htop : RectangleBorderIntegrable f (↑z₀.re + ↑z₁.im * I) (↑z₃.re + ↑z₃.im * I) := ?_\n have hleft : RectangleBorderIntegrable f (↑z₀.re + ↑z₁.im * I) (↑z₃.re + ↑z₂.im * I) := ?_\n have hright : RectangleBorderIntegrable f (↑z₁.re + ↑z₁.im * I) (↑z₃.re + ↑z₂.im * I) := ?_\n all_goals try {\n refine (fCont.mono (rectangleBorder_subset_punctured_rect ?_ ?_)).rectangleBorder_integrable\n · simp_all\n · simpa using ⟨by linarith, by linarith, by linarith, by linarith⟩\n }\n have hbot' : z₁.im ∈ [[z₀.im, z₃.im]] := ?_\n have htop' : z₂.im ∈ [[z₁.im, z₃.im]] := ?_\n have hleft' : z₁.re ∈ [[z₀.re, z₃.re]] := ?_\n have hright' : z₂.re ∈ [[z₁.re, z₃.re]] := ?_\n all_goals try { rw [Set.uIcc_of_le]; constructor; all_goals assumption }\n have hbot'' : Rectangle (↑z₀.re + ↑z₀.im * I) (↑z₃.re + ↑z₁.im * I) ⊆ Rectangle z₀ z₃ \\ {p} := ?_\n have htop'' : Rectangle (↑z₀.re + ↑z₂.im * I) (↑z₃.re + ↑z₃.im * I) ⊆ Rectangle z₀ z₃ \\ {p} := ?_\n have hleft'' : Rectangle (↑z₀.re + ↑z₁.im * I) (↑z₁.re + ↑z₂.im * I) ⊆ Rectangle z₀ z₃ \\ {p} := ?_\n have hright'' : Rectangle (↑z₂.re + ↑z₁.im * I) (↑z₃.re + ↑z₂.im * I) ⊆ Rectangle z₀ z₃ \\ {p} := ?_\n all_goals try { apply rectangle_subset_punctured_rect <;> simp_all }\n\n have h₁ := RectangleIntegralVSplit' hbot' hbot\n have h₂ := fHolo.vanishesOnRectangle hbot''\n have h₃ := RectangleIntegralVSplit' htop' htop\n have h₄ := fHolo.vanishesOnRectangle htop''\n have h₅ := RectangleIntegralHSplit' hleft' hleft\n have h₆ := fHolo.vanishesOnRectangle hleft''\n have h₇ := RectangleIntegralHSplit' hright' hright\n have h₈ := fHolo.vanishesOnRectangle hright''\n simp only [re_add_im] at *\n additive_combination h₁ + h₂ + h₃ + h₄ + h₅ + h₆ + h₇ + h₈\n","line":284,"end_line":330,"proof_status":"formalized"} {"id":"fks2-theorem-6-3","label":"fks2-theorem-6-3","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["li-def"],"nlp_text":"With the hypotheses of Theorem 9.6.2, for all \\(x \\geq x_1\\) we have \\[ \\frac{\\log x}{x} \\int _{x_1}^x \\frac{dt}{\\log ^2 t} \\leq \\frac{\\log x_2}{x_2} \\left( \\operatorname {Li}(x_2) - \\frac{x_2}{\\log x_2} - \\operatorname {Li}(x_1) + \\frac{x_1}{\\log x_1} \\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6_3","latex_link":"secondary-chapter.html#fks2-theorem-6-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6_3","lean_decl_name":"FKS2.theorem_6_3","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-theorem-6-3\"\n (title := \"FKS2 Theorem 6, substep 3\")\n (statement := /-- With the hypotheses of Theorem \\ref{fks2-theorem-6}, for all $x \\geq x_1$ we have\n $$ \\frac{\\log x}{x} \\int_{x_1}^x \\frac{dt}{\\log^2 t} \\leq \\frac{\\log x_2}{x_2} \\left( \\Li(x_2) - \\frac{x_2}{\\log x_2} - \\Li(x_1) + \\frac{x_1}{\\log x_1} \\right ). $$ -/)\n (proof := /-- Let $f(x)$ be as in the previous sublemma. Notice that by assumption $x_1 \\leq x \\leq x_2 \\leq x_1 \\log x_1 < x_m$, so that\n $$ f(x) \\leq f(x_2) = \\frac{\\log x_2}{x_2} \\left( \\Li(x_2) - \\frac{x_2}{\\log x_2} - \\Li(x_1) + \\frac{x_1}{\\log x_1} \\right). $$ -/)\n (latexEnv := \"sublemma\")\n (discussion := 717)]\ntheorem theorem_6_3 {x₁ : ℝ} (h : x₁ ≥ 14) (x₂ : ℝ) (hx₂ : x₂ ≥ x₁) (x : ℝ) (hx : x ≥ x₁) (hx' : x ≤ x₂) :\n (log x / x) * ∫ t in x₁..x, 1 / (log t) ^ 2 ≤\n (log x₂ / x₂) * (Li x₂ - x₂ / log x₂ - Li x₁ + x₁ / log x₁) :=\n sorry","line":652,"end_line":664,"proof_status":"statement_formalized"} {"id":"AnalyticOn_divRemovable_zero","label":"AnalyticOn_divRemovable_zero","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["divRemovable_zero"],"nlp_text":"Let \\(f\\) be a complex function analytic on an open set \\(s\\) containing \\(0\\) such that \\(f(0)=0\\). Then, with \\(g\\) defined as in Definition 4.3.1, \\(g\\) is analytic on \\(s\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/AnalyticOn_divRemovable_zero","latex_link":"sect0004.html#AnalyticOn_divRemovable_zero","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/AnalyticOn_divRemovable_zero","lean_decl_name":"AnalyticOn_divRemovable_zero","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint\n (statement := /--\n Let $f$ be a complex function analytic on an open set $s$ containing $0$ such that $f(0)=0$.\n Then, with $g$ defined as in Definition~\\ref{divRemovable_zero}, $g$ is analytic on $s$.\n -/)\n (proof := /--\n We need to show that $g$ is complex differentiable at every point in $s$.\n For $z\\neq 0$, this follows directly from the definition of $g$ and the fact that $f$ is\n analytic on $s$. For $z=0$, we use the definition of the derivative and the fact that\n $f(0)=0$:\n \\[\n \\lim_{z\\to 0}\\frac{g(z)-g(0)}{z-0}=\\lim_{z\\to 0}\\frac{\\frac{f(z)}{z}-f'(0)}{z}\n =\\lim_{z\\to 0}\\frac{f(z)-f'(0)z}{z^2}\n =\\lim_{z\\to 0}\\frac{f(z)-f(0)-f'(0)(z-0)}{(z-0)^2}=0,\n \\]\n where the last equality follows from the definition of the derivative of $f$ at $0$.\n Thus, $g$ is complex differentiable at $0$ with derivative $0$, completing the proof.\n -/)\n (latexEnv := \"lemma\")]\nlemma AnalyticOn_divRemovable_zero {f : ℂ → ℂ} {s : Set ℂ}\n (sInNhds0 : s ∈ nhds 0) (zero : f 0 = 0) (o : IsOpen s)\n (analytic : AnalyticOn ℂ f s) : AnalyticOn ℂ (divRemovable_zero f) s := by\n rw [Complex.analyticOn_iff_differentiableOn o,\n ←(Complex.differentiableOn_compl_singleton_and_continuousAt_iff sInNhds0)]\n constructor\n · rw [differentiableOn_congr\n (by intro x hyp_x; apply Function.update_of_ne; rw [Set.mem_diff,\n Set.mem_singleton_iff] at hyp_x; rw [ne_eq]; exact hyp_x.right)]\n exact DifferentiableOn.fun_div\n (AnalyticOn.differentiableOn (AnalyticOn.mono analytic Set.diff_subset))\n (DifferentiableOn.mono (differentiableOn_id (s := Set.univ))\n (Set.subset_univ (s \\ {0}))) (by intro x hyp_x; rw [Set.mem_diff,\n Set.mem_singleton_iff] at hyp_x; rw [ne_eq]; exact hyp_x.right)\n\n · have U := HasDerivAt.continuousAt_div (c := 0) (a := (deriv f) 0) (f := f)\n (DifferentiableOn.hasDerivAt\n ((Complex.analyticOn_iff_differentiableOn o).mp analytic) sInNhds0)\n have T : (fun (x : ℂ) ↦ (f x - 0) / (x - 0)) = (fun (x : ℂ) ↦ (f x) / x) := by\n funext x; rw [sub_zero, sub_zero]\n rwa [zero, T] at U\n","line":37,"end_line":76,"proof_status":"formalized"} {"id":"AnalyticOn_divRemovable_zero_closedBall","label":"AnalyticOn_divRemovable_zero_closedBall","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["AnalyticOn_divRemovable_zero","divRemovable_zero_of_ne_zero"],"nlp_text":"Let \\(f\\) be a complex function analytic on the closed ball \\(|z|\\leq R\\) such that \\(f(0)=0\\). Then, with \\(g\\) defined as in Definition 4.3.1, \\(g\\) is analytic on \\(|z|\\leq R\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/AnalyticOn_divRemovable_zero_closedBall","latex_link":"sect0004.html#AnalyticOn_divRemovable_zero_closedBall","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/AnalyticOn_divRemovable_zero_closedBall","lean_decl_name":"AnalyticOn_divRemovable_zero_closedBall","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint\n (statement := /--\n Let $f$ be a complex function analytic on the closed ball $|z|\\leq R$ such that $f(0)=0$.\n Then, with $g$ defined as in Definition~\\ref{divRemovable_zero}, $g$ is analytic on\n $|z|\\leq R$.\n -/)\n (proof := /--\n The proof is similar to that of Lemma~\\ref{AnalyticOn_divRemovable_zero}, but we need to\n consider two cases: when $x$ is on the boundary of the closed ball and when it is in the\n interior.\n In the first case, we take a small open ball around $x$ that lies entirely within the\n closed ball, and apply Lemma~\\ref{AnalyticOn_divRemovable_zero} on this smaller ball.\n In the second case, we can take the entire open ball centered at $0$ with radius $R$,\n and again apply Lemma~\\ref{AnalyticOn_divRemovable_zero}.\n In both cases, we use the fact that $f(0)=0$ to ensure that the removable singularity at\n $0$ is handled correctly.\n -/)\n (latexEnv := \"lemma\")]\nlemma AnalyticOn_divRemovable_zero_closedBall {f : ℂ → ℂ} {R : ℝ}\n (Rpos : 0 < R) (analytic : AnalyticOn ℂ f (Metric.closedBall 0 R))\n (zero : f 0 = 0) : AnalyticOn ℂ (divRemovable_zero f) (Metric.closedBall 0 R) := by\n apply analyticOn_of_locally_analyticOn\n intro x x_hyp\n by_cases h : ‖x‖ = R\n · use Metric.ball x (R / 2)\n constructor\n · exact Metric.isOpen_ball\n · constructor\n · simp only [Metric.mem_ball, dist_self, Nat.ofNat_pos, div_pos_iff_of_pos_right]\n positivity\n · have Z : ∀ w ∈ Metric.closedBall 0 R ∩ Metric.ball x (R / 2),\n divRemovable_zero f w = f w / w := by\n intro x₂ hyp_x₂\n apply divRemovable_zero_of_ne_zero\n rw [ball_eq, Set.mem_inter_iff, Metric.mem_closedBall, dist_zero_right,\n Set.mem_setOf_eq] at hyp_x₂\n rw [← norm_pos_iff]\n calc 0\n _ < R - ‖x₂ - x‖ := by let ⟨u,v⟩ := hyp_x₂; linarith\n _ = ‖x‖ - ‖x - x₂‖ := by rw [h]; simp only [sub_right_inj]; apply norm_sub_rev\n _ ≤ ‖x - (x - x₂)‖ := by apply norm_sub_norm_le\n _ ≤ ‖x₂‖ := by simp only [sub_sub_cancel, le_refl]\n\n apply AnalyticOn.congr\n · apply AnalyticOn.div (AnalyticOn.mono analytic Set.inter_subset_left) analyticOn_id\n · intro x₁ hyp_x₁\n rw [ball_eq, Set.mem_inter_iff, Metric.mem_closedBall, dist_zero_right,\n Set.mem_setOf_eq] at hyp_x₁\n rw [← norm_pos_iff]\n calc 0\n _ < R - ‖x₁ - x‖ := by let ⟨u, v⟩ := hyp_x₁; linarith\n _ = ‖x‖ - ‖-(x₁ - x)‖ := by\n rw [h, neg_sub, sub_right_inj]; apply norm_sub_rev\n _ ≤ ‖x - (-(x₁ - x))‖ := by apply norm_sub_norm_le\n _ = ‖x₁‖ := by rw [neg_sub, sub_sub_cancel]\n\n · simp only [Set.EqOn.eq_1, Set.mem_inter_iff, Metric.mem_closedBall, dist_zero_right,\n Metric.mem_ball, and_imp]\n intro x₃ hyp_x₃ dist_hyp\n have : x₃ ∈ Metric.closedBall 0 R ∩ Metric.ball x (R / 2) := by\n apply Set.mem_inter\n · rw [Metric.mem_closedBall, dist_zero_right]; exact hyp_x₃\n · rw [Metric.mem_ball]; exact dist_hyp\n exact Z x₃ this\n\n · use Metric.ball 0 R\n constructor\n · exact Metric.isOpen_ball\n · constructor\n · simp only [ball_eq, sub_zero, Set.mem_setOf_eq]; simp only [Metric.mem_closedBall,\n dist_zero_right] at x_hyp\n apply lt_of_le_of_ne x_hyp\n · rw [ne_eq]; exact h\n · have si : Metric.closedBall (0 : ℂ) R ∩ Metric.ball (0 : ℂ) R =\n Metric.ball (0 : ℂ) R := by\n apply Set.inter_eq_self_of_subset_right\n rw [Metric.mem_closedBall, dist_zero_right] at x_hyp\n exact Metric.ball_subset_closedBall\n rw [si]\n apply AnalyticOn_divRemovable_zero\n · apply Metric.ball_mem_nhds; positivity\n · exact zero\n · apply Metric.isOpen_ball\n · apply AnalyticOn.mono analytic Metric.ball_subset_closedBall\n","line":82,"end_line":165,"proof_status":"formalized"} {"id":"AnalyticOn.schwartzQuotient","label":"AnalyticOn.schwartzQuotient","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["AnalyticOn_divRemovable_zero_closedBall","schwartzQuotient"],"nlp_text":"Let \\(M{\\gt}0\\). Let \\(f\\) be analytic on the closed ball \\(|z|\\leq R\\) such that \\(f(0)=0\\) and suppose that \\(2M - f(z)\\neq 0\\) for all \\(|z|\\leq R\\). Then, with \\(f_{M}\\) defined as in Definition 4.3.2, \\(f_{M}\\) is analytic on \\(|z|\\leq R\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/AnalyticOn.schwartzQuotient","latex_link":"sect0004.html#AnalyticOn.schwartzQuotient","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/AnalyticOn.schwartzQuotient","lean_decl_name":"AnalyticOn.schwartzQuotient","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint\n (statement := /--\n Let $M>0$. Let $f$ be analytic on the closed ball $|z|\\leq R$ such that $f(0)=0$\n and suppose that $2M - f(z)\\neq 0$ for all $|z|\\leq R$.\n Then, with $f_{M}$ defined as in Definition~\\ref{schwartzQuotient}, $f_{M}$ is analytic on\n $|z|\\leq R$.\n -/)\n (proof := /--\n This follows directly from Lemma~\\ref{AnalyticOn_divRemovable_zero_closedBall} and the fact\n that the difference of two analytic functions is analytic.\n -/)\n (latexEnv := \"lemma\")]\nlemma AnalyticOn.schwartzQuotient {f : ℂ → ℂ} {R : ℝ} (M : ℝ)\n (Rpos : 0 < R) (analytic : AnalyticOn ℂ f (Metric.closedBall 0 R))\n (nonzero : ∀ z ∈ Metric.closedBall 0 R, 2 * M - f z ≠ 0)\n (zero : f 0 = 0) : AnalyticOn ℂ (schwartzQuotient f M) (Metric.closedBall 0 R) :=\n AnalyticOn.div\n (AnalyticOn_divRemovable_zero_closedBall Rpos analytic zero)\n (AnalyticOn.sub (analyticOn_const) analytic) nonzero","line":177,"end_line":195,"proof_status":"formalized"} {"id":"borelCaratheodory-closedBall","label":"borelCaratheodory-closedBall","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["AnalyticOn.schwartzQuotient","Complex.norm_le_norm_two_mul_sub_of_re_le"],"nlp_text":"Let \\(R,\\, M{\\gt}0\\). Let \\(f\\) be analytic on \\(|z|\\leq R\\) such that \\(f(0)=0\\) and suppose \\(\\Re f(z)\\leq M\\) for all \\(|z|\\leq R\\). Then for any \\(0 {\\lt} r {\\lt} R\\), \\[ \\sup _{|z|\\leq r}|f(z)|\\leq \\frac{2Mr}{R-r}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/borelCaratheodory_closedBall","latex_link":"sect0004.html#borelCaratheodory-closedBall","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/borelCaratheodory_closedBall","lean_decl_name":"borelCaratheodory_closedBall","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint \"borelCaratheodory-closedBall\"\n (title := \"borelCaratheodory-closedBall\")\n (statement := /--\n Let $R,\\,M>0$. Let $f$ be analytic on $|z|\\leq R$ such that $f(0)=0$ and suppose\n $\\Re f(z)\\leq M$ for all $|z|\\leq R$. Then for any $0 < r < R$,\n $$\\sup_{|z|\\leq r}|f(z)|\\leq\\frac{2Mr}{R-r}.$$\n -/)\n (proof := /--\n Let\n $$f_M(z)=\\frac{f(z)/z}{2M-f(z)}.$$\n Note that $2M-f(z)\\neq 0$ because $\\Re (2M-f(z))=2M-\\Re f(z)\\geq M>0$. Additionally, since\n $f(z)$ has a zero at $0$, we know that $f(z)/z$ is analytic on $|z|\\leq R$. Likewise,\n $f_M(z)$ is analytic on $|z|\\leq R$.\n\n Now note that $|f(z)|\\leq|2M-f(z)|$ since $\\Re f(z)\\leq M$. Thus we have that\n $$|f_M(z)|=\\frac{|f(z)|/|z|}{|2M-f(z)|}\\leq\\frac{1}{|z|}.$$\n Now by the maximum modulus principle, we know the maximum of $|f_M|$ must occur on the\n boundary where $|z|=R$. Thus, $|f_M(z)|\\leq 1/R$ for all $|z|\\leq R$. So for $|z|=r$ we have\n $$|f_M(z)|=\\frac{|f(z)|/r}{|2M-f(z)|}\\leq\\frac{1}{R}\\implies R\\,|f(z)|\\leq r\\,|2M-f(z)|\\leq\n 2Mr+r\\,|f(z)|.$$\n Which by algebraic manipulation gives\n $$|f(z)|\\leq\\frac{2Mr}{R-r}.$$\n Once more, by the maximum modulus principle, we know the maximum of $|f|$ must occur on the\n boundary where $|z|=r$. Thus, the desired result immediately follows\n -/)]\ntheorem borelCaratheodory_closedBall {M R r : ℝ} {z : ℂ} {f : ℂ → ℂ}\n (Rpos : 0 < R) (analytic : AnalyticOn ℂ f (Metric.closedBall 0 R))\n (zeroAtZero : f 0 = 0) (Mpos : 0 < M)\n (realPartBounded : ∀ z ∈ Metric.closedBall 0 R, (f z).re ≤ M)\n (hyp_r : r < R) (hyp_z : z ∈ Metric.closedBall 0 r)\n : ‖f z‖ ≤ (2 * M * r) / (R - r) := by\n\n have zInSFunc :\n ∀ r ≤ R, ∀ z ∈ Metric.sphere (0 : ℂ) r, z ∈ Metric.closedBall (0 : ℂ) R := by\n intro r hyp_r z hyp_z\n apply Set.mem_of_mem_of_subset (s := Metric.sphere 0 r) hyp_z\n · calc Metric.sphere (0 : ℂ) r\n _ ⊆ Metric.closedBall (0 : ℂ) r := Metric.sphere_subset_closedBall\n _ ⊆ Metric.closedBall (0 : ℂ) R := Metric.closedBall_subset_closedBall hyp_r\n\n have fPosAll : ∀ z ∈ Metric.closedBall 0 R, 2 * M - f z ≠ 0 := by\n intro z zInS\n exact Complex.ne_zero_of_re_pos (by\n rw [Complex.sub_re, Complex.mul_re, Complex.re_ofNat, Complex.ofReal_re, Complex.im_ofNat,\n Complex.ofReal_im, mul_zero, sub_zero, sub_pos]\n linarith [realPartBounded z zInS])\n\n have schwartzQuotientBounded :\n ∀ z ∈ Metric.sphere 0 R, ‖schwartzQuotient f M z‖ ≤ 1 / R := by\n intro z hyp_z\n have zNe0 : z ≠ 0 := by\n rw [mem_sphere_zero_iff_norm] at hyp_z\n exact ne_zero_of_norm_ne_zero (by linarith)\n have zInS : z ∈ Metric.closedBall 0 R := zInSFunc R (by rfl) z hyp_z\n rw [mem_sphere_iff_norm, sub_zero] at hyp_z\n\n calc ‖schwartzQuotient f M z‖\n _ = (‖f z‖ / ‖z‖) / ‖2 * M - f z‖ := by\n simp only [Complex.norm_div, divRemovable_zero_of_ne_zero f zNe0]\n _ ≤ (‖f z‖ / ‖z‖) / ‖f z‖ := by\n by_cases h : ‖f z‖ = 0;\n · simp only [h, zero_div, div_zero, le_refl]\n · exact div_le_div_of_nonneg_left (by positivity) (by positivity)\n (Complex.norm_le_norm_two_mul_sub_of_re_le Mpos (realPartBounded z zInS))\n _ ≤ (1 / ‖z‖) := by\n by_cases h : ‖f z‖ = 0\n · rw [h, zero_div, div_zero, one_div, inv_nonneg]; apply norm_nonneg\n · rw [div_div, mul_comm, ← div_div, div_self]; exact h\n _ = 1 / R := by rw [hyp_z]\n\n have maxMod : ∀ z ∈ Metric.closedBall 0 R, ‖schwartzQuotient f M z‖ ≤ 1 / R := by\n exact AnalyticOn.norm_le_of_norm_le_on_sphere\n (AnalyticOn.schwartzQuotient M Rpos analytic fPosAll zeroAtZero)\n (by rfl) schwartzQuotientBounded\n\n have boundForF :\n ∀ r < R, 0 < r → ∀ z ∈ Metric.sphere 0 r, ‖f z‖ ≤ 2 * M * r / (R - r) := by\n intro r hyp_r r_pos z zOnR\n have zInS : z ∈ Metric.closedBall 0 R := zInSFunc r (by linarith) z (zOnR)\n rw [mem_sphere_zero_iff_norm] at zOnR\n have := maxMod z zInS\n unfold schwartzQuotient at this\n have U : z ≠ 0 := by rw [← norm_pos_iff]; linarith\n rw [divRemovable_zero_of_ne_zero f U] at this\n simp only [Complex.norm_div, one_div] at this\n have U : 0 < r * ‖2 * M - f z‖ := by\n simp only [r_pos, mul_pos_iff_of_pos_left, norm_pos_iff, ne_eq, fPosAll z zInS,\n not_false_eq_true]\n rw [zOnR, div_div, div_le_iff₀' U] at this\n have U0 : ‖f z‖ ≤ 2 * M * r / R + ( r / R ) * ‖f z‖ := by\n calc ‖f z‖\n _ ≤ r * ‖2 * M - f z‖ * R⁻¹ := this\n _ ≤ r * (‖(2 : ℂ) * M‖ + ‖f z‖) * R⁻¹ := by\n gcongr; apply norm_sub_le (E := ℂ) ((2 : ℂ) * ↑M) (f z)\n _ = r * (2 * M + ‖f z‖) * R⁻¹ := by\n have U : ‖(2 : ℂ) * M‖ = 2 * M := by\n simp only [Complex.norm_mul, Complex.norm_ofNat, Complex.norm_real, Real.norm_eq_abs,\n mul_eq_mul_left_iff, abs_eq_self, OfNat.ofNat_ne_zero, or_false]\n linarith\n rw [U]\n _ = 2 * M * r / R + (r / R) * ‖f z‖ := by ring_nf\n have U1 : ‖f z‖ - ‖f z‖ * (r * R⁻¹) = ‖f z‖ * (1 - r * R⁻¹) := by ring\n have U2 : (0 : ℝ) < 1 - r * R⁻¹ := by\n have U1 : 0 < R := by linarith\n have U : r * R⁻¹ < 1 := by simp only [← div_lt_one₀ U1] at hyp_r; exact hyp_r\n linarith\n have U3 : r * R⁻¹ * M * 2 / (1 - r * R⁻¹) = 2 * M * r / (R - r) := by\n have : R ≠ 0 := by linarith\n rw [← mul_div_mul_left (r * R⁻¹ * M * (2 : ℝ)) ((1 : ℝ) - r * R⁻¹) this ];\n ring_nf\n have U : R * r * R⁻¹ = r := by\n rw [mul_comm, ← mul_assoc, ← mul_comm R R⁻¹, CommGroupWithZero.mul_inv_cancel R this,\n one_mul]\n rw [U]\n\n rw [← sub_le_sub_iff_right ((r / R) * ‖f z‖)] at U0; ring_nf at U0\n rw [mul_assoc, U1, ← le_div_iff₀ U2, U3] at U0\n exact U0\n\n have maxBoundForF :\n ∀ r < R, 0 < r → ∀ z ∈ Metric.closedBall 0 r, ‖f z‖ ≤ 2 * M * r / (R - r) := by\n intro r hyp_r pos_r\n exact AnalyticOn.norm_le_of_norm_le_on_sphere analytic\n (by linarith) (boundForF r hyp_r pos_r)\n\n by_cases pos_r : r = 0\n · have U : z = 0 := by\n rw [pos_r, Metric.closedBall_zero, Set.mem_singleton_iff] at hyp_z; exact hyp_z\n rw [U, pos_r]; rw [mul_zero, sub_zero, zero_div, norm_le_zero_iff]; exact zeroAtZero\n · have U : 0 ≤ r := by\n rw [mem_closedBall_iff_norm, sub_zero] at hyp_z; linarith [norm_nonneg z]\n exact maxBoundForF r (by linarith)\n (by\n apply lt_of_le_of_ne U\n · rw [ne_eq, eq_comm]; exact pos_r) z hyp_z\n","line":241,"end_line":375,"proof_status":"formalized"} {"id":"balance-zero","label":"balance-zero","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["balance-def"],"nlp_text":"If a factorization has zero total imbalance, then it exactly factors \\(n!\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.zero_total_imbalance","latex_link":"tertiary-chapter.html#balance-zero","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.zero_total_imbalance","lean_decl_name":"Erdos392.Factorization.zero_total_imbalance","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"balance-zero\"\n (statement := /-- If a factorization has zero total imbalance, then it exactly factors $n!$.-/)\n (latexEnv := \"lemma\")]\ntheorem Factorization.zero_total_imbalance {n : ℕ} (f : Factorization n)\n (hf : f.total_imbalance = 0) : f.prod id = n.factorial := by\n have h_balance_zero : ∀ p ∈ (n + 1).primesBelow, f.balance p = 0 := fun p hp ↦ by\n have := Finset.sum_eq_zero_iff_of_nonneg (fun _ _ ↦ Nat.zero_le _) |>.mp hf p hp; omega\n have h0 : (0 : ℕ) ∉ f.a := fun h ↦ (f.hpos 0 h).false\n simp only [prod, Multiset.map_id]\n refine eq_of_factorization_eq (Multiset.prod_ne_zero h0) (factorial_pos n).ne' fun p ↦ ?_\n by_cases hp : p.Prime <;> by_cases hp_le : p ≤ n\n · have hbal := h_balance_zero p (mem_primesBelow.mpr ⟨lt_succ_of_le hp_le, hp⟩)\n unfold balance sum at hbal\n simp only [factorization_multiset_prod f.a h0]; omega\n · simp only [factorization_multiset_prod f.a h0,\n factorization_factorial_eq_zero_of_lt (lt_of_not_ge hp_le)]\n exact Multiset.sum_eq_zero fun x hx ↦ by\n obtain ⟨m, hm, rfl⟩ := Multiset.mem_map.mp hx\n exact factorization_eq_zero_of_lt ((f.ha m hm).trans_lt (lt_of_not_ge hp_le))\n all_goals aesop","line":72,"end_line":92,"proof_status":"formalized"} {"id":"waste-eq","label":"waste-eq","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["balance-zero","waste-def"],"nlp_text":"The waste of a factorization is equal to \\(t \\log n - \\log n!\\), where \\(t\\) is the number of elements.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.waste_eq","latex_link":"tertiary-chapter.html#waste-eq","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.waste_eq","lean_decl_name":"Erdos392.Factorization.waste_eq","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"waste-eq\"\n (statement := /-- The waste of a factorization is equal to $t \\log n - \\log n!$, where $t$ is the\n number of elements.-/)\n (latexEnv := \"lemma\")]\ntheorem Factorization.waste_eq {n : ℕ} (f : Factorization n) (hf : f.total_imbalance = 0) :\n f.a.card * (Real.log n) = Real.log n.factorial + f.waste := by\n unfold waste sum\n have hlog : log (n.factorial : ℝ) = (f.a.map (fun m : ℕ ↦ log (m : ℝ))).sum := by\n rw [← f.zero_total_imbalance hf, prod, map_id, cast_multiset_prod, log_multiset_prod,\n Multiset.map_map]\n · rfl\n · exact fun x hx ↦ by\n obtain ⟨m, hm, rfl⟩ := Multiset.mem_map.mp hx; exact cast_ne_zero.mpr (f.hpos m hm).ne'\n rcases eq_or_ne n 0 with rfl | hn\n · simp [Multiset.eq_zero_of_forall_notMem fun m hm ↦ (f.hpos m hm).ne' (le_zero.mp (f.ha m hm))]\n · have hn_pos : (0 : ℝ) < n := cast_pos.mpr (pos_of_ne_zero hn)\n rw [hlog, ← Multiset.sum_map_add]\n conv_lhs => rw [show f.a.card * log (n : ℝ) = (f.a.map (fun _ ↦ log (n : ℝ))).sum from\n by rw [Multiset.map_const', Multiset.sum_replicate, nsmul_eq_mul]]\n exact congrArg _ (Multiset.map_congr rfl fun m hm ↦ by\n rw [Real.log_div hn_pos.ne' (cast_ne_zero.mpr (f.hpos m hm).ne')]; ring)","line":94,"end_line":115,"proof_status":"formalized"} {"id":"fks2-proposition-13","label":"fks2-proposition-13","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-def-a-2","classical-bound-theta","bklnw-def-a-1","bklnw-inputs","classical-bound-psi"],"nlp_text":"Suppose that \\(A_\\psi ,B,C,R,x_0\\) give an admissible bound for \\(E_\\psi \\). If \\(B {\\gt} C^2/8R\\), then \\(A_\\theta , B, C, R, x_0\\) give an admissible bound for \\(E_\\theta \\), where \\[ A_\\theta = A_\\psi (1 + \\nu _{asymp}(x_0)) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.proposition_13","latex_link":"secondary-chapter.html#fks2-proposition-13","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.proposition_13","lean_decl_name":"FKS2.proposition_13","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (Aψ B C R x₀ : ℝ)\n (h_bound : Eψ.classicalBound Aψ B C R x₀)\n (hB : B > C ^ 2 / (8 * R)) :\n Eθ.classicalBound (Aψ * (1 + ν_asymp Aψ B C R x₀)) B C R x₀ := by sorry\n\n@[blueprint\n \"fks2-corollary-14\"\n (title := \"FKS2 Corollary 14\")\n (statement := /--\n We have an admissible bound for $E_\\theta$ with $A = 121.0961$, $B=3/2$, $C=2$,\n $R = 5.5666305$, $x_0=2$.\n -/)\n (proof := /-- By \\cite[Corollary 1.3]{FKS}, with $R = 5.5666305$, and using the admissible asymptotic bound for $E_\\psi(x)$ with $A_\\psi = 121.096$, $B = 3/2$, $C = 2$, for all $x \\geq x_0 = e^{30}$, we can obtain $\\nu_{asymp}(x_0) \\leq 6.3376 \\cdot 10^{-7}$, from which one can conclude an admissible asymptotic bound for $E_\\theta(x)$ with $A_\\theta = 121.0961$, $B = 3/2$, $C = 2$, for all $x \\geq x_0 = e^{30}$. Additionally, the minimum value of $\\varepsilon_{\\theta,asymp}(x)$ for $2 \\leq x \\leq e^{30}$ is roughly $2.6271\\ldots$ at $x=2$. The results found in \\cite[Table 13 and 14]{BKLNW} give $E_\\theta(x) \\leq 1 < \\varepsilon_{\\theta,asymp}(2) \\leq \\varepsilon_{\\theta,asymp}(x)$ for all $2 \\leq x \\leq e^{30}$. -/)\n (latexEnv := \"corollary\")\n (discussion := 672)]\ntheorem corollary_14 : Eθ.classicalBound 121.0961 (3/2) 2 5.5666305 2 := sorry\n\n\n@[blueprint\n \"fks2-eq-9\"\n (title := \"mu asymptotic function, FKS2 (9)\")\n (statement := /--\n","line":299,"end_line":320,"proof_status":"statement_formalized"} {"id":"I2","label":"I2","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_2(\\nu , \\epsilon , X, T, \\sigma _1) := \\frac{1}{2\\pi i} \\int _{\\sigma _1}^{\\sigma _0} \\left( \\frac{-\\zeta '}\\zeta (\\sigma - i T) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma - i T) X^{\\sigma - i T} \\ d\\sigma \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₂","latex_link":"sect0003.html#I2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₂","lean_decl_name":"I₂","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":true,"source_repo":"mathlib","source_path":"./Mathlib/GroupTheory/Coxeter/Matrix.lean","lean4_code":"def I₂ₘ (m : ℕ) : CoxeterMatrix (Fin 2) where\n M := Matrix.of fun i j => if i = j then 1 else m + 2\n isSymm := by unfold Matrix.IsSymm; aesop\n diagonal := by simp\n off_diagonal := by simp\n\n/-- The Coxeter matrix of type E₆.\n\nThe corresponding Coxeter-Dynkin diagram is:\n```\n o\n |\n o --- o --- o --- o --- o\n```\n-/\n","line":156,"end_line":170,"proof_status":"formalized"} {"id":"I2Bound","label":"I2Bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["I2","MellinOfSmooth1b","IBound_aux1"],"nlp_text":"Assuming a bound of the form of Lemma 3.4.28 we have that \\[ \\left|I_{2}(\\nu , \\epsilon , X, T)\\right| \\ll \\frac{X}{\\epsilon T} . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I2Bound","latex_link":"sect0003.html#I2Bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I2Bound","lean_decl_name":"I2Bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"\nlemma one_add_inv_log {X : ℝ} (X_ge : 3 ≤ X) : (1 + (Real.log X)⁻¹) < 2 := by\n rw[← one_add_one_eq_two]\n refine (add_lt_add_iff_left 1).mpr ?_\n refine inv_lt_one_of_one_lt₀ (logt_gt_one X_ge)\n\n\n@[blueprint\n (title := \"I2Bound\")\n (statement := /--\n Assuming a bound of the form of Lemma \\ref{LogDerivZetaBndUnif} we have that\n $$\n \\left|I_{2}(\\nu, \\epsilon, X, T)\\right| \\ll \\frac{X}{\\epsilon T}\n .\n $$\n -/)\n (proof := /--\n Unfold the definitions and apply the triangle inequality.\n $$\n \\left|I_{2}(\\nu, \\epsilon, X, T, \\sigma_1)\\right| =\n \\left|\\frac{1}{2\\pi i} \\int_{\\sigma_1}^{\\sigma_0}\n \\left(\\frac{-\\zeta'}\\zeta(\\sigma - T i) \\right) \\cdot\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma - T i) \\cdot\n X^{\\sigma - T i}\n \\ d\\sigma\n \\right|\n $$\n $$\\leq\n \\frac{1}{2\\pi}\n \\int_{\\sigma_1}^{\\sigma_0}\n C \\cdot \\log T ^ 9\n \\frac{C'}{\\epsilon|\\sigma - T i|^2}\n X^{\\sigma_0}\n \\ d\\sigma\n \\leq\n C'' \\cdot \\frac{X\\log T^9}{\\epsilon T^2}\n ,\n $$\n where we used Theorems \\ref{MellinOfSmooth1b}, the hypothesised bound on zeta and the fact that\n $X^\\sigma \\le X^{\\sigma_0} = X\\cdot X^{1/\\log X}=e \\cdot X$.\n Since $T>3$, we have $\\log T^9 \\leq C''' T$.\n -/)\n (latexEnv := \"lemma\")]\nlemma I2Bound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF)\n {A C₂ : ℝ} (has_bound : LogDerivZetaHasBound A C₂) (C₂pos : 0 < C₂) (A_in : A ∈ Ioc 0 (1 / 2)) :\n ∃ (C : ℝ) (_ : 0 < C),\n ∀(X : ℝ) (_ : 3 < X) {ε : ℝ} (_ : 0 < ε)\n (_ : ε < 1) {T : ℝ} (_ : 3 < T),\n let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9\n ‖I₂ SmoothingF ε T X σ₁‖ ≤ C * X / (ε * T) := by\n have ⟨C₁, C₁pos, Mbd⟩ := MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF\n have := (IBound_aux1 3 (by norm_num) 9)\n obtain ⟨C₃, ⟨C₃_gt, hC₃⟩⟩ := this\n\n let C' : ℝ := C₁ * C₂ * C₃ * rexp 1\n have : C' > 0 := by positivity\n use ‖1/(2*π*I)‖ * (2 * C'), by\n refine Right.mul_pos ?_ ?_\n · rw[norm_pos_iff]\n simp[pi_ne_zero]\n · simp[this]\n intro X X_gt ε ε_pos ε_lt_one T T_gt σ₁\n have Xpos : 0 < X := lt_trans (by simp only [Nat.ofNat_pos]) X_gt\n have Tpos : 0 < T := lt_trans (by norm_num) T_gt\n unfold I₂\n rw[norm_mul, mul_assoc (c := X), ← mul_div]\n refine mul_le_mul_of_nonneg_left ?_ (norm_nonneg _)\n have interval_length_nonneg : σ₁ ≤ 1 + (Real.log X)⁻¹ := by\n dsimp[σ₁]\n rw[sub_le_iff_le_add]\n nth_rw 1 [← add_zero 1]\n rw[add_assoc]\n apply add_le_add_right\n refine Left.add_nonneg ?_ ?_\n · rw[inv_nonneg, log_nonneg_iff Xpos]\n exact le_trans (by norm_num) (le_of_lt X_gt)\n · refine div_nonneg ?_ ?_\n · exact A_in.1.le\n apply pow_nonneg\n rw[log_nonneg_iff Tpos]\n exact le_trans (by norm_num) (le_of_lt T_gt)\n have σ₁pos : 0 < σ₁ := by\n rw[sub_pos]\n calc\n A / Real.log T ^ 9 ≤ 1 / 2 / Real.log T ^ 9 := by\n refine div_le_div_of_nonneg_right (A_in.2) ?_\n apply pow_nonneg\n rw[log_nonneg_iff Tpos]\n exact le_trans (by norm_num) (le_of_lt T_gt)\n _ ≤ 1 / 2 / 1 := by\n refine div_le_div_of_nonneg_left (by norm_num) (by norm_num) ?_\n exact one_le_pow₀ (logt_gt_one T_gt.le).le\n _ < 1 := by norm_num\n suffices ∀ σ ∈ Ioc σ₁ (1 + (Real.log X)⁻¹),\n ‖SmoothedChebyshevIntegrand SmoothingF ε X (↑σ - ↑T * I)‖ ≤ C' * X / (ε * T) by\n calc\n ‖∫ (σ : ℝ) in σ₁..1 + (Real.log X)⁻¹,\n SmoothedChebyshevIntegrand SmoothingF ε X (↑σ - ↑T * I)‖ ≤\n C' * X / (ε * T) * |1 + (Real.log X)⁻¹ - σ₁| := by\n refine intervalIntegral.norm_integral_le_of_norm_le_const ?_\n convert this using 3\n apply uIoc_of_le\n exact interval_length_nonneg\n _ ≤ C' * X / (ε * T) * 2 := by\n apply mul_le_mul_of_nonneg_left\n · rw[abs_of_nonneg (sub_nonneg.mpr interval_length_nonneg)]\n calc\n 1 + (Real.log X)⁻¹ - σ₁ ≤ 1 + (Real.log X)⁻¹ := by linarith\n _ ≤ 2 := (one_add_inv_log X_gt.le).le\n positivity\n _ = 2 * C' * X / (ε * T) := by ring\n -- Now bound the integrand\n intro σ hσ\n unfold SmoothedChebyshevIntegrand\n have log_deriv_zeta_bound : ‖ζ' (σ - T * I) / ζ (σ - T * I)‖ ≤ C₂ * (C₃ * T) := by\n calc\n ‖ζ' (σ - (T : ℝ) * I) / ζ (σ - (T : ℝ) * I)‖ = ‖ζ' (σ + (-T : ℝ) * I) / ζ (σ + (-T : ℝ) * I)‖ := by\n have Z : σ - (T : ℝ) * I = σ + (- T : ℝ) * I := by simp; ring_nf\n simp [Z]\n _ ≤ C₂ * Real.log |-T| ^ 9 := has_bound σ (-T)\n (by simp only [abs_neg]; rw [abs_of_pos Tpos]; exact T_gt)\n (by unfold σ₁ at hσ; simp only [mem_Ioc, abs_neg, log_abs, mem_Ici,\n tsub_le_iff_right] at hσ ⊢; replace hσ := hσ.1; linarith)\n _ ≤ C₂ * Real.log T ^ 9 := by simp\n _ ≤ C₂ * (C₃ * T) := by gcongr; exact hC₃ T (by linarith)\n\n -- Then estimate the remaining factors.\n calc\n ‖-ζ' (σ - T * I) / ζ (σ - T * I) * 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ))\n (σ - T * I) * X ^ (σ - T * I)‖ =\n ‖-ζ' (σ - T * I) / ζ (σ - T * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ))\n (σ - T * I)‖ * ‖(X : ℂ) ^ (σ - T * I)‖ := by\n repeat rw[norm_mul]\n _ ≤ C₂ * (C₃ * T) * (C₁ * (ε * ‖σ - T * I‖ ^ 2)⁻¹) * (rexp 1 * X) := by\n apply mul_le_mul₃\n · rw[neg_div, norm_neg]\n exact log_deriv_zeta_bound\n · refine Mbd σ₁ σ₁pos _ ?_ ?_ ε ε_pos ε_lt_one\n · simp only [mem_Ioc, sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one,\n sub_self, sub_zero, σ₁] at hσ ⊢\n linarith\n · simp only [mem_Ioc, sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one,\n sub_self, sub_zero, σ₁] at hσ ⊢\n linarith[one_add_inv_log X_gt.le]\n · rw[cpow_def_of_ne_zero]\n · rw[norm_exp,← ofReal_log, re_ofReal_mul]\n · simp only [sub_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n sub_zero]\n rw [← le_log_iff_exp_le, Real.log_mul (exp_ne_zero 1), Real.log_exp, ← le_div_iff₀', add_comm, add_div, div_self, one_div]\n · exact hσ.2\n · refine (Real.log_pos ?_).ne.symm\n linarith\n · apply Real.log_pos\n linarith\n · linarith\n · positivity\n · positivity\n · exact_mod_cast Xpos.ne.symm\n · positivity\n · positivity\n · positivity\n _ = (C' * X * T) / (ε * ‖σ - T * I‖ ^ 2) := by ring\n _ ≤ C' * X / (ε * T) := by\n have : ‖σ - T * I‖ ^ 2 ≥ T ^ 2 := by\n calc\n ‖σ - T * I‖ ^ 2 = ‖σ + (-T : ℝ) * I‖ ^ 2 := by\n congr 2\n push_cast\n ring\n _ = normSq (σ + (-T : ℝ) * I) := (normSq_eq_norm_sq _).symm\n _ = σ^2 + (-T)^2 := by\n rw[Complex.normSq_add_mul_I]\n _ ≥ T^2 := by\n rw[neg_sq]\n exact le_add_of_nonneg_left (sq_nonneg _)\n calc\n C' * X * T / (ε * ‖↑σ - ↑T * I‖ ^ 2) ≤ C' * X * T / (ε * T ^ 2) := by\n rw[div_le_div_iff_of_pos_left, mul_le_mul_iff_right₀]\n · exact this\n","line":2231,"end_line":2411,"proof_status":"formalized"} {"id":"I8Bound","label":"I8Bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["I8I2","I2Bound"],"nlp_text":"We have that \\[ \\left|I_{8}(\\nu , \\epsilon , X, T)\\right| \\ll \\frac{X}{\\epsilon T} . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I8Bound","latex_link":"sect0003.html#I8Bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I8Bound","lean_decl_name":"I8Bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":" rw[← smoothedChebyshevIntegrand_conj]\n · simp only [map_sub, conj_ofReal, map_mul, conj_I, mul_neg, sub_neg_eq_add]\n · exact lt_trans (by norm_num) T_gt\n\n\n\n\n@[blueprint\n (title := \"I8Bound\")\n (statement := /--\n We have that\n $$\n \\left|I_{8}(\\nu, \\epsilon, X, T)\\right| \\ll \\frac{X}{\\epsilon T}\n .\n $$\n -/)\n (proof := /--\n We deduce this from the corresponding bound for $I_2$, using the symmetry between $I_2$ and $I_8$.\n -/)\n (latexEnv := \"lemma\")]\nlemma I8Bound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF)\n {A C₂ : ℝ} (has_bound : LogDerivZetaHasBound A C₂) (C₂_pos : 0 < C₂) (A_in : A ∈ Ioc 0 (1 / 2)) :\n ∃ (C : ℝ) (_ : 0 < C),\n ∀(X : ℝ) (_ : 3 < X) {ε : ℝ} (_: 0 < ε)\n (_ : ε < 1)\n {T : ℝ} (_ : 3 < T),\n let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9\n ‖I₈ SmoothingF ε T X σ₁‖ ≤ C * X / (ε * T) := by\n","line":2445,"end_line":2474,"proof_status":"formalized"} {"id":"tendsto_rpow_atTop_nhds_zero_of_norm_lt_one","label":"tendsto_rpow_atTop_nhds_zero_of_norm_lt_one","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(x{\\gt}0\\) and \\(x{\\lt}1\\). Then \\[ \\lim _{\\sigma \\to \\infty }x^\\sigma =0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/tendsto_rpow_atTop_nhds_zero_of_norm_lt_one","latex_link":"sect0003.html#tendsto_rpow_atTop_nhds_zero_of_norm_lt_one","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/tendsto_rpow_atTop_nhds_zero_of_norm_lt_one","lean_decl_name":"tendsto_rpow_atTop_nhds_zero_of_norm_lt_one","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"tendsto-rpow-atTop-nhds-zero-of-norm-lt-one\")\n (statement := /-- Let $x>0$ and $x<1$. Then\n $$\\lim_{\\sigma\\to\\infty}x^\\sigma=0.$$\n -/)\n (proof := /-- Standard. -/)\n (latexEnv := \"lemma\")]\nlemma tendsto_rpow_atTop_nhds_zero_of_norm_lt_one {x : ℝ} (xpos : 0 < x) (x_lt_one : x < 1)\n (C : ℝ) :\n Tendsto (fun (σ : ℝ) ↦ x ^ σ * C) atTop (𝓝 0) := by\n have := Tendsto.mul_const C (tendsto_rpow_atTop_of_base_lt_one x (by linarith) x_lt_one)\n simpa only [rpow_eq_pow, zero_mul] using this\n","line":231,"end_line":242,"proof_status":"formalized"} {"id":"tendsto_rpow_atTop_nhds_zero_of_norm_gt_one","label":"tendsto_rpow_atTop_nhds_zero_of_norm_gt_one","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["tendsto_rpow_atTop_nhds_zero_of_norm_lt_one"],"nlp_text":"Let \\(x{\\gt}1\\). Then \\[ \\lim _{\\sigma \\to -\\infty }x^\\sigma =0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/tendsto_rpow_atTop_nhds_zero_of_norm_gt_one","latex_link":"sect0003.html#tendsto_rpow_atTop_nhds_zero_of_norm_gt_one","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/tendsto_rpow_atTop_nhds_zero_of_norm_gt_one","lean_decl_name":"tendsto_rpow_atTop_nhds_zero_of_norm_gt_one","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"tendsto-rpow-atTop-nhds-zero-of-norm-gt-one\")\n (statement := /-- Let $x>1$. Then $$\\lim_{\\sigma\\to-\\infty}x^\\sigma=0.$$ -/)\n (proof := /-- Standard. -/)\n (latexEnv := \"lemma\")]\nlemma tendsto_rpow_atTop_nhds_zero_of_norm_gt_one {x : ℝ} (x_gt_one : 1 < x) (C : ℝ) :\n Tendsto (fun (σ : ℝ) ↦ x ^ σ * C) atBot (𝓝 0) := by\n have := (zero_lt_one.trans x_gt_one)\n have h := tendsto_rpow_atTop_nhds_zero_of_norm_lt_one (inv_pos.mpr this)\n (inv_lt_one_of_one_lt₀ x_gt_one) C\n convert (h.comp tendsto_neg_atBot_atTop) using 1\n ext; simp only [this.le, inv_rpow, Function.comp_apply, rpow_neg, inv_inv]\n","line":246,"end_line":257,"proof_status":"formalized"} {"id":"initial-factorization-tiny-prime-ge","label":"initial-factorization-tiny-prime-ge","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","balance-def"],"nlp_text":"A tiny prime \\(p \\leq L\\) can be in deficit by at most \\(M\\log n + ML\\pi (n)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_tiny_prime_ge","latex_link":"tertiary-chapter.html#initial-factorization-tiny-prime-ge","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_tiny_prime_ge","lean_decl_name":"Erdos392.Params.initial.balance_tiny_prime_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-tiny-prime-ge\"\n (statement := /-- A tiny prime $p \\leq L$ can be in deficit by at most $M\\log n + ML\\pi(n)$.-/)\n (proof := /-- In addition to the Legendre calculations, one potentially removes factors of the\n form $plq$ with $l \\leq L$ and $q \\leq n$ a prime up to $M$ times each, with at most $L$ copies\n of $p$ removed at each factor.-/)\n (latexEnv := \"sublemma\")\n (discussion := 515)]\ntheorem Params.initial.balance_tiny_prime_ge (P : Params) {p : ℕ} (hp : p ≤ P.L) :\n P.initial.balance p ≥ -P.M * Real.log P.n - P.M * P.L ^ 2 * primeCounting P.n := by\n have h_full := initial_full_balance_ge P\n by_cases hprime : p.Prime\n · have h_eq := initial_balance_eq P p\n have h_sum := rough_valuation_sum_le P p hp hprime\n have h_aux := balance_inequality_aux P p hprime\n simp_all only [neg_mul, div_eq_mul_inv, ge_iff_le, one_mul, Int.cast_sub, Int.cast_mul,\n Int.cast_natCast, Int.cast_sum, tsub_le_iff_right]\n norm_num [← @Int.cast_inj ℝ] at *\n nlinarith [h_full p hprime, (by norm_cast : (∑ m ∈ rough_set P, (m.factorization p : ℕ) : ℝ) ≤\n P.n.primeCounting * P.L * Nat.log p P.L), Real.log_pos one_lt_two, mul_inv_cancel₀\n (ne_of_gt (log_pos one_lt_two))]\n · simp only [Factorization.balance, hprime, not_false_eq_true, factorization_eq_zero_of_not_prime,\n CharP.cast_eq_zero, sub_zero, Int.cast_natCast, neg_mul, ge_iff_le, tsub_le_iff_right]\n exact le_trans (neg_nonpos_of_nonneg (by positivity)) (by positivity)","line":1840,"end_line":1863,"proof_status":"formalized"} {"id":"I6","label":"I6","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_6(\\nu , \\epsilon , X, \\sigma _1, \\sigma _2) := \\frac{1}{2\\pi i} \\int _{\\sigma _2}^{\\sigma _1} \\left( \\frac{-\\zeta '}\\zeta (\\sigma + 3 i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma + 3 i) X^{\\sigma + 3 i} \\ d\\sigma \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₆","latex_link":"sect0003.html#I6","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₆","lean_decl_name":"I₆","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I6\"\n (title := \"I₆\")\n (statement := /--\n $$\n I_6(\\nu, \\epsilon, X, \\sigma_1, \\sigma_2) := \\frac{1}{2\\pi i} \\int_{\\sigma_2}^{\\sigma_1}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma + 3 i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma + 3 i)\n X^{\\sigma + 3 i} \\ d\\sigma\n $$\n -/)]\nnoncomputable def I₆ (SmoothingF : ℝ → ℝ) (ε X σ₁ σ₂ : ℝ) : ℂ :=\n (1 / (2 * π * I)) * ((∫ σ in σ₂..σ₁,\n SmoothedChebyshevIntegrand SmoothingF ε X (σ + 3 * I)))","line":983,"end_line":998,"proof_status":"formalized"} {"id":"ZetaBoxEval","label":"ZetaBoxEval","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinOfSmooth1c"],"nlp_text":"For all \\(\\epsilon {\\gt} 0\\) sufficiently close to \\(0\\), the rectangle integral over \\([1-\\delta ,2] \\times _{ℂ} [-T,T]\\) of the integrand in \\(\\psi _{\\epsilon }\\) is \\[ \\frac{X^{1}}{1}\\mathcal{M}(\\widetilde{1_{\\epsilon }})(1) = X(1+O(\\epsilon )) , \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBoxEval","latex_link":"sect0003.html#ZetaBoxEval","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBoxEval","lean_decl_name":"ZetaBoxEval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"ZetaBoxEval\")\n (statement := /--\n For all $\\epsilon > 0$ sufficiently close to $0$, the rectangle integral over $[1-\\delta,2] \\times_{ℂ} [-T,T]$ of the integrand in\n $\\psi_{\\epsilon}$ is\n $$\n \\frac{X^{1}}{1}\\mathcal{M}(\\widetilde{1_{\\epsilon}})(1)\n = X(1+O(\\epsilon))\n ,$$\n where the implicit constant is independent of $X$.\n -/)\n (proof := /-- Unfold the definitions and apply Lemma \\ref{MellinOfSmooth1c}. -/)]\ntheorem ZetaBoxEval {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) :\n ∃ C, ∀ᶠ ε in (nhdsWithin 0 (Ioi 0)), ∀ X : ℝ, 0 ≤ X →\n ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) 1 * X - X‖ ≤ C * ε * X := by\n have := MellinOfSmooth1c ContDiffSmoothingF suppSmoothingF mass_one\n clear suppSmoothingF mass_one ContDiffSmoothingF\n rw[Asymptotics.isBigO_iff] at this\n obtain ⟨C, hC⟩ := this\n use C\n have εpos : ∀ᶠ (ε : ℝ) in nhdsWithin 0 (Ioi 0), ε > 0 :=\n eventually_mem_of_tendsto_nhdsWithin fun ⦃U⦄ hU ↦ hU\n filter_upwards [hC, εpos] with ε hC εpos\n rw[id_eq, norm_of_nonneg (le_of_lt εpos)] at hC\n intro X Xnne\n nth_rw 2 [← one_mul (X : ℂ)]\n rw[← sub_mul, norm_mul, norm_real, norm_of_nonneg Xnne]\n exact mul_le_mul_of_nonneg_right hC Xnne\n","line":1616,"end_line":1646,"proof_status":"formalized"} {"id":"rs-416","label":"rs-416","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\[ L_f := \\frac{2f(2)}{\\log 2} - \\int _2^\\infty (\\vartheta (y) - y) \\frac{d}{dy} (\\frac{f(y)}{\\log y})\\ dy. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.L","latex_link":"secondary-chapter.html#rs-416","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.L","lean_decl_name":"RS_prime.L","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"Ln-def\"\n (statement := /--\n For each integer \\(n \\ge 1\\), define\n \\[\n L_n := \\mathrm{lcm}(1,2,\\dots,n).\n \\]\n We call \\((L_n)_{n \\ge 1}\\) the \\emph{least common multiple sequence}.\n -/)]\ndef L (n : ℕ) : ℕ := (Finset.Icc 1 n).lcm _root_.id\n","line":41,"end_line":50,"proof_status":"formalized"} {"id":"rs-415","label":"rs-415","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["rs-416","rs-414"],"nlp_text":"\\[ \\sum _{p \\leq x} f(p) = \\int _2^x \\frac{f(y)\\ dy}{\\log y} + L_f \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_415","latex_link":"secondary-chapter.html#rs-415","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_415","lean_decl_name":"RS_prime.eq_415","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"theorem eq_415 {f : ℝ → ℝ} (hf : DifferentiableOn ℝ f (Set.Ici 2)) {x : ℝ} (hx : 2 ≤ x)\n (hbound : ∃ C, ∀ x ∈ Set.Ici 2, |f x| ≤ C / x ∧ |deriv f x| ≤ C / x ^ 2) :\n ∑ p ∈ filter Prime (Iic ⌊x⌋₊), f p = (∫ y in 2..x, f y / log y) + L f +\n f x * (θ x - x) / log x + ∫ y in Set.Ioi x, (θ y - y) * deriv (fun s ↦ f s / log s) y := by sorry\n\n","line":174,"end_line":178,"proof_status":"formalized"} {"id":"primeCounting-is-o-id","label":"primeCounting-is-o-id","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\[ \\pi (n) = o(n) \\quad \\text{as } n \\to \\infty . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.primeCounting_is_o_id","latex_link":"tertiary-chapter.html#primeCounting-is-o-id","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.primeCounting_is_o_id","lean_decl_name":"Erdos392.primeCounting_is_o_id","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"primeCounting-is-o-id\"\n (statement := /-- $$\\pi(n) = o(n) \\quad \\text{as } n \\to \\infty.$$ -/)\n (proof := /-- Given $\\varepsilon > 0$, choose $a \\neq 0$ with $\\varphi(a)/a < \\varepsilon/2$\n(using $\\prod_{p \\leq n}(1 - 1/p) \\to 0$). For $n \\geq a + 2$,\n$$\\pi(n) \\leq \\frac{\\varphi(a)}{a} \\cdot n + \\varphi(a) + \\pi(a+1) + 1.$$\nSince $\\varphi(a)/a < \\varepsilon/2$, for $n$ large enough the constant terms are absorbed,\ngiving $\\pi(n) < \\varepsilon n$. -/)\n (latexEnv := \"lemma\")]\nlemma primeCounting_is_o_id :\n IsLittleO .atTop (fun n ↦ (primeCounting n : ℝ)) (fun n ↦ (n : ℝ)) := by\n refine isLittleO_iff.mpr fun ε hε ↦ ?_\n obtain ⟨a, ha_ne_zero, ha_bound⟩ : ∃ a : ℕ, a ≠ 0 ∧ (a.totient : ℝ) / a < ε / 2 :=\n exists_phi_div_self_lt (half_pos hε)\n obtain ⟨N, hN⟩ : ∃ N : ℕ, ∀ n ≥ N,\n (primeCounting' n : ℝ) ≤ (a.totient : ℝ) / a * n + (a.totient : ℝ) + primeCounting' (a + 1) := by\n refine ⟨a + 1 + 1, fun n hn ↦ ?_⟩\n have := primeCounting'_add_le ha_ne_zero (lt_succ_self a) (n - (a + 1))\n simp only [ne_eq, ge_iff_le, primeCounting'] at *\n rw [div_mul_eq_mul_div, div_add', div_add', le_div_iff₀] <;> norm_cast <;> try positivity\n rw [show a + 1 + (n - (a + 1)) = n by rw [add_tsub_cancel_of_le (by linarith)]] at this\n nlinarith [Nat.zero_le (φ a), Nat.zero_le (count Nat.Prime (a + 1)),\n Nat.zero_le ((n - (a + 1)) / a), Nat.div_mul_le_self (n - (a + 1)) a,\n Nat.sub_add_cancel (by linarith : a + 1 ≤ n)]\n have hN_primeCounting : ∀ᶠ n in .atTop, (primeCounting n : ℝ) ≤\n (totient a : ℝ) / a * (n : ℝ) + (totient a : ℝ) + primeCounting' (a + 1) + 1 := by\n simp only [ne_eq, ge_iff_le, primeCounting', primeCounting, Filter.eventually_atTop] at *\n refine ⟨N + 1, fun b hb ↦ ?_⟩\n specialize hN (b + 1) (by linarith)\n simp_all only [count_succ, cast_add, cast_ite, cast_one, CharP.cast_eq_zero]\n have h_phi_le : (φ a : ℝ) / a ≤ 1 := by\n rw [div_le_iff₀ (cast_pos.mpr <| pos_of_ne_zero ha_ne_zero)]\n simp [one_mul, totient_le a]\n nlinarith\n norm_num at *\n obtain ⟨M, hM⟩ := hN_primeCounting\n let C := (φ a : ℝ) + primeCounting' (a + 1) + 1\n refine ⟨M + ⌈C / (ε / 2)⌉₊ + 1, fun n hn ↦ ?_⟩\n have h_ceil := le_ceil (C / (ε / 2))\n have h_cancel := mul_div_cancel₀ C (by positivity : ε / 2 ≠ 0)\n have h_n_ge : (n : ℝ) ≥ M + ⌈C / (ε / 2)⌉₊ + 1 := by exact_mod_cast hn\n nlinarith [hM n (by linarith)]\n","line":2129,"end_line":2170,"proof_status":"formalized"} {"id":"bound-score-4","label":"bound-score-4","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["primeCounting-is-o-id","params-set"],"nlp_text":"If \\(n\\) sufficiently large depending on \\(L, \\varepsilon \\), then \\(\\sum _{n/L {\\lt} p \\leq n} \\frac{n}{p} \\log \\frac{n}{p} \\leq \\varepsilon n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_4","latex_link":"tertiary-chapter.html#bound-score-4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_4","lean_decl_name":"Erdos392.Params.initial.bound_score_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"bound-score-4\"\n (statement := /-- If $n$ sufficiently large depending on $L, \\varepsilon$, then\n$\\sum_{n/L < p \\leq n} \\frac{n}{p} \\log \\frac{n}{p} \\leq \\varepsilon n$. -/)\n (proof := /-- Bound $\\frac{n}{p}$ by $L$ and use the prime number theorem (or the Chebyshev bound). -/)\n (discussion := 517)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.bound_score_4 (ε : ℝ) (hε : ε > 0) (L : ℕ) :\n ∀ᶠ n in .atTop, ∀ P : Params, P.L = L → P.n = n → ∑ p ∈ filter (·.Prime) (Icc (P.n / P.L + 1) P.n),\n (P.n / p) * Real.log (P.n / p) ≤ ε * P.n := by\n have h_term_bound : ∀ (n L : ℕ), 0 < n → 0 < L → ∀ p ∈ Finset.filter (·.Prime) (Icc (n / L + 1) n),\n ((n : ℝ) / p) * Real.log (n / p) ≤ L * Real.log L := by\n intro n L hn hL p hp\n have hp_Icc := Finset.mem_Icc.mp (mem_filter.mp hp).1\n have hp_prime : p.Prime := (mem_filter.mp hp).2\n have h_div_bound : (n / p : ℝ) ≤ L := by\n rw [div_le_iff₀ (cast_pos.mpr hp_prime.pos)]\n norm_cast\n nlinarith [Nat.div_add_mod n L, Nat.mod_lt n hL, hp_Icc.1, hp_Icc.2]\n gcongr\n · exact log_nonneg <| by rw [le_div_iff₀ (cast_pos.mpr hp_prime.pos)]; norm_cast; grind\n · exact div_pos (cast_pos.mpr hn) (cast_pos.mpr hp_prime.pos)\n have h_num_terms : ∀ (n L : ℕ), 0 < n → 0 < L →\n (Finset.filter (·.Prime) (Icc (n / L + 1) n)).card ≤ primeCounting n := by\n intro n L _ _\n rw [primeCounting, primeCounting', count_eq_card_filter_range]\n exact card_mono fun x hx ↦ Finset.mem_filter.mpr ⟨Finset.mem_range.mpr (by\n linarith [Finset.mem_Icc.mp (Finset.mem_filter.mp hx).1]), (mem_filter.mp hx).2⟩\n have h_bound : ∀ᶠ n in .atTop, ∀ P : Params, P.L = L → P.n = n → (∑ p ∈ filter (·.Prime) (Icc (P.n / P.L + 1) P.n),\n ((P.n : ℝ) / p) * Real.log (P.n / p)) ≤ (primeCounting P.n) * L * Real.log L := by\n filter_upwards [Filter.eventually_gt_atTop 0] with n hn P hP₁ hP₂\n refine le_trans (Finset.sum_le_sum fun x hx ↦ h_term_bound _ _ (by linarith) P.hL_pos _ hx) ?_\n · simp_all only [gt_iff_lt, Finset.mem_filter, Finset.mem_Icc, and_imp, sum_const, nsmul_eq_mul, mul_assoc]\n exact mul_le_mul_of_nonneg_right (mod_cast h_num_terms n L hn (by linarith [P.hL_pos]))\n (mul_nonneg (cast_nonneg _) (log_natCast_nonneg _))\n have h_tendsto : Filter.Tendsto (fun n ↦ (primeCounting n : ℝ) * L * Real.log L / n) .atTop (nhds 0) := by\n have := primeCounting_is_o_id\n rw [isLittleO_iff_tendsto] at this\n · convert this.const_mul (L * Real.log L) using 2 <;> ring\n · aesop\n have h_pi_bound : ∀ᶠ n in .atTop, (primeCounting n : ℝ) * L * Real.log L ≤ ε * n := by\n filter_upwards [h_tendsto.eventually (gt_mem_nhds (show 0 < ε by positivity)),\n Filter.eventually_gt_atTop 0] with n hn hn'\n rw [div_lt_iff₀ (by positivity : (0 : ℝ) < n)] at hn\n linarith\n filter_upwards [h_bound, h_pi_bound] with n hn hn' P hP hP'\n exact le_trans (hn P hP hP') (by simpa [hP'] using hn')","line":2172,"end_line":2218,"proof_status":"formalized"} {"id":"SumBoundII","label":"SumBoundII","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DeltaRange"],"nlp_text":"For all \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 2\\) and \\(z=\\sigma +it\\) where \\(1-\\delta _t/3\\leq \\sigma \\leq 3/2\\), we have that \\[ \\left|\\frac{\\zeta '}{\\zeta }(z)-\\sum _{\\rho \\in \\mathcal{Z}_t}\\frac{m_\\zeta (\\rho )}{z-\\rho }\\right|\\ll \\log |t|. \\]","doc_url":null,"latex_link":"sect0004.html#SumBoundII","lean_link":null,"lean_decl_name":"SumBoundII","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"DeltaRange","label":"DeltaRange","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DeltaT"],"nlp_text":"For all \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 2\\) we have that \\[ \\delta _t{\\lt}1/14. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaRange","latex_link":"sect0004.html#DeltaRange","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaRange","lean_decl_name":"DeltaRange","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"DeltaRange\")\n (statement := /--\n For all $t\\in\\mathbb{R}$ with $|t|\\geq 2$ we have that\n $$\\delta_t<1/14.$$\n -/)\n (proof := /--\n Note that $\\delta_t=E/\\log|t|$ where $E$ is the implied constant from Lemma \\ref{ZeroInequality}. But we know that $E=(14D)^{-1}$ where $D\\geq 3A/\\log 2+4B+C$ where $A$, $B$, and $C$ are the constants coming from Lemmas \\ref{ShiftZeroBound}, \\ref{ShiftOneBound}, and \\ref{ShiftTwoBound} respectively. Thus,\n $$E\\leq\\frac{1}{14\\,(3A/\\log 2+4B+C)}.$$\n But note that $A\\geq 0$ and $B\\geq 0$ by Lemmas \\ref{ShiftZeroBound} and \\ref{ShiftOneBound} respectively. However, we have that\n $$C\\geq 2+\\frac{2\\log((13\\,\\zeta(3/2))/(3\\,\\zeta(3)))}{\\log 2}$$\n by Theorem \\ref{LogDerivZetaFinalBound} with Lemmas \\ref{SumBoundI} and \\ref{ShiftTwoBound}. So, by a very lazy estimate we have $C\\geq 2$ and $E\\leq 1/28$. Thus,\n $$\\delta_t=\\frac{E}{\\log|t|}\\leq\\frac{1}{28\\,\\log2}<\\frac{1}{14}.$$\n -/)\n (proofUses := [\"LogDerivZetaFinalBound\", \"SumBoundI\", \"ShiftTwoBound\", \"ZeroInequality\", \"ShiftOneBound\", \"ShiftZeroBound\"])\n (latexEnv := \"lemma\")]\nlemma DeltaRange : ∀ (t : ℝ),\n |t| ≥ 2 →\n DeltaT t < (1 : ℝ) / 14 := by\n sorry\n","line":888,"end_line":907,"proof_status":"formalized"} {"id":"ZeroInequality","label":"ZeroInequality","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ShiftOneBound","ShiftTwoBound","ShiftZeroBound","ThreeFourOneTrigIdentity","LogDerivativeDirichlet"],"nlp_text":"There exists a constant \\(0 {\\lt} E{\\lt}1\\) such that for all \\(\\rho =\\sigma +it\\) with \\(\\zeta (\\rho )=0\\) and \\(|t|\\geq 2\\), one has \\[ \\sigma \\leq 1-\\frac{E}{\\log |t|}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZeroInequality","latex_link":"sect0004.html#ZeroInequality","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZeroInequality","lean_decl_name":"ZeroInequality","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"ZeroInequality\")\n (statement := /--\n There exists a constant $0 < E<1$ such that for all $\\rho=\\sigma+it$ with $\\zeta(\\rho)=0$ and $|t|\\geq 2$, one has\n $$\\sigma\\leq 1-\\frac{E}{\\log|t|}.$$\n -/)\n (proof := /--\n From Theorem \\ref{LogDerivativeDirichlet} when $\\Re s>1$ we have\n $$-\\frac{\\zeta'}{\\zeta}(s)=\\sum_{1\\leq n}\\frac{\\Lambda(n)}{n^s}.$$\n Thus,\n $$-3\\,\\frac{\\zeta'}{\\zeta}(1+\\delta)-4\\,\\frac{\\zeta'}{\\zeta}(1+\\delta+it)-\\frac{\\zeta'}{\\zeta}(1+\\delta+2it)=\\sum_{1\\leq n}\\Lambda(n)\\,n^{-(1+\\delta)}\\left(3+4n^{-it}+n^{-2it}\\right).$$\n Now applying Euler's identity\n \\begin{align*}\n -3\\,\\Re \\left(\\frac{\\zeta'}{\\zeta}(1+\\delta)\\right)&-4\\,\\Re \\left(\\frac{\\zeta'}{\\zeta}(1+\\delta+it)\\right)-\\Re \\left(\\frac{\\zeta'}{\\zeta}(1+\\delta+2it)\\right) \\\\\n &\\qquad\\qquad\\qquad=\\sum_{1\\leq n}\\Lambda(n)\\,n^{-(1+\\delta)}\\left(3+4\\cos(-it\\log n)+\\cos(-2it\\log n)\\right)\n \\end{align*}\n By Lemma \\ref{ThreeFourOneTrigIdentity} we know that the series on the right hand side is bounded below by $0$, and by Lemmas \\ref{ShiftTwoBound}, \\ref{ShiftOneBound}, and \\ref{ShiftZeroBound} we have an upper bound on the left hand side. So,\n $$0\\leq\\frac{3}{\\delta}+3A-\\frac{4}{1+\\delta-\\sigma}+4B\\log|t|+C\\log|t|$$\n where $A$, $B$, and $C$ are the implied constants coming from Lemmas \\ref{ShiftZeroBound}, \\ref{ShiftOneBound}, and \\ref{ShiftTwoBound} respectively. By choosing $D\\geq 3A/\\log 2+4B+C$ we have\n $$\\frac{4}{1+\\delta-\\sigma}\\leq\\frac{3}{\\delta}+D\\log|t|$$\n by some manipulation. Now if we choose $\\delta=(2D\\log|t|)^{-1}$ then we have\n $$\\frac{4}{1-\\sigma+1/(2D\\log|t|)}\\leq7D\\log|t|.$$\n So with some manipulation we have that\n $$\\sigma\\leq 1-\\frac{1}{14D\\log|t|}.$$\n This is exactly the desired result with the constant $E=(14D)^{-1}$\n -/)\n (proofUses := [\"ShiftTwoBound\", \"LogDerivativeDirichlet\", \"ShiftOneBound\", \"ThreeFourOneTrigIdentity\", \"ShiftZeroBound\"])\n (latexEnv := \"theorem\")]\ntheorem ZeroInequality : ∃ (E : ℝ) (EinIoo : E ∈ Ioo (0 : ℝ) 1),\n ∀ (ρ : ℂ) (σ t : ℝ),\n ζ ρ = 0 →\n σ = ρ.re →\n t = ρ.im →\n |t| ≥ 2 →\n σ ≤ 1 - E / log |t| := by\n sorry\n","line":832,"end_line":867,"proof_status":"formalized"} {"id":"Dusart_corollary_4_5","label":"Dusart_corollary_4_5","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"For \\(x {\\gt} 0\\), we have \\[ \\psi (x) - \\vartheta (x) {\\lt} \\Bigl(1 + 1.47 \\times 10^{-7}\\Bigr) \\sqrt{x} + 1.78 x^{1/3}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_4_5","latex_link":"secondary-chapter.html#Dusart_corollary_4_5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_4_5","lean_decl_name":"Dusart.corollary_4_5","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_corollary_4_5\"\n (title := \"Dusart Corollary 4.5\")\n (statement := /--\n For $x > 0$, we have\n \\[\n \\psi(x) - \\vartheta(x) < \\Bigl(1 + 1.47 \\times 10^{-7}\\Bigr) \\sqrt{x} + 1.78 x^{1/3}.\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_4_5 {x : ℝ} (hx : x > 0) :\n ψ x - θ x < (1 + 1.47e-7) * sqrt x + 1.78 * x ^ (1 / 3 : ℝ) := by sorry\n","line":194,"end_line":204,"proof_status":"formalized"} {"id":"bound-score-2","label":"bound-score-2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi_alt","params-set"],"nlp_text":"If \\(L\\) is sufficiently large depending on \\(M, \\varepsilon \\), and \\(n\\) sufficiently large depending on \\(L\\), then \\(\\sum _{p \\leq n/L} M \\log n \\leq \\varepsilon n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_2","latex_link":"tertiary-chapter.html#bound-score-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_2","lean_decl_name":"Erdos392.Params.initial.bound_score_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"bound-score-2\"\n (statement := /-- If $L$ is sufficiently large depending on $M, \\varepsilon$, and $n$\n sufficiently large depending on $L$, then $\\sum_{p \\leq n/L} M \\log n \\leq \\varepsilon n$. -/)\n (proof := /-- Use the prime number theorem (or the Chebyshev bound). -/)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.bound_score_2 (ε : ℝ) (hε : ε > 0) (M : ℕ) :\n ∀ᶠ L in .atTop, ∀ᶠ n in .atTop, ∀ P : Params,\n P.L = L → P.n = n → P.M = M → ∑ _p ∈ Finset.filter (·.Prime) (Finset.Iic (P.n / P.L)),\n P.M * Real.log P.n ≤ ε * P.n := by\n have pi_equiv := pi_alt'\n rw [IsEquivalent, isLittleO_iff] at pi_equiv\n specialize pi_equiv (by norm_num : (1 : ℝ) / 2 > 0)\n rw [Filter.eventually_atTop] at pi_equiv\n obtain ⟨N₀, hN₀⟩ := pi_equiv\n filter_upwards [Filter.eventually_ge_atTop (max 2 (max (⌈N₀⌉₊ + 1) (⌈4 * M / ε⌉₊ + 1)))] with L hL\n have hL2 : L ≥ 2 := le_of_max_le_left hL\n have hLN₀ : (L : ℝ) > N₀ :=\n (le_ceil N₀).trans_lt (by exact_mod_cast (le_max_left _ _).trans (le_of_max_le_right hL))\n have hL4Mε : (L : ℝ) > 4 * M / ε :=\n (le_ceil _).trans_lt (by exact_mod_cast (le_max_right _ _).trans (le_of_max_le_right hL))\n have hLpos : (L : ℝ) > 0 := by positivity\n filter_upwards [Filter.eventually_ge_atTop (4 * L ^ 2)] with n hn P hPL hPn hPM\n simp only [hPM, hPL, hPn]\n have hnL2 : n ≥ L ^ 2 := (Nat.le_mul_of_pos_left _ (by omega : 0 < 4)).trans hn\n have hnLge : n / L ≥ L := le_div_iff_mul_le (by omega) |>.mpr (by rw [sq] at hnL2; exact hnL2)\n have hnLN₀ : ((n / L : ℕ) : ℝ) > N₀ := hLN₀.trans_le (by exact_mod_cast hnLge)\n conv_lhs => rw [Finset.sum_const, nsmul_eq_mul]\n have hcard : (filter Prime (Finset.Iic (n / L))).card = primeCounting (n / L) := by\n simp only [primeCounting, primeCounting', card_filter, count_eq_card_filter_range]\n congr 1; ext p\n rw [Finset.mem_Iic, Finset.mem_range, Nat.lt_succ_iff]\n rw [hcard]\n rcases eq_or_ne M 0 with rfl | hMne\n · simp [mul_nonneg (hε.le) (cast_nonneg _)]\n have hnLgt1 : (1 : ℝ) < (n / L : ℕ) := by exact_mod_cast hL2.trans hnLge\n have hlogPos : Real.log (n / L : ℕ) > 0 := Real.log_pos hnLgt1\n have hdivPos : (0 : ℝ) < (n / L : ℕ) / Real.log (n / L : ℕ) := div_pos (by grind) hlogPos\n have hπ : (primeCounting (n / L) : ℝ) ≤ 3 / 2 * ((n / L : ℕ) / Real.log (n / L : ℕ)) := by\n have h := hN₀ ((n / L : ℕ) : ℝ) hnLN₀.le\n simp only [Pi.sub_apply, floor_natCast, norm_eq_abs, abs_of_pos hdivPos] at h\n linarith [abs_sub_le_iff.mp h]\n have hn4 : n ≥ 4 := (Nat.pow_le_pow_left hL2 2).trans hnL2\n have hnpos : (n : ℝ) > 0 := cast_pos.mpr (by positivity)\n have hn_gt_1 : (1 : ℝ) < n := by exact_mod_cast (by grind)\n have hlogN : Real.log (n / L : ℕ) ≥ Real.log n / 2 := by\n have hsqrt : ((n / L : ℕ) : ℝ) ≥ Real.sqrt n := by\n have h1 : Real.sqrt n ≤ n / (2 * L) := by\n rw [sqrt_le_iff]\n refine ⟨by positivity, ?_⟩\n rw [div_pow, le_div_iff₀ (by positivity)]\n have hn4L2 : (4 : ℝ) * L ^ 2 ≤ n := by exact_mod_cast hn\n have h2L_sq : ((2 : ℝ) * L) ^ 2 = 4 * L ^ 2 := by ring\n nlinarith [h2L_sq, sq_nonneg ((n : ℝ) - 4 * L ^ 2)]\n have h2 : (n : ℝ) / L - Real.sqrt n ≥ 1 := by\n have hL_ne : (L : ℝ) ≠ 0 := by positivity\n calc (n : ℝ) / L - Real.sqrt n ≥ n / L - n / (2 * L) := by grind\n _ = n / (2 * L) := by grind\n _ ≥ 4 * L ^ 2 / (2 * L) := by gcongr; exact_mod_cast hn\n _ = 2 * L := by grind\n _ ≥ 4 := by have hL2' : (2 : ℝ) ≤ L := ofNat_le_cast.mpr hL2; grind\n _ ≥ 1 := by grind\n have h3 : ((n / L : ℕ) : ℝ) ≥ (n : ℝ) / L - 1 := by\n have hlt := sub_one_lt_floor (a := (n : ℝ) / L)\n rw [floor_div_eq_div] at hlt\n grind\n grind\n calc\n Real.log (n / L : ℕ) ≥ Real.log (Real.sqrt n) := log_le_log (sqrt_pos.mpr hnpos) hsqrt\n _ = Real.log n / 2 := log_sqrt hnpos.le\n calc\n (primeCounting (n / L) : ℝ) * (M * Real.log n)\n ≤ 3 / 2 * ((n / L : ℕ) / Real.log (n / L : ℕ)) * (M * Real.log n) := by gcongr\n _ ≤ 3 / 2 * ((n : ℝ) / L / Real.log (n / L : ℕ)) * (M * Real.log n) := by\n have : ((n / L : ℕ) : ℝ) ≤ (n : ℝ) / L := cast_div_le; gcongr\n _ ≤ 3 / 2 * ((n : ℝ) / L / (Real.log n / 2)) * (M * Real.log n) := by\n have : 0 < Real.log n / 2 := div_pos (log_pos hn_gt_1) (by grind); gcongr\n _ = 3 * M * n / L := by field_simp [log_ne_zero_of_pos_of_ne_one hnpos <| ne_of_gt hn_gt_1]\n _ ≤ ε * n := by\n rw [div_le_iff₀ hLpos]\n have : 4 * M < ε * L := by linarith [(div_lt_iff₀ hε).mp hL4Mε]\n calc 3 * M * n ≤ ε * L * n := by nlinarith\n _ = ε * n * L := by ring","line":1927,"end_line":2009,"proof_status":"formalized"} {"id":"WienerIkehara","label":"WienerIkehara","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WienerIkeharaInterval"],"nlp_text":"We have \\[ \\sum _{n\\leq x} f(n) = A x + o(x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WienerIkeharaTheorem'","latex_link":"sect0002.html#WienerIkehara","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WienerIkeharaTheorem'","lean_decl_name":"WienerIkeharaTheorem'","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Wiener.lean","lean4_code":"@[blueprint \"WienerIkehara\"\n (title := \"Wiener-Ikehara Theorem (1)\")\n (statement := /--\n We have\n $$ \\sum_{n\\leq x} f(n) = A x + o(x).$$\n -/)\n (proof := /-- Apply the preceding proposition with $I = [\\varepsilon,1]$ and then send\n $\\varepsilon$ to zero (using \\eqref{cheby} to control the error). -/)\n (latexEnv := \"corollary\")]\ntheorem WienerIkeharaTheorem' {f : ℕ → ℝ} (hpos : 0 ≤ f)\n (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ'))\n (hcheby : cheby f) (hG : ContinuousOn G {s | 1 ≤ s.re})\n (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re}) :\n Tendsto (fun N => cumsum f N / N) atTop (𝓝 A) := by\n\n convert_to Tendsto (S f 0) atTop (𝓝 A) ; · ext N ; simp [S, cumsum]\n apply (tendsto_S_S_zero hpos hcheby).tendsto_of_eventually_tendsto\n · have L0 : Ioc 0 1 ∈ 𝓝[>] (0 : ℝ) := inter_mem_nhdsWithin _ (Iic_mem_nhds zero_lt_one)\n apply eventually_of_mem L0\n · intro ε hε\n simpa using WienerIkeharaInterval_discrete' hpos hf hcheby hG hG' hε.1 hε.2\n · have : Tendsto (fun ε : ℝ => ε) (𝓝[>] 0) (𝓝 0) := nhdsWithin_le_nhds\n simpa using (this.const_sub 1).const_mul A","line":2386,"end_line":2408,"proof_status":"formalized"} {"id":"WeakPNT","label":"WeakPNT","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WienerIkehara"],"nlp_text":"We have \\[ \\sum _{n \\leq x} \\Lambda (n) = x + o(x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT","latex_link":"sect0002.html#WeakPNT","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WeakPNT","lean_decl_name":"WeakPNT","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"WeakPNT\")\n (statement := /--\n We have\n $$ \\sum_{n \\leq x} \\Lambda(n) = x + o(x).$$\n -/)\n (proof := /-- Already done by Stoll, assuming Wiener-Ikehara. -/)]\ntheorem WeakPNT : Tendsto (fun N ↦ cumsum Λ N / N) atTop (𝓝 1) := by\n let F := vonMangoldt.LFunctionResidueClassAux (q := 1) 1\n have hnv := riemannZeta_ne_zero_of_one_le_re\n have l1 (n : ℕ) : 0 ≤ Λ n := vonMangoldt_nonneg\n have l2 s (hs : 1 < s.re) : F s = LSeries Λ s - 1 / (s - 1) := by\n have := vonMangoldt.eqOn_LFunctionResidueClassAux (q := 1) isUnit_one hs\n simp only [F, this, vonMangoldt.residueClass, Nat.totient_one, Nat.cast_one, inv_one, one_div, sub_left_inj]\n apply LSeries_congr\n intro n _\n simp only [ofReal_inj, indicator_apply_eq_self, mem_setOf_eq]\n exact fun hn ↦ absurd (Subsingleton.eq_one _) hn\n have l3 : ContinuousOn F {s | 1 ≤ s.re} := vonMangoldt.continuousOn_LFunctionResidueClassAux 1\n have l4 : cheby Λ := vonMangoldt_cheby\n have l5 (σ' : ℝ) (hσ' : 1 < σ') : Summable (nterm Λ σ') := by\n simpa only [← nterm_eq_norm_term] using (@ArithmeticFunction.LSeriesSummable_vonMangoldt σ' hσ').norm\n apply WienerIkeharaTheorem' l1 l5 l4 l3 l2\n\n","line":2432,"end_line":2454,"proof_status":"formalized"} {"id":"auto-cheby","label":"auto-cheby","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WienerIkehara","crude-upper-bound"],"nlp_text":"One has \\[ \\sum _{n \\leq x} f(n) = O(x) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/auto_cheby","latex_link":"sect0002.html#auto-cheby","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/auto_cheby","lean_decl_name":"auto_cheby","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" = ‖(∫ (t : ℝ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)) + A * I‖ := hnorm\n _ ≤ ‖∫ (t : ℝ), (G (1 + t * Complex.I)) * (ψ t) * x ^ (t * Complex.I)‖ + ‖A * I‖ :=\n norm_add_le _ _\n _ ≤ K * (∫ t : ℝ, ‖(ψ : ℝ → ℂ) t‖)\n + ‖A‖ * (∫ u : ℝ, ‖𝓕 (ψ : ℝ → ℂ) (u / (2 * Real.pi))‖) :=\n add_le_add hRHS_bound hA_bound\n\n exact hbound\n\n\n@[blueprint \"auto-cheby\"\n (title := \"auto-cheby\")\n (statement := /-- One has $$ \\sum_{n \\leq x} f(n) = O(x)$$ for all $x \\geq 1$. -/)\n (proof := /--\n By applying Corollary \\ref{crude-upper-bound} for a specific compactly supported function $\\psi$,\n one can obtain a bound of the form $\\sum_{(1-\\varepsilon)x < n \\leq x} f(n) = O(x)$ for all $x$\n and some absolute constant $\\varepsilon$ (which can be made explicit).\n\n If $C$ is a sufficiently large constant, the claim $|\\sum_{n \\leq x} f(n)| \\leq Cx$ can now be\n proven by strong induction on $x$, as the claim for $(1-\\varepsilon)x$ implies the claim for $x$\n by the triangle inequality (and the claim is trivial for $x < 1$).\n","line":3865,"end_line":3885,"proof_status":"formalized"} {"id":"mu-pnt","label":"mu-pnt","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WeakPNT","mun"],"nlp_text":"We have \\(\\sum _{n \\leq x} \\mu (n) = o(x)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/mu_pnt","latex_link":"sect0005.html#mu-pnt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/mu_pnt","lean_decl_name":"mu_pnt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n \"mu-pnt\"\n (title := \"M\\\\\\\"obius form of prime number theorem\")\n (statement := /-- We have $\\sum_{n \\leq x} \\mu(n) = o(x)$. -/)\n (proof := /--\n From the Dirichlet convolution identity\n $$ \\mu(n) \\log n = - \\sum_{d|n} \\mu(d) \\Lambda(n/d)$$\n and summing we obtain\n $$ \\sum_{n \\leq x} \\mu(n) \\log n = - \\sum_{d \\leq x} \\mu(d) \\sum_{m \\leq x/d} \\Lambda(m).$$\n For any $\\eps>0$, we have from the prime number theorem that\n $$ \\sum_{m \\leq x/d} \\Lambda(m) = x/d + O(\\eps x/d) + O_\\eps(1)$$\n (divide into cases depending on whether $x/d$ is large or small compared to $\\eps$).\n We conclude that\n $$ \\sum_{n \\leq x} \\mu(n) \\log n\n = - x \\sum_{d \\leq x} \\frac{\\mu(d)}{d} + O(\\eps x \\log x) + O_\\eps(x).$$\n Applying \\eqref{mun} we conclude that\n $$ \\sum_{n \\leq x} \\mu(n) \\log n = O(\\eps x \\log x) + O_\\eps(x).$$\n and hence\n $$ \\sum_{n \\leq x} \\mu(n) \\log x\n = O(\\eps x \\log x) + O_\\eps(x) + O( \\sum_{n \\leq x} (\\log x - \\log n) ).$$\n From Stirling's formula one has\n $$ \\sum_{n \\leq x} (\\log x - \\log n) = O(x)$$\n thus\n $$ \\sum_{n \\leq x} \\mu(n) \\log x = O(\\eps x \\log x) + O_\\eps(x)$$\n and thus\n $$ \\sum_{n \\leq x} \\mu(n) = O(\\eps x) + O_\\eps(\\frac{x}{\\log x}).$$\n Sending $\\eps \\to 0$ we obtain the claim.\n -/)\n (proofUses := [\"WeakPNT\", \"mun\"])\n (latexEnv := \"proposition\")]\ntheorem mu_pnt : (fun x : ℝ ↦ ∑ n ∈ range ⌊x⌋₊, μ n) =o[atTop] fun x ↦ x := by\n have h_moebius_sum : (fun x : ℝ => ∑ n ∈ Finset.range ⌊x⌋₊, (μ n : ℝ)) =o[atTop] (fun x : ℝ => x) := by\n have h_bound : (fun x : ℝ => ∑ n ∈ Finset.range ⌊x⌋₊, (μ n : ℝ)) =o[atTop] (fun x : ℝ => x) := by\n have h_sum : (fun x : ℝ => ∑ n ∈ Finset.range (⌊x⌋₊ + 1), (μ n : ℝ)) =o[atTop] (fun x : ℝ => x) := by\n have h_moebius_sum : (fun x : ℝ => ∑ n ∈ Finset.Iic ⌊x⌋₊, (μ n : ℝ)) =o[atTop] (fun x : ℝ => x) := by\n convert M_isLittleO using 1\n simpa only [Finset.range_eq_Ico] using h_moebius_sum\n have h_mu_floor : (fun x : ℝ => (μ ⌊x⌋₊ : ℝ)) =o[atTop] (fun x : ℝ => x) := by\n rw [Asymptotics.isLittleO_iff_tendsto'] <;> norm_num\n · refine squeeze_zero_norm (a := fun x : ℝ => 1 / |x|) ?_ ?_\n · intro x; norm_num [abs_div]\n exact mul_le_of_le_one_left (by positivity) (mod_cast by exact abs_moebius_le_one)\n · exact tendsto_const_nhds.div_atTop (tendsto_norm_atTop_atTop)\n · exact ⟨1, by intros; linarith⟩\n simpa [Finset.sum_range_succ] using h_sum.sub h_mu_floor\n convert h_bound using 1\n rw [Asymptotics.isLittleO_iff] at *\n simp_all +decide [Norm.norm]\n","line":1936,"end_line":1983,"proof_status":"formalized"} {"id":"chebyshev-asymptotic","label":"chebyshev-asymptotic","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WeakPNT"],"nlp_text":"One has \\[ \\sum _{p \\leq x} \\log p = x + o(x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/chebyshev_asymptotic","latex_link":"sect0005.html#chebyshev-asymptotic","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/chebyshev_asymptotic","lean_decl_name":"chebyshev_asymptotic","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint \"chebyshev-asymptotic\"\n (title := \"chebyshev-asymptotic\")\n (statement := /--\n One has\n $$ \\sum_{p \\leq x} \\log p = x + o(x).$$\n -/)\n (proof := /--\n From the prime number theorem we already have\n $$ \\sum_{n \\leq x} \\Lambda(n) = x + o(x)$$\n so it suffices to show that\n $$ \\sum_{j \\geq 2} \\sum_{p^j \\leq x} \\log p = o(x).$$\n Only the terms with $j \\leq \\log x / \\log 2$ contribute, and each $j$ contributes at most\n $\\sqrt{x} \\log x$ to the sum, so the left-hand side is $O( \\sqrt{x} \\log^2 x ) = o(x)$ as\n required.\n -/)]\ntheorem chebyshev_asymptotic : θ ~[atTop] id := by\n refine WeakPNT''.add_isLittleO'' (IsBigO.trans_isLittleO (g := fun x ↦ 2 * x.sqrt * x.log) ?_ ?_)\n · rw [isBigO_iff']; refine ⟨1, one_pos, ?_⟩\n simp only [one_mul, eventually_atTop, ge_iff_le]\n exact ⟨2, fun x hx ↦ by\n rw [Pi.sub_apply, norm_eq_abs, norm_eq_abs, abs_of_nonneg (by bound : 0 ≤ 2 * √x * log x)]\n exact (abs_of_nonneg (sub_nonneg.mpr (Chebyshev.theta_le_psi x))).symm ▸\n Chebyshev.abs_psi_sub_theta_le_sqrt_mul_log (by linarith : 1 ≤ x)⟩\n · simpa only [mul_assoc] using isLittleO_sqrt_mul_log.const_mul_left 2\n","line":160,"end_line":183,"proof_status":"formalized"} {"id":"WienerIkehara2","label":"WienerIkehara2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["auto-cheby"],"nlp_text":"We have \\[ \\sum _{n\\leq x} f(n) = A x + o(x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WienerIkeharaTheorem''","latex_link":"sect0002.html#WienerIkehara2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WienerIkeharaTheorem''","lean_decl_name":"WienerIkeharaTheorem''","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Wiener.lean","lean4_code":"@[blueprint \"WienerIkehara2\"\n (title := \"Wiener-Ikehara Theorem (2)\")\n (statement := /-- We have $$ \\sum_{n\\leq x} f(n) = A x + o(x).$$ -/)\n (proof := /-- Use Corollary \\ref{auto-cheby} to remove the Chebyshev hypothesis in Theorem \\ref{WienerIkehara}. -/)\n (latexEnv := \"theorem\")]\ntheorem WienerIkeharaTheorem'' (hpos : 0 ≤ f) (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ'))\n (hG : ContinuousOn G {s | 1 ≤ s.re})\n (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re}) :\n Tendsto (fun N => cumsum f N / N) atTop (𝓝 A) :=\n WienerIkeharaTheorem' hpos hf (auto_cheby (f := f) (A := A) (G := G) hpos hf hG hG') hG hG'","line":3887,"end_line":3896,"proof_status":"formalized"} {"id":"dirichlet_thm","label":"dirichlet_thm","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["chebyshev_asymptotic_pnt"],"nlp_text":"Any primitive residue class contains an infinite number of primes.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/dirichlet_thm","latex_link":"sect0005.html#dirichlet_thm","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/dirichlet_thm","lean_decl_name":"dirichlet_thm","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"Dirichlet's theorem\")\n (statement := /-- Any primitive residue class contains an infinite number of primes. -/)\n (proof := /--\n If this were not the case, then the sum $\\sum_{p \\leq x: p = a\\ (q)} \\log p$\n would be bounded in $x$, contradicting Theorem \\ref{chebyshev_asymptotic_pnt}.\n -/)\n (proofUses := [\"chebyshev_asymptotic_pnt\"])\n (latexEnv := \"corollary\")]\ntheorem dirichlet_thm {q : ℕ} {a : ℕ} (hq : q ≥ 1) (ha : Nat.Coprime a q) (ha' : a < q) :\n Infinite { p // p.Prime ∧ p % q = a } := by\n have : {p | p.Prime ∧ p % q = a}.Infinite := by\n have : {p | p.Prime ∧ p ≡ a [MOD q]}.Infinite := by\n have := @infinite_setOf_prime_and_eq_mod\n specialize @this q <| NeZero.of_pos hq\n simp_all only [isUnit_iff_exists_inv, forall_exists_index, ← ZMod.natCast_eq_natCast_iff]\n exact this (IsUnit.exists_right_inv (show IsUnit (a : ZMod q) from by\n rwa [ZMod.isUnit_iff_coprime])).choose (IsUnit.exists_right_inv (show IsUnit (a : ZMod q)\n from by rwa [ZMod.isUnit_iff_coprime])).choose_spec\n exact this.mono fun p hp ↦ ⟨hp.1, by simpa [ModEq, mod_eq_of_lt ha'] using hp.2⟩\n exact Set.infinite_coe_iff.mpr this\n","line":2518,"end_line":2538,"proof_status":"formalized"} {"id":"lambda-pnt","label":"lambda-pnt","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["mu-pnt"],"nlp_text":"We have \\(\\sum _{n \\leq x} \\lambda (n) = o(x)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/lambda_pnt","latex_link":"sect0005.html#lambda-pnt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/lambda_pnt","lean_decl_name":"lambda_pnt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n \"lambda-pnt\"\n (statement := /-- We have $\\sum_{n \\leq x} \\lambda(n) = o(x)$. -/)\n (proof := /--\n From the identity\n $$ \\lambda(n) = \\sum_{d^2|n} \\mu(n/d^2)$$\n and summing, we have\n $$ \\sum_{n \\leq x} \\lambda(n) = \\sum_{d \\leq \\sqrt{x}} \\sum_{n \\leq x/d^2} \\mu(n).$$\n For any $\\eps>0$, we have from Proposition \\ref{mu-pnt} that\n $$ \\sum_{n \\leq x/d^2} \\mu(n) = O(\\eps x/d^2) + O_\\eps(1)$$\n and hence on summing in $d$\n $$ \\sum_{n \\leq x} \\lambda(n) = O(\\eps x) + O_\\eps(x^{1/2}).$$\n Sending $\\eps \\to 0$ we obtain the claim.\n -/)\n (proofUses := [\"mu-pnt\"])\n (latexEnv := \"proposition\")]\ntheorem lambda_pnt : (fun x : ℝ ↦ ∑ n ∈ range ⌊x⌋₊, (-1)^(Ω n)) =o[atTop] fun x ↦ x := by\n have h_lambda_pnt : (fun N : ℕ => ∑ n ∈ Finset.range N, (-1 : ℝ) ^ (Nat.factorization n).sum (fun p k => k)) =o[Filter.atTop] (fun N : ℕ => (N : ℝ)) := by\n have h_lambda_pnt : (fun N : ℕ => ∑ n ∈ Finset.Icc 1 N, (-1 : ℝ) ^ (Nat.factorization n).sum (fun p k => k)) =o[Filter.atTop] (fun N : ℕ => (N : ℝ)) := by\n have h_lambda_pnt : (fun N : ℕ => ∑ d ∈ Finset.Icc 1 (Nat.sqrt N), ∑ k ∈ Finset.Icc 1 (N / d^2), (μ k : ℝ)) =o[Filter.atTop] (fun N : ℕ => (N : ℝ)) := by\n exact sum_mu_div_sq_isLittleO\n convert h_lambda_pnt using 2;\n convert sum_lambda_eq_sum_mu_div_sq _;\n exact Eq.symm cardFactors_eq_sum_factorization\n have h_lambda_pnt : (fun N : ℕ => ∑ n ∈ Finset.range (N + 1), (-1 : ℝ) ^ (Nat.factorization n).sum (fun p k => k)) =o[Filter.atTop] (fun N : ℕ => (N : ℝ)) := by\n rw [ Asymptotics.isLittleO_iff_tendsto' ] at * <;> norm_num at *;\n · convert h_lambda_pnt.add ( show Filter.Tendsto ( fun x : ℕ => ( 1 : ℝ ) / x ) Filter.atTop ( nhds 0 ) from tendsto_const_nhds.div_atTop tendsto_natCast_atTop_atTop ) using 2 <;> norm_num [ Finset.sum_Ico_eq_sum_range ];\n erw [ Finset.sum_Ico_eq_sub _ _ ] <;> norm_num [ Finset.sum_range_succ' ] ; ring_nf;\n · exact ⟨ 1, by aesop ⟩;\n · exact ⟨ 1, by aesop ⟩;\n simp_all +decide only [Finset.sum_range_succ]\n have := h_lambda_pnt.sub ( show ( fun N : ℕ => ( -1 : ℝ ) ^ N.factorization.sum fun p k => k ) =o[Filter.atTop] fun N : ℕ => ( N : ℝ ) from ?_ );\n · aesop;\n · rw [ Asymptotics.isLittleO_iff_tendsto' ] <;> norm_num;\n · exact tendsto_zero_iff_norm_tendsto_zero.mpr ( by simpa using tendsto_inv_atTop_nhds_zero_nat );\n · exact ⟨ 1, fun n hn => by positivity ⟩;\n have h_floor : (fun x : ℝ => ∑ n ∈ Finset.range ⌊x⌋₊, (-1 : ℝ) ^ (Nat.factorization n).sum (fun p k => k)) =o[Filter.atTop] (fun x : ℝ => (⌊x⌋₊ : ℝ)) := by\n rw [ Asymptotics.isLittleO_iff_tendsto' ] at * <;> norm_num at *;\n · exact h_lambda_pnt.comp <| tendsto_nat_floor_atTop;\n · exact ⟨ 1, by aesop ⟩;\n · exact ⟨ 1, by intros; linarith ⟩;\n rw [ Asymptotics.isLittleO_iff ] at *;\n intro c hc\n filter_upwards [h_floor (half_pos hc), Filter.eventually_gt_atTop 1] with x hx₁ hx₂\n refine le_trans ?_ (le_trans hx₁ ?_)\n · norm_num [ Norm.norm ];\n convert le_rfl using 2;\n congr! 2;\n exact Eq.symm cardFactors_eq_sum_factorization\n · norm_num [ abs_of_nonneg, Nat.floor_le, hx₂.le ];\n rw [ abs_of_nonneg ( by positivity ) ] ; nlinarith [ Nat.floor_le ( by positivity : 0 ≤ x ) ]\n","line":2203,"end_line":2253,"proof_status":"formalized"} {"id":"mu-pnt-alt","label":"mu-pnt-alt","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["mu-pnt"],"nlp_text":"We have \\(\\sum _{n \\leq x} \\mu (n)/n = o(1)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/mu_pnt_alt","latex_link":"sect0005.html#mu-pnt-alt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/mu_pnt_alt","lean_decl_name":"mu_pnt_alt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n \"mu-pnt-alt\"\n (title := \"Alternate M\\\\\\\"obius form of prime number theorem\")\n (statement := /-- We have $\\sum_{n \\leq x} \\mu(n)/n = o(1)$. -/)\n (proof := /--\n As in the proof of Theorem \\ref{mun}, we have\n $$ 1 = \\sum_{d \\leq x} \\mu(d) \\lfloor \\frac{x}{d} \\rfloor$$\n $$ = x \\sum_{d \\leq x} \\frac{\\mu(d)}{d} - \\sum_{d \\leq x} \\mu(d) \\{ \\frac{x}{d} \\}$$\n so it will suffice to show that\n $$ \\sum_{d \\leq x} \\mu(d) \\{ \\frac{x}{d} \\} = o(x).$$\n Let $N$ be a natural number. It suffices to show that\n $$ \\sum_{d \\leq x} \\mu(d) \\{ \\frac{x}{d} \\} = O(x/N).$$\n if $x$ is large enough depending on $N$.\n We can split the left-hand side as the sum of\n $$ \\sum_{d \\leq x/N} \\mu(d) \\{ \\frac{x}{d} \\} $$\n and\n $$ \\sum_{j=1}^{N-1} \\sum_{x/(j+1) < d \\leq x/j} \\mu(d) (x/d - j).$$\n The first term is clearly $O(x/N)$. For the second term, we can use Theorem \\ref{mu-pnt}\n and summation by parts (using the fact that $x/d-j$ is monotone and bounded) to find that\n $$ \\sum_{x/(j+1) < d \\leq x/j} \\mu(d) (x/d - j) = o(x)$$\n for any given $j$, so in particular\n $$ \\sum_{x/(j+1) < d \\leq x/j} \\mu(d) (x/d - j) = O(x/N^2)$$\n for all $j=1,\\dots,N-1$ if $x$ is large enough depending on $N$.\n Summing all the bounds, we obtain the claim.\n -/)\n (proofUses := [\"mu-pnt\"])\n (latexEnv := \"proposition\")]\ntheorem mu_pnt_alt : (fun x : ℝ ↦ ∑ n ∈ range ⌊x⌋₊, (μ n : ℝ) / n) =o[atTop] fun _ ↦ (1 : ℝ) := by\n rw [Asymptotics.isLittleO_iff_tendsto'] <;> norm_num\n have h_sum_zero : Filter.Tendsto (fun x : ℝ => ∑ n ∈ Finset.Icc 1 ⌊x⌋₊, (μ n : ℝ) / n) Filter.atTop (nhds 0) := by\n set S : ℝ → ℝ := fun y => ∑ n ∈ Finset.Icc 1 ⌊y⌋₊, (μ n : ℝ) / n\n have h_bound : ∀ K : ℕ, 0 < K → ∀ x : ℝ, 1 ≤ x → |S (x / K)| ≤ 1 / K + 1 / x + |∑ n ∈ Finset.Ioc ⌊x / K⌋₊ ⌊x⌋₊, (μ n : ℝ) * (⌊x / (n : ℝ)⌋ : ℝ)| / x := by\n intros K hK x hx\n have h_approx : |x * S (x / K) - 1| ≤ x / K + |∑ n ∈ Finset.Ioc ⌊x / K⌋₊ ⌊x⌋₊, (μ n : ℝ) * (⌊x / (n : ℝ)⌋ : ℝ)| := by\n convert sum_mobius_div_approx x K hK hx using 1\n rw [abs_le] at *\n ring_nf at *\n constructor <;> nlinarith [inv_pos.2 (by positivity : 0 < x), mul_inv_cancel₀ (by positivity : x ≠ 0), abs_nonneg (∑ n ∈ Finset.Ioc ⌊ (K : ℝ) ⁻¹ * x⌋₊ ⌊x⌋₊, (μ n : ℝ) * ⌊x * (n : ℝ) ⁻¹⌋)]\n have h_tail_zero : ∀ K : ℕ, 0 < K → Filter.Tendsto (fun x : ℝ => |∑ n ∈ Finset.Ioc ⌊x / K⌋₊ ⌊x⌋₊, (μ n : ℝ) * (⌊x / (n : ℝ)⌋ : ℝ)| / x) Filter.atTop (nhds 0) := by\n intro K hK\n have h_tail_zero : Filter.Tendsto (fun x : ℝ => |∑ n ∈ Finset.Ioc ⌊x / K⌋₊ ⌊x⌋₊, (μ n : ℝ) * (⌊x / (n : ℝ)⌋ : ℝ)| / x) Filter.atTop (nhds 0) := by\n have := sum_mobius_floor_tail_isLittleO K hK\n rw [Asymptotics.isLittleO_iff_tendsto'] at this\n · simpa [abs_div] using this.abs.congr' (by filter_upwards [Filter.eventually_gt_atTop 0] with x hx using by rw [abs_div, abs_of_nonneg hx.le])\n · filter_upwards [Filter.eventually_gt_atTop 0] with x hx hx' using absurd hx' hx.ne'\n convert h_tail_zero using 1\n have h_eps : ∀ ϵ > 0, ∃ Y : ℝ, ∀ y ≥ Y, |S y| < ϵ := by\n intros ϵ hϵ_pos\n obtain ⟨K, hK_pos, hK⟩ : ∃ K : ℕ, 0 < K ∧ 1 / (K : ℝ) < ϵ / 3 := by\n exact ⟨⌊ϵ⁻¹ * 3⌋₊ + 1, Nat.succ_pos _, by rw [div_lt_iff₀] <;> push_cast <;> nlinarith [Nat.lt_floor_add_one (ϵ⁻¹ * 3), mul_inv_cancel₀ hϵ_pos.ne']⟩\n obtain ⟨Y, hY⟩ : ∃ Y : ℝ, ∀ x ≥ Y, |S (x / K)| < ϵ := by\n have h_tail_zero : Filter.Tendsto (fun x : ℝ => 1 / (K : ℝ) + 1 / x + |∑ n ∈ Finset.Ioc ⌊x / K⌋₊ ⌊x⌋₊, (μ n : ℝ) * (⌊x / (n : ℝ)⌋ : ℝ)| / x) Filter.atTop (nhds (1 / (K : ℝ))) := by\n simpa using Filter.Tendsto.add (tendsto_const_nhds.add (tendsto_inv_atTop_zero)) (h_tail_zero K hK_pos)\n exact Filter.eventually_atTop.mp (h_tail_zero.eventually (gt_mem_nhds <| by linarith)) |> fun ⟨Y, hY⟩ ↦ ⟨Max.max Y 1, fun x hx ↦ lt_of_le_of_lt (h_bound K hK_pos x <| le_trans (le_max_right _ _) hx) <| hY x <| le_trans (le_max_left _ _) hx⟩\n use Y / K; intros y hy; specialize hY (y * K) (by nlinarith [show (K : ℝ) ≥ 1 by norm_cast, div_mul_cancel₀ Y (by positivity : (K : ℝ) ≠ 0)]) ; simp_all +decide [ne_of_gt]\n exact Metric.tendsto_atTop.mpr fun ε hε => by simpa using h_eps ε hε\n have h_sum_zero : Filter.Tendsto (fun x : ℝ => ∑ n ∈ Finset.range (⌊x⌋₊ + 1), (μ n : ℝ) / n) Filter.atTop (nhds 0) := by\n convert h_sum_zero using 2 ; erw [Finset.sum_Ico_eq_sub _ _] <;> norm_num [Finset.sum_range_succ']\n simpa [Finset.sum_range_succ] using h_sum_zero.sub (show Filter.Tendsto (fun x : ℝ => (μ ⌊x⌋₊ : ℝ) / ⌊x⌋₊) Filter.atTop (nhds 0) from tendsto_zero_iff_norm_tendsto_zero.mpr <| squeeze_zero (fun _ => by positivity) (fun x => by simpa using div_le_div_of_nonneg_right (show |(μ ⌊x⌋₊ : ℝ)| ≤ 1 from mod_cast by { unfold ArithmeticFunction.moebius; aesop }) <| Nat.cast_nonneg _) <| tendsto_inv_atTop_zero.comp <| tendsto_natCast_atTop_atTop.comp <| tendsto_nat_floor_atTop)\n","line":2376,"end_line":2434,"proof_status":"formalized"} {"id":"pi_asymp","label":"pi_asymp","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["chebyshev-asymptotic"],"nlp_text":"There exists a function \\(c(x)\\) such that \\(c(x) = o(1)\\) as \\(x \\to \\infty \\) and \\[ \\pi (x) = (1 + c(x)) \\int _2^x \\frac{dt}{\\log t} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pi_asymp","latex_link":"sect0005.html#pi_asymp","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pi_asymp","lean_decl_name":"pi_asymp","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"theorem pi_asymp'' :\n (fun x => ((Nat.primeCounting ⌊x⌋₊ : ℝ) / ∫ t in Set.Icc 2 x, 1 / log t) - (1 : ℝ)) =o[atTop]\n fun _ => (1 : ℝ) := by\n obtain ⟨f, hf, f_int, hf'⟩ := chebyshev_asymptotic''\n have eq1 : ∀ᶠ (x : ℝ) in atTop,\n ⌊x⌋₊.primeCounting =\n (log x)⁻¹ * (x + x * f x) +\n (∫ t in Set.Icc 2 x,\n (t + t * f t) * (t * log t ^ 2)⁻¹) := by\n filter_upwards [eventually_ge_atTop 2] with x hx\n rw [pi_asymp_aux x hx, hf' x (by linarith)]\n congr 1\n apply setIntegral_congr_fun measurableSet_Icc fun t ht ↦ ?_\n rw [hf' t (by grind)]\n\n replace eq1 :\n ∀ᶠ (x : ℝ) in atTop,\n ⌊x⌋₊.primeCounting =\n (log x)⁻¹ * (x + x * f x) +\n ((∫ t in Set.Icc 2 x, (log t ^ 2)⁻¹) +\n (∫ t in Set.Icc 2 x, (f t) * (log t ^ 2)⁻¹)) := by\n filter_upwards [eq1, eventually_ge_atTop 2] with x eq1 hx\n rw [eq1]\n congr\n simp_rw [mul_inv_rev, add_mul]\n rw [MeasureTheory.integral_add]\n · congr 1\n all_goals\n apply setIntegral_congr_fun measurableSet_Icc fun t ht ↦ ?_\n field [show t ≠ 0 by grind]\n · apply IntegrableOn.mul_continuousOn\n (hg := ContinuousOn.integrableOn_Icc <| continuousOn_id' _)\n (hK := isCompact_Icc)\n apply continuousOn_log1.mono ?_\n intro y h\n simp only [Set.mem_Icc, Set.mem_compl_iff, Set.mem_insert_iff,\n Set.mem_singleton_iff, not_or] at h ⊢\n exact ⟨by linarith, by linarith, by linarith⟩\n · rw [show (fun t ↦ t * f t * ((log t ^ 2)⁻¹ * t⁻¹)) =\n fun t ↦ f t * (t * (log t ^ 2)⁻¹ * t⁻¹) by ext; ring]\n apply IntegrableOn.mul_continuousOn (hK := isCompact_Icc)\n · apply f_int x (by linarith)\n · simp_rw [mul_assoc]\n refine ContinuousOn.mul (continuousOn_id' (Set.Icc 2 x)) ?_\n apply continuousOn_log1.mono ?_\n intro y h\n simp only [Set.mem_Icc, Set.mem_compl_iff, Set.mem_insert_iff,\n Set.mem_singleton_iff, not_or] at h ⊢\n exact ⟨by linarith, by linarith, by linarith⟩\n\n simp_rw [mul_add] at eq1\n simp_rw [show ∀ (x : ℝ),\n (log x)⁻¹ * x + (log x)⁻¹ * (x * f x) +\n ((∫ (t : ℝ) in Set.Icc 2 x, (log t ^ 2)⁻¹) +\n ∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹) =\n ((log x)⁻¹ * x + (∫ (t : ℝ) in Set.Icc 2 x, (log t ^ 2)⁻¹)) +\n ((log x)⁻¹ * (x * f x) +\n ∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹)\n by intros; ring] at eq1\n\n replace eq1 :\n ∃ (C : ℝ), ∀ᶠ (x : ℝ) in atTop,\n ⌊x⌋₊.primeCounting =\n (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n ((log x)⁻¹ * (x * f x) +\n ∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹) +\n C := by\n use ((log 2)⁻¹ * 2)\n filter_upwards [eq1, eventually_ge_atTop 2] with x eq1 hx\n rw [eq1, ← integral_log_inv'' _ _ (by rfl) hx]\n ring\n replace eq1 :\n ∃ (C : ℝ), ∀ᶠ (x : ℝ) in atTop,\n (⌊x⌋₊.primeCounting / ∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) - 1 =\n ((log x)⁻¹ * (x * f x) / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n (∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹) /\n (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹)) +\n C / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) := by\n obtain ⟨C, hC⟩ := eq1\n use C\n filter_upwards [hC, eventually_gt_atTop 2] with x hC hx\n rw [hC]\n field [integral_log_inv_ne_zero]\n simp_rw [isLittleO_iff] at hf\n choose C hC using eq1\n simp_rw [← one_div] at hC\n apply isLittleO_congr hC (by rfl) |>.mpr\n have ineq1 (ε : ℝ) (hε : 0 < ε) (c : ℝ) (hc : 0 < c) : ∀ᶠ(x : ℝ) in atTop,\n (log x)⁻¹ * x * |f x| ≤ c * ε * ((log x)⁻¹ * x) := by\n filter_upwards [eventually_ge_atTop 2, hf ε hε hc] with x hx hM\n simp only [norm_eq_abs] at hM\n rw [abs_of_pos hε] at hM\n rw [mul_comm (c * ε)]\n gcongr\n bound\n have int_flog {a b : ℝ} (ha: 2 ≤ a) (hb : 2 ≤ b) :\n IntegrableOn (fun t ↦ |f t| * (log t ^ 2)⁻¹) (Set.Icc a b) volume := by\n apply IntegrableOn.mul_continuousOn\n · apply Integrable.abs <| f_int b hb |>.mono (Set.Icc_subset_Icc_left ha) (by rfl)\n · refine ContinuousOn.inv₀ (ContinuousOn.pow (continuousOn_log |>.mono ?_) 2) ?_\n · simp\n grind\n · intro t ht\n simp only [Set.mem_Icc, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true,\n pow_eq_zero_iff, log_eq_zero, not_or] at ht ⊢\n exact ⟨by linarith, by linarith, by linarith⟩\n · exact isCompact_Icc\n have int_inv_log_sq {a b : ℝ} (ha : 2 ≤ a) (hb : 2 ≤ b) :\n IntegrableOn (fun t ↦ (log t ^ 2)⁻¹) (Set.Icc a b) volume := by\n refine ContinuousOn.integrableOn_Icc <|\n ContinuousOn.inv₀ (ContinuousOn.pow (continuousOn_log |>.mono ?_) 2) ?_\n · grind\n · intro t ht\n simp only [Set.mem_Icc, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true,\n pow_eq_zero_iff, log_eq_zero, not_or] at ht ⊢\n exact ⟨by linarith, by linarith, by linarith⟩\n simp_rw [eventually_atTop] at hf\n choose M hM using hf\n have ineq2 (ε : ℝ) (hε : 0 < ε) (c : ℝ) (hc : 0 < c) :\n ∃ (D : ℝ),\n ∀ᶠ (x : ℝ) in atTop,\n |∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹| ≤\n c * ε * ((∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) - (log x)⁻¹ * x) + D := by\n use (((∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)), |f t| * (log t ^ 2)⁻¹) -\n c * ε * ∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)), (log t ^ 2)⁻¹) +\n c * ε * ((log 2)⁻¹ * 2))\n filter_upwards [eventually_gt_atTop (max 2 (M ε hε hc))] with x hx\n calc _\n _ ≤ ∫ (t : ℝ) in Set.Icc 2 x, |f t * (log t ^ 2)⁻¹| :=\n norm_integral_le_integral_norm fun a ↦ f a * (log a ^ 2)⁻¹\n _ = ∫ (t : ℝ) in Set.Icc 2 x, |f t| * (log t ^ 2)⁻¹ := by\n apply setIntegral_congr_fun measurableSet_Icc fun t ht ↦ ?_\n rw [abs_mul, abs_of_nonneg (a := (log t ^ 2)⁻¹)]\n norm_num\n apply pow_nonneg\n exact log_nonneg <| by grind\n _ = (∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)),\n |f t| * (log t ^ 2)⁻¹) +\n (∫ (t : ℝ) in Set.Icc (max 2 (M ε hε hc)) x,\n |f t| * (log t ^ 2)⁻¹) := by\n rw [← integral_union_ae, Set.Icc_union_Icc_eq_Icc (le_max_left ..) hx.le]\n · rw [AEDisjoint, Set.Icc_inter_Icc_eq_singleton (le_max_left ..) hx.le, volume_singleton]\n · simp only [measurableSet_Icc, MeasurableSet.nullMeasurableSet]\n · apply int_flog (by rfl) (le_max_left ..)\n · apply int_flog (le_max_left ..) (le_trans (le_max_left ..) hx.le)\n _ ≤ (∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)),\n |f t| * (log t ^ 2)⁻¹) +\n (∫ (t : ℝ) in Set.Icc (max 2 (M ε hε hc)) x,\n (c * ε) * (log t ^ 2)⁻¹) := by\n gcongr 1\n apply setIntegral_mono_on\n · apply int_flog (le_max_left ..) (le_trans (le_max_left ..) hx.le)\n · rw [IntegrableOn, integrable_const_mul_iff]\n · apply int_inv_log_sq (le_max_left ..) (le_trans (le_max_left ..) hx.le)\n · simp only [isUnit_iff_ne_zero, ne_eq, _root_.mul_eq_zero, not_or]\n exact ⟨by linarith, by linarith⟩\n · exact measurableSet_Icc\n · intro t ht\n simp only [Set.mem_Icc, sup_le_iff] at ht\n apply mul_le_mul_of_nonneg_right\n · refine hM ε hε hc t ht.1.2 |>.trans ?_\n simp only [norm_eq_abs, abs_of_pos hε, le_refl]\n · norm_num\n refine pow_nonneg (log_nonneg <| by linarith) 2\n _ = (∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)),\n |f t| * (log t ^ 2)⁻¹) +\n ((c * ε) * ∫ (t : ℝ) in Set.Icc (max 2 (M ε hε hc)) x, (log t ^ 2)⁻¹) := by\n congr 1\n exact integral_const_mul (c * ε) _\n _ = (∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)),\n |f t| * (log t ^ 2)⁻¹) +\n ((c * ε) *\n ((∫ (t : ℝ) in Set.Icc (max 2 (M ε hε hc)) x, (log t ^ 2)⁻¹) +\n ((∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)), (log t ^ 2)⁻¹)) -\n ((∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)), (log t ^ 2)⁻¹)))) := by\n ring\n _ = (∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)),\n |f t| * (log t ^ 2)⁻¹) +\n ((c * ε) *\n ((∫ (t : ℝ) in Set.Icc 2 x, (log t ^ 2)⁻¹) -\n ((∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)), (log t ^ 2)⁻¹)))) := by\n congr 3\n rw [add_comm, ← integral_union_ae, Set.Icc_union_Icc_eq_Icc (le_max_left ..) hx.le]\n · rw [AEDisjoint, Set.Icc_inter_Icc_eq_singleton (le_max_left ..) hx.le,\n volume_singleton]\n · simp only [measurableSet_Icc, MeasurableSet.nullMeasurableSet]\n · apply int_inv_log_sq (by rfl) (le_max_left ..)\n · apply int_inv_log_sq (le_max_left ..) (le_trans (le_max_left ..) hx.le)\n _ = ((c * ε) * (∫ (t : ℝ) in Set.Icc 2 x, (log t ^ 2)⁻¹)) +\n ((∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)),\n |f t| * (log t ^ 2)⁻¹) -\n (c * ε) * (∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)), (log t ^ 2)⁻¹)) := by\n ring\n _ = ((c * ε) * ((∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n ((log 2)⁻¹ * 2) - ((log x)⁻¹ * x))) +\n ((∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)),\n |f t| * (log t ^ 2)⁻¹) -\n (c * ε) * (∫ (t : ℝ) in Set.Icc 2 (max 2 (M ε hε hc)), (log t ^ 2)⁻¹)) := by\n congr 2\n rw [integral_log_inv' _ _ (by rfl)]\n · ring\n · simp only [max_lt_iff] at hx\n linarith\n _ = _ := by ring\n choose D hD using ineq2\n\n have ineq4 (const : ℝ) (ε : ℝ) (hε : 0 < ε) :\n ∀ᶠ x in atTop, |const / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹)| ≤ 1/2 * ε := by\n obtain rfl|hconst := eq_or_ne const 0\n · filter_upwards with x\n simp[hε.le]\n have ineq (x : ℝ) (hx : 2 < x) :=\n calc (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹)\n _ ≥ (∫ (_ : ℝ) in Set.Icc 2 x, (log x)⁻¹) := by\n apply setIntegral_mono_on (integrable_const _)\n · refine ContinuousOn.integrableOn_Icc <|\n ContinuousOn.inv₀ (continuousOn_log |>.mono ?_) ?_\n · simp only [Set.subset_compl_singleton_iff, Set.mem_Icc, not_and, not_le,\n isEmpty_Prop, ofNat_pos, IsEmpty.forall_iff]\n · intro t ht\n simp only [Set.mem_Icc, ne_eq, log_eq_zero, not_or] at ht ⊢\n exact ⟨by linarith, by linarith, by linarith⟩\n · exact measurableSet_Icc\n · intro t ⟨ht1, ht2⟩\n gcongr\n bound\n _ = (x - 2) * (log x)⁻¹ := by\n rw [MeasureTheory.integral_const]\n simp only [MeasurableSet.univ, Measure.restrict_apply, Set.univ_inter, volume_Icc,\n smul_eq_mul, mul_eq_mul_right_iff, ENNReal.toReal_ofReal_eq_iff, sub_nonneg,\n inv_eq_zero, log_eq_zero, Measure.real]\n refine Or.inl (le_of_lt hx)\n\n simp_rw [abs_div]\n have ineq (x : ℝ) (hx : 2 < x) :\n |const| / |∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹| ≤\n |const| / ((x - 2) * (log x)⁻¹) := by\n apply div_le_div₀ (abs_nonneg _) (by rfl)\n · apply mul_pos\n · linarith\n · norm_num\n rw [Real.log_pos_iff]\n · linarith\n · linarith\n · rw [abs_of_pos (integral_log_inv_pos _ hx)]\n exact ineq x hx\n have ineq (x : ℝ) (hx : 2 < x) :\n |const| / |∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹| ≤\n |const| * (log x / ((x - 2))) := by\n refine ineq x hx |>.trans <| le_of_eq ?_\n field_simp\n have lim := Real.tendsto_pow_log_div_mul_add_atTop 1 (-2) 1 (by norm_num)\n simp only [pow_one, one_mul, ← sub_eq_add_neg] at lim\n rw [tendsto_atTop_nhds] at lim\n specialize lim (Metric.ball 0 ((1/2) * ε / |const| : ℝ)) (by\n simp only [Metric.mem_ball, dist_self]\n apply _root_.div_pos\n · linarith\n · simpa only [abs_pos, ne_eq]) Metric.isOpen_ball\n obtain ⟨M, hM⟩ := lim\n rw [eventually_atTop]\n refine ⟨max 3 M, ?_⟩\n intro x hx\n simp only [Metric.mem_ball, dist_zero_right, max_le_iff, norm_eq_abs] at hM hx\n refine ineq x (by linarith) |>.trans ?_\n specialize hM x hx.2\n rw [abs_of_nonneg (by\n apply div_nonneg\n · refine log_nonneg (by linarith)\n · linarith)] at hM\n have ineq' : |const| * (log x / (x - 2)) < |const| * ((1/2) * ε / |const|) := by\n rw [mul_lt_mul_iff_right₀]\n · exact hM\n · simpa only [abs_pos, ne_eq]\n rw [mul_div_cancel₀] at ineq'\n · refine le_of_lt ineq'\n · simpa only [ne_eq, abs_eq_zero]\n rw [isLittleO_iff]\n intro ε hε\n specialize ineq4 (|D ε hε (1/2) (by linarith)| + |C|) ε hε\n simp only [one_div, norm_eq_abs, norm_one, mul_one]\n filter_upwards [eventually_gt_atTop 2, ineq4, ineq1 ε hε (1 / 2) (by norm_num),\n hD ε hε (1 / 2) (by norm_num)] with x hx hB ineq1 hD\n have := integral_log_inv_pos x (by linarith) |>.le\n calc _\n _ ≤ |((log x)⁻¹ * (x * f x) / ∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹)| +\n |(∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹) /\n ∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹| +\n |C / ∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹| := by\n apply abs_add_three\n _ = |(log x)⁻¹ * (x * f x)| / |∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹| +\n |(∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹)| /\n |∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹| +\n |C| / |∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹| := by\n rw [abs_div, abs_div, abs_div]\n _ = |(log x)⁻¹ * (x * f x)| / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n |(∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹)| /\n (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n |C| / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) := by\n repeat rw [abs_of_pos <| integral_log_inv_pos _ (by linarith)]\n _ = ((log x)⁻¹ * x * |f x|) / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n |(∫ (t : ℝ) in Set.Icc 2 x, f t * (log t ^ 2)⁻¹)| /\n (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n |C| / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) := by\n congr\n rw [abs_mul, abs_mul, abs_of_nonneg (by bound), abs_of_nonneg (by linarith), mul_assoc]\n _ ≤ ((1/2) * ε * ((log x)⁻¹ * x)) / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n ((1/2) * ε * ((∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) - (log x)⁻¹ * x) +\n D ε hε (1/2) (by linarith)) / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n |C| / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) := by\n gcongr\n _ = ((1/2) * ε * (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹)) /\n (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) +\n (D ε hε (1/2) (by linarith) + |C|) / (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) := by\n ring\n _ = (1/2) * ε + (D ε hε (1/2) (by linarith) + |C|) /\n (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) := by\n congr 1\n rw [mul_div_assoc, div_self, mul_one]\n apply integral_log_inv_ne_zero\n linarith\n _ ≤ (1/2) * ε + (|D ε hε (1/2) (by linarith)| + |C|) /\n (∫ (t : ℝ) in Set.Icc 2 x, (log t)⁻¹) := by\n gcongr\n apply le_abs_self\n _ ≤ (1/2) * ε + (1/2) * ε := by\n rw [abs_div, abs_of_nonneg, abs_of_pos (a := ∫ _ in _, _)] at hB\n · gcongr\n · apply integral_log_inv_pos; linarith\n · positivity\n _ = ε := by\n field\n","line":430,"end_line":761,"proof_status":"formalized"} {"id":"primorial_bounds","label":"primorial_bounds","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["chebyshev-asymptotic"],"nlp_text":"We have \\[ \\prod _{p \\leq x} p = \\exp ( x + o(x) ) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/primorial_bounds","latex_link":"sect0005.html#primorial_bounds","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/primorial_bounds","lean_decl_name":"primorial_bounds","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"primorial-bounds\")\n (statement := /--\n We have\n $$ \\prod_{p \\leq x} p = \\exp( x + o(x) )$$\n -/)\n (proof := /-- Exponentiate Theorem \\ref{chebyshev_asymptotic}. -/)\n (latexEnv := \"corollary\")]\ntheorem primorial_bounds :\n ∃ E : ℝ → ℝ, E =o[atTop] (fun x ↦ x) ∧\n ∀ x : ℝ, ∏ p ∈ (Iic ⌊x⌋₊).filter Nat.Prime, p = exp (x + E x) := by\n use (fun x ↦ ∑ p ∈ (filter Nat.Prime (Iic ⌊x⌋₊)), log p - x)\n constructor\n · exact Asymptotics.IsEquivalent.isLittleO chebyshev_asymptotic\n intro x\n simp only [cast_prod, add_sub_cancel, exp_sum]\n apply Finset.prod_congr rfl\n intros x hx\n rw[Real.exp_log]\n rw[Finset.mem_filter] at hx\n norm_cast\n exact Nat.Prime.pos hx.right\n","line":276,"end_line":297,"proof_status":"formalized"} {"id":"fks2-corollary-14","label":"fks2-corollary-14","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["classical-bound-theta"],"nlp_text":"We have an admissible bound for \\(E_\\theta \\) with \\(A = 121.0961\\), \\(B=3/2\\), \\(C=2\\), \\(R = 5.5666305\\), \\(x_0=2\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_14","latex_link":"secondary-chapter.html#fks2-corollary-14","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_14","lean_decl_name":"FKS2.corollary_14","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" $$ \\mu_{asymp}(x_0,x_1) := \\frac{x_0 \\log(x_1)}{\\epsilon_{\\theta,asymp}(x_1) x_1 \\log(x_0)}\n \\left|\\frac{\\pi(x_0) - \\Li(x_0)}{x_0/\\log x_0} - \\frac{\\theta(x_0) - x_0}{x_0}\\right| +\n \\frac{2D_+(\\sqrt{\\log(x_1)} - \\frac{C}{2\\sqrt{R}}}{\\sqrt{\\log x_1}}$$.\n -/)]\nnoncomputable def μ_asymp (A B C R x₀ x₁ : ℝ) : ℝ :=\n (x₀ * log x₁) / ((admissible_bound A B C R x₁) * x₁ * log x₀) * |Eπ x₀ - Eθ x₀| +\n 2 * (dawson (sqrt (log x₁) - C / (2 * sqrt R))) / (sqrt (log x₁))\n\n@[blueprint\n \"fks2-def-5\"\n (title := \"FKS2 Definition 5\")\n","line":322,"end_line":332,"proof_status":"statement_formalized"} {"id":"pi-def","label":"pi-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\pi (x)\\) is the number of primes less than or equal to \\(x\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pi","latex_link":"secondary-chapter.html#pi-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pi","lean_decl_name":"pi","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"\n/- Standard arithmetic functions. TODO: align this with notation used elsewhere in PNT+ -/\n\n@[blueprint\n \"pi-def\"\n","line":20,"end_line":24,"proof_status":"formalized"} {"id":"Epi-def","label":"Epi-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def","li-def"],"nlp_text":"\\(E_\\pi (x) = |\\pi (x) - \\mathrm{Li}(x)| / \\mathrm{Li}(x)\\)","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eπ","latex_link":"secondary-chapter.html#Epi-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eπ","lean_decl_name":"Eπ","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"Epi-def\"\n (title := \"Equation (1) of FKS2\")\n (statement := /-- $E_\\pi(x) = |\\pi(x) - \\mathrm{Li}(x)| / \\mathrm{Li}(x)$ -/)]\nnoncomputable def Eπ (x : ℝ) : ℝ := |pi x - Li x| / (x / log x)","line":124,"end_line":128,"proof_status":"formalized"} {"id":"Dusart_cor_5_3_b","label":"Dusart_cor_5_3_b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x {\\gt} e^{1.112}\\), we have \\[ \\pi (x) \\leq \\frac{x}{\\log x - 1.112}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_b","latex_link":"secondary-chapter.html#Dusart_cor_5_3_b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_b","lean_decl_name":"Dusart.corollary_5_3_b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_3_b\"\n (title := \"Dusart Corollary 5.3 (b)\")\n (statement := /--\n For $x > e^{1.112}$, we have\n \\[\n \\pi(x) \\leq \\frac{x}{\\log x - 1.112}.\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_3_b {x : ℝ} (hx : x > exp 1.112) : pi x ≤ x / (log x - 1.112) := by sorry\n","line":298,"end_line":307,"proof_status":"formalized"} {"id":"Dusart_cor_5_3_c","label":"Dusart_cor_5_3_c","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x \\geq 468049\\), we have \\[ \\frac{x}{\\log x - 1 - \\frac{1}{\\log x}} \\leq \\pi (x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_c","latex_link":"secondary-chapter.html#Dusart_cor_5_3_c","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_c","lean_decl_name":"Dusart.corollary_5_3_c","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_3_c\"\n (title := \"Dusart Corollary 5.3 (c)\")\n (statement := /--\n For $x \\geq 468049$, we have\n \\[\n \\frac{x}{\\log x - 1 - \\frac{1}{\\log x}} \\leq \\pi(x).\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_3_c {x : ℝ} (hx : x ≥ 468049) : pi x ≥ x / (log x - 1 - 1 / log x) := by sorry\n","line":309,"end_line":318,"proof_status":"formalized"} {"id":"Dusart_thm_5_1","label":"Dusart_thm_5_1","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x \\geq 4 \\times 10^9\\), we have \\[ \\pi (x) = \\frac{x}{\\log x} \\Biggl(1 + \\frac{1}{\\log x} + \\frac{2 \\log \\log x}{\\log ^2 x} + O^*\\Bigl(\\frac{7.32}{\\log ^3 x}\\Bigr)\\Biggr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_1","latex_link":"secondary-chapter.html#Dusart_thm_5_1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_1","lean_decl_name":"Dusart.theorem_5_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_thm_5_1\"\n (title := \"Dusart Theorem 5.1\")\n (statement := /--\n For $x \\geq 4 \\times 10^9$, we have\n \\[\n \\pi(x) = \\frac{x}{\\log x} \\Biggl(1 + \\frac{1}{\\log x} + \\frac{2 \\log \\log x}{\\log^2 x} + O^*\\Bigl(\\frac{7.32}{\\log^3 x}\\Bigr)\\Biggr).\n \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem theorem_5_1 {x : ℝ} (hx : x ≥ 4e9) : ∃ E,\n (pi x = x / log x * (1 + 1 / log x + 2 * log (log x) / (log x) ^ 2 + E) ∧ |E| ≤ 7.32 / (log x) ^ 3) := by sorry\n","line":208,"end_line":218,"proof_status":"formalized"} {"id":"Dusart_cor_5_2_e","label":"Dusart_cor_5_2_e","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x \\geq 88789\\), we have \\[ \\pi (x) \\geq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1}{\\log x} + \\frac{2}{\\log ^2 x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_e","latex_link":"secondary-chapter.html#Dusart_cor_5_2_e","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_e","lean_decl_name":"Dusart.corollary_5_2_e","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_2_e\"\n (title := \"Dusart Corollary 5.2 (e)\")\n (statement := /--\n For $x \\geq 88789$, we have\n \\[\n \\pi(x) \\geq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1}{\\log x} + \\frac{2}{\\log^2 x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_2_e {x : ℝ} (hx : x ≥ 88789) : pi x ≥ x / log x * (1 + 1 / log x + 2 / (log x) ^ 2) := by sorry\n","line":264,"end_line":273,"proof_status":"formalized"} {"id":"Dusart_cor_5_2_d","label":"Dusart_cor_5_2_d","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x {\\gt} 1\\), we have \\[ \\pi (x) \\leq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1.2762}{\\log x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_d","latex_link":"secondary-chapter.html#Dusart_cor_5_2_d","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_d","lean_decl_name":"Dusart.corollary_5_2_d","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_2_d\"\n (title := \"Dusart Corollary 5.2 (d)\")\n (statement := /--\n For $x > 1$, we have\n \\[\n \\pi(x) \\leq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1.2762}{\\log x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_2_d {x : ℝ} (hx : x > 1) : pi x ≤ x / log x * (1 + 1.2762 / log x) := by sorry\n","line":253,"end_line":262,"proof_status":"formalized"} {"id":"buthe-theorem-2f","label":"buthe-theorem-2f","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def","li-def"],"nlp_text":"If \\(2 \\leq x \\leq 10^{19}\\), then \\(\\mathrm{li}(x) - \\pi (x) {\\gt} 0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2f","latex_link":"secondary-chapter.html#buthe-theorem-2f","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2f","lean_decl_name":"Buthe.theorem_2f","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Buthe.lean","lean4_code":"@[blueprint\n \"buthe-theorem-2f\"\n (title := \"Buthe Theorem 2(f)\")\n (statement := /-- If $2 \\leq x \\leq 10^{19}$, then $\\mathrm{li}(x) - \\pi(x) > 0$. --/)\n (latexEnv := \"theorem\")]\ntheorem theorem_2f {x : ℝ} (hx1 : 2 ≤ x) (hx2 : x ≤ 10 ^ 19) :\n li x - pi x > 0 := by sorry\n","line":70,"end_line":76,"proof_status":"formalized"} {"id":"Dusart_cor_5_2_f","label":"Dusart_cor_5_2_f","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x {\\gt} 1\\), we have \\[ \\pi (x) \\leq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1}{\\log x} + \\frac{2.53816}{\\log ^2 x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_f","latex_link":"secondary-chapter.html#Dusart_cor_5_2_f","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_f","lean_decl_name":"Dusart.corollary_5_2_f","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_2_f\"\n (title := \"Dusart Corollary 5.2 (f)\")\n (statement := /--\n For $x > 1$, we have\n \\[\n \\pi(x) \\leq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1}{\\log x} + \\frac{2.53816}{\\log^2 x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"corollary\")]\n\ntheorem corollary_5_2_f {x : ℝ} (hx : x > 1) : pi x ≤ x / log x * (1 + 1 / log x + 2.53816 / (log x) ^ 2) := by sorry\n","line":275,"end_line":285,"proof_status":"formalized"} {"id":"buthe-theorem-2e","label":"buthe-theorem-2e","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def","li-def"],"nlp_text":"If \\(2 \\leq x \\leq 10^{19}\\), then \\[ \\operatorname {li}(x) - \\pi (x) \\leq \\frac{\\sqrt{x}}{\\log (x)}\\left(1.95 + \\frac{3.9}{\\log x} + \\frac{19.5}{\\log (x)^2}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2e","latex_link":"secondary-chapter.html#buthe-theorem-2e","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2e","lean_decl_name":"Buthe.theorem_2e","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Buthe.lean","lean4_code":"@[blueprint\n \"buthe-theorem-2e\"\n (title := \"Buthe Theorem 2(e)\")\n (statement := /-- If $2 \\leq x \\leq 10^{19}$, then\n \\[\n \\mathrm{li}(x) - \\pi(x) \\leq \\frac{\\sqrt{x}}{\\log(x)}\\left(1.95 + \\frac{3.9}{\\log x} + \\frac{19.5}{\\log(x)^2}\\right).\n \\]\n --/)\n (latexEnv := \"theorem\")]\ntheorem theorem_2e {x : ℝ} (hx1 : 2 ≤ x) (hx2 : x ≤ 10 ^ 19) :\n li x - pi x ≤\n (sqrt x / log x) *\n","line":56,"end_line":67,"proof_status":"formalized"} {"id":"Dusart_cor_5_2_a","label":"Dusart_cor_5_2_a","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x \\geq 17\\), we have \\[ \\frac{x}{\\log x} \\leq \\pi (x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_a","latex_link":"secondary-chapter.html#Dusart_cor_5_2_a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_a","lean_decl_name":"Dusart.corollary_5_2_a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_2_a\"\n (title := \"Dusart Corollary 5.2 (a)\")\n (statement := /--\n For $x \\geq 17$, we have\n \\[\n \\frac{x}{\\log x} \\leq \\pi(x).\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_2_a {x : ℝ} (hx : x ≥ 17) : pi x ≥ x / log x := by sorry\n","line":220,"end_line":229,"proof_status":"formalized"} {"id":"Dusart_cor_5_3_a","label":"Dusart_cor_5_3_a","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x \\geq 5393\\), we have \\[ \\frac{x}{\\log x - 1} \\leq \\pi (x) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_a","latex_link":"secondary-chapter.html#Dusart_cor_5_3_a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_a","lean_decl_name":"Dusart.corollary_5_3_a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_3_a\"\n (title := \"Dusart Corollary 5.3 (a)\")\n (statement := /--\n For $x \\geq 5393$, we have\n \\[\n \\frac{x}{\\log x - 1} \\leq \\pi(x)\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_3_a {x : ℝ} (hx : x ≥ 5393) : pi x ≥ x / (log x - 1) := by sorry\n","line":287,"end_line":296,"proof_status":"formalized"} {"id":"Dusart_cor_5_2_c","label":"Dusart_cor_5_2_c","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x \\geq 599\\), we have \\[ \\pi (x) \\geq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1}{\\log x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_c","latex_link":"secondary-chapter.html#Dusart_cor_5_2_c","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_c","lean_decl_name":"Dusart.corollary_5_2_c","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_2_c\"\n (title := \"Dusart Corollary 5.2 (c)\")\n (statement := /--\n For $x \\geq 599$, we have\n \\[\n \\pi(x) \\geq \\frac{x}{\\log x} \\Bigl(1 + \\frac{1}{\\log x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_2_c {x : ℝ} (hx : x ≥ 599) : pi x ≥ x / log x * (1 + 1 / log x) := by sorry\n","line":242,"end_line":251,"proof_status":"formalized"} {"id":"Dusart_cor_5_3_d","label":"Dusart_cor_5_3_d","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x {\\gt} 5.6\\), we have \\[ \\pi (x) \\leq \\frac{x}{\\log x - 1 - \\frac{1.2311}{\\log x}}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_d","latex_link":"secondary-chapter.html#Dusart_cor_5_3_d","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_3_d","lean_decl_name":"Dusart.corollary_5_3_d","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_3_d\"\n (title := \"Dusart Corollary 5.3 (d)\")\n (statement := /--\n For $x > 5.6$, we have\n \\[\n \\pi(x) \\leq \\frac{x}{\\log x - 1 - \\frac{1.2311}{\\log x}}.\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_3_d {x : ℝ} (hx : x > 5.6) : pi x ≤ x / (log x - 1 - 1.2311 / log x) := by sorry\n","line":320,"end_line":329,"proof_status":"formalized"} {"id":"Dusart_cor_5_2_b","label":"Dusart_cor_5_2_b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi-def"],"nlp_text":"For \\(x {\\gt} 1\\), we have \\[ \\pi (x) \\leq 1.2551 \\frac{x}{\\log x}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_b","latex_link":"secondary-chapter.html#Dusart_cor_5_2_b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_2_b","lean_decl_name":"Dusart.corollary_5_2_b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_2_b\"\n (title := \"Dusart Corollary 5.2 (b)\")\n (statement := /--\n For $x > 1$, we have\n \\[\n \\pi(x) \\leq 1.2551 \\frac{x}{\\log x}.\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_2_b {x : ℝ} (hx : x > 1) : pi x ≤ 1.2551 * (x / log x) := by sorry\n","line":231,"end_line":240,"proof_status":"formalized"} {"id":"classical-bound-pi","label":"classical-bound-pi","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def"],"nlp_text":"We say that \\(E_\\pi \\) satisfies a classical bound with parameters \\(A, B, C, R, x_0\\) if for all \\(x \\geq x_0\\) we have \\[ E_\\pi (x) \\leq A \\left(\\frac{\\log x}{R}\\right)^B \\exp \\left(-C \\left(\\frac{\\log x}{R}\\right)^{1/2}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eπ.classicalBound","latex_link":"secondary-chapter.html#classical-bound-pi","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eπ.classicalBound","lean_decl_name":"Eπ.classicalBound","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PrimaryDefinitions.lean","lean4_code":" (statement := /-- $E_ψ(x) = |ψ(x) - x| / x$ -/)]\nnoncomputable def Eψ (x : ℝ) : ℝ := |ψ x - x| / x\n\nnoncomputable def admissible_bound (A B C R : ℝ) (x : ℝ) := A * (log x / R) ^ B * exp (-C * (log x / R) ^ (1/2))\n\n@[blueprint\n \"classical-bound-psi\"\n (title := \"Definition 1, FKS2\")\n","line":30,"end_line":37,"proof_status":"formalized"} {"id":"fks2-eq-11","label":"fks2-eq-11","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def","Etheta-def"],"nlp_text":"For \\(x_1 \\leq x_2 \\leq x_1 \\log x_1\\), we define \\[ \\mu _{num}(x_0,x_1,x_2) := \\frac{x_0 \\log (x_1)}{\\epsilon _{\\theta ,num}(x_1) x_1 \\log (x_0)} \\left|\\frac{\\pi (x_0) - \\operatorname {Li}(x_0)}{x_0/\\log x_0} - \\frac{\\theta (x_0) - x_0}{x_0}\\right| + \\frac{\\log (x_1)}{\\epsilon _{\\theta ,num}(x_1) x_1} \\sum _{i=0}^{N-1} \\epsilon _{\\theta ,num}(e^{b_i}) \\left( \\operatorname {Li}(e^{b_{i+1}}) - \\operatorname {Li}(e^{b_i}) + \\frac{e^{b_i}}{b_i} - \\frac{e^{b_{i+1}}}{b_{i+1}} \\right) + \\frac{\\log (x_2)}{x_2} \\left( \\operatorname {Li}(x_2) - \\frac{x_2}{\\log x_2} - \\operatorname {Li}(x_1) + \\frac{x_1}{\\log x_1} \\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.μ_num_1","latex_link":"secondary-chapter.html#fks2-eq-11","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.μ_num_1","lean_decl_name":"FKS2.μ_num_1","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" μ_num_1 b εθ_num x₀ x₁ x₂.toReal\n else\n μ_num_2 b εθ_num x₀ x₁\n\nnoncomputable def επ_num {N : ℕ} (b : Fin (N + 1) → ℝ) (εθ_num : ℝ → ℝ) (x₀ x₁ : ℝ)\n (x₂ : EReal) : ℝ :=\n εθ_num x₁ * (1 + μ_num b εθ_num x₀ x₁ x₂)\n\nnoncomputable def default_b (x₀ x₁ : ℝ) : Fin 2 → ℝ :=\n fun i ↦ if i = 0 then log x₀ else log x₁\n\n@[blueprint\n \"fks2-remark-7\"\n (title := \"FKS2 Remark 7\")\n (statement := /--\n If\n $$ \\frac{d}{dx} \\frac{\\log x}{x}\n \\left( \\Li(x) - \\frac{x}{\\log x} - \\Li(x_1) + \\frac{x_1}{\\log x_1} \\right)|_{x_2} \\geq 0 $$\n then $\\mu_{num,1}(x_0,x_1,x_2) < \\mu_{num,2}(x_0,x_1)$.\n","line":358,"end_line":376,"proof_status":"formalized"} {"id":"fks2-corollary-26","label":"fks2-corollary-26","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def"],"nlp_text":"One has \\[ |\\pi (x) - \\mathrm{Li}(x)| \\leq 0.4298 \\frac{x}{\\log x} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_26","latex_link":"secondary-chapter.html#fks2-corollary-26","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_26","lean_decl_name":"FKS2.corollary_26","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-corollary-26\"\n (title := \"FKS2 Corollary 26\")\n (statement := /--\n One has\n \\[\n |\\pi(x) - \\mathrm{Li}(x)| \\leq 0.4298 \\frac{x}{\\log x}\n \\]\n for all $x \\geq 2$.\n -/)\n (proof := /-- We numerically verify that the inequality holds by showing that, for $1 \\leq n \\leq 25$ and all $x \\in [p_n, p_{n+1}]$,\n \\[\n \\left| \\frac{\\log(x)}{x} (\\pi(x) - \\mathrm{Li}(x)) \\right| \\leq \\left| \\frac{\\log(p_n)}{p_n} (\\pi(p_n) - \\mathrm{Li}(p_{n+1})) \\right| \\leq 0.4298.\n \\]\n For $x$ satisfying $p_{25} = 97 \\leq x \\leq 10^{19}$, we use Theorem \\ref{buthe-theorem-2a} and verify\n \\[\n \\mathcal{E}(x) = \\frac{1}{\\sqrt{x}} \\left( 1.95 + \\frac{3.9}{\\log(x)} + \\frac{19.5}{(\\log(x))^2} \\right) \\leq 0.4298.\n \\]\n For $x > 10^{19}$, we use Theorem \\ref{fks-theorem-6} as well as values for $\\varepsilon_{\\pi,num}(x)$ found in Table 4 to conclude\n \\[\n \\varepsilon_{\\pi,num}(x) \\leq 0.4298.\n \\]\n -/)\n (latexEnv := \"corollary\")\n (discussion := 723)]\ntheorem corollary_26 : Eπ.bound 0.4298 2 := sorry","line":922,"end_line":947,"proof_status":"statement_formalized"} {"id":"fks2-corollary-24","label":"fks2-corollary-24","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def"],"nlp_text":"We have the bounds \\(E_\\pi (x) \\leq B(x)\\), where \\(B(x)\\) is given by Table 7.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_24","latex_link":"secondary-chapter.html#fks2-corollary-24","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_24","lean_decl_name":"FKS2.corollary_24","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-corollary-24\"\n (title := \"FKS2 Corollary 24\")\n (statement := /--\n We have the bounds $E_\\pi(x) \\leq B(x)$, where\n $B(x)$ is given by Table 7.\n -/)\n (proof := /-- Same as in Corollary \\ref{fks-corollary-23}.-/)\n (latexEnv := \"corollary\")]\ntheorem corollary_24 (B : ℝ → ℝ) (I : Set ℝ) (h : (B, I) ∈ table7) :\n ∀ x, log x ∈ I → Eπ x ≤ B x := sorry","line":910,"end_line":920,"proof_status":"statement_formalized"} {"id":"fks2-eq30","label":"fks2-eq30","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def","Etheta-def","Epsi-def"],"nlp_text":"For any \\(x \\geq x_0 {\\gt} 0\\), \\[ |\\pi (x) - \\operatorname {Li}(x)| \\leq \\left| \\frac{\\theta (x) - x}{\\log (x)} \\right| + \\left| \\pi (x_0) - \\operatorname {Li}(x_0) - \\frac{\\theta (x_0) - x_0}{\\log (x_0)} \\right| + \\left| \\int _{x_0}^{x} \\frac{\\theta (t) - t}{t(\\log (t))^2} \\, dt \\right|. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.eq_30","latex_link":"secondary-chapter.html#fks2-eq30","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.eq_30","lean_decl_name":"FKS2.eq_30","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"fks2-eq-12","label":"fks2-eq-12","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def","Etheta-def"],"nlp_text":"For \\(x_2 \\geq x_1 \\log x_1\\), we define \\[ \\mu _{num}(x_0,x_1) := \\frac{x_0 \\log (x_1)}{\\epsilon _{\\theta ,num}(x_1) x_1 \\log (x_0)} \\left|\\frac{\\pi (x_0) - \\operatorname {Li}(x_0)}{x_0/\\log x_0} - \\frac{\\theta (x_0) - x_0}{x_0}\\right| + \\frac{\\log (x_1)}{\\epsilon _{\\theta ,num}(x_1) x_1} \\sum _{i=0}^{N-1} \\epsilon _{\\theta ,num}(e^{b_i}) \\left( \\operatorname {Li}(e^{b_{i+1}}) - \\operatorname {Li}(e^{b_i}) + \\frac{e^{b_i}}{b_i} - \\frac{e^{b_{i+1}}}{b_{i+1}} \\right) + \\frac{1}{\\log x_1 + \\log (\\log x_1) - 1}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.μ_num_2","latex_link":"secondary-chapter.html#fks2-eq-12","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.μ_num_2","lean_decl_name":"FKS2.μ_num_2","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (proof := /-- This follows from the definitions of $\\mu_{num,1}$ and $\\mu_{num,2}$. -/)\n (latexEnv := \"remark\")\n (discussion := 673)]\ntheorem remark_7 {x₀ x₁ : ℝ} (x₂ : ℝ) (h : x₁ ≥ max x₀ 14)\n {N : ℕ} (b : Fin (N + 1) → ℝ) (hmono : Monotone b)\n (h_b_start : b 0 = log x₀)\n (h_b_end : b (Fin.last N) = log x₁)\n (εθ_num : ℝ → ℝ)\n (h_εθ_num : Eθ.numericalBound x₁ εθ_num) (x : ℝ) (hx₁ : x₁ ≤ x) (hx₂ : x ≤ x₂)\n (hderiv : deriv (fun x ↦ (log x) / x * (Li x - x / log x - Li x₁ + x₁ / log x₁)) x₂ ≥ 0) :\n μ_num_1 b εθ_num x₀ x₁ x₂ < μ_num_2 b εθ_num x₀ x₁ := by sorry\n\n@[blueprint\n \"fks2-remark-15\"\n (title := \"FKS2 Remark 15\")\n (statement := /--\n If $\\log x_0 \\geq 1000$ then we have an admissible bound for $E_\\theta$ with the indicated\n choice of $A(x_0)$, $B = 3/2$, $C = 2$, and $R = 5.5666305$.\n -/)\n","line":378,"end_line":396,"proof_status":"formalized"} {"id":"thm:jy_14","label":"jy_14","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epi-def"],"nlp_text":"One has \\[ |\\pi (x) - \\mathrm{Li}(x)| \\leq 0.028 x (\\log x)^{0.801} \\exp (-0.1853 \\log ^{3/5} x / (\\log \\log x)^{1/5})) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/JY.theorem_1_4","latex_link":"secondary-chapter.html#thm:jy_14","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/JY.theorem_1_4","lean_decl_name":"JY.theorem_1_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:jy_14\"\n (title := \"JY Theorem 1.4\")\n (statement := /--\n One has\n \\[\n |\\pi(x) - \\mathrm{Li}(x)| \\leq 0.028 x (\\log x)^{0.801}\n \\exp(-0.1853 \\log^{3/5} x / (\\log \\log x)^{1/5}))\n \\]\n for all $x \\geq 2$.\n -/)\n (latexEnv := \"theorem\")]\ntheorem JY.theorem_1_4 : Eπ.vinogradovBound 0.028 0.801 0.1853 23 := sorry","line":107,"end_line":119,"proof_status":"formalized"} {"id":"fks2-corollary-23","label":"fks2-corollary-23","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["classical-bound-pi"],"nlp_text":"\\(A_\\pi , B, C, x_0\\) as in [ 11 , Table 6 ] give an admissible asymptotic bound for \\(E_\\pi \\) with \\(R = 5.5666305\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_23","latex_link":"secondary-chapter.html#fks2-corollary-23","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_23","lean_decl_name":"FKS2.corollary_23","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-corollary-23\"\n (title := \"FKS2 Corollary 23\")\n (statement := /--\n $A_\\pi, B, C, x_0$ as in \\cite[Table 6]{FKS2} give an admissible asymptotic bound for $E_\\pi$ with\n $R = 5.5666305$.\n -/)\n (proof := /-- The bounds of the form $\\eps_{\\pi, asymp}(x)$ come from selecting a value $A$ for which Corollary \\ref{fks-corollary-22} provides a better bound at $x = e^{7500}$ and from verifying that the bound in Corollary \\ref{fks-corollary-22} decreases faster beyond this point. This final verification proceeds by looking at the derivative of the ratio as in Lemma \\ref{fks-lemma-10}. To verify these still hold for smaller $x$, we proceed as below. To verify the results for any $x$ in $\\log(10^{19}) < \\log(x) < 100000$, one simply proceeds as in \\cite[Lemmas 5.2, 5.3]{FKS} and interpolates the numerical results of Theorem \\ref{fks-theorem-6}. For instance, we use the values in Table 4 as a step function and verifies that it provides a tighter bound than we are claiming. Note that our verification uses a more refined collection of values than those provided in Table 4 or the tables posted online in https://arxiv.org/src/2206.12557v1/anc/PrimeCountingTables.pdf. To verify results for $x < 10^{19}$, one compares against the results from Theorem \\ref{buthe-theorem-2a}, or one checks directly for particularly small $x$.\n -/)\n (latexEnv := \"corollary\")\n (discussion := 722)]\ntheorem corollary_23 (Aπ B C x₀ : ℝ) (h : [Aπ, B, C, x₀] ∈ table6) :\n Eπ.classicalBound Aπ B C 5.5666305 x₀ := sorry","line":882,"end_line":894,"proof_status":"statement_formalized"} {"id":"fks2-corollary-22","label":"fks2-corollary-22","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["classical-bound-pi"],"nlp_text":"One has \\[ |\\pi (x) - \\mathrm{Li}(x)| \\leq 9.2211 x \\sqrt{\\log x} \\exp (-0.8476 \\sqrt{\\log x}) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_22","latex_link":"secondary-chapter.html#fks2-corollary-22","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_22","lean_decl_name":"FKS2.corollary_22","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-corollary-22\"\n (title := \"FKS2 Corollary 22\")\n (statement := /--\n One has\n \\[\n |\\pi(x) - \\mathrm{Li}(x)| \\leq 9.2211 x \\sqrt{\\log x} \\exp(-0.8476 \\sqrt{\\log x})\n \\]\n for all $x \\geq 2$.\n -/)\n (proof := /-- We fix $R = 1$, $x_0 = 2$, $x_1 = e^{100}$, $A_\\theta = 9.2211$, $B = 1.5$ and $C = 0.8476$. By Corollary \\ref{fks2-corollary-14}, these are admissible for all $x \\geq 2$, so we can apply Theorem \\ref{fks2-theorem-3} and calculate that\n \\begin{equation}\n \\mu_{asymp}(40.78\\ldots, e^{20000}) \\leq 5.01516 \\cdot 10^{-5}.\n \\end{equation}\n This implies that $A_\\pi = 121.103$ is admissible for all $x \\geq e^{20000}$.\n\n As in the proof of \\cite[Lemmas 5.2 and 5.3]{FKS} one may verify that the numerical results obtainable from Theorem \\ref{fks2-theorem-6}, using Corollary \\ref{fks2-corollary-8}, may be interpolated as a step function to give a bound on $E_\\pi(x)$ of the shape $\\varepsilon_{\\pi,asymp}(x)$. In this way we obtain that $A_\\pi = 121.107$ is admissible for $x > 2$. Note that the subdivisions we use are essentially the same as used in \\cite[Lemmas 5.2 and 5.3]{FKS}. In Table 5 we give a sampling of the relevant values, more of the values of $\\varepsilon_{\\pi,num}(x_1)$ can be found in Table 4. Far more detailed versions of these tables will be posted online in https://arxiv.org/src/2206.12557v1/anc/PrimeCountingTables.pdf.\n -/)\n (latexEnv := \"corollary\")\n (discussion := 721)]\ntheorem corollary_22 : Eπ.classicalBound 9.2211 1.5 0.8476 1 2 := sorry","line":850,"end_line":870,"proof_status":"statement_formalized"} {"id":"fks2-eq-13","label":"fks2-eq-13","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-eq-11","fks2-eq-12"],"nlp_text":"For \\(x_1 \\leq x_2\\), we define \\(\\epsilon _{\\pi ,num}(x_0,x_1,x_2) := \\epsilon _{\\theta ,num}(x_1) (1 + \\mu _{num}(x_0,x_1,x_2))\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.επ_num","latex_link":"secondary-chapter.html#fks2-eq-13","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.επ_num","lean_decl_name":"FKS2.επ_num","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (title := \"FKS2 Theorem 3\")\n (statement := /--\n If $B \\geq \\max(3/2, 1 + C^2/16 R)$, $x_0 > 0$, and one has an admissible asymptotic bound\n with parameters $A,B,C,x_0$ for $E_\\theta$, and\n $$ x_1 \\geq \\max( x_0, \\exp( (1 + \\frac{C}{2\\sqrt{R}}))^2),$$\n then\n $$ E_\\pi(x) \\leq \\epsilon_{\\theta,asymp}(x_1) ( 1 + \\mu_{asymp}(x_0,x_1) ) $$\n for all $x \\geq x_1$. In other words, we have an admissible bound with parameters\n $(1+\\mu_{asymp}(x_0,x_1))A, B, C, x_1$ for $E_\\pi$.\n -/)\n","line":404,"end_line":413,"proof_status":"formalized"} {"id":"BlaschkeNonZero","label":"BlaschkeNonZero","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["BlaschkeB","ZeroFactorization"],"nlp_text":"Let \\(0 {\\lt} r {\\lt} R{\\lt}1\\) and \\(f:\\overline{\\mathbb {D}_1}\\to \\mathbb {C}\\) be analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\). Then \\(B_f(z)\\neq 0\\) for all \\(z\\in \\overline{\\mathbb {D}_r}\\).","doc_url":null,"latex_link":"sect0004.html#BlaschkeNonZero","lean_link":null,"lean_decl_name":"BlaschkeNonZero","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"bklnw-prop-3-sub-3","label":"bklnw-prop-3-sub-3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq-2-4"],"nlp_text":"\\(f(2^n) = 1 + u_n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_3","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_3","lean_decl_name":"BKLNW.prop_3_sub_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"noncomputable def Inputs.default : Inputs := {\n α := 1.93378e-8\n hα := cor_2_1\n ε := table_8_ε\n hε := theorem_2\n x₁ := 1e19\n hx₁ := by grw [← exp_one_rpow, rpow_ofNat, exp_one_lt_three]; norm_num\n hx₁' := buthe_eq_1_7\n R := 5.5666305 -- a slightly more conservative value of 5.573412 was used in the paper\n hR := MT_theorem_1\n ZDB := FKS.corollary_2_9_merged -- stronger than what was used here, I think\n}\n\n\n","line":113,"end_line":126,"proof_status":"formalized"} {"id":"bklnw-prop-3-sub-5","label":"bklnw-prop-3-sub-5","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-prop-3-sub-3","bklnw-prop-3-sub-4"],"nlp_text":"\\(f(2^n) {\\gt} f(2^{n+1})\\) for \\(n \\geq 9\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_5","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_5","lean_decl_name":"BKLNW.prop_3_sub_5","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" (latexEnv := \"sublemma\")\n (discussion := 637)]\ntheorem prop_3_sub_7 (x₀ : ℝ) (hx₀ : x₀ ≥ 2 ^ 9) (x : ℝ)\n (hx : x ∈ Set.Ico x₀ (2 ^ (⌊(log x₀) / (log 2)⌋ + 1))) :\n f x ≤ f x₀ := by\n obtain ⟨hx_lo, hx_hi⟩ := hx\n have hx₀_pos : 0 < x₀ := by positivity\n set m := ⌊(log x₀) / (log 2)⌋\n have hm_nonneg : 0 ≤ m := Int.floor_nonneg.mpr <| div_nonneg (log_nonneg (by linarith)) (log_pos one_lt_two).le\n set n := m.toNat\n","line":213,"end_line":222,"proof_status":"formalized"} {"id":"bklnw-prop-3-sub-6","label":"bklnw-prop-3-sub-6","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq-2-4"],"nlp_text":"\\(f(x) \\leq f(2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1})\\) on \\([2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1}, \\infty )\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_6","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-6","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_6","lean_decl_name":"BKLNW.prop_3_sub_6","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" have hpow_eq : (2:ℝ)^(m + 1) = 2^(n+1) := by rw [show m + 1 = ((n + 1 : ℕ) : ℤ) by omega, zpow_natCast]\n rw [hpow_eq] at hx_hi\n have key : (2:ℝ)^((log x₀) / (log 2)) = x₀ := by\n rw [rpow_def_of_pos (by norm_num : (0:ℝ) < 2), mul_comm,\n div_mul_cancel₀ _ (log_pos one_lt_two).ne', exp_log hx₀_pos]\n have hx₀_ge : x₀ ≥ 2^n := by\n have h1 : (n : ℝ) ≤ (log x₀) / (log 2) := by\n calc (n : ℝ) = (m : ℝ) := by rw [← hn_eq]; simp\n _ ≤ (log x₀) / (log 2) := Int.floor_le _\n calc x₀ = 2^((log x₀) / (log 2)) := key.symm\n","line":224,"end_line":233,"proof_status":"statement_formalized"} {"id":"bklnw-prop-3-sub-8","label":"bklnw-prop-3-sub-8","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-prop-3-sub-6","bklnw-prop-3-sub-7"],"nlp_text":"\\(f(x) \\leq \\max \\left(f(x_0), f(2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1})\\right)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_8","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-8","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_8","lean_decl_name":"BKLNW.prop_3_sub_8","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"theorem prop_3 (I : Inputs) {x₀ x : ℝ} (hx₀ : x₀ ≥ 2 ^ 9)\n (hx : x ≥ x₀) :\n ∑ k ∈ Finset.Icc 3 ⌊ (log x)/(log 2) ⌋, θ (x^(1/k)) ≤\n (1 + I.α) * max (f x₀) (f (2^(⌊ (log x₀)/(log 2) ⌋ + 1))) * x^(1/3:ℝ) := by sorry\n\n@[blueprint\n \"bklnw-cor-3-1\"\n (title := \"Corollary 3.1\")\n (statement := /-- Let $b \\geq 7$. Assume $x \\geq e^b$. Then we have\n\\[\n\\psi(x) - \\theta(x) - \\theta(x^{1/2}) \\leq \\eta x^{1/3},\n\\]\nwhere\n","line":278,"end_line":290,"proof_status":"formalized"} {"id":"initial-factorization-small-prime-le","label":"initial-factorization-small-prime-le","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","balance-def"],"nlp_text":"A small prime \\(p \\leq \\sqrt{n}\\) can be in surplus by at most \\(M\\log n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_small_prime_le","latex_link":"tertiary-chapter.html#initial-factorization-small-prime-le","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_small_prime_le","lean_decl_name":"Erdos392.Params.initial.balance_small_prime_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-small-prime-le\"\n (statement := /-- A small prime $p \\leq \\sqrt{n}$ can be in surplus by at most $M\\log n$.-/)\n (proof := /-- Routine computation using Legendre's formula, noting that at most\n $\\log n / \\log 2$ powers of $p$ divide any given number up to $n$.-/)\n (latexEnv := \"sublemma\")\n (discussion := 513)]\ntheorem Params.initial.balance_small_prime_le (P : Params) {p : ℕ} :\n P.initial.balance p ≤ P.M * (Real.log P.n) / (Real.log 2):= by\n have h_sum_valuation_le_M_sum_multiples :\n (initial P).sum (fun m ↦ m.factorization p) ≤\n P.M * (∑ m ∈ Finset.Ico (P.n - P.n / P.M) P.n, m.factorization p) := by\n exact sum_valuation_le P p\n by_cases hp_prime : Nat.Prime p\n · have h_sum_multiples : ∑ m ∈ Finset.Ico (P.n - P.n / P.M) P.n, m.factorization p =\n ∑ k ∈ .Ico 1 (Nat.log p P.n + 1),\n ((Finset.Ico (P.n - P.n / P.M) P.n).filter (p ^ k ∣ ·)).card := by\n have h_sum_multiples_aux : ∀ m ∈ Finset.Ico (P.n - P.n / P.M) P.n, m.factorization p =\n ∑ k ∈ .Ico 1 (Nat.log p P.n + 1), (if p ^ k ∣ m then 1 else 0) := by\n intro m hm\n have h_factorization_eq : m.factorization p = ∑ k ∈ .Ico 1 (m.factorization p + 1), 1 := by simp\n rw [h_factorization_eq, ← Finset.sum_filter]\n refine sum_bij (fun k hk ↦ k) ?_ ?_ ?_ ?_ <;> norm_num\n · refine fun a ha₁ ha₂ ↦\n ⟨⟨ha₁, Nat.le_log_of_pow_le (y := P.n) hp_prime.one_lt ?_⟩, ?_⟩\n · refine le_trans (Nat.pow_le_pow_right hp_prime.pos ha₂) ?_\n refine le_trans (le_of_dvd (pos_of_ne_zero (by aesop)) (ordProj_dvd ..)) ?_\n linarith [Finset.mem_Ico.mp hm]\n · exact dvd_trans (pow_dvd_pow _ ha₂) <| ordProj_dvd ..\n · refine fun b hb₁ hb₂ hb₃ ↦ ⟨hb₁, Nat.le_of_not_gt fun hb₄ ↦\n absurd (dvd_trans (pow_dvd_pow _ hb₄) hb₃) <|\n pow_succ_factorization_not_dvd ?_ hp_prime⟩\n linarith [Finset.mem_Ico.mp hm, Nat.sub_pos_of_lt (show P.n / P.M < P.n from\n div_lt_self (pos_of_ne_zero (by grind)) (by linarith [P.hM]))]\n rw [sum_congr rfl h_sum_multiples_aux, sum_comm]; simp_all\n have h_factorial_factorization : (P.n.factorial.factorization p : ℤ) =\n ∑ k ∈ Ico 1 (log p P.n + 1), (P.n / p ^ k : ℤ) := by\n rw [factorization_def]\n · have := Fact.mk hp_prime\n rw [padicValNat_factorial] <;> aesop\n · assumption\n have h_balance_bound : (P.initial.balance p : ℤ) ≤ ∑ k ∈ .Ico 1 (Nat.log p P.n + 1),\n (P.M * ((Finset.Ico (P.n - P.n / P.M) P.n).filter (p ^ k ∣ ·)).card -\n (P.n / p ^ k : ℤ)) := by\n simp_all only [Factorization.balance, sum_sub_distrib, ← mul_sum ..,\n tsub_le_iff_right, sub_add_cancel]\n exact_mod_cast h_sum_valuation_le_M_sum_multiples\n have h_term_bound : ∀ k ∈ Finset.Ico 1 (Nat.log p P.n + 1),\n (P.M * ((Finset.Ico (P.n - P.n / P.M) P.n).filter (p ^ k ∣ ·)).card -\n (P.n / p ^ k : ℤ)) ≤ P.M :=\n fun k hk ↦ sub_le_iff_le_add'.mpr (mod_cast initial.term_bound P hp_prime (k := k))\n have h_num_terms_bound : (Nat.log p P.n : ℤ) ≤ Real.log P.n / Real.log p := by\n rw [le_div_iff₀ (log_pos <| Nat.one_lt_cast.mpr hp_prime.one_lt)]\n simpa using log_le_log (by norm_cast; exact Nat.Prime.pos hp_prime |> fun h ↦ pow_pos h _)\n (show (p ^ Nat.log p P.n : ℝ) ≤ P.n from mod_cast pow_log_le_self p <| by\n linarith [show P.n > 0 from pos_of_ne_zero <| by rintro h; have := P.hL; grind])\n have : Real.log p ≥ Real.log 2 := log_le_log (by norm_num) (mod_cast hp_prime.two_le)\n refine le_trans (Int.cast_le.mpr h_balance_bound) <|\n le_trans (Int.cast_le.mpr <| sum_le_sum h_term_bound) ?_\n norm_num [mul_div_assoc, mul_comm] at *\n gcongr\n exact h_num_terms_bound.trans (div_le_div_of_nonneg_left (log_nonneg <|\n mod_cast Nat.one_le_iff_ne_zero.mpr <| by rintro h; have := P.hL; grind)\n (log_pos <| by norm_num) this)\n · field_simp\n rw [show P.initial.balance p = 0 from ?_] <;> norm_num\n · exact mul_nonneg (cast_nonneg _) <| log_natCast_nonneg _\n · simp_all [Factorization.balance]","line":1302,"end_line":1369,"proof_status":"formalized"} {"id":"initial-factorization-small-prime-ge","label":"initial-factorization-small-prime-ge","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","balance-def"],"nlp_text":"A small prime \\(L {\\lt} p \\leq \\sqrt{n}\\) can be in deficit by at most \\(M\\log n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_small_prime_ge","latex_link":"tertiary-chapter.html#initial-factorization-small-prime-ge","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_small_prime_ge","lean_decl_name":"Erdos392.Params.initial.balance_small_prime_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-small-prime-ge\"\n (statement := /-- A small prime $L < p \\leq \\sqrt{n}$ can be in deficit by at most\n $M\\log n$.-/)\n (proof := /-- Routine computation using Legendre's formula, noting that at most\n $\\log n / \\log 2$ powers of $p$ divide any given number up to $n$.-/)\n (latexEnv := \"sublemma\")\n (discussion := 514)]\ntheorem Params.initial.balance_small_prime_ge (P : Params) {p : ℕ} (hp : p ≤ Real.sqrt P.n)\n (hp' : p > P.L) : P.initial.balance p ≥ - P.M * (Real.log P.n) / (Real.log 2) := by\n have h_bound_ℝ : (P.initial.balance p : ℝ) ≥ -(P.M * (Real.log P.n / Real.log p)) := by\n refine le_trans (b := - (P.M * (Nat.log p P.n : ℝ))) ?_ ?_\n · gcongr\n have h_p_gt_1 : 1 < p := lt_of_le_of_lt (succ_le_of_lt P.hL_pos) hp'\n have hn_pos : 0 < P.n := by\n refine pos_iff_ne_zero.mpr fun h ↦ ?_\n simp only [h, CharP.cast_eq_zero, Real.sqrt_zero, cast_nonpos] at hp\n linarith [hp, hp', P.hL_pos]\n rw [le_div_iff₀ (log_pos (by exact_mod_cast lt_of_le_of_lt (succ_le_of_lt P.hL_pos) hp'))]\n nth_rw 1 [← Real.log_pow]\n exact log_le_log (by positivity) <| by norm_cast; exact pow_log_le_self p (Nat.ne_of_gt hn_pos)\n norm_cast\n by_cases hp_prime : p.Prime\n · simpa using initial.balance_ge_neg_M_mul_log P hp_prime hp hp'\n · simp only [cast_mul, Factorization.balance, hp_prime, not_false_eq_true,\n factorization_eq_zero_of_not_prime, CharP.cast_eq_zero, sub_zero]\n rw [neg_le_iff_add_nonneg']\n positivity\n exact le_trans (by rw [mul_div]; ring_nf; gcongr; norm_cast; linarith [P.hL_pos]) h_bound_ℝ","line":1472,"end_line":1500,"proof_status":"formalized"} {"id":"I1","label":"I1","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_1(\\nu , \\epsilon , X, T) := \\frac{1}{2\\pi i} \\int _{-\\infty }^{-T} \\left( \\frac{-\\zeta '}\\zeta (\\sigma _0 + t i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma _0 + t i) X^{\\sigma _0 + t i} \\ i \\ dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₁","latex_link":"sect0003.html#I1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₁","lean_decl_name":"I₁","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I1\"\n (title := \"I₁\")\n (statement := /--\n $$\n I_1(\\nu, \\epsilon, X, T) := \\frac{1}{2\\pi i} \\int_{-\\infty}^{-T}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma_0 + t i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_0 + t i)\n X^{\\sigma_0 + t i}\n \\ i \\ dt\n $$\n -/)]\nnoncomputable def I₁ (SmoothingF : ℝ → ℝ) (ε X T : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t : ℝ in Iic (-T),\n SmoothedChebyshevIntegrand SmoothingF ε X ((1 + (Real.log X)⁻¹) + t * I)))","line":836,"end_line":852,"proof_status":"formalized"} {"id":"I1Bound","label":"I1Bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["I1","SmoothedChebyshevPull1_aux_integrable","riemannZetaLogDerivResidue"],"nlp_text":"We have that \\[ \\left|I_{1}(\\nu , \\epsilon , X, T) \\right| \\ll \\frac{X}{\\epsilon T} . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I1Bound","latex_link":"sect0003.html#I1Bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I1Bound","lean_decl_name":"I1Bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"\n\n\n\n@[blueprint\n (title := \"I1Bound\")\n (statement := /--\n We have that\n $$\n \\left|I_{1}(\\nu, \\epsilon, X, T)\\\n \\right| \\ll \\frac{X}{\\epsilon T}\n .\n $$\n Same with $I_9$.\n -/)\n (proof := /--\n Unfold the definitions and apply the triangle inequality.\n $$\n \\left|I_{1}(\\nu, \\epsilon, X, T)\\right| =\n \\left|\n \\frac{1}{2\\pi i} \\int_{-\\infty}^{-T}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma_0 + t i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_0 + t i)\n X^{\\sigma_0 + t i}\n \\ i \\ dt\n \\right|\n $$\n By Theorem \\ref{dlog_riemannZeta_bdd_on_vertical_lines} (once fixed!!),\n $\\zeta'/\\zeta (\\sigma_0 + t i)$ is bounded by $\\zeta'/\\zeta(\\sigma_0)$, and\n Theorem \\ref{riemannZetaLogDerivResidue} gives $\\ll 1/(\\sigma_0-1)$ for the latter. This gives:\n $$\n \\leq\n \\frac{1}{2\\pi}\n \\left|\n \\int_{-\\infty}^{-T}\n C \\log X\\cdot\n \\frac{C'}{\\epsilon|\\sigma_0 + t i|^2}\n X^{\\sigma_0}\n \\ dt\n \\right|\n ,\n $$\n where we used Theorem \\ref{MellinOfSmooth1b}.\n Continuing the calculation, we have\n $$\n \\leq\n \\log X \\cdot\n C'' \\frac{X^{\\sigma_0}}{\\epsilon}\n \\int_{-\\infty}^{-T}\n \\frac{1}{t^2}\n \\ dt\n \\ \\leq \\\n C''' \\frac{X\\log X}{\\epsilon T}\n ,\n $$\n where we used that $\\sigma_0=1+1/\\log X$, and $X^{\\sigma_0} = X\\cdot X^{1/\\log X}=e \\cdot X$.\n -/)\n (latexEnv := \"lemma\")]\ntheorem I1Bound\n {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2) (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF)\n (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x)\n (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) :\n ∃ C > 0, ∀(ε : ℝ) (_ : 0 < ε)\n (_ : ε < 1)\n (X : ℝ) (_ : 3 < X)\n {T : ℝ} (_ : 3 < T),\n ‖I₁ SmoothingF ε X T‖ ≤ C * X * Real.log X / (ε * T) := by\n\n\n obtain ⟨M, ⟨M_is_pos, M_bounds_mellin_hard⟩⟩ :=\n MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF\n\n have G0 : ∃K > 0, ∀(t σ : ℝ), 1 < σ → σ < 2 → ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ ≤ K * (σ - 1)⁻¹ := by\n let ⟨K', ⟨K'_pos, K'_bounds_zeta⟩⟩ := triv_bound_zeta\n use (2 * (K' + 1))\n use (by positivity)\n intro t\n intro σ\n intro cond\n intro cond2\n\n have T0 : 0 < K' + 1 := by positivity\n have T1 : 1 ≤ (σ - 1)⁻¹ := by\n have U : σ - 1 ≤ 1 := by linarith\n have U1 := (inv_le_inv₀ (by positivity) (by exact sub_pos.mpr cond)).mpr U\n simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, ge_iff_le, Complex.norm_div,\n norm_neg, tsub_le_iff_right, inv_one]\n\n have T : (K' + 1) * 1 ≤ (K' + 1) * (σ - 1)⁻¹ :=\n by\n exact (mul_le_mul_iff_right₀ T0).mpr T1\n have U := calc\n ‖ζ' (σ + t * I) / ζ (σ + t * I)‖ = ‖-ζ' (σ + t * I) / ζ (σ + t * I)‖ := by\n rw [← norm_neg _, mul_comm, neg_div' _ _]\n _ ≤ (σ - 1)⁻¹ + K' := K'_bounds_zeta σ t cond\n _ ≤ (σ - 1)⁻¹ + (K' + 1) := by aesop\n _ ≤ (K' + 1) * (σ - 1)⁻¹ + (K' + 1) := by aesop\n _ ≤ (K' + 1) * (σ - 1)⁻¹ + (K' + 1) * (σ - 1)⁻¹ := by linarith\n _ = 2 * (K' + 1) * (σ - 1)⁻¹ := by\n ring_nf\n\n exact U\n\n obtain ⟨K, ⟨K_is_pos, K_bounds_zeta_at_any_t'⟩⟩ := G0\n\n have C_final_pos : |π|⁻¹ * 2⁻¹ * (Real.exp 1 * K * M) > 0 := by\n positivity\n\n use (|π|⁻¹ * 2⁻¹ * (Real.exp 1 * K * M))\n use C_final_pos\n\n intro eps eps_pos eps_less_one X X_large T T_large\n\n let pts_re := 1 + (Real.log X)⁻¹\n let pts := fun (t : ℝ) ↦ (pts_re + t * I)\n\n\n have pts_re_triv : ∀(t : ℝ), (pts t).re = pts_re := by\n intro t\n unfold pts\n simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n add_zero]\n\n have pts_re_ge_one : 1 < pts_re := by\n unfold pts_re\n simp only [lt_add_iff_pos_right, inv_pos]\n have U : 1 < X := by linarith\n exact Real.log_pos U\n\n have pts_re_le_one : pts_re < 2 := by\n unfold pts_re\n have Z : Real.log 3 < Real.log X :=\n by\n refine log_lt_log ?_ X_large\n simp only [Nat.ofNat_pos]\n\n have Z01 : 1 < Real.log 3 := logt_gt_one le_rfl\n have Zpos0 : 0 < Real.log 3 := by positivity\n have Zpos1 : 0 < Real.log X := by calc\n 0 < Real.log 3 := Zpos0\n _ < Real.log X := Z\n\n have Z1 : (Real.log X)⁻¹ < (Real.log 3)⁻¹ := (inv_lt_inv₀ Zpos1 Zpos0).mpr Z\n\n have Z02 : (Real.log 3)⁻¹ < 1 := by\n have T01 := (inv_lt_inv₀ ?_ ?_).mpr Z01\n · simp only [inv_one] at T01\n exact T01\n · exact Zpos0\n simp only [zero_lt_one]\n\n have Z2 : 1 + (Real.log X)⁻¹ < 1 + (Real.log 3)⁻¹ := by\n exact (add_lt_add_iff_left 1).mpr Z1\n\n have Z3 : 1 + (Real.log 3)⁻¹ < 2 := by\n calc\n 1 + (Real.log 3)⁻¹ < 1 + 1 := by linarith\n _ = 2 := by ring_nf\n\n calc\n 1 + (Real.log X)⁻¹ < 1 + (Real.log 3)⁻¹ := Z2\n _ < 2 := Z3\n\n have inve : (pts_re - 1)⁻¹ = Real.log X := by\n unfold pts_re\n simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt,\n Complex.norm_div, add_sub_cancel_left, inv_inv]\n\n have K_bounds_zeta_at_any_t :\n ∀(t : ℝ), ‖ζ' (pts t) / ζ (pts t)‖ ≤ K * Real.log X := by\n intro t\n rw [←inve]\n exact K_bounds_zeta_at_any_t' t pts_re pts_re_ge_one pts_re_le_one\n\n have pts_re_pos : pts_re > 0 := by\n unfold pts_re\n positivity\n\n have triv_pts_lo_bound : ∀(t : ℝ), pts_re ≤ (pts t).re := by\n intro t\n unfold pts_re\n exact Eq.ge (pts_re_triv t)\n\n have triv_pts_up_bound : ∀(t : ℝ), (pts t).re ≤ 2 := by\n intro t\n unfold pts\n refine EReal.coe_le_coe_iff.mp ?_\n · simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt,\n Complex.norm_div, le_refl, implies_true, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im,\n I_im, mul_one, sub_self, add_zero, EReal.coe_le_coe_iff]\n exact le_of_lt pts_re_le_one\n\n have pts_re_ge_1 : pts_re > 1 := by\n unfold pts_re\n exact pts_re_ge_one\n\n have X_pos_triv : 0 < X := by positivity\n\n let f := fun (t : ℝ) ↦ SmoothedChebyshevIntegrand SmoothingF eps X (pts t)\n\n /- Main pointwise bound -/\n\n have G : ∀(t : ℝ), ‖f t‖ ≤ (K * M) * Real.log X * (eps * ‖pts t‖^2)⁻¹ * X^pts_re := by\n\n intro t\n\n let M_bounds_mellin_easy := fun (t : ℝ) ↦\n M_bounds_mellin_hard pts_re pts_re_pos (pts t) (triv_pts_lo_bound t) (triv_pts_up_bound t)\n eps eps_pos eps_less_one\n\n let zeta_part := (fun (t : ℝ) ↦ -ζ' (pts t) / ζ (pts t))\n let mellin_part := (fun (t : ℝ) ↦ 𝓜 (fun x ↦ (Smooth1 SmoothingF eps x : ℂ)) (pts t))\n let X_part := (fun (t : ℝ) ↦ (↑X : ℂ) ^ (pts t))\n\n let g := fun (t : ℝ) ↦ (zeta_part t) * (mellin_part t) * (X_part t)\n\n have X_part_eq : ∀(t : ℝ), ‖X_part t‖ = X^pts_re := by\n intro t\n have U := Complex.norm_cpow_eq_rpow_re_of_pos (X_pos_triv) (pts t)\n rw [pts_re_triv t] at U\n exact U\n\n have X_part_bound : ∀(t : ℝ), ‖X_part t‖ ≤ X^pts_re := by\n intro t\n rw [←X_part_eq]\n\n have mellin_bound : ∀(t : ℝ), ‖mellin_part t‖ ≤ M * (eps * ‖pts t‖ ^ 2)⁻¹ := by\n intro t\n exact M_bounds_mellin_easy t\n\n have X_part_and_mellin_bound :\n ∀(t : ℝ), ‖mellin_part t * X_part t‖ ≤ M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re := by\n intro t\n exact norm_mul_le_of_le (mellin_bound t) (X_part_bound t)\n\n have T2 : ∀(t : ℝ), ‖zeta_part t‖ = ‖ζ' (pts t) / ζ (pts t)‖ := by\n intro t\n unfold zeta_part\n simp only [Complex.norm_div, norm_neg]\n\n have zeta_bound : ∀(t : ℝ), ‖zeta_part t‖ ≤ K * Real.log X := by\n intro t\n unfold zeta_part\n rw [T2]\n exact K_bounds_zeta_at_any_t t\n\n have g_bound : ∀(t : ℝ), ‖zeta_part t * (mellin_part t * X_part t)‖ ≤\n (K * Real.log X) * (M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re) := by\n intro t\n exact norm_mul_le_of_le (zeta_bound t) (X_part_and_mellin_bound t)\n\n have T1 : f = g := by rfl\n\n have final_bound_pointwise :\n ‖f t‖ ≤ K * Real.log X * (M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re) := by\n rw [T1]\n unfold g\n rw [mul_assoc]\n exact g_bound t\n\n have trivialize :\n K * Real.log X * (M * (eps * ‖pts t‖^2)⁻¹ * X^pts_re) =\n (K * M) * Real.log X * (eps * ‖pts t‖^2)⁻¹ * X^pts_re := by ring_nf\n\n rw [trivialize] at final_bound_pointwise\n exact final_bound_pointwise\n\n\n have σ₀_gt : 1 < pts_re := by exact pts_re_ge_1\n have σ₀_le_2 : pts_re ≤ 2 := by\n unfold pts_re\n -- LOL!\n exact\n Preorder.le_trans (1 + (Real.log X)⁻¹) (pts (SmoothingF (SmoothingF M))).re 2\n (triv_pts_lo_bound (SmoothingF (SmoothingF M)))\n (triv_pts_up_bound (SmoothingF (SmoothingF M)))\n\n have f_integrable := SmoothedChebyshevPull1_aux_integrable eps_pos eps_less_one X_large σ₀_gt\n σ₀_le_2 suppSmoothingF SmoothingFnonneg mass_one ContDiffSmoothingF\n\n have S : X^pts_re = rexp 1 * X := by\n unfold pts_re\n\n calc\n X ^ (1 + (Real.log X)⁻¹) = X * X ^ ((Real.log X)⁻¹) := by\n refine rpow_one_add' ?_ ?_\n · positivity\n · exact Ne.symm (ne_of_lt pts_re_pos)\n _ = X * rexp 1 := by\n refine (mul_right_inj' ?_).mpr ?_\n · exact Ne.symm (ne_of_lt X_pos_triv)\n · refine rpow_inv_log X_pos_triv ?_\n · by_contra h\n simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt,\n Complex.norm_div, Nat.not_ofNat_lt_one]\n _ = rexp 1 * X := by ring_nf\n\n\n have pts_re_neq_zero : pts_re ≠ 0 := by\n by_contra h\n rw [h] at pts_re_ge_1\n simp only [gt_iff_lt] at pts_re_ge_1\n norm_cast at pts_re_ge_1\n\n have Z :=\n by\n calc\n ‖∫ (t : ℝ) in Iic (-T), f t‖ ≤ ∫ (t : ℝ) in Iic (-T), ‖f t‖ := MeasureTheory.norm_integral_le_integral_norm f\n _ ≤ ∫ (t : ℝ) in Iic (-T), (K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re := by\n refine integral_mono ?_ ?_ (fun t ↦ G t)\n · refine Integrable.norm ?_\n · unfold f\n exact MeasureTheory.Integrable.restrict f_integrable\n · have equ : ∀(t : ℝ), (K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re = (K * M) * Real.log X * eps⁻¹ * X ^ pts_re * (‖pts t‖^2)⁻¹ := by\n intro t; ring_nf\n have fun_equ : (fun (t : ℝ) ↦ ((K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re)) = (fun (t : ℝ) ↦ ((K * M) * Real.log X * eps⁻¹ * X ^ pts_re * (‖pts t‖^2)⁻¹)) := by\n funext t\n exact equ t\n\n rw [fun_equ]\n have simple_int : MeasureTheory.Integrable (fun (t : ℝ) ↦ (‖pts t‖^2)⁻¹)\n := by\n unfold pts\n exact poisson_kernel_integrable pts_re (pts_re_neq_zero)\n\n have U := MeasureTheory.Integrable.const_mul simple_int\n ((K * M) * Real.log X * eps⁻¹ * X ^ pts_re)\n refine MeasureTheory.Integrable.restrict ?_\n exact U\n _ = (K * M) * Real.log X * X ^ pts_re * eps⁻¹ *\n ∫ (t : ℝ) in Iic (-T), (‖pts t‖ ^ 2)⁻¹ := by\n have simpli_fun :\n (fun (t : ℝ) ↦ (K * M) * Real.log X * (eps * ‖pts t‖ ^ 2)⁻¹ * X ^ pts_re) =\n (fun (t : ℝ) ↦ ((K * M) * Real.log X * X ^ pts_re * eps⁻¹ * (‖pts t‖^2)⁻¹)) :=\n by funext t; ring_nf\n rw [simpli_fun]\n exact MeasureTheory.integral_const_mul ((K * M) * Real.log X * X ^ pts_re * eps⁻¹)\n (fun (t : ℝ) ↦ (‖pts t‖^2)⁻¹)\n _ ≤ (K * M) * Real.log X * X ^ pts_re * eps⁻¹ * T⁻¹ := by\n have U := integral_evaluation (pts_re) T (T_large)\n unfold pts\n simp only [ge_iff_le]\n have U2 : 0 ≤ (K * M) * Real.log X * X ^ pts_re * eps⁻¹ := by\n simp_all only [one_div, support_subset_iff, ne_eq, mem_Icc, mul_inv_rev, gt_iff_lt,\n Complex.norm_div, le_refl, implies_true, inv_pos, mul_nonneg_iff_of_pos_right]\n refine Left.mul_nonneg ?_ ?_\n · refine Left.mul_nonneg ?_ ?_\n · exact Left.mul_nonneg (by positivity) (by positivity)\n · refine log_nonneg ?_\n · linarith\n · refine Left.mul_nonneg ?_ ?_\n · exact exp_nonneg 1\n · exact le_of_lt X_pos_triv\n exact mul_le_mul_of_nonneg_left U U2\n _ = (Real.exp 1 * K * M) * Real.log X * X * eps⁻¹ * T⁻¹ := by\n rw [S]\n ring_nf\n _ = (Real.exp 1 * K * M) * X * Real.log X / (eps * T) := by ring_nf\n\n\n unfold I₁\n unfold f at Z\n unfold pts at Z\n have Z3 : (↑pts_re : ℂ) = 1 + (Real.log X)⁻¹ := by unfold pts_re; norm_cast\n rw [Z3] at Z\n rw [Complex.norm_mul (1 / (2 * ↑π * I)) _]\n simp only [one_div, mul_inv_rev, inv_I, neg_mul, norm_neg, Complex.norm_mul, norm_I, norm_inv,\n norm_real, norm_eq_abs, Complex.norm_ofNat, one_mul, ofReal_inv, ge_iff_le]\n","line":1820,"end_line":2190,"proof_status":"formalized"} {"id":"DeltaT","label":"DeltaT","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZeroInequality"],"nlp_text":"Let \\(\\delta _t=E/\\log |t|\\) where \\(E\\) is the constant coming from Theorem 4.3.10.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaT","latex_link":"sect0004.html#DeltaT","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaT","lean_decl_name":"DeltaT","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"DeltaT\")\n (statement := /-- Let $\\delta_t=E/\\log|t|$ where $E$ is the constant coming from Theorem \\ref{ZeroInequality}. -/)]\nnoncomputable def DeltaT (t : ℝ) : ℝ := E / log |t|\n","line":881,"end_line":884,"proof_status":"formalized"} {"id":"RH-up-to","label":"RH-up-to","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta"],"nlp_text":"We say that the Riemann hypothesis has been verified up to height \\(T\\) if there are no zeroes in the rectangle \\(\\{ \\Re \\rho \\in (0.5, 1), \\Im \\rho \\in [0,T] \\} \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.RH_up_to","latex_link":"zeta-chapter.html#RH-up-to","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.RH_up_to","lean_decl_name":"riemannZeta.RH_up_to","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaDefinitions.lean","lean4_code":"@[blueprint\n \"RH-up-to\"\n (statement := /--\n We say that the Riemann hypothesis has been verified up to height $T$ if there are no zeroes\n in the rectangle $\\{ \\Re \\rho \\in (0.5, 1), \\Im \\rho \\in [0,T] \\}$.\n -/)]\nnoncomputable def riemannZeta.RH_up_to (T : ℝ) : Prop :=\n IsEmpty (riemannZeta.zeroes_rect (Set.Ioo 0.5 1) (Set.Icc 0 T))\n","line":36,"end_line":43,"proof_status":"formalized"} {"id":"bklnw-thm_16","label":"bklnw-thm_16","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RH-up-to","logan-function","Epsi-def"],"nlp_text":"Let \\(0 {\\lt} \\varepsilon {\\lt} 10^{-3}\\), \\(c \\geq 3\\), \\(x_0 \\geq 100\\) and \\(\\alpha \\in [0, 1)\\) such that the inequality \\[ B_0 := \\frac{\\varepsilon e^{-\\varepsilon } x_0 |\\nu _c(\\alpha )|}{2(\\mu _c)_+(\\alpha )} {\\gt} 1 \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_thm_16","latex_link":"primary-chapter.html#bklnw-thm_16","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_thm_16","lean_decl_name":"BKLNW_app.bklnw_thm_16","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-thm_16\"\n (title := \"Theorem 16\")\n (statement := /-- Let $0 < \\varepsilon < 10^{-3}$, $c \\geq 3$, $x_0 \\geq 100$ and $\\alpha \\in [0, 1)$ such that the inequality\n $$ B_0 := \\frac{\\varepsilon e^{-\\varepsilon} x_0 |\\nu_c(\\alpha)|}{2(\\mu_c)_+(\\alpha)} > 1 $$\n holds. We denote the zeros of the Riemann zeta function by $\\rho = \\beta + i\\gamma$ with $\\beta, \\gamma \\in \\mathbb{R}$. Then, if $\\beta = \\frac{1}{2}$ holds for $0 < \\gamma \\leq \\frac{c}{\\varepsilon}$, the inequality\n $$ |\\psi(x) - x| \\leq x e^{\\varepsilon\\alpha}(\\mathcal{E}_1 + \\mathcal{E}_2 + \\mathcal{E}_3) $$\n holds for all $x \\geq e^{\\varepsilon\\alpha} x_0$, where\n \\begin{align*}\n \\mathcal{E}_1 &= e^{2\\varepsilon} \\log(e^\\varepsilon x_0) \\left[\\frac{2\\varepsilon|\\nu_c(\\alpha)|}{\\log B_0} + \\frac{2.01\\varepsilon}{\\sqrt{x_0}} + \\frac{\\log\\log(2x_0^2)}{2x_0}\\right] + e^{\\varepsilon\\alpha} - 1, \\\\\n \\mathcal{E}_2 &= 0.16 \\frac{1 + x_0^{-1}}{\\sinh c} e^{0.71\\sqrt{c\\varepsilon}} \\log\\left(\\frac{c}{\\varepsilon}\\right), \\quad \\text{and} \\\\\n \\mathcal{E}_3 &= \\frac{2}{\\sqrt{x_0}} \\sum_{0 < \\gamma < \\frac{c}{\\varepsilon}} \\frac{\\ell_{c,\\varepsilon}(\\gamma)}{\\gamma} + \\frac{2}{x_0}.\n \\end{align*}\n The $\\nu_c(\\alpha) = \\nu_{c,1}(\\alpha)$ and $\\mu_c(\\alpha) = \\mu_{c,1}(\\alpha)$ where $\\nu_{c,\\varepsilon}(\\alpha)$ and $\\mu_{c,\\varepsilon}(\\alpha)$ are defined by \\cite[p.~2490]{Buthe2}. -/)\n (proof := /-- This is \\cite[Theorem 1]{Buthe2}. -/)\n (latexEnv := \"theorem\")]\ntheorem bklnw_thm_16 (ε c x₀ α : ℝ)\n (hε : 0 < ε ∧ ε < 1e-3)\n (hc : 3 ≤ c)\n (hx₀ : 100 ≤ x₀)\n (hα : 0 ≤ α ∧ α < 1)\n (hB0 : (ε * exp (-ε) * x₀ * |ν c α|) / (2 * (μ c α)) > 1)\n (hRH : riemannZeta.RH_up_to (c / ε))\n (x : ℝ)\n (hx : x ≥ exp (ε * α) * x₀) :\n let E₁ := exp (2 * ε) * log (exp ε * x₀) *\n (2 * ε * |ν c α| / log ((ε * exp (-ε) * x₀ * |ν c α|) / (2 * (μ c α))) +\n 2.01 * ε / sqrt x₀ +\n log (log (2 * x₀^2) / (2 * x₀))) + exp (ε * α) - 1\n let E₂ := 0.16 * (1 + x₀^(-1:ℝ)) / sinh c * exp (0.71 * sqrt (c * ε)) * log (c / ε)\n let E₃ := 2 / sqrt x₀ * riemannZeta.zeroes_sum (Set.Icc 0 1) (Set.Ioo 0 (c / ε)) (fun ρ ↦ (ℓ c ε ρ.im) / ρ.im) + 2 / x₀\n Eψ x ≤ exp (ε * α) * (E₁ + E₂ + E₃) :=\n by sorry","line":270,"end_line":302,"proof_status":"statement_formalized"} {"id":"fks-eq13","label":"fks-eq13","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RH-up-to","classical-zero-free-region"],"nlp_text":"\\(\\Sigma _a^b = 2 * \\sum _{H_a ≤ \\gamma {\\lt} T; a \\leq \\beta {\\lt} b} \\frac{x^{\\beta -1}}{\\gamma }\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.eq_13","latex_link":"primary-chapter.html#fks-eq13","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.eq_13","lean_decl_name":"FKS.eq_13","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"theorem eq_13 {H₀ R a b T x : ℝ} (hH₀ : riemannZeta.RH_up_to H₀)\n (hR : riemannZeta.classicalZeroFree R) :\n riemannZeta.Sigma T x a b = 2 * riemannZeta.zeroes_sum (Set.Ico a b) (Set.Ioc (Hσ H₀ R a) T)\n (fun ρ ↦ x ^ (ρ.re - 1) / ρ.im) := by sorry\n\n","line":357,"end_line":361,"proof_status":"formalized"} {"id":"schwarz-id","label":"schwarz-id","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["limiting-cor","smooth-ury"],"nlp_text":"The previous corollary also holds for functions \\(\\psi \\) that are assumed to be in the Schwartz class, as opposed to being \\(C^2\\) and compactly supported.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_cor_schwartz","latex_link":"sect0002.html#schwarz-id","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_cor_schwartz","lean_decl_name":"limiting_cor_schwartz","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"Limiting identity for Schwartz functions\")\n (statement := /--\n The previous corollary also holds for functions $\\psi$ that are assumed to be in the Schwartz\n class, as opposed to being $C^2$ and compactly supported.\n -/)\n (proof := /--\n For any $R>1$, one can use a smooth cutoff function (provided by Lemma \\ref{smooth-ury} to write\n $\\psi = \\psi_{\\leq R} + \\psi_{>R}$, where $\\psi_{\\leq R}$ is $C^2$ (in fact smooth) and compactly\n supported (on $[-R,R]$), and $\\psi_{>R}$ obeys bounds of the form\n $$ |\\psi_{>R}(t)|, |\\psi''_{>R}(t)| \\ll R^{-1} / (1 + |t|^2) $$\n where the implied constants depend on $\\psi$. By Lemma \\ref{decay} we then have\n $$ \\hat \\psi_{>R}(u) \\ll R^{-1} / (1+|u|^2).$$\n Using this and \\eqref{cheby} one can show that\n $$ \\sum_{n=1}^\\infty \\frac{f(n)}{n} \\hat \\psi_{>R}( \\frac{1}{2\\pi} \\log \\frac{n}{x} ),\n A \\int_{-\\infty}^\\infty \\hat \\psi_{>R} (\\frac{u}{2\\pi})\\ du \\ll R^{-1} $$\n (with implied constants also depending on $A$), while from Lemma \\ref{limiting-cor} one has\n $$ \\sum_{n=1}^\\infty \\frac{f(n)}{n} \\hat \\psi_{\\leq R}( \\frac{1}{2\\pi} \\log \\frac{n}{x} )\n = A \\int_{-\\infty}^\\infty \\hat \\psi_{\\leq R} (\\frac{u}{2\\pi})\\ du + o(1).$$\n Combining the two estimates and letting $R$ be large, we obtain the claim.\n -/)\n (latexEnv := \"lemma\")]\nlemma limiting_cor_schwartz (ψ : 𝓢(ℝ, ℂ)) (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ'))\n (hcheby : cheby f) (hG : ContinuousOn G {s | 1 ≤ s.re})\n (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re}) :\n Tendsto (fun x : ℝ ↦ ∑' n, f n / n * 𝓕 (ψ : ℝ → ℂ) (1 / (2 * π) * log (n / x)) -\n A * ∫ u in Set.Ici (-log x), 𝓕 (ψ : ℝ → ℂ) (u / (2 * π))) atTop (𝓝 0) :=\n limiting_cor_W21 ψ hf hcheby hG hG'\n\n\n","line":1786,"end_line":1814,"proof_status":"formalized"} {"id":"WienerIkeharaSmooth","label":"WienerIkeharaSmooth","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["schwarz-id","bij"],"nlp_text":"If \\(\\Psi : (0,\\infty ) \\to \\mathbb {C}\\) is smooth and compactly supported away from the origin, then, \\[ \\sum _{n=1}^\\infty f(n) \\Psi ( \\frac{n}{x} ) = A x \\int _0^\\infty \\Psi (y)\\ dy + o(x) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/wiener_ikehara_smooth","latex_link":"sect0002.html#WienerIkeharaSmooth","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/wiener_ikehara_smooth","lean_decl_name":"wiener_ikehara_smooth","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"Smoothed Wiener-Ikehara\")\n (statement := /--\n If $\\Psi: (0,\\infty) \\to \\C$ is smooth and compactly supported away from the origin, then,\n $$ \\sum_{n=1}^\\infty f(n) \\Psi( \\frac{n}{x} ) = A x \\int_0^\\infty \\Psi(y)\\ dy + o(x)$$\n as $x \\to \\infty$.\n -/)\n (proof := /--\n By Lemma \\ref{bij}, we can write\n $$ y \\Psi(y) = \\hat \\psi( \\frac{1}{2\\pi} \\log y )$$\n for all $y>0$ and some Schwartz function $\\psi$. Making this substitution, the claim is then\n equivalent after standard manipulations to\n $$ \\sum_{n=1}^\\infty \\frac{f(n)}{n} \\hat \\psi( \\frac{1}{2\\pi} \\log \\frac{n}{x} )\n = A \\int_{-\\infty}^\\infty \\hat \\psi(\\frac{u}{2\\pi})\\ du + o(1)$$\n and the claim follows from Lemma \\ref{schwarz-id}.\n -/)\n (latexEnv := \"corollary\")]\nlemma wiener_ikehara_smooth (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ')) (hcheby : cheby f)\n (hG : ContinuousOn G {s | 1 ≤ s.re})\n (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re})\n (hsmooth : ContDiff ℝ ∞ Ψ) (hsupp : HasCompactSupport Ψ)\n (hplus : closure (Function.support Ψ) ⊆ Set.Ioi 0) :\n Tendsto (fun x : ℝ ↦ (∑' n, f n * Ψ (n / x)) / x - A * ∫ y in Set.Ioi 0, Ψ y)\n atTop (𝓝 0) := by\n\n let h (x : ℝ) : ℂ := rexp (2 * π * x) * Ψ (exp (2 * π * x))\n have h1 : ContDiff ℝ ∞ h := by\n have : ContDiff ℝ ∞ (fun x : ℝ => (rexp (2 * π * x))) := (contDiff_const.mul contDiff_id).exp\n exact (contDiff_ofReal.comp this).mul (hsmooth.comp this)\n have h2 : HasCompactSupport h := by\n have : 2 * π ≠ 0 := by simp [pi_ne_zero]\n simpa using (comp_exp_support hsupp hplus).comp_smul this |>.mul_left\n obtain ⟨g, hg⟩ := fourier_surjection_on_schwartz (toSchwartz h h1 h2)\n\n have l1 {y} (hy : 0 < y) : y * Ψ y = 𝓕 g (1 / (2 * π) * Real.log y) := by\n simp only [one_div, mul_inv_rev, hg, toSchwartz, ofReal_exp, ofReal_mul, ofReal_ofNat,\n toSchwartz_apply, ofReal_inv, h]\n field_simp\n norm_cast\n rw [Real.exp_log hy]\n\n have key := limiting_cor_schwartz g hf hcheby hG hG'\n\n have l2 : ∀ᶠ x in atTop, ∑' (n : ℕ), f n / ↑n * 𝓕 g (1 / (2 * π) * Real.log (↑n / x)) =\n ∑' (n : ℕ), f n * Ψ (↑n / x) / x := by\n filter_upwards [eventually_gt_atTop 0] with x hx\n congr ; ext n\n by_cases hn : n = 0\n · simp [hn, (comp_exp_support0 hplus).self_of_nhds]\n rw [← l1 (by positivity)]\n have : (n : ℂ) ≠ 0 := by simpa using hn\n have : (x : ℂ) ≠ 0 := by simpa using hx.ne.symm\n simp only [ofReal_div, ofReal_natCast]\n field_simp\n\n have l3 : ∀ᶠ x in atTop, ↑A * ∫ (u : ℝ) in Ici (-Real.log x), 𝓕 g (u / (2 * π)) =\n ↑A * ∫ (y : ℝ) in Ioi x⁻¹, Ψ y := by\n filter_upwards [eventually_gt_atTop 0] with x hx\n congr 1\n simp only [hg, toSchwartz, ofReal_exp, ofReal_mul, ofReal_ofNat, toSchwartz_apply,\n ofReal_div, h]\n norm_cast ; field_simp; norm_cast\n rw [MeasureTheory.integral_Ici_eq_integral_Ioi]\n exact wiener_ikehara_smooth_aux hsmooth.continuous hsupp hplus x hx\n\n have l4 : Tendsto (fun x => (↑A * ∫ (y : ℝ) in Ioi x⁻¹, Ψ y) - ↑A * ∫ (y : ℝ) in Ioi 0, Ψ y)\n atTop (𝓝 0) := by\n exact wiener_ikehara_smooth_sub (hsmooth.continuous.integrable_of_hasCompactSupport hsupp) hplus\n\n simpa [tsum_div_const] using (key.congr' <| EventuallyEq.sub l2 l3) |>.add l4\n\n\n","line":1942,"end_line":2012,"proof_status":"formalized"} {"id":"WienerIkeharaInterval","label":"WienerIkeharaInterval","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["WienerIkeharaSmooth"],"nlp_text":"For any closed interval \\(I \\subset (0,+\\infty )\\), we have \\[ \\sum _{n=1}^\\infty f(n) 1_I( \\frac{n}{x} ) = A x |I| + o(x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WienerIkeharaInterval","latex_link":"sect0002.html#WienerIkeharaInterval","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/WienerIkeharaInterval","lean_decl_name":"WienerIkeharaInterval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (statement := /--\n For any closed interval $I \\subset (0,+\\infty)$, we have\n $$ \\sum_{n=1}^\\infty f(n) 1_I( \\frac{n}{x} ) = A x |I| + o(x).$$\n -/)\n (proof := /-- Use Lemma \\ref{smooth-ury} to bound $1_I$ above and below by smooth compactly supported functions whose integral is close to the measure of $|I|$, and use the non-negativity of $f$. -/)\n (latexEnv := \"proposition\")]\nlemma WienerIkeharaInterval {f : ℕ → ℝ} (hpos : 0 ≤ f) (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ'))\n (hcheby : cheby f) (hG : ContinuousOn G {s | 1 ≤ s.re})\n (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re}) (ha : 0 < a) (hb : a ≤ b) :\n Tendsto (fun x : ℝ ↦ (∑' n, f n * (indicator (Ico a b) 1 (n / x))) / x) atTop (nhds (A * (b - a))) := by\n\n -- Take care of the trivial case `a = b`\n by_cases hab : a = b\n · simp [hab]\n replace hb : a < b := lt_of_le_of_ne hb hab ; clear hab\n\n -- Notation to make the proof more readable\n let S (g : ℝ → ℝ) (x : ℝ) := (∑' n, f n * g (n / x)) / x\n have hSnonneg {g : ℝ → ℝ} (hg : 0 ≤ g) : ∀ᶠ x : ℝ in atTop, 0 ≤ S g x := by\n filter_upwards [eventually_ge_atTop 0] with x hx\n refine div_nonneg ?_ hx\n refine tsum_nonneg (fun i => mul_nonneg (hpos _) (hg _))\n have hA : 0 ≤ A := residue_nonneg hpos hf hcheby hG hG'\n\n -- A few facts about the indicator function of `Icc a b`\n let Iab : ℝ → ℝ := indicator (Ico a b) 1\n change Tendsto (S Iab) atTop (𝓝 (A * (b - a)))\n have hIab : HasCompactSupport Iab := by simpa [Iab, HasCompactSupport, tsupport, hb.ne] using isCompact_Icc\n have Iab_nonneg : ∀ᶠ x : ℝ in atTop, 0 ≤ S Iab x := hSnonneg (indicator_nonneg (by simp))\n have Iab2 : IsBoundedUnder (· ≤ ·) atTop (S Iab) := by\n obtain ⟨C, hC⟩ := hcheby ; exact ⟨C * 2 * b, WI_sum_Iab_le' hpos hC (by linarith)⟩\n have Iab3 : IsBoundedUnder (· ≥ ·) atTop (S Iab) := ⟨0, Iab_nonneg⟩\n have Iab0 : IsCoboundedUnder (· ≥ ·) atTop (S Iab) := Iab2.isCoboundedUnder_ge\n have Iab1 : IsCoboundedUnder (· ≤ ·) atTop (S Iab) := Iab3.isCoboundedUnder_le\n\n -- Bound from above by a smooth function\n have sup_le : limsup (S Iab) atTop ≤ A * (b - a) := by\n have l_sup : ∀ᶠ ε in 𝓝[>] 0, limsup (S Iab) atTop ≤ A * (b - a + ε) := by\n filter_upwards [interval_approx_sup ha hb] with ε ⟨ψ, h1, h2, h3, h4, h6⟩\n have l1 : Tendsto (S ψ) atTop _ := wiener_ikehara_smooth_real hf hcheby hG hG' h1 h2 h3\n have l6 : S Iab ≤ᶠ[atTop] S ψ := by\n filter_upwards [eventually_gt_atTop 0] with x hx using WI_sum_le hpos h4 hx hIab h2\n have l5 : IsBoundedUnder (· ≤ ·) atTop (S ψ) := l1.isBoundedUnder_le\n have l3 : limsup (S Iab) atTop ≤ limsup (S ψ) atTop := limsup_le_limsup l6 Iab1 l5\n apply l3.trans ; rw [l1.limsup_eq] ; gcongr\n obtain rfl | h := eq_or_ne A 0\n · simpa using l_sup\n apply le_of_eventually_nhdsWithin\n have key : 0 < A := lt_of_le_of_ne hA h.symm\n filter_upwards [WI_tendsto_aux a b key l_sup] with x hx\n simpa [mul_div_cancel₀ _ h] using hx\n\n -- Bound from below by a smooth function\n have le_inf : A * (b - a) ≤ liminf (S Iab) atTop := by\n have l_inf : ∀ᶠ ε in 𝓝[>] 0, A * (b - a - ε) ≤ liminf (S Iab) atTop := by\n filter_upwards [interval_approx_inf ha hb] with ε ⟨ψ, h1, h2, h3, h5, h6⟩\n have l1 : Tendsto (S ψ) atTop _ := wiener_ikehara_smooth_real hf hcheby hG hG' h1 h2 h3\n have l2 : S ψ ≤ᶠ[atTop] S Iab := by\n filter_upwards [eventually_gt_atTop 0] with x hx using WI_sum_le hpos h5 hx h2 hIab\n have l4 : IsBoundedUnder (· ≥ ·) atTop (S ψ) := l1.isBoundedUnder_ge\n have l3 : liminf (S ψ) atTop ≤ liminf (S Iab) atTop := liminf_le_liminf l2 l4 Iab0\n apply le_trans ?_ l3 ; rw [l1.liminf_eq] ; gcongr\n obtain rfl | h := eq_or_ne A 0\n · simpa using l_inf\n apply ge_of_eventually_nhdsWithin\n have key : 0 < A := lt_of_le_of_ne hA h.symm\n filter_upwards [WI_tendsto_aux' a b key l_inf] with x hx\n simpa [mul_div_cancel₀ _ h] using hx\n\n -- Combine the two bounds\n have : liminf (S Iab) atTop ≤ limsup (S Iab) atTop := liminf_le_limsup Iab2 Iab3\n refine tendsto_of_liminf_eq_limsup ?_ ?_ Iab2 Iab3 <;> linarith\n\n\n","line":2223,"end_line":2296,"proof_status":"formalized"} {"id":"bklnw-cor_15_1","label":"bklnw-cor_15_1","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"Let \\(b\\) be a positive constant such that \\(\\log 11 {\\lt} b \\leq 19 \\log (10)\\). Then we have \\[ \\left|\\frac{\\psi (x) - x}{x}\\right| \\leq \\max \\left\\{ \\frac{0.94}{e^{\\frac{b}{2}}}, \\varepsilon (19 \\log 10)\\right\\} \\quad \\text{for all } x \\geq e^b. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_cor_15_1","latex_link":"primary-chapter.html#bklnw-cor_15_1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_cor_15_1","lean_decl_name":"BKLNW_app.bklnw_cor_15_1","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-cor_15_1\"\n (title := \"Corollary 15.1\")\n (statement := /-- Let $b$ be a positive constant such that $\\log 11 < b \\leq 19 \\log(10)$. Then we have\n $$ \\left|\\frac{\\psi(x) - x}{x}\\right| \\leq \\max\\left\\{\\frac{0.94}{e^{\\frac{b}{2}}}, \\varepsilon(19 \\log 10)\\right\\} \\quad \\text{for all } x \\geq e^b. $$\n Note that by Table 8, we have $\\varepsilon(19 \\log 10) = 1.93378 \\cdot 10^{-8}$. -/)\n (proof := /-- By \\cite[(1.5)]{Buthe}, (A.27) holds with $B_0 = 11$, $B = 10^{19}$, and $c = 0.94$. Thus we may apply Lemma \\ref{bklnw-lemma_15} with $B_0 = 11$, $B = 10^{19}$, and $c = 0.94$ from \\cite[(1.5)]{Buthe} to obtain the claim. -/)\n (latexEnv := \"corollary\")]\ntheorem bklnw_cor_15_1 (b : ℝ) (hb1 : log 11 < b) (hb2 : b ≤ 19 * log 10)\n (ε : ℝ → ℝ)\n (hε : ∀ b₀ > 0, ∀ x ≥ exp b₀, Eψ x ≤ ε b₀) :\n ∀ x ≥ exp b, Eψ x ≤ max (0.94 / exp (b / 2)) (ε (19 * log 10)) := by sorry","line":245,"end_line":256,"proof_status":"statement_formalized"} {"id":"initial-factorization-large-prime-le","label":"initial-factorization-large-prime-le","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","balance-def"],"nlp_text":"A large prime \\(p \\geq n/L\\) cannot be in surplus.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_large_prime_le","latex_link":"tertiary-chapter.html#initial-factorization-large-prime-le","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_large_prime_le","lean_decl_name":"Erdos392.Params.initial.balance_large_prime_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-large-prime-le\"\n (statement := /-- A large prime $p \\geq n/L$ cannot be in surplus. -/)\n (proof := /-- No such prime can be present in the factorization.-/)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.balance_large_prime_le (P : Params) {p : ℕ} (hp : p ≥ P.n / P.L) :\n P.initial.balance p ≤ 0 := by\n simp only [Factorization.balance, Factorization.sum, initial, sub_nonpos]\n have : (map (fun m ↦ m.factorization p)\n (filter (fun m ↦ m ∈ (P.n / P.L).smoothNumbers)\n (replicate P.M (Multiset.Ico (P.n - P.n / P.M) P.n)).join)).sum = 0 :=\n sum_eq_zero fun x hx ↦ by\n simp only [Multiset.mem_map, Multiset.mem_filter] at hx\n obtain ⟨m, ⟨_, hsmooth⟩, rfl⟩ := hx\n rw [factorization_eq_zero_iff]; rw [mem_smoothNumbers'] at hsmooth; grind\n simp [this]","line":978,"end_line":993,"proof_status":"formalized"} {"id":"lem:aachmonophase","label":"aachmonophase","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["e-def"],"nlp_text":"Let \\(\\varphi :[a,b]\\to \\mathbb {R}\\) be \\(C^1\\) with \\(\\varphi '(t)\\ne 0\\) for all \\(t\\in [a,b]\\). Let \\(h:[a,b]\\to \\mathbb {R}\\) be such that \\(g(t) = h(t)/\\varphi '(t)\\) is continuous and \\(|g(t)|\\) is non-increasing. Then \\[ \\left|\\int _a^b h(t) e(\\varphi (t)) dt\\right|\\leq \\frac{|g(a)|}{\\pi }. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachmonophase","latex_link":"zeta-chapter.html#lem:aachmonophase","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachmonophase","lean_decl_name":"ZetaAppendix.lemma_aachmonophase","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:aachmonophase\"\n (title := \"Non-stationary phase estimate\")\n (statement := /--\nLet $\\varphi:[a,b]\\to \\mathbb{R}$ be $C^1$ with $\\varphi'(t)\\ne 0$ for all $t\\in [a,b]$.\nLet $h:[a,b]\\to \\mathbb{R}$ be such that $g(t) = h(t)/\\varphi'(t)$ is continuous and\n$|g(t)|$ is non-increasing. Then\n\\[\\left|\\int_a^b h(t) e(\\varphi(t)) dt\\right|\\leq \\frac{|g(a)|}{\\pi}.\\]\n-/)\n (proof := /--\nSince $\\varphi$ is $C^1$, $e(\\varphi(t))$ is $C^1$, and\n$h(t) e(\\varphi(t)) = \\frac{h(t)}{2\\pi i \\varphi'(t)} \\frac{d}{dt} e(\\varphi(t))$ everywhere.\nBy Lemma \\ref{lem:aachra}, $g$ is of bounded variation. Hence, we can integrate by parts:\n\\[\\int_a^b h(t) e(\\varphi(t)) dt =\n \\left. \\frac{h(t) e(\\varphi(t))}{2\\pi i \\varphi'(t)}\\right|_a^b -\n \\int_a^b e(\\varphi(t))\\, d\\left(\\frac{h(t)}{2\\pi i \\varphi'(t)}\\right).\n\\]\nThe first term on the right has absolute value $\\leq \\frac{|g(a)|+|g(b)|}{2\\pi}$.\nAgain by Lemma \\ref{lem:aachra},\n\\[\\left|\n\\int_a^b e(\\varphi(t))\\, d\\left(\\frac{h(t)}{2\\pi i \\varphi'(t)}\\right)\n\\right|\\leq \\frac{1}{2\\pi} \\|g\\|_{\\mathrm{TV}} = \\frac{|g(a)|-|g(b)|}{2\\pi}.\n\\]\nWe are done by\n$\\frac{|g(a)|+|g(b)|}{2\\pi} + \\frac{|g(a)|-|g(b)|}{2\\pi} = \\frac{|g(a)|}{\\pi}$.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 548)]\ntheorem lemma_aachmonophase {a b : ℝ} (ha : a < b) (φ : ℝ → ℝ) (hφ_C1 : ContDiffOn ℝ 1 φ (Set.Icc a b))\n (hφ'_ne0 : ∀ t ∈ Set.Icc a b, deriv φ t ≠ 0) (h g : ℝ → ℝ) (hg : ∀ t, g t = h t / deriv φ t)\n (hg_cont : ContinuousOn g (Set.Icc a b)) (hg_mon : AntitoneOn (fun t ↦ |g t|) (Set.Icc a b)) :\n ‖∫ t in Set.Icc a b, h t * e (φ t)‖ ≤ |g a| / π := by\n let F : ℝ → ℂ := fun t ↦ (1 / (2 * Real.pi * I)) * (exp (2 * Real.pi * I * φ t))\n have h_integral_bound : ‖∫ t in Set.Icc a b, (g t : ℂ) * (deriv F t)‖ ≤ (⨆ t ∈ Set.Icc a b, ‖F t‖) * (2 * |g a|) :=\n lemma_IBP_bound_abs_antitone ha g F hg_cont hg_mon <|\n ContDiffOn.mul contDiffOn_const <| contDiff_exp.comp_contDiffOn <|\n ContDiffOn.mul contDiffOn_const <| ofRealCLM.contDiff.comp_contDiffOn hφ_C1\n have h_deriv_F : ∀ t ∈ Set.Ioo a b, deriv F t = (exp (2 * Real.pi * I * φ t)) * (deriv φ t) := by\n intro t ht\n rw [deriv_const_mul]\n · norm_num [Complex.exp_ne_zero, mul_comm]\n erw [HasDerivAt.deriv (HasDerivAt.comp t (Complex.hasDerivAt_exp _) (HasDerivAt.mul (HasDerivAt.ofReal_comp\n (hφ_C1.differentiableOn_one |> DifferentiableOn.hasDerivAt <| Icc_mem_nhds ht.1 ht.2)) <| hasDerivAt_const ..))]\n norm_num\n ring_nf\n simp\n · apply Complex.differentiableAt_exp.comp\n apply DifferentiableAt.const_mul <| ofRealCLM.differentiableAt.comp _ <| DifferentiableOn.differentiableAt\n hφ_C1.differentiableOn_one (Icc_mem_nhds ht.1 ht.2) ..\n have h_norm_F : ⨆ t ∈ Set.Icc a b, ‖F t‖ = 1 / (2 * Real.pi) := by\n dsimp only [F]\n rw [@ciSup_eq_of_forall_le_of_forall_lt_exists_gt] <;> norm_num [norm_exp, abs_of_nonneg pi_pos.le]\n · exact fun t ↦ by rw [ciSup_eq_ite]; split_ifs <;> norm_num; linarith [pi_pos]\n · exact fun w hw ↦ ⟨a, hw.trans_le <| by rw [ciSup_pos]; norm_num; linarith⟩\n have h_integral_subst : ‖∫ t in Set.Icc a b, (g t : ℂ) * (deriv F t)‖ = ‖∫ t in Set.Icc a b,\n (h t : ℂ) * (exp (2 * Real.pi * I * φ t))‖ := by\n simp only [integral_Icc_eq_integral_Ioc, integral_Ioc_eq_integral_Ioo]\n rw [setIntegral_congr_fun measurableSet_Ioo fun t ht ↦ by rw [h_deriv_F t ht, hg t]]\n simp only [div_eq_mul_inv, ofReal_mul, ofReal_inv, mul_comm, mul_left_comm, mul_assoc]\n refine congr_arg Norm.norm <| setIntegral_congr_fun measurableSet_Ioo <| fun x hx ↦ ?_\n simp [mul_inv_cancel_left₀ (ofReal_ne_zero.mpr (hφ'_ne0 x (Set.Ioo_subset_Icc_self hx)))]\n exact h_integral_subst ▸ h_integral_bound.trans (by rw [h_norm_F]; ring_nf; norm_num [pi_pos.ne'])\n","line":681,"end_line":742,"proof_status":"formalized"} {"id":"lem:aachfour","label":"aachfour","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["e-def"],"nlp_text":"Let \\(s = \\sigma + i \\tau \\), \\(\\sigma \\geq 0\\), \\(\\tau \\in \\mathbb {R}\\). Let \\(\\nu \\in \\mathbb {R}\\setminus \\{ 0\\} \\), \\(b{\\gt}a{\\gt}\\frac{|\\tau |}{2\\pi |\\nu |}\\). Then \\[ \\int _a^b t^{-s} e(\\nu t) dt = \\left. \\frac{t^{-\\sigma } e(\\varphi _\\nu (t))}{2\\pi i \\varphi _\\nu '(t)}\\right|_a^b + \\frac{a^{-\\sigma -1}}{2\\pi ^2} O^*\\left(\\frac{\\sigma }{(\\nu -\\vartheta )^2} + \\frac{|\\vartheta |}{|\\nu -\\vartheta |^3}\\right), \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachfour","latex_link":"zeta-chapter.html#lem:aachfour","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachfour","lean_decl_name":"ZetaAppendix.lemma_aachfour","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:aachfour\"\n (title := \"Estimating an integral\")\n (statement := /--\nLet $s = \\sigma + i \\tau$, $\\sigma\\geq 0$, $\\tau\\in \\mathbb{R}$.\nLet $\\nu \\in \\mathbb{R}\\setminus \\{0\\}$, $b>a>\\frac{|\\tau|}{2\\pi |\\nu|}$.\nThen\n\\[\\int_a^b t^{-s} e(\\nu t) dt =\n \\left. \\frac{t^{-\\sigma} e(\\varphi_\\nu(t))}{2\\pi i \\varphi_\\nu'(t)}\\right|_a^b +\n\\frac{a^{-\\sigma-1}}{2\\pi^2} O^*\\left(\\frac{\\sigma}{(\\nu-\\vartheta)^2} +\n\\frac{|\\vartheta|}{|\\nu-\\vartheta|^3}\\right),\n\\]\nwhere $\\varphi_\\nu(t) = \\nu t - \\frac{\\tau}{2\\pi} \\log t$ and\n$\\vartheta = \\frac{\\tau}{2\\pi a}$.\n-/)\n (proof := /--\nApply Lemma~\\ref{lem:aachIBP}. Since $\\varphi_\\nu'(t) = \\nu - \\tau/(2\\pi t)$, we know by\nLemma \\ref{lem:aachdecre} (with $k=1$) that\n$g_1(t) = \\frac{t^{-\\sigma-1}}{(\\varphi_\\nu'(t))^2}$ is decreasing on $[a,b]$.\nWe know that $\\varphi_\\nu'(t)\\ne 0$ for $t\\geq a$ by $a>\\frac{|\\tau|}{2\\pi |\\nu|}$, and so\nwe also know that $g_1(t)$ is continuous for $t\\geq a$.\nHence, by Lemma \\ref{lem:aachmonophase},\n\\[\\left|\\int_a^b \\frac{t^{-\\sigma-1}}{2\\pi i \\varphi_\\nu'(t)} e(\\varphi_\\nu(t)) dt \\right|\n \\leq \\frac{1}{2\\pi} \\cdot \\frac{|g_1(a)|}{\\pi}\n = \\frac{1}{2\\pi^2} \\frac{a^{-\\sigma-1}}{\\left|\\nu - \\vartheta\\right|^2},\\]\nsince $\\varphi_\\nu'(a) = \\nu - \\vartheta$. We remember to include the factor of $\\sigma$\nin front of an integral in \\eqref{eq:aachquno}.\n\nSince $\\varphi_\\nu'(t)$ is as above and $\\varphi_\\nu''(t) = \\tau/(2\\pi t^2)$, we know\nby Lemma \\ref{lem:aachdecre} (with $k=2$) that\n$g_2(t) = \\frac{t^{-\\sigma} |\\varphi_\\nu''(t)|}{|\\varphi_\\nu'(t)|^3} =\n\\frac{|\\tau|}{2\\pi} \\frac{t^{-\\sigma-2}}{|\\varphi_\\nu'(t)|^3}$ is decreasing on $[a,b]$\nwe also know, as before, that $g_2(t)$ is continuous.\nHence, again by Lemma \\ref{lem:aachmonophase},\n\\[\\left|\\int_a^b \\frac{t^{-\\sigma} \\varphi_\\nu''(t)}{2\\pi i (\\varphi_\\nu'(t))^2}\n e(\\varphi_\\nu(t)) dt\\right|\\leq \\frac{1}{2\\pi} \\frac{|g_2(a)|}{\\pi} = \\frac{1}{2\\pi^2}\n \\frac{a^{-\\sigma-1} |\\vartheta|}{\\left|\\nu - \\vartheta\\right|^3}.\n\\]\n-/)\n (latexEnv := \"lemma\")\n (discussion := 550)]\ntheorem lemma_aachfour (s : ℂ) (hsigma : 0 ≤ s.re) (ν : ℝ) (hν : ν ≠ 0) (a b : ℝ)\n (ha : a > |s.im| / (2 * π * |ν|)) (hb : b > a) :\n let φ : ℝ → ℝ := fun t ↦ ν * t - (s.im / (2 * π)) * Real.log t\n let Φ : ℝ → ℂ := fun t ↦ (t ^ (-s.re) : ℝ) * e (φ t) / (2 * π * I * (deriv φ t))\n let ϑ : ℝ := s.im / (2 * π * a)\n ∃ E, ∫ t in Set.Icc a b, t ^ (-s) * e (ν * t) = Φ b - Φ a +\n ((a ^ (-s.re - 1) : ℝ) / (2 * π ^ 2)) * E ∧\n ‖E‖ ≤ s.re / (|ν - ϑ| ^ 2) + |ϑ| / (|ν - ϑ| ^ 3) := by\n sorry\n","line":847,"end_line":896,"proof_status":"statement_formalized"} {"id":"prop:applem","label":"applem","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:aachfour","lem:aachcanc"],"nlp_text":"Let \\(s = \\sigma + i \\tau \\), \\(\\sigma \\geq 0\\), \\(\\tau \\in \\mathbb {R}\\). Let \\(a,b\\in \\mathbb {Z} + \\frac{1}{2}\\), \\(b{\\gt}a{\\gt}\\frac{|\\tau |}{2\\pi }\\). Write \\(\\vartheta = \\frac{\\tau }{2\\pi a}\\). Then, for any integer \\(n\\geq 1\\), \\[ \\begin{aligned} \\int _a^b t^{-s} \\cos 2\\pi n t\\, dt & = \\left. \\left(\\frac{(-1)^n t^{-s}}{2\\pi i} \\cdot \\frac{\\frac{\\tau }{2\\pi t}}{n^2 - \\left(\\frac{\\tau }{2\\pi t}\\right)^2}\\right)\\right|_a^b \\\\ & \\quad + \\frac{a^{-\\sigma -1}}{4\\pi ^2}\\, O^*\\left(\\frac{\\sigma }{(n-\\vartheta )^2} + \\frac{\\sigma }{(n+\\vartheta )^2} + \\frac{|\\vartheta |}{|n-\\vartheta |^3} + \\frac{|\\vartheta |}{|n+\\vartheta |^3}\\right).\\end{aligned} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.proposition_applem","latex_link":"zeta-chapter.html#prop:applem","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.proposition_applem","lean_decl_name":"ZetaAppendix.proposition_applem","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"prop:applem\"\n (title := \"Estimating a Fourier cosine integral\")\n (statement := /--\nLet $s = \\sigma + i \\tau$, $\\sigma\\geq 0$, $\\tau\\in \\mathbb{R}$.\nLet $a,b\\in \\mathbb{Z} + \\frac{1}{2}$, $b>a>\\frac{|\\tau|}{2\\pi}$.\nWrite $\\vartheta = \\frac{\\tau}{2\\pi a}$. Then, for any integer $n\\geq 1$,\n$$\\begin{aligned}\\int_a^b t^{-s} \\cos 2\\pi n t\\, dt &=\n\\left. \\left(\\frac{(-1)^n t^{-s}}{2\\pi i} \\cdot\n \\frac{\\frac{\\tau}{2\\pi t}}{n^2 - \\left(\\frac{\\tau}{2\\pi t}\\right)^2}\\right)\\right|_a^b \\\\\n&\\quad+ \\frac{a^{-\\sigma-1}}{4\\pi^2}\\, O^*\\left(\\frac{\\sigma}{(n-\\vartheta)^2}\n + \\frac{\\sigma}{(n+\\vartheta)^2}\n + \\frac{|\\vartheta|}{|n-\\vartheta|^3}\n + \\frac{|\\vartheta|}{|n+\\vartheta|^3}\\right).\\end{aligned}$$\n-/)\n (proof := /--\nWrite $\\cos 2\\pi n t = \\frac{1}{2} (e(n t) + e(-n t))$. Since $n\\geq 1$ and\n$a>\\frac{|\\tau|}{2\\pi}$, we know that $a>\\frac{|\\tau|}{2 \\pi n}$, and so we can apply\nLemma \\ref{lem:aachfour} with $\\nu = \\pm n$.\nWe then apply Lemma~\\ref{lem:aachcanc} to combine the boundary contributions\n$\\left. \\right|_a^b$ for $\\nu=\\pm n$.\n-/)\n (latexEnv := \"proposition\")\n (discussion := 552)]\ntheorem proposition_applem (s : ℂ) (hsigma : 0 ≤ s.re) {a b : ℝ} (ha : a > |s.im| / (2 * π))\n (hb : b > a) (ha' : a.IsHalfInteger) (hb' : b.IsHalfInteger) {n : ℕ} (hn : 1 ≤ n) :\n let ϑ : ℝ := s.im / (2 * π * a)\n ∃ E, ∫ t in Set.Icc a b, (t : ℂ) ^ (-s) * Real.cos (2 * π * (n : ℝ) * t) =\n ((-1) ^ n * (b ^ (-s) : ℂ) * (s.im / (2 * π * b)) /\n (2 * π * I * ((n : ℝ) ^ 2 - (s.im / (2 * π * b)) ^ 2)) -\n (-1) ^ n * (a ^ (-s) : ℂ) * (s.im / (2 * π * a)) /\n (2 * π * I * ((n : ℝ) ^ 2 - (s.im / (2 * π * a)) ^ 2))) +\n ((a ^ (-s.re - 1) : ℝ) / (4 * π ^ 2)) * E ∧\n ‖E‖ ≤ s.re / ((n - ϑ) ^ 2) + s.re / ((n + ϑ) ^ 2) +\n |ϑ| / (|n - ϑ| ^ 3) + |ϑ| / (|n + ϑ| ^ 3) := by\n have h_pos_a : 0 < a := lt_of_le_of_lt (by positivity) ha\n have h_bound_aux : |s.im| / (2 * π * n) < a := by\n refine ha.trans_le' <| div_le_div_of_nonneg_left (abs_nonneg _) (by positivity) ?_\n nlinarith [pi_gt_three, show (n : ℝ) ≥ 1 by norm_cast]\n have h_neg := lemma_aachfour s hsigma (-n : ℝ) (by norm_num; linarith) a b (by\n simp only [abs_neg, abs_of_nonneg (show 0 ≤ (n : ℝ) by positivity)]\n exact h_bound_aux) hb\n have h_pos := lemma_aachfour s hsigma (n : ℝ) (by norm_num; linarith) a b (by\n simp only [abs_of_nonneg (show 0 ≤ (n : ℝ) by positivity)]\n exact h_bound_aux) hb\n obtain ⟨E1, hE1_eq, hE1_bound⟩ := h_pos\n obtain ⟨E2, hE2_eq, hE2_bound⟩ := h_neg\n use E1 + E2\n have h_cont_pow : ContinuousOn (fun t : ℝ ↦ (t : ℂ) ^ (-s)) (Set.Icc a b) :=\n ContinuousOn.cpow continuous_ofReal.continuousOn continuousOn_const\n fun x hx ↦ Or.inl (by norm_cast; linarith [hx.1, h_pos_a])\n have h_integral : ∫ t in Set.Icc a b, (t : ℂ) ^ (-s) * (Real.cos (2 * Real.pi * n * t)) =\n (1 / 2) * (∫ t in Set.Icc a b, (t : ℂ) ^ (-s) * e (n * t)) +\n (1 / 2) * (∫ t in Set.Icc a b, (t : ℂ) ^ (-s) * e (-n * t)) := by\n rw [← mul_add, ← integral_add]\n · rw [← integral_const_mul]\n congr with t\n norm_num [e, Complex.cos]\n ring_nf\n · exact (h_cont_pow.mul (Complex.continuous_exp.comp (by continuity)).continuousOn).integrableOn_Icc\n · exact (h_cont_pow.mul (Complex.continuous_exp.comp (by continuity)).continuousOn).integrableOn_Icc\n constructor\n · have h_lem := lemma_aachcanc s (by grind) h_bound_aux hb ha' hb'\n simp only [zpow_natCast, Int.cast_natCast, one_div, neg_mul] at h_lem\n simp only [h_integral, hE1_eq, hE2_eq]\n convert congrArg (· + (↑(a ^ (-s.re - 1)) / (4 * ↑π ^ 2)) * (E1 + E2)) h_lem using 1; ring_nf\n · have : |-(n : ℝ) - s.im / (2 * π * a)| = |(n : ℝ) + s.im / (2 * π * a)| := by\n rw [show -(n : ℝ) - s.im / (2 * π * a) = -((n : ℝ) + s.im / (2 * π * a)) by ring, abs_neg]\n calc ‖E1 + E2‖ ≤ ‖E1‖ + ‖E2‖ := norm_add_le E1 E2\n _ ≤ _ := add_le_add hE1_bound hE2_bound\n _ = _ := by simp only [sq_abs, this]; ring\n","line":1021,"end_line":1091,"proof_status":"formalized"} {"id":"lem:abadsumas","label":"abadsumas","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["e-def"],"nlp_text":"Let \\(s = \\sigma + i \\tau \\), \\(\\sigma \\geq 0\\), \\(\\tau \\in \\mathbb {R}\\), with \\(s\\ne 1\\). Let \\(b{\\gt}a{\\gt}0\\), \\(a, b\\in \\mathbb {Z} + \\frac{1}{2}\\), with \\(a{\\gt}\\frac{|\\tau |}{2\\pi }\\). Define \\(f:\\mathbb {R}\\to \\mathbb {C}\\) by \\(f(y) = 1_{[a,b]}(y)/y^s\\). Write \\(\\vartheta = \\frac{\\tau }{2\\pi a}\\), \\(\\vartheta _- = \\frac{\\tau }{2\\pi b}\\). Then \\[ \\begin{aligned} \\sum _n (\\widehat{f}(n) + \\widehat{f}(-n)) & = \\frac{a^{-s} g(\\vartheta )}{2 i} - \\frac{b^{-s} g(\\vartheta _-)}{2 i} + O^*\\left(\\frac{C_{\\sigma ,\\vartheta }}{a^{\\sigma +1}}\\right)\\end{aligned} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadsumas","latex_link":"zeta-chapter.html#lem:abadsumas","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadsumas","lean_decl_name":"ZetaAppendix.lemma_abadsumas","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadsumas\"\n (title := \"Estimate for a Fourier sum\")\n (statement := /--\nLet $s = \\sigma + i \\tau$, $\\sigma\\geq 0$, $\\tau \\in \\mathbb{R}$, with $s\\ne 1$.\nLet $b>a>0$, $a, b\\in \\mathbb{Z} + \\frac{1}{2}$, with $a>\\frac{|\\tau|}{2\\pi}$.\nDefine $f:\\mathbb{R}\\to\\mathbb{C}$ by $f(y) = 1_{[a,b]}(y)/y^s$.\nWrite $\\vartheta = \\frac{\\tau}{2\\pi a}$, $\\vartheta_- = \\frac{\\tau}{2\\pi b}$. Then\n$$\\begin{aligned} \\sum_n (\\widehat{f}(n) + \\widehat{f}(-n))\n &= \\frac{a^{-s} g(\\vartheta)}{2 i} - \\frac{b^{-s} g(\\vartheta_-)}{2 i}\n + O^*\\left(\\frac{C_{\\sigma,\\vartheta}}{a^{\\sigma+1}}\\right)\\end{aligned}$$\nwith absolute convergence,\nwhere $g(t) = \\frac{1}{\\sin \\pi t} - \\frac{1}{\\pi t}$ for $t\\ne 0$, $g(0)=0$, and\n\\begin{equation}\\label{eq:defcsigth}C_{\\sigma,\\vartheta}= \\begin{cases}\n \\frac{\\sigma}{2} \\left(\\frac{1}{\\sin^2\\pi \\vartheta} - \\frac{1}{(\\pi \\vartheta)^2}\\right)\n + \\frac{|\\vartheta|}{2\\pi^2} \\left(\\frac{1}{(1-|\\vartheta|)^3} + 2\\zeta(3)-1\\right)\n & \\text{for $\\vartheta\\ne 0$,}\\\\\n \\sigma/6 & \\text{for $\\vartheta = 0$.}\\end{cases}\\end{equation}\n-/)\n (proof := /--\nBy Proposition~\\ref{prop:applem}, multiplying by $2$\n(since $e(-n t)+e(n t) = 2 \\cos 2\\pi n t$),\n\\begin{align}\\widehat{f}(n) + \\widehat{f}(-n) &= \\notag\n \\frac{a^{-s}}{2\\pi i} \\frac{(-1)^{n+1} 2\\vartheta}{n^2 - \\vartheta^2} -\n \\frac{b^{-s}}{2\\pi i} \\frac{(-1)^{n+1} 2\\vartheta_-}{n^2 - \\vartheta_-^2}\n \\\\\n &+ \\frac{a^{-\\sigma-1}}{2\\pi^2} O^*\\left(\\frac{\\sigma}{(n-\\vartheta)^2}\n + \\frac{\\sigma}{(n+\\vartheta)^2} + \\frac{|\\vartheta|}{(n-\\vartheta)^3}\n + \\frac{|\\vartheta|}{(n+\\vartheta)^3}\\right),\\label{eq:abaderrcontrib}\\end{align}\nwhere $\\vartheta_- = \\tau/(2\\pi b)$. Note $|\\vartheta_-|\\leq |\\vartheta|<1$.\nBy the Lemma \\ref{lem:abadeulmit1},\n\\[\\sum_n \\frac{(-1)^{n+1} 2 z}{n^2 - z^2} = \\frac{\\pi}{\\sin \\pi z} - \\frac{1}{z}\n\\] for $z\\ne 0$, while $\\sum_n \\frac{(-1)^{n+1} 2 z}{n^2 - z^2} = \\sum_n 0 = 0$ for $z=0$.\nMoreover, by Lemmas \\ref{lem:abadeulmit2} and \\ref{lem:abadimpseri}, for $\\vartheta\\ne 0$,\n\\[\\sum_n \\left(\\frac{\\sigma}{(n-\\vartheta)^2} + \\frac{\\sigma}{(n+\\vartheta)^2}\\right)\\leq\n\\sigma\\cdot \\left(\\frac{\\pi^2}{\\sin^2 \\pi \\vartheta} - \\frac{1}{\\vartheta^2}\\right),\\]\n\\[\\sum_n \\left(\\frac{|\\vartheta|}{(n-\\vartheta)^3} + \\frac{|\\vartheta|}{(n+\\vartheta)^3}\\right)\n\\leq |\\vartheta|\\cdot \\left(\\frac{1}{(1-|\\vartheta|)^3} + 2\\zeta(3)-1\\right).\n\\]\nIf $\\vartheta=0$, then\n$\\sum_n \\left(\\frac{\\sigma}{(n-\\vartheta)^2} + \\frac{\\sigma}{(n+\\vartheta)^2}\\right)\n= 2 \\sigma \\sum_{n=1}^\\infty \\frac{1}{n^2} = \\sigma \\frac{\\pi^2}{3}$.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 572)]\ntheorem lemma_abadsumas {s : ℂ} (hs1 : s ≠ 1) (hsigma : 0 ≤ s.re) {a b : ℝ} (ha : 0 < a)\n (hab : a < b) (ha' : a.IsHalfInteger) (hb' : b.IsHalfInteger) (haτ : a > |s.im| / (2 * π)) :\n let ϑ : ℝ := s.im / (2 * π * a)\n let ϑ_minus : ℝ := s.im / (2 * π * b)\n let f : ℝ → ℂ := fun y ↦\n if a ≤ y ∧ y ≤ b then (y ^ (-s.re) : ℝ) * e (-(s.im / (2 * π)) * Real.log y) else 0\n let g : ℝ → ℂ := fun t ↦\n if t ≠ 0 then (1 / Complex.sin (π * t) : ℂ) - (1 / (π * t : ℂ)) else 0\n let C : ℝ :=\n if ϑ ≠ 0 then\n s.re / 2 * ((1 / (Complex.sin (π * ϑ) ^ 2 : ℂ)).re - (1 / ((π * ϑ) ^ 2 : ℂ)).re) +\n |ϑ| / (2 * π ^ 2) * ((1 / ((1 - |ϑ|) ^ 3 : ℝ)) + 2 * (riemannZeta 3).re - 1)\n else\n s.re / 6\n ∃ E : ℂ, ∑' n : ℤ, (FourierTransform.fourier f n + FourierTransform.fourier f (-n)) =\n ((a ^ (-s) : ℂ) * g ϑ) / (2 * I) - ((b ^ (-s) : ℂ) * g ϑ_minus) / (2 * I) + E ∧\n ‖E‖ ≤ C := by\n sorry\n","line":1708,"end_line":1770,"proof_status":"statement_formalized"} {"id":"thm:ramare_saouter2003-2","label":"ramare_saouter2003-2","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} \\exp (53)\\), then there is a prime in the interval \\[ \\left( x\\left(1 - \\frac{1}{204879661}\\right), x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RamareSaouter2003.has_prime_in_interval_2","latex_link":"secondary-chapter.html#thm:ramare_saouter2003-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RamareSaouter2003.has_prime_in_interval_2","lean_decl_name":"RamareSaouter2003.has_prime_in_interval_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:ramare_saouter2003-2\"\n (title := \"Ramaré-Saouter 2003 (2)\")\n (statement := /-- If $x > \\exp(53)$, then there is a prime in the interval\n \\[ \\left( x\\left(1 - \\frac{1}{204879661}\\right), x \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem RamareSaouter2003.has_prime_in_interval_2 (x : ℝ) (hx : x > exp 53) :\n HasPrimeInInterval (x*(1-1/204879661)) (x/204879661) := by sorry","line":148,"end_line":156,"proof_status":"formalized"} {"id":"li-approx","label":"li-approx","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["li-def"],"nlp_text":"If \\(x \\geq 2\\) and \\(0 {\\lt} \\varepsilon \\leq 1\\), then \\(\\mathrm{li}(x) = \\int _{[0,x] \\backslash [-\\varepsilon , \\varepsilon ]} \\frac{dt}{\\log t} + O_*( \\frac{\\log (4/3)}{4/3} \\varepsilon )\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/li.eq","latex_link":"secondary-chapter.html#li-approx","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/li.eq","lean_decl_name":"li.eq","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":true,"source_repo":"mathlib","source_path":"./Mathlib/Tactic/ITauto.lean","lean4_code":"@[match_pattern] def IProp.eq : IProp → IProp → IProp := .and' .eq\n\n/-- Constructor for `¬ p`. -/\n","line":112,"end_line":114,"proof_status":"statement_formalized"} {"id":"bklnw-prop-3-sub-1","label":"bklnw-prop-3-sub-1","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq-2-4"],"nlp_text":"Let \\(x \\geq x_0\\) and let \\(\\alpha \\) be admissible. Then \\[ \\frac{\\psi (x) - \\theta (x) - \\theta (x^{1/2})}{x^{1/3}} \\leq (1 + \\alpha ) \\sum _{k=3}^{\\lfloor \\frac{\\log x}{\\log 2} \\rfloor } x^{\\frac{1}{k} - \\frac{1}{3}}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_1","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_1","lean_decl_name":"BKLNW.prop_3_sub_1","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" else if b < 8500 then 1.97611e-25\n else if b < 9000 then 2.12970e-26\n else if b < 9500 then 2.44532e-27\n else if b < 10000 then 2.97001e-28\n else if b < 10500 then 3.78493e-29\n else if b < 11000 then 5.10153e-30\n else if b < 11500 then 7.14264e-31\n else if b < 12000 then 1.04329e-31\n else if b < 12500 then 1.59755e-32\n else if b < 13000 then 2.53362e-33\n else if b < 13500 then 4.13554e-34\n else if b < 14000 then 7.21538e-35\n else if b < 15000 then 1.22655e-35\n else if b < 16000 then 4.10696e-37\n","line":69,"end_line":82,"proof_status":"statement_formalized"} {"id":"I2New","label":"I2New","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"Let \\[ I_2(\\nu ,\\varepsilon ,X,T)=\\frac{1}{2\\pi i}\\int _{\\sigma '}^\\sigma \\left(-\\frac{\\zeta '}{\\zeta }(\\sigma _0-iT)\\right)\\, \\mathcal{M}(\\tilde{1}_\\varepsilon )(\\sigma _0-iT)\\, X^{\\sigma _0-iT}\\, d\\sigma _0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I2New","latex_link":"sect0004.html#I2New","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I2New","lean_decl_name":"I2New","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I2New\")\n (statement := /--\n Let\n $$I_2(\\nu,\\varepsilon,X,T)=\\frac{1}{2\\pi i}\\int_{\\sigma'}^\\sigma\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma_0-iT)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma_0-iT)\\,X^{\\sigma_0-iT}\\,d\\sigma_0.$$\n -/)]\nnoncomputable def I2New (SmoothingF : ℝ → ℝ) (ε T X σ' : ℝ) : ℂ :=\n (1 / (2 * π * I)) * ((∫ σ₀ in σ'..(1 + (Real.log X)⁻¹),\n SmoothedChebyshevIntegrand SmoothingF ε X (σ₀ - T * I)))\n","line":1168,"end_line":1176,"proof_status":"formalized"} {"id":"RectangleIntegral_tendsTo_UpperU","label":"RectangleIntegral_tendsTo_UpperU","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RectangleIntegral","UpperUIntegral"],"nlp_text":"Let \\(\\sigma ,\\sigma ' \\in \\mathbb {R}\\), and \\(f : \\mathbb {C} \\to \\mathbb {C}\\) such that the vertical integrals \\(\\int _{(\\sigma )}f(s)ds\\) and \\(\\int _{(\\sigma ')}f(s)ds\\) exist and the horizontal integral \\(\\int _{(\\sigma )}^{\\sigma '}f(x + yi)dx\\) vanishes as \\(y \\to \\pm \\infty \\). Then the limit of rectangle integrals \\[ \\int _{\\sigma +iT}^{\\sigma '+iU}f(s)ds \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral_tendsTo_UpperU","latex_link":"sect0003.html#RectangleIntegral_tendsTo_UpperU","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral_tendsTo_UpperU","lean_decl_name":"RectangleIntegral_tendsTo_UpperU","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"RectangleIntegral-tendsTo-UpperU\")\n (statement := /--\n Let $\\sigma,\\sigma' \\in \\mathbb{R}$, and $f : \\mathbb{C} \\to \\mathbb{C}$ such that\n the vertical integrals $\\int_{(\\sigma)}f(s)ds$ and $\\int_{(\\sigma')}f(s)ds$ exist and\n the horizontal integral $\\int_{(\\sigma)}^{\\sigma'}f(x + yi)dx$ vanishes as $y \\to \\pm \\infty$.\n Then the limit of rectangle integrals\n $$\\int_{\\sigma+iT}^{\\sigma'+iU}f(s)ds$$\n as $U\\to\\infty$ is the ``UpperUIntegral'' of $f$.\n -/)\n (proof := /-- Almost by definition. -/)\n (proofUses := [\"RectangleIntegral\", \"UpperUIntegral\"])\n (latexEnv := \"lemma\")]\nlemma RectangleIntegral_tendsTo_UpperU {σ σ' T : ℝ} {f : ℂ → ℂ}\n (htop : Tendsto (fun (y : ℝ) ↦ ∫ (x : ℝ) in σ..σ', f (x + y * I)) atTop (𝓝 0))\n (hleft : Integrable (fun (y : ℝ) ↦ f (σ + y * I)))\n (hright : Integrable (fun (y : ℝ) ↦ f (σ' + y * I))) :\n Tendsto (fun (U : ℝ) ↦ RectangleIntegral f (σ + I * T) (σ' + I * U)) atTop\n (𝓝 (UpperUIntegral f σ σ' T)) := by\n have h_re (s : ℝ) (t : ℝ) : (s + I * t).re = s := by simp\n have h_im (s : ℝ) (t : ℝ) : (s + I * t).im = t := by simp\n have hbot : Tendsto (fun (_ : ℝ) ↦ ∫ (x : ℝ) in σ..σ', f (x + T * I)) atTop\n (𝓝 <| ∫ (x : ℝ) in σ..σ', f (x + T * I)) := by exact tendsto_const_nhds\n have hvert (s : ℝ) (int : Integrable (fun (y : ℝ) ↦ f (s + y * I))) :\n Tendsto (fun (U : ℝ) ↦ I * ∫ (y : ℝ) in T..U, f (s + y * I)) atTop\n (𝓝 <| I * ∫ (y : ℝ) in Ioi T, f (s + y * I)) := by\n exact (intervalIntegral_tendsto_integral_Ioi T int.restrict tendsto_id).const_smul I\n have := ((hbot.sub htop).add (hvert σ' hright)).sub (hvert σ hleft)\n simpa only [RectangleIntegral, UpperUIntegral, h_re, h_im, sub_zero,\n ← integral_Ici_eq_integral_Ioi]\n","line":106,"end_line":135,"proof_status":"formalized"} {"id":"ZetaNoZerosInBox","label":"ZetaNoZerosInBox","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any \\(T{\\gt}0\\), there is a constant \\(\\sigma {\\lt}1\\) so that \\[ \\zeta (\\sigma '+it) \\ne 0 \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNoZerosInBox","latex_link":"sect0003.html#ZetaNoZerosInBox","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNoZerosInBox","lean_decl_name":"ZetaNoZerosInBox","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaNoZerosInBox\")\n (statement := /--\n For any $T>0$, there is a constant $\\sigma<1$ so that\n $$\n \\zeta(\\sigma'+it) \\ne 0\n $$\n for all $|t| \\leq T$ and $\\sigma' \\ge \\sigma$.\n -/)\n (proof := /--\n Assume not. Then there is a sequence $|t_n| \\le T$ and $\\sigma_n \\to 1$ so that\n $\\zeta(\\sigma_n + it_n) = 0$.\n By compactness, there is a subsequence $t_{n_k} \\to t_0$ along which\n $\\zeta(\\sigma_{n_k} + it_{n_k}) = 0$.\n If $t_0\\ne0$, use the continuity of $\\zeta$ to get that $\\zeta(1 + it_0) = 0$;\n this is a contradiction.\n If $t_0=0$, $\\zeta$ blows up near $1$, so can't be zero nearby.\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaNoZerosInBox (T : ℝ) :\n ∃ (σ : ℝ) (_ : σ < 1), ∀ (t : ℝ) (_ : |t| ≤ T)\n (σ' : ℝ) (_ : σ' ≥ σ), ζ (σ' + t * I) ≠ 0 := by\n by_contra h\n push_neg at h\n\n have hn (n : ℕ) := h (1 - 1 / (n + 1)) (sub_lt_self _ (by positivity))\n\n have : ∃ (tn : ℕ → ℝ) (σn : ℕ → ℝ), (∀ n, σn n ≤ 1) ∧\n (∀ n, (1 : ℝ) - 1 / (n + 1) ≤ σn n) ∧ (∀ n, |tn n| ≤ T) ∧\n (∀ n, ζ (σn n + tn n * I) = 0) := by\n choose t ht σ' hσ' hζ using hn\n refine ⟨t, σ', ?_, hσ', ht, hζ⟩\n intro n\n by_contra hσn\n push_neg at hσn\n have := riemannZeta_ne_zero_of_one_lt_re (s := σ' n + t n * I)\n simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n add_zero, ne_eq] at this\n exact this hσn (hζ n)\n\n choose t σ' hσ'_le hσ'_ge ht hζ using this\n\n have σTo1 : Filter.Tendsto σ' Filter.atTop (𝓝 1) := by\n use sub_zero (1: ℝ)▸tendsto_order.2 ⟨fun A B=>? _,fun A B=>?_⟩\n · apply (((tendsto_inv_atTop_nhds_zero_nat.comp\n (Filter.tendsto_add_atTop_nat (1))).congr (by norm_num)).const_sub 1).eventually_const_lt\n B|>.mono (hσ'_ge ·|>.trans_lt')\n · norm_num[(hσ'_le _).trans_lt, B.trans_le']\n\n have : ∃ (t₀ : ℝ) (subseq : ℕ → ℕ),\n Filter.Tendsto (t ∘ subseq) Filter.atTop (𝓝 t₀) ∧\n Filter.Tendsto subseq Filter.atTop Filter.atTop := by\n refine (isCompact_Icc.isSeqCompact fun and => abs_le.1 (ht and)).imp fun and ⟨x, A, B, _⟩ => ?_\n use A, by omega, B.tendsto_atTop\n\n obtain ⟨t₀, subseq, tTendsto, subseqTendsto⟩ := this\n\n have σTo1 : Filter.Tendsto (σ' ∘ subseq) Filter.atTop (𝓝 1) :=\n σTo1.comp subseqTendsto\n\n have (n : ℕ) : ζ (σ' (subseq n) + I * (t (subseq n))) = 0 := by\n convert hζ (subseq n) using 3\n ring\n\n have ToOneT0 : Filter.Tendsto (fun n ↦ (σ' (subseq n) : ℂ) + Complex.I * (t (subseq n))) Filter.atTop\n (𝓝[≠]((1 : ℂ) + I * t₀)) := by\n simp_rw [tendsto_nhdsWithin_iff, Function.comp_def] at tTendsto ⊢\n constructor\n · exact (σTo1.ofReal.add (tTendsto.ofReal.const_mul _)).trans (by simp)\n · filter_upwards with n\n apply ne_of_apply_ne ζ\n rw [this]\n apply Ne.symm\n apply riemannZeta_ne_zero_of_one_le_re\n simp only [add_re, one_re, mul_re, I_re, ofReal_re, zero_mul, I_im, ofReal_im, mul_zero,\n sub_self, add_zero, le_refl]\n\n by_cases ht₀ : t₀ = 0\n · have ZetaBlowsUp : ∀ᶠ s in 𝓝[≠](1 : ℂ), ‖ζ s‖ ≥ 1 := by\n simp_all only [ge_iff_le, one_div, tsub_le_iff_right, Function.comp_def, ofReal_zero,\n mul_zero, add_zero, norm_eq_sqrt_real_inner, Complex.inner, mul_re, conj_re, conj_im,\n mul_neg, sub_neg_eq_add, Real.one_le_sqrt, eventually_nhdsWithin_iff, mem_compl_iff,\n mem_singleton_iff]\n contrapose! h\n simp_all only [ne_eq]\n delta abs at*\n exfalso\n simp_rw [Metric.nhds_basis_ball.frequently_iff]at*\n choose! I A B using h\n choose a s using exists_seq_strictAnti_tendsto (0: ℝ)\n apply ((isCompact_closedBall _ _).isSeqCompact\n fun and=>(A _ (s.2.1 and)).le.trans (s.2.2.bddAbove_range.some_mem ⟨and, rfl⟩)).elim\n use fun and ⟨a, H, S, M⟩=>absurd (tendsto_nhds_unique M (tendsto_sub_nhds_zero_iff.1\n (( squeeze_zero_norm fun and=>le_of_lt (A _ (s.2.1 _) ) )\n (s.2.2.comp S.tendsto_atTop)))) fun and=>?_\n norm_num[*,Function.comp_def] at M\n have:=@riemannZeta_residue_one\n use one_ne_zero (tendsto_nhds_unique (this.comp (tendsto_nhdsWithin_iff.2\n ⟨ M,.of_forall (by norm_num[*])⟩)) ( squeeze_zero_norm ?_\n ((M.sub_const 1).norm.trans (by rw [sub_self,norm_zero]))))\n use fun and =>.trans (norm_mul_le_of_le ↑(le_rfl) (Complex.norm_def _▸Real.sqrt_le_one.mpr\n (B ↑_ (s.2.1 ↑_)).right.le)) (by rw [mul_one])\n\n have ZetaNonZ : ∀ᶠ s in 𝓝[≠](1 : ℂ), ζ s ≠ 0 := by\n filter_upwards [ZetaBlowsUp]\n intro s hs hfalse\n rw [hfalse] at hs\n simp only [norm_zero, ge_iff_le] at hs\n linarith\n\n rw [ht₀] at ToOneT0\n simp only [ofReal_zero, mul_zero, add_zero] at ToOneT0\n rcases (ToOneT0.eventually ZetaNonZ).exists with ⟨n, hn⟩\n exact hn (this n)\n\n · have zetaIsZero : ζ (1 + Complex.I * t₀) = 0 := by\n have cont := @ZetaCont\n use isClosed_singleton.isSeqClosed\n this\n (.comp\n (cont.continuousAt.comp (eventually_ne_nhds (by field_simp; simp [ht₀])).mono\n fun and=>.intro ⟨⟩)\n (ToOneT0.trans (inf_le_left)))\n\n exact riemannZeta_ne_zero_of_one_le_re (s := 1 + I * t₀) (by simp) zetaIsZero\n","line":3278,"end_line":3402,"proof_status":"formalized"} {"id":"LogDerivZetaHolcSmallT","label":"LogDerivZetaHolcSmallT","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaNoZerosInBox"],"nlp_text":"There is a \\(\\sigma _2 {\\lt} 1\\) so that the function \\[ \\frac{\\zeta '}{\\zeta }(s) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaHolcSmallT","latex_link":"sect0003.html#LogDerivZetaHolcSmallT","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivZetaHolcSmallT","lean_decl_name":"LogDerivZetaHolcSmallT","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"LogDerivZetaHolcSmallT\")\n (statement := /--\n There is a $\\sigma_2 < 1$ so that the function\n $$\n \\frac {\\zeta'}{\\zeta}(s)\n $$\n is holomorphic on $\\{ \\sigma_2 \\le \\Re s \\le 2, |\\Im s| \\le 3 \\} \\setminus \\{1\\}$.\n -/)\n (proof := /--\n The derivative of $\\zeta$ is holomorphic away from $s=1$; the denominator $\\zeta(s)$ is nonzero\n in this range by Lemma \\ref{ZetaNoZerosInBox}.\n -/)\n (latexEnv := \"lemma\")]\ntheorem LogDerivZetaHolcSmallT :\n ∃ (σ₂ : ℝ) (_ : σ₂ < 1), HolomorphicOn (fun (s : ℂ) ↦ ζ' s / (ζ s))\n (( [[ σ₂, 2 ]] ×ℂ [[ -3, 3 ]]) \\ {1}) := by\n obtain ⟨σ₂, hσ₂_lt_one, hζ_ne_zero⟩ := ZetaNoZerosInBox 3\n refine ⟨σ₂, hσ₂_lt_one, ?_⟩\n let U := ([[σ₂, 2]] ×ℂ [[-3, 3]]) \\ {1}\n have s_in_U_im_le3 : ∀ s ∈ U, |s.im| ≤ 3 := by\n intro s hs\n rw [mem_diff_singleton] at hs\n rcases hs with ⟨hbox, _hne⟩\n rcases hbox with ⟨hre, him⟩\n simp only [Set.mem_preimage] at him\n obtain ⟨him_lower, him_upper⟩ := him\n apply abs_le.2\n simp only [neg_le_self_iff, Nat.ofNat_nonneg, inf_of_le_left] at him_lower\n simp only [neg_le_self_iff, Nat.ofNat_nonneg, sup_of_le_right] at him_upper\n exact ⟨him_lower, him_upper⟩\n\n have s_in_U_re_ges2 : ∀ s ∈ U, σ₂ ≤ s.re := by\n intro s hs\n rw [mem_diff_singleton] at hs\n rcases hs with ⟨hbox, _hne⟩\n rcases hbox with ⟨hre, _him⟩\n simp only [Set.mem_preimage] at hre\n obtain ⟨hre_lower, hre_upper⟩ := hre\n have : min σ₂ 2 = σ₂ := by\n apply min_eq_left\n linarith [hσ₂_lt_one]\n rwa [← this]\n\n apply LogDerivZetaHoloOn\n · exact notMem_diff_of_mem rfl\n · intro s hs\n rw[← re_add_im s]\n apply hζ_ne_zero\n · apply s_in_U_im_le3 _ hs\n · apply s_in_U_re_ges2 _ hs\n","line":3420,"end_line":3470,"proof_status":"formalized"} {"id":"thm:rh_prime_interval_2002","label":"rh_prime_interval_2002","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Assuming the Riemann Hypothesis, for \\(x \\geq 2\\), there is a prime in the interval \\[ \\left( x - \\frac{8}{5}\\sqrt{x} \\log x, x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RHPrimeInterval2002.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:rh_prime_interval_2002","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RHPrimeInterval2002.has_prime_in_interval","lean_decl_name":"RHPrimeInterval2002.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:rh_prime_interval_2002\"\n (title := \"RH Prime Interval 2002\")\n (statement := /-- Assuming the Riemann Hypothesis, for $x \\geq 2$, there is a prime in the interval\n \\[ \\left( x - \\frac{8}{5}\\sqrt{x} \\log x, x \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem RHPrimeInterval2002.has_prime_in_interval (x : ℝ) (hx : x ≥ 2) (RH : RiemannHypothesis) :\n HasPrimeInInterval (x - (8 / 5) * sqrt x * log x) ((8 / 5) * sqrt x * log x) := by sorry","line":232,"end_line":240,"proof_status":"formalized"} {"id":"GapSize","label":"GapSize","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZeroInequality"],"nlp_text":"Let \\(t\\in \\mathbb {R}\\) with \\(|t|\\geq 3\\) and \\(z=\\sigma +it\\) where \\(1-\\delta _t/3\\leq \\sigma \\leq 3/2\\). Additionally, let \\(\\rho \\in \\mathcal{Z}_t\\). Then we have that \\[ |z-\\rho |\\geq \\delta _t/6. \\]","doc_url":null,"latex_link":"sect0004.html#GapSize","lean_link":null,"lean_decl_name":"GapSize","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"DeltaSpike","label":"DeltaSpike","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(\\nu \\) be a bumpfunction supported in \\([1/2,2]\\). Then for any \\(\\epsilon {\\gt}0\\), we define the delta spike \\(\\nu _\\epsilon \\) to be the function from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {C}\\) defined by \\[ \\nu _\\epsilon (x) = \\frac{1}{\\epsilon }\\nu \\left(x^{\\frac{1}{\\epsilon }}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaSpike","latex_link":"sect0003.html#DeltaSpike","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaSpike","lean_decl_name":"DeltaSpike","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"DeltaSpike\")\n (statement := /--\n Let $\\nu$ be a bumpfunction supported in $[1/2,2]$. Then for any $\\epsilon>0$, we define the\n delta spike $\\nu_\\epsilon$ to be the function from $\\mathbb{R}_{>0}$ to $\\mathbb{C}$ defined by\n $$\\nu_\\epsilon(x) = \\frac{1}{\\epsilon}\\nu\\left(x^{\\frac{1}{\\epsilon}}\\right).$$\n -/)]\nnoncomputable def DeltaSpike (ν : ℝ → ℝ) (ε : ℝ) : ℝ → ℝ :=\n fun x ↦ ν (x ^ (1 / ε)) / ε\n","line":574,"end_line":582,"proof_status":"formalized"} {"id":"DeltaSpikeMass","label":"DeltaSpikeMass","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DeltaSpike"],"nlp_text":"For any \\(\\epsilon {\\gt}0\\), we have \\[ \\int _0^\\infty \\nu _\\epsilon (x)\\frac{dx}{x} = 1. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaSpikeMass","latex_link":"sect0003.html#DeltaSpikeMass","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DeltaSpikeMass","lean_decl_name":"DeltaSpikeMass","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"DeltaSpikeMass\")\n (statement := /--\n For any $\\epsilon>0$, we have\n $$\\int_0^\\infty \\nu_\\epsilon(x)\\frac{dx}{x} = 1.$$\n -/)\n (proof := /--\n Substitute $y=x^{1/\\epsilon}$, and use the fact that $\\nu$ has mass one, and that $dx/x$ is Haar\n measure.\n -/)\n (latexEnv := \"lemma\")]\nlemma DeltaSpikeMass {ν : ℝ → ℝ} (mass_one : ∫ x in Ioi 0, ν x / x = 1) {ε : ℝ}\n (εpos : 0 < ε) : ∫ x in Ioi 0, ((DeltaSpike ν ε) x) / x = 1 :=\n calc\n _ = ∫ (x : ℝ) in Ioi 0, (|1/ε| * x ^ (1 / ε - 1)) •\n ((fun z ↦ (ν z) / z) (x ^ (1 / ε))) := by\n apply setIntegral_congr_ae measurableSet_Ioi\n filter_upwards with x hx\n simp only [smul_eq_mul, abs_of_pos (one_div_pos.mpr εpos)]\n symm; calc\n _ = (ν (x ^ (1 / ε)) / x ^ (1 / ε)) * x ^ (1 / ε - 1) * (1 / ε) := by ring\n _ = _ := by rw [rpow_sub hx, rpow_one]\n _ = (ν (x ^ (1 / ε)) / x ^ (1 / ε) * x ^ (1 / ε) / x) * (1/ ε) := by ring\n _ = _ := by rw [div_mul_cancel₀ _ (ne_of_gt (rpow_pos_of_pos hx (1/ε)))]\n _ = (ν (x ^ (1 / ε)) / ε / x) := by ring\n _ = 1 := by\n rw [integral_comp_rpow_Ioi (fun z ↦ (ν z) / z), ← mass_one]\n simp only [ne_eq, div_eq_zero_iff, one_ne_zero, εpos.ne', or_self, not_false_eq_true]\n","line":588,"end_line":615,"proof_status":"formalized"} {"id":"Smooth1","label":"Smooth1","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DeltaSpike","MellinConvolution"],"nlp_text":"Let \\(\\epsilon {\\gt}0\\). Then we define the smooth function \\(\\widetilde{1_{\\epsilon }}\\) from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {C}\\) by \\[ \\widetilde{1_{\\epsilon }} = 1_{(0,1]}\\ast \\nu _\\epsilon . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1","latex_link":"sect0003.html#Smooth1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1","lean_decl_name":"Smooth1","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"Smooth1\")\n (statement := /--\n Let $\\epsilon>0$. Then we define the smooth function $\\widetilde{1_{\\epsilon}}$ from\n $\\mathbb{R}_{>0}$ to $\\mathbb{C}$ by\n $$\\widetilde{1_{\\epsilon}} = 1_{(0,1]}\\ast\\nu_\\epsilon.$$\n -/)\n (proof := /--\n Let $c:=2^\\epsilon > 1$, in terms of which we wish to prove\n $$\n -1 < c \\log c - c .\n $$\n Letting $f(x):=x\\log x - x$, we can rewrite this as $f(1) < f(c)$.\n Since\n $$\n \\frac {d}{dx}f(x) = \\log x > 0 ,\n $$\n $f$ is monotone increasing on [1, \\infty), and we are done.\n -/)\n (latexEnv := \"definition\")]\nnoncomputable def Smooth1 (ν : ℝ → ℝ) (ε : ℝ) : ℝ → ℝ :=\n MellinConvolution (fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0) (DeltaSpike ν ε)\n","line":785,"end_line":806,"proof_status":"formalized"} {"id":"MellinOfDeltaSpike","label":"MellinOfDeltaSpike","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DeltaSpike"],"nlp_text":"For any \\(\\epsilon {\\gt}0\\), the Mellin transform of \\(\\nu _\\epsilon \\) is \\[ \\mathcal{M}(\\nu _\\epsilon )(s) = \\mathcal{M}(\\nu )\\left(\\epsilon s\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfDeltaSpike","latex_link":"sect0003.html#MellinOfDeltaSpike","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfDeltaSpike","lean_decl_name":"MellinOfDeltaSpike","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOfDeltaSpike\")\n (statement := /--\n For any $\\epsilon>0$, the Mellin transform of $\\nu_\\epsilon$ is\n $$\\mathcal{M}(\\nu_\\epsilon)(s) = \\mathcal{M}(\\nu)\\left(\\epsilon s\\right).$$\n -/)\n (proof := /-- Substitute $y=x^{1/\\epsilon}$, use Haar measure; direct calculation. -/)]\ntheorem MellinOfDeltaSpike (ν : ℝ → ℝ) {ε : ℝ} (εpos : ε > 0) (s : ℂ) :\n 𝓜 (fun x ↦ (DeltaSpike ν ε x : ℂ)) s = 𝓜 (fun x ↦ (ν x : ℂ)) (ε * s) := by\n unfold DeltaSpike\n push_cast\n rw [mellin_div_const, mellin_comp_rpow (fun x ↦ (ν x : ℂ)), abs_of_nonneg (by positivity)]\n simp only [one_div, inv_inv, ofReal_inv, div_inv_eq_mul, real_smul]\n rw [mul_div_cancel_left₀ _ (ne_zero_of_re_pos εpos)]\n ring_nf\n","line":660,"end_line":674,"proof_status":"formalized"} {"id":"Smooth1Properties_below","label":"Smooth1Properties_below","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["DeltaSpikeMass","Smooth1"],"nlp_text":"Fix \\(\\epsilon {\\gt}0\\). There is an absolute constant \\(c{\\gt}0\\) so that: If \\(0 {\\lt} x \\leq (1-c\\epsilon )\\), then \\[ \\widetilde{1_{\\epsilon }}(x) = 1. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1Properties_below","latex_link":"sect0003.html#Smooth1Properties_below","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1Properties_below","lean_decl_name":"Smooth1Properties_below","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"Smooth1Properties-below\")\n (statement := /--\n Fix $\\epsilon>0$. There is an absolute constant $c>0$ so that:\n If $0 < x \\leq (1-c\\epsilon)$, then\n $$\\widetilde{1_{\\epsilon}}(x) = 1.$$\n -/)\n (proof := /--\n Opening the definition, we have that the Mellin convolution of $1_{(0,1]}$ with $\\nu_\\epsilon$ is\n $$\n \\int_0^\\infty 1_{(0,1]}(y)\\nu_\\epsilon(x/y)\\frac{dy}{y}\n =\n \\int_0^1 \\nu_\\epsilon(x/y)\\frac{dy}{y}.\n $$\n The support of $\\nu_\\epsilon$ is contained in $[1/2^\\epsilon,2^\\epsilon]$, so it suffices to\n consider $y \\in [1/2^\\epsilon x,2^\\epsilon x]$ for nonzero contributions. If $x < 2^{-\\epsilon}$,\n then the integral is the same as that over $(0,\\infty)$:\n $$\n \\int_0^1 \\nu_\\epsilon(x/y)\\frac{dy}{y}\n =\n \\int_0^\\infty \\nu_\\epsilon(x/y)\\frac{dy}{y},\n $$\n in which we change variables to $z=x/y$ (using $x>0$):\n $$\n \\int_0^\\infty \\nu_\\epsilon(x/y)\\frac{dy}{y}\n =\n \\int_0^\\infty \\nu_\\epsilon(z)\\frac{dz}{z},\n $$\n which is equal to one by Lemma \\ref{DeltaSpikeMass}.\n We then choose\n $$\n c:=\\log 2,\n $$\n which satisfies\n $$\n c > \\frac{1-2^{-\\epsilon}}\\epsilon\n $$\n by Lemma \\ref{Smooth1Properties_estimate}, so\n $$\n 1-c\\epsilon < 2^{-\\epsilon}.\n $$\n -/)\n (latexEnv := \"lemma\")]\nlemma Smooth1Properties_below {ν : ℝ → ℝ} (suppν : ν.support ⊆ Icc (1 / 2) 2)\n (mass_one : ∫ x in Ioi 0, ν x / x = 1) :\n ∃ (c : ℝ), 0 < c ∧ c = Real.log 2 ∧\n ∀ (ε x) (_ : 0 < ε), 0 < x → x ≤ 1 - c * ε → Smooth1 ν ε x = 1 := by\n set c := Real.log 2; use c\n refine ⟨log_pos (by norm_num), rfl, ?_⟩\n intro ε x εpos xpos hx\n have hx2 := Smooth1Properties_below_aux hx εpos\n rewrite [← DeltaSpikeMass mass_one εpos]\n unfold Smooth1 MellinConvolution\n calc\n _ = ∫ (y : ℝ) in Ioi 0,\n indicator (Ioc 0 1) (fun y ↦ DeltaSpike ν ε (x / y) / ↑y) y := ?_\n _ = ∫ (y : ℝ) in Ioi 0, DeltaSpike ν ε (x / y) / y := ?_\n _ = _ := integral_comp_div_I0i_haar (fun y ↦ DeltaSpike ν ε y) xpos\n · rw [setIntegral_congr_fun (by simp)]\n intro y hy\n by_cases h : y ≤ 1 <;> simp [indicator, mem_Ioi.mp hy, h]\n · rw [setIntegral_congr_fun (by simp)]\n intro y hy\n have : y ≠ 0 := by\n rintro rfl\n simp at hy\n simp only [indicator_apply_eq_self, mem_Ioc, not_and, not_le, div_eq_zero_iff, this, or_false]\n intro hy2; replace hy2 := hy2 <| mem_Ioi.mp hy\n apply DeltaSpikeSupport εpos ?_ suppν\n · simp only [mem_Icc, not_and, not_le]; intro\n linarith [(by apply (div_lt_iff₀ (by linarith)).mpr; nlinarith : x / y < 2 ^ (-ε))]\n · rw [le_div_iff₀ (by linarith), zero_mul]; exact xpos.le\n","line":876,"end_line":947,"proof_status":"formalized"} {"id":"Smooth1LeOne","label":"Smooth1LeOne","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"If \\(\\nu \\) is nonnegative and has mass one, then \\(\\widetilde{1_{\\epsilon }}(x)\\le 1\\), \\(\\forall x{\\gt}0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1LeOne","latex_link":"sect0003.html#Smooth1LeOne","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1LeOne","lean_decl_name":"Smooth1LeOne","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"Smooth1LeOne\")\n (statement := /--\n If $\\nu$ is nonnegative and has mass one, then $\\widetilde{1_{\\epsilon}}(x)\\le 1$, $\\forall x>0$.\n -/)\n (proof := /--\n By Definitions \\ref{Smooth1}, \\ref{MellinConvolution} and \\ref{DeltaSpike}\n $$\n \\widetilde{1_\\epsilon}(x)\n =\\int_0^\\infty 1_{(0,1]}(y)\\frac1\\epsilon\\nu((x/y)^{\\frac1\\epsilon}) \\frac{dy}y\n $$\n and since $1_{(0,1]}(y)\\le 1$, and all the factors in the integrand are nonnegative,\n $$\n \\widetilde{1_\\epsilon}(x)\\le\\int_0^\\infty \\frac1\\epsilon\\nu((x/y)^{\\frac1\\epsilon}) \\frac{dy}y\n $$\n (because in mathlib the integral of a non-integrable function is $0$, for the inequality above\n to be true, we must prove that $\\nu((x/y)^{\\frac1\\epsilon})/y$ is integrable; this follows from\n the computation below).\n We then change variables to $z=(x/y)^{\\frac1\\epsilon}$:\n $$\n \\widetilde{1_\\epsilon}(x)\\le\\int_0^\\infty \\nu(z) \\frac{dz}z\n $$\n which by Theorem \\ref{SmoothExistence} is 1.\n -/)\n (latexEnv := \"lemma\")]\nlemma Smooth1LeOne {ν : ℝ → ℝ} (νnonneg : ∀ x > 0, 0 ≤ ν x)\n (mass_one : ∫ x in Ioi 0, ν x / x = 1) {ε : ℝ} (εpos : 0 < ε) {x : ℝ} (xpos : 0 < x) :\n Smooth1 ν ε x ≤ 1 := by\n unfold Smooth1 MellinConvolution DeltaSpike\n have := Smooth1LeOne_aux xpos εpos mass_one\n calc\n _ = ∫ (y : ℝ) in Ioi 0,\n (fun y ↦ if y ∈ Ioc 0 1 then 1 else 0) y * (ν ((x / y) ^ (1 / ε)) / ε / y) := ?_\n _ ≤ ∫ (y : ℝ) in Ioi 0, (ν ((x / y) ^ (1 / ε)) / ε) / y := ?_\n _ = 1 := this\n · rw [setIntegral_congr_fun (by simp)]\n simp only [ite_mul, one_mul, zero_mul, RCLike.ofReal_real_eq_id, id_eq, mem_Ioc]\n intro y hy; aesop\n · refine setIntegral_mono_on ?_ (integrable_of_integral_eq_one this) (by simp) ?_\n · refine integrable_of_integral_eq_one this |>.bdd_mul ?_\n (ae_of_all _ <| by aesop)\n have : (fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0) =\n indicator (Ioc 0 1) (1 : ℝ → ℝ) := by\n aesop\n simp only [mem_Ioc, this, measurableSet_Ioc, aestronglyMeasurable_indicator_iff]\n exact aestronglyMeasurable_one\n · simp only [ite_mul, one_mul, zero_mul]\n intro y hy\n by_cases h : y ≤ 1\n · aesop\n field_simp\n simp only [mem_Ioc, h, and_false, ↓reduceIte, one_div, mul_zero]\n simp only [mem_Ioi] at hy\n apply div_nonneg\n · apply νnonneg; exact rpow_pos_of_pos (div_pos xpos <| mem_Ioi.mp hy) _\n · positivity\n","line":1124,"end_line":1179,"proof_status":"formalized"} {"id":"MellinOfSmooth1a","label":"MellinOfSmooth1a","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1","MellinOfDeltaSpike","MellinConvolutionSymmetric","MellinConvolutionTransform","MellinOf1"],"nlp_text":"Fix \\(\\epsilon {\\gt}0\\). Then the Mellin transform of \\(\\widetilde{1_{\\epsilon }}\\) is \\[ \\mathcal{M}(\\widetilde{1_{\\epsilon }})(s) = \\frac{1}{s}\\left(\\mathcal{M}(\\nu )\\left(\\epsilon s\\right)\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfSmooth1a","latex_link":"sect0003.html#MellinOfSmooth1a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfSmooth1a","lean_decl_name":"MellinOfSmooth1a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOfSmooth1a\")\n (statement := /--\n Fix $\\epsilon>0$. Then the Mellin transform of $\\widetilde{1_{\\epsilon}}$ is\n $$\\mathcal{M}(\\widetilde{1_{\\epsilon}})(s) =\n \\frac{1}{s}\\left(\\mathcal{M}(\\nu)\\left(\\epsilon s\\right)\\right).$$\n -/)\n (proof := /--\n By Definition \\ref{Smooth1},\n $$\n \\mathcal M(\\widetilde{1_\\epsilon})(s)\n =\\mathcal M(1_{(0,1]}\\ast\\nu_\\epsilon)(s)\n .\n $$\n We wish to apply Theorem \\ref{MellinConvolutionTransform}.\n To do so, we must prove that\n $$\n (x,y)\\mapsto 1_{(0,1]}(y)\\nu_\\epsilon(x/y)/y\n $$\n is integrable on $[0,\\infty)^2$.\n It is actually easier to do this for the convolution: $\\nu_\\epsilon\\ast 1_{(0,1]}$, so we use\n Lemma \\ref{MellinConvolutionSymmetric}: for $x\\neq0$,\n $$\n 1_{(0,1]}\\ast\\nu_\\epsilon(x)=\\nu_\\epsilon\\ast 1_{(0,1]}(x)\n .\n $$\n Now, for $x=0$, both sides of the equation are 0, so the equation also holds for $x=0$.\n Therefore,\n $$\n \\mathcal M(\\widetilde{1_\\epsilon})(s)\n =\\mathcal M(\\nu_\\epsilon\\ast 1_{(0,1]})(s)\n .\n $$\n Now,\n $$\n (x,y)\\mapsto \\nu_\\epsilon(y)1_{(0,1]}(x/y)\\frac{x^{s-1}}y\n $$\n has compact support that is bounded away from $y=0$ (specifically\n $y\\in[2^{-\\epsilon},2^\\epsilon]$ and $x\\in(0,y]$), so it is integrable.\n We can thus apply Theorem \\ref{MellinConvolutionTransform} and find\n $$\n \\mathcal M(\\widetilde{1_\\epsilon})(s)\n =\\mathcal M(\\nu_\\epsilon)(s)\\mathcal M(1_{(0,1]})(s)\n .\n $$\n By Lemmas \\ref{MellinOf1} and \\ref{MellinOfDeltaSpike},\n $$\n \\mathcal M(\\widetilde{1_\\epsilon})(s)\n =\\frac1s\\mathcal M(\\nu)(\\epsilon s)\n .\n $$\n -/)\n (latexEnv := \"lemma\")]\nlemma MellinOfSmooth1a {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν)\n (suppν : ν.support ⊆ Icc (1 / 2) 2)\n {ε : ℝ} (εpos : 0 < ε) {s : ℂ} (hs : 0 < s.re) :\n 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) s =\n s⁻¹ * 𝓜 (fun x ↦ (ν x : ℂ)) (ε * s) := by\n let f' : ℝ → ℂ := fun x ↦ DeltaSpike ν ε x\n let f : ℝ → ℂ := fun x ↦ DeltaSpike ν ε x / x\n let g : ℝ → ℂ := fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0\n let F : ℝ × ℝ → ℂ := Function.uncurry fun x y ↦ f y * g (x / y) * (x : ℂ) ^ (s - 1)\n let S := {⟨x, y⟩ : ℝ × ℝ | 0 < x ∧ x ≤ y ∧ 2 ^ (-ε) ≤ y ∧ y ≤ 2 ^ ε}\n let F' : ℝ × ℝ → ℂ := piecewise S (fun ⟨x, y⟩ ↦ f y * (x : ℂ) ^ (s - 1))\n (fun _ ↦ 0)\n let Tx := Ioc 0 ((2 : ℝ) ^ ε)\n let Ty := Icc ((2 : ℝ) ^ (-ε)) ((2 : ℝ) ^ ε)\n\n have Seq : S = (Tx ×ˢ Ty) ∩ {(x, y) : ℝ × ℝ | x ≤ y} := by\n ext ⟨x, y⟩; constructor\n · exact fun h ↦ ⟨⟨⟨h.1, le_trans h.2.1 h.2.2.2⟩, ⟨h.2.2.1, h.2.2.2⟩⟩, h.2.1⟩\n · exact fun h ↦ ⟨h.1.1.1, ⟨h.2, h.1.2.1, h.1.2.2⟩⟩\n have SsubI : S ⊆ Ioi 0 ×ˢ Ioi 0 :=\n fun z hz ↦ ⟨hz.1, lt_of_lt_of_le (by apply rpow_pos_of_pos; norm_num) hz.2.2.1⟩\n have SsubT: S ⊆ Tx ×ˢ Ty := by simp_rw [Seq, inter_subset_left]\n have Smeas : MeasurableSet S := by\n rw [Seq]; apply MeasurableSet.inter ?_ <| measurableSet_le measurable_fst measurable_snd\n simp [measurableSet_prod, Tx, Ty]\n\n have int_F: IntegrableOn F (Ioi 0 ×ˢ Ioi 0) := by\n apply IntegrableOn.congr_fun (f := F') ?_ ?_ (by simp [measurableSet_prod]); swap\n · simp only [F, F', f, g, mul_ite, mul_one, mul_zero]\n intro ⟨x, y⟩ hz\n by_cases hS : ⟨x, y⟩ ∈ S <;> simp only [hS, piecewise]\n <;> simp only [mem_prod, mem_Ioi, mem_setOf_eq, not_and, not_le, S] at hz hS\n · simp [div_pos hz.1 hz.2, (div_le_one hz.2).mpr hS.2.1]\n · by_cases hxy : x / y ≤ 1\n swap\n · simp [hxy]\n have hy : y ∉ Icc (2 ^ (-ε)) (2 ^ ε) := by\n simp only [mem_Icc, not_and, not_le]; exact hS hz.1 <| (div_le_one hz.2).mp hxy\n simp [DeltaSpikeSupport εpos hz.2.le suppν hy]\n · apply Integrable.piecewise Smeas ?_ integrableOn_zero\n simp only [IntegrableOn, Measure.restrict_restrict_of_subset SsubI]\n apply MeasureTheory.Integrable.mono_measure ?_\n · apply MeasureTheory.Measure.restrict_mono' (HasSubset.Subset.eventuallyLE SsubT) le_rfl\n have : volume.restrict (Tx ×ˢ Ty) = (volume.restrict Tx).prod (volume.restrict Ty) := by\n rw [Measure.prod_restrict, MeasureTheory.Measure.volume_eq_prod]\n conv => rw [this]; lhs; intro; rw [mul_comm]\n apply MeasureTheory.Integrable.mul_prod (f := fun x ↦ (x : ℂ) ^ (s - 1))\n (μ := Measure.restrict volume Tx)\n · simp only [Tx]\n rw [← IntegrableOn, integrableOn_Ioc_iff_integrableOn_Ioo,\n intervalIntegral.integrableOn_Ioo_cpow_iff]\n · simp [hs]\n · apply rpow_pos_of_pos (by norm_num)\n · apply (ContinuousOn.div ?_ ?_ ?_).integrableOn_compact isCompact_Icc\n · exact (DeltaSpikeOfRealContinuous εpos diffν).continuousOn\n · exact continuous_ofReal.continuousOn\n · intro x hx; simp only [mem_Icc] at hx; simp only [ofReal_ne_zero]\n linarith [(by apply rpow_pos_of_pos (by norm_num) : (0 : ℝ) < 2 ^ (-ε))]\n\n have : 𝓜 (MellinConvolution g f') s = 𝓜 g s * 𝓜 f' s := by\n rw [mul_comm, ← MellinConvolutionTransform f' g s\n (by convert int_F using 1; simp only [f', F, f]; field_simp)]\n dsimp [mellin]; rw [setIntegral_congr_fun (by simp)]\n intro x hx; simp_rw [MellinConvolutionSymmetric _ _ <| mem_Ioi.mp hx]\n\n convert this using 1\n · congr; funext x; convert integral_ofReal.symm\n simp only [MellinConvolution, RCLike.ofReal_div, ite_mul, one_mul, zero_mul, @apply_ite ℝ ℂ,\n algebraMap.coe_zero, g]; rfl\n · rw [MellinOf1 s hs, MellinOfDeltaSpike ν εpos s]\n simp\n","line":1187,"end_line":1310,"proof_status":"formalized"} {"id":"Smooth1Properties_above","label":"Smooth1Properties_above","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"Fix \\(0{\\lt}\\epsilon {\\lt}1\\). There is an absolute constant \\(c{\\gt}0\\) so that: if \\(x\\geq (1+c\\epsilon )\\), then \\[ \\widetilde{1_{\\epsilon }}(x) = 0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1Properties_above","latex_link":"sect0003.html#Smooth1Properties_above","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1Properties_above","lean_decl_name":"Smooth1Properties_above","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"Smooth1Properties-above\")\n (statement := /--\n Fix $0<\\epsilon<1$. There is an absolute constant $c>0$ so that:\n if $x\\geq (1+c\\epsilon)$, then\n $$\\widetilde{1_{\\epsilon}}(x) = 0.$$\n -/)\n (proof := /--\n Again the Mellin convolution is\n $$\\int_0^1 \\nu_\\epsilon(x/y)\\frac{dy}{y},$$\n but now if $x > 2^\\epsilon$, then the support of $\\nu_\\epsilon$ is disjoint\n from the region of integration, and hence the integral is zero.\n We choose\n $$\n c:=2\\log 2\n .\n $$\n By Lemma \\ref{Smooth1Properties_estimate},\n $$\n c > 2\\frac{1-2^{-\\epsilon}}\\epsilon > 2^\\epsilon\\frac{1-2^{-\\epsilon}}\\epsilon\n =\n \\frac{2^\\epsilon-1}\\epsilon,\n $$\n so\n $$\n 1+c\\epsilon > 2^\\epsilon.\n $$\n -/)\n (latexEnv := \"lemma\")]\nlemma Smooth1Properties_above {ν : ℝ → ℝ} (suppν : ν.support ⊆ Icc (1 / 2) 2) :\n ∃ (c : ℝ), 0 < c ∧ c = 2 * Real.log 2 ∧\n ∀ (ε x) (_ : ε ∈ Ioo 0 1), 1 + c * ε ≤ x → Smooth1 ν ε x = 0 := by\n set c := 2 * Real.log 2; use c\n constructor\n · simp only [c, zero_lt_two, mul_pos_iff_of_pos_left]; exact log_pos (by norm_num)\n constructor\n · rfl\n intro ε x hε hx\n have hx2 := Smooth1Properties_above_aux hx hε\n unfold Smooth1 MellinConvolution\n simp only [ite_mul, one_mul, zero_mul, RCLike.ofReal_real_eq_id, id_eq]\n apply setIntegral_eq_zero_of_forall_eq_zero\n intro y hy\n have ypos := mem_Ioi.mp hy\n by_cases y1 : y ≤ 1\n swap\n · simp [ypos, y1]\n simp only [mem_Ioi.mp hy, y1, and_self, ↓reduceIte, div_eq_zero_iff]; left\n apply DeltaSpikeSupport hε.1 ?_ suppν\n on_goal 1 =>\n simp only [mem_Icc, not_and, not_le]\n on_goal 2 =>\n suffices h : 2 ^ ε < x / y by\n linarith [(by apply rpow_pos_of_pos (by norm_num) : 0 < (2 : ℝ) ^ ε)]\n all_goals\n try intro\n have : x / y = ((x / y) ^ (1 / ε)) ^ ε := by\n rw [← rpow_mul]\n simp only [one_div, inv_mul_cancel₀ (ne_of_gt hε.1), rpow_one]\n apply div_nonneg_iff.mpr; left;\n exact ⟨(le_trans (rpow_pos_of_pos (by norm_num) ε).le) hx2.le, ypos.le⟩\n rw [this]\n refine rpow_lt_rpow (by norm_num) ?_ hε.1\n exact Smooth1Properties_above_aux2 hε ⟨ypos, y1⟩ hx2\n","line":1000,"end_line":1063,"proof_status":"formalized"} {"id":"Smooth1Nonneg","label":"Smooth1Nonneg","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"If \\(\\nu \\) is nonnegative, then \\(\\widetilde{1_{\\epsilon }}(x)\\) is nonnegative.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1Nonneg","latex_link":"sect0003.html#Smooth1Nonneg","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1Nonneg","lean_decl_name":"Smooth1Nonneg","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"Smooth1Nonneg\")\n (statement := /--\n If $\\nu$ is nonnegative, then $\\widetilde{1_{\\epsilon}}(x)$ is nonnegative.\n -/)\n (proof := /--\n By Definitions \\ref{Smooth1}, \\ref{MellinConvolution} and \\ref{DeltaSpike}\n $$\n \\widetilde{1_\\epsilon}(x)\n =\\int_0^\\infty 1_{(0,1]}(y)\\frac1\\epsilon\\nu((x/y)^{\\frac1\\epsilon}) \\frac{dy}y\n $$\n and all the factors in the integrand are nonnegative.\n -/)\n (latexEnv := \"lemma\")]\nlemma Smooth1Nonneg {ν : ℝ → ℝ} (νnonneg : ∀ x > 0, 0 ≤ ν x) {ε x : ℝ}\n (xpos : 0 < x) (εpos : 0 < ε) : 0 ≤ Smooth1 ν ε x := by\n dsimp [Smooth1]\n apply MellinConvNonNeg_of_NonNeg ?_ ?_ xpos\n · intro y hy; by_cases h : y ≤ 1 <;> simp [h, hy]\n · intro y ypos; exact DeltaSpikeNonNeg_of_NonNeg νnonneg ypos εpos\n","line":1087,"end_line":1106,"proof_status":"formalized"} {"id":"Smooth1ContinuousAt","label":"Smooth1ContinuousAt","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1","MellinConvolutionSymmetric"],"nlp_text":"Fix a nonnegative, continuously differentiable function \\(F\\) on \\(\\mathbb {R}\\) with support in \\([1/2,2]\\). Then for any \\(\\epsilon {\\gt}0\\), the function \\(x \\mapsto \\int _{(0,\\infty )} x^{1+it} \\widetilde{1_{\\epsilon }}(x) dx\\) is continuous at any \\(y{\\gt}0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1ContinuousAt","latex_link":"sect0003.html#Smooth1ContinuousAt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Smooth1ContinuousAt","lean_decl_name":"Smooth1ContinuousAt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"Smooth1ContinuousAt\")\n (statement := /--\n Fix a nonnegative, continuously differentiable function $F$ on $\\mathbb{R}$ with support in\n $[1/2,2]$. Then for any $\\epsilon>0$, the function\n $x \\mapsto \\int_{(0,\\infty)} x^{1+it} \\widetilde{1_{\\epsilon}}(x) dx$ is continuous at any $y>0$.\n -/)\n (proof := /--\n Use Lemma \\ref{MellinconvolutionSymmetric} to write $\\widetilde{1_{\\epsilon}}(x)$ as an integral\n over an integral near $1$, in particular avoiding the singularity at $0$. The integrand may be\n bounded by $2^{\\epsilon}\\nu_\\epsilon(t)$ which is independent of $x$ and we can use dominated\n convergence to prove continuity.\n -/)\n (latexEnv := \"lemma\")]\nlemma Smooth1ContinuousAt {SmoothingF : ℝ → ℝ}\n (diffSmoothingF : ContDiff ℝ 1 SmoothingF)\n (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x)\n (suppSmoothingF : SmoothingF.support ⊆ Icc (1 / 2) 2)\n {ε : ℝ} (εpos : 0 < ε) {y : ℝ} (ypos : 0 < y) :\n ContinuousAt (fun x ↦ Smooth1 SmoothingF ε x) y := by\n apply ContinuousAt.congr\n (f := (fun x ↦ MellinConvolution (DeltaSpike SmoothingF ε)\n (fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0) x)) _\n · filter_upwards [lt_mem_nhds ypos] with x hx\n apply MellinConvolutionSymmetric _ _ hx\n apply continuousAt_of_dominated (bound := (fun x ↦ 2 ^ ε * DeltaSpike SmoothingF ε x))\n · filter_upwards [lt_mem_nhds ypos] with x hx\n apply Measurable.aestronglyMeasurable\n apply Measurable.mul\n · apply Measurable.mul\n · exact Continuous.measurable <| DeltaSpikeContinuous εpos diffSmoothingF\n · apply Measurable.ite _ (by fun_prop) (by fun_prop)\n apply MeasurableSet.congr (s := Ici x) (by measurability)\n ext a\n constructor\n · intro ha\n have apos : 0 < a := lt_of_lt_of_le hx ha\n constructor\n · exact div_pos hx apos\n · exact (div_le_one apos).mpr ha\n · intro ha\n have : 0 < a := (div_pos_iff_of_pos_left hx).mp ha.1\n exact (div_le_one this).mp ha.2\n · fun_prop\n · filter_upwards [lt_mem_nhds ypos] with x hx\n filter_upwards [ae_restrict_mem (by measurability)] with t ht\n simp only [mul_ite, mul_one, mul_zero, RCLike.ofReal_real_eq_id, id_eq, norm_div, norm_eq_abs]\n by_cases h : DeltaSpike SmoothingF ε t = 0\n · simp [h]\n push_neg at h\n have := DeltaSpikeSupport' εpos ht.le suppSmoothingF h\n have dsnonneg : 0 ≤ DeltaSpike SmoothingF ε t := by\n apply DeltaSpikeNonNeg_of_NonNeg <;> assumption\n calc\n _ ≤ |DeltaSpike SmoothingF ε t| / |t| := by\n gcongr\n · split_ifs with h\n · apply le_refl\n · exact dsnonneg\n _ ≤ _ := by\n rw [_root_.abs_of_nonneg dsnonneg, mul_comm, div_eq_mul_one_div, _root_.abs_of_pos ht]\n gcongr\n apply (one_div_le ht (by bound)).mpr\n · convert this.1 using 1\n rw [div_eq_iff (by positivity), ← rpow_add (by norm_num), neg_add_cancel, rpow_zero]\n · apply Integrable.const_mul\n apply (integrable_indicator_iff (by measurability)).mp\n apply (integrableOn_iff_integrable_of_support_subset (s := Icc (2 ^ (-ε)) (2 ^ ε)) _).mp\n · apply ContinuousOn.integrableOn_compact isCompact_Icc\n apply ContinuousOn.congr (f := DeltaSpike SmoothingF ε)\n · apply Continuous.continuousOn\n apply DeltaSpikeContinuous<;> assumption\n · intro x hx\n have : x ∈ Ioi 0 := by\n apply mem_Ioi.mpr\n apply lt_of_lt_of_le (by bound) hx.1\n rw [indicator, if_pos this]\n · unfold indicator\n simp_rw [mem_Ioi]\n apply Function.support_subset_iff.mpr\n simp only [ne_eq, ite_eq_right_iff, Classical.not_imp, mem_Icc, and_imp]\n intro x hx\n apply DeltaSpikeSupport' εpos hx.le suppSmoothingF\n · have : ∀ᵐ (a : ℝ) ∂volume.restrict (Ioi 0), a ≠ y := by\n apply ae_iff.mpr\n simp\n filter_upwards [ae_restrict_mem (by measurability), this] with x hx hx2\n simp only [mem_Ioi] at hx\n apply ContinuousAt.div_const\n apply ContinuousAt.mul (by fun_prop)\n have : (fun x_1 ↦ if 0 < x_1 / x ∧ x_1 / x ≤ 1 then 1 else 0) =\n (Ioc 0 x).indicator (fun _ ↦ (1 : ℝ)) := by\n ext t\n unfold indicator\n simp [div_pos_iff_of_pos_right, div_le_one₀, hx]\n rw [this]\n apply ContinuousOn.continuousAt_indicator (by fun_prop)\n simp [frontier_Ioc hx, ypos.ne', hx2.symm]\n","line":1378,"end_line":1475,"proof_status":"formalized"} {"id":"SmoothedChebyshev","label":"SmoothedChebyshev","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1","VerticalIntegral"],"nlp_text":"Fix \\(\\epsilon {\\gt}0\\), and a bumpfunction supported in \\([1/2,2]\\). Then we define the smoothed Chebyshev function \\(\\psi _{\\epsilon }\\) from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {C}\\) by \\[ \\psi _{\\epsilon }(X) = \\frac{1}{2\\pi i}\\int _{(\\sigma )}\\frac{-\\zeta '(s)}{\\zeta (s)} \\mathcal{M}(\\widetilde{1_{\\epsilon }})(s) X^{s}ds, \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshev","latex_link":"sect0003.html#SmoothedChebyshev","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshev","lean_decl_name":"SmoothedChebyshev","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshev\")\n (statement := /--\n Fix $\\epsilon>0$, and a bumpfunction supported in $[1/2,2]$. Then we define the smoothed\n Chebyshev function $\\psi_{\\epsilon}$ from $\\mathbb{R}_{>0}$ to $\\mathbb{C}$ by\n $$\\psi_{\\epsilon}(X) = \\frac{1}{2\\pi i}\\int_{(\\sigma)}\\frac{-\\zeta'(s)}{\\zeta(s)}\n \\mathcal{M}(\\widetilde{1_{\\epsilon}})(s)\n X^{s}ds,$$\n where we'll take $\\sigma = 1 + 1 / \\log X$.\n -/)]\nnoncomputable def SmoothedChebyshev (SmoothingF : ℝ → ℝ) (ε : ℝ) (X : ℝ) : ℂ :=\n VerticalIntegral' (SmoothedChebyshevIntegrand SmoothingF ε X) ((1 : ℝ) + (Real.log X)⁻¹)\n","line":86,"end_line":97,"proof_status":"formalized"} {"id":"I5New","label":"I5New","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"Let \\[ I_5(\\nu ,\\varepsilon ,X,T)=\\frac{1}{2\\pi i}\\int _T^\\infty \\left(-\\frac{\\zeta '}{\\zeta }(\\sigma +it)\\right)\\, \\mathcal{M}(\\tilde{1}_\\varepsilon )(\\sigma +it)\\, X^{\\sigma +it}\\, dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I5New","latex_link":"sect0004.html#I5New","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I5New","lean_decl_name":"I5New","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I5New\")\n (statement := /--\n Let\n $$I_5(\\nu,\\varepsilon,X,T)=\\frac{1}{2\\pi i}\\int_T^\\infty\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma+it)\\,X^{\\sigma+it}\\,dt.$$\n -/)]\nnoncomputable def I5New (SmoothingF : ℝ → ℝ) (ε X T : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t : ℝ in Ici T,\n SmoothedChebyshevIntegrand SmoothingF ε X ((1 + (Real.log X)⁻¹) + t * I)))\n","line":1093,"end_line":1101,"proof_status":"formalized"} {"id":"I37","label":"I37","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_{37}(\\nu , \\epsilon , X, T, \\sigma _1) := \\frac{1}{2\\pi i} \\int _{-T}^{T} \\left( \\frac{-\\zeta '}\\zeta (\\sigma _1 + t i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma _1 + t i) X^{\\sigma _1 + t i} \\ i \\ dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₃₇","latex_link":"sect0003.html#I37","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₃₇","lean_decl_name":"I₃₇","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I37\"\n (title := \"I₃₇\")\n (statement := /--\n $$\n I_{37}(\\nu, \\epsilon, X, T, \\sigma_1) := \\frac{1}{2\\pi i} \\int_{-T}^{T}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma_1 + t i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_1 + t i)\n X^{\\sigma_1 + t i} \\ i \\ dt\n $$\n -/)]\nnoncomputable def I₃₇ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t in (-T)..T,\n SmoothedChebyshevIntegrand SmoothingF ε X (σ₁ + t * I)))","line":873,"end_line":888,"proof_status":"formalized"} {"id":"I3","label":"I3","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_3(\\nu , \\epsilon , X, T, \\sigma _1) := \\frac{1}{2\\pi i} \\int _{-T}^{-3} \\left( \\frac{-\\zeta '}\\zeta (\\sigma _1 + t i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma _1 + t i) X^{\\sigma _1 + t i} \\ i \\ dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₃","latex_link":"sect0003.html#I3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₃","lean_decl_name":"I₃","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I3\"\n (title := \"I₃\")\n (statement := /--\n $$\n I_3(\\nu, \\epsilon, X, T, \\sigma_1) := \\frac{1}{2\\pi i} \\int_{-T}^{-3}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma_1 + t i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_1 + t i)\n X^{\\sigma_1 + t i} \\ i \\ dt\n $$\n -/)]\nnoncomputable def I₃ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t in (-T)..(-3),\n SmoothedChebyshevIntegrand SmoothingF ε X (σ₁ + t * I)))","line":927,"end_line":942,"proof_status":"formalized"} {"id":"I1New","label":"I1New","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"Let \\[ I_1(\\nu ,\\varepsilon ,X,T)=\\frac{1}{2\\pi i}\\int _{-\\infty }^{-T}\\left(-\\frac{\\zeta '}{\\zeta }(\\sigma +it)\\right)\\, \\mathcal{M}(\\tilde{1}_\\varepsilon )(\\sigma +it)\\, X^{\\sigma +it}\\, dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I1New","latex_link":"sect0004.html#I1New","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I1New","lean_decl_name":"I1New","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I1New\")\n (statement := /--\n Let\n $$I_1(\\nu,\\varepsilon,X,T)=\\frac{1}{2\\pi i}\\int_{-\\infty}^{-T}\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma+it)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma+it)\\,X^{\\sigma+it}\\,dt.$$\n -/)]\nnoncomputable def I1New (SmoothingF : ℝ → ℝ) (ε X T : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t : ℝ in Iic (-T),\n SmoothedChebyshevIntegrand SmoothingF ε X ((1 + (Real.log X)⁻¹) + t * I)))\n","line":1081,"end_line":1089,"proof_status":"formalized"} {"id":"I4","label":"I4","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_4(\\nu , \\epsilon , X, \\sigma _1, \\sigma _2) := \\frac{1}{2\\pi i} \\int _{\\sigma _2}^{\\sigma _1} \\left( \\frac{-\\zeta '}\\zeta (\\sigma - 3 i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma - 3 i) X^{\\sigma - 3 i} \\ d\\sigma \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₄","latex_link":"sect0003.html#I4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₄","lean_decl_name":"I₄","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I4\"\n (title := \"I₄\")\n (statement := /--\n $$\n I_4(\\nu, \\epsilon, X, \\sigma_1, \\sigma_2) := \\frac{1}{2\\pi i} \\int_{\\sigma_2}^{\\sigma_1}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma - 3 i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma - 3 i)\n X^{\\sigma - 3 i} \\ d\\sigma\n $$\n -/)]\nnoncomputable def I₄ (SmoothingF : ℝ → ℝ) (ε X σ₁ σ₂ : ℝ) : ℂ :=\n (1 / (2 * π * I)) * ((∫ σ in σ₂..σ₁,\n SmoothedChebyshevIntegrand SmoothingF ε X (σ - 3 * I)))","line":965,"end_line":980,"proof_status":"formalized"} {"id":"I8","label":"I8","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_8(\\nu , \\epsilon , X, T, \\sigma _1) := \\frac{1}{2\\pi i} \\int _{\\sigma _1}^{\\sigma _0} \\left( \\frac{-\\zeta '}\\zeta (\\sigma + T i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma + T i) X^{\\sigma + T i} \\ d\\sigma \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₈","latex_link":"sect0003.html#I8","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₈","lean_decl_name":"I₈","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I8\"\n (title := \"I₈\")\n (statement := /--\n $$\n I_8(\\nu, \\epsilon, X, T, \\sigma_1) := \\frac{1}{2\\pi i} \\int_{\\sigma_1}^{\\sigma_0}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma + T i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma + T i)\n X^{\\sigma + T i} \\ d\\sigma\n $$\n -/)]\nnoncomputable def I₈ (SmoothingF : ℝ → ℝ) (ε T X σ₁ : ℝ) : ℂ :=\n (1 / (2 * π * I)) * ((∫ σ in σ₁..(1 + (Real.log X)⁻¹),\n SmoothedChebyshevIntegrand SmoothingF ε X (σ + T * I)))","line":891,"end_line":906,"proof_status":"formalized"} {"id":"I3New","label":"I3New","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"Let \\[ I_3(\\nu ,\\varepsilon ,X,T)=\\frac{1}{2\\pi i}\\int _{-T}^T\\left(-\\frac{\\zeta '}{\\zeta }(\\sigma '+it)\\right)\\, \\mathcal{M}(\\tilde{1}_\\varepsilon )(\\sigma '+it)\\, X^{\\sigma '+it}\\, dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I3New","latex_link":"sect0004.html#I3New","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I3New","lean_decl_name":"I3New","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I3New\")\n (statement := /--\n Let\n $$I_3(\\nu,\\varepsilon,X,T)=\\frac{1}{2\\pi i}\\int_{-T}^T\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma'+it)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma'+it)\\,X^{\\sigma'+it}\\,dt.$$\n -/)]\nnoncomputable def I3New (SmoothingF : ℝ → ℝ) (ε T X σ' : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t in (-T)..T,\n SmoothedChebyshevIntegrand SmoothingF ε X (σ' + t * I)))\n","line":1257,"end_line":1265,"proof_status":"formalized"} {"id":"I4New","label":"I4New","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"Let \\[ I_4(\\nu ,\\varepsilon ,X,T)=\\frac{1}{2\\pi i}\\int _{\\sigma '}^\\sigma \\left(-\\frac{\\zeta '}{\\zeta }(\\sigma _0+iT)\\right)\\, \\mathcal{M}(\\tilde{1}_\\varepsilon )(\\sigma _0+iT)\\, X^{\\sigma _0+iT}\\, d\\sigma _0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I4New","latex_link":"sect0004.html#I4New","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I4New","lean_decl_name":"I4New","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I4New\")\n (statement := /--\n Let\n $$I_4(\\nu,\\varepsilon,X,T)=\\frac{1}{2\\pi i}\\int_{\\sigma'}^\\sigma\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma_0+iT)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma_0+iT)\\,X^{\\sigma_0+iT}\\,d\\sigma_0.$$\n -/)]\nnoncomputable def I4New (SmoothingF : ℝ → ℝ) (ε T X σ' : ℝ) : ℂ :=\n (1 / (2 * π * I)) * ((∫ σ₀ in σ'..(1 + (Real.log X)⁻¹),\n SmoothedChebyshevIntegrand SmoothingF ε X (σ₀ + T * I)))\n","line":1180,"end_line":1188,"proof_status":"formalized"} {"id":"I9","label":"I9","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1"],"nlp_text":"\\[ I_9(\\nu , \\epsilon , X, T) := \\frac{1}{2\\pi i} \\int _{T}^{\\infty } \\left( \\frac{-\\zeta '}\\zeta (\\sigma _0 + t i) \\right) \\mathcal M(\\widetilde1_\\epsilon )(\\sigma _0 + t i) X^{\\sigma _0 + t i} \\ i \\ dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₉","latex_link":"sect0003.html#I9","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I₉","lean_decl_name":"I₉","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n \"I9\"\n (title := \"I₉\")\n (statement := /--\n $$\n I_9(\\nu, \\epsilon, X, T) := \\frac{1}{2\\pi i} \\int_{T}^{\\infty}\n \\left(\n \\frac{-\\zeta'}\\zeta(\\sigma_0 + t i)\n \\right)\n \\mathcal M(\\widetilde 1_\\epsilon)(\\sigma_0 + t i)\n X^{\\sigma_0 + t i} \\ i \\ dt\n $$\n -/)]\nnoncomputable def I₉ (SmoothingF : ℝ → ℝ) (ε X T : ℝ) : ℂ :=\n (1 / (2 * π * I)) * (I * (∫ t : ℝ in Ici T,\n SmoothedChebyshevIntegrand SmoothingF ε X ((1 + (Real.log X)⁻¹) + t * I)))","line":909,"end_line":924,"proof_status":"formalized"} {"id":"MellinOfDeltaSpikeAt1","label":"MellinOfDeltaSpikeAt1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinOfDeltaSpike"],"nlp_text":"For any \\(\\epsilon {\\gt}0\\), we have \\[ \\mathcal{M}(\\nu _\\epsilon )(1) = \\mathcal{M}(\\nu )(\\epsilon ). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfDeltaSpikeAt1","latex_link":"sect0003.html#MellinOfDeltaSpikeAt1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfDeltaSpikeAt1","lean_decl_name":"MellinOfDeltaSpikeAt1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOfDeltaSpikeAt1\")\n (statement := /--\n For any $\\epsilon>0$, we have\n $$\\mathcal{M}(\\nu_\\epsilon)(1) =\n \\mathcal{M}(\\nu)(\\epsilon).$$\n -/)\n (proof := /-- This is immediate from the above theorem. -/)\n (latexEnv := \"corollary\")]\nlemma MellinOfDeltaSpikeAt1 (ν : ℝ → ℝ) {ε : ℝ} (εpos : ε > 0) :\n 𝓜 (fun x ↦ (DeltaSpike ν ε x : ℂ)) 1 = 𝓜 (fun x ↦ (ν x : ℂ)) ε := by\n convert MellinOfDeltaSpike ν εpos 1; simp [mul_one]\n","line":682,"end_line":693,"proof_status":"formalized"} {"id":"SmoothedChebyshevDirichlet_aux_integrable","label":"SmoothedChebyshevDirichlet_aux_integrable","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1LeOne","MellinOfSmooth1b","Smooth1Properties_above","Smooth1Nonneg","Smooth1ContinuousAt"],"nlp_text":"Fix a nonnegative, continuously differentiable function \\(F\\) on \\(\\mathbb {R}\\) with support in \\([1/2,2]\\), and total mass one, \\(\\int _{(0,\\infty )} F(x)/x dx = 1\\). Then for any \\(\\epsilon {\\gt}0\\), and \\(\\sigma \\in (1, 2]\\), the function \\[ x \\mapsto \\mathcal{M}(\\widetilde{1_{\\epsilon }})(\\sigma + ix) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevDirichlet_aux_integrable","latex_link":"sect0003.html#SmoothedChebyshevDirichlet_aux_integrable","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevDirichlet_aux_integrable","lean_decl_name":"SmoothedChebyshevDirichlet_aux_integrable","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevDirichlet-aux-integrable\")\n (statement := /--\n Fix a nonnegative, continuously differentiable function $F$ on $\\mathbb{R}$ with support in\n $[1/2,2]$, and total mass one, $\\int_{(0,\\infty)} F(x)/x dx = 1$. Then for any $\\epsilon>0$,\n and $\\sigma\\in (1, 2]$, the function\n $$\n x \\mapsto\\mathcal{M}(\\widetilde{1_{\\epsilon}})(\\sigma + ix)\n $$\n is integrable on $\\mathbb{R}$.\n -/)\n (proof := /--\n By Lemma \\ref{MellinOfSmooth1b} the integrand is $O(1/t^2)$ as $t\\rightarrow \\infty$ and hence\n the function is integrable.\n -/)\n (latexEnv := \"lemma\")]\nlemma SmoothedChebyshevDirichlet_aux_integrable {SmoothingF : ℝ → ℝ}\n (diffSmoothingF : ContDiff ℝ 1 SmoothingF)\n (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x)\n (suppSmoothingF : support SmoothingF ⊆ Icc (1 / 2) 2)\n (mass_one : ∫ (x : ℝ) in Ioi 0, SmoothingF x / x = 1)\n {ε : ℝ} (εpos : 0 < ε) (ε_lt_one : ε < 1) {σ : ℝ} (σ_gt : 1 < σ) (σ_le : σ ≤ 2) :\n MeasureTheory.Integrable\n (fun (y : ℝ) ↦ 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (σ + y * I)) := by\n obtain ⟨c, cpos, hc⟩ := MellinOfSmooth1b diffSmoothingF suppSmoothingF\n apply Integrable.mono' (g := (fun t ↦ c / ε * 1 / (1 + t ^ 2)))\n · apply Integrable.const_mul integrable_inv_one_add_sq\n · apply Continuous.aestronglyMeasurable\n apply continuous_iff_continuousAt.mpr\n intro x\n have := Smooth1MellinDifferentiable diffSmoothingF suppSmoothingF ⟨εpos, ε_lt_one⟩\n SmoothingFpos mass_one (s := σ + x * I) (by simp only [add_re, ofReal_re, mul_re, I_re,\n mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero]; linarith) |>.continuousAt\n fun_prop\n · filter_upwards [] with t\n calc\n _≤ c / ε * 1 / (σ^2 + t^2) := by\n convert hc (σ / 2) (by linarith) (σ + t * I) (by simp only [add_re, ofReal_re, mul_re,\n I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self, add_zero, half_le_self_iff]; linarith)\n (by simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one,\n sub_self, add_zero]; linarith) ε εpos ε_lt_one using 1\n simp only [mul_one, Complex.sq_norm, normSq_apply, add_re, ofReal_re, mul_re, I_re,\n mul_zero, ofReal_im, I_im, sub_self, add_zero, add_im, mul_im, zero_add, mul_inv_rev]\n ring_nf\n _ ≤ _ := by\n gcongr; nlinarith\n","line":129,"end_line":174,"proof_status":"formalized"} {"id":"SmoothedChebyshevPull1_aux_integrable","label":"SmoothedChebyshevPull1_aux_integrable","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["SmoothedChebyshevDirichlet_aux_integrable","dlog_riemannZeta_bdd_on_vertical_lines"],"nlp_text":"The integrand \\[ \\zeta '(s)/\\zeta (s)\\mathcal{M}(\\widetilde{1_{\\epsilon }})(s)X^{s} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull1_aux_integrable","latex_link":"sect0003.html#SmoothedChebyshevPull1_aux_integrable","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevPull1_aux_integrable","lean_decl_name":"SmoothedChebyshevPull1_aux_integrable","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevPull1-aux-integrable\")\n (statement := /--\n The integrand $$\\zeta'(s)/\\zeta(s)\\mathcal{M}(\\widetilde{1_{\\epsilon}})(s)X^{s}$$\n is integrable on the contour $\\sigma_0 + t i$ for $t \\in \\R$ and $\\sigma_0 > 1$.\n -/)\n (proof := /--\n The $\\zeta'(s)/\\zeta(s)$ term is bounded, as is $X^s$, and the smoothing function\n $\\mathcal{M}(\\widetilde{1_{\\epsilon}})(s)$\n decays like $1/|s|^2$ by Theorem \\ref{MellinOfSmooth1b}.\n Actually, we already know that\n $\\mathcal{M}(\\widetilde{1_{\\epsilon}})(s)$\n is integrable from Theorem \\ref{SmoothedChebyshevDirichlet_aux_integrable},\n so we should just need to bound the rest.\n -/)\n (latexEnv := \"lemma\")]\ntheorem SmoothedChebyshevPull1_aux_integrable {SmoothingF : ℝ → ℝ} {ε : ℝ} (ε_pos : 0 < ε)\n (ε_lt_one : ε < 1)\n {X : ℝ} (X_gt : 3 < X)\n {σ₀ : ℝ} (σ₀_gt : 1 < σ₀) (σ₀_le_2 : σ₀ ≤ 2)\n (suppSmoothingF : support SmoothingF ⊆ Icc (1 / 2) 2)\n (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x)\n (mass_one : ∫ (x : ℝ) in Ioi 0, SmoothingF x / x = 1)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF)\n :\n Integrable (fun (t : ℝ) ↦\n SmoothedChebyshevIntegrand SmoothingF ε X (σ₀ + (t : ℂ) * I)) volume := by\n obtain ⟨C, C_pos, hC⟩ := dlog_riemannZeta_bdd_on_vertical_lines σ₀_gt\n let c : ℝ := C * X ^ σ₀\n have : ∀ t, ‖(fun (t : ℝ) ↦ (- deriv riemannZeta (σ₀ + (t : ℂ) * I)) /\n riemannZeta (σ₀ + (t : ℂ) * I) *\n (X : ℂ) ^ (σ₀ + (t : ℂ) * I)) t‖ ≤ c := by\n intro t\n simp only [Complex.norm_mul, c]\n gcongr\n · convert hC t using 1\n simp\n · rw [Complex.norm_cpow_eq_rpow_re_of_nonneg]\n · simp\n · linarith\n · simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n add_zero, ne_eq]\n linarith\n convert (SmoothedChebyshevDirichlet_aux_integrable ContDiffSmoothingF SmoothingFnonneg\n suppSmoothingF mass_one ε_pos ε_lt_one σ₀_gt σ₀_le_2).bdd_mul\n (c := c) ?_ (ae_of_all _ this) using 2\n · unfold SmoothedChebyshevIntegrand\n ring\n · apply Continuous.aestronglyMeasurable\n rw [← continuousOn_univ]\n intro t _\n let s := σ₀ + (t : ℂ) * I\n have s_ne_one : s ≠ 1 := by\n intro h\n -- If σ₀ + t * I = 1, then taking real parts gives σ₀ = 1\n have : σ₀ = 1 := by\n have := congr_arg Complex.re h\n simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one,\n sub_self, add_zero, one_re, s] at this\n exact this\n -- But this contradicts 1 < σ₀\n linarith [σ₀_gt]\n apply ContinuousAt.continuousWithinAt\n apply ContinuousAt.mul\n · have diffζ := differentiableAt_riemannZeta s_ne_one\n apply ContinuousAt.div\n · apply ContinuousAt.neg\n have : DifferentiableAt ℂ (fun s ↦ deriv riemannZeta s) s :=\n differentiableAt_deriv_riemannZeta s_ne_one\n convert realDiff_of_complexDiff (s := σ₀ + (t : ℂ) * I) this <;> simp\n · convert realDiff_of_complexDiff (s := σ₀ + (t : ℂ) * I) diffζ <;> simp\n · apply riemannZeta_ne_zero_of_one_lt_re\n simp [σ₀_gt]\n · apply ContinuousAt.comp _ (by fun_prop)\n apply continuousAt_const_cpow\n norm_cast\n linarith\n","line":1063,"end_line":1139,"proof_status":"formalized"} {"id":"SmoothedChebyshevDirichlet_aux_tsum_integral","label":"SmoothedChebyshevDirichlet_aux_tsum_integral","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["SmoothedChebyshevDirichlet_aux_integrable"],"nlp_text":"Fix a nonnegative, continuously differentiable function \\(F\\) on \\(\\mathbb {R}\\) with support in \\([1/2,2]\\), and total mass one, \\(\\int _{(0,\\infty )} F(x)/x dx = 1\\). Then for any \\(\\epsilon {\\gt}0\\) and \\(\\sigma \\in (1,2]\\), the function \\(x \\mapsto \\sum _{n=1}^\\infty \\frac{\\Lambda (n)}{n^{\\sigma +it}} \\mathcal{M}(\\widetilde{1_{\\epsilon }})(\\sigma +it) x^{\\sigma +it}\\) is equal to \\(\\sum _{n=1}^\\infty \\int _{(0,\\infty )} \\frac{\\Lambda (n)}{n^{\\sigma +it}} \\mathcal{M}(\\widetilde{1_{\\epsilon }})(\\sigma +it) x^{\\sigma +it}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevDirichlet_aux_tsum_integral","latex_link":"sect0003.html#SmoothedChebyshevDirichlet_aux_tsum_integral","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevDirichlet_aux_tsum_integral","lean_decl_name":"SmoothedChebyshevDirichlet_aux_tsum_integral","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevDirichlet-aux-tsum-integral\")\n (statement := /--\n Fix a nonnegative, continuously differentiable function $F$ on $\\mathbb{R}$ with support in\n $[1/2,2]$, and total mass one, $\\int_{(0,\\infty)} F(x)/x dx = 1$. Then for any $\\epsilon>0$ and\n $\\sigma\\in(1,2]$, the function\n $x \\mapsto \\sum_{n=1}^\\infty \\frac{\\Lambda(n)}{n^{\\sigma+it}}\n \\mathcal{M}(\\widetilde{1_{\\epsilon}})(\\sigma+it) x^{\\sigma+it}$ is equal to\n $\\sum_{n=1}^\\infty \\int_{(0,\\infty)} \\frac{\\Lambda(n)}{n^{\\sigma+it}}\n \\mathcal{M}(\\widetilde{1_{\\epsilon}})(\\sigma+it) x^{\\sigma+it}$.\n -/)\n (proof := /-- Interchange of summation and integration. -/)\n (latexEnv := \"lemma\")]\nlemma SmoothedChebyshevDirichlet_aux_tsum_integral {SmoothingF : ℝ → ℝ}\n (diffSmoothingF : ContDiff ℝ 1 SmoothingF)\n (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x)\n (suppSmoothingF : support SmoothingF ⊆ Icc (1 / 2) 2)\n (mass_one : ∫ (x : ℝ) in Ioi 0, SmoothingF x / x = 1) {X : ℝ}\n (X_pos : 0 < X) {ε : ℝ} (εpos : 0 < ε)\n (ε_lt_one : ε < 1) {σ : ℝ} (σ_gt : 1 < σ) (σ_le : σ ≤ 2) :\n ∫ (t : ℝ),\n ∑' (n : ℕ), (ArithmeticFunction.vonMangoldt n) / (n : ℂ) ^ (σ + t * I) *\n 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + t * I) * (X : ℂ) ^ (σ + t * I) =\n ∑' (n : ℕ),\n ∫ (t : ℝ), (ArithmeticFunction.vonMangoldt n) / (n : ℂ) ^ (σ + ↑t * I) *\n 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * (X : ℂ) ^ (σ + t * I) := by\n\n have cont_mellin_smooth : Continuous fun (a : ℝ) ↦\n 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (σ + ↑a * I) := by\n rw [← continuousOn_univ]\n refine ContinuousOn.comp' ?_ ?_ ?_ (t := {z : ℂ | 0 < z.re })\n · refine continuousOn_of_forall_continuousAt ?_\n intro z hz\n exact (Smooth1MellinDifferentiable diffSmoothingF suppSmoothingF ⟨εpos, ε_lt_one⟩\n SmoothingFpos mass_one hz).continuousAt\n · fun_prop\n · simp only [mapsTo_univ_iff, mem_setOf_eq, add_re, ofReal_re, mul_re, I_re, mul_zero,\n ofReal_im, I_im, mul_one, sub_self, add_zero, forall_const]; linarith\n\n have abs_two : ∀ a : ℝ, ∀ i : ℕ, ‖(i : ℂ) ^ ((σ : ℂ) + ↑a * I)‖₊ = i ^ σ := by\n intro a i\n simp_rw [← norm_toNNReal]\n rw [norm_natCast_cpow_of_re_ne_zero _ (by simp only [add_re, ofReal_re, mul_re, I_re, mul_zero,\n ofReal_im, I_im, mul_one, sub_self, add_zero, ne_eq]; linarith)]\n simp only [add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one, sub_self,\n add_zero, Real.toNNReal_of_nonneg <| rpow_nonneg (y := σ) (x := i) (by linarith)]\n norm_cast\n\n rw [MeasureTheory.integral_tsum]\n · have x_neq_zero : X ≠ 0 := by linarith\n intro i\n by_cases i_eq_zero : i = 0\n · simpa [i_eq_zero] using aestronglyMeasurable_const\n · apply Continuous.aestronglyMeasurable\n fun_prop (disch := simp[i_eq_zero, x_neq_zero])\n · rw [← lt_top_iff_ne_top]\n simp_rw [enorm_mul, enorm_eq_nnnorm, nnnorm_div, ← norm_toNNReal,\n Complex.norm_cpow_eq_rpow_re_of_pos X_pos, norm_toNNReal, abs_two]\n simp only [nnnorm_real, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im, I_im, mul_one,\n sub_self, add_zero]\n simp_rw [MeasureTheory.lintegral_mul_const' (r := ↑(X ^ σ).toNNReal) (hr := by simp),\n ENNReal.tsum_mul_right]\n apply WithTop.mul_lt_top ?_ ENNReal.coe_lt_top\n\n conv =>\n arg 1\n arg 1\n intro i\n rw [MeasureTheory.lintegral_const_mul' (hr := by simp)]\n\n rw [ENNReal.tsum_mul_right]\n apply WithTop.mul_lt_top\n · rw [WithTop.lt_top_iff_ne_top, ENNReal.tsum_coe_ne_top_iff_summable_coe]\n push_cast\n convert (ArithmeticFunction.LSeriesSummable_vonMangoldt (s := σ)\n (by simp only [ofReal_re]; linarith)).norm\n rw [LSeries.term_def]\n split_ifs with h <;> simp[h]\n · simp_rw [← enorm_eq_nnnorm]\n rw [← MeasureTheory.hasFiniteIntegral_iff_enorm]\n exact SmoothedChebyshevDirichlet_aux_integrable diffSmoothingF SmoothingFpos suppSmoothingF\n mass_one εpos ε_lt_one σ_gt σ_le |>.hasFiniteIntegral\n","line":183,"end_line":264,"proof_status":"formalized"} {"id":"MellinOfSmooth1c","label":"MellinOfSmooth1c","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinOfSmooth1a","MellinOfDeltaSpikeAt1_asymp"],"nlp_text":"At \\(s=1\\), we have \\[ \\mathcal{M}(\\widetilde{1_{\\epsilon }})(1) = 1+O(\\epsilon )). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfSmooth1c","latex_link":"sect0003.html#MellinOfSmooth1c","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfSmooth1c","lean_decl_name":"MellinOfSmooth1c","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOfSmooth1c\")\n (statement := /--\n At $s=1$, we have\n $$\\mathcal{M}(\\widetilde{1_{\\epsilon}})(1) = 1+O(\\epsilon)).$$\n -/)\n (proof := /--\n Follows from Lemmas \\ref{MellinOfSmooth1a}, \\ref{MellinOfDeltaSpikeAt1} and\n \\ref{MellinOfDeltaSpikeAt1_asymp}.\n -/)\n (latexEnv := \"lemma\")]\nlemma MellinOfSmooth1c {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν)\n (suppν : ν.support ⊆ Icc (1 / 2) 2)\n (mass_one : ∫ x in Ioi 0, ν x / x = 1) :\n (fun ε ↦ 𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) 1 - 1) =O[𝓝[>]0] id := by\n have h := MellinOfDeltaSpikeAt1_asymp diffν suppν mass_one\n rw [Asymptotics.isBigO_iff] at h ⊢\n obtain ⟨c, hc⟩ := h\n use c\n filter_upwards [hc, Ioo_mem_nhdsGT (by linarith : (0 : ℝ) < 1)] with ε hε hε'\n rw [MellinOfSmooth1a diffν suppν hε'.1 (s := 1) (by norm_num)]\n simp only [inv_one, mul_one, one_mul, id_eq, Real.norm_eq_abs]\n exact hε\n","line":1352,"end_line":1374,"proof_status":"formalized"} {"id":"MellinOfSmooth1b","label":"MellinOfSmooth1b","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinOfSmooth1a","MellinOfPsi"],"nlp_text":"Given \\(0{\\lt}\\sigma _1\\le \\sigma _2\\), for any \\(s\\) such that \\(\\sigma _1\\le \\mathcal Re(s)\\le \\sigma _2\\), we have \\[ \\mathcal{M}(\\widetilde{1_{\\epsilon }})(s) = O\\left(\\frac{1}{\\epsilon |s|^2}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfSmooth1b","latex_link":"sect0003.html#MellinOfSmooth1b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfSmooth1b","lean_decl_name":"MellinOfSmooth1b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOfSmooth1b\")\n (statement := /--\n Given $0<\\sigma_1\\le\\sigma_2$, for any $s$ such that $\\sigma_1\\le\\mathcal Re(s)\\le\\sigma_2$,\n we have\n $$\\mathcal{M}(\\widetilde{1_{\\epsilon}})(s) = O\\left(\\frac{1}{\\epsilon|s|^2}\\right).$$\n -/)\n (proof := /-- Use Lemma \\ref{MellinOfSmooth1a} and the bound in Lemma \\ref{MellinOfPsi}. -/)\n (latexEnv := \"lemma\")]\nlemma MellinOfSmooth1b {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν)\n (suppν : ν.support ⊆ Set.Icc (1 / 2) 2) :\n ∃ (C : ℝ) (_ : 0 < C), ∀ (σ₁ : ℝ) (_ : 0 < σ₁)\n (s) (_ : σ₁ ≤ s.re) (_ : s.re ≤ 2) (ε : ℝ) (_ : 0 < ε) (_ : ε < 1),\n ‖𝓜 (fun x ↦ (Smooth1 ν ε x : ℂ)) s‖ ≤ C * (ε * ‖s‖ ^ 2)⁻¹ := by\n obtain ⟨C, Cpos, hC⟩ := MellinOfPsi diffν suppν\n refine ⟨C, Cpos, ?_⟩\n intro σ₁ σ₁pos s hs1 hs2 ε εpos ε_lt_one\n rw [MellinOfSmooth1a diffν suppν εpos <| lt_of_le_of_lt' hs1 σ₁pos]\n have hh1 : ε * σ₁ ≤ (ε * s).re := by\n simp only [mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero]\n nlinarith\n have hh2 : (ε * s).re ≤ 2 := by\n simp only [mul_re, ofReal_re, ofReal_im, zero_mul, sub_zero]\n nlinarith\n calc\n ‖s⁻¹ * 𝓜 (fun x ↦ (ν x : ℂ)) (ε * s)‖ =\n ‖s⁻¹‖ * ‖𝓜 (fun x ↦ (ν x : ℂ)) (ε * s)‖ := by simp\n _ ≤ ‖s⁻¹‖ * (C * (ε * ‖s‖)⁻¹) := by\n gcongr\n convert hC (ε * σ₁) (by positivity) (ε * s) hh1 hh2\n simp [abs_eq_self.mpr εpos.le]\n _ = C * (ε * ‖s‖ ^ 2)⁻¹ := by\n simp only [norm_inv, mul_inv_rev]\n ring\n","line":1314,"end_line":1347,"proof_status":"formalized"} {"id":"I4Bound","label":"I4Bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinOfSmooth1b","I4"],"nlp_text":"We have that \\[ \\left|I_{4}(\\nu , \\epsilon , X, \\sigma _1, \\sigma _2)\\right| \\ll \\frac{X}{\\epsilon }\\, X^{-\\frac{A}{(\\log T)^9}} . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I4Bound","latex_link":"sect0003.html#I4Bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I4Bound","lean_decl_name":"I4Bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":" rwa [I7I3 (by linarith), norm_conj]\n\n\n\n\n\n\n@[blueprint\n (title := \"I4Bound\")\n (statement := /--\n We have that\n $$\n \\left|I_{4}(\\nu, \\epsilon, X, \\sigma_1, \\sigma_2)\\right| \\ll \\frac{X}{\\epsilon}\\,\n X^{-\\frac{A}{(\\log T)^9}}\n .\n $$\n Same with $I_6$.\n -/)\n (proof := /--\n The analysis of $I_4$ is similar to that of $I_2$, (in Lemma \\ref{I2Bound}) but even easier.\n Let $C$ be the sup of $-\\zeta'/\\zeta$ on the curve $\\sigma_2 + 3 i$ to $1+ 3i$ (this curve is compact, and away from the pole at $s=1$).\n Apply Theorem \\ref{MellinOfSmooth1b} to get the bound $1/(\\epsilon |s|^2)$, which is bounded by $C'/\\epsilon$.\n And $X^s$ is bounded by $X^{\\sigma_1} = X \\cdot X^{-A/ \\log T^9}$.\n Putting these together gives the result.\n -/)\n (latexEnv := \"lemma\")]\nlemma I4Bound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF)\n {σ₂ : ℝ} (h_logDeriv_holo : LogDerivZetaIsHoloSmall σ₂) (hσ₂ : σ₂ ∈ Ioo 0 1)\n {A : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) :\n ∃ (C : ℝ) (_ : 0 ≤ C) (Tlb : ℝ) (_ : 3 < Tlb),\n ∀ (X : ℝ) (_ : 3 < X)\n {ε : ℝ} (_ : 0 < ε) (_ : ε < 1)\n {T : ℝ} (_ : Tlb < T),\n let σ₁ : ℝ := 1 - A / (Real.log T) ^ 9\n ‖I₄ SmoothingF ε X σ₁ σ₂‖ ≤ C * X * X ^ (- A / (Real.log T ^ 9)) / ε := by\n\n have reOne : re 1 = 1 := by exact rfl\n have imOne : im 1 = 0 := by exact rfl\n have reThree : re 3 = 3 := by exact rfl\n have imThree : im 3 = 0 := by exact rfl\n\n unfold I₄ SmoothedChebyshevIntegrand\n\n let S : Set ℝ := (fun (t : ℝ) ↦ ↑‖-ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)‖₊) '' Icc 0 1\n let C' : ℝ := sSup S\n have bddAboveS : BddAbove S := by\n refine IsCompact.bddAbove ?_\n unfold S\n refine IsCompact.image_of_continuousOn ?_ ?_\n · exact isCompact_Icc\n · refine ContinuousOn.norm ?_\n have : (fun (t : ℝ) ↦ -ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)) =\n (fun (t : ℝ) ↦ -(ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I))) := by\n apply funext\n intro x\n apply neg_div\n rw[this]\n refine ContinuousOn.neg ?_\n have : (fun (t : ℝ) ↦ ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)) =\n ((ζ' / ζ) ∘ (fun (t : ℝ) ↦ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I))) := by exact rfl\n rw[this]\n apply h_logDeriv_holo.continuousOn.comp' (by fun_prop)\n unfold MapsTo\n intro x xInIcc\n simp only [neg_le_self_iff, Nat.ofNat_nonneg, uIcc_of_le, mem_diff, mem_singleton_iff]\n have : ¬↑σ₂ + ↑x * (1 - ↑σ₂) - 3 * I = 1 := by\n by_contra h\n rw[Complex.ext_iff, sub_re, add_re, sub_im, add_im] at h\n repeat rw[mul_im] at h\n repeat rw[mul_re] at h\n rw[sub_im, sub_re, reOne, imOne, reThree, imThree, I_im, I_re] at h\n repeat rw[ofReal_re] at h\n repeat rw[ofReal_im] at h\n ring_nf at h\n obtain ⟨_, ripGoal⟩ := h\n linarith\n refine ⟨?_, this⟩\n rw [mem_reProdIm]\n simp only [sub_re, add_re, ofReal_re, mul_re, one_re, ofReal_im, sub_im, one_im, sub_self,\n mul_zero, sub_zero, re_ofNat, I_re, im_ofNat, I_im, mul_one, add_im, mul_im, zero_mul,\n add_zero, zero_sub, mem_Icc, le_refl, neg_le_self_iff, Nat.ofNat_nonneg, and_self, and_true]\n rw [Set.uIcc_of_le]\n · rw [mem_Icc]\n constructor\n · simp only [le_add_iff_nonneg_right]\n apply mul_nonneg\n · exact xInIcc.1\n · linarith [hσ₂.2]\n · have : σ₂ + x * (1 - σ₂) = σ₂ * (1 - x) + x := by ring\n rw [this]\n clear this\n have : (2 : ℝ) = 1 * 1 + 1 := by norm_num\n rw [this]\n clear this\n gcongr\n · linarith [xInIcc.2]\n · exact hσ₂.2.le\n · linarith [xInIcc.1]\n · exact xInIcc.2\n · linarith [hσ₂.2]\n\n have CPrimeNonneg : 0 ≤ C' := by\n apply Real.sSup_nonneg\n intro x x_in_S\n obtain ⟨t, ht, rfl⟩ := x_in_S\n exact NNReal.coe_nonneg _\n\n obtain ⟨D, Dpos, MellinSmooth1bBound⟩ := MellinOfSmooth1b ContDiffSmoothingF suppSmoothingF\n let C : ℝ := C' * D / sInf ((fun t => ‖ σ₂ + (t : ℝ) * (1 - σ₂) - 3 * I ‖₊ ^ 2) '' Set.Icc 0 1)\n use C\n have sInfPos : 0 < sInf ((fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) '' Icc 0 1) := by\n refine (IsCompact.lt_sInf_iff_of_continuous ?_ ?_ ?_ 0).mpr ?_\n · exact isCompact_Icc\n · exact Nonempty.of_subtype\n · have : (fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) =\n (fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ * ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊) := by\n apply funext\n intro x\n rw[pow_two]\n rw[this]\n have : ContinuousOn (fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊) (Icc 0 1) := by\n refine ContinuousOn.nnnorm ?_\n refine ContinuousOn.sub ?_ (by exact continuousOn_const)\n refine ContinuousOn.add (by exact continuousOn_const) ?_\n exact ContinuousOn.mul (by exact Complex.continuous_ofReal.continuousOn) (by exact continuousOn_const)\n exact ContinuousOn.mul (by exact this) (by exact this)\n · intro x xLoc\n apply pow_pos\n have temp : |(↑σ₂ + ↑x * (1 - ↑σ₂) - 3 * I).im| ≤\n ‖↑σ₂ + ↑x * (1 - ↑σ₂) - 3 * I‖₊ := by apply Complex.abs_im_le_norm\n rw[sub_im, add_im, mul_im, mul_im, I_re, I_im, sub_im, sub_re] at temp\n repeat rw[ofReal_re] at temp\n repeat rw[ofReal_im] at temp\n rw[reThree, imOne] at temp\n ring_nf at temp ⊢\n rw[abs_of_neg, neg_neg] at temp\n · have : (3 : NNReal) ≤ ‖↑σ₂ - ↑σ₂ * ↑x + (↑x - I * 3)‖₊ := by exact temp\n positivity\n · rw[neg_lt_zero]\n norm_num\n have CNonneg : 0 ≤ C := by\n unfold C\n apply mul_nonneg\n · exact mul_nonneg (by exact CPrimeNonneg) (by exact Dpos.le)\n · rw[inv_nonneg]\n norm_cast\n convert sInfPos.le using 5\n norm_cast\n use CNonneg\n\n let Tlb : ℝ := max 4 (max (rexp (A ^ (9 : ℝ)⁻¹)) (rexp ((A / (1 - σ₂)) ^ (9 : ℝ)⁻¹)))\n use Tlb\n\n have : 3 < Tlb := by\n unfold Tlb\n rw[lt_max_iff]\n refine Or.inl ?_\n norm_num\n use this\n\n intro X X_gt_three ε ε_pos ε_lt_one T T_gt_Tlb σ₁\n have σ₂_le_σ₁ : σ₂ ≤ σ₁ := by\n have logTlb_pos : 0 < Real.log Tlb := by\n rw[← Real.log_one]\n exact log_lt_log (by norm_num) (by linarith)\n have logTlb_nonneg : 0 ≤ Real.log Tlb := by exact le_of_lt (by exact logTlb_pos)\n have expr_nonneg : 0 ≤ A / (1 - σ₂) := by\n apply div_nonneg\n · linarith [hA.1]\n · rw[sub_nonneg]\n exact le_of_lt hσ₂.2\n have temp : σ₂ ≤ 1 - A / Real.log Tlb ^ 9 := by\n have : rexp ((A / (1 - σ₂)) ^ (9 : ℝ)⁻¹) ≤ Tlb := by\n unfold Tlb\n nth_rewrite 2 [max_comm]\n rw[max_left_comm]\n apply le_max_of_le_left (by rfl)\n rw[← Real.le_log_iff_exp_le] at this\n · have h1 : 0 ≤ (A / (1 - σ₂)) ^ (9 : ℝ)⁻¹ := by apply Real.rpow_nonneg (by exact expr_nonneg)\n have h2 : 0 < (9 : ℝ) := by exact Nat.ofNat_pos'\n rw[← Real.rpow_le_rpow_iff h1 logTlb_nonneg h2] at this\n have h: ((A / (1 - σ₂)) ^ (9 : ℝ)⁻¹) ^ (9 : ℝ) = A / (1 - σ₂) := by exact rpow_inv_rpow (by exact expr_nonneg) (by exact Ne.symm (OfNat.zero_ne_ofNat 9))\n rw[h, div_le_iff₀, mul_comm, ← div_le_iff₀] at this\n · have temp : Real.log Tlb ^ (9 : ℕ) = Real.log Tlb ^ (9 : ℝ) := by exact Eq.symm (rpow_ofNat (Real.log Tlb) 9)\n rw[temp]\n linarith\n · exact rpow_pos_of_pos (by exact logTlb_pos) 9\n · rw[sub_pos]\n exact hσ₂.2\n · positivity\n have : 1 - A / Real.log Tlb ^ 9 ≤ 1 - A / Real.log T ^ 9 := by\n apply sub_le_sub (by rfl)\n apply div_le_div₀\n · exact le_of_lt (by exact hA.1)\n · rfl\n · apply pow_pos (by exact logTlb_pos)\n · apply pow_le_pow_left₀ (by exact logTlb_nonneg)\n apply log_le_log (by positivity)\n exact le_of_lt (by exact T_gt_Tlb)\n exact le_trans temp this\n have minσ₂σ₁ : min σ₂ σ₁ = σ₂ := by exact min_eq_left (by exact σ₂_le_σ₁)\n have maxσ₂σ₁ : max σ₂ σ₁ = σ₁ := by exact max_eq_right (by exact σ₂_le_σ₁)\n have σ₁_lt_one : σ₁ < 1 := by\n rw[← sub_zero 1]\n unfold σ₁\n apply sub_lt_sub_left\n apply div_pos (by exact hA.1)\n apply pow_pos\n rw[← Real.log_one]\n exact log_lt_log (by norm_num) (by linarith)\n\n rw[norm_mul, ← one_mul C]\n have : 1 * C * X * X ^ (-A / Real.log T ^ 9) / ε = 1 * (C * X * X ^ (-A / Real.log T ^ 9) / ε) := by ring\n rw[this]\n apply mul_le_mul\n · rw[norm_div, norm_one]\n repeat rw[norm_mul]\n rw[Complex.norm_two, Complex.norm_real, Real.norm_of_nonneg pi_nonneg, Complex.norm_I, mul_one]\n have : 1 / (2 * π) < 1 / 6 := by\n rw[one_div_lt_one_div]\n · refine (div_lt_iff₀' ?_).mp ?_\n · norm_num\n ring_nf\n refine gt_iff_lt.mpr ?_\n exact Real.pi_gt_three\n · positivity\n · norm_num\n apply le_of_lt\n exact lt_trans this (by norm_num)\n · let f : ℝ → ℂ := fun σ ↦ (-ζ' (↑σ - 3 * I) / ζ (↑σ - 3 * I) * 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ - 3 * I) * ↑X ^ (↑σ - 3 * I))\n have temp : ‖∫ (σ : ℝ) in σ₂..σ₁, -ζ' (↑σ - 3 * I) / ζ (↑σ - 3 * I) * 𝓜 (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (↑σ - 3 * I) * ↑X ^ (↑σ - 3 * I)‖ ≤\n C * X * X ^ (-A / Real.log T ^ 9) / ε * |σ₁ - σ₂| := by\n have : ∀ x ∈ Set.uIoc σ₂ σ₁, ‖f x‖ ≤ C * X * X ^ (-A / Real.log T ^ 9) / ε := by\n intro x xInIoc\n let t : ℝ := (x - σ₂) / (1 - σ₂)\n have tInIcc : t ∈ Icc 0 1 := by\n unfold t\n constructor\n · apply div_nonneg\n · rw[sub_nonneg]\n unfold uIoc at xInIoc\n rw[minσ₂σ₁] at xInIoc\n exact le_of_lt (by exact xInIoc.1)\n · rw[sub_nonneg]\n apply le_of_lt (by exact hσ₂.2)\n · rw[div_le_one]\n · refine sub_le_sub ?_ (by rfl)\n unfold uIoc at xInIoc\n rw[maxσ₂σ₁] at xInIoc\n apply le_trans xInIoc.2\n exact le_of_lt (by exact σ₁_lt_one)\n · rw[sub_pos]\n exact hσ₂.2\n have tExpr : (↑σ₂ + t * (1 - ↑σ₂) - 3 * I) = (↑x - 3 * I) := by\n unfold t\n simp only [ofReal_div, ofReal_sub, ofReal_one, sub_left_inj]\n rw[div_mul_comm, div_self]\n · simp only [one_mul, add_sub_cancel]\n · refine sub_ne_zero_of_ne ?_\n apply Ne.symm\n rw[Complex.ofReal_ne_one]\n exact ne_of_lt (by exact hσ₂.2)\n unfold f\n simp only [Complex.norm_mul]\n have : C * X * X ^ (-A / Real.log T ^ 9) / ε =\n (C / ε) * (X * X ^ (-A / Real.log T ^ 9)) := by ring\n rw[this]\n have temp : ‖-ζ' (↑x - 3 * I) / ζ (↑x - 3 * I)‖ * ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I)‖ ≤\n C / ε := by\n unfold C\n rw[div_div]\n nth_rewrite 2 [div_eq_mul_inv]\n have temp : ‖-ζ' (↑x - 3 * I) / ζ (↑x - 3 * I)‖ ≤ C' := by\n unfold C'\n have : ‖-ζ' (↑x - 3 * I) / ζ (↑x - 3 * I)‖ ∈\n (fun (t : ℝ) ↦ ↑‖-ζ' (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I) / ζ (↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I)‖₊) '' Icc 0 1 := by\n rw[Set.mem_image]\n use t\n constructor\n · exact tInIcc\n · rw[tExpr]\n rfl\n exact le_csSup (by exact bddAboveS) (by exact this)\n have : ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I)‖ ≤\n D * ((sInf ((fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) '' Icc 0 1)) * ε)⁻¹ := by\n nth_rewrite 3 [mul_comm]\n let s : ℂ := x - 3 * I\n have : 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I) =\n 𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) s := by exact rfl\n rw[this]\n have temp : σ₂ ≤ s.re := by\n unfold s\n rw[sub_re, mul_re, I_re, I_im, reThree, imThree, ofReal_re]\n ring_nf\n apply le_of_lt\n unfold uIoc at xInIoc\n rw[minσ₂σ₁] at xInIoc\n exact xInIoc.1\n have : s.re ≤ 2 := by\n unfold s\n rw[sub_re, mul_re, I_re, I_im, reThree, imThree, ofReal_re]\n ring_nf\n have : x < 1 := by\n unfold uIoc at xInIoc\n rw[maxσ₂σ₁] at xInIoc\n exact lt_of_le_of_lt xInIoc.2 σ₁_lt_one\n linarith\n have temp : ‖𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) s‖ ≤ D * (ε * ‖s‖ ^ 2)⁻¹ := by\n exact MellinSmooth1bBound σ₂ hσ₂.1 s temp this ε ε_pos ε_lt_one\n have : D * (ε * ‖s‖ ^ 2)⁻¹ ≤ D * (ε * ↑(sInf ((fun (t : ℝ) ↦ ‖↑σ₂ + ↑t * (1 - ↑σ₂) - 3 * I‖₊ ^ 2) '' Icc 0 1)))⁻¹ := by\n refine mul_le_mul (by rfl) ?_ ?_ (by exact le_of_lt (by exact Dpos))\n · rw[inv_le_inv₀]\n · apply mul_le_mul (by rfl)\n · rw[NNReal.coe_sInf]\n apply csInf_le\n · apply NNReal.bddBelow_coe\n · unfold s\n rw[Set.mem_image]\n let xNorm : NNReal := ‖x - 3 * I‖₊ ^ 2\n use xNorm\n constructor\n · rw[Set.mem_image]\n use t\n exact ⟨tInIcc, by rw[tExpr]⟩\n · rfl\n · exact le_of_lt (by exact sInfPos)\n · exact le_of_lt (by exact ε_pos)\n · apply mul_pos (ε_pos)\n refine sq_pos_of_pos ?_\n refine norm_pos_iff.mpr ?_\n refine ne_zero_of_re_pos ?_\n unfold s\n rw[sub_re, mul_re, I_re, I_im, reThree, imThree, ofReal_re]\n ring_nf\n unfold uIoc at xInIoc\n rw[minσ₂σ₁] at xInIoc\n exact lt_trans hσ₂.1 xInIoc.1\n · exact mul_pos (ε_pos) (sInfPos)\n · rw[inv_nonneg]\n apply mul_nonneg (by exact le_of_lt (by exact ε_pos))\n exact sq_nonneg ‖s‖\n exact le_trans temp this\n rw[mul_assoc]\n apply mul_le_mul (by exact temp) (by exact this)\n · have this : 0 ≤ |(𝓜 (fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (↑x - 3 * I)).re| := by\n apply abs_nonneg\n exact le_trans this (by refine Complex.abs_re_le_norm ?_)\n · exact CPrimeNonneg\n have : ‖(X : ℂ) ^ (↑x - 3 * I)‖ ≤\n X * X ^ (-A / Real.log T ^ 9) := by\n nth_rewrite 2 [← Real.rpow_one X]\n rw[← Real.rpow_add]\n · rw[Complex.norm_cpow_of_ne_zero]\n · rw[sub_re, sub_im, mul_re, mul_im, ofReal_re, ofReal_im, I_re, I_im, reThree, imThree]\n ring_nf\n rw[Complex.norm_of_nonneg]\n · rw[Complex.arg_ofReal_of_nonneg]\n · rw[zero_mul, neg_zero, Real.exp_zero]\n simp only [inv_one, mul_one, inv_pow]\n refine rpow_le_rpow_of_exponent_le ?_ ?_\n · linarith\n · unfold uIoc at xInIoc\n rw[maxσ₂σ₁] at xInIoc\n unfold σ₁ at xInIoc\n ring_nf at xInIoc ⊢\n exact xInIoc.2\n · positivity\n · positivity\n · refine ne_zero_of_re_pos ?_\n rw[ofReal_re]\n positivity\n · positivity\n apply mul_le_mul\n · exact temp\n · exact this\n · rw[Complex.norm_cpow_eq_rpow_re_of_pos]\n · rw[sub_re, mul_re, ofReal_re, I_re, I_im, reThree, imThree]\n ring_nf\n apply Real.rpow_nonneg\n positivity\n · positivity\n · exact div_nonneg CNonneg (le_of_lt ε_pos)\n exact intervalIntegral.norm_integral_le_of_norm_le_const this\n have : C * X * X ^ (-A / Real.log T ^ 9) / ε * |σ₁ - σ₂| ≤\n C * X * X ^ (-A / Real.log T ^ 9) / ε := by\n have : |σ₁ - σ₂| ≤ 1 := by\n rw[abs_of_nonneg]\n · rw[← sub_zero 1]\n","line":3082,"end_line":3471,"proof_status":"formalized"} {"id":"I3NewBound","label":"I3NewBound","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinOfSmooth1b","I3New","LogDerivZetaLogSquaredBoundSmallt"],"nlp_text":"We have that \\[ |I_3(\\nu ,\\varepsilon ,X,T)|\\ll \\frac{X^{1-F/\\log T}\\sqrt{T}}{\\varepsilon }. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I3NewBound","latex_link":"sect0004.html#I3NewBound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/I3NewBound","lean_decl_name":"I3NewBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/StrongPNT.lean","lean4_code":"@[blueprint\n (title := \"I3NewBound\")\n (statement := /--\n We have that\n $$|I_3(\\nu,\\varepsilon,X,T)|\\ll\\frac{X^{1-F/\\log T}\\sqrt{T}}{\\varepsilon}.$$\n -/)\n (proof := /--\n Note that $|I_3(\\nu,\\varepsilon,X,T)|=$\n $$\\left|\\frac{1}{2\\pi i}\\int_{-T}^T\\left(-\\frac{\\zeta'}{\\zeta}(\\sigma'+it)\\right)\\,\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma'+it)\\,X^{\\sigma'+it}\\,dt\\right|\\ll\\int_{-T}^T\\left|\\frac{\\zeta'}{\\zeta}(\\sigma'+it)\\right|\\cdot|\\mathcal{M}(\\tilde{1}_\\varepsilon)(\\sigma'+it)|\\cdot X^{\\sigma'}\\,dt.$$\n Applying Theorem \\ref{LogDerivZetaLogSquaredBoundSmallt} and Lemma \\ref{MellinOfSmooth1b}, we have that\n $$|I_3(\\nu,\\varepsilon,X,T)|\\ll\\int_{-T}^T\\log^2(2+T)\\cdot\\frac{X^{\\sigma'}}{\\varepsilon\\,|\\sigma'+it|^2}\\,dt\\ll\\frac{X^{1-F/\\log T}\\,\\sqrt{T}}{\\varepsilon}\\int_0^T\\frac{dt}{|\\sigma'+it|^2}.$$\n Here we are using the fact that this integrand is symmetric in $t$ about $0$ and that $\\log^2(2+T)\\ll\\sqrt{T}$ for sufficiently large $T$. Now note that, by Lemma \\ref{DeltaRange}, we have\n $$\\frac{1}{|\\sigma'+it|^2}=\\frac{1}{(1-\\delta_T/3)^2+t^2}<\\frac{1}{(41/42)^2+t^2}.$$\n Thus,\n $$|I_3(\\nu,\\varepsilon,X,T)|\\ll\\frac{X^{1-F/\\log T}\\sqrt{T}}{\\varepsilon}\\int_0^T\\frac{dt}{|\\sigma'+it|^2}\\leq\\frac{X^{1-F/\\log T}\\sqrt{T}}{\\varepsilon}\\int_0^\\infty\\frac{dt}{(41/42)^2+t^2}.$$\n The integral on the right hand side evaluates to $21\\pi/41$, which is just a constant, so the desired result follows.\n -/)\n (proofUses := [\"MellinOfSmooth1b\", \"DeltaRange\", \"LogDerivZetaLogSquaredBoundSmallt\"])\n (latexEnv := \"lemma\")]\nlemma I3NewBound {SmoothingF : ℝ → ℝ}\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (ContDiffSmoothingF : ContDiff ℝ 1 SmoothingF) : ∃ (C : ℝ) (Cnonneg : 0 ≤ C),\n ∀ {ε X T : ℝ} (εinIoo : ε ∈ Ioo 0 1) (Xgt3 : 3 < X) (Tgt3 : 3 < T),\n let σ' := 1 - F / Real.log T\n ‖I3New SmoothingF ε X T σ'‖ ≤ C * (X ^ (1 - F / Real.log T) * Real.sqrt T) / ε := by\n sorry\n","line":1269,"end_line":1294,"proof_status":"statement_formalized"} {"id":"SmoothedChebyshevClose","label":"SmoothedChebyshevClose","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Smooth1Properties_below","SmoothedChebyshevDirichlet"],"nlp_text":"We have that \\[ \\psi _{\\epsilon }(X) = \\psi (X) + O(\\epsilon X \\log X). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevClose","latex_link":"sect0003.html#SmoothedChebyshevClose","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevClose","lean_decl_name":"SmoothedChebyshevClose","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevClose\")\n (statement := /--\n We have that\n $$\\psi_{\\epsilon}(X) = \\psi(X) + O(\\epsilon X \\log X).$$\n -/)\n (proof := /--\n Take the difference. By Lemma \\ref{Smooth1Properties_above} and \\ref{Smooth1Properties_below},\n the sums agree except when $1-c \\epsilon \\leq n/X \\leq 1+c \\epsilon$. This is an interval of\n length $\\ll \\epsilon X$, and the summands are bounded by $\\Lambda(n) \\ll \\log X$.\n\n %[No longer relevant, as we will do better than any power of log savings...: This is not enough,\n %as it loses a log! (Which is fine if our target is the strong PNT, with\n %exp-root-log savings, but not here with the ``softer'' approach.) So we will need something like\n %the Selberg sieve (already in Mathlib? Or close?) to conclude that the number of primes in this\n %interval is $\\ll \\epsilon X / \\log X + 1$.\n %(The number of prime powers is $\\ll X^{1/2}$.)\n %And multiplying that by $\\Lambda (n) \\ll \\log X$ gives the desired bound.]\n -/)]\ntheorem SmoothedChebyshevClose {SmoothingF : ℝ → ℝ}\n (diffSmoothingF : ContDiff ℝ 1 SmoothingF)\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (SmoothingFnonneg : ∀ x > 0, 0 ≤ SmoothingF x)\n (mass_one : ∫ x in Ioi 0, SmoothingF x / x = 1) :\n ∃ C > 0, ∀ (X : ℝ) (_ : 3 < X) (ε : ℝ) (_ : 0 < ε) (_ : ε < 1) (_ : 2 < X * ε),\n ‖SmoothedChebyshev SmoothingF ε X - ψ X‖ ≤ C * ε * X * Real.log X := by\n obtain ⟨c₁, c₁_pos, c₁_eq, hc₁⟩ := Smooth1Properties_below suppSmoothingF mass_one\n\n obtain ⟨c₂, c₂_pos, c₂_eq, hc₂⟩ := Smooth1Properties_above suppSmoothingF\n\n have c₁_lt : c₁ < 1 := by\n rw[c₁_eq]\n exact lt_trans (Real.log_two_lt_d9) (by norm_num)\n\n have c₂_lt : c₂ < 2 := by\n rw[c₂_eq]\n nth_rewrite 3 [← mul_one 2]\n apply mul_lt_mul'\n · rfl\n · exact lt_trans (Real.log_two_lt_d9) (by norm_num)\n · exact Real.log_nonneg (by norm_num)\n · positivity\n\n let C : ℝ := 6 * (3 * c₁ + c₂)\n have C_eq : C = 6 * (3 * c₁ + c₂) := rfl\n\n clear_value C\n\n have Cpos : 0 < C := by\n rw [C_eq]\n positivity\n\n refine ⟨C, Cpos, fun X X_ge_C ε εpos ε_lt_one ↦ ?_⟩\n\n have X_gt_zero : (0 : ℝ) < X := by linarith\n\n have n_on_X_pos {n : ℕ} (npos : 0 < n) :\n 0 < n / X := by\n have : (0 : ℝ) < n := by exact_mod_cast npos\n positivity\n\n have smooth1BddAbove (n : ℕ) (npos : 0 < n) :\n Smooth1 SmoothingF ε (n / X) ≤ 1 :=\n Smooth1LeOne SmoothingFnonneg mass_one εpos (n_on_X_pos npos)\n\n have smooth1BddBelow (n : ℕ) (npos : 0 < n) :\n Smooth1 SmoothingF ε (n / X) ≥ 0 :=\n Smooth1Nonneg SmoothingFnonneg (n_on_X_pos npos) εpos\n\n have smoothIs1 (n : ℕ) (npos : 0 < n) (n_le : n ≤ X * (1 - c₁ * ε)) :\n Smooth1 SmoothingF ε (↑n / X) = 1 := by\n apply hc₁ (ε := ε) (n / X) εpos (n_on_X_pos npos)\n exact (div_le_iff₀' X_gt_zero).mpr n_le\n\n have smoothIs0 (n : ℕ) (n_le : (1 + c₂ * ε) ≤ n / X) :=\n hc₂ (ε := ε) (n / X) ⟨εpos, ε_lt_one⟩ n_le\n\n have ε_pos: ε > 0 := by linarith\n have X_pos: X > 0 := by linarith\n have X_gt_three : 3 < X := by linarith\n\n intro X_bound\n\n have X_bound_1 : 1 ≤ X * ε * c₁ := by\n rw[c₁_eq, ← div_le_iff₀]\n · have : 1 / Real.log 2 < 2 := by\n nth_rewrite 2 [← one_div_one_div 2]\n rw[one_div_lt_one_div]\n · exact lt_of_le_of_lt (by norm_num) (Real.log_two_gt_d9)\n · exact Real.log_pos (by norm_num)\n norm_num\n apply le_of_lt\n exact gt_trans X_bound this\n exact Real.log_pos (by norm_num)\n\n have X_bound_2 : 1 ≤ X * ε * c₂ := by\n rw[c₂_eq, ← div_le_iff₀]\n · have : 1 / (2 * Real.log 2) < 2 := by\n nth_rewrite 3 [← one_div_one_div 2]\n · rw[one_div_lt_one_div, ← one_mul (1 / 2)]\n · apply mul_lt_mul\n · norm_num\n · apply le_of_lt\n exact lt_trans (by norm_num) (Real.log_two_gt_d9)\n repeat norm_num\n · norm_num\n exact Real.log_pos (by norm_num)\n · norm_num\n apply le_of_lt\n exact gt_trans X_bound this\n norm_num\n exact Real.log_pos (by norm_num)\n\n rw [SmoothedChebyshevDirichlet diffSmoothingF SmoothingFnonneg suppSmoothingF\n mass_one (by linarith) εpos ε_lt_one]\n\n convert SmoothedChebyshevClose_aux SmoothingF c₁ c₁_pos c₁_lt c₂ c₂_pos c₂_lt hc₂ C C_eq ε\n ε_pos ε_lt_one X X_pos X_gt_three X_bound_1 X_bound_2 smooth1BddAbove smooth1BddBelow\n smoothIs1 smoothIs0\n","line":698,"end_line":816,"proof_status":"formalized"} {"id":"SmoothedChebyshevDirichlet","label":"SmoothedChebyshevDirichlet","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["SmoothedChebyshev","SmoothedChebyshevDirichlet_aux_tsum_integral","LogDerivativeDirichlet"],"nlp_text":"We have that \\[ \\psi _{\\epsilon }(X) = \\sum _{n=1}^\\infty \\Lambda (n)\\widetilde{1_{\\epsilon }}(n/X). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevDirichlet","latex_link":"sect0003.html#SmoothedChebyshevDirichlet","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothedChebyshevDirichlet","lean_decl_name":"SmoothedChebyshevDirichlet","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"SmoothedChebyshevDirichlet\")\n (statement := /--\n We have that\n $$\\psi_{\\epsilon}(X) = \\sum_{n=1}^\\infty \\Lambda(n)\\widetilde{1_{\\epsilon}}(n/X).$$\n -/)\n (proof := /--\n We have that\n $$\\psi_{\\epsilon}(X) = \\frac{1}{2\\pi i}\\int_{(2)}\\sum_{n=1}^\\infty \\frac{\\Lambda(n)}{n^s}\n \\mathcal{M}(\\widetilde{1_{\\epsilon}})(s)\n X^{s}ds.$$\n We have enough decay (thanks to quadratic decay of $\\mathcal{M}(\\widetilde{1_{\\epsilon}})$) to\n justify the interchange of summation and integration. We then get\n $$\\psi_{\\epsilon}(X) =\n \\sum_{n=1}^\\infty \\Lambda(n)\\frac{1}{2\\pi i}\\int_{(2)}\n \\mathcal{M}(\\widetilde{1_{\\epsilon}})(s)\n (n/X)^{-s}\n ds\n $$\n and apply the Mellin inversion formula.\n -/)]\ntheorem SmoothedChebyshevDirichlet {SmoothingF : ℝ → ℝ}\n (diffSmoothingF : ContDiff ℝ 1 SmoothingF)\n (SmoothingFpos : ∀ x > 0, 0 ≤ SmoothingF x)\n (suppSmoothingF : Function.support SmoothingF ⊆ Icc (1 / 2) 2)\n (mass_one : ∫ x in Ioi (0 : ℝ), SmoothingF x / x = 1)\n {X : ℝ} (X_gt : 3 < X) {ε : ℝ} (εpos : 0 < ε) (ε_lt_one : ε < 1) :\n SmoothedChebyshev SmoothingF ε X =\n ∑' n, ArithmeticFunction.vonMangoldt n * Smooth1 SmoothingF ε (n / X) := by\n dsimp [SmoothedChebyshev, SmoothedChebyshevIntegrand, VerticalIntegral', VerticalIntegral]\n set σ : ℝ := 1 + (Real.log X)⁻¹\n have log_gt : 1 < Real.log X := logt_gt_one X_gt.le\n have σ_gt : 1 < σ := by\n simp only [σ]\n have : 0 < (Real.log X)⁻¹ := by\n simp only [inv_pos]\n linarith\n linarith\n have σ_le : σ ≤ 2 := by\n simp only [σ]\n have : (Real.log X)⁻¹ < 1 := inv_lt_one_of_one_lt₀ log_gt\n linarith\n calc\n _ = 1 / (2 * π * I) * (I * ∫ (t : ℝ), ∑' n, Λ n / (n : ℂ) ^ (σ + ↑t * I) *\n mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * X ^ (σ + ↑t * I)) := ?_\n _ = 1 / (2 * π * I) * (I * ∑' n, ∫ (t : ℝ), Λ n / (n : ℂ) ^ (σ + ↑t * I) *\n mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) * X ^ (σ + ↑t * I)) := ?_\n _ = 1 / (2 * π * I) * (I * ∑' n, Λ n * ∫ (t : ℝ),\n mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) *\n (X / (n : ℂ)) ^ (σ + ↑t * I)) := ?_\n _ = 1 / (2 * π) * (∑' n, Λ n * ∫ (t : ℝ),\n mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) *\n (X / (n : ℂ)) ^ (σ + ↑t * I)) := ?_\n _ = ∑' n, Λ n * (1 / (2 * π) * ∫ (t : ℝ),\n mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) *\n (X / (n : ℂ)) ^ (σ + ↑t * I)) := ?_\n _ = ∑' n, Λ n * (1 / (2 * π) * ∫ (t : ℝ),\n mellin (fun x ↦ ↑(Smooth1 SmoothingF ε x)) (σ + ↑t * I) *\n ((n : ℂ) / X) ^ (-(σ + ↑t * I))) := ?_\n _ = _ := ?_\n · congr; ext t\n rw [LogDerivativeDirichlet]\n · rw [← tsum_mul_right, ← tsum_mul_right]\n · simp [σ_gt]\n · congr\n exact SmoothedChebyshevDirichlet_aux_tsum_integral diffSmoothingF SmoothingFpos\n suppSmoothingF mass_one (by linarith) εpos ε_lt_one σ_gt σ_le\n · field_simp; congr; ext n; rw [← MeasureTheory.integral_const_mul]; congr; ext t\n by_cases n_ne_zero : n = 0\n · simp [n_ne_zero]\n rw [mul_div_assoc, mul_assoc]\n congr\n rw [(div_eq_iff ?_).mpr]\n · have := @mul_cpow_ofReal_nonneg (a := X / (n : ℝ)) (b := (n : ℝ)) (r := σ + I * t) ?_ ?_\n · push_cast at this ⊢\n rw [← this, div_mul_cancel₀]\n · simp only [ne_eq, Nat.cast_eq_zero, n_ne_zero, not_false_eq_true]\n · apply div_nonneg (by linarith : 0 ≤ X); simp\n · simp\n · simp only [ne_eq, cpow_eq_zero_iff, Nat.cast_eq_zero, n_ne_zero, false_and,\n not_false_eq_true]\n · conv => rw [← mul_assoc, div_mul]; lhs; lhs; rhs; simp\n · simp_rw [← tsum_mul_left, ← mul_assoc, mul_comm]\n · have ht (t : ℝ) : -(σ + t * I) = (-1) * (σ + t * I) := by simp\n have hn (n : ℂ) : (n / X) ^ (-1 : ℂ) = X / n := by simp [cpow_neg_one]\n have (n : ℕ) : (log ((n : ℂ) / (X : ℂ)) * -1).im = 0 := by\n simp [Complex.log_im, arg_eq_zero_iff, div_nonneg (Nat.cast_nonneg _) (by linarith : 0 ≤ X)]\n have h (n : ℕ) (t : ℝ) : ((n : ℂ) / X) ^ ((-1 : ℂ) * (σ + t * I)) =\n ((n / X) ^ (-1 : ℂ)) ^ (σ + ↑t * I) := by\n rw [cpow_mul] <;> {rw [this n]; simp [Real.pi_pos, Real.pi_nonneg]}\n conv => rhs; lhs; intro n; rhs; rhs; rhs; intro t; rhs; rw [ht t, h n t]; lhs; rw [hn]\n · push_cast\n congr\n ext n\n by_cases n_zero : n = 0\n · simp [n_zero]\n have n_pos : 0 < n := by\n simpa only [n_zero, gt_iff_lt, false_or] using (Nat.eq_zero_or_pos n)\n congr\n have := mellinInv_mellin_eq σ (f := fun x ↦ (Smooth1 SmoothingF ε x : ℂ)) (x := n / X)\n ?_ ?_ ?_ ?_\n · beta_reduce at this\n dsimp [mellinInv, VerticalIntegral] at this\n convert this using 4\n · norm_cast\n · rw [mul_comm]\n norm_cast\n · exact div_pos (by exact_mod_cast n_pos) (by linarith : 0 < X)\n · apply Smooth1MellinConvergent diffSmoothingF suppSmoothingF ⟨εpos, ε_lt_one⟩\n SmoothingFpos mass_one\n simp only [ofReal_re]\n linarith\n · dsimp [VerticalIntegrable]\n apply SmoothedChebyshevDirichlet_aux_integrable diffSmoothingF SmoothingFpos\n suppSmoothingF mass_one εpos ε_lt_one σ_gt σ_le\n · refine ContinuousAt.comp (g := ofReal) RCLike.continuous_ofReal.continuousAt ?_\n exact Smooth1ContinuousAt diffSmoothingF SmoothingFpos suppSmoothingF\n εpos (by positivity)\n","line":269,"end_line":386,"proof_status":"formalized"} {"id":"fks2-theorem-6","label":"fks2-theorem-6","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-eq-13"],"nlp_text":"Let \\(x_0 {\\gt} 0\\) be chosen such that \\(\\pi (x_0)\\) and \\(\\theta (x_0)\\) are computable, and let \\(x_1 \\geq \\max (x_0, 14)\\). Let \\(\\{ b_i\\} _{i=1}^N\\) be a finite partition of \\([\\log x_0, \\log x_1]\\), with \\(b_1 = \\log x_0\\) and \\(b_N = \\log x_1\\), and suppose that \\(\\varepsilon _{\\theta ,\\mathrm{num}}\\) gives computable admissible numerical bounds for \\(x = \\exp (b_i)\\), for each \\(i=1,\\dots ,N\\). For \\(x_1 \\leq x_2 \\leq x_1 \\log x_1\\), we define \\[ \\mu _{num}(x_0,x_1,x_2) = \\frac{x_0 \\log x_1}{\\varepsilon _{\\theta ,num}(x_0) x_1 \\log x_0} \\left|\\frac{\\pi (x_0) - \\operatorname {Li}(x_0)}{x_0/\\log x_0} - \\frac{\\theta (x_0) - x_0}{x_0}\\right| \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6","latex_link":"secondary-chapter.html#fks2-theorem-6","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6","lean_decl_name":"FKS2.theorem_6","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (fun x ↦ x^(-(1:ℝ)/100), Set.Icc 1 3757.6)\n ]\n\n@[blueprint\n \"fks2-corollary-24\"\n (title := \"FKS2 Corollary 24\")\n (statement := /--\n We have the bounds $E_\\pi(x) \\leq B(x)$, where\n $B(x)$ is given by Table 7.\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_24 (B : ℝ → ℝ) (I : Set ℝ) (h : (B, I) ∈ table7) :\n ∀ x, log x ∈ I → Eπ x ≤ B x := sorry\n","line":666,"end_line":678,"proof_status":"statement_formalized"} {"id":"thm:pt_2","label":"pt_2","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-corollary-22"],"nlp_text":"One has \\[ |\\pi (x) - \\mathrm{Li}(x)| \\leq 235 x (\\log x)^{0.52} \\exp (-0.8 \\sqrt{\\log x}) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PT.corollary_2","latex_link":"secondary-chapter.html#thm:pt_2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PT.corollary_2","lean_decl_name":"PT.corollary_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint \"thm:pt_2\"\n (title := \"PT Corollary 2\")\n (statement := /--\n One has\n \\[\n |\\pi(x) - \\mathrm{Li}(x)| \\leq 235 x (\\log x)^{0.52} \\exp(-0.8 \\sqrt{\\log x})\n \\]\n for all $x \\geq \\exp(2000)$.\n -/)\n (latexEnv := \"theorem\")]\ntheorem PT.corollary_2 : Eπ.classicalBound 235 1.52 0.8 1 (exp 2000) := by\n have := FKS2.corollary_22\n intro x hx\n have hx2 : x ≥ 2 := by grind [add_one_le_exp 2000]\n refine (this x hx2).trans ?_\n simp only [admissible_bound]; norm_num\n suffices h_div : 92211 / 10000 * log x ^ (3 / 2 : ℝ) *\n exp (-(2119 / 2500) + (4 / 5)) ≤ 235 * log x ^ (38 / 25 : ℝ) by\n (convert mul_le_mul_of_nonneg_right h_div (exp_nonneg (-(4 / 5))) using 1; rw [exp_add]; ring_nf)\n norm_num [mul_assoc, ← exp_add]\n suffices h_div : 92211 / 10000 * exp (-(2119 / 2500) + (4 / 5)) ≤\n 235 * log x ^ (38 / 25 - 3 / 2 : ℝ) by\n convert mul_le_mul_of_nonneg_right h_div (rpow_nonneg (log_nonneg\n (show x ≥ 1 by linarith)) (3 / 2 : ℝ)) using 1 <;> ring_nf\n rw [← rpow_add (log_pos (by linarith : x > 1))]\n norm_num\n exact (mul_le_mul_of_nonneg_left\n (rpow_le_rpow (by positivity)\n (show log x ≥ 1 by nlinarith [log_exp 2000, log_le_log (by positivity) hx]) (by positivity))\n (by positivity)).trans' (by\n norm_num\n nlinarith [exp_pos (-(2119 / 2500) + 4 / 5), exp_neg (-(2119 / 2500) + 4 / 5),\n mul_inv_cancel₀ <| ne_of_gt <| exp_pos (-(2119 / 2500) + 4 / 5),\n add_one_le_exp (-(2119 / 2500) + 4 / 5), add_one_le_exp (-(-(2119 / 2500) + 4 / 5))])","line":30,"end_line":63,"proof_status":"formalized"} {"id":"thm:jy_13","label":"jy_13","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-corollary-22"],"nlp_text":"One has \\[ |\\pi (x) - \\mathrm{Li}(x)| \\leq 9.59 x (\\log x)^{0.515} \\exp (-0.8274 \\sqrt{\\log x}) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/JY.corollary_1_3","latex_link":"secondary-chapter.html#thm:jy_13","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/JY.corollary_1_3","lean_decl_name":"JY.corollary_1_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:jy_13\"\n (title := \"JY Corollary 1.3\")\n (statement := /--\n One has\n \\[\n |\\pi(x) - \\mathrm{Li}(x)| \\leq 9.59 x (\\log x)^{0.515} \\exp(-0.8274 \\sqrt{\\log x})\n \\]\n for all $x \\geq 2$.\n -/)\n (latexEnv := \"theorem\")]\ntheorem JY.corollary_1_3 : Eπ.classicalBound 9.59 1.515 0.8274 1 2 := by\n intro x hx\n convert FKS2.corollary_22 x using 1\n norm_num [admissible_bound]\n constructor\n · intro\n convert FKS2.corollary_22 x using 1\n norm_num [admissible_bound]\n · refine fun h ↦ (h hx).trans ?_\n suffices h_div : 92211 / 10000 * exp (-(2119 / 2500)) ≤\n 959 / 100 * log x ^ (303 / 200 - 3 / 2 : ℝ) * exp (-(4137 / 5000)) by\n convert mul_le_mul_of_nonneg_left h_div\n (rpow_nonneg (log_nonneg (by grind : (1 : ℝ) ≤ x)) (3 / 2)) using 1\n · ring\n · rw [show (303 / 200 : ℝ) = 3 / 2 + (303 / 200 - 3 / 2) by grind,\n rpow_add (log_pos (by grind))]; ring_nf\n suffices h_exp : 92211 / 10000 * exp (-(2119 / 2500) + 4137 / 5000) ≤\n 959 / 100 * log x ^ (303 / 200 - 3 / 2 : ℝ) by\n convert mul_le_mul_of_nonneg_right h_exp (exp_nonneg (-(4137 / 5000))) using 1\n · rw [mul_assoc, ← exp_add]; ring_nf\n refine le_trans ?_ <| mul_le_mul_of_nonneg_left (rpow_le_rpow (by grind)\n (log_two_gt_d9.le.trans (log_le_log (by grind) hx)) (by grind)) (by grind)\n norm_num\n refine (mul_le_mul_of_nonneg_left (exp_le_one_iff.mpr (by grind)) (by grind)).trans ?_\n norm_num\n rw [← log_le_log_iff (by positivity) (by positivity),\n log_mul (by positivity) (by positivity), log_rpow (by positivity),\n div_mul_eq_mul_div, add_div', le_div_iff₀] <;>\n norm_num [← log_rpow, mul_comm, ← log_mul, log_le_log_iff]","line":65,"end_line":104,"proof_status":"formalized"} {"id":"fks2-corollary-8","label":"fks2-corollary-8","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-eq-13"],"nlp_text":"Let \\(\\{ b'_i\\} _{i=1}^M\\) be a set of finite subdivisions of \\([\\log (x_1),\\infty )\\), with \\(b'_1 = \\log (x_1)\\) and \\(b'_M = \\infty \\). Define \\[ \\varepsilon _{\\pi , num}(x_1) := \\max _{1 \\leq i \\leq M-1}\\varepsilon _{\\pi , num}(\\exp (b'_i), \\exp (b'_{i+1})). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_8","latex_link":"secondary-chapter.html#fks2-corollary-8","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_8","lean_decl_name":"FKS2.corollary_8","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-corollary-8\"\n (title := \"FKS2 Corollary 8\")\n (statement := /--\n Let $\\{b'_i\\}_{i=1}^M$ be a set of finite subdivisions of $[\\log(x_1),\\infty)$, with\n $b'_1 = \\log(x_1)$ and $b'_M = \\infty$. Define\n $$ \\varepsilon_{\\pi, num}(x_1) :=\n \\max_{1 \\leq i \\leq M-1}\\varepsilon_{\\pi, num}(\\exp(b'_i),\n \\exp(b'_{i+1})).$$\n Then $E_\\pi(x) \\leq \\varepsilon_{\\pi,num}(x_1)$ for all $x \\geq x_1$.\n -/)\n (proof := /-- This follows directly from Theorem \\ref{fks2-theorem-6} by taking the supremum over all partitions ending at infinity. -/)\n (latexEnv := \"corollary\")\n (discussion := 719)]\ntheorem corollary_8 {x₁ : ℝ} (hx₁ : x₁ ≥ 14)\n {M : ℕ} (b' : Fin (M + 1) → EReal) (hmono : Monotone b')\n (h_b_start : b' 0 = log x₁)\n (h_b_end : b' (Fin.last M) = ⊤)\n (εθ_num : ℝ → ℝ)\n (h_εθ_num : Eθ.numericalBound x₁ εθ_num) (x : ℝ) (hx : x ≥ x₁) :\n Eπ x ≤ iSup (fun i : Finset.Iio (Fin.last M) ↦\n επ_num (fun j : Fin (i.val.val+1) ↦ (b' ⟨ j.val, by grind ⟩).toReal)\n εθ_num x₁ (exp (b' i.val).toReal)\n (if (i+1) = Fin.last M then ⊤ else exp (b' (i+1)).toReal)) :=\n sorry","line":719,"end_line":743,"proof_status":"statement_formalized"} {"id":"BddAboveOnRect","label":"BddAboveOnRect","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(g : \\mathbb {C}\\to \\mathbb {C}\\) be a holomorphic function on a rectangle, then \\(g\\) is bounded above on the rectangle.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BddAboveOnRect","latex_link":"sect0003.html#BddAboveOnRect","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BddAboveOnRect","lean_decl_name":"BddAboveOnRect","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"BddAboveOnRect\")\n (statement := /-- Let $g : \\C \\to \\C$ be a holomorphic function on a rectangle, then $g$ is bounded above on the rectangle. -/)\n (proof := /-- Use the compactness of the rectangle and the fact that holomorphic functions are continuous. -/)\n (latexEnv := \"lemma\")]\nlemma BddAboveOnRect {g : ℂ → ℂ} {z w : ℂ} (holoOn : HolomorphicOn g (z.Rectangle w)) :\n BddAbove (norm ∘ g '' (z.Rectangle w)) := by\n have compact_rect : IsCompact (z.Rectangle w) := by\n apply IsCompact.reProdIm <;> apply isCompact_uIcc\n refine IsCompact.bddAbove_image compact_rect ?_\n apply holoOn.continuousOn.norm\n","line":1144,"end_line":1154,"proof_status":"formalized"} {"id":"fks2-lemma-10a","label":"fks2-lemma-10a","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-lemma-10-substep-2"],"nlp_text":"If \\(a{\\gt}0\\), \\(c{\\gt}0\\) and \\(b {\\lt} -c^2/16a\\), then \\(g(a,b,c,x)\\) decreases with \\(x\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10a","latex_link":"secondary-chapter.html#fks2-lemma-10a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10a","lean_decl_name":"FKS2.lemma_10a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (discussion := 611)]\ntheorem lemma_10_substep_2 {a b c x : ℝ} (hx : x > 1) :\n deriv (g_bound a b c) x < 0 ↔\n -a * (sqrt (log x)) ^ 2 + (c / 2) * sqrt (log x) + b < 0 := by\n have hlogx := log_pos hx\n rw [lemma_10_substep hx, sq_sqrt hlogx.le]\n have hpos : 0 < x ^ (-a - 1) * (log x) ^ (b - 1) * exp (c * sqrt (log x)) := by positivity\n rw [show ∀ y, y * x ^ (-a - 1) * (log x) ^ (b - 1) * exp (c * sqrt (log x)) =\n y * (x ^ (-a - 1) * (log x) ^ (b - 1) * exp (c * sqrt (log x))) from fun _ => by ring]\n rw [mul_neg_iff]\n constructor <;> intro h\n · rcases h with ⟨-, hc⟩ | ⟨h, -⟩ <;> linarith\n · exact Or.inr ⟨by linarith, hpos⟩\n\n@[blueprint\n \"fks2-lemma-10a\"\n (title := \"FKS2 Lemma 10a\")\n (statement := /-- If $a>0$, $c>0$ and $b < -c^2/16a$, then $g(a,b,c,x)$ decreases with $x$. -/)\n (proof := /-- We apply Lemma \\ref{fks2-lemma-10-substep-2}. There are no roots when $b < -\\frac{c^2}{16a}$, and the derivative is always negative in this case.\n -/)\n (latexEnv := \"lemma\")\n","line":125,"end_line":145,"proof_status":"formalized"} {"id":"fks2-corollary-11","label":"fks2-corollary-11","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-lemma-10a"],"nlp_text":"If \\(B \\geq 1 + C^2 / 16R\\) then \\(g(1,1-B,C/\\sqrt{R},x)\\) is decreasing in \\(x\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_11","latex_link":"secondary-chapter.html#fks2-corollary-11","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.corollary_11","lean_decl_name":"FKS2.corollary_11","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (statement := /--\n The Dawson function $D_+ : \\mathbb{R} \\to \\mathbb{R}$ is defined by the formula\n $D_+(x) := e^{-x^2} \\int_0^x e^{t^2}\\ dt$. -/)]\nnoncomputable def dawson (x : ℝ) : ℝ := exp (-x ^ 2) * ∫ t in 0..x, exp (t ^ 2)\n\n\n@[blueprint\n \"fks2-remark-after-corollary-11\"\n (title := \"FKS2 remark after Corollary 11\")\n (statement := /--\n The Dawson function has a single maximum at $x \\approx 0.942$, after which the function is\n decreasing. -/)\n (proof := /-- The Dawson function satisfies the differential equation $F'(x) + 2xF(x) = 1$ from which it follows that the second derivative satisfies $F''(x) = −2F(x) − 2x(−2xF(x) + 1)$, so that at every critical point (where we have $F(x) = \\frac{1}{2x}$) we have $F''(x) = −\\frac{1}{x}$. It follows that every positive critical value gives a local maximum, hence there is a unique such critical value and the function decreases after it. Numerically one may verify this is near 0.9241 see https://oeis.org/ A133841. -/)\n","line":221,"end_line":233,"proof_status":"formalized"} {"id":"costa-pereira-theorem-1b","label":"costa-pereira-theorem-1b","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-8"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\(\\psi (x) - \\theta (x) \\geqslant \\psi (x^{1/2}) + \\psi (x^{1/3}) + \\psi (x^{1/7})\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.theorem_1b","latex_link":"secondary-chapter.html#costa-pereira-theorem-1b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.theorem_1b","lean_decl_name":"CostaPereira.theorem_1b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":"@[blueprint\n \"costa-pereira-theorem-1b\"\n (title := \"Costa-Pereira Theorem 1b\")\n (statement := /-- For every $x > 0$ we have\n $\\psi(x) - \\theta(x) \\geqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\psi(x^{1/7})$. -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-8} and\n Sublemma \\ref{costa-pereira-sublemma-1-2}. -/)\n (latexEnv := \"theorem\")\n (discussion := 685)]\ntheorem theorem_1b {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≥ ψ (x ^ (1 / 2 : ℝ)) + ψ (x ^ (1 / 3 : ℝ)) + ψ (x ^ (1 / 7 : ℝ)) :=\n sublemma_1_2 hx 7 ▸ sublemma_1_8 hx","line":435,"end_line":446,"proof_status":"formalized"} {"id":"JBlaschke","label":"JBlaschke","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(B{\\gt}1\\) and \\(0 {\\lt} R{\\lt}1\\). If \\(f:\\mathbb {C}\\to \\mathbb {C}\\) is a function analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)=1\\), define \\(L_f(z)=J_{B_f}(z)\\) where \\(J\\) is from Theorem 4.3.3 and \\(B_f\\) is from Definition 4.3.6.","doc_url":null,"latex_link":"sect0004.html#JBlaschke","lean_link":null,"lean_decl_name":"JBlaschke","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"lem:pi-product","label":"pi-product","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:choose-pi"],"nlp_text":"With \\(p_i\\) as in Lemma 10.1.9, we have for large \\(n\\) \\begin{equation} \\label{eq:pi-lower} \\prod _{i=1}^3 \\Bigl(1 + \\frac{1}{p_i(p_i+1)}\\Bigr) \\ge \\prod _{i=1}^3 \\Bigl( 1 + \\frac{1}{\\bigl(1 + \\frac{1}{\\log ^3 \\sqrt{n}}\\bigr)^{2i} (n + \\sqrt{n})} \\Bigr). \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.prod_p_ge","latex_link":"tertiary-chapter.html#lem:pi-product","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.prod_p_ge","lean_decl_name":"Lcm.prod_p_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":" -/)\n (proof := /--\n Expand each finite product as a polynomial in \\(\\varepsilon\\), estimate the coefficients using\n the bounds in Lemma~\\ref{lem:eps-bounds}, and bound the tails by simple inequalities such as\n \\[\n (1+C\\varepsilon)^k \\le 1 + k C\\varepsilon + \\dots\n \\]\n for small \\(\\varepsilon\\).\n All coefficients can be bounded numerically in a rigorous way; this step is a finite computation\n that can be checked mechanically.\n -/)\n (latexEnv := \"lemma\")]\ntheorem prod_epsilon_ge {ε : ℝ} (hε : 0 ≤ ε ∧ ε ≤ 1 / (89693 ^ 2 : ℝ)) :\n (∏ i : Fin 3,\n (1 + ε / ((1.000675 : ℝ) ^ (2 * ((i : ℕ) + 1 : ℝ))) * (1 / (1 + 1/89693)))) *\n (1 + (3 : ℝ) / 8 * ε) * (1 - 4 * (1.000675 : ℝ) ^ 12 / 89693 * ε) ≥\n 1 + 3.36683 * ε - 0.01 * ε ^ 2 := by\n norm_cast; norm_num [Fin.prod_univ_three]\n nlinarith [pow_nonneg hε.left 3, pow_nonneg hε.left 4]\n\n@[blueprint\n \"lem:final-comparison\"\n (title := \"Final polynomial comparison\")\n (statement := /--\n For \\(0 \\le \\varepsilon \\le 1/89693^2\\), we have\n \\[\n 1 + 3.01\\varepsilon + 3.01\\varepsilon^2 + 1.01\\varepsilon^3\n \\le 1 + 3.36683\\varepsilon - 0.01\\varepsilon^2.\n \\]\n -/)\n (proof := /--\n This is equivalent to\n \\[\n 3.01\\varepsilon + 3.01\\varepsilon^2 + 1.01\\varepsilon^3\n \\le 3.36683\\varepsilon - 0.01\\varepsilon^2,\n \\]\n or\n \\[\n 0 \\le (3.36683 - 3.01)\\varepsilon - (3.01+0.01)\\varepsilon^2 - 1.01\\varepsilon^3.\n \\]\n Factor out \\(\\varepsilon\\) and use that \\(0<\\varepsilon \\le 1/89693^2\\) to check that the\n resulting quadratic in \\(\\varepsilon\\) is nonnegative on this interval. Again, this is a\n finite computation that can be verified mechanically.\n -/)\n (latexEnv := \"lemma\")]\ntheorem final_comparison {ε : ℝ} (hε : 0 ≤ ε ∧ ε ≤ 1 / (89693 ^ 2 : ℝ)) :\n 1 + 3.01 * ε + 3.01 * ε ^ 2 + 1.01 * ε ^ 3 ≤ 1 + 3.36683 * ε - 0.01 * ε ^ 2 := by\n nlinarith\n\n@[blueprint\n \"prop:ineq-holds-large-n\"\n (title := \"Verification of \\\\eqref{eq:main-ineq} for large \\\\(n\\\\)\")\n (statement := /-- For every integer \\(n \\ge X_0^2 = 89693^2 \\approx 8.04\\times 10^9\\), the\n primes \\(p_i,q_i\\) constructed in Lemmas~\\ref{lem:choose-pi} and \\ref{lem:choose-qi} satisfy the\n inequality \\eqref{eq:main-ineq}. -/)\n (proof := /-- Combine Lemma~\\ref{lem:qi-product}, Lemma~\\ref{lem:pi-product}, and\n Lemma~\\ref{lem:pq-ratio}. Then apply Lemma~\\ref{lem:eps-bounds} and set \\(\\varepsilon = 1/n\\).\n The products are bounded by the expressions in Lemma~\\ref{lem:poly-ineq}, and the inequality in\n Lemma~\\ref{lem:final-comparison} then ensures that \\eqref{eq:main-ineq} holds. -/)\n (proofUses := [\"lem:eps-bounds\", \"lem:qi-product\", \"lem:final-comparison\", \"lem:poly-ineq\",\n \"lem:pq-ratio\", \"lem:pi-product\"])\n (latexEnv := \"proposition\")\n","line":1267,"end_line":1328,"proof_status":"formalized"} {"id":"diffBddAtZero","label":"diffBddAtZero","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["keyIdentity"],"nlp_text":"Let \\(x{\\gt}0\\). Then for \\(0 {\\lt} c {\\lt} 1 /2\\), we have that the function \\[ s ↦ \\frac{x^s}{s(s+1)} - \\frac1s \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.diffBddAtZero","latex_link":"sect0003.html#diffBddAtZero","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.diffBddAtZero","lean_decl_name":"Perron.diffBddAtZero","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"diffBddAtZero\"\n (title := \"diffBddAtZero\")\n (statement := /--\n Let $x>0$. Then for $0 < c < 1 /2$, we have that the function\n $$\n s ↦ \\frac{x^s}{s(s+1)} - \\frac1s\n $$\n is bounded above on the rectangle with corners at $-c-i*c$ and $c+i*c$ (except at $s=0$).\n -/)\n (proof := /--\n Applying Lemma \\ref{keyIdentity}, the\n function $s ↦ x^s/s(s+1) - 1/s = x^s/s - x^0/s - x^s/(1+s)$. The last term is bounded for $s$\n away from $-1$. The first two terms are the difference quotient of the function $s ↦ x^s$ at\n $0$; since it's differentiable, the difference remains bounded as $s\\to 0$.\n -/)\n (latexEnv := \"lemma\")]\nlemma diffBddAtZero {x : ℝ} (xpos : 0 < x) :\n ∀ᶠ (c : ℝ) in 𝓝[>] 0, BddAbove ((norm ∘ (fun (s : ℂ) ↦ (x : ℂ) ^ s / (s * (s + 1)) - 1 / s)) ''\n (Square 0 c \\ {0})) := by\n\n apply bddAbove_square_of_tendsto\n suffices Tendsto (norm ∘ (fun (s : ℂ) ↦ ↑x ^ s / s - ↑x ^ (0 : ℂ) / s - ↑x ^ s / (1 + s)))\n (𝓝[≠] 0) (𝓝 (‖(deriv (fun (s : ℂ) ↦ (x : ℂ) ^ s) 0) - x ^ (0 : ℂ) / (1 + 0)‖)) by\n apply this.congr'\n filter_upwards [diff_mem_nhdsWithin_compl (isOpen_compl_singleton.mem_nhds\n (Set.mem_compl_singleton_iff.mpr (by norm_num : (0 : ℂ) ≠ -1))) {0}] with s hs\n rw [Function.comp_apply, Function.comp_apply, keyIdentity _ hs.2 hs.1, cpow_zero]; ring_nf\n have hx0 : (x : ℂ) ≠ 0 := slitPlane_ne_zero (.inl xpos)\n refine (Tendsto.sub ?_ (tendsto_nhdsWithin_of_tendsto_nhds ?_)).norm\n · convert hasDerivAt_iff_tendsto_slope.mp\n (differentiableAt_fun_id.const_cpow (.inl hx0)).hasDerivAt using 2\n rw [slope_def_field]; ring\n · exact (continuous_id.const_cpow (.inl hx0)).tendsto 0\n |>.div (tendsto_const_nhds.add tendsto_id) (by norm_num)\n","line":732,"end_line":766,"proof_status":"formalized"} {"id":"MellinOfDeltaSpikeAt1_asymp","label":"MellinOfDeltaSpikeAt1_asymp","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"As \\(\\epsilon \\to 0\\), we have \\[ \\mathcal{M}(\\nu _\\epsilon )(1) = 1+O(\\epsilon ). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfDeltaSpikeAt1_asymp","latex_link":"sect0003.html#MellinOfDeltaSpikeAt1_asymp","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfDeltaSpikeAt1_asymp","lean_decl_name":"MellinOfDeltaSpikeAt1_asymp","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOfDeltaSpikeAt1-asymp\")\n (statement := /--\n As $\\epsilon\\to 0$, we have\n $$\\mathcal{M}(\\nu_\\epsilon)(1) = 1+O(\\epsilon).$$\n -/)\n (proof := /--\n By Lemma \\ref{MellinOfDeltaSpikeAt1},\n $$\n \\mathcal M(\\nu_\\epsilon)(1)=\\mathcal M(\\nu)(\\epsilon)\n $$\n which by Definition \\ref{MellinTransform} is\n $$\n \\mathcal M(\\nu)(\\epsilon)=\\int_0^\\infty\\nu(x)x^{\\epsilon-1}dx\n .\n $$\n Since $\\nu(x) x^{\\epsilon-1}$ is integrable (because $\\nu$ is continuous and compactly\n supported),\n $$\n \\mathcal M(\\nu)(\\epsilon)-\\int_0^\\infty\\nu(x)\\frac{dx}x\n =\\int_0^\\infty\\nu(x)(x^{\\epsilon-1}-x^{-1})dx\n .\n $$\n By Taylor's theorem,\n $$\n x^{\\epsilon-1}-x^{-1}=O(\\epsilon)\n $$\n so, since $\\nu$ is absolutely integrable,\n $$\n \\mathcal M(\\nu)(\\epsilon)-\\int_0^\\infty\\nu(x)\\frac{dx}x=O(\\epsilon)\n .\n $$\n We conclude the proof using Theorem \\ref{SmoothExistence}.\n -/)\n (latexEnv := \"lemma\")]\nlemma MellinOfDeltaSpikeAt1_asymp {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν)\n (suppν : ν.support ⊆ Set.Icc (1 / 2) 2)\n (mass_one : ∫ x in Set.Ioi 0, ν x / x = 1) :\n (fun (ε : ℝ) ↦ (𝓜 (fun x ↦ (ν x : ℂ)) ε) - 1) =O[𝓝[>]0] id := by\n have diff : DifferentiableWithinAt ℝ\n (fun (ε : ℝ) ↦ 𝓜 (fun x ↦ (ν x : ℂ)) ε - 1) (Ioi 0) 0 := by\n apply DifferentiableAt.differentiableWithinAt\n simp only [(differentiableAt_const _).fun_sub_iff_left]\n refine DifferentiableAt.comp_ofReal ?_\n refine mellin_differentiableAt_of_isBigO_rpow (a := 1) (b := -1) ?_ ?_ (by simp) ?_ (by simp)\n · apply (Continuous.continuousOn ?_).locallyIntegrableOn (by simp)\n have := diffν.continuous; continuity\n · apply Asymptotics.IsBigO.trans_le (g' := fun _ ↦ (0 : ℝ)) ?_ (by simp)\n apply BigO_zero_atTop_of_support_in_Icc (a := 1 / 2) (b := 2)\n rwa [ν.support_ofReal]\n · apply Asymptotics.IsBigO.trans_le (g' := fun _ ↦ (0 : ℝ)) ?_ (by simp)\n apply BigO_zero_atZero_of_support_in_Icc (a := 1 / 2) (b := 2) (ha := (by norm_num))\n rwa [ν.support_ofReal]\n have := ofReal_zero ▸ diff.isBigO_sub\n simp only [sub_sub_sub_cancel_right, sub_zero] at this\n convert this\n simp only [mellin, zero_sub, cpow_neg_one, smul_eq_mul]\n rw [← ofReal_one, ← mass_one]; convert integral_ofReal.symm; field_simp; simp\n","line":697,"end_line":754,"proof_status":"formalized"} {"id":"lem:aachcanc","label":"aachcanc","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["e-def"],"nlp_text":"Let \\(s = \\sigma + i \\tau \\), \\(\\sigma ,\\tau \\in \\mathbb {R}\\). Let \\(n\\in \\mathbb {Z}_{{\\gt}0}\\). Let \\(a,b\\in \\mathbb {Z} + \\frac{1}{2}\\), \\(b{\\gt}a{\\gt}\\frac{|\\tau |}{2\\pi n}\\). Write \\(\\varphi _\\nu (t) = \\nu t - \\frac{\\tau }{2\\pi } \\log t\\). Then \\[ \\frac{1}{2} \\sum _{\\nu = \\pm n} \\left. \\frac{t^{-\\sigma } e(\\varphi _\\nu (t))}{2\\pi i \\varphi _\\nu '(t)}\\right|_a^b = \\left. \\frac{(-1)^n t^{-s} \\cdot \\frac{\\tau }{2\\pi t}}{2\\pi i \\left(n^2 - \\left(\\frac{\\tau }{2\\pi t}\\right)^2\\right)}\\right|_a^b. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachcanc","latex_link":"zeta-chapter.html#lem:aachcanc","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachcanc","lean_decl_name":"ZetaAppendix.lemma_aachcanc","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:aachcanc\"\n (title := \"Estimating an sum\")\n (statement := /--\nLet $s = \\sigma + i \\tau$, $\\sigma,\\tau \\in \\mathbb{R}$.\nLet $n\\in \\mathbb{Z}_{>0}$. Let $a,b\\in \\mathbb{Z} + \\frac{1}{2}$,\n$b>a>\\frac{|\\tau|}{2\\pi n}$.\nWrite $\\varphi_\\nu(t) = \\nu t - \\frac{\\tau}{2\\pi} \\log t$.\nThen\n\\[\\frac{1}{2} \\sum_{\\nu = \\pm n}\n \\left. \\frac{t^{-\\sigma} e(\\varphi_\\nu(t))}{2\\pi i \\varphi_\\nu'(t)}\\right|_a^b =\n \\left. \\frac{(-1)^n t^{-s} \\cdot \\frac{\\tau}{2\\pi t}}\n {2\\pi i \\left(n^2 - \\left(\\frac{\\tau}{2\\pi t}\\right)^2\\right)}\\right|_a^b.\n\\]\n-/)\n (proof := /--\nSince $e(\\varphi_\\nu(t)) = e(\\nu t) t^{-i \\tau} = (-1)^{\\nu} t^{-i \\tau}$ for any\nhalf-integer $t$ and any integer $\\nu$,\n\\[\\left. \\frac{t^{-\\sigma} e(\\varphi_\\nu(t))}{2\\pi i \\varphi_\\nu'(t)}\\right|_a^b =\n\\left. \\frac{(-1)^{\\nu} t^{-s}}{2\\pi i \\varphi_\\nu'(t)}\\right|_a^b\n\\]\nfor $\\nu = \\pm n$. Clearly $(-1)^{\\nu} = (-1)^n$.\nSince $\\varphi_\\nu'(t) = \\nu - \\alpha$ for $\\alpha = \\frac{\\tau}{2\\pi t}$,\n\\[\\frac{1}{2} \\sum_{\\nu = \\pm n} \\frac{1}{\\varphi_\\nu'(t)} = \\frac{1/2}{n - \\alpha} +\n\\frac{1/2}{- n - \\alpha} = \\frac{-\\alpha}{\\alpha^2-n^2} = \\frac{\\alpha}{n^2-\\alpha^2}.\n\\]\n-/)\n (latexEnv := \"lemma\")\n (discussion := 551)]\ntheorem lemma_aachcanc (s : ℂ) {n : ℤ} (hn : 0 < n) {a b : ℝ}\n (ha : a > |s.im| / (2 * π * n)) (hb : b > a)\n (ha' : a.IsHalfInteger) (hb' : b.IsHalfInteger) :\n let ϕ : ℝ → ℝ → ℝ := fun ν t ↦ ν * t - (s.im / (2 * π)) * Real.log t\n let Φ : ℝ → ℝ → ℂ := fun ν t ↦\n (t ^ (-s.re) : ℝ) * e (ϕ ν t) / (2 * π * I * (deriv (ϕ ν) t))\n let Ψ : ℝ → ℂ := fun t ↦ (-1) ^ n * (t ^ (-s) : ℂ) * (s.im / (2 * π * t)) /\n (2 * π * I * (n ^ 2 - (s.im / (2 * π * t)) ^ 2))\n (1 / 2) * (Φ n b - Φ n a + Φ (-n) b - Φ (-n) a) = Ψ b - Ψ a := by\n intro phi Φ Ψ\n have h_apply : ∀ t : ℝ, t > |s.im| / (2 * .pi * n) → t.IsHalfInteger → t > 0 →\n (1 / 2) * (Φ n t + Φ (-n) t) = Ψ t := by\n intro t ht ht' ht''\n have h_bound : |s.im| < t * (2 * .pi * n) := by\n rw [gt_iff_lt] at ht; exact (div_lt_iff₀ (by positivity)).mp ht\n convert lemma_aachcanc_pointwise s (show n ≠ 0 by linarith) t ht' ht'' ?_ ?_ ?_ using 1\n all_goals norm_num [mul_comm]\n · norm_num [ht''.ne', pi_ne_zero, mul_comm]\n field_simp\n cases abs_cases s.im <;> nlinarith [pi_pos, h_bound]\n · norm_num [ht''.ne', Real.differentiableAt_log]\n field_simp\n cases abs_cases s.im <;> nlinarith [pi_pos, h_bound]\n · rw [sub_eq_zero, eq_comm]\n norm_num [div_pow, ← mul_assoc, Complex.ext_iff]\n norm_cast\n norm_num\n rw [div_eq_iff (by positivity)]\n rw [abs_lt] at h_bound\n nlinarith [pi_pos]\n have hb_pos : b > 0 := lt_trans (lt_of_le_of_lt (by positivity) ha) hb\n trans (1 / 2) * (Φ n b + Φ (-n) b) - (1 / 2) * (Φ n a + Φ (-n) a)\n · ring\n rw [h_apply b (lt_trans ha hb) hb' hb_pos, h_apply a ha ha' (lt_of_le_of_lt (by positivity) ha)]\n","line":952,"end_line":1014,"proof_status":"formalized"} {"id":"MellinConvolutionSymmetric","label":"MellinConvolutionSymmetric","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinConvolution"],"nlp_text":"Let \\(f\\) and \\(g\\) be functions from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {R}\\) or \\(\\mathbb {C}\\), for \\(x\\neq 0\\), \\[ (f\\ast g)(x)=(g\\ast f)(x) . \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinConvolutionSymmetric","latex_link":"sect0003.html#MellinConvolutionSymmetric","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinConvolutionSymmetric","lean_decl_name":"MellinConvolutionSymmetric","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinConvolutionSymmetric\")\n (statement := /--\n Let $f$ and $g$ be functions from $\\mathbb{R}_{>0}$ to $\\mathbb{R}$ or $\\mathbb{C}$, for $x\\neq0$,\n $$\n (f\\ast g)(x)=(g\\ast f)(x)\n .\n $$\n -/)\n (proof := /--\n By Definition \\ref{MellinConvolution},\n $$\n (f\\ast g)(x) = \\int_0^\\infty f(y)g(x/y)\\frac{dy}{y}\n $$\n in which we change variables to $z=x/y$:\n $$\n (f\\ast g)(x) = \\int_0^\\infty f(x/z)g(z)\\frac{dz}{z}\n =(g\\ast f)(x)\n .\n $$\n -/)\n (latexEnv := \"lemma\")]\nlemma MellinConvolutionSymmetric (f g : ℝ → 𝕂) {x : ℝ} (xpos : 0 < x) :\n MellinConvolution f g x = MellinConvolution g f x := by\n unfold MellinConvolution\n calc\n _ = ∫ y in Ioi 0, f (y * x) * g (1 / y) / y := ?_\n _ = _ := ?_\n · rw [← integral_comp_mul_right_I0i_haar (fun y ↦ f y * g (x / y)) xpos]\n simp [div_mul_cancel_right₀ <| ne_of_gt xpos]\n · convert (integral_comp_inv_I0i_haar fun y ↦ f (y * x) * g (1 / y)).symm using 3\n rw [one_div_one_div, mul_comm, mul_comm_div, one_mul]\n","line":293,"end_line":324,"proof_status":"formalized"} {"id":"thm:dudek2015_rh","label":"dudek2015_rh","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Assuming the Riemann Hypothesis, for \\(x \\geq 2\\), there is a prime in the interval \\[ \\left( x - \\frac{4}{\\pi }\\sqrt{x} \\log x, x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dudek2015RH.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:dudek2015_rh","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dudek2015RH.has_prime_in_interval","lean_decl_name":"Dudek2015RH.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:dudek2015_rh\"\n (title := \"Dudek 2015 under RH\")\n (statement := /-- Assuming the Riemann Hypothesis, for $x \\geq 2$, there is a prime in the interval\n \\[ \\left( x - \\frac{4}{\\pi}\\sqrt{x} \\log x, x \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem Dudek2015RH.has_prime_in_interval (x : ℝ) (hx : x ≥ 2) (RH : RiemannHypothesis) :\n HasPrimeInInterval (x - (4 / π) * sqrt x * log x) ((4 / π) * sqrt x * log x) := by sorry","line":241,"end_line":249,"proof_status":"formalized"} {"id":"initial-factorization-medium-prime-le","label":"initial-factorization-medium-prime-le","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","balance-def"],"nlp_text":"A medium prime \\(\\sqrt{n} {\\lt} p ≤ n/L\\) can be in surplus by at most \\(M\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_medium_prime_le","latex_link":"tertiary-chapter.html#initial-factorization-medium-prime-le","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_medium_prime_le","lean_decl_name":"Erdos392.Params.initial.balance_medium_prime_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-medium-prime-le\"\n (statement := /-- A medium prime $\\sqrt{n} < p ≤ n/L$ can be in surplus by at most $M$.-/)\n (proof := /-- Routine computation using Legendre's formula.-/)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.balance_medium_prime_le (P : Params) {p : ℕ} (hp : p > Real.sqrt P.n) :\n P.initial.balance p ≤ P.M := by\n by_cases hprime : p.Prime\n · have : (P.initial.a.map (·.factorization p)).sum ≤ P.n / p + P.M := by\n calc (P.initial.a.map (·.factorization p)).sum\n _ ≤ P.M * (Finset.filter (p ∣ ·) (.Ico (P.n - P.n / P.M) P.n)).card :=\n sum_valuation_le_M_mul_interval_count P hp\n _ ≤ P.M * ((P.n / P.M + p - 1) / p) := mul_le_mul_left _ <| by\n convert count_multiples_le (P.n - P.n / P.M) P.n p hprime.pos using 1\n rw [Nat.sub_sub_self (div_le_self _ _)]\n _ ≤ P.n / p + P.M := by have := count_bound_aux P.n P.M p; grind\n simp only [Factorization.balance, Factorization.sum, factorial_factorization_eq_div hprime hp]\n omega\n · simp_all [Factorization.balance, Factorization.sum]","line":1112,"end_line":1130,"proof_status":"formalized"} {"id":"bklnw-eq_A_11","label":"bklnw-eq_A_11","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We denote \\[ s_1(b, \\delta , T) = e^{-\\delta b} \\left(\\frac{1}{2\\pi }(\\log (T/2\\pi ))^2 + 1.8642\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.s₁","latex_link":"primary-chapter.html#bklnw-eq_A_11","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.s₁","lean_decl_name":"BKLNW_app.s₁","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_11\"\n (title := \"Equation (A.11)\")\n (statement := /-- We denote\n $$ s_1(b, \\delta, T) = e^{-\\delta b} \\left(\\frac{1}{2\\pi}(\\log(T/2\\pi))^2 + 1.8642\\right). $$ -/)]\nnoncomputable def s₁ (b δ T : ℝ) : ℝ := exp (-δ * b) * (1 / (2 * π) * (log (T / (2 * π)))^2 + 1.8642)","line":77,"end_line":82,"proof_status":"formalized"} {"id":"pi_alt","label":"pi_alt","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi_asymp"],"nlp_text":"One has \\[ \\pi (x) = (1+o(1)) \\frac{x}{\\log x} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pi_alt","latex_link":"sect0005.html#pi_alt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pi_alt","lean_decl_name":"pi_alt","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"pi-alt\")\n (statement := /--\n One has\n $$ \\pi(x) = (1+o(1)) \\frac{x}{\\log x}$$\n as $x \\to \\infty$.\n -/)\n (proof := /--\n An integration by parts gives\n $$ \\int_2^x \\frac{dt}{\\log t} = \\frac{x}{\\log x} - \\frac{2}{\\log 2} +\n \\int_2^x \\frac{dt}{\\log^2 t}.$$\n We have the crude bounds\n $$ \\int_2^{\\sqrt{x}} \\frac{dt}{\\log^2 t} = O( \\sqrt{x} )$$\n and\n $$ \\int_{\\sqrt{x}}^x \\frac{dt}{\\log^2 t} = O( \\frac{x}{\\log^2 x} )$$\n and combining all this we obtain\n $$ \\int_2^x \\frac{dt}{\\log t} = \\frac{x}{\\log x} + O( \\frac{x}{\\log^2 x} )$$\n $$ = (1+o(1)) \\frac{x}{\\log x}$$\n and the claim then follows from Theorem \\ref{pi_asymp}.\n -/)\n (latexEnv := \"corollary\")]\ntheorem pi_alt : ∃ c : ℝ → ℝ, c =o[atTop] (fun _ ↦ (1 : ℝ)) ∧\n ∀ x : ℝ, Nat.primeCounting ⌊x⌋₊ = (1 + c x) * x / log x := by\n obtain ⟨f, hf, h⟩ := pi_asymp\n obtain ⟨f', hf', h'⟩ := integral_div_log_asymptotic\n use (fun x => (log x / x) * ⌊x⌋₊.primeCounting - 1)\n constructor\n · apply IsLittleO.congr' (f₁ := (fun x ↦ f x + f x * f' x + f' x)) _ _ (by rfl)\n · apply IsLittleO.add _ hf'\n apply IsLittleO.add hf\n convert hf.mul hf'\n ring\n · filter_upwards [eventually_ge_atTop 2, h, h'] with x hx h h'\n rw [h, intervalIntegral.integral_of_le hx, ← integral_Icc_eq_integral_Ioc, h']\n have : log x ≠ 0 := by simp; grind\n field\n · intro x\n obtain rfl|hx := eq_or_ne x 0\n · simp\n obtain rfl|hx := eq_or_ne x 1\n · simp\n obtain rfl|hx := eq_or_ne x (-1 : ℝ)\n · simp\n norm_num\n have : log x ≠ 0 := by simp_all\n field\n","line":852,"end_line":897,"proof_status":"formalized"} {"id":"bound-score-3","label":"bound-score-3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi_alt","params-set"],"nlp_text":"If \\(n\\) sufficiently large depending on \\(M, \\varepsilon \\), then \\(\\sum _{p \\leq \\sqrt{n}} M \\log ^2 n / \\log 2 \\leq \\varepsilon n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_3","latex_link":"tertiary-chapter.html#bound-score-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_3","lean_decl_name":"Erdos392.Params.initial.bound_score_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint \"bound-score-3\"\n (statement := /-- If $n$ sufficiently large depending on $M, \\varepsilon$, then\n $\\sum_{p \\leq \\sqrt{n}} M \\log^2 n / \\log 2 \\leq \\varepsilon n$. -/)\n (proof := /-- Crude estimation. -/)\n (discussion := 516)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.bound_score_3 (ε : ℝ) (hε : ε > 0) (M : ℕ) :\n ∀ᶠ n in .atTop, ∀ P : Params,\n P.M = M → P.n = n → ∑ _p ∈ filter (·.Prime) (Finset.Iic ⌊(Real.sqrt P.n)⌋₊),\n P.M * Real.log P.n * Real.log P.n / Real.log 2 ≤ ε * P.n := by\n have h_littleO : (fun x : ℝ ↦ Real.sqrt x * Real.log x) =o[Filter.atTop] (fun x ↦ x) :=\n (isLittleO_mul_iff_isLittleO_div (hf := by\n filter_upwards [Filter.eventually_gt_atTop 0] with x hx; exact sqrt_ne_zero'.mpr hx)).mpr\n (by simp_rw [div_sqrt, sqrt_eq_rpow]; exact isLittleO_log_rpow_atTop one_half_pos)\n obtain ⟨N₀, hN₀⟩ := Metric.tendsto_atTop.mp\n (h_littleO.tendsto_div_nhds_zero.comp tendsto_natCast_atTop_atTop)\n (ε * Real.log 2 / (8 * (M + 1))) (by positivity)\n obtain ⟨N₁, hN₁⟩ := Filter.eventually_atTop.mp <| isLittleO_iff.mp pi_alt' one_half_pos\n filter_upwards [Filter.eventually_ge_atTop (max 16 (max N₀ ((⌈N₁⌉₊ + 1) ^ 2)))] with n hn P hPM hPn\n simp only [hPM, hPn]; have hn16 : n ≥ 16 := le_of_max_le_left hn\n have hnpos : (n : ℝ) > 0 := by positivity\n have hlogn_pos : Real.log n > 0 := log_pos (by exact_mod_cast lt_of_add_left_lt hn16)\n have hsqrt_pos : Real.sqrt n > 0 := sqrt_pos.mpr hnpos\n have hn16' : (16 : ℝ) ≤ n := by exact_mod_cast hn16\n have hsqrt_ge_4 : Real.sqrt n ≥ 4 := by nlinarith [Real.sq_sqrt hnpos.le, sq_nonneg (Real.sqrt n - 4)]\n have hfloor_gt_1 : (1 : ℝ) < ⌊Real.sqrt n⌋₊ := by\n exact_mod_cast lt_of_add_left_lt (le_floor (by linarith : (3 : ℝ) ≤ Real.sqrt n))\n conv_lhs => rw [sum_const, nsmul_eq_mul]\n rw [show (filter Nat.Prime (Finset.Iic ⌊Real.sqrt n⌋₊)).card = primeCounting ⌊Real.sqrt n⌋₊ by\n simp only [primeCounting, primeCounting', card_filter, count_eq_card_filter_range]\n congr 1; ext p; simp only [Finset.mem_Iic, Finset.mem_range, Nat.lt_succ_iff]]\n rcases eq_or_ne M 0 with rfl | hMne; · simp [mul_nonneg hε.le (cast_nonneg _)]\n have hsqrt_N₁ : (⌊Real.sqrt n⌋₊ : ℝ) > N₁ := by\n have hnsq : n ≥ (⌈N₁⌉₊ + 1) ^ 2 := (le_max_right _ _).trans (le_of_max_le_right hn)\n have : Real.sqrt n ≥ ⌈N₁⌉₊ + 1 := by\n calc (⌈N₁⌉₊ : ℝ) + 1 = Real.sqrt (((⌈N₁⌉₊ + 1 : ℕ) : ℝ) ^ 2) := by\n rw [Real.sqrt_sq (cast_nonneg' (⌈N₁⌉₊ + 1))]; simp\n _ ≤ Real.sqrt n := sqrt_le_sqrt (by exact_mod_cast hnsq)\n linarith [le_ceil N₁, sub_one_lt_floor (Real.sqrt n)]\n have hlog_floor_pos : Real.log ⌊Real.sqrt n⌋₊ > 0 := log_pos hfloor_gt_1\n have hπ : (primeCounting ⌊Real.sqrt n⌋₊ : ℝ) ≤ 3 / 2 * (⌊Real.sqrt n⌋₊ / Real.log ⌊Real.sqrt n⌋₊) := by\n have := hN₁ ⌊Real.sqrt n⌋₊ hsqrt_N₁.le\n simp only [Pi.sub_apply, floor_natCast, norm_eq_abs, abs_of_pos (by positivity :\n (0 : ℝ) < ⌊Real.sqrt n⌋₊ / Real.log ⌊Real.sqrt n⌋₊)] at this\n linarith [(abs_le.mp this).2]\n have hlog_floor_ge : Real.log ⌊Real.sqrt n⌋₊ ≥ Real.log n / 4 := by\n have hfloor_ge : (⌊Real.sqrt n⌋₊ : ℝ) ≥ Real.sqrt n / 2 := by linarith [sub_one_lt_floor (Real.sqrt n)]\n calc Real.log ⌊Real.sqrt n⌋₊ ≥ log (Real.sqrt n / 2) := log_le_log (by positivity) hfloor_ge\n _ = Real.log n / 2 - Real.log 2 := by rw [log_div hsqrt_pos.ne' two_ne_zero, log_sqrt hnpos.le]\n _ ≥ Real.log n / 4 := by\n have : Real.log n ≥ 4 * Real.log 2 := by\n calc Real.log n ≥ Real.log 16 := log_le_log ofNat_pos' <| ofNat_le_cast.mpr hn16\n _ = 4 * Real.log 2 := by rw [show (16 : ℝ) = 2 ^ 4 by norm_num, Real.log_pow]; ring\n linarith\n have hbound := hN₀ n ((le_max_left ..).trans (le_of_max_le_right hn))\n simp only [Function.comp_apply, Real.dist_eq, sub_zero] at hbound\n have h_sqrt_log : Real.sqrt n * Real.log n < ε * Real.log 2 * n / (8 * (M + 1)) := by\n have : Real.sqrt n * Real.log n / n < ε * Real.log 2 / (8 * (M + 1)) := by\n linarith [(abs_lt.mp hbound).2, (by positivity : Real.sqrt n * Real.log n / n ≥ 0)]\n calc Real.sqrt n * Real.log n = Real.sqrt n * Real.log n / n * n := by field_simp\n _ < ε * Real.log 2 / (8 * (M + 1)) * n := by gcongr\n _ = _ := by ring\n calc (primeCounting ⌊Real.sqrt n⌋₊ : ℝ) * (M * Real.log n * Real.log n / Real.log 2)\n ≤ 3 / 2 * (⌊Real.sqrt n⌋₊ / Real.log ⌊Real.sqrt n⌋₊) *\n (M * Real.log n * Real.log n / Real.log 2) := by gcongr\n _ ≤ 3 / 2 * (Real.sqrt n / (Real.log n / 4)) *\n (M * Real.log n * Real.log n / Real.log 2) := by gcongr; exact floor_le hsqrt_pos.le\n _ = 6 * M * Real.sqrt n * Real.log n / Real.log 2 := by field_simp; ring\n _ ≤ 8 * (M + 1) * Real.sqrt n * Real.log n / Real.log 2 := by\n have h6le8 : (6 : ℝ) * M ≤ 8 * (M + 1) := by exact_mod_cast (by omega : 6 * M ≤ 8 * (M + 1))\n have := hlogn_pos; gcongr\n _ ≤ ε * n := by\n rw [div_le_iff₀ (log_pos one_lt_two)]\n calc 8 * (M + 1) * Real.sqrt n * Real.log n\n ≤ 8 * (M + 1) * (ε * Real.log 2 * n / (8 * (M + 1))) := le_of_lt (by nlinarith [h_sqrt_log])\n _ = ε * n * Real.log 2 := by field_simp","line":2011,"end_line":2086,"proof_status":"formalized"} {"id":"prime_between","label":"prime_between","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi_alt"],"nlp_text":"For every \\(\\varepsilon {\\gt}0\\), there is a prime between \\(x\\) and \\((1+\\varepsilon )x\\) for all sufficiently large \\(x\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prime_between","latex_link":"sect0005.html#prime_between","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prime_between","lean_decl_name":"prime_between","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"prime-between\")\n (statement := /-- For every $\\eps>0$, there is a prime between $x$ and $(1+\\eps)x$ for\n all sufficiently large $x$. -/)\n (proof := /-- Use Corollary \\ref{pi_alt} to show that $\\pi((1+\\eps)x) - \\pi(x)$ goes to infinity\n as $x \\to \\infty$. -/)\n (latexEnv := \"corollary\")]\ntheorem prime_between {ε : ℝ} (hε : 0 < ε) :\n ∀ᶠ x : ℝ in atTop, ∃ p : ℕ, Nat.Prime p ∧ x < p ∧ p < (1 + ε) * x := by\n have squeeze := tendsto_by_squeeze (ε/2) (by linarith)\n rw [Filter.tendsto_iff_forall_eventually_mem] at squeeze\n specialize squeeze (Set.Ici 1) (by exact Ici_mem_atTop 1)\n simp only [Set.mem_Ici, eventually_atTop, ge_iff_le] at squeeze\n obtain ⟨a, ha⟩ := squeeze\n rw [eventually_atTop]\n use (max a 1)\n intro b hb\n rw [ge_iff_le, sup_le_iff] at hb\n specialize ha b hb.1\n\n have val_lt : (⌊b⌋₊.primeCounting : ℝ) < ⌊(1 + ε/2) * b⌋₊.primeCounting := by linarith\n norm_cast at val_lt\n\n have jump := prime_in_gap b ((1 + ε/2) * b) (by linarith) val_lt\n obtain ⟨p, hp, b_lt_p, p_le⟩ := jump\n have p_lt: p < (1 + ε) * b := by\n linarith\n use p\n","line":1552,"end_line":1579,"proof_status":"formalized"} {"id":"pn_asymptotic","label":"pn_asymptotic","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pi_alt"],"nlp_text":"One has \\[ p_n = (1+o(1)) n \\log n \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pn_asymptotic","latex_link":"sect0005.html#pn_asymptotic","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pn_asymptotic","lean_decl_name":"pn_asymptotic","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"pn-asymptotic\")\n (statement := /--\n One has\n $$ p_n = (1+o(1)) n \\log n$$\n as $n \\to \\infty$.\n -/)\n (proof := /--\n Use Corollary \\ref{pi_alt} to show that $n=\\pi(p_n)\\sim p_n/\\log p_n$\n Taking logs gives $\\log n \\sim \\log p_n - \\log\\log p_n \\sim \\log p_n$.\n Multiplying these gives $p_n\\sim n\\log n$ from which the result follows.\n -/)\n (latexEnv := \"proposition\")]\ntheorem pn_asymptotic : ∃ c : ℕ → ℝ, c =o[atTop] (fun _ ↦ (1 : ℝ)) ∧\n ∀ n : ℕ, n > 1 → Nat.nth Nat.Prime n = (1 + c n) * n * log n := by\n let c : ℕ → ℝ := fun n ↦ (Nat.nth Nat.Prime n) / (n * log n) - 1\n refine ⟨c, ?_, ?_⟩\n swap\n · intro n hn\n have : log n ≠ 0 := by rw [Real.log_ne_zero]; rify at hn; grind\n simp [c]\n field_simp\n apply isLittleO_of_tendsto\n · simp\n simp only [div_one]\n unfold c\n have := isEquivalent_iff_tendsto_one ?_|>.mp nth_prime_asymp\n swap\n · filter_upwards [eventually_ge_atTop 2] with n hn\n simp\n norm_cast\n grind\n convert this.add_const (-1 : ℝ) using 2\n norm_num\n","line":966,"end_line":999,"proof_status":"formalized"} {"id":"pn_pn_plus_one","label":"pn_pn_plus_one","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["pn_asymptotic"],"nlp_text":"We have \\(p_{n+1} - p_n = o(p_n)\\) as \\(n \\to \\infty \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pn_pn_plus_one","latex_link":"sect0005.html#pn_pn_plus_one","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/pn_pn_plus_one","lean_decl_name":"pn_pn_plus_one","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"pn-pn-plus-one\")\n (statement := /--\n We have $p_{n+1} - p_n = o(p_n)$\n as $n \\to \\infty$.\n -/)\n (proof := /-- Easy consequence of preceding proposition. -/)\n (latexEnv := \"corollary\")]\ntheorem pn_pn_plus_one : ∃ c : ℕ → ℝ, c =o[atTop] (fun _ ↦ (1 : ℝ)) ∧\n ∀ n : ℕ, Nat.nth Nat.Prime (n + 1) - Nat.nth Nat.Prime n = (c n) * Nat.nth Nat.Prime n := by\n use (fun n => (Nat.nth Nat.Prime (n+1) - Nat.nth Nat.Prime n) / Nat.nth Nat.Prime n)\n refine ⟨?_, ?_⟩\n · obtain ⟨k, k_o1, p_n_eq⟩ := pn_asymptotic\n simp only [isLittleO_one_iff]\n rw [Filter.tendsto_congr' (f₂ := fun n ↦\n ((1 + k (n+1))*(n+1)*log (n+1) - (1 + k n)*n*log n) / ((1 + k n)*n*log n))]\n swap\n · simp only [EventuallyEq, eventually_atTop, ge_iff_le]\n use 2; intro n hn\n rw [p_n_eq n (by linarith), p_n_eq (n+1) (by linarith)]\n grind\n simp_rw [sub_div]\n have zero_eq_minus: (0 : ℝ) = 1 - 1 := by\n simp\n rw [zero_eq_minus]\n apply Filter.Tendsto.sub\n · conv =>\n arg 1\n intro n\n equals ((1 + k (n + 1)) / (1 + k n) ) * ((↑n + 1) * log (↑n + 1) / (↑n * log ↑n)) =>\n field_simp\n nth_rw 6 [← (one_mul 1)]\n apply Filter.Tendsto.mul\n · have one_div: nhds 1 = nhds ((1: ℝ) / 1) := by simp\n rw [one_div]\n apply Filter.Tendsto.div\n · nth_rw 3 [← (AddMonoid.add_zero 1)]\n apply Filter.Tendsto.add\n · simp\n · rw [Filter.tendsto_add_atTop_iff_nat]\n rw [Asymptotics.isLittleO_iff_tendsto] at k_o1\n · simp only [div_one] at k_o1\n exact k_o1\n · simp\n · nth_rw 2 [← (AddMonoid.add_zero 1)]\n apply Filter.Tendsto.add\n · simp\n · rw [Asymptotics.isLittleO_iff_tendsto] at k_o1\n · simp only [div_one] at k_o1\n exact k_o1\n · simp\n\n simp\n · conv =>\n arg 1\n intro x\n equals ((↑x + 1) / x) * (log (↑x + 1) / (log ↑x)) =>\n field_simp\n nth_rw 3 [← (one_mul 1)]\n apply Filter.Tendsto.mul\n · simp_rw [add_div]\n nth_rw 2 [← (AddMonoid.add_zero 1)]\n apply Filter.Tendsto.add\n · rw [← Filter.tendsto_add_atTop_iff_nat 1]\n field_simp\n simp\n · simp only [one_div]\n exact tendsto_inv_atTop_nhds_zero_nat\n · have log_eq: ∀ (n: ℕ), log (↑n + 1) = log ↑n + log (1 + 1/n) := by\n intro n\n by_cases n_eq_zero: n = 0\n · simp [n_eq_zero]\n · calc\n _ = log (n * (1 + 1 / n)) := by field_simp\n _ = log n + log (1 + 1/n) := by\n rw [Real.log_mul]\n · simpa\n · simp only [one_div, ne_eq]\n positivity\n\n simp_rw [log_eq]\n simp_rw [add_div]\n nth_rw 3 [← (AddMonoid.add_zero 1)]\n apply Filter.Tendsto.add\n · rw [← Filter.tendsto_add_atTop_iff_nat 2]\n have log_not_zero: ∀ n: ℕ, log (n + 2) ≠ 0 := by\n intro n\n simp only [ne_eq, log_eq_zero, not_or]\n refine ⟨?_, ?_, ?_⟩\n · norm_cast\n · norm_cast\n simp\n · norm_cast\n simp [log_not_zero]\n · rw [← Filter.tendsto_add_atTop_iff_nat 2]\n apply squeeze_zero (g := fun (n: ℕ) => (log 2 / log (n + 2)))\n · intro n\n have log_plus_nonzero: 0 ≤ log (1 + 1 / ↑(n + 2)) := by\n apply log_nonneg\n simp only [cast_add, cast_ofNat, one_div, le_add_iff_nonneg_right, inv_nonneg]\n norm_cast\n simp only [le_add_iff_nonneg_left, _root_.zero_le]\n exact div_nonneg log_plus_nonzero (log_natCast_nonneg (n + 2))\n · intro n\n norm_cast\n have log_le_2: log (1 + 1 / ↑(n + 2)) ≤ log 2 := by\n apply Real.log_le_log\n · positivity\n · have two_eq_one_plus_one: (2 : ℝ) = 1 + 1 := by\n norm_num\n rw [two_eq_one_plus_one]\n simp only [cast_add, cast_ofNat, one_div, add_le_add_iff_left, ge_iff_le]\n apply inv_le_one_of_one_le₀\n linarith\n\n rw [div_le_div_iff_of_pos_right]\n · exact log_le_2\n · apply Real.log_pos\n norm_cast\n simp\n · apply Filter.Tendsto.div_atTop (l := atTop) (a := log 2)\n · simp\n · norm_cast\n have shift_fn :=\n Filter.tendsto_add_atTop_iff_nat (f := fun n => log (n)) (l := atTop) 2\n rw [shift_fn]\n apply Filter.Tendsto.comp Real.tendsto_log_atTop\n exact tendsto_natCast_atTop_atTop\n\n · have eventually_nonzero: ∃ t, t > 2 ∧ ∀ n, 1 + k (n + t) ≠ 0 := by\n rw [Asymptotics.isLittleO_iff_tendsto] at k_o1\n · rw [NormedAddCommGroup.tendsto_nhds_zero] at k_o1\n specialize k_o1 ((1 : ℝ) / 2)\n simp only [one_div, gt_iff_lt, inv_pos, ofNat_pos, div_one, norm_eq_abs, eventually_atTop,\n ge_iff_le, forall_const] at k_o1\n obtain ⟨a, ha⟩ := k_o1\n use (a + 3)\n refine ⟨by simp, ?_⟩\n intro n\n specialize ha (n + (a + 3))\n have a_le_plus: a ≤ n + (a + 3) := by omega\n simp only [a_le_plus, forall_const] at ha\n\n by_contra!\n rw [add_eq_zero_iff_eq_neg] at this\n rw [← abs_neg] at ha\n rw [← this] at ha\n simp only [abs_one] at ha\n have two_inv_lt := inv_lt_one_of_one_lt₀ (a := (2 : ℝ)) (by simp)\n linarith\n · simp\n\n obtain ⟨t, t_gt_2, ht⟩ := eventually_nonzero\n rw [← Filter.tendsto_add_atTop_iff_nat t]\n have denom_nonzero: ∀ n, ((1 + k (n + t)) * ↑(n + t) * log ↑(n + t)) ≠ 0 := by\n intro n\n simp only [cast_add, ne_eq, _root_.mul_eq_zero, log_eq_zero, not_or]\n refine ⟨⟨?_, ?_⟩, ?_, ?_⟩\n · exact ht n\n · norm_cast\n omega\n · norm_cast\n omega\n · refine ⟨?_, by norm_cast⟩\n norm_cast\n omega\n conv =>\n arg 1\n intro n\n rw [div_self (denom_nonzero n)]\n simp\n · intro n\n have nth_nonzero: Nat.nth Nat.Prime n ≠ 0 := by\n exact Nat.Prime.ne_zero (prime_nth_prime n)\n simp [nth_nonzero]\n","line":1002,"end_line":1176,"proof_status":"formalized"} {"id":"Dusart_lemma_5_14","label":"Dusart_lemma_5_14","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have for \\(k \\geq 178974\\), \\[ p_k \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 1.95}{\\log k}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_5_14","latex_link":"secondary-chapter.html#Dusart_lemma_5_14","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_5_14","lean_decl_name":"Dusart.lemma_5_14","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_lemma_5_14\"\n (title := \"Dusart Lemma 5.14\")\n (statement := /--\n We have for $k \\geq 178974$,\n \\[\n p_k \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 1.95}{\\log k}.\n \\]\n -/)\n (latexEnv := \"lemma\")]\ntheorem lemma_5_14 {k : ℕ} (hk : k ≥ 178974) :\n nth Nat.Prime k ≤ k * Real.log k + Real.log (Real.log k) - 1 + (Real.log (Real.log k) - 1.95) / (Real.log k) := by sorry\n","line":468,"end_line":478,"proof_status":"formalized"} {"id":"mobius-lemma-2-sub-1","label":"mobius-lemma-2-sub-1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["M-def"],"nlp_text":"For any \\(K \\leq x\\), \\[ \\sum _{k\\leq x} M\\left(\\sqrt{\\frac{x}{k}}\\right) = \\sum _{k\\leq K} M\\left(\\sqrt{\\frac{x}{k}}\\right) + \\sum _{K {\\lt} k\\leq x+1} \\int _{k-\\frac{1}{2}}^{k+\\frac{1}{2}} M\\left(\\sqrt{\\frac{x}{k}}\\right) du. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_2_sub_1","latex_link":"primary-chapter.html#mobius-lemma-2-sub-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_2_sub_1","lean_decl_name":"MobiusLemma.mobius_lemma_2_sub_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MobiusLemma.lean","lean4_code":"@[blueprint\n \"mobius-lemma-2-sub-1\"\n (title := \"Mobius Lemma 2 - first step\")\n (statement := /--\n For any $K \\leq x$,\n $$\n \\sum_{k\\leq x} M\\left(\\sqrt{\\frac{x}{k}}\\right) = \\sum_{k\\leq K} M\\left(\\sqrt{\\frac{x}{k}}\\right)\n + \\sum_{K < k\\leq x+1} \\int_{k-\\frac{1}{2}}^{k+\\frac{1}{2}}\n M\\left(\\sqrt{\\frac{x}{k}}\\right) du.\n $$\n -/)\n (proof := /-- This is just splitting the sum at $K$. -/)\n (latexEnv := \"sublemma\")\n (discussion := 528)]\ntheorem mobius_lemma_2_sub_1 (x : ℝ) (hx : x > 0) (K : ℕ) (hK : (K : ℝ) ≤ x) :\n ∑ k ∈ Ioc 0 ⌊x⌋₊, M (sqrt (x / k)) = ∑ k ∈ range (K + 1), M (sqrt (x / k)) +\n ∑ k ∈ Ico (K + 1) (⌊x⌋₊ + 2), ∫ _ in (k - 0.5)..(k + 0.5), (M (sqrt (x / k)) : ℝ) := by\n norm_num [sum_Ico_eq_sub]\n rw [sum_range_add_sum_Ico]\n · erw [← Icc_succ_left_eq_Ioc, sum_Ico_eq_sub _]\n · norm_num [Finset.sum_range_succ, M]\n rw [Nat.floor_eq_zero.mpr]\n · norm_num\n · rw [div_lt_one (by positivity), sqrt_lt_sqrt_iff] <;> linarith [Nat.lt_floor_add_one x]\n · simp\n · linarith [Nat.le_floor hK]\n","line":401,"end_line":426,"proof_status":"formalized"} {"id":"fks2-theorem-6-2","label":"fks2-theorem-6-2","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"With the hypotheses of Theorem 9.6.2, for all \\(x \\geq x_1\\) we have \\[ \\frac{\\log x}{x} \\int _{x_1}^x \\frac{dt}{\\log ^2 t} {\\lt} \\frac{1}{\\log x_1 + \\log \\log x_1 - 1}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6_2","latex_link":"secondary-chapter.html#fks2-theorem-6-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.theorem_6_2","lean_decl_name":"FKS2.theorem_6_2","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"@[blueprint\n \"fks2-theorem-6-2\"\n (title := \"FKS2 Theorem 6, substep 2\")\n (statement := /-- With the hypotheses of Theorem \\ref{fks2-theorem-6}, for all $x \\geq x_1$ we have\n $$ \\frac{\\log x}{x} \\int_{x_1}^x \\frac{dt}{\\log^2 t} < \\frac{1}{\\log x_1 + \\log \\log x_1 - 1}. $$ -/)\n (proof := /-- Call the left-hand side $f(x)$. We have\n $$ f(x) = \\frac{\\log x}{x} \\left( \\mathrm{Li}(x) - \\frac{x}{\\log x} - \\mathrm{Li}(x_1) + \\frac{x_1}{\\log x_1} \\right). $$\n Using integration by parts, its derivative can be written as\n $$ f'(x) = -\\frac{1}{x \\log^2 x} + \\frac{2}{x \\log^3 x} + \\frac{\\log x - 1}{x^2} \\left( \\frac{x_1}{\\log^2 x_1} + \\frac{2 x_1}{\\log^3 x_1} - \\int_{x_1}^x \\frac{6}{\\log^4 t} dt \\right). $$\n From which we see that $f'(x_1) = \\frac{1}{\\log x_1} > 0$, and that $f'(x)$ is eventually negative. Thus there exists a critical point for $f(x)$ to the right of $x_1$. Moreover, by bounding $\\int_{x_1}^x \\frac{6}{\\log^4 t} dt < 6 \\frac{x - x_1}{\\log^4 x_1}$, one finds that $f'(x_1 \\log x_1) > 0$ if $x_1 > e$.\n Now we write $f'(x) = \\frac{f_1(x)}{x^2}$ with\n $$ f_1(x) = \\frac{x}{\\log x} - (\\log x - 1) \\int_{x_1}^x \\frac{1}{\\log^2 t} dt. $$\n Its derivative is $f_1'(x) = -\\frac{1}{x} \\int_{x_1}^x \\frac{1}{\\log^2 t} dt$, which is negative for $x > x_1$. Thus $f_1(x)$ decreases and vanishes at most once, giving $f(x)$ at most one critical point, $x_m > x_1$, which is then the maximum of $f(x)$. In other words, $x_m$ satisfies $f_1(x_m) = 0$, i.e.\\ $\\mathrm{Li}(x_m) - \\mathrm{Li}(x_1) + \\frac{x_1}{\\log x_1} = -\\frac{x_m}{1 - \\log x_m}$, which shows that $f(x)$ attains its maximum at $x = x_m$, where\n $$ f(x_m) = \\frac{\\log x_m}{x_m} \\left( -\\frac{x_m}{\\log x_m} - \\frac{x_m}{1 - \\log x_m} \\right) = \\frac{1}{\\log x_m - 1}. $$\n Now, because $x_m > x_1 \\log x_1$ we obtain the bound\n $$ f(x) < \\frac{1}{\\log x_1 + \\log(\\log x_1) - 1}, $$\n which gives the announced result.\n -/)\n (latexEnv := \"sublemma\")\n (discussion := 716)]\ntheorem theorem_6_2 {x₁ : ℝ} (h : x₁ ≥ 14) (x : ℝ) (hx : x ≥ x₁) :\n (log x / x) * ∫ t in x₁..x, 1 / (log t) ^ 2 < 1 / (log x₁ + log (log x₁) - 1) :=\n sorry","line":628,"end_line":650,"proof_status":"statement_formalized"} {"id":"RectangleBorder","label":"RectangleBorder","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"A Rectangle’s border, given corners \\(z\\) and \\(w\\) is the union of the four sides.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleBorder","latex_link":"sect0003.html#RectangleBorder","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleBorder","lean_decl_name":"RectangleBorder","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Rectangle.lean","lean4_code":"/-- A `RectangleBorder` has corners `z` and `w`. -/\n@[blueprint\n (title := \"RectangleBorder\")\n (statement := /-- A Rectangle's border, given corners $z$ and $w$ is the union of the four sides. -/)]\ndef RectangleBorder (z w : ℂ) : Set ℂ := [[z.re, w.re]] ×ℂ {z.im} ∪ {z.re} ×ℂ [[z.im, w.im]] ∪ [[z.re, w.re]] ×ℂ {w.im} ∪ {w.re} ×ℂ [[z.im, w.im]]\n","line":30,"end_line":34,"proof_status":"formalized"} {"id":"VerticalIntegral","label":"VerticalIntegral","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(f\\) be a function from \\(\\mathbb {C}\\) to \\(\\mathbb {C}\\), and let \\(\\sigma \\) be a real number. Then we define \\[ \\int _{(\\sigma )}f(s)ds = \\int _{\\sigma -i\\infty }^{\\sigma +i\\infty }f(s)ds. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/VerticalIntegral","latex_link":"sect0003.html#VerticalIntegral","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/VerticalIntegral","lean_decl_name":"VerticalIntegral","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"@[blueprint\n (title := \"VerticalIntegral\")\n (statement := /--\n Let $f$ be a function from $\\mathbb{C}$ to $\\mathbb{C}$, and let $\\sigma$ be a real number.\n Then we define\n $$\\int_{(\\sigma)}f(s)ds = \\int_{\\sigma-i\\infty}^{\\sigma+i\\infty}f(s)ds.$$\n -/)]\nnoncomputable def VerticalIntegral (f : ℂ → E) (σ : ℝ) : E := I • ∫ t : ℝ, f (σ + t * I)\n","line":68,"end_line":75,"proof_status":"formalized"} {"id":"vertIntBoundLeft","label":"vertIntBoundLeft","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["VerticalIntegral"],"nlp_text":"Let \\(x{\\gt}1\\) and \\(\\sigma {\\lt}-3/2\\). Then \\[ \\left| \\int _{(\\sigma )}\\frac{x^s}{s(s+1)}ds\\right| \\leq x^\\sigma \\int _\\mathbb {R}\\frac{1}{|(1/4+t ^2)(2+t ^2)|^{1/2}}dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.vertIntBoundLeft","latex_link":"sect0003.html#vertIntBoundLeft","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.vertIntBoundLeft","lean_decl_name":"Perron.vertIntBoundLeft","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"vertIntBoundLeft\"\n (title := \"vertIntBoundLeft\")\n (statement := /--\n Let $x>1$ and $\\sigma<-3/2$. Then\n $$\\left|\n \\int_{(\\sigma)}\\frac{x^s}{s(s+1)}ds\\right| \\leq\n x^\\sigma \\int_\\R\\frac{1}{|(1/4+t ^ 2)(2+t ^ 2)|^{1/2}}dt.$$\n -/)\n (proof := /-- Triangle inequality and pointwise estimate. -/)\n (latexEnv := \"lemma\")]\nlemma vertIntBoundLeft (xpos : 0 < x) :\n ∃ C, ∀ (σ : ℝ) (_ : σ < -3 / 2), ‖VerticalIntegral' (f x) σ‖ ≤ C * x ^ σ := by\n\n /- This proof is adapted from `vertIntBound` -/\n use 1 / (2 * π) * ‖(∫ (t : ℝ), 1 / ((4⁻¹ + t ^ 2).sqrt * (4⁻¹ + t ^ 2).sqrt : ℂ))‖\n intro σ hσ\n simp only [VerticalIntegral', smul_eq_mul, norm_mul]\n rw [(by simp [pi_nonneg] : ‖1 / (2 * ↑π * I)‖ = 1 / (2 * π)), mul_assoc]\n apply (mul_le_mul_iff_right₀ (by simp [pi_pos])).mpr\n calc\n _ = ‖∫ (t : ℝ), x ^ (σ + t * I) / ((σ + t * I) * (σ + t * I + 1))‖ := ?_\n _ ≤ ∫ (t : ℝ), ‖x ^ (σ + t * I) / ((σ + t * I) * (σ + t * I + 1))‖ :=\n norm_integral_le_integral_norm _\n _ = ∫ (t : ℝ), x ^ σ / ‖((σ + t * I) * (σ + t * I + 1))‖ := ?_\n _ = x ^ σ * ∫ (t : ℝ), 1 / (‖σ + t * I‖ * ‖σ + t * I + 1‖) := ?_\n _ ≤ x ^ σ * ∫ (t : ℝ), 1 / ((4⁻¹ + t ^ 2).sqrt * (4⁻¹ + t ^ 2).sqrt) := ?_\n _ ≤ _ := ?_\n · simp [VerticalIntegral]\n · congr with t\n rw [norm_div, Complex.norm_cpow_eq_rpow_re_of_pos xpos, add_re, ofReal_re,\n re_ofReal_mul, I_re, mul_zero, add_zero]\n · simp_rw [div_eq_mul_inv, integral_const_mul, one_mul, norm_mul]\n · gcongr x ^ σ * ?_\n by_cases hint : Integrable fun (a : ℝ) ↦ 1 / (‖σ + ↑a * I‖ * ‖σ + ↑a * I + 1‖)\n swap\n · rw [integral_undef hint]\n exact integral_nonneg <| fun t ↦ by simp only [Pi.zero_apply]; positivity\n apply integral_mono hint\n · have := integralPosAux' (4⁻¹) (4⁻¹) (by norm_num) (by norm_num)\n contrapose! this\n simp_rw [integral_undef this, le_rfl]\n rw [Pi.le_def]\n intro t\n gcongr <;> apply sqrt_le_sqrt\n · rw [normSq_add_mul_I, add_le_add_iff_right]; ring_nf; nlinarith\n · rw [(by push_cast; ring : σ + t * I + 1 = ofReal (σ + 1) + t * I),\n normSq_add_mul_I, add_le_add_iff_right]; ring_nf; nlinarith\n · rw [mul_comm]\n gcongr\n · have : 0 ≤ ∫ (t : ℝ), 1 / (sqrt (4⁻¹ + t ^ 2) * sqrt (4⁻¹ + t ^ 2)) := by positivity\n rw [← norm_of_nonneg this, ← Complex.norm_real]\n apply le_of_eq; congr; norm_cast; exact integral_ofReal.symm\n","line":425,"end_line":477,"proof_status":"formalized"} {"id":"DiffVertRect_eq_UpperLowerUs","label":"DiffVertRect_eq_UpperLowerUs","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["VerticalIntegral","RectangleIntegral","UpperUIntegral","LowerUIntegral"],"nlp_text":"The difference of two vertical integrals and a rectangle is the difference of an upper and a lower U integrals.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DiffVertRect_eq_UpperLowerUs","latex_link":"sect0003.html#DiffVertRect_eq_UpperLowerUs","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DiffVertRect_eq_UpperLowerUs","lean_decl_name":"DiffVertRect_eq_UpperLowerUs","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"@[blueprint\n (title := \"DiffVertRect-eq-UpperLowerUs\")\n (statement := /--\n The difference of two vertical integrals and a rectangle is the difference of an upper and a\n lower U integrals.\n -/)\n (proof := /-- Follows directly from the definitions. -/)\n (proofUses := [\"UpperUIntegral\", \"LowerUIntegral\"])\n (latexEnv := \"lemma\")]\nlemma DiffVertRect_eq_UpperLowerUs {σ σ' T : ℝ}\n (f_int_σ : Integrable (fun (t : ℝ) ↦ f (σ + t * I)))\n (f_int_σ' : Integrable (fun (t : ℝ) ↦ f (σ' + t * I))) :\n (VerticalIntegral f σ') - (VerticalIntegral f σ) - (RectangleIntegral f (σ - I * T) (σ' + I * T)) =\n (UpperUIntegral f σ σ' T) - (LowerUIntegral f σ σ' T) := by\n rw [verticalIntegral_split_three (-T) T f_int_σ, verticalIntegral_split_three (-T) T f_int_σ']\n -- step 1: unfold defs\n simp only [RectangleIntegral, UpperUIntegral, LowerUIntegral]\n -- step 2: take real and imaginary parts (in indices)\n simp only [sub_re, mul_re, I_re, add_re, ofReal_re, I_im, ofReal_im, sub_im, mul_im, add_im]\n -- step 3: normalize indices\n ring_nf\n -- step 4: normalize expressions in `E`\n abel\n","line":91,"end_line":113,"proof_status":"formalized"} {"id":"RectangleIntegral_tendsTo_VerticalIntegral","label":"RectangleIntegral_tendsTo_VerticalIntegral","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["VerticalIntegral","RectangleIntegral"],"nlp_text":"Let \\(\\sigma ,\\sigma ' \\in \\mathbb {R}\\), and \\(f : \\mathbb {C} \\to \\mathbb {C}\\) such that the vertical integrals \\(\\int _{(\\sigma )}f(s)ds\\) and \\(\\int _{(\\sigma ')}f(s)ds\\) exist and the horizontal integral \\(\\int _{(\\sigma )}^{\\sigma '}f(x + yi)dx\\) vanishes as \\(y \\to \\pm \\infty \\). Then the limit of rectangle integrals \\[ \\lim _{T\\to \\infty }\\int _{\\sigma -iT}^{\\sigma '+iT}f(s)ds = \\int _{(\\sigma ')}f(s)ds - \\int _{(\\sigma )}f(s)ds. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral_tendsTo_VerticalIntegral","latex_link":"sect0003.html#RectangleIntegral_tendsTo_VerticalIntegral","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral_tendsTo_VerticalIntegral","lean_decl_name":"RectangleIntegral_tendsTo_VerticalIntegral","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"RectangleIntegral-tendsTo-VerticalIntegral\")\n (statement := /--\n Let $\\sigma,\\sigma' \\in \\mathbb{R}$, and $f : \\mathbb{C} \\to \\mathbb{C}$ such that\n the vertical integrals $\\int_{(\\sigma)}f(s)ds$ and $\\int_{(\\sigma')}f(s)ds$ exist and\n the horizontal integral $\\int_{(\\sigma)}^{\\sigma'}f(x + yi)dx$ vanishes as $y \\to \\pm \\infty$.\n Then the limit of rectangle integrals\n $$\\lim_{T\\to\\infty}\\int_{\\sigma-iT}^{\\sigma'+iT}f(s)ds =\n \\int_{(\\sigma')}f(s)ds - \\int_{(\\sigma)}f(s)ds.$$\n -/)\n (proof := /-- Almost by definition. -/)\n (proofUses := [\"RectangleIntegral\"])\n (latexEnv := \"lemma\")]\nlemma RectangleIntegral_tendsTo_VerticalIntegral {σ σ' : ℝ} {f : ℂ → ℂ}\n (hbot : Tendsto (fun (y : ℝ) ↦ ∫ (x : ℝ) in σ..σ', f (x + y * I)) atBot (𝓝 0))\n (htop : Tendsto (fun (y : ℝ) ↦ ∫ (x : ℝ) in σ..σ', f (x + y * I)) atTop (𝓝 0))\n (hleft : Integrable (fun (y : ℝ) ↦ f (σ + y * I)))\n (hright : Integrable (fun (y : ℝ) ↦ f (σ' + y * I))) :\n Tendsto (fun (T : ℝ) ↦ RectangleIntegral f (σ - I * T) (σ' + I * T)) atTop\n (𝓝 (VerticalIntegral f σ' - VerticalIntegral f σ)) := by\n simp only [RectangleIntegral, sub_re, ofReal_re, mul_re, I_re, zero_mul, I_im, ofReal_im,\n mul_zero, sub_self, sub_zero, add_re, add_zero, sub_im, mul_im, one_mul, zero_add, zero_sub,\n add_im]\n apply Tendsto.sub\n · rewrite [← zero_add (VerticalIntegral _ _), ← zero_sub_zero]\n apply Tendsto.add <| Tendsto.sub (hbot.comp tendsto_neg_atTop_atBot) htop\n exact (intervalIntegral_tendsto_integral hright tendsto_neg_atTop_atBot tendsto_id).const_smul I\n · exact (intervalIntegral_tendsto_integral hleft tendsto_neg_atTop_atBot tendsto_id).const_smul I\n","line":38,"end_line":65,"proof_status":"formalized"} {"id":"contourPull3","label":"contourPull3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RectangleIntegral_tendsTo_VerticalIntegral","isIntegrable","zeroTendstoDiff","tendsto_zero_Lower","Perron.tendsto_zero_Upper"],"nlp_text":"For \\(x{\\gt}1\\) and \\(\\sigma {\\lt}-3/2\\), we have \\[ \\frac1{2\\pi i} \\int _{(-3/2)}\\frac{x^s}{s(s+1)}ds = \\frac1{2\\pi i} \\int _{(\\sigma )}\\frac{x^s}{s(s+1)}ds. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.contourPull3","latex_link":"sect0003.html#contourPull3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.contourPull3","lean_decl_name":"Perron.contourPull3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"contourPull3\"\n (title := \"contourPull3\")\n (statement := /--\n For $x>1$ and $\\sigma<-3/2$, we have\n $$\n \\frac1{2\\pi i}\n \\int_{(-3/2)}\\frac{x^s}{s(s+1)}ds = \\frac 1{2\\pi i}\n \\int_{(\\sigma)}\\frac{x^s}{s(s+1)}ds.\n $$\n -/)\n (proof := /-- Pull contour from $(-3/2)$ to $(\\sigma)$. -/)\n (latexEnv := \"lemma\")]\nlemma contourPull3 (x_gt_one : 1 < x) (σ'le : σ' ≤ -3 / 2) (σ''le : σ'' ≤ -3 / 2) :\n VerticalIntegral' (fun s ↦ x ^ s / (s * (s + 1))) σ' =\n VerticalIntegral' (fun s ↦ x ^ s / (s * (s + 1))) σ'' := by\n\n unfold VerticalIntegral'\n congr 1\n exact contourPull (by linarith) (notMem_uIcc_of_gt (by linarith) (by linarith))\n (notMem_uIcc_of_gt (by linarith) (by linarith))\n","line":962,"end_line":982,"proof_status":"formalized"} {"id":"intervalIntegral_conj","label":"intervalIntegral_conj","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The conjugation symmetry of the interval integral. Let \\(f : \\mathbb {R} \\to \\mathbb {C}\\) be a measurable function, and let \\(a, b \\in \\mathbb {R}\\). Then \\[ \\int _{a}^{b} \\overline{f(x)} \\, dx = \\overline{\\int _{a}^{b} f(x) \\, dx}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/intervalIntegral_conj","latex_link":"sect0003.html#intervalIntegral_conj","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/intervalIntegral_conj","lean_decl_name":"intervalIntegral_conj","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaConj.lean","lean4_code":"@[blueprint\n (title := \"intervalIntegral-conj\")\n (statement := /--\n The conjugation symmetry of the interval integral. Let $f : \\mathbb{R} \\to \\mathbb{C}$ be a\n measurable function, and let $a, b \\in \\mathbb{R}$. Then\n $$\\int_{a}^{b} \\overline{f(x)} \\, dx = \\overline{\\int_{a}^{b} f(x) \\, dx}.$$\n -/)\n (proof := /--\n We unfold the interval integral into an integral over a uIoc and use the conjugation property\n of integrals.\n -/)]\ntheorem intervalIntegral_conj {f : ℝ → ℂ} {a b : ℝ} :\n ∫ (x : ℝ) in a..b, conj (f x) = conj (∫ (x : ℝ) in a..b, f x) := by\n rw [intervalIntegral.intervalIntegral_eq_integral_uIoc, integral_conj]\n rw [← RCLike.conj_smul, ← intervalIntegral.intervalIntegral_eq_integral_uIoc]\n","line":191,"end_line":205,"proof_status":"formalized"} {"id":"thm:prime_gaps_2024","label":"prime_gaps_2024","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} \\exp (60)\\), then there is a prime in the interval \\[ \\left( x\\left(1 - \\frac{1}{76900000000}\\right), x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PrimeGaps2024.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:prime_gaps_2024","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PrimeGaps2024.has_prime_in_interval","lean_decl_name":"PrimeGaps2024.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:prime_gaps_2024\"\n (title := \"Prime Gaps 2024\")\n (statement := /-- If $x > \\exp(60)$, then there is a prime in the interval\n \\[ \\left( x\\left(1 - \\frac{1}{76900000000}\\right), x \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem PrimeGaps2024.has_prime_in_interval (x : ℝ) (hx : x > exp 60) :\n HasPrimeInInterval (x*(1-1/76900000000)) (x/76900000000) := by sorry","line":191,"end_line":199,"proof_status":"formalized"} {"id":"highlyabundant-def","label":"highlyabundant-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["sigma-def"],"nlp_text":"A positive integer \\(N\\) is called highly abundant (HA) if \\[ \\sigma (N) {\\gt} \\sigma (m) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.HighlyAbundant","latex_link":"tertiary-chapter.html#highlyabundant-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.HighlyAbundant","lean_decl_name":"Lcm.HighlyAbundant","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"highlyabundant-def\"\n (statement := /--\n A positive integer \\(N\\) is called \\emph{highly abundant} (HA) if\n \\[\n \\sigma(N) > \\sigma(m)\n \\]\n for all positive integers \\(m < N\\), where \\(\\sigma(n)\\) denotes the sum of the positive divisors\n of \\(n\\).\n -/)]\ndef HighlyAbundant (N : ℕ) : Prop :=\n ∀ m : ℕ, m < N → σ m < σ N\n","line":24,"end_line":35,"proof_status":"formalized"} {"id":"isHolomorphicOn","label":"isHolomorphicOn","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(x{\\gt}0\\). Then the function \\(f(s) = x^s/(s(s+1))\\) is holomorphic on the half-plane \\(\\{ s\\in \\mathbb {C}:\\Re (s){\\gt}0\\} \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.isHolomorphicOn","latex_link":"sect0003.html#isHolomorphicOn","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.isHolomorphicOn","lean_decl_name":"Perron.isHolomorphicOn","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"isHolomorphicOn\"\n (title := \"isHolomorphicOn\")\n (statement := /--\n Let $x>0$. Then the function $f(s) = x^s/(s(s+1))$ is holomorphic on the half-plane\n $\\{s\\in\\mathbb{C}:\\Re(s)>0\\}$.\n -/)\n (latexEnv := \"lemma\")]\nlemma isHolomorphicOn (xpos : 0 < x) : HolomorphicOn (f x) {0, -1}ᶜ := by\n /-- Composition of differentiabilities. -/\n unfold f\n simp_rw [Complex.cpow_def_of_ne_zero <| ofReal_ne_zero.mpr <| ne_of_gt xpos]\n apply DifferentiableOn.div\n <| DifferentiableOn.cexp <| DifferentiableOn.const_mul differentiableOn_id _\n · exact DifferentiableOn.mul differentiableOn_id\n <| DifferentiableOn.add_const _ differentiableOn_id\n · intro x hx\n obtain ⟨h0, h1⟩ := not_or.mp hx\n exact mul_ne_zero h0 <| add_ne_add_left 1 |>.mpr h1 |>.trans_eq (neg_add_cancel 1)\n","line":297,"end_line":315,"proof_status":"formalized"} {"id":"isIntegrable","label":"isIntegrable","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["isHolomorphicOn"],"nlp_text":"Let \\(x{\\gt}0\\) and \\(\\sigma \\in \\mathbb {R}\\). Then \\[ \\int _{\\mathbb {R}}\\frac{x^{\\sigma +it}}{(\\sigma +it)(1+\\sigma + it)}dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.isIntegrable","latex_link":"sect0003.html#isIntegrable","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.isIntegrable","lean_decl_name":"Perron.isIntegrable","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint \"isIntegrable\"\n (title := \"isIntegrable\")\n (statement := /--\n Let $x>0$ and $\\sigma\\in\\R$. Then\n $$\\int_{\\R}\\frac{x^{\\sigma+it}}{(\\sigma+it)(1+\\sigma + it)}dt$$\n is integrable.\n -/)\n (latexEnv := \"lemma\")]\nlemma isIntegrable (xpos : 0 < x) (σ_ne_zero : σ ≠ 0) (σ_ne_neg_one : σ ≠ -1) :\n Integrable fun (t : ℝ) ↦ f x (σ + t * I) := by\n /-- By \\ref{isHolomorphicOn}, $f$ is continuous, so it is integrable on any interval.-/\n have : Continuous (fun (y : ℝ) ↦ f x (σ + y * I)) := by\n refine (isHolomorphicOn xpos).continuousOn.comp_continuous (by continuity) fun x ↦\n not_or.mpr ?_\n simp [Complex.ext_iff, σ_ne_zero, σ_ne_neg_one]\n /-- Also, $|f(x)| = \\Theta(x^{-2})$ as $x\\to\\infty$, -/\n refine this.locallyIntegrable.integrable_of_isBigO_atTop_of_norm_isNegInvariant\n (univ_mem' fun y ↦ ?_) (isTheta xpos).2.isBigO ⟨Ioi 1, Ioi_mem_atTop 1, ?_⟩\n · /-- and $|f(-x)| = \\Theta(x^{-2})$ as $x\\to\\infty$. -/\n change ‖f x (↑σ + ↑y * I)‖ = ‖f x (↑σ + ↑(-y) * I)‖\n have : (↑σ + ↑(-y) * I) = conj (↑σ + ↑y * I) := Complex.ext (by simp) (by simp)\n simp_rw [this, map_conj xpos.le, norm_conj]\n · /-- Since $g(x) = x^{-2}$ is integrable on $[a,\\infty)$ for any $a>0$, we conclude. -/\n refine integrableOn_Ioi_rpow_of_lt (show (-2 : ℝ) < -1 by norm_num)\n (show (0 : ℝ) < 1 by norm_num) |>.congr_fun (fun y hy ↦ ?_) measurableSet_Ioi\n rw [rpow_neg (show (0 : ℝ) < 1 by norm_num |>.trans hy |>.le), inv_eq_one_div, rpow_two]\n","line":523,"end_line":548,"proof_status":"formalized"} {"id":"score-lower-2","label":"score-lower-2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["score-def"],"nlp_text":"If there is a prime \\(p\\) in deficit larger than \\(L\\), one can remove it without increasing the score.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lower_score_2","latex_link":"tertiary-chapter.html#score-lower-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lower_score_2","lean_decl_name":"Erdos392.Factorization.lower_score_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"score-lower-2\"\n (statement := /-- If there is a prime $p$ in deficit larger than $L$, one can remove it without\n increasing the score.-/)\n (proof := /-- Add an additional factor of $p$ to the factorization.-/)\n (latexEnv := \"sublemma\")]\ntheorem Factorization.lower_score_2 {n : ℕ} (f : Factorization n) (L : ℕ)\n (hf : ∃ p ∈ (n + 1).primesBelow, p > L ∧ f.balance p < 0) :\n ∃ f' : Factorization n,\n f'.total_imbalance < f.total_imbalance ∧ f'.score L ≤ f.score L := by\n obtain ⟨p, hp_mem, hp_gt_L, hp_balance⟩ := hf\n have hp := prime_of_mem_primesBelow hp_mem\n set f' : Factorization n := ⟨f.a + {p}, fun m hm => by\n simp only [Multiset.mem_add, Multiset.mem_singleton] at hm\n rcases hm with hm | rfl\n · exact f.ha m hm\n · exact le_of_lt_succ (lt_of_mem_primesBelow hp_mem),\n fun m hm ↦ by\n simp only [Multiset.mem_add, Multiset.mem_singleton] at hm\n rcases hm with hm | rfl\n · exact f.hpos m hm\n · exact hp.pos⟩\n have h_balance_p : f'.balance p = f.balance p + 1 := by\n unfold balance sum\n simp only [show f'.a = f.a + {p} from rfl, Multiset.map_add, Multiset.sum_add,\n Multiset.map_singleton, Multiset.sum_singleton, Prime.factorization_self hp]\n omega\n have h_balance_q : ∀ q, q ≠ p → f'.balance q = f.balance q := fun q hq ↦ by\n have hq_fac : p.factorization q = 0 := by rw [Prime.factorization hp]; simp [hq.symm]\n unfold balance sum\n simp only [show f'.a = f.a + {p} from rfl, Multiset.map_add, Multiset.sum_add,\n Multiset.map_singleton, Multiset.sum_singleton, hq_fac, add_zero]\n have h_total_imbalance : f'.total_imbalance < f.total_imbalance := by\n refine Finset.sum_lt_sum (fun q _ ↦ ?_) ⟨p, hp_mem, by rw [h_balance_p]; omega⟩\n by_cases hq : q = p\n · subst hq; rw [h_balance_p]; omega\n · rw [h_balance_q q hq]\n have h_waste : f'.waste ≤ f.waste + Real.log (n / p) := by\n unfold waste sum\n simp only [show f'.a = f.a + {p} from rfl, Multiset.map_add, Multiset.sum_add,\n Multiset.map_singleton, Multiset.sum_singleton]\n linarith\n have h_sum_q : ∀ q ∈ (n + 1).primesBelow, q ≠ p →\n (if f'.balance q > 0 then (f'.balance q : ℝ) * Real.log q\n else if q ≤ L then (-f'.balance q) * Real.log L else (-f'.balance q) * Real.log (n / q)) =\n (if f.balance q > 0 then (f.balance q : ℝ) * Real.log q\n else if q ≤ L then (-f.balance q) * Real.log L else (-f.balance q) * Real.log (n / q)) := by\n intro q _ hqp\n rw [h_balance_q q hqp]\n have h_term_p : (if f'.balance p > 0 then (f'.balance p : ℝ) * Real.log p\n else if p ≤ L then (-f'.balance p) * Real.log L else (-f'.balance p) * Real.log (n / p)) ≤\n (if f.balance p > 0 then (f.balance p : ℝ) * Real.log p\n else if p ≤ L then (-f.balance p) * Real.log L else (-f.balance p) * Real.log (n / p)) -\n Real.log (n / p) := by\n rw [h_balance_p]\n split_ifs <;> try linarith\n push_cast; ring_nf; norm_num\n have h_sum_term : ∑ q ∈ (n + 1).primesBelow,\n (if f'.balance q > 0 then (f'.balance q : ℝ) * Real.log q\n else if q ≤ L then (-f'.balance q) * Real.log L else (-f'.balance q) * Real.log (n / q)) ≤\n ∑ q ∈ (n + 1).primesBelow,\n (if f.balance q > 0 then (f.balance q : ℝ) * Real.log q\n else if q ≤ L then (-f.balance q) * Real.log L else (-f.balance q) * Real.log (n / q)) -\n Real.log (n / p) := by\n rw [Finset.sum_eq_add_sum_diff_singleton hp_mem, Finset.sum_eq_add_sum_diff_singleton hp_mem]\n have h_rest := Finset.sum_congr rfl fun x hx ↦\n h_sum_q x (Finset.mem_sdiff.mp hx).1\n (fun h ↦ (Finset.mem_sdiff.mp hx).2 (Finset.mem_singleton.mpr h))\n linarith\n have h_penalty : (if f'.total_imbalance > 0 then Real.log n else 0) ≤\n (if f.total_imbalance > 0 then Real.log n else 0) := by\n split_ifs <;> first | linarith | positivity\n have h_score : f'.score L ≤ f.score L := by\n unfold score\n linarith\n exact ⟨f', h_total_imbalance, h_score⟩","line":646,"end_line":721,"proof_status":"formalized"} {"id":"score-lower-3","label":"score-lower-3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["score-lower-2","score-eq","score-lower-1"],"nlp_text":"If there is a prime \\(p\\) in deficit less than \\(L\\), one can remove it without increasing the score.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lower_score_3","latex_link":"tertiary-chapter.html#score-lower-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lower_score_3","lean_decl_name":"Erdos392.Factorization.lower_score_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"score-lower-3\"\n (statement := /--\n If there is a prime $p$ in deficit less than $L$, one can remove it without increasing the score.\n -/)\n (proof := /-- Without loss of generality we may assume that one is not in the previous two\n situations, i.e., wlog there are no surplus primes and all primes in deficit are at most $L$.\n If all deficit primes multiply to $n$ or less, add that product to the factorization (this\n increases the waste by at most $\\log n$, but we save a $\\log n$ from now being in balance).\n Otherwise, greedily multiply all primes together while staying below $n$ until one cannot do so\n any further; add this product to the factorization, increasing the waste by at most $\\log L$.-/)\n (latexEnv := \"sublemma\")]\ntheorem Factorization.lower_score_3 {n : ℕ} (f : Factorization n) (L : ℕ)\n (hf : ∃ p ∈ (n + 1).primesBelow, p ≤ L ∧ f.balance p < 0) :\n ∃ f' : Factorization n,\n f'.total_imbalance < f.total_imbalance ∧ f'.score L ≤ f.score L := by\n by_cases h1 : ∃ p ∈ (n + 1).primesBelow, f.balance p > 0\n · exact lower_score_1 f L h1\n by_cases h2 : ∃ p ∈ (n + 1).primesBelow, p > L ∧ f.balance p < 0\n · exact lower_score_2 f L h2\n push_neg at h1 h2\n refine lower_score_3_clean f L (fun p ↦ ?_) (fun p hp ↦ ?_) hf\n · by_cases hp : p.Prime\n · by_cases hp' : p ≤ n\n · exact h1 p <| mem_primesBelow.mpr ⟨Nat.lt_succ_of_le hp', hp⟩\n · have := fun m hm ↦ factorization_eq_zero_of_not_dvd fun h ↦ hp' <| (f.ha m hm).trans'\n (le_of_dvd (f.hpos m hm) h); simp [balance, sum, map_congr rfl this]\n · simp [balance, sum, factorization_eq_zero_of_not_prime _ hp]\n · have hp_prime : p.Prime := of_not_not fun hnp ↦ hp.ne <| by simp [balance, sum,\n factorization_eq_zero_of_not_prime _ hnp]\n exact not_lt.mp fun hpL ↦ hp.not_ge <| h2 p (mem_primesBelow.mpr ⟨Nat.lt_succ_of_le\n (deficit_implies_le_n f p hp), hp_prime⟩) hpL","line":803,"end_line":834,"proof_status":"formalized"} {"id":"zeroTendstoDiff","label":"zeroTendstoDiff","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If the limit of \\(0\\) is \\(L_1 - L_2\\), then \\(L_1 = L_2\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/zeroTendstoDiff","latex_link":"sect0003.html#zeroTendstoDiff","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/zeroTendstoDiff","lean_decl_name":"zeroTendstoDiff","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"zeroTendstoDiff\")\n (statement := /--\n If the limit of $0$ is $L_1 - L_2$, then $L_1 = L_2$.\n -/)\n (proof := /-- Obvious. -/)\n (latexEnv := \"lemma\")]\nlemma zeroTendstoDiff (L₁ L₂ : ℂ) (f : ℝ → ℂ) (h : ∀ᶠ T in atTop, f T = 0)\n (h' : Tendsto f atTop (𝓝 (L₂ - L₁))) : L₁ = L₂ := by\n rw [← zero_add L₁, ← @eq_sub_iff_add_eq]\n exact tendsto_nhds_unique (EventuallyEq.tendsto h) h'\n","line":25,"end_line":35,"proof_status":"formalized"} {"id":"divRemovable_zero_of_ne_zero","label":"divRemovable_zero_of_ne_zero","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["divRemovable_zero"],"nlp_text":"Let \\(f\\) be a complex function and let \\(z\\neq 0\\). Then, with \\(g\\) defined as in Definition 4.3.1, \\[ g(z)=\\frac{f(z)}{z}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/divRemovable_zero_of_ne_zero","latex_link":"sect0004.html#divRemovable_zero_of_ne_zero","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/divRemovable_zero_of_ne_zero","lean_decl_name":"divRemovable_zero_of_ne_zero","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint\n (statement := /--\n Let $f$ be a complex function and let $z\\neq 0$. Then, with $g$ defined as in\n Definition~\\ref{divRemovable_zero},\n $$g(z)=\\frac{f(z)}{z}.$$\n -/)\n (proof := /-- This follows directly from the definition of $g$. -/)\n (latexEnv := \"lemma\")]\nlemma divRemovable_zero_of_ne_zero {z : ℂ} (f : ℂ → ℂ) (z_ne_0 : z ≠ 0) :\n divRemovable_zero f z = f z / z := by\n apply Function.update_of_ne z_ne_0\n","line":23,"end_line":33,"proof_status":"formalized"} {"id":"Dusart_prop_4_3","label":"Dusart_prop_4_3","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"For \\(x \\geq 121\\), we have \\[ 1 - \\frac{4 \\log 2}{\\log x} \\sqrt{x} {\\lt} \\psi (x) - \\vartheta (x), \\quad \\sqrt{\\frac{\\log ^3 x}{x}} \\, \\vartheta (x^{1/2}). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_4_3","latex_link":"secondary-chapter.html#Dusart_prop_4_3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_4_3","lean_decl_name":"Dusart.proposition_4_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_4_3\"\n (title := \"Dusart Proposition 4.3\")\n (statement := /--\n For $x \\geq 121$, we have\n \\[\n 1 - \\frac{4 \\log 2}{\\log x} \\sqrt{x} < \\psi(x) - \\vartheta(x),\n \\quad \\sqrt{\\frac{\\log^3 x}{x}} \\, \\vartheta(x^{1/2}).\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_4_3 {x : ℝ} (hx : x ≥ 121) :\n ψ x - θ x ≥ 1 - (4 * Real.log 2) / (log x) * sqrt x ∧\n ψ x - θ x ≥ sqrt (log x ^ 3 / x) * θ (x ^ (1 / 2 : ℝ)) := by sorry\n","line":168,"end_line":180,"proof_status":"formalized"} {"id":"thm:schoenfeld1976","label":"schoenfeld1976","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} 2010760\\), then there is a prime in the interval \\[ \\left( x\\left(1 - \\frac{1}{15697}\\right), x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Schoenfeld1976.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:schoenfeld1976","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Schoenfeld1976.has_prime_in_interval","lean_decl_name":"Schoenfeld1976.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:schoenfeld1976\"\n (title := \"Schoenfeld 1976\")\n (statement := /--\n If $x > 2010760$, then there is a prime in the interval\n \\[\n \\left( x\\left(1 - \\frac{1}{15697}\\right), x \\right].\n \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem Schoenfeld1976.has_prime_in_interval (x : ℝ) (hx : x > 2010760) :\n HasPrimeInInterval (x*(1-1/15697)) (x/15697) := by sorry","line":125,"end_line":136,"proof_status":"formalized"} {"id":"RectangleIntegral","label":"RectangleIntegral","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"A RectangleIntegral of a function \\(f\\) is one over a rectangle determined by \\(z\\) and \\(w\\) in \\(\\mathbb {C}\\). We will sometimes denote it by \\(\\int _{z}^{w} f\\). (There is also a primed version, which is \\(1/(2\\pi i)\\) times the original.)","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral","latex_link":"sect0003.html#RectangleIntegral","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral","lean_decl_name":"RectangleIntegral","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"/-- A `RectangleIntegral` of a function `f` is one over a rectangle determined by\n `z` and `w` in `ℂ`. -/\n@[blueprint\n (title := \"RectangleIntegral\")\n (statement := /--\n A RectangleIntegral of a function $f$ is one over a rectangle determined by $z$ and $w$ in $\\C$.\n We will sometimes denote it by $\\int_{z}^{w} f$. (There is also a primed version, which is\n $1/(2\\pi i)$ times the original.)\n -/)]\nnoncomputable def RectangleIntegral (f : ℂ → E) (z w : ℂ) : E := HIntegral f z.re w.re z.im -\n HIntegral f z.re w.re w.im + VIntegral f w.re z.im w.im - VIntegral f z.re z.im w.im\n","line":29,"end_line":39,"proof_status":"formalized"} {"id":"RectangleIntegral_tendsTo_LowerU","label":"RectangleIntegral_tendsTo_LowerU","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RectangleIntegral","LowerUIntegral"],"nlp_text":"Let \\(\\sigma ,\\sigma ' \\in \\mathbb {R}\\), and \\(f : \\mathbb {C} \\to \\mathbb {C}\\) such that the vertical integrals \\(\\int _{(\\sigma )}f(s)ds\\) and \\(\\int _{(\\sigma ')}f(s)ds\\) exist and the horizontal integral \\(\\int _{(\\sigma )}^{\\sigma '}f(x + yi)dx\\) vanishes as \\(y \\to -\\infty \\). Then the limit of rectangle integrals \\[ \\int _{\\sigma -iU}^{\\sigma '-iT}f(s)ds \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral_tendsTo_LowerU","latex_link":"sect0003.html#RectangleIntegral_tendsTo_LowerU","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RectangleIntegral_tendsTo_LowerU","lean_decl_name":"RectangleIntegral_tendsTo_LowerU","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"RectangleIntegral-tendsTo-LowerU\")\n (statement := /--\n Let $\\sigma,\\sigma' \\in \\mathbb{R}$, and $f : \\mathbb{C} \\to \\mathbb{C}$ such that\n the vertical integrals $\\int_{(\\sigma)}f(s)ds$ and $\\int_{(\\sigma')}f(s)ds$ exist and\n the horizontal integral $\\int_{(\\sigma)}^{\\sigma'}f(x + yi)dx$ vanishes as $y \\to -\\infty$.\n Then the limit of rectangle integrals\n $$\\int_{\\sigma-iU}^{\\sigma'-iT}f(s)ds$$\n as $U\\to\\infty$ is the ``LowerUIntegral'' of $f$.\n -/)\n (proof := /-- Almost by definition. -/)\n (proofUses := [\"RectangleIntegral\", \"LowerUIntegral\"])\n (latexEnv := \"lemma\")]\nlemma RectangleIntegral_tendsTo_LowerU {σ σ' T : ℝ} {f : ℂ → ℂ}\n (hbot : Tendsto (fun (y : ℝ) ↦ ∫ (x : ℝ) in σ..σ', f (x + y * I)) atBot (𝓝 0))\n (hleft : Integrable (fun (y : ℝ) ↦ f (σ + y * I)))\n (hright : Integrable (fun (y : ℝ) ↦ f (σ' + y * I))) :\n Tendsto (fun (U : ℝ) ↦ RectangleIntegral f (σ - I * U) (σ' - I * T)) atTop\n (𝓝 (- LowerUIntegral f σ σ' T)) := by\n have h_re (s : ℝ) (t : ℝ) : (s - I * t).re = s := by simp\n have h_im (s : ℝ) (t : ℝ) : (s - I * t).im = -t := by simp\n have hbot' : Tendsto (fun (y : ℝ) ↦ ∫ (x : ℝ) in σ..σ', f (x - y * I)) atTop (𝓝 0) := by\n convert (hbot.comp tendsto_neg_atTop_atBot) using 1\n ext; simp only [Function.comp_apply, ofReal_neg, neg_mul]; rfl\n have htop : Tendsto (fun (_ : ℝ) ↦ ∫ (x : ℝ) in σ..σ', f (x - T * I)) atTop\n (𝓝 <| ∫ (x : ℝ) in σ..σ', f (x - T * I)) := tendsto_const_nhds\n have hvert (s : ℝ) (int : Integrable (fun (y : ℝ) ↦ f (s + y * I))) :\n Tendsto (fun (U : ℝ) ↦ I * ∫ (y : ℝ) in -U..-T, f (s + y * I)) atTop\n (𝓝 <| I * ∫ (y : ℝ) in Iic (-T), f (s + y * I)) := by\n have := (intervalIntegral_tendsto_integral_Iic (-T) int.restrict tendsto_id).const_smul I\n convert (this.comp tendsto_neg_atTop_atBot) using 1\n have := ((hbot'.sub htop).add (hvert σ' hright)).sub (hvert σ hleft)\n rw [zero_sub] at this\n simp_rw [RectangleIntegral, LowerUIntegral, HIntegral, VIntegral, h_re, h_im, ofReal_neg, neg_mul,\n neg_add_rev, neg_sub]\n have final :\n (((-∫ (x : ℝ) in σ..σ', f (↑x - ↑T * I)) + I * ∫ (y : ℝ) in Iic (-T), f (↑σ' + ↑y * I)) -\n I * ∫ (y : ℝ) in Iic (-T), f (↑σ + ↑y * I)) =\n (-(I * ∫ (y : ℝ) in Iic (-T), f (↑σ + ↑y * I)) +\n ((I * ∫ (y : ℝ) in Iic (-T), f (↑σ' + ↑y * I)) - ∫ (x : ℝ) in σ..σ', f (↑x - ↑T * I))) := by\n ring_nf\n congr\n ext\n ring_nf\n exact final ▸ this\n","line":137,"end_line":181,"proof_status":"formalized"} {"id":"HolomorphicOn.vanishesOnRectangle","label":"HolomorphicOn.vanishesOnRectangle","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RectangleIntegral"],"nlp_text":"If \\(f\\) is holomorphic on a rectangle \\(z\\) and \\(w\\), then the integral of \\(f\\) over the rectangle with corners \\(z\\) and \\(w\\) is \\(0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/HolomorphicOn.vanishesOnRectangle","latex_link":"sect0003.html#HolomorphicOn.vanishesOnRectangle","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/HolomorphicOn.vanishesOnRectangle","lean_decl_name":"HolomorphicOn.vanishesOnRectangle","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"@[blueprint\n (title := \"HolomorphicOn.vanishesOnRectangle\")\n (statement := /--\n If $f$ is holomorphic on a rectangle $z$ and $w$, then the integral of $f$ over the rectangle\n with corners $z$ and $w$ is $0$.\n -/)\n (proof := /-- This is in a Mathlib PR. -/)]\ntheorem HolomorphicOn.vanishesOnRectangle [CompleteSpace E] {U : Set ℂ}\n (f_holo : HolomorphicOn f U) (hU : Rectangle z w ⊆ U) :\n RectangleIntegral f z w = 0 :=\n integral_boundary_rect_eq_zero_of_differentiableOn f z w (f_holo.mono hU)","line":136,"end_line":146,"proof_status":"formalized"} {"id":"ResidueTheoremAtOrigin","label":"ResidueTheoremAtOrigin","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["RectangleIntegral"],"nlp_text":"The rectangle (square) integral of \\(f(s) = 1/s\\) with corners \\(-1-i\\) and \\(1+i\\) is equal to \\(2\\pi i\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueTheoremAtOrigin","latex_link":"sect0003.html#ResidueTheoremAtOrigin","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueTheoremAtOrigin","lean_decl_name":"ResidueTheoremAtOrigin","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"lemma ResidueTheoremAtOrigin' {z w c : ℂ} (h1 : z.re < 0) (h2 : z.im < 0) (h3 : 0 < w.re) (h4 : 0 < w.im) :\n RectangleIntegral (fun s => c / s) z w = 2 * I * π * c := by\n simp only [RectangleIntegral, HIntegral, VIntegral, smul_eq_mul]\n rw [integral_const_div_re_add_self h1.ne, integral_const_div_re_add_self h3.ne.symm]\n rw [integral_const_div_self_add_im h2.ne, integral_const_div_self_add_im h4.ne.symm]\n have l1 : z.im * w.re⁻¹ = (w.re * z.im⁻¹)⁻¹ := by group\n have l3 := arctan_inv_of_neg <| mul_neg_of_pos_of_neg h3 <| inv_lt_zero.mpr h2\n have l4 : w.im * z.re⁻¹ = (z.re * w.im⁻¹)⁻¹ := by group\n have l6 := arctan_inv_of_neg <| mul_neg_of_neg_of_pos h1 <| inv_pos.mpr h4\n have r1 : z.im * z.re⁻¹ = (z.re * z.im⁻¹)⁻¹ := by group\n have r3 := arctan_inv_of_pos <| mul_pos_of_neg_of_neg h1 <| inv_lt_zero.mpr h2\n have r4 : w.im * w.re⁻¹ = (w.re * w.im⁻¹)⁻¹ := by group\n have r6 := arctan_inv_of_pos <| mul_pos h3 <| inv_pos.mpr h4\n ring_nf\n simp only [one_div, inv_I, mul_neg, neg_mul, I_sq, neg_neg, arctan_neg, ofReal_neg, sub_neg_eq_add]\n rw [l1, l3, l4, l6, r1, r3, r4, r6]\n ring_nf\n simp only [I_sq, ofReal_sub, ofReal_mul, ofReal_ofNat, ofReal_div, ofReal_neg, ofReal_one]\n ring_nf\n","line":462,"end_line":480,"proof_status":"formalized"} {"id":"decay","label":"decay","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(\\psi :\\mathbb {R}\\to \\mathbb {C}\\) is \\(C^2\\) and obeys the bounds \\[ |\\psi (t)|, |\\psi ''(t)| \\leq A / (1 + |t|^2) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/decay_bounds","latex_link":"sect0002.html#decay","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/decay_bounds","lean_decl_name":"decay_bounds","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"Decay bounds\")\n (statement := /--\n If $\\psi:\\R \\to \\C$ is $C^2$ and obeys the bounds\n $$ |\\psi(t)|, |\\psi''(t)| \\leq A / (1 + |t|^2)$$\n for all $t \\in \\R$, then\n $$ |\\hat \\psi(u)| \\leq C A / (1+|u|^2)$$\n for all $u \\in \\R$, where $C$ is an absolute constant.\n -/)\n (proof := /--\n From two integration by parts we obtain the identity\n $$ (1+u^2) \\hat \\psi(u) = \\int_{\\bf R} (\\psi(t) - \\frac{u}{4\\pi^2} \\psi''(t)) e(-tu)\\ dt.$$\n Now apply the triangle inequality and the identity $\\int_{\\bf R} \\frac{dt}{1+t^2}\\ dt = \\pi$ to\n obtain the claim with $C = \\pi + 1 / 4 \\pi$.\n -/)\n (latexEnv := \"lemma\")]\nlemma decay_bounds (ψ : CS 2 ℂ) (hA : ∀ t, ‖ψ t‖ ≤ A / (1 + t ^ 2))\n (hA' : ∀ t, ‖deriv^[2] ψ t‖ ≤ A / (1 + t ^ 2)) :\n ‖𝓕 (ψ : ℝ → ℂ) u‖ ≤ (π + 1 / (4 * π)) * A / (1 + u ^ 2) := by\n exact decay_bounds_W21 ψ hA hA' u\n\nlemma decay_bounds_cor_aux (ψ : CS 2 ℂ) : ∃ C : ℝ, ∀ u, ‖ψ u‖ ≤ C / (1 + u ^ 2) := by\n","line":420,"end_line":440,"proof_status":"formalized"} {"id":"limiting-fourier-variant","label":"limiting-fourier-variant","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["decay","second-fourier","first-fourier"],"nlp_text":"If \\(\\psi : \\mathbb {R}\\to \\mathbb {C}\\) is \\(C^2\\) and compactly supported with \\(f\\) and \\(\\hat\\psi \\) non-negative, and \\(0 {\\lt} x\\), then \\[ \\sum _{n=1}^\\infty \\frac{f(n)}{n} \\hat\\psi ( \\frac{1}{2\\pi } \\log \\frac{n}{x} ) - A \\int _{-\\log x}^\\infty \\hat\\psi (\\frac{u}{2\\pi })\\ du = \\int _\\mathbb {R}G(1+it) \\psi (t) x^{it}\\ dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_fourier_variant","latex_link":"sect0002.html#limiting-fourier-variant","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_fourier_variant","lean_decl_name":"limiting_fourier_variant","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" simpa [hnorm_four n] using hnorm_le'\n\n have hbase_summ : Summable base := by\n have hfσ := hf σ hσ\n have : (fun n : ℕ => nterm f σ n) = base := by\n funext n\n by_cases hn : n = 0\n · simp [nterm, base, hn]\n · have hf0 : 0 ≤ f n := hpos n\n simp [nterm, base, hn, Real.norm_eq_abs, abs_of_nonneg hf0]\n simpa [this] using hfσ\n have hCb : Summable (fun n : ℕ => C * base n) := hbase_summ.mul_left C\n\n refine hCb.of_norm_bounded ?_\n intro n\n by_cases hn : n = 0\n · simp [base, hn]\n · have hf0 : 0 ≤ f n := hpos n\n have hnpos : 0 < (n : ℝ) := by exact_mod_cast (Nat.pos_of_ne_zero hn)\n have hpowpos : 0 < ((n : ℝ) ^ σ) := Real.rpow_pos_of_pos hnpos σ\n have hinv_nonneg : 0 ≤ (((n : ℝ) ^ σ)⁻¹) :=\n inv_nonneg.2 (le_of_lt hpowpos)\n have hW0 : 0 ≤ (𝓕 ψ.toFun (y n)).re := (hψpos (y n)).1\n have hWle : (𝓕 ψ.toFun (y n)).re ≤ C := hW_le_C n\n have ha0 : 0 ≤ f n * (((n : ℝ) ^ σ)⁻¹) := mul_nonneg hf0 hinv_nonneg\n have hle1 :\n (f n * (((n : ℝ) ^ σ)⁻¹)) * (𝓕 ψ.toFun (y n)).re\n ≤ (f n * (((n : ℝ) ^ σ)⁻¹)) * C :=\n mul_le_mul_of_nonneg_left hWle ha0\n have hle2 :\n f n * (((n : ℝ) ^ σ)⁻¹ * (𝓕 ψ.toFun (y n)).re)\n ≤ C * (f n * (((n : ℝ) ^ σ)⁻¹)) := by\n simpa [mul_assoc, mul_left_comm, mul_comm] using hle1\n\n have hinside0 :\n 0 ≤ f n * (((n : ℝ) ^ σ)⁻¹ * (𝓕 ψ.toFun (y n)).re) := by\n have : 0 ≤ (((n : ℝ) ^ σ)⁻¹ * (𝓕 ψ.toFun (y n)).re) :=\n mul_nonneg hinv_nonneg hW0\n exact mul_nonneg hf0 this\n\n have habs :\n |f n * (((n : ℝ) ^ σ)⁻¹ * (𝓕 ψ.toFun (y n)).re)|\n ≤ C * (f n * (((n : ℝ) ^ σ)⁻¹)) := by\n simpa [abs_of_nonneg hinside0] using hle2\n simpa [base, hn, div_eq_mul_inv, y, mul_assoc, mul_left_comm, mul_comm] using habs\n\n\ntheorem limiting_fourier_variant_lim1\n {f : ℕ → ℝ} {x : ℝ} {ψ : CS 2 ℂ}\n (hpos : 0 ≤ f)\n (hψpos : ∀ y, 0 ≤ (𝓕 (ψ : ℝ → ℂ) y).re ∧ (𝓕 (ψ : ℝ → ℂ) y).im = 0)\n (S : ℝ → ℂ)\n (hSdef :\n ∀ σ' : ℝ,\n S σ' =\n ∑' n : ℕ,\n term (fun n ↦ (f n : ℂ)) (σ' : ℝ) n *\n 𝓕 ψ.toFun (π⁻¹ * 2⁻¹ * Real.log ((n : ℝ) / x)))\n (hbounded : BoundedAtFilter (𝓝[>] (1 : ℝ)) (fun σ' : ℝ => ‖S σ'‖))\n (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ')) :\n Tendsto\n (fun σ' : ℝ =>\n ∑' n : ℕ,\n term (fun n ↦ (f n : ℂ)) (σ' : ℝ) n *\n 𝓕 ψ.toFun (π⁻¹ * 2⁻¹ * Real.log ((n : ℝ) / x)))\n (𝓝[>] (1 : ℝ))\n (𝓝\n (∑' n : ℕ,\n (f n : ℂ) / (n : ℂ) *\n 𝓕 ψ.toFun (π⁻¹ * 2⁻¹ * Real.log ((n : ℝ) / x)))) := by\n\n let y : ℕ → ℝ := fun n => (π⁻¹ * 2⁻¹) * Real.log ((n : ℝ) / x)\n let w : ℕ → ℝ := fun n => (𝓕 ψ.toFun (y n)).re\n\n have hw_nonneg : ∀ n, 0 ≤ w n := by\n intro n\n exact (hψpos (y n)).1\n\n have hFour_eq_ofReal : ∀ n, 𝓕 ψ.toFun (y n) = Complex.ofReal (w n) := by\n intro n\n have h := hψpos (y n)\n refine Complex.ext ?_ ?_\n · simp [w]\n · simp [w, h.2]\n\n let rterm : ℝ → ℕ → ℝ :=\n fun σ n =>\n if h0 : n = 0 then 0 else (f n) / ((n : ℝ) ^ σ) * (w n)\n\n have summand_eq_ofReal :\n ∀ (σ : ℝ) (n : ℕ),\n term (fun n ↦ (f n : ℂ)) (σ : ℝ) n * 𝓕 ψ.toFun (y n)\n = Complex.ofReal (rterm σ n) := by\n intro σ n\n by_cases hn : n = 0\n · subst hn\n simp [rterm, y]\n · have hnpos : (0 : ℝ) < (n : ℝ) := by\n exact_mod_cast (Nat.pos_of_ne_zero hn)\n have hn0 : 0 ≤ (n : ℝ) := le_of_lt hnpos\n have hcpow :\n ( (n : ℂ) ^ ((σ : ℝ) : ℂ) ) = ( ( (n : ℝ) ^ σ : ℝ) : ℂ ) := by\n simpa using (Complex.ofReal_cpow hn0 σ).symm\n have hpow_ne : ((n : ℝ) ^ σ) ≠ 0 := by\n exact (ne_of_gt (Real.rpow_pos_of_pos hnpos σ))\n calc\n term (fun n ↦ (f n : ℂ)) (σ : ℝ) n * 𝓕 ψ.toFun (y n)\n =\n ((f n : ℂ) / ((n : ℂ) ^ ((σ : ℝ) : ℂ))) * ( (w n : ℝ) : ℂ ) := by\n simp [term, LSeries.term, hn, hFour_eq_ofReal]\n _ =\n ((f n : ℂ) / (((n : ℝ) ^ σ : ℝ) : ℂ)) * ((w n : ℝ) : ℂ) := by\n simp [hcpow]\n _ =\n (( (f n : ℝ) : ℂ) / (((n : ℝ) ^ σ : ℝ) : ℂ)) * ((w n : ℝ) : ℂ) := by\n simp\n _ =\n ( ( (f n : ℝ) / ((n : ℝ) ^ σ) : ℝ) : ℂ ) * ((w n : ℝ) : ℂ) := by\n simp [Complex.ofReal_div]\n _ =\n ( ( (f n : ℝ) / ((n : ℝ) ^ σ) * (w n) : ℝ ) : ℂ ) := by\n simp [Complex.ofReal_mul]\n _ =\n Complex.ofReal (rterm σ n) := by\n simp [rterm, hn]\n\n let T : ℝ → ℝ := fun σ => ∑' n, rterm σ n\n\n have tsum_eq_ofReal_T : ∀ σ : ℝ,\n (∑' n : ℕ, term (fun n ↦ (f n : ℂ)) (σ : ℝ) n * 𝓕 ψ.toFun (y n))\n = Complex.ofReal (T σ) := by\n intro σ\n have hcongr :\n (∑' n : ℕ, term (fun n ↦ (f n : ℂ)) (σ : ℝ) n * 𝓕 ψ.toFun (y n))\n = ∑' n : ℕ, (Complex.ofReal (rterm σ n)) := by\n refine tsum_congr ?_\n intro n\n simpa using (summand_eq_ofReal σ n)\n\n calc\n (∑' n : ℕ, term (fun n ↦ (f n : ℂ)) (σ : ℝ) n * 𝓕 ψ.toFun (y n))\n = ∑' n : ℕ, (Complex.ofReal (rterm σ n)) := hcongr\n _ = Complex.ofReal (∑' n : ℕ, rterm σ n) := by\n simpa using (Complex.ofReal_tsum (fun n : ℕ => rterm σ n)).symm\n _ = Complex.ofReal (T σ) := by rfl\n\n have hS_ofReal_T : ∀ σ : ℝ, S σ = Complex.ofReal (T σ) := by\n intro σ\n simpa [hSdef σ, y] using (tsum_eq_ofReal_T σ)\n\n have rterm_nonneg : ∀ σ n, 0 ≤ rterm σ n := by\n intro σ n\n by_cases hn : n = 0\n · subst hn; simp [rterm]\n · have hf : 0 ≤ f n := hpos n\n have hw : 0 ≤ w n := hw_nonneg n\n have hnpos : 0 < (n : ℝ) := by\n exact_mod_cast (Nat.pos_of_ne_zero hn)\n have hden : 0 < (n : ℝ) ^ σ := Real.rpow_pos_of_pos hnpos σ\n","line":2992,"end_line":3150,"proof_status":"formalized"} {"id":"crude-upper-bound","label":"crude-upper-bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["limiting-fourier-variant"],"nlp_text":"If \\(\\psi : \\mathbb {R}\\to \\mathbb {C}\\) is \\(C^2\\) and compactly supported with \\(f\\) and \\(\\hat\\psi \\) non-negative, then there exists a constant \\(B\\) such that \\[ |\\sum _{n=1}^\\infty \\frac{f(n)}{n} \\hat\\psi ( \\frac{1}{2\\pi } \\log \\frac{n}{x} )| \\leq B \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/crude_upper_bound","latex_link":"sect0002.html#crude-upper-bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/crude_upper_bound","lean_decl_name":"crude_upper_bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" cexp (-( (u : ℂ) * ((σ' : ℂ) - 1))) *\n 𝓕 (W21.ofCS2 ψ).toFun (u / (2 * π)))\n =ᶠ[𝓝[>] (1 : ℝ)]\n (fun σ' ↦\n ∫ (t : ℝ), G ((σ' : ℂ) + (t : ℂ) * I) * ψ.toFun t * (x : ℂ) ^ ((t : ℂ) * I)) := by\n rw [Filter.EventuallyEq]\n\n refine eventually_nhdsWithin_of_forall ?_\n intro σ' hσ'\n have hσ' : (1 : ℝ) < σ' := by\n simpa [Set.mem_Ioi] using hσ'\n simpa using (limiting_fourier_aux_gt_zero (G := G) (f := f) (A := A) hG' hf ψ hx σ' hσ')\n\n have haux' :\n (fun σ' : ℝ => S σ') =ᶠ[𝓝[>] (1 : ℝ)] (fun σ' : ℝ => RHS σ' + Pole σ') := by\n rw [Filter.EventuallyEq] at haux ⊢\n filter_upwards [haux] with σ' hσ'\n have hσ'' : S σ' - Pole σ' = RHS σ' := by\n simpa [S, Pole, RHS] using hσ'\n have hadd : (S σ' - Pole σ') + Pole σ' = RHS σ' + Pole σ' :=\n congrArg (fun z : ℂ => z + Pole σ') hσ''\n simpa [sub_eq_add_neg, add_assoc, add_left_comm, add_comm] using hadd\n\n let Pole₁ : ℂ := (A : ℂ) * ∫ u in Set.Ici (-Real.log x), 𝓕 (W21.ofCS2 ψ).toFun (u / (2 * π))\n let RHS₁ : ℂ := ∫ t : ℝ, G (1 + (t : ℂ) * I) * ψ.toFun t * (x : ℂ) ^ ((t : ℂ) * I)\n\n have hRHS_le :\n ∀ᶠ σ' : ℝ in 𝓝[>] (1 : ℝ), ‖RHS σ'‖ ≤ ‖RHS₁‖ + 1 := by\n have hball : Metric.ball RHS₁ (1 : ℝ) ∈ 𝓝 RHS₁ := by\n simpa using (Metric.ball_mem_nhds (x := RHS₁) (ε := (1 : ℝ)) (by norm_num))\n have hpre : {σ' : ℝ | RHS σ' ∈ Metric.ball RHS₁ (1 : ℝ)} ∈ (𝓝[>] (1 : ℝ)) :=\n l3 hball\n filter_upwards [hpre] with σ' hmem\n have hdist' : dist (RHS σ') RHS₁ < (1 : ℝ) := by\n simpa [Metric.mem_ball] using hmem\n have hdist : ‖RHS σ' - RHS₁‖ < (1 : ℝ) := by\n simpa [dist_eq_norm] using hdist'\n have htri : ‖RHS σ'‖ ≤ ‖RHS₁‖ + ‖RHS σ' - RHS₁‖ := by\n have h := norm_add_le (RHS σ' - RHS₁) RHS₁\n simpa [sub_add_cancel, add_comm, add_left_comm, add_assoc] using h\n have hle : ‖RHS₁‖ + ‖RHS σ' - RHS₁‖ ≤ ‖RHS₁‖ + (1 : ℝ) := by\n exact add_le_add_right (le_of_lt hdist) ‖RHS₁‖\n exact htri.trans hle\n\n have hPole_le :\n ∀ᶠ σ' : ℝ in 𝓝[>] (1 : ℝ), ‖Pole σ'‖ ≤ ‖Pole₁‖ + 1 := by\n have hball : Metric.ball Pole₁ 1 ∈ 𝓝 Pole₁ := by\n simpa using (Metric.ball_mem_nhds Pole₁ (by norm_num : (0 : ℝ) < 1))\n have hpre : {σ' : ℝ | Pole σ' ∈ Metric.ball Pole₁ 1} ∈ (𝓝[>] (1 : ℝ)) := l2 hball\n filter_upwards [hpre] with σ' hmem\n have hdist : ‖Pole σ' - Pole₁‖ < 1 := by\n simpa [Metric.mem_ball, dist_eq_norm] using hmem\n have htri : ‖Pole σ'‖ ≤ ‖Pole₁‖ + ‖Pole σ' - Pole₁‖ := by\n have hdecomp : Pole σ' = Pole₁ + (Pole σ' - Pole₁) := by abel\n have hnorm_eq : ‖Pole σ'‖ = ‖Pole₁ + (Pole σ' - Pole₁)‖ := by\n simp [congrArg (fun z : ℂ => ‖z‖) hdecomp]\n calc\n ‖Pole σ'‖ = ‖Pole₁ + (Pole σ' - Pole₁)‖ := hnorm_eq\n _ ≤ ‖Pole₁‖ + ‖Pole σ' - Pole₁‖ := norm_add_le _ _\n have hdist_le : ‖Pole σ' - Pole₁‖ ≤ 1 := le_of_lt hdist\n have hsum : ‖Pole₁‖ + ‖Pole σ' - Pole₁‖ ≤ ‖Pole₁‖ + 1 := by\n simpa [add_comm, add_left_comm, add_assoc] using (add_le_add_left hdist_le ‖Pole₁‖)\n exact htri.trans hsum\n\n have hS_le :\n ∀ᶠ σ' : ℝ in 𝓝[>] (1 : ℝ),\n ‖S σ'‖ ≤ (‖RHS₁‖ + 1) + (‖Pole₁‖ + 1) := by\n rw [Filter.EventuallyEq] at haux'\n filter_upwards [haux', hRHS_le, hPole_le] with σ' hEq hR hP\n calc\n ‖S σ'‖ = ‖RHS σ' + Pole σ'‖ := by simp [hEq]\n _ ≤ ‖RHS σ'‖ + ‖Pole σ'‖ := norm_add_le _ _\n _ ≤ (‖RHS₁‖ + 1) + (‖Pole₁‖ + 1) := by\n exact add_le_add hR hP\n\n have hbounded : BoundedAtFilter (𝓝[>] (1 : ℝ)) (fun σ' : ℝ => ‖S σ'‖) := by\n let C : ℝ := ‖RHS₁‖ + 1 + (‖Pole₁‖ + 1)\n simp only [BoundedAtFilter, Asymptotics.IsBigO, Asymptotics.IsBigOWith]\n refine ⟨C, ?_⟩\n filter_upwards [hS_le] with σ' hσ'\n simpa [Real.norm_eq_abs, abs_of_nonneg (norm_nonneg (S σ'))] using hσ'\n\n have hcoef : (1 / (2 * π) : ℝ) = (π⁻¹ * 2⁻¹ : ℝ) := by field_simp [pi_ne_zero]\n\n have l1 :=\n limiting_fourier_variant_lim1\n (f := f) (x := x) (ψ := ψ)\n hpos hψpos\n (S := S)\n (hSdef := by\n intro σ\n simp [S, hcoef] )\n hbounded\n hf\n have l1S :\n Tendsto S (𝓝[>] (1 : ℝ))\n (𝓝 (∑' n : ℕ, (f n : ℂ) / (n : ℂ) * 𝓕 ψ.toFun (1 / (2 * π) * Real.log (↑n / x)))) := by\n simpa [S, hcoef] using l1\n\n have l12 : Tendsto (fun σ' : ℝ => S σ' - Pole σ') (𝓝[>] (1 : ℝ))\n (𝓝 ((∑' n : ℕ, (f n : ℂ) / (n : ℂ) * 𝓕 ψ.toFun (1 / (2 * π) * Real.log (↑n / x))) - Pole₁)) :=\n l1S.sub l2\n\n have hPole : (Pole : ℝ → ℂ) =ᶠ[𝓝[>] (1 : ℝ)] Pole := by simp\n have haux_sub :\n (fun σ' : ℝ => S σ' - Pole σ') =ᶠ[𝓝[>] (1 : ℝ)] RHS := by\n filter_upwards [haux'] with σ' hσ'\n calc\n S σ' - Pole σ'\n = (RHS σ' + Pole σ') - Pole σ' := by simp [hσ']\n _ = RHS σ' := by simp\n have hlim :=\n tendsto_nhds_unique_of_eventuallyEq (l1S.sub l2) l3 haux_sub\n\n simpa [Pole₁, RHS₁] using hlim\n\n\n\nlemma norm_mul_integral_Ici_le_integral_norm\n (A : ℂ) (F : ℝ → ℂ) (a : ℝ)\n (hF : IntegrableOn F (Set.Ici a))\n (hnorm : Integrable (fun u : ℝ => ‖F u‖)) :\n ‖A * (∫ u in Set.Ici a, F u)‖ ≤ ‖A‖ * (∫ u : ℝ, ‖F u‖) := by\n have hmul : ‖A * (∫ u in Set.Ici a, F u)‖ = ‖A‖ * ‖∫ u in Set.Ici a, F u‖ := by\n simp\n have hnormI :\n ‖∫ u in Set.Ici a, F u‖ ≤ ∫ u in Set.Ici a, ‖F u‖ := by\n have _ : Integrable F (Measure.restrict volume (Set.Ici a)) := hF\n have h :\n ‖∫ u, F u ∂Measure.restrict volume (Set.Ici a)‖\n ≤ ∫ u, ‖F u‖ ∂Measure.restrict volume (Set.Ici a) :=\n norm_integral_le_integral_norm (μ := Measure.restrict volume (Set.Ici a)) (f := F)\n simpa using h\n\n have hdom :\n (∫ u in Set.Ici a, ‖F u‖) ≤ ∫ u : ℝ, ‖F u‖ := by\n have hEq :\n (∫ u in Set.Ici a, ‖F u‖) =\n ∫ u : ℝ, Set.indicator (Set.Ici a) (fun u => ‖F u‖) u := by\n have h := (integral_indicator (μ := (volume : Measure ℝ))\n (s := Set.Ici a) (f := fun u => ‖F u‖))\n have h' := h measurableSet_Ici\n simpa using h'.symm\n","line":3382,"end_line":3524,"proof_status":"formalized"} {"id":"score-eq","label":"score-eq","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["score-def"],"nlp_text":"If one is in total balance, then the score is equal to the waste.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.score_eq","latex_link":"tertiary-chapter.html#score-eq","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.score_eq","lean_decl_name":"Erdos392.Factorization.score_eq","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"score-eq\"\n (statement := /--\n If one is in total balance, then the score is equal to the waste.\n -/)\n (latexEnv := \"lemma\")]\ntheorem Factorization.score_eq {n : ℕ} {f : Factorization n} (hf : f.total_imbalance = 0) (L : ℕ) :\n f.score L = f.waste := by\n simp_all [total_imbalance, score]","line":133,"end_line":141,"proof_status":"formalized"} {"id":"rs-414","label":"rs-414","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["rs-413"],"nlp_text":"\\[ \\sum _{p \\leq x} f(p) = \\int _2^x \\frac{f(y)\\ dy}{\\log y} + \\frac{2 f(2)}{\\log 2} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_414","latex_link":"secondary-chapter.html#rs-414","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_414","lean_decl_name":"RS_prime.eq_414","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"theorem eq_414 {f : ℝ → ℝ} {x : ℝ} (hx : 2 ≤ x) (hf : DifferentiableOn ℝ f (Set.Icc 2 x))\n (hd : IntervalIntegrable (fun t => deriv (fun s ↦ f s / log s) t) volume 2 x) :\n ∑ p ∈ filter Prime (Iic ⌊x⌋₊), f p =\n (∫ y in 2..x, f y / log y) + 2 * f 2 / Real.log 2 +\n f x * (θ x - x) / log x -\n ∫ y in 2..x, (θ y - y) * deriv (fun s ↦ f s / log s) y :=\n let hcc := Set.uIcc_of_le hx\n let hoc := Set.uIoc_of_le hx\n have hm : Set.Ioo 2 x ∈ ae (volume.restrict (Set.Ioc 2 x)) := by\n by_cases hp : 2 < x\n · rw [mem_ae_iff, Measure.restrict_apply' measurableSet_Ioc, ← Set.diff_eq_compl_inter,\n Set.Ioc_diff_Ioo_same hp, volume_singleton]\n · simp_all\n have hae : (fun t ↦ deriv (fun s ↦ f s / Real.log s) t) =ᶠ[ae (volume.restrict (Set.Ioc 2 x))]\n derivWithin (fun t ↦ f t / Real.log t) (Set.uIcc 2 x) := by\n filter_upwards [hm] with y hy\n have : Set.Icc 2 x ∈ 𝓝 y := mem_nhds_iff.2\n ⟨Set.Ioo 2 x, Set.Ioo_subset_Icc_self, ⟨isOpen_Ioo, hy⟩⟩\n refine (DifferentiableAt.derivWithin ?_ (uniqueDiffWithinAt_of_mem_nhds (hcc ▸ this))).symm\n refine DifferentiableAt.fun_div ?_ (differentiableAt_log (by simp_all; linarith)) ?_\n · refine DifferentiableWithinAt.differentiableAt (hf y (Set.Ioo_subset_Icc_self hy)) this\n · linarith [Real.log_pos (by simp_all; linarith)]\n calc\n _ = f x * (θ x - x) / log x + x * f x / log x -\n (∫ y in 2..x, (θ y - y) * deriv (fun t ↦ f t / log t) y) -\n ∫ y in 2..x, y * deriv (fun t ↦ f t / log t) y := by\n rw [eq_413 hx hf, ← tsub_add_eq_tsub_tsub, ← intervalIntegral.integral_add _\n (IntervalIntegrable.continuousOn_mul hd (by fun_prop))]\n · ring_nf\n · refine (intervalIntegrable_iff_integrableOn_Ioc_of_le hx).2 ?_\n have hb : ∀ᵐ y ∂volume.restrict (Set.Ioc 2 x), ‖θ y - y‖ ≤ θ x + x := by\n refine ae_restrict_of_forall_mem measurableSet_Ioc (fun y hy => ?_)\n calc\n _ ≤ ‖θ y‖ + ‖y‖ := by bound\n _ = θ y + y := by rw [norm_of_nonneg (theta_nonneg y), norm_of_nonneg (by grind : 0 ≤ y)]\n _ ≤ θ x + x := add_le_add (theta_mono hy.2) hy.2\n exact ((intervalIntegrable_iff_integrableOn_Ioc_of_le hx).1 hd).bdd_mul\n (AEStronglyMeasurable.sub theta_mono.measurable.aestronglyMeasurable (by fun_prop)) hb\n _ = f x * (θ x - x) / log x +\n ((∫ y in 2..x, 1 * (f y / log y)+ y * derivWithin (fun t ↦ f t / log t) (Set.uIcc 2 x) y) +\n 2 * f 2 / log (2 : ℝ)) -\n (∫ y in 2..x, (θ y - y) * deriv (fun t ↦ f t / log t) y) -\n ∫ y in 2..x, y * deriv (fun t ↦ f t / log t) y := by\n rw [← sub_add_cancel (x * f x / log x) (2 * f 2 / log (2 : ℝ)),\n intervalIntegral.integral_deriv_mul_eq_sub_of_hasDerivWithinAt, mul_div, mul_div]\n · intro y _; exact (hasDerivAt_id' y).hasDerivWithinAt\n · refine fun y hy => DifferentiableWithinAt.hasDerivWithinAt (hcc ▸\n DifferentiableWithinAt.fun_div (hf y (hcc ▸ hy)) ?_ ?_)\n · exact (differentiableAt_log (by simp_all; linarith)).differentiableWithinAt\n · linarith [Real.log_pos (by simp_all; linarith)]\n","line":84,"end_line":133,"proof_status":"formalized"} {"id":"Zeta0EqZeta","label":"Zeta0EqZeta","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["HolomorphicOn_riemannZeta0","ZetaSum_aux2","isPathConnected_aux"],"nlp_text":"For \\(\\Re (s){\\gt}0\\), \\(s\\ne 1\\), and for any \\(N\\), \\[ \\zeta _0(N,s) = \\zeta (s). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Zeta0EqZeta","latex_link":"sect0003.html#Zeta0EqZeta","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Zeta0EqZeta","lean_decl_name":"Zeta0EqZeta","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"Zeta0EqZeta\")\n (statement := /--\n For $\\Re(s)>0$, $s\\ne1$, and for any $N$,\n $$\n \\zeta_0(N,s) = \\zeta(s).\n $$\n -/)\n (proof := /-- Use Lemma \\ref{ZetaSum_aux2} and the Definition \\ref{riemannZeta0}. -/)\n (latexEnv := \"lemma\")]\nlemma Zeta0EqZeta {N : ℕ} (N_pos : 0 < N) {s : ℂ} (reS_pos : 0 < s.re) (s_ne_one : s ≠ 1) :\n ζ₀ N s = riemannZeta s := by\n let f := riemannZeta\n let g := ζ₀ N\n let U := {z : ℂ | z ≠ 1 ∧ 0 < z.re}\n have f_an : AnalyticOnNhd ℂ f U := by\n apply (HolomophicOn_riemannZeta.analyticOnNhd isOpen_ne).mono\n simp only [ne_eq, setOf_subset_setOf, and_imp, U]\n exact fun a ha _ ↦ ha\n have g_an : AnalyticOnNhd ℂ g U := (HolomorphicOn_riemannZeta0 N_pos).analyticOnNhd isOpen_aux\n have preconU : IsPreconnected U := by\n apply IsConnected.isPreconnected\n apply (IsOpen.isConnected_iff_isPathConnected isOpen_aux).mpr isPathConnected_aux\n have h2 : (2 : ℂ) ∈ U := by simp [U]\n have s_mem : s ∈ U := by simp [U, reS_pos, s_ne_one]\n convert (AnalyticOnNhd.eqOn_of_preconnected_of_eventuallyEq f_an g_an preconU h2 ?_ s_mem).symm\n have u_mem : {z : ℂ | 1 < z.re} ∈ 𝓝 (2 : ℂ) := by\n apply mem_nhds_iff.mpr\n use {z : ℂ | 1 < z.re}\n simp only [setOf_subset_setOf, imp_self, forall_const, mem_setOf_eq, re_ofNat,\n Nat.one_lt_ofNat, and_true, true_and]\n exact isOpen_lt (by continuity) (by continuity)\n filter_upwards [u_mem]\n intro z hz\n simp only [f,g, zeta_eq_tsum_one_div_nat_cpow hz, riemannZeta0_apply]\n nth_rewrite 2 [neg_div]\n rw [← sub_eq_add_neg, ← ZetaSum_aux2 N_pos hz,\n ← (summable_one_div_nat_cpow.mpr hz).sum_add_tsum_nat_add (N + 1)]\n norm_cast\n","line":1544,"end_line":1582,"proof_status":"formalized"} {"id":"ZetaUpperBnd","label":"ZetaUpperBnd","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Zeta0EqZeta","ZetaBnd_aux1","ZetaBnd_aux2"],"nlp_text":"For any \\(s = \\sigma + tI \\in \\mathbb {C}\\), \\(1/2 \\le \\sigma \\le 2, 3 {\\lt} |t|\\) and any \\(0 {\\lt} A {\\lt} 1\\) sufficiently small, and \\(1-A/\\log |t| \\le \\sigma \\), we have \\[ |\\zeta (s)| \\ll \\log t. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaUpperBnd","latex_link":"sect0003.html#ZetaUpperBnd","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaUpperBnd","lean_decl_name":"ZetaUpperBnd","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"lemma ZetaUpperBnd' {A σ t : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) (t_gt : 3 < |t|)\n (hσ : σ ∈ Icc (1 - A / Real.log |t|) 2) :\n let C := Real.exp A * (5 + 8 * 2); -- the 2 comes from ZetaBnd_aux1\n let N := ⌊|t|⌋₊;\n let s := σ + t * I;\n ‖∑ n ∈ Finset.range (N + 1), 1 / (n : ℂ) ^ s‖ + ‖(N : ℂ) ^ (1 - s) / (1 - s)‖\n + ‖(N : ℂ) ^ (-s) / 2‖\n + ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)‖\n ≤ C * Real.log |t| := by\n intros C N s\n obtain ⟨Npos, N_le_t, logt_gt, σ_gt, σPos, neOne⟩ := UpperBnd_aux hA t_gt hσ.1\n replace σ_gt : 1 / 2 < σ := by linarith [hA.2]\n calc\n _ ≤ Real.exp A * 2 * Real.log |t| + ‖N ^ (1 - s) / (1 - s)‖ + ‖(N : ℂ) ^ (-s) / 2‖ +\n ‖s * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)‖ := ?_\n _ ≤ Real.exp A * 2 * Real.log |t| + ‖N ^ (1 - s) / (1 - s)‖ + ‖(N : ℂ) ^ (-s) / 2‖ +\n 2 * |t| * N ^ (-σ) / σ := ?_\n _ = Real.exp A * 2 * Real.log |t| + N ^ (1 - σ) / ‖(1 - s)‖ + N ^ (-σ) / 2 +\n 2 * |t| * N ^ (-σ) / σ := ?_\n _ ≤ Real.exp A * 2 * Real.log |t| + |t| ^ (1 - σ) * 2 +\n |t| ^ (1 - σ) + 2 * |t| * (8 * |t| ^ (-σ)) := ?_\n _ = Real.exp A * 2 * Real.log |t| + (3 + 8 * 2) * |t| ^ (1 - σ) := ?_\n _ ≤ Real.exp A * 2 * Real.log |t| + (3 + 8 * 2) * Real.exp A * 1 := ?_\n _ ≤ Real.exp A * 2 * Real.log |t| + (3 + 8 * 2) * Real.exp A * Real.log |t| := ?_\n _ = _ := by ring\n · simp only [add_le_add_iff_right, one_div_cpow_eq_cpow_neg]\n convert UpperBnd_aux3 (C := 2) hA hσ.1 t_gt le_rfl using 1\n · simp only [add_le_add_iff_left]; exact ZetaBnd_aux1 N (by linarith) ⟨σPos, hσ.2⟩ (by linarith)\n · simp only [norm_div, RCLike.norm_ofNat, s]\n congr <;> (convert norm_natCast_cpow_of_pos Npos _; simp)\n · have ⟨h₁, h₂, h₃⟩ := UpperBnd_aux6 t_gt ⟨σ_gt, hσ.2⟩ neOne Npos N_le_t\n refine add_le_add_le_add_le_add le_rfl h₁ h₂ ?_\n rw [mul_div_assoc]\n exact mul_le_mul_iff_right₀ (mul_pos (by norm_num) (by positivity)) |>.mpr h₃\n · ring_nf; conv => lhs; rhs; lhs; rw [mul_comm |t|]\n rw [← Real.rpow_add_one (by positivity)]; ring_nf\n · simp only [Real.log_abs, add_le_add_iff_left, mul_one]\n exact mul_le_mul_iff_right₀ (by positivity) |>.mpr <| UpperBnd_aux2 t_gt hσ.1\n · simp only [add_le_add_iff_left]\n apply mul_le_mul_iff_right₀ (by norm_num [Real.exp_pos]) |>.mpr <| logt_gt.le\n","line":1801,"end_line":1840,"proof_status":"formalized"} {"id":"ZetaDerivUpperBnd","label":"ZetaDerivUpperBnd","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaUpperBnd","DerivUpperBnd_aux7"],"nlp_text":"For any \\(s = \\sigma + tI \\in \\mathbb {C}\\), \\(1/2 \\le \\sigma \\le 2, 3 {\\lt} |t|\\), there is an \\(A{\\gt}0\\) so that for \\(1-A/\\log t \\le \\sigma \\), we have \\[ |\\zeta '(s)| \\ll \\log ^2 t. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaDerivUpperBnd","latex_link":"sect0003.html#ZetaDerivUpperBnd","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaDerivUpperBnd","lean_decl_name":"ZetaDerivUpperBnd","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"lemma ZetaDerivUpperBnd' {A σ t : ℝ} (hA : A ∈ Ioc 0 (1 / 2)) (t_gt : 3 < |t|)\n (hσ : σ ∈ Icc (1 - A / Real.log |t|) 2) :\n let C := Real.exp A * 59;\n let N := ⌊|t|⌋₊;\n let s := σ + t * I;\n ‖∑ n ∈ Finset.range (N + 1), -1 / (n : ℂ) ^ s * (Real.log n)‖ +\n ‖-(N : ℂ) ^ (1 - s) / (1 - s) ^ 2‖ +\n ‖(Real.log N) * (N : ℂ) ^ (1 - s) / (1 - s)‖ +\n ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ +\n ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ +\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ),\n (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖\n ≤ C * Real.log |t| ^ 2 := by\n intros C N s\n obtain ⟨Npos, N_le_t, logt_gt, σ_gt, _, neOne⟩ := UpperBnd_aux hA t_gt hσ.1\n replace σ_gt : 1 / 2 < σ := by linarith [hA.2]\n calc _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n ‖-(N : ℂ) ^ (1 - s) / (1 - s) ^ 2‖ +\n ‖(Real.log N) * (N : ℂ) ^ (1 - s) / (1 - s)‖ +\n ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ +\n ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ +\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ),\n (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by\n gcongr; exact DerivUpperBnd_aux1 hA hσ.1 t_gt (by simp : (2 : ℝ) ≤ 2)\n _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n Real.exp A * 2 * (1 / 3) +\n ‖(Real.log N) * (N : ℂ) ^ (1 - s) / (1 - s)‖ +\n ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ +\n ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ +\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ),\n (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by\n gcongr; exact DerivUpperBnd_aux2 t_gt hσ Npos N_le_t neOne σ_gt\n _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n Real.exp A * 2 * (1 / 3) +\n Real.exp A * 2 * (Real.log |t|) +\n ‖(Real.log N) * (N : ℂ) ^ (-s) / 2‖ +\n ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ +\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ),\n (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by\n gcongr; exact DerivUpperBnd_aux3 t_gt hσ Npos N_le_t neOne σ_gt\n _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n Real.exp A * 2 * (1 / 3) +\n Real.exp A * 2 * (Real.log |t|) +\n Real.exp A * (Real.log |t|) +\n ‖(1 * ∫ (x : ℝ) in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1))‖ +\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ),\n (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by\n gcongr; exact DerivUpperBnd_aux4 t_gt hσ Npos N_le_t neOne σ_gt\n _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n Real.exp A * 2 * (1 / 3) +\n Real.exp A * 2 * (Real.log |t|) +\n Real.exp A * (Real.log |t|) +\n 1 / 3 * (2 * |t| * N ^ (-σ) / σ) +\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ),\n (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by\n gcongr; exact DerivUpperBnd_aux5 t_gt hσ Npos σ_gt\n _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n Real.exp A * 2 * (1 / 3) +\n Real.exp A * 2 * (Real.log |t|) +\n Real.exp A * (Real.log |t|) +\n 1 / 3 * (2 * (8 * Real.exp A)) +\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ),\n (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-s - 1) * -(Real.log x)‖ := by\n gcongr; exact DerivUpperBnd_aux6 t_gt hσ Npos N_le_t neOne σ_gt\n _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n Real.exp A * 2 * (1 / 3) +\n Real.exp A * 2 * (Real.log |t|) +\n Real.exp A * (Real.log |t|) +\n 1 / 3 * (2 * (8 * Real.exp A)) +\n (6 * |t| * N ^ (-σ) / σ) * (Real.log |t|) := by\n gcongr; exact DerivUpperBnd_aux7 t_gt hσ Npos N_le_t neOne σ_gt\n _ ≤ Real.exp A * 2 * (Real.log |t|) ^ 2 +\n Real.exp A * 2 * (1 / 3) +\n Real.exp A * 2 * (Real.log |t|) +\n Real.exp A * (Real.log |t|) +\n 1 / 3 * (2 * (8 * Real.exp A)) +\n (6 * (8 * Real.exp A)) * (Real.log |t|) := by\n gcongr; convert mul_le_mul_of_nonneg_left (DerivUpperBnd_aux6 t_gt hσ Npos N_le_t neOne σ_gt) (by norm_num : (0 : ℝ) ≤ 3) using 1 <;> ring\n _ ≤ _ := by\n simp only [C]\n ring_nf\n rw [(by ring : A.exp * |t|.log ^ 2 * 59 = A.exp * |t|.log ^ 2 * 6 + A.exp * |t|.log ^ 2 * 51 +\n A.exp * |t|.log ^ 2 * 2)]\n nth_rewrite 1 [← mul_one A.exp]\n gcongr\n swap\n · nth_rewrite 1 [← mul_one |t|.log, (by ring : |t|.log ^ 2 = |t|.log * |t|.log)]\n gcongr\n nlinarith\n","line":2217,"end_line":2305,"proof_status":"formalized"} {"id":"ZetaLowerBound3","label":"ZetaLowerBound3","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaUpperBnd","ZetaNear1BndExact"],"nlp_text":"There exists a \\(c{\\gt}0\\) such that for all \\(1 {\\lt} \\sigma {\\lt}= 2\\) and \\(3 {\\lt} |t|\\), \\[ c \\frac{(\\sigma -1)^{3/4}}{(\\log |t|)^{1/4}} \\le |\\zeta (\\sigma + tI)|. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaLowerBound3","latex_link":"sect0003.html#ZetaLowerBound3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaLowerBound3","lean_decl_name":"ZetaLowerBound3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaLowerBound3\")\n (statement := /--\n There exists a $c>0$ such that for all $1 < \\sigma <= 2$ and $3 < |t|$,\n $$\n c \\frac{(\\sigma-1)^{3/4}}{(\\log |t|)^{1/4}} \\le |\\zeta(\\sigma + tI)|.\n $$\n -/)\n (proof := /--\n Combine Lemma \\ref{ZetaLowerBound2} with upper bounds for\n $|\\zeta(\\sigma)|$ (from Lemma \\ref{ZetaNear1BndExact}) and\n $|\\zeta(\\sigma+2it)|$ (from Lemma \\ref{ZetaUpperBnd}).\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaLowerBound3 :\n ∃ c > 0, ∀ {σ : ℝ} (_ : σ ∈ Ioc 1 2) (t : ℝ) (_ : 3 < |t|),\n c * (σ - 1) ^ ((3 : ℝ) / 4) / (Real.log |t|) ^ ((1 : ℝ) / 4) ≤ ‖ζ (σ + t * I)‖ := by\n obtain ⟨A, ha, C, hC, h_upper⟩ := ZetaUpperBnd\n obtain ⟨c_near, hc_near, h_near⟩ := ZetaNear1BndExact\n\n use 1 / (c_near ^ ((3 : ℝ) / 4) * (2 * C) ^ ((1 : ℝ) / 4)), by positivity\n intro σ hσ t ht\n obtain ⟨σ_gt, σ_le⟩ := hσ\n\n -- Use ZetaLowerBound2\n have lower := ZetaLowerBound2 (t := t) σ_gt\n apply le_trans _ lower\n\n -- Now we need to bound the denominator from above\n -- This will give us a lower bound on the whole expression\n\n -- Upper bound on ‖ζ σ‖ from ZetaNear1BndExact\n have ζ_σ_bound : ‖ζ σ‖ ≤ c_near / (σ - 1) := by\n exact h_near σ ⟨σ_gt, σ_le⟩\n\n have ht_2 : 3 < |2 * t| := by simp only [abs_mul, Nat.abs_ofNat]; linarith\n\n -- Upper bound on ‖ζ (σ + 2*t * I)‖ from ZetaUpperBnd\n\n have σ_in_range : σ ∈ Icc (1 - A / Real.log |2 * t|) 2 := by\n constructor\n · -- σ ≥ 1 - A / Real.log |2*t|\n have : 0 < A / Real.log |2 * t| := by\n exact ZetaLowerBound3_aux1 A ha t ht_2\n nlinarith\n · exact σ_le\n\n have ζ_2t_bound := h_upper σ (2 * t) ht_2 σ_in_range\n\n -- Combine the bounds\n have denom_bound : ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) ≤\n (c_near / (σ - 1)) ^ ((3 : ℝ) / 4) * (C * Real.log |2 * t|) ^ ((1 : ℝ) / 4) := by\n apply mul_le_mul\n · apply Real.rpow_le_rpow (norm_nonneg _) ζ_σ_bound (by norm_num)\n · apply ZetaLowerBound3_aux2\n convert ζ_2t_bound\n norm_cast\n · apply Real.rpow_nonneg (norm_nonneg _)\n · apply Real.rpow_nonneg (div_nonneg (by linarith) (by linarith))\n\n -- Simplify the bound\n have : (c_near / (σ - 1)) ^ ((3 : ℝ) / 4) * (C * Real.log |2 * t|) ^ ((1 : ℝ) / 4) =\n c_near ^ ((3 : ℝ) / 4) * (σ - 1) ^ (-(3 : ℝ) / 4) * C ^ ((1 : ℝ) / 4) * (Real.log |2 * t|) ^ ((1 : ℝ) / 4) := by\n rw [Real.div_rpow (by linarith) (by linarith), Real.mul_rpow (by linarith) (Real.log_nonneg (by linarith))]\n ring_nf\n exact ZetaLowerBound3_aux3 _ _ _ σ_gt\n rw [this] at denom_bound\n\n -- Take reciprocal (flipping inequality)\n have pos_left : 0 < c_near ^ ((3 : ℝ) / 4) * (σ - 1) ^ (-(3 : ℝ) / 4) * C ^ ((1 : ℝ) / 4) * (Real.log |2 * t|) ^ ((1 : ℝ) / 4) := by\n apply ZetaLowerBound3_aux4 C hC c_near hc_near t ht σ_gt\n\n have pos_right : 0 < ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) := by\n -- This follows from ZetaLowerBound1 - if either factor were zero, we'd get 0 ≥ 1\n apply ZetaLowerBound3_aux5 _ <| ZetaLowerBound1 (t := t) σ_gt\n\n\n use (div_le_div_of_nonneg_left zero_le_one pos_right denom_bound).trans' ?_\n simp_rw [abs_mul, abs_two, neg_div, Real.rpow_neg (sub_pos.2 σ_gt).le] at *\n have hlog : 0 < Real.log |t| := Real.log_pos <| ht.trans' <| by norm_num\n have : 0 < Real.log |t| ^ (1 / 4 : ℝ) := Real.rpow_pos_of_pos hlog _\n have hlog2 : 0 < Real.log (2 * |t|) := Real.log_pos <| ht_2.trans' <| by norm_num\n have : 0 < Real.log (2 * |t|) ^ (1 / 4 : ℝ) := Real.rpow_pos_of_pos hlog2 (1 / 4)\n field_simp\n move_mul [(σ - 1) ^ (3 / 4)]\n rw [mul_le_mul_iff_left₀]\n swap\n · have := sub_pos_of_lt σ_gt\n positivity\n rw [Real.mul_rpow two_pos.le hC.le]\n move_mul [C ^ (1 / 4)]\n rw [mul_le_mul_iff_left₀]\n swap\n · positivity\n rw [← Real.mul_rpow two_pos.le hlog.le]\n apply Real.rpow_le_rpow hlog2.le ?_ (by norm_num)\n rw [← Real.log_rpow (ht.trans' (by norm_num))]\n apply Real.log_le_log (ht_2.trans' (by norm_num))\n rw [Real.rpow_two, sq]\n gcongr\n exact ht.trans' (by norm_num) |>.le\n","line":2537,"end_line":2637,"proof_status":"formalized"} {"id":"ZetaInvBound2","label":"ZetaInvBound2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaUpperBnd","ZetaNear1BndExact","ZetaInvBound1"],"nlp_text":"For \\(\\sigma {\\gt}1\\) (and \\(\\sigma \\le 2\\)), \\[ 1/|\\zeta (\\sigma +it)| \\ll (\\sigma -1)^{-3/4}(\\log |t|)^{1/4}, \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaInvBound2","latex_link":"sect0003.html#ZetaInvBound2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaInvBound2","lean_decl_name":"ZetaInvBound2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaInvBound2\")\n (statement := /--\n For $\\sigma>1$ (and $\\sigma \\le 2$),\n $$\n 1/|\\zeta(\\sigma+it)| \\ll (\\sigma-1)^{-3/4}(\\log |t|)^{1/4},\n $$\n as $|t|\\to\\infty$.\n -/)\n (proof := /--\n Combine Lemma \\ref{ZetaInvBound1} with the bounds in Lemmata \\ref{ZetaNear1BndExact} and\n \\ref{ZetaUpperBnd}.\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaInvBound2 :\n ∃ C > 0, ∀ {σ : ℝ} (_ : σ ∈ Ioc 1 2) (t : ℝ) (_ : 3 < |t|),\n 1 / ‖ζ (σ + t * I)‖ ≤ C * (σ - 1) ^ (-(3 : ℝ) / 4) * (Real.log |t|) ^ ((1 : ℝ) / 4) := by\n obtain ⟨A, ha, C, hC, h⟩ := ZetaUpperBnd\n obtain ⟨c, hc, h_inv⟩ := ZetaNear1BndExact\n refine ⟨(2 * C) ^ ((1 : ℝ)/ 4) * c ^ ((3 : ℝ)/ 4), by positivity, ?_⟩\n intro σ hσ t t_gt\n obtain ⟨σ_gt, σ_le⟩ := hσ\n have ht' : 3 < |2 * t| := by simp only [abs_mul, Nat.abs_ofNat]; linarith\n have hnezero: ((σ - 1) / c) ^ (-3 / 4 : ℝ) ≠ 0 := by\n have : (σ - 1) / c ≠ 0 := ne_of_gt <| div_pos (by linarith) hc\n contrapose! this\n rwa [Real.rpow_eq_zero (div_nonneg (by linarith) hc.le) (by norm_num)] at this\n calc\n _ ≤ ‖‖ζ σ‖ ^ (3 / 4 : ℝ) * ‖ζ (↑σ + 2 * ↑t * I)‖ ^ (1 / 4 : ℝ)‖ := ?_\n _ ≤ ‖((σ - 1) / c) ^ (-3 / 4 : ℝ) * ‖ζ (↑σ + 2 * ↑t * I)‖ ^ (1 / 4 : ℝ)‖ := ?_\n _ ≤ ‖((σ - 1) / c) ^ (-3 / 4 : ℝ) * C ^ (1 / 4 : ℝ) * (Real.log |2 * t|) ^ (1 / 4 : ℝ)‖ := ?_\n _ ≤ ‖((σ - 1) / c) ^ (-3 / 4 : ℝ) * C ^ (1 / 4 : ℝ) * (Real.log (|t| ^ 2)) ^ (1 / 4 : ℝ)‖ := ?_\n _ = ‖((σ - 1)) ^ (-3 / 4 : ℝ) * c ^ (3 / 4 : ℝ) * (C ^ (1 / 4 : ℝ) * (Real.log (|t| ^ 2)) ^ (1 / 4 : ℝ))‖ := ?_\n _ = ‖((σ - 1)) ^ (-3 / 4 : ℝ) * c ^ (3 / 4 : ℝ) * ((2 * C) ^ (1 / 4 : ℝ) * Real.log |t| ^ (1 / 4 : ℝ))‖ := ?_\n _ = _ := ?_\n · simp only [norm_mul]\n convert ZetaInvBound1 σ_gt using 2\n <;> exact abs_eq_self.mpr <| Real.rpow_nonneg (norm_nonneg _) _\n · have bnd1: ‖ζ σ‖ ^ (3 / 4 : ℝ) ≤ ((σ - 1) / c) ^ (-(3 : ℝ) / 4) := by\n have : ((σ - 1) / c) ^ (-(3 : ℝ) / 4) = (((σ - 1) / c) ^ (-1 : ℝ)) ^ (3 / 4 : ℝ) := by\n rw [← Real.rpow_mul ?_]\n · ring_nf\n · exact div_nonneg (by linarith) hc.le\n rw [this]\n apply Real.rpow_le_rpow (by simp [norm_nonneg]) ?_ (by norm_num)\n convert h_inv σ ⟨σ_gt, σ_le⟩ using 1; simp [Real.rpow_neg_one, inv_div]\n simp only [norm_mul]\n apply (mul_le_mul_iff_left₀ ?_).mpr\n · convert bnd1 using 1\n · exact abs_eq_self.mpr <| Real.rpow_nonneg (norm_nonneg _) _\n · exact abs_eq_self.mpr <| Real.rpow_nonneg (div_nonneg (by linarith) hc.le) _\n · apply lt_iff_le_and_ne.mpr ⟨(by simp), ?_⟩\n have : ζ (↑σ + 2 * ↑t * I) ≠ 0 := by\n apply riemannZeta_ne_zero_of_one_le_re (by simp [σ_gt.le])\n symm; exact fun h2 ↦ this (by simpa using h2)\n · replace h := h σ (2 * t) (by simpa using ht') ⟨?_, σ_le⟩\n · have : 0 ≤ Real.log |2 * t| := Real.log_nonneg (by linarith)\n conv => rhs; rw [mul_assoc, ← Real.mul_rpow hC.le this]\n rw [norm_mul, norm_mul]\n conv => rhs; rhs; rw [Real.norm_rpow_of_nonneg <| mul_nonneg hC.le this]\n conv => lhs; rhs; rw [Real.norm_rpow_of_nonneg <| norm_nonneg _]\n apply (mul_le_mul_iff_right₀ ?_).mpr\n · apply Real.rpow_le_rpow (norm_nonneg _) ?_ (by norm_num)\n convert h using 1\n · simp\n · rw [Real.norm_eq_abs, abs_eq_self.mpr <| mul_nonneg hC.le this]\n · simpa only [Real.norm_eq_abs, abs_pos]\n · linarith [(div_nonneg ha.1.le (Real.log_nonneg (by linarith)) : 0 ≤ A / Real.log |2 * t|)]\n · simp only [Real.log_abs, norm_mul]\n apply (mul_le_mul_iff_right₀ ?_).mpr\n · rw [← Real.log_abs, Real.norm_rpow_of_nonneg <| Real.log_nonneg (by linarith)]\n have : 1 ≤ |(|t| ^ 2)| := by\n simp only [_root_.sq_abs, _root_.abs_pow, one_le_sq_iff_one_le_abs]\n linarith\n conv => rhs; rw [← Real.log_abs, Real.norm_rpow_of_nonneg <| Real.log_nonneg this]\n apply Real.rpow_le_rpow (abs_nonneg _) ?_ (by norm_num)\n · rw [Real.norm_eq_abs, abs_eq_self.mpr <| Real.log_nonneg (by linarith)]\n rw [abs_eq_self.mpr <| Real.log_nonneg this, abs_mul, Real.log_abs, Nat.abs_ofNat]\n apply Real.log_le_log (mul_pos (by norm_num) (by linarith)) (by nlinarith)\n · apply mul_pos (abs_pos.mpr hnezero) (abs_pos.mpr ?_)\n have : C ≠ 0 := ne_of_gt hC\n contrapose! this; rwa [Real.rpow_eq_zero (by linarith) (by norm_num)] at this\n · have : (-3 : ℝ) / 4 = -((3 : ℝ)/ 4) := by norm_num\n simp only [norm_mul, mul_eq_mul_right_iff, this, ← mul_assoc]; left; left\n conv => lhs; rw [Real.div_rpow (by linarith) hc.le, Real.rpow_neg hc.le, div_inv_eq_mul, norm_mul]\n · simp only [Real.log_pow, Nat.cast_ofNat, norm_mul, Real.norm_eq_abs]\n congr! 1\n rw [Real.mul_rpow (by norm_num) hC.le, Real.mul_rpow (by norm_num) <|\n Real.log_nonneg (by linarith), abs_mul, abs_mul, ← mul_assoc, mul_comm _ |2 ^ (1 / 4)|]\n · simp only [norm_mul, Real.norm_eq_abs]\n have : (2 * C) ^ ((1 : ℝ)/ 4) * c ^ ((3 : ℝ)/ 4) =\n |(2 * C) ^ ((1 : ℝ)/ 4) * c ^ ((3 : ℝ)/ 4)| := by\n rw [abs_eq_self.mpr (by apply mul_nonneg <;> (apply Real.rpow_nonneg; linarith))]\n rw [this, abs_mul, abs_eq_self.mpr (by apply Real.rpow_nonneg; linarith), abs_eq_self.mpr (by positivity),\n abs_eq_self.mpr (by positivity), abs_eq_self.mpr (by apply Real.rpow_nonneg (Real.log_nonneg (by linarith)))]\n ring_nf\n","line":2690,"end_line":2785,"proof_status":"formalized"} {"id":"Zeta_diff_Bnd","label":"Zeta_diff_Bnd","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaDerivUpperBnd","Zeta_eq_int_derivZeta"],"nlp_text":"For any \\(A{\\gt}0\\) sufficiently small, there is a constant \\(C{\\gt}0\\) so that whenever \\(1- A / \\log t \\le \\sigma _1 {\\lt} \\sigma _2\\le 2\\) and \\(3 {\\lt} |t|\\), we have that: \\[ |\\zeta (\\sigma _2 + it) - \\zeta (\\sigma _1 + it)| \\le C (\\log |t|)^2 (\\sigma _2 - \\sigma _1). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Zeta_diff_Bnd","latex_link":"sect0003.html#Zeta_diff_Bnd","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Zeta_diff_Bnd","lean_decl_name":"Zeta_diff_Bnd","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"Zeta-diff-Bnd\")\n (statement := /--\n For any $A>0$ sufficiently small, there is a constant $C>0$ so that\n whenever $1- A / \\log t \\le \\sigma_1 < \\sigma_2\\le 2$ and $3 < |t|$, we have that:\n $$\n |\\zeta (\\sigma_2 + it) - \\zeta (\\sigma_1 + it)|\n \\le C (\\log |t|)^2 (\\sigma_2 - \\sigma_1).\n $$\n -/)\n (proof := /--\n Use Lemma \\ref{Zeta_eq_int_derivZeta} and\n estimate trivially using Lemma \\ref{ZetaDerivUpperBnd}.\n -/)\n (latexEnv := \"lemma\")]\nlemma Zeta_diff_Bnd :\n ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (C : ℝ) (_ : 0 < C), ∀ (σ₁ σ₂ : ℝ) (t : ℝ) (_ : 3 < |t|)\n (_ : 1 - A / Real.log |t| ≤ σ₁) (_ : σ₂ ≤ 2) (_ : σ₁ < σ₂),\n ‖ζ (σ₂ + t * I) - ζ (σ₁ + t * I)‖ ≤ C * Real.log |t| ^ 2 * (σ₂ - σ₁) := by\n obtain ⟨A, hA, C, Cpos, hC⟩ := ZetaDerivUpperBnd\n refine ⟨A, hA, C, Cpos, ?_⟩\n intro σ₁ σ₂ t t_gt σ₁_ge σ₂_le σ₁_lt_σ₂\n have t_ne_zero : t ≠ 0 := by contrapose! t_gt; simp only [t_gt, abs_zero, Nat.ofNat_nonneg]\n rw [← Zeta_eq_int_derivZeta t_ne_zero]\n convert intervalIntegral.norm_integral_le_of_norm_le_const ?_ using 1\n · congr; rw [_root_.abs_of_nonneg (by linarith)]\n · intro σ hσ; rw [uIoc_of_le σ₁_lt_σ₂.le, mem_Ioc] at hσ\n exact hC σ t t_gt ⟨le_trans σ₁_ge hσ.1.le, le_trans hσ.2 σ₂_le⟩\n","line":2831,"end_line":2858,"proof_status":"formalized"} {"id":"ZetaLowerBnd","label":"ZetaLowerBnd","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaLowerBound3","Zeta_diff_Bnd"],"nlp_text":"For any \\(A{\\gt}0\\) sufficiently small, there is a constant \\(C{\\gt}0\\) so that whenever \\(1- A / \\log ^9 |t| \\le \\sigma {\\lt} 1\\) and \\(3 {\\lt} |t|\\), we have that: \\[ |\\zeta (\\sigma +it)| \\ge C \\log ^7 |t|. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaLowerBnd","latex_link":"sect0003.html#ZetaLowerBnd","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaLowerBnd","lean_decl_name":"ZetaLowerBnd","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaLowerBnd\")\n (statement := /--\n For any $A>0$ sufficiently small, there is a constant $C>0$ so that\n whenever $1- A / \\log^9 |t| \\le \\sigma < 1$ and $3 < |t|$, we have that:\n $$\n |\\zeta(\\sigma+it)| \\ge C \\log^7 |t|.\n $$\n -/)\n (proof := /-- Follow same argument. -/)\n (latexEnv := \"lemma\")]\nlemma ZetaLowerBnd :\n ∃ (A : ℝ) (_ : A ∈ Ioc 0 (1 / 2)) (c : ℝ) (_ : 0 < c),\n ∀ (σ : ℝ)\n (t : ℝ) (_ : 3 < |t|)\n (_ : σ ∈ Ico (1 - A / (Real.log |t|) ^ 9) 1),\n c / (Real.log |t|) ^ (7 : ℝ) ≤ ‖ζ (σ + t * I)‖ := by\n obtain ⟨C₁, C₁pos, hC₁⟩ := ZetaLowerBound3\n obtain ⟨A', hA', C₂, C₂pos, hC₂⟩ := Zeta_diff_Bnd\n\n -- Pick the right constants.\n -- Don't really like this because I can only do that after first finishing the proof.\n -- Is there a way to delay picking those\n let A := min A' ((C₁ / (4 * C₂)) ^ 4)\n have hA : A ∈ Ioc 0 (1 / 2) :=\n ⟨lt_min hA'.1 (by positivity), (min_le_left A' _).trans hA'.2⟩\n\n let C := C₁ * A ^ ((3:ℝ) /4) - 2 * C₂ * A\n have hc_pos : 0 < C := by\n have:= A.rpow_le_rpow hA.1.le (min_le_right _ _) (inv_pos.mpr four_pos).le\n erw [Real.pow_rpow_inv_natCast (div_pos C₁pos (mul_pos four_pos C₂pos)).le four_ne_zero,\n le_div_iff₀ (mul_pos four_pos C₂pos)] at this\n norm_num [mul_assoc, C, mul_left_comm, C₂pos, hA.1,\n (mul_le_mul_of_nonneg_right this (A.rpow_nonneg hA.1.le _)).trans_lt', ←A.rpow_add]\n\n refine ⟨A, hA, C, hc_pos, fun σ t L ⟨σ_low_bound, σ_le_one⟩=>?_⟩\n\n -- From here I followed the proof found in the blueprint\n let σ' := 1 + A / Real.log |t| ^ (9 : ℝ)\n\n have triangular : ‖ζ (σ + t * I)‖ ≥ ‖ζ (σ' + t * I)‖ - ‖ζ (σ + t * I) - ζ (σ' + t * I)‖ := by\n apply sub_le_iff_le_add.mpr.comp (sub_sub_self @_ (@_ : ℂ)▸norm_sub_le _ _).trans\n (by rw [add_comm])\n\n have one_leLogT : 1 ≤ Real.log |t| := (logt_gt_one L.le).le\n have one_half_le_log_pow : 1 / 2 ≤ Real.log |t| ^ 9 :=\n one_half_lt_one.le.trans <| one_le_pow₀ one_leLogT\n\n have σ'_ge : 1 ≤ σ' := by\n simp_all only [gt_iff_lt, mem_Ioc, Real.log_abs, one_div, and_imp, tsub_le_iff_right,\n lt_inf_iff, div_pos_iff_of_pos_left, Nat.ofNat_pos, mul_pos_iff_of_pos_left, pow_pos,\n and_self, inf_le_iff, true_or, sub_pos, mem_Ico, and_true, ofReal_add, ofReal_one,\n ofReal_div, ge_iff_le, le_add_iff_nonneg_right, A, C, σ']\n apply div_nonneg\n · apply le_min\n · linarith\n · have : (C₁ / (4 * C₂)) ^ 4 = ((C₁ / (4 * C₂)) ^ 2) ^ 2 := by ring\n rw [this]\n apply sq_nonneg\n · positivity\n\n have right_sub : -‖ζ (σ + t * I) - ζ (σ' + t * I)‖ ≥ - C₂ * Real.log |t| ^ 2 * (σ' - σ) := by\n change - C₂ * Real.log |t| ^ 2 * (σ' - σ) ≤ -‖ζ (σ + t * I) - ζ (σ' + t * I)‖\n have := hC₂ σ σ' t L ?_ ?_ ?_\n · convert neg_le_neg this using 1\n · ring\n · congr! 1\n have : ζ (↑σ + ↑t * I) - ζ (↑σ' + ↑t * I) =\n - (ζ (↑σ' + ↑t * I) - ζ (↑σ + ↑t * I)) := by ring\n rw [this, norm_neg]\n · have : 1 - A' / Real.log |t| ≤ 1 - A / (Real.log |t|) ^ 9 := by\n gcongr\n · exact hA'.1.le\n · bound\n · bound\n linarith\n · have : σ' ≤ 1 + A := by\n simp_all only [gt_iff_lt, mem_Ioc, Real.log_abs, one_div, and_imp, tsub_le_iff_right,\n lt_inf_iff, div_pos_iff_of_pos_left, Nat.ofNat_pos, mul_pos_iff_of_pos_left, pow_pos,\n and_self, inf_le_iff, true_or, sub_pos, mem_Ico, and_true, ofReal_add, ofReal_one,\n ofReal_div, ge_iff_le, le_add_iff_nonneg_right, add_le_add_iff_left, le_inf_iff,\n σ', A, C]\n have : 1 ≤ Real.log t ^ (9 : ℕ) := by\n bound\n have : 1 ≤ Real.log t ^ (9 : ℝ) := by\n exact_mod_cast this\n refine ⟨?_, ?_⟩\n · rw [← min_div_div_right]\n · rw [min_le_iff]\n left\n bound\n · exact le_trans (zero_le_one) this\n · rw [← min_div_div_right]\n · rw [min_le_iff]\n right\n bound\n · exact le_trans (zero_le_one) this\n · bound [hA.2]\n · linarith\n\n have right' : -‖ζ (σ + t * I) - ζ (σ' + t * I)‖ ≥ - C₂ * 2 * A / Real.log |t| ^ 7 := by\n have := (abs t).log_pos (by bound)\n refine right_sub.trans' ((div_le_iff₀ (pow_pos this 7)).2 @?_|>.trans\n (mul_le_mul_of_nonpos_left (sub_le_sub_left σ_low_bound (1+_) )\n (by ·linear_combination C₂*this*(.log |t|))))\n exact (mod_cast (by linear_combination (2 *_* A) *div_self ↑(pow_pos this 09).ne'))\n\n have left_sub : ‖ζ (σ' + t * I)‖ ≥ C₁ * (σ' - 1) ^ ((3:ℝ) /4) / Real.log |t| ^ 4 := by\n use (hC₁ ⟨lt_add_of_pos_right (1) (by bound[hA.1]),\n add_le_of_le_sub_left ((div_le_iff₀ (by bound)).2 (hA.2.trans (?_)))⟩ t L).trans' ?_\n · norm_num only [one_mul, Real.rpow_ofNat, one_half_le_log_pow]\n · simp_all only [gt_iff_lt, mem_Ioc, lt_inf_iff, div_pos_iff_of_pos_left, Nat.ofNat_pos,\n mul_pos_iff_of_pos_left, pow_pos, and_self, inf_le_iff, true_or, sub_pos, mem_Ico,\n ofReal_add, ofReal_one, ofReal_div, ge_iff_le, le_add_iff_nonneg_right, neg_mul,\n neg_le_neg_iff, add_sub_cancel_left, σ', A, C]\n gcongr\n have : Real.log |t| ^ ((1 : ℝ) / 4) ≤ Real.log |t| ^ (4 : ℝ) :=\n Real.rpow_le_rpow_of_exponent_le one_leLogT (by norm_num)\n exact_mod_cast this\n\n have left' : ‖ζ (σ' + t * I)‖ ≥ C₁ * A ^ ((3:ℝ) /4) / Real.log |t| ^ 7 := by\n contrapose! hC₁\n use σ', ⟨lt_add_of_pos_right 1<|by bound[hA'.1],\n add_le_of_le_sub_left ((div_le_iff₀ (by bound)).2 (hA.2.trans ?_))⟩, t, L, hC₁.trans_le ?_\n · norm_num only [one_mul, Real.rpow_ofNat, one_half_le_log_pow]\n · norm_num only [σ', add_sub_cancel_left, A.div_rpow hA.1.le, mul_div, pow_pos, L.trans',\n ←Real.rpow_natCast, ←Real.rpow_mul, le_of_lt, Real.log_pos, refl, div_div, ←Real.rpow_sub]\n norm_num only [*, L.trans', mul_assoc, A.div_rpow, mul_div, ←Real.rpow_add,\n ←Real.rpow_natCast, ←Real.rpow_mul, div_div, Real.log_pos, Real.rpow_pos_of_pos, hA.1,\n refl, le_of_lt]\n\n have ineq : ‖ζ (σ + t * I)‖ ≥ (C₁ * A ^ ((3:ℝ) /4) - C₂ * 2 * A) / Real.log |t| ^ 7 := by\n linear_combination left'+triangular+right'\n\n rw [mul_comm C₂] at ineq\n exact_mod_cast ineq\n","line":3003,"end_line":3138,"proof_status":"formalized"} {"id":"fks_cor_14","label":"fks_cor_14","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["classical-bound-psi"],"nlp_text":"For all x > 2 we have \\(E_ψ(x) \\leq 9.22022(\\log x)^{3/2} \\exp (-0.8476836 \\sqrt{\\log x})\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.FKS_corollary_1_4","latex_link":"primary-chapter.html#fks_cor_14","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.FKS_corollary_1_4","lean_decl_name":"FKS.FKS_corollary_1_4","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint \"fks_cor_14\"\n (title := \"FKS1 Corollary 1.4\")\n (statement := /--\n For all x > 2 we have\n $E_ψ(x) \\leq 9.22022(\\log x)^{3/2} \\exp(-0.8476836 \\sqrt{\\log x})$.\n -/)\n (proof := /-- TODO. -/)]\ntheorem FKS_corollary_1_4 :\n Eψ.classicalBound 9.22022 (3 / 2) 0.8476836 1 2 := sorry\n","line":641,"end_line":649,"proof_status":"statement_formalized"} {"id":"divRemovable_zero","label":"divRemovable_zero","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Given a complex function \\(f\\), we define the function \\[ g(z):=\\begin{cases} \\frac{f(z)}{z}, & z\\neq 0;\\\\ f’(0), & z=0. \\end{cases} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/divRemovable_zero","latex_link":"sect0004.html#divRemovable_zero","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/divRemovable_zero","lean_decl_name":"divRemovable_zero","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint\n (statement := /--\n Given a complex function $f$, we define the function\n $$g(z):=\\begin{cases}\n \\frac{f(z)}{z}, & z\\neq 0;\\\\\n f'(0), & z=0.\n \\end{cases}$$\n -/)]\nnoncomputable abbrev divRemovable_zero (f : ℂ → ℂ) : ℂ → ℂ :=\n Function.update (fun z ↦ (f z) / z) 0 ((deriv f) 0)","line":11,"end_line":20,"proof_status":"formalized"} {"id":"schwartzQuotient","label":"schwartzQuotient","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["divRemovable_zero"],"nlp_text":"Given a complex function \\(f\\) and a real number \\(M\\), we define the function \\[ f_{M}(z):=\\frac{g(z)}{2M - f(z)}, \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/schwartzQuotient","latex_link":"sect0004.html#schwartzQuotient","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/schwartzQuotient","lean_decl_name":"schwartzQuotient","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint\n (statement := /--\n Given a complex function $f$ and a real number $M$, we define the function\n $$f_{M}(z):=\\frac{g(z)}{2M - f(z)},$$\n where $g$ is defined as in Definition~\\ref{divRemovable_zero}.\n -/)]\nnoncomputable abbrev schwartzQuotient (f : ℂ → ℂ) (M : ℝ) : ℂ → ℂ :=\n fun z ↦ (divRemovable_zero f z) / (2 * M - f z)","line":167,"end_line":174,"proof_status":"formalized"} {"id":"params-set","label":"params-set","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Now let \\(M,L\\) be additional parameters with \\(n {\\gt} L^2\\); we also need the minor variant \\(\\lfloor n/L \\rfloor {\\gt} \\sqrt{n}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params","latex_link":"tertiary-chapter.html#params-set","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params","lean_decl_name":"Erdos392.Params","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"params-set\"\n (statement := /-- Now let $M,L$ be additional parameters with $n > L^2$; we also need the minor\n variant $\\lfloor n/L \\rfloor > \\sqrt{n}$. -/)]\nstructure Params where\n n : ℕ\n M : ℕ\n L : ℕ\n hM : M > 1\n hL_pos : L > 0\n hL : n > L * L\n hL' : (n/L:ℕ) > Real.sqrt n -- almost implied by hL, but not quite\n","line":880,"end_line":891,"proof_status":"formalized"} {"id":"bound-score-1","label":"bound-score-1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["params-set"],"nlp_text":"If \\(M\\) is sufficiently large depending on \\(\\varepsilon \\), then \\(n \\log (1-1/M)^{-1} \\leq \\varepsilon n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_1","latex_link":"tertiary-chapter.html#bound-score-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_1","lean_decl_name":"Erdos392.Params.initial.bound_score_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"bound-score-1\"\n (statement := /-- If $M$ is sufficiently large depending on $\\varepsilon$, then\n$n \\log(1-1/M)^{-1} \\leq \\varepsilon n$. -/)\n (proof := /-- Use the fact that $\\log(1-1/M)^{-1}$ goes to zero as $M \\to \\infty$.-/)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.bound_score_1 (ε : ℝ) (hε : ε > 0) :\n ∀ᶠ M in .atTop, ∀ P : Params,\n P.M = M → P.n * log (1 - 1 / (P.M : ℝ))⁻¹ ≤ ε * P.n := by\n have h_tendsto : Filter.Tendsto (fun M : ℕ ↦ log (1 - 1 / (M : ℝ))⁻¹) .atTop (nhds 0) := by\n have : Filter.Tendsto (fun M : ℕ ↦ (1 : ℝ) / M) .atTop (nhds 0) :=\n tendsto_const_div_atTop_nhds_zero_nat 1\n have : Filter.Tendsto (fun M : ℕ ↦ 1 - 1 / (M : ℝ)) .atTop (nhds 1) := by\n simpa only [one_div, sub_zero] using tendsto_const_nhds.sub this\n have : Filter.Tendsto (fun M : ℕ ↦ (1 - 1 / (M : ℝ))⁻¹) .atTop (nhds 1) := by\n simpa using this.inv₀ one_ne_zero\n have h : Filter.Tendsto (fun x : ℝ ↦ log x) (nhds 1) (nhds 0) := by\n simpa [ContinuousAt, log_one] using continuousAt_log (x := (1 : ℝ)) one_ne_zero\n exact h.comp this\n rw [Metric.tendsto_atTop] at h_tendsto\n obtain ⟨N, hN⟩ := h_tendsto ε hε\n filter_upwards [Filter.eventually_ge_atTop N] with M hM P hPM\n rcases eq_or_ne P.n 0 with hn | hn\n · simp [hn]\n have hM_pos : (0 : ℝ) < M := cast_pos.mpr (zero_lt_of_lt <| hPM ▸ P.hM)\n have h_one_sub_pos : 0 < 1 - 1 / (M : ℝ) := by\n rw [sub_pos, div_lt_one hM_pos]; exact one_lt_cast.mpr <| hPM ▸ P.hM\n have h_inv_ge_one : 1 ≤ (1 - 1 / (M : ℝ))⁻¹ := by\n rw [one_le_inv_iff₀]; exact ⟨h_one_sub_pos, by linarith [div_nonneg one_pos.le hM_pos.le]⟩\n have h_log_lt : log (1 - 1 / (M : ℝ))⁻¹ < ε := by\n have := hN M hM; rw [Real.dist_eq, log_inv, sub_zero, abs_neg] at this; rw [log_inv]\n rwa [abs_of_neg (log_neg h_one_sub_pos (by linarith [div_pos one_pos hM_pos]))] at this\n calc P.n * log (1 - 1 / (P.M : ℝ))⁻¹ = P.n * log (1 - 1 / (M : ℝ))⁻¹ := by rw [hPM]\n _ ≤ P.n * ε := by gcongr\n _ = ε * P.n := mul_comm ..","line":1891,"end_line":1925,"proof_status":"formalized"} {"id":"bound-score-5","label":"bound-score-5","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["params-set","primeCounting-le-bound"],"nlp_text":"If \\(n\\) sufficiently large depending on \\(M, L, \\varepsilon \\), then \\(\\sum _{p \\leq L} (M \\log n + M L \\pi (n)) \\log L \\leq \\varepsilon n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_5","latex_link":"tertiary-chapter.html#bound-score-5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.bound_score_5","lean_decl_name":"Erdos392.Params.initial.bound_score_5","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"bound-score-5\"\n (statement := /-- If $n$ sufficiently large depending on $M, L, \\varepsilon$, then\n$\\sum_{p \\leq L} (M \\log n + M L \\pi(n)) \\log L \\leq \\varepsilon n$. -/)\n (proof := /-- Use the prime number theorem (or the Chebyshev bound). -/)\n (discussion := 518)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.bound_score_5 (ε : ℝ) (hε : ε > 0) (M L : ℕ) :\n ∀ᶠ n in Filter.atTop, ∀ P : Params,\n P.M = M → P.L = L → P.n = n → ∑ _p ∈ Finset.filter (·.Prime) (Finset.Iic P.L),\n (P.M * Real.log P.n + P.M * P.L^2 * primeCounting P.n) * Real.log P.L ≤ ε * P.n := by\n have tendsto_log_div_atTop : Filter.Tendsto (fun n : ℕ ↦ Real.log n / (n : ℝ)) .atTop (nhds 0) := by\n suffices h : Filter.Tendsto (fun y : ℝ ↦ y * Real.log (1 / y)) (.map (1 / ·) .atTop) (nhds 0) by\n exact (h.comp (Filter.map_mono tendsto_natCast_atTop_atTop)).congr fun _ ↦ by grind\n norm_num at *\n exact tendsto_nhdsWithin_of_tendsto_nhds (by simpa using Real.continuous_mul_log.neg.tendsto 0)\n have h_pi_div_n_zero : Filter.Tendsto (fun n : ℕ ↦ (Nat.primeCounting n : ℝ) / n)\n .atTop (nhds 0) := tendsto_primeCounting_div_id_zero\n have h_sum_bound : Filter.Tendsto (fun n : ℕ ↦\n ((Nat.primeCounting L : ℝ) * (M * Real.log n + M * L ^ 2 * (Nat.primeCounting n : ℝ)) *\n Real.log L) / n) .atTop (nhds 0) := by\n convert Filter.Tendsto.const_mul ((primeCounting L : ℝ) * M * Real.log L)\n ((tendsto_log_div_atTop.const_mul 1).add (h_pi_div_n_zero.const_mul (L ^ 2 : ℝ))) using 2 <;>\n ring\n filter_upwards [h_sum_bound.eventually (gt_mem_nhds hε), Filter.eventually_gt_atTop 0] with n hn hn' P hM hL hn''\n rw [div_lt_iff₀ (by positivity)] at hn\n simp_all only [gt_iff_lt, mul_comm, mul_left_comm, mul_add, mul_assoc, sum_const]\n convert hn.le using 1\n · norm_num [primeCounting]\n ring_nf\n rw [primeCounting', count_eq_card_filter_range]\n norm_num [add_comm, sum_range_succ]\n ring_nf\n rw [show count Nat.Prime (1 + L) = (Finset.filter Prime (Iic L)).card from ?_]\n · ring_nf\n · rw [count_eq_card_filter_range, add_comm, range_eq_Ico]; rfl","line":2292,"end_line":2327,"proof_status":"formalized"} {"id":"initial-factorization-def","label":"initial-factorization-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["params-set","factorization-def"],"nlp_text":"We perform an initial factorization by taking the natural numbers between \\(n-n/M\\) (inclusive) and \\(n\\) (exclusive) repeated \\(M\\) times, deleting those elements that are not \\(n/L\\)-smooth (i.e., have a prime factor greater than or equal to \\(n/L\\)).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial","latex_link":"tertiary-chapter.html#initial-factorization-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial","lean_decl_name":"Erdos392.Params.initial","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-def\"\n (statement := /-- We perform an initial factorization by taking the natural numbers between\n $n-n/M$ (inclusive) and $n$ (exclusive) repeated $M$ times, deleting those elements that are\n not $n/L$-smooth (i.e., have a prime factor greater than or equal to $n/L$). -/)]\ndef Params.initial (P : Params) : Factorization P.n := {\n a := (replicate P.M (.Ico (P.n - P.n/P.M) P.n)).join.filter\n (fun m ↦ m ∈ (P.n/P.L).smoothNumbers)\n ha := fun m hm ↦ by\n simp only [Multiset.mem_filter, mem_join, mem_replicate] at hm\n obtain ⟨⟨_, ⟨_, rfl⟩, hs⟩, _⟩ := hm\n rw [Multiset.mem_Ico, tsub_le_iff_right] at hs\n grind\n hpos := fun m hm ↦ by\n simp only [Multiset.mem_filter, mem_join, mem_replicate] at hm\n obtain ⟨_, hsmooth⟩ := hm\n exact pos_of_ne_zero (mem_smoothNumbers.mp hsmooth).1\n}\n","line":893,"end_line":910,"proof_status":"formalized"} {"id":"initial-factorization-large-prime-ge","label":"initial-factorization-large-prime-ge","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","balance-def"],"nlp_text":"A large prime \\(p \\geq n/L\\) can be in deficit by at most \\(n/p\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_large_prime_ge","latex_link":"tertiary-chapter.html#initial-factorization-large-prime-ge","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_large_prime_ge","lean_decl_name":"Erdos392.Params.initial.balance_large_prime_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-large-prime-ge\"\n (statement := /-- A large prime $p \\geq n/L$ can be in deficit by at most $n/p$. -/)\n (proof := /-- This is the number of times $p$ can divide $n!$. -/)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.balance_large_prime_ge (P : Params) {p : ℕ}\n (hp : p ≥ P.n / P.L) : P.initial.balance p ≥ -(P.n / p) := by\n have hsum : (P.initial.a.map (·.factorization p)).sum = 0 := sum_eq_zero fun x hx ↦ by\n simp only [Multiset.mem_map, initial, Multiset.mem_filter] at hx\n obtain ⟨m, ⟨_, hsmooth⟩, rfl⟩ := hx\n rw [factorization_eq_zero_iff, mem_smoothNumbers'] at *\n by_cases hprime : p.Prime\n · by_cases hdvd : p ∣ m\n · exact ((hsmooth p hprime hdvd).not_ge hp).elim\n · exact .inr (.inl hdvd)\n · exact .inl hprime\n have hfact : (P.n.factorial.factorization p : ℤ) ≤ P.n / p := by\n rcases eq_or_ne p 0 with rfl | -; · simp\n by_cases hprime : p.Prime\n · have hn_pos : (0 : ℝ) < P.n := by\n have := Nat.lt_of_lt_of_le (Nat.mul_pos P.hL_pos P.hL_pos) P.hL.le; exact_mod_cast this\n have hL_lt_sqrt : (P.L : ℝ) < Real.sqrt P.n := by\n rw [Real.lt_sqrt (Nat.cast_nonneg _)]; exact_mod_cast by nlinarith [P.hL]\n have hp_gt_sqrt : (p : ℝ) > Real.sqrt P.n := calc\n (p : ℝ) ≥ (P.n / P.L : ℕ) := by exact_mod_cast hp\n _ > Real.sqrt P.n := P.hL'\n rw [factorial_factorization_eq_div hprime hp_gt_sqrt,\n Int.le_ediv_iff_mul_le (by exact_mod_cast hprime.pos)]\n exact_mod_cast Nat.div_mul_le_self P.n p\n · simp only [Nat.factorization_eq_zero_of_not_prime _ hprime, Nat.cast_zero]; positivity\n simp only [Factorization.balance, Factorization.sum, hsum, Nat.cast_zero, zero_sub,\n neg_le_neg_iff, hfact]","line":1015,"end_line":1046,"proof_status":"formalized"} {"id":"initial-factorization-medium-prime-ge","label":"initial-factorization-medium-prime-ge","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def","balance-def"],"nlp_text":"A medium prime \\(\\sqrt{n} {\\lt} p ≤ n/L\\) can be in deficit by at most \\(M\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_medium_prime_ge","latex_link":"tertiary-chapter.html#initial-factorization-medium-prime-ge","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.balance_medium_prime_ge","lean_decl_name":"Erdos392.Params.initial.balance_medium_prime_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"initial-factorization-medium-prime-ge\"\n (statement := /-- A medium prime $\\sqrt{n} < p ≤ n/L$ can be in deficit by at most $M$.-/)\n (proof := /-- The number of times $p$ divides $a_1 \\dots a_t$ is at least $M \\lfloor n/Mp\n \\rfloor ≥ n/p - M$ (note that the removal of the non-smooth numbers does not remove any multiples\n of $p$). Meanwhile, the number of times $p$ divides $n!$ is at most $n/p$.-/)\n (latexEnv := \"sublemma\")]\ntheorem Params.initial.balance_medium_prime_ge (P : Params) {p : ℕ} (hp : p < P.n / P.L)\n (hp' : p > Real.sqrt P.n) : P.initial.balance p ≥ -P.M := by\n by_cases hp_prime : p.Prime\n · have : (P.initial.a.map (·.factorization p)).sum ≥ P.n / p - P.M :=\n (initial.sum_valuation_eq P hp_prime hp' hp).symm ▸ sub_le_of_le_add\n (initial.count_multiples_lower_bound P.n P.M p (by linarith [P.hM]) hp_prime.pos)\n simp only [Factorization.balance, Factorization.sum, factorial_factorization_eq_div hp_prime hp']\n omega\n · simp_all [Factorization.balance, Factorization.sum]","line":1225,"end_line":1240,"proof_status":"formalized"} {"id":"initial-factorization-card","label":"initial-factorization-card","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-def"],"nlp_text":"The number of elements in this initial factorization is at most \\(n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.card","latex_link":"tertiary-chapter.html#initial-factorization-card","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.card","lean_decl_name":"Erdos392.Params.initial.card","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":true,"source_repo":"mathlib","source_path":"./Mathlib/Order/Atoms/Finite.lean","lean4_code":"theorem card : Fintype.card α = 2 :=\n (Fintype.ofEquiv_card _).trans Fintype.card_bool\n\nend IsSimpleOrder\n\nend Fintype\n\nnamespace Bool\n\n","line":54,"end_line":62,"proof_status":"formalized"} {"id":"initial-factorization-waste","label":"initial-factorization-waste","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["initial-factorization-card","waste-def"],"nlp_text":"The total waste in this initial factorization is at most \\(n \\log \\frac{1}{1-1/M}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.waste","latex_link":"tertiary-chapter.html#initial-factorization-waste","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Params.initial.waste","lean_decl_name":"Erdos392.Params.initial.waste","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"waste-def\"\n (statement := /--\n The waste of a factorizations $a_1 \\dots a_t$ is defined as $\\sum_i \\log (n / a_i)$.\n -/)]\nnoncomputable def Factorization.waste {n : ℕ} (f : Factorization n) : ℝ :=\n f.sum (fun m ↦ log (n / m : ℝ))\n","line":35,"end_line":41,"proof_status":"formalized"} {"id":"ResidueMult","label":"ResidueMult","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(f\\) has a simple pole at \\(p\\) with residue \\(A\\), and \\(g\\) is holomorphic near \\(p\\), then the residue of \\(f \\cdot g\\) at \\(p\\) is \\(A \\cdot g(p)\\). That is, we assume that \\[ f(s) = \\frac{A}{s - p} + O(1) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueMult","latex_link":"sect0003.html#ResidueMult","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueMult","lean_decl_name":"ResidueMult","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ResidueMult\")\n (statement := /--\n If $f$ has a simple pole at $p$ with residue $A$, and $g$ is holomorphic near $p$, then the\n residue of $f \\cdot g$ at $p$ is $A \\cdot g(p)$. That is, we assume that\n $$\n f(s) = \\frac{A}{s - p} + O(1)$$\n near $p$, and that $g$ is holomorphic near $p$. Then\n $$\n f(s) \\cdot g(s) = \\frac{A \\cdot g(p)}{s - p} + O(1).$$\n -/)\n (proof := /--\n Elementary calculation.\n $$\n f(s) * g(s) - \\frac{A * g(p)}{s - p} =\n \\left(f(s) * g(s) - \\frac{A * g(s)}{s - p}\\right)\n + \\left(\\frac{A * g(s) - A * g(p)}{s - p}\\right).\n $$\n The first term is $g(s)(f(s) - \\frac{A}{s - p})$, which is bounded near $p$ by the assumption\n on $f$\n and the fact that $g$ is holomorphic near $p$.\n The second term is $A$ times the log derivative of $g$ at $p$, which is bounded by the assumption\n that $g$ is holomorphic.\n -/)]\ntheorem ResidueMult {f g : ℂ → ℂ} {p : ℂ} {U : Set ℂ}\n (g_holc : HolomorphicOn g U) (U_in_nhds : U ∈ 𝓝 p) {A : ℂ}\n (f_near_p : (f - (fun s ↦ A * (s - p)⁻¹)) =O[𝓝[≠] p] (1 : ℂ → ℂ)) :\n (f * g - (fun s ↦ A * g p * (s - p)⁻¹)) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by\n -- Add and subtract a term\n have : (f * g - fun s ↦ A * g p * (s - p)⁻¹)\n = (f - A • fun s ↦ (s - p)⁻¹) * g + fun s ↦ (A * (g s - g p) / (s - p)) := by\n ext; simp; ring\n -- Apply to goal\n rw[this]\n have p_in_U : p ∈ U := mem_of_mem_nhds U_in_nhds\n refine Asymptotics.IsBigO.add ?_ ?_\n · rw[← mul_one (1 : ℂ → ℂ)]\n refine Asymptotics.IsBigO.mul f_near_p ?_\n -- Show g is bounded near p\n have g_cont : ContinuousAt g p := by\n -- g is holomorphic on U, p ∈ U, so g is continuous at p\n exact (g_holc.continuousOn.continuousWithinAt p_in_U).continuousAt U_in_nhds\n -- Use continuity to get boundedness\n have := g_cont.norm.isBoundedUnder_le.isBigO_one ℂ\n exact IsBigO.mono this inf_le_left\n · -- Show that (fun s ↦ A * (g s - g p) / (s - p)) =O[𝓝[≠] p] 1\n\n suffices (fun s ↦ A * ((s - p)⁻¹ * (g s - g p))) =O[𝓝[≠] p] 1 by\n convert this using 2\n rw[div_eq_mul_inv]\n ring\n apply Asymptotics.IsBigO.const_mul_left\n\n -- g is differentiable at p since it's holomorphic on U\n have g_diff : HasDerivAt g (deriv g p) p :=\n (DifferentiableOn.differentiableAt g_holc U_in_nhds).hasDerivAt\n\n rw [hasDerivAt_iff_isLittleO] at g_diff\n apply Asymptotics.IsLittleO.isBigO at g_diff\n have : (fun x' ↦ deriv g p * (x' - p)) =O[𝓝 p] fun x' ↦ x' - p := by\n apply Asymptotics.IsBigO.const_mul_left\n exact Asymptotics.isBigO_refl (fun x ↦ x - p) (𝓝 p)\n have h1 := g_diff.add this\n have h2 : (fun x ↦ g x - g p) =O[𝓝 p] fun x' ↦ x' - p := by\n convert h1 using 2\n simp\n ring\n refine (Asymptotics.isBigO_mul_iff_isBigO_div ?_).mpr ?_\n · filter_upwards [self_mem_nhdsWithin] with x hx\n simp only [mem_compl_iff, mem_singleton_iff] at hx\n push_neg at hx\n exact inv_ne_zero (sub_ne_zero.mpr hx)\n · simp only [div_inv_eq_mul]\n refine Asymptotics.IsBigO.mono ?_ inf_le_left\n simpa\n","line":541,"end_line":615,"proof_status":"formalized"} {"id":"bklnw-eq-2-4","label":"bklnw-eq-2-4","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\[ f(x) := \\sum _{k=3}^{\\lfloor \\log x / \\log 2 \\rfloor } x^{1/k - 1/3}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.f","latex_link":"secondary-chapter.html#bklnw-eq-2-4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.f","lean_decl_name":"BKLNW.f","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" closure (Function.support ψ) ⊆ Set.Ioi 0 ∧\n ψ ≤ indicator (Ico a b) 1 ∧ b - a - ε ≤ ∫ y in Ioi 0, ψ y := by\n\n have l1 : Iio ((b - a) / 3) ∈ 𝓝[>] 0 := nhdsWithin_le_nhds <| Iio_mem_nhds <| by\n rw [← sub_pos] at hab\n positivity\n filter_upwards [self_mem_nhdsWithin, l1] with ε (hε : 0 < ε) (hε' : ε < (b - a) / 3)\n have l2 : a < a + ε / 2 := by simp [hε]\n have l3 : b - ε / 2 < b := by simp [hε]\n obtain ⟨ψ, h1, h2, h3, h4, h5⟩ := smooth_urysohn_support_Ioo l2 l3\n refine ⟨ψ, h1, h2, ?_, ?_, ?_⟩\n · simp [h5, hab.ne, Icc_subset_Ioi_iff hab.le, ha]\n · exact h4.trans <| indicator_le_indicator_of_subset Ioo_subset_Ico_self (by simp)\n · have l4 : 0 ≤ b - a - ε := by linarith\n have l5 : Icc (a + ε / 2) (b - ε / 2) ⊆ Ioi 0 := by\n intro t ht\n simp only [mem_Icc, mem_Ioi] at ht ⊢\n exact ha.trans <| l2.trans_le <| ht.1\n have l6 : Icc (a + ε / 2) (b - ε / 2) ∩ Ioi 0 = Icc (a + ε / 2) (b - ε / 2) :=\n inter_eq_left.mpr l5\n have l7 : ∫ y in Ioi 0, indicator (Icc (a + ε / 2) (b - ε / 2)) 1 y = b - a - ε := by\n simp only [measurableSet_Icc, integral_indicator_one, measureReal_restrict_apply, l6,\n volume_real_Icc]\n convert max_eq_left l4 using 1 ; ring_nf\n have l8 : IntegrableOn ψ (Ioi 0) volume :=\n (h1.continuous.integrable_of_hasCompactSupport h2).integrableOn\n rw [← l7] ; apply setIntegral_mono ?_ l8 h3\n rw [IntegrableOn, integrable_indicator_iff measurableSet_Icc]\n apply IntegrableOn.mono ?_ subset_rfl Measure.restrict_le_self\n apply integrableOn_const <;>\n simp\n\nlemma interval_approx_sup (ha : 0 < a) (hab : a < b) :\n","line":2046,"end_line":2078,"proof_status":"formalized"} {"id":"bklnw-def-a-2","label":"bklnw-def-a-2","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq-2-4"],"nlp_text":"\\(a_2\\) is defined by \\[ a_2 = (1 + \\alpha ) \\max \\left( f(e^b), f(2^{\\lfloor \\frac{b}{\\log 2} \\rfloor + 1}) \\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.Inputs.a₂","latex_link":"secondary-chapter.html#bklnw-def-a-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.Inputs.a₂","lean_decl_name":"BKLNW.Inputs.a₂","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" , (200, 1 + 7.712e-8, 9)\n , (250, 1 + 2.024e-8, 9)\n , (300, 1 + 1.936e-8, 9)\n ]\n\n@[blueprint\n \"bklnw-cor-5-1-rem\"\n (title := \"Remark after Corollary 5.1\")\n (statement := /-- We have the following values for $a_2$, given by the table after \\cite[Corollary 5.1]{BKLNW} -/)\n (latexEnv := \"remark\")]\n","line":413,"end_line":422,"proof_status":"formalized"} {"id":"bklnw-cor-3-1","label":"bklnw-cor-3-1","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq-2-4"],"nlp_text":"Let \\(b \\geq 7\\). Assume \\(x \\geq e^b\\). Then we have \\[ \\psi (x) - \\theta (x) - \\theta (x^{1/2}) \\leq \\eta x^{1/3}, \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.cor_3_1","latex_link":"secondary-chapter.html#bklnw-cor-3-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.cor_3_1","lean_decl_name":"BKLNW.cor_3_1","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"\\[\n\\theta(x^{1/2}) \\leq \\psi(x^{1/2}) \\leq (1 + \\varepsilon(\\log x_1))x^{1/2},\n\\]\nsince $\\log x_1 \\geq 7$. The last two inequalities for $\\theta(x^{1/2})$ combine to establish (2.8).\n -/)\n (latexEnv := \"proposition\")\n (discussion := 641)]\ntheorem prop_4_a (I : Inputs) {b x : ℝ} (hb : b ≤ 2 * log I.x₁) (hx : x ≥ exp b) :\n θ (x^(1/2:ℝ)) < (1 + I.ε (log I.x₁)) * x^(1/2:ℝ) := by sorry\n\n@[blueprint\n \"bklnw-prop-4-b\"\n (title := \"Proposition 4, part b\")\n (statement := /-- If $b > 2\\log x_1$, then we have\n\\[\n\\theta(x^{1/2}) < (1 + \\varepsilon(b/2))x^{1/2} \\quad \\text{for } x \\geq e^b.\n\\]\n -/)\n (proof := /-- As in the above subcase, we have for $x \\geq e^b$\n","line":316,"end_line":334,"proof_status":"statement_formalized"} {"id":"bklnw-prop-3-sub-2","label":"bklnw-prop-3-sub-2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq-2-4"],"nlp_text":"\\(f\\) decreases on \\([2^n, 2^{n+1})\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_2","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_2","lean_decl_name":"BKLNW.prop_3_sub_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" else if b < 18000 then 6.20397e-40\n else if b < 19000 then 2.82833e-41\n else if b < 20000 then 1.36785e-42\n else if b < 21000 then 7.16209e-44\n else if b < 22000 then 4.11842e-45\n else if b < 23000 then 2.43916e-46\n else if b < 24000 then 1.56474e-47\n else if b < 25000 then 1.07022e-48\n else 7.57240e-50\n\n@[blueprint\n \"bknlw-theorem-2\"\n (title := \"Theorem 2\")\n (statement := /-- If $b>0$ then $|\\psi(x) - x| \\leq \\varepsilon(b) x$ for all $x \\geq \\exp(b)$. -/)\n (latexEnv := \"theorem\")]\ntheorem theorem_2 : ∀ b ≥ 0, ∀ x ≥ exp b,\n |ψ x - x| ≤ table_8_ε b * x := by sorry\n\n@[blueprint\n \"buthe-eq-1-7\"\n (title := \"Buthe equation (1.7)\")\n (statement := /-- $\\theta(x) < x$ for all $1 \\leq x \\leq 10^{19}$. -/)\n (latexEnv := \"sublemma\")]\ntheorem buthe_eq_1_7 : ∀ x ∈ Set.Icc 1 1e19, θ x < x := by sorry\n\n@[blueprint\n","line":84,"end_line":109,"proof_status":"formalized"} {"id":"bklnw-prop-3","label":"bklnw-prop-3","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-eq-2-4"],"nlp_text":"Let \\(x_0 \\geq 2^9\\). Let \\(\\alpha {\\gt} 0\\) exist such that \\(\\theta (x) \\leq (1 + \\alpha )x\\) for \\(x {\\gt} 0\\). Then for \\(x \\geq x_0\\), \\begin{equation} \\sum _{k=3}^{\\lfloor \\frac{\\log x}{\\log 2} \\rfloor } \\theta (x^{1/k}) \\leq \\eta x^{1/3}, \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3","latex_link":"secondary-chapter.html#bklnw-prop-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3","lean_decl_name":"BKLNW.prop_3","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"\\eta = (1 + \\alpha) \\max\\left( f(e^b), f(2^{\\lfloor \\frac{b}{\\log 2} \\rfloor + 1}) \\right)\n\\end{equation}\n -/)\n (proof := /-- We apply Proposition \\ref{bklnw-prop-3} with $x_0 = e^b$ where we observe that $x_0 = e^b \\geq e^7 > 2^9$.\n -/)\n (latexEnv := \"corollary\")\n (discussion := 640)]\ntheorem cor_3_1 (I : Inputs) {b x : ℝ} (hb : b ≥ 7) (x : ℝ) (hx : x ≥ exp b) :\n ψ x - θ x - θ (x^(1/2:ℝ)) ≤\n (1 + I.α) * max (f (exp b)) (f (2^(⌊ b/(log 2) ⌋ + 1))) * x^(1/3:ℝ) := by sorry\n\n@[blueprint\n \"bklnw-prop-4-a\"\n (title := \"Proposition 4, part a\")\n (statement := /-- If $b \\leq 2\\log x_1$, then we have\n\\begin{equation}\n\\theta(x^{1/2}) < (1 + \\varepsilon(\\log x_1))x^{1/2} \\quad \\text{for } x \\geq e^b.\n\\end{equation}\n -/)\n (proof := /-- If $e^b \\leq x \\leq x_1^2$, then $x^{1/2} \\leq x_1$, and thus\n\\[\n\\theta(x^{1/2}) < x^{1/2} \\quad \\text{for } e^b \\leq x \\leq x_1^2.\n\\]\n","line":292,"end_line":314,"proof_status":"statement_formalized"} {"id":"bklnw-thm-5","label":"bklnw-thm-5","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-def-a-2","bklnw-def-a-1"],"nlp_text":"Let \\(\\alpha {\\gt} 0\\) exist such that \\[ \\theta (x) \\leq (1 + \\alpha )x \\quad \\text{for all } x {\\gt} 0. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.thm_5","latex_link":"secondary-chapter.html#bklnw-thm-5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.thm_5","lean_decl_name":"BKLNW.thm_5","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" a₂ b ∈ Set.Icc a₂b (a₂b + 10^(-m:ℝ)) := by sorry\n\nnoncomputable def Table_14 : List (ℝ × ℝ × ℝ) := [\n (20, 4.2676e-5, 9.1639e-5),\n (25, 3.5031e-6, 7.4366e-6),\n (30, 2.8755e-7, 6.0751e-7),\n (35, 2.3603e-8, 4.9766e-8),\n (40, 1.9338e-8, 2.1482e-8),\n (19 * log 10, 1.9338e-8, 1.9667e-8),\n (45, 1.0907e-8, 1.1084e-8),\n (50, 1.1199e-9, 1.1344e-9),\n (60, 1.2215e-11, 1.2312e-11),\n (70, 2.7923e-12, 2.7930e-12),\n (80, 2.6108e-12, 2.6108e-12),\n (90, 2.5213e-12, 2.5213e-12),\n (100, 2.4530e-12, 2.4530e-12),\n (200, 2.1815e-12, 2.1816e-12),\n (300, 2.0902e-12, 2.0903e-12),\n (400, 2.0398e-12, 2.0399e-12),\n (500, 1.9999e-12, 1.9999e-12),\n (700, 1.9764e-12, 1.9765e-12),\n (1000, 1.9475e-12, 1.9476e-12),\n (2000, 1.9228e-12, 1.9228e-12),\n (3000, 4.5997e-14, 4.5998e-14),\n (4000, 1.4263e-16, 1.4264e-16),\n (5000, 5.6303e-19, 5.6303e-19),\n (7000, 2.0765e-23, 2.0766e-23),\n (10000, 3.7849e-29, 3.7850e-29),\n (11000, 7.1426e-31, 7.1427e-31),\n (12000, 1.5975e-32, 1.5976e-32),\n (13000, 4.1355e-34, 4.1356e-34),\n (13800.7464, 2.5423e-35, 2.5424e-35),\n (15000, 4.1070e-37, 4.1070e-37),\n (17000, 6.2040e-40, 6.2040e-40),\n (20000, 7.1621e-44, 7.1621e-44),\n (22000, 2.4392e-46, 2.4392e-46),\n (25000, 7.5724e-50, 7.5724e-50)\n","line":424,"end_line":460,"proof_status":"statement_formalized"} {"id":"bklnw-prop-3-sub-7","label":"bklnw-prop-3-sub-7","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-prop-3-sub-2"],"nlp_text":"\\(f(x) \\leq f(x_0)\\) for \\(x \\in [x_0, 2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1})\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_7","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_7","lean_decl_name":"BKLNW.prop_3_sub_7","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" _ = 2^n := rpow_natCast 2 n\n have hx₀_lt : x₀ < 2^(n+1) := by\n have h1 : (log x₀) / (log 2) < n + 1 := by\n calc (log x₀) / (log 2) < m + 1 := Int.lt_floor_add_one _\n _ = (n : ℝ) + 1 := by rw [← hn_eq]; simp\n calc x₀ = 2^((log x₀) / (log 2)) := key.symm\n _ < 2^((n:ℝ) + 1) := rpow_lt_rpow_of_exponent_lt one_lt_two h1\n _ = 2^(n+1) := by rw [← rpow_natCast 2 (n+1)]; norm_cast\n exact (prop_3_sub_2 n).le_iff_ge ⟨hx₀_ge.trans hx_lo, hx_hi⟩ ⟨hx₀_ge, hx₀_lt⟩ |>.mpr hx_lo\n\n@[blueprint\n \"bklnw-prop-3-sub-8\"\n (title := \"Proposition 3, substep 8\")\n (statement := /-- $f(x) \\leq \\max\\left(f(x_0), f(2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1})\\right)$. -/)\n (proof := /-- Combines previous sublemmas. -/)\n (latexEnv := \"sublemma\")\n (discussion := 638)]\ntheorem prop_3_sub_8 (x₀ : ℝ) (hx₀ : x₀ ≥ 2 ^ 9) (x : ℝ)\n (hx : x ≥ x₀) :\n f x ≤ max (f x₀) (f (2 ^ (⌊ (log x₀)/(log 2) ⌋ + 1))) := by\n by_cases hcase : x < 2 ^ (⌊(log x₀) / (log 2)⌋ + 1)\n · exact (prop_3_sub_7 x₀ hx₀ x ⟨hx, hcase⟩).trans (le_max_left _ _)\n · exact (prop_3_sub_6 x₀ hx₀ x (not_lt.mp hcase)).trans (le_max_right _ _)\n\n@[blueprint\n \"bklnw-prop-3\"\n (title := \"Proposition 3\")\n (statement := /-- Let $x_0 \\geq 2^9$. Let $\\alpha > 0$ exist such that $\\theta(x) \\leq (1 + \\alpha)x$ for $x > 0$. Then for $x \\geq x_0$,\n\\begin{equation}\n\\sum_{k=3}^{\\lfloor \\frac{\\log x}{\\log 2} \\rfloor} \\theta(x^{1/k}) \\leq \\eta x^{1/3},\n\\end{equation}\nwhere\n\\begin{equation}\n\\eta = \\eta(x_0) = (1 + \\alpha) \\max\\left(f(x_0), f(2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1})\\right)\n\\end{equation}\nwith\n\\begin{equation}\nf(x) := \\sum_{k=3}^{\\lfloor \\frac{\\log x}{\\log 2} \\rfloor} x^{\\frac{1}{k} - \\frac{1}{3}}.\n\\end{equation}\n -/)\n (proof := /-- Combines previous sublemmas. -/)\n (latexEnv := \"proposition\")\n","line":235,"end_line":276,"proof_status":"formalized"} {"id":"bklnw-prop-4-b","label":"bklnw-prop-4-b","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(b {\\gt} 2\\log x_1\\), then we have \\[ \\theta (x^{1/2}) \\leq (1 + \\varepsilon (b/2))x^{1/2} \\quad \\text{for } x \\geq e^b. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_4_b","latex_link":"secondary-chapter.html#bklnw-prop-4-b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_4_b","lean_decl_name":"BKLNW.prop_4_b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"and\n\\[\na_2 = (1 + \\alpha) \\max\\left( f(e^b), f(2^{\\lfloor \\frac{b}{\\log 2} \\rfloor + 1}) \\right).\n\\]\n -/)\n (proof := /-- We have $\\psi(x) - \\theta(x) = \\theta(x^{1/2}) + \\sum_{k=3}^{\\lfloor \\frac{\\log x}{\\log 2} \\rfloor} \\theta(x^{1/k})$. For any $b \\geq 7$, setting $x_0 = e^b$ in Proposition 4, we bound $\\sum_{k=3}^{\\lfloor \\frac{\\log x}{\\log 2} \\rfloor} \\theta(x^{1/k})$ by $\\eta x^{1/3}$ as defined in (2.3). We bound $\\theta(x^{1/2})$ with Proposition \\ref{bklnw-prop-4} by taking either $a_1 = 1 + \\varepsilon(\\log x_1)$ for $b \\leq 2\\log x_1$ or $a_1 = 1 + \\varepsilon(b/2)$ for $b > 2\\log x_1$.\n -/)\n (latexEnv := \"theorem\")\n (discussion := 643)]\ntheorem thm_5 (I : Inputs) {b x : ℝ} (hb : b ≥ 7) (hx : x ≥ exp b) :\n ψ x - θ x < Inputs.a₁ I b * x^(1/2:ℝ) + Inputs.a₂ I b * x^(1/3:ℝ) := by sorry\n\nnoncomputable def a₁ : ℝ → ℝ := Inputs.default.a₁\n\nnoncomputable def a₂ : ℝ → ℝ := Inputs.default.a₂\n\n@[blueprint\n \"bklnw-cor-5-1\"\n (title := \"Corollary 5.1\")\n (statement := /-- Let $b \\geq 7$. Then for all $x \\geq e^b$ we have $\\psi(x) - \\vartheta(x) < a_1 x^{1/2} + a_2 x^{1/3}$, where $a_1 = a_1(b) = 1 + 1.93378 \\times 10^{-8}$ if $b \\leq 38 \\log 10$, $1 + \\varepsilon(b/2)$ if $b > 38 \\log 10$, and $a_2 = a_2(b) = (1 + 1.93378 \\times 10^{-8}) \\max\\left( f(e^b), f(2^{\\lfloor \\frac{b}{\\log 2} \\rfloor + 1}) \\right)$, where $f$ is defined by (2.4) and values for $\\varepsilon(b/2)$ are from Table 8. -/)\n (proof := /-- This is Theorem 5 applied to the default inputs in Definition \\ref{bklnw-inputs}. -/)]\ntheorem cor_5_1 {b x : ℝ} (hb : b ≥ 7) (hx : x ≥ exp b) :\n ψ x - θ x < a₁ b * x^(1/2:ℝ) + a₂ b * x^(1/3:ℝ) := by sorry\n\n/- We have the following values for a2. b 20 25 30 35 40 43 a2 1.4263 1.2196 1.1211 1.07086 1.04320 1.03253 1.01718 b 100 150 200 250 a2 1+2.421·10−4 1+3.749·10−6 1+7.712·10−8 1+2.024·10−8 1+1.936·10−8 -/\n\n","line":378,"end_line":403,"proof_status":"formalized"} {"id":"Dedekind-pole","label":"Dedekind-pole","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\zeta _L\\) has a simple pole at \\(s=1\\).","doc_url":null,"latex_link":"sect0002.html#Dedekind-pole","lean_link":null,"lean_decl_name":"Dedekind-pole","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"ShiftZeroBound","label":"ShiftZeroBound","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["riemannZetaLogDerivResidue"],"nlp_text":"For all \\(\\delta \\in (0,1)\\) we have \\[ -\\Re \\left(\\frac{\\zeta '}{\\zeta }(1+\\delta )\\right)\\leq \\frac{1}{\\delta }+O(1). \\]","doc_url":null,"latex_link":"sect0004.html#ShiftZeroBound","lean_link":null,"lean_decl_name":"ShiftZeroBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"MellinConvolutionTransform","label":"MellinConvolutionTransform","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["MellinConvolution"],"nlp_text":"Let \\(f\\) and \\(g\\) be functions from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {C}\\) such that \"> \\begin{equation} (x,y)\\mapsto f(y)\\frac{g(x/y)}yx^{s-1} \\label{eq:assm_integrable_Mconv} \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinConvolutionTransform","latex_link":"sect0003.html#MellinConvolutionTransform","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinConvolutionTransform","lean_decl_name":"MellinConvolutionTransform","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinConvolutionTransform\")\n (statement := /--\n Let $f$ and $g$ be functions from $\\mathbb{R}_{>0}$ to $\\mathbb{C}$ such that\n \\begin{equation}\n (x,y)\\mapsto f(y)\\frac{g(x/y)}yx^{s-1}\n \\label{eq:assm_integrable_Mconv}\n \\end{equation}\n is absolutely integrable on $[0,\\infty)^2$.\n Then\n $$\\mathcal{M}(f\\ast g)(s) = \\mathcal{M}(f)(s)\\mathcal{M}(g)(s).$$\n -/)\n (proof := /--\n By Definitions \\ref{MellinTransform} and \\ref{MellinConvolution}\n $$\n \\mathcal M(f\\ast g)(s)=\n \\int_0^\\infty \\int_0^\\infty f(y)g(x/y)x^{s-1}\\frac{dy}ydx\n $$\n By (\\ref{eq:assm_integrable_Mconv}) and Fubini's theorem,\n $$\n \\mathcal M(f\\ast g)(s)=\n \\int_0^\\infty \\int_0^\\infty f(y)g(x/y)x^{s-1}dx\\frac{dy}y\n $$\n in which we change variables from $x$ to $z=x/y$:\n $$\n \\mathcal M(f\\ast g)(s)=\n \\int_0^\\infty \\int_0^\\infty f(y)g(z)y^{s-1}z^{s-1}dzdy\n $$\n which, by Definition \\ref{MellinTransform}, is\n $$\n \\mathcal M(f\\ast g)(s)=\n \\mathcal M(f)(s)\\mathcal M(g)(s)\n .\n $$\n -/)]\nlemma MellinConvolutionTransform (f g : ℝ → ℂ) (s : ℂ)\n (hf : IntegrableOn (fun x y ↦ f y * g (x / y) / (y : ℂ) * (x : ℂ) ^ (s - 1)).uncurry\n (Ioi 0 ×ˢ Ioi 0)) :\n 𝓜 (MellinConvolution f g) s = 𝓜 f s * 𝓜 g s := by\n dsimp [mellin, MellinConvolution]\n set f₁ : ℝ × ℝ → ℂ :=\n fun ⟨x, y⟩ ↦ f y * g (x / y) / (y : ℂ) * (x : ℂ) ^ (s - 1)\n calc\n _ = ∫ (x : ℝ) in Ioi 0, ∫ (y : ℝ) in Ioi 0, f₁ (x, y) := ?_\n _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0, f₁ (x, y) :=\n setIntegral_integral_swap _ hf\n _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0,\n f y * g (x / y) / ↑y * ↑x ^ (s - 1) := rfl\n _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0,\n f y * g (x * y / y) / ↑y * ↑(x * y) ^ (s - 1) * y := ?_\n _ = ∫ (y : ℝ) in Ioi 0, ∫ (x : ℝ) in Ioi 0,\n f y * ↑y ^ (s - 1) * (g x * ↑x ^ (s - 1)) := ?_\n _ = ∫ (y : ℝ) in Ioi 0,\n f y * ↑y ^ (s - 1) * ∫ (x : ℝ) in Ioi 0, g x * ↑x ^ (s - 1) := ?_\n _ = _ := integral_mul_const _ _\n <;> try (rw [setIntegral_congr_fun (by simp)]; intro y hy; simp only [ofReal_mul])\n · simp only [integral_mul_const, f₁, mul_comm]\n · simp only [integral_mul_const]\n have := integral_comp_mul_right_Ioi\n (fun x ↦ f y * g (x / y) / (y : ℂ) * (x : ℂ) ^ (s - 1)) 0 hy\n have y_ne_zeroℂ : (y : ℂ) ≠ 0 := slitPlane_ne_zero (Or.inl hy)\n field_simp at this ⊢\n simp only [ofReal_mul, one_div, mul_zero, real_smul, ofReal_inv, field] at this ⊢\n rw [← this]\n field_simp\n congr with x\n ring_nf\n · rw [setIntegral_congr_fun (by simp)]\n intro x hx\n have y_ne_zeroℝ : y ≠ 0 := ne_of_gt (mem_Ioi.mp hy)\n have y_ne_zeroℂ : (y : ℂ) ≠ 0 := by exact_mod_cast y_ne_zeroℝ\n field_simp\n rw [mul_cpow_ofReal_nonneg hy.le hx.le]\n ring\n · apply integral_const_mul\n · congr <;> ext <;> ring\n","line":356,"end_line":431,"proof_status":"formalized"} {"id":"nonZeroOfBddAbove","label":"nonZeroOfBddAbove","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If a function \\(f\\) has a simple pole at a point \\(p\\) with residue \\(A \\neq 0\\), then \\(f\\) is nonzero in a punctured neighborhood of \\(p\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/nonZeroOfBddAbove","latex_link":"sect0003.html#nonZeroOfBddAbove","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/nonZeroOfBddAbove","lean_decl_name":"nonZeroOfBddAbove","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"nonZeroOfBddAbove\")\n (statement := /--\n If a function $f$ has a simple pole at a point $p$ with residue $A \\neq 0$, then\n $f$ is nonzero in a punctured neighborhood of $p$.\n -/)\n (proof := /--\n We know that $f(s) = \\frac{A}{s-p} + O(1)$ near $p$, so we can write\n $$f(s) = \\left(f(s) - \\frac{A}{s-p}\\right) + \\frac{A}{s-p}.$$\n The first term is bounded, say by $M$, and the second term goes to $\\infty$ as $s \\to p$.\n Therefore, there exists a neighborhood $V$ of $p$ such that for all $s \\in V \\setminus \\{p\\}$,\n we have $f(s) \\neq 0$.\n -/)]\ntheorem nonZeroOfBddAbove {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ}\n (U_in_nhds : U ∈ 𝓝 p) {A : ℂ} (A_ne_zero : A ≠ 0)\n (f_near_p : BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (U \\ {p}))) :\n ∃ V ∈ 𝓝 p, IsOpen V ∧ ∀ s ∈ V \\ {p}, f s ≠ 0 := by\n\n -- Step 1: Rewrite f as the sum of two parts\n have h_decomp : ∀ s, f s = (f s - A * (s - p)⁻¹) + A * (s - p)⁻¹ := by\n intro s\n ring\n -- Get a bound for the first summand\n obtain ⟨M, hM⟩ := f_near_p\n -- Step 2: The second summand A * (s - p)⁻¹ goes to ∞ as s → p\n -- We need to find a neighborhood where |A * (s - p)⁻¹| > M + 1\n have A_norm_pos : 0 < ‖A‖ := norm_pos_iff.mpr A_ne_zero\n -- Choose δ such that for |s - p| < δ, we have |A * (s - p)⁻¹| > M + 1\n let δ := ‖A‖ / (‖M‖ + 1)\n have δ_pos : 0 < δ := by\n refine div_pos A_norm_pos (add_pos_of_nonneg_of_pos (norm_nonneg M) one_pos)\n -- Find an open neighborhood V contained in both U and the δ-ball around p\n obtain ⟨V, hV_open, hV_mem, hV_sub⟩ : ∃ V, IsOpen V ∧ p ∈ V ∧ V ⊆ U ∩ Metric.ball p δ := by\n -- rw [mem_nhds_iff] at U_in_nhds\n obtain ⟨W, hW_sub, hW_open, hW_mem⟩ := mem_nhds_iff.mp U_in_nhds\n let V := W ∩ Metric.ball p δ\n have VNp : V ∈ 𝓝 p := (𝓝 p).inter_mem (IsOpen.mem_nhds hW_open hW_mem)\n (Metric.ball_mem_nhds p δ_pos)\n exact ⟨V, IsOpen.inter hW_open Metric.isOpen_ball, mem_of_mem_nhds VNp,\n inter_subset_inter_left _ hW_sub⟩\n use V, mem_nhds_iff.mpr ⟨V, subset_refl V, hV_open, hV_mem⟩, hV_open\n -- Show f ≠ 0 on V\n intro s hs\n have hs_in_U : s ∈ U := hV_sub hs.1 |>.1\n have hs_near_p : dist s p < δ := hV_sub hs.1 |>.2\n have hs_ne_p : s ≠ p := hs.2\n -- Step 3: Therefore the sum of the two terms has large norm\n rw [h_decomp s]\n -- The first summand is bounded\n have bound_first : ‖f s - A * (s - p)⁻¹‖ ≤ M := by\n apply hM\n exact ⟨s, ⟨hs_in_U, hs_ne_p⟩, rfl⟩\n -- The second summand has large norm\n have large_second : ‖M‖ + 1 < ‖A * (s - p)⁻¹‖ := by\n rw [norm_mul, norm_inv, ← div_eq_mul_inv]\n rw [lt_div_iff₀ (norm_pos_iff.mpr (sub_ne_zero.mpr hs_ne_p))]\n rw [mul_comm, ← lt_div_iff₀ (add_pos_of_nonneg_of_pos (norm_nonneg M) one_pos)]\n exact hs_near_p\n -- Step 4: Therefore the sum is nonzero near p\n by_contra h_zero\n -- If f s = 0, then the two summands are negatives of each other\n rw [add_eq_zero_iff_eq_neg] at h_zero\n rw [h_zero, norm_neg] at bound_first\n -- But this contradicts our bounds\n have : ‖M‖ + 1 < ‖M‖ := (lt_of_lt_of_le (lt_of_lt_of_le large_second bound_first)\n (Real.le_norm_self M))\n norm_num at this\n","line":277,"end_line":343,"proof_status":"formalized"} {"id":"riemannZetaLogDerivResidue","label":"riemannZetaLogDerivResidue","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["nonZeroOfBddAbove","logDerivResidue","riemannZetaResidue"],"nlp_text":"The log derivative of the Riemann zeta function \\(\\zeta (s)\\) has a simple pole at \\(s=1\\) with residue \\(-1\\): \\(-\\frac{\\zeta '(s)}{\\zeta (s)} - \\frac{1}{s-1} = O(1)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZetaLogDerivResidue","latex_link":"sect0003.html#riemannZetaLogDerivResidue","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZetaLogDerivResidue","lean_decl_name":"riemannZetaLogDerivResidue","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"riemannZetaLogDerivResidue\")\n (statement := /--\n The log derivative of the Riemann zeta function $\\zeta(s)$ has a simple pole at $s=1$ with\n residue $-1$: $-\\frac{\\zeta'(s)}{\\zeta(s)} - \\frac{1}{s-1} = O(1)$.\n -/)\n (proof := /--\n This follows from Theorem \\ref{logDerivResidue} and Theorem \\ref{riemannZetaResidue}.\n -/)]\ntheorem riemannZetaLogDerivResidue :\n ∃ U ∈ 𝓝 1, BddAbove (norm ∘ (-(ζ' / ζ) - (fun s ↦ (s - 1)⁻¹)) '' (U \\ {1})) := by\n obtain ⟨U,U_in_nhds, hU⟩ := riemannZetaResidue\n have hU' : BddAbove (norm ∘ (ζ - fun s ↦ 1 * (s - 1)⁻¹) '' (U \\ {1})) := by\n simp only [Function.comp_apply, Pi.sub_apply, one_mul] at hU ⊢\n exact hU\n obtain ⟨V,V_in_nhds, V_is_open, hV⟩ := nonZeroOfBddAbove U_in_nhds one_ne_zero hU'\n let W := V ∩ interior U\n have hW : ∀ s ∈ W \\ {1}, ζ s ≠ 0 := by\n intro s hs\n have s_in_V_diff : s ∈ V \\ {1} := ⟨hs.1.1, hs.2⟩\n exact hV s s_in_V_diff\n have ζ_holc: HolomorphicOn ζ (W \\ {1}) := by\n intro y hy\n simp only [mem_diff, mem_singleton_iff] at hy\n refine DifferentiableAt.differentiableWithinAt ?_\n apply differentiableAt_riemannZeta hy.2\n have W_in_nhds : W ∈ 𝓝 1 := by\n refine inter_mem V_in_nhds ?_\n exact interior_mem_nhds.mpr U_in_nhds\n have := logDerivResidue'' hW ζ_holc W_in_nhds one_ne_zero\n have HW : BddAbove (norm ∘ (ζ - fun s ↦ (s - 1)⁻¹) '' (W \\ {1})) := by\n obtain ⟨c, hc⟩ := bddAbove_def.mp hU\n apply bddAbove_def.mpr\n use c\n rintro y ⟨x, x_in_W, fxy⟩\n apply hc\n exact ⟨x, ⟨interior_subset x_in_W.1.2, x_in_W.2⟩, fxy⟩\n simp only [one_mul] at this\n have aux: ∀ a, ‖-(deriv ζ a / ζ a) - (a - 1)⁻¹‖ = ‖(deriv ζ a / ζ a) + (a - 1)⁻¹‖ := by\n intro a\n calc ‖-(deriv ζ a / ζ a) - (a - 1)⁻¹‖\n = ‖-((deriv ζ a / ζ a) + (a - 1)⁻¹)‖ := by ring_nf\n _ = ‖(deriv ζ a / ζ a) + (a - 1)⁻¹‖ := by rw [norm_neg]\n simp only [Function.comp_apply, Pi.sub_apply] at hU\n simp only [Function.comp_apply, Pi.sub_apply, Pi.neg_apply, Pi.div_apply, aux]\n apply this HW\n","line":621,"end_line":666,"proof_status":"formalized"} {"id":"Zeta_eq_int_derivZeta","label":"Zeta_eq_int_derivZeta","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any \\(t\\ne 0\\) (so we don’t pass through the pole), and \\(\\sigma _1 {\\lt} \\sigma _2\\), \\[ \\int _{\\sigma _1}^{\\sigma _2}\\zeta '(\\sigma + it) dt = \\zeta (\\sigma _2+it) - \\zeta (\\sigma _1+it). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Zeta_eq_int_derivZeta","latex_link":"sect0003.html#Zeta_eq_int_derivZeta","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Zeta_eq_int_derivZeta","lean_decl_name":"Zeta_eq_int_derivZeta","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"Zeta-eq-int-derivZeta\")\n (statement := /--\n For any $t\\ne0$ (so we don't pass through the pole), and $\\sigma_1 < \\sigma_2$,\n $$\n \\int_{\\sigma_1}^{\\sigma_2}\\zeta'(\\sigma + it) dt =\n \\zeta(\\sigma_2+it) - \\zeta(\\sigma_1+it).\n $$\n -/)\n (proof := /-- This is the fundamental theorem of calculus. -/)\n (latexEnv := \"lemma\")]\nlemma Zeta_eq_int_derivZeta {σ₁ σ₂ t : ℝ} (t_ne_zero : t ≠ 0) :\n (∫ σ in σ₁..σ₂, ζ' (σ + t * I)) = ζ (σ₂ + t * I) - ζ (σ₁ + t * I) := by\n have diff : ∀ (σ : ℝ), DifferentiableAt ℂ ζ (σ + t * I) := by\n intro σ\n refine differentiableAt_riemannZeta ?_\n contrapose! t_ne_zero; apply And.right; simpa [Complex.ext_iff] using t_ne_zero\n apply intervalIntegral.integral_deriv_eq_sub'\n · exact deriv_fun_re diff\n · intro s _\n apply DifferentiableAt.comp\n · exact (diff s).restrictScalars ℝ\n · exact DifferentiableAt.add_const (c := t * I) <| differentiableAt_ofReal _\n · apply ContinuousOn.comp (g := ζ') ?_ ?_ (mapsTo_image _ _)\n · apply HasDerivAt.continuousOn (f' := deriv <| ζ')\n intro x hx\n apply hasDerivAt_deriv_iff.mpr\n replace hx : x ≠ 1 := by\n contrapose! hx\n simp only [hx, mem_image, Complex.ext_iff, add_re, ofReal_re, mul_re, I_re, mul_zero, ofReal_im,\n I_im, mul_one, sub_self, add_zero, one_re, add_im, mul_im, zero_add, one_im, not_exists,\n not_and]\n exact fun _ _ _ ↦ t_ne_zero\n exact differentiableAt_deriv_riemannZeta hx\n · exact continuous_ofReal.continuousOn.add continuousOn_const\n","line":2795,"end_line":2829,"proof_status":"formalized"} {"id":"ZetaAltFormulaAnalytic","label":"ZetaAltFormulaAnalytic","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have that \\(\\zeta _0(s)\\) is analytic for all \\(s\\in S\\) where \\(S=\\{ s\\in \\mathbb {C}:\\Re s{\\gt}0,\\, s\\neq 1\\} \\).","doc_url":null,"latex_link":"sect0004.html#ZetaAltFormulaAnalytic","lean_link":null,"lean_decl_name":"ZetaAltFormulaAnalytic","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"fks2-lemma-12","label":"fks2-lemma-12","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["classical-bound-theta","fks2-eq-19"],"nlp_text":"Suppose that \\(E_\\theta \\) satisfies an admissible classical bound with parameters \\(A,B,C,R,x_0\\). Then, for all \\(x \\geq x_0\\), \\[ \\int _{x_0}^x \\left|\\frac{E_\\theta (t)}{\\log ^2 t} dt\\right| \\leq \\frac{2A}{R^B} x m(x_0,x) \\exp \\left(-C \\sqrt{\\frac{\\log x}{R}}\\right) D_+\\left( \\sqrt{\\log x} - \\frac{C}{2\\sqrt{R}} \\right) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_12","latex_link":"secondary-chapter.html#fks2-lemma-12","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_12","lean_decl_name":"FKS2.lemma_12","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"\\frac{2A_\\theta m(x_0, x)}{R^B} \\int_{\\sqrt{\\log(x_0)}}^{\\sqrt{\\log(x)}} \\exp\\left( u^2 - \\frac{Cu}{\\sqrt{R}} \\right) du.\n\\]\nThen, by completing the square $u^2 - \\frac{Cu}{\\sqrt{R}} = \\left( u - \\frac{C}{2\\sqrt{R}} \\right)^2 - \\frac{C^2}{4R}$ and doing the substitution $v = u - \\frac{C}{2\\sqrt{R}}$, the above becomes\n\\[\n\\frac{2A_\\theta m(x_0, x)}{R^B} \\exp\\left( -\\frac{C^2}{4R} \\right) \\int_{\\sqrt{\\log(x_0)} - \\frac{C}{2\\sqrt{R}}}^{\\sqrt{\\log(x)} - \\frac{C}{2\\sqrt{R}}} \\exp(v^2) \\, dv.\n\\]\nNow we have\n\\begin{align*}\n\\int_{\\sqrt{\\log(x_0)} - \\frac{C}{2\\sqrt{R}}}^{\\sqrt{\\log(x)} - \\frac{C}{2\\sqrt{R}}} \\exp(v^2) \\, dv &\\leq \\int_{0}^{\\sqrt{\\log(x)} - \\frac{C}{2\\sqrt{R}}} \\exp(v^2) \\, dv \\\\\n&= x \\exp\\left( \\frac{C^2}{4R} \\right) \\exp\\left( -C\\sqrt{\\frac{\\log(x)}{R}} \\right) D_+\\left( \\sqrt{\\log(x)} - \\frac{C}{2\\sqrt{R}} \\right).\n\\end{align*}\nCombining the above completes the proof. -/)\n (latexEnv := \"lemma\")\n (discussion := 617)]\ntheorem lemma_12 {A B C R x₀ x : ℝ} (hEθ : Eθ.classicalBound A B C R x₀) (hx : x ≥ x₀) :\n ∫ t in x₀..x, |Eθ t| / log t ^ 2 ≤\n (2 * A) / (R ^ B) * x * max ((log x₀) ^ ((2 * B - 3) / 2)) ((log x) ^ ((2 * B - 3) / 2)) *\n exp (-C * sqrt (log x / R)) * dawson (sqrt (log x) - C / (2 * sqrt R)) :=\n sorry\n\nnoncomputable def ν_asymp (Aψ B C R x₀ : ℝ) : ℝ :=\n (1 / Aψ) * (R / log x₀) ^ B * exp (C * sqrt (log x₀ / R)) *\n (BKLNW.a₁ (log x₀) * (log x₀) * x₀ ^ (-(1:ℝ)/2) +\n BKLNW.a₂ (log x₀) * (log x₀) * x₀ ^ (-(2:ℝ)/3))\n\n@[blueprint\n \"fks2-proposition-13\"\n (title := \"FKS2 Proposition 13\")\n (statement := /--\n Suppose that $A_\\psi,B,C,R,x_0$ give an admissible bound for $E_\\psi$. If $B > C^2/8R$, then\n $A_\\theta, B, C, R, x_0$ give an admissible bound for $E_\\theta$, where\n $$ A_\\theta = A_\\psi (1 + \\nu_{asymp}(x_0))$$\n with\n $$ \\nu_{asymp}(x_0) = \\frac{1}{A_\\psi} (\\frac{R}{\\log x_0})^B\n \\exp(C \\sqrt{\\frac{\\log x_0}{R}}) (a_1 (\\log x_0) x_0^{-1/2} + a_2 (\\log x_0) x_0^{-2/3}).$$\n -/)\n","line":257,"end_line":292,"proof_status":"statement_formalized"} {"id":"lem:final-comparison","label":"final-comparison","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(0 \\le \\varepsilon \\le 1/89693^2\\), we have \\[ 1 + 3.01\\varepsilon + 3.01\\varepsilon ^2 + 1.01\\varepsilon ^3 \\le 1 + 3.36683\\varepsilon - 0.01\\varepsilon ^2. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.final_comparison","latex_link":"tertiary-chapter.html#lem:final-comparison","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.final_comparison","lean_decl_name":"Lcm.final_comparison","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:final-comparison\"\n (title := \"Final polynomial comparison\")\n (statement := /--\n For \\(0 \\le \\varepsilon \\le 1/89693^2\\), we have\n \\[\n 1 + 3.01\\varepsilon + 3.01\\varepsilon^2 + 1.01\\varepsilon^3\n \\le 1 + 3.36683\\varepsilon - 0.01\\varepsilon^2.\n \\]\n -/)\n (proof := /--\n This is equivalent to\n \\[\n 3.01\\varepsilon + 3.01\\varepsilon^2 + 1.01\\varepsilon^3\n \\le 3.36683\\varepsilon - 0.01\\varepsilon^2,\n \\]\n or\n \\[\n 0 \\le (3.36683 - 3.01)\\varepsilon - (3.01+0.01)\\varepsilon^2 - 1.01\\varepsilon^3.\n \\]\n Factor out \\(\\varepsilon\\) and use that \\(0<\\varepsilon \\le 1/89693^2\\) to check that the\n resulting quadratic in \\(\\varepsilon\\) is nonnegative on this interval. Again, this is a\n finite computation that can be verified mechanically.\n -/)\n (latexEnv := \"lemma\")]\ntheorem final_comparison {ε : ℝ} (hε : 0 ≤ ε ∧ ε ≤ 1 / (89693 ^ 2 : ℝ)) :\n 1 + 3.01 * ε + 3.01 * ε ^ 2 + 1.01 * ε ^ 3 ≤ 1 + 3.36683 * ε - 0.01 * ε ^ 2 := by\n nlinarith","line":1551,"end_line":1578,"proof_status":"formalized"} {"id":"second-fourier","label":"second-fourier","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(\\psi : \\mathbb {R}\\to \\mathbb {C}\\) is continuous and compactly supported and \\(x {\\gt} 0\\), then for any \\(\\sigma {\\gt}1\\) \\[ \\int _{-\\log x}^\\infty e^{-u(\\sigma -1)} \\hat\\psi (\\frac{u}{2\\pi })\\ du = x^{\\sigma - 1} \\int _\\mathbb {R}\\frac{1}{\\sigma +it-1} \\psi (t) x^{it}\\ dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/second_fourier","latex_link":"sect0002.html#second-fourier","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/second_fourier","lean_decl_name":"second_fourier","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (statement := /--\n If $\\psi: \\R \\to \\C$ is continuous and compactly supported and $x > 0$, then for any $\\sigma>1$\n $$ \\int_{-\\log x}^\\infty e^{-u(\\sigma-1)} \\hat \\psi(\\frac{u}{2\\pi})\\ du =\n x^{\\sigma - 1} \\int_\\R \\frac{1}{\\sigma+it-1} \\psi(t) x^{it}\\ dt.$$\n -/)\n (proof := /--\n The left-hand side expands as\n $$ \\int_{-\\log x}^\\infty \\int_\\R e^{-u(\\sigma-1)} \\psi(t) e(-\\frac{tu}{2\\pi})\\ dt\\ du \\atop{?}=\n x^{\\sigma - 1} \\int_\\R \\frac{1}{\\sigma+it-1} \\psi(t) x^{it}\\ dt$$\n so by Fubini's theorem it suffices to verify the identity\n \\begin{align*}\n \\int_{-\\log x}^\\infty e^{-u(\\sigma-1)} e(-\\frac{tu}{2\\pi})\\ du\n &= \\int_{-\\log x}^\\infty e^{(it - \\sigma + 1)u}\\ du \\\\\n &= \\frac{1}{it - \\sigma + 1} e^{(it - \\sigma + 1)u}\\ \\Big|_{-\\log x}^\\infty \\\\\n &= x^{\\sigma - 1} \\frac{1}{\\sigma+it-1} x^{it}\n \\end{align*}\n -/)\n (latexEnv := \"lemma\")]\nlemma second_fourier (hcont : Continuous ψ) (hsupp : Integrable ψ)\n {x σ' : ℝ} (hx : 0 < x) (hσ : 1 < σ') :\n ∫ u in Ici (-log x), Real.exp (-u * (σ' - 1)) * 𝓕 (ψ : ℝ → ℂ) (u / (2 * π)) =\n (x^(σ' - 1) : ℝ) * ∫ t, (1 / (σ' + t * I - 1)) * ψ t * x^(t * I) ∂ volume := by\n\n conv in ↑(rexp _) * _ => { rw [Real.fourier_real_eq, ← smul_eq_mul, ← integral_smul] }\n rw [MeasureTheory.integral_integral_swap]\n swap\n · exact second_fourier_integrable_aux1 hcont hsupp hσ\n rw [← integral_const_mul]\n congr 1; ext t\n dsimp [Real.fourierChar, Circle.exp]\n\n simp_rw [mul_smul_comm, ← smul_mul_assoc, integral_mul_const]\n rw [fun (a b d : ℂ) ↦ show a * (b * (ψ t) * d) = (a * b * d) * ψ t by ring]\n congr 1\n conv =>\n lhs\n enter [2]\n ext a\n rw [AddChar.coe_mk, Submonoid.mk_smul, smul_eq_mul]\n push_cast\n simp_rw [← Complex.exp_add]\n have (u : ℝ) :\n 2 * ↑π * -(↑t * (↑u / (2 * ↑π))) * I + -↑u * (↑σ' - 1) = (1 - σ' - t * I) * u := calc\n _ = -↑u * (↑σ' - 1) + (2 * ↑π) / (2 * ↑π) * -(↑t * ↑u) * I := by ring\n _ = -↑u * (↑σ' - 1) + 1 * -(↑t * ↑u) * I := by rw [div_self (by norm_num)]\n _ = _ := by ring\n simp_rw [this]\n let c : ℂ := (1 - ↑σ' - ↑t * I)\n have : c ≠ 0 := by simp [Complex.ext_iff, c, sub_ne_zero.mpr hσ.ne]\n let f' (u : ℝ) := cexp (c * u)\n let f := fun (u : ℝ) ↦ (f' u) / c\n have hderiv : ∀ u ∈ Ici (-Real.log x), HasDerivAt f (f' u) u := by\n intro u _\n rw [show f' u = cexp (c * u) * (c * 1) / c by simp only [f']; field_simp]\n exact (hasDerivAt_id' u).ofReal_comp.const_mul c |>.cexp.div_const c\n have hf : Tendsto f atTop (𝓝 0) := by\n apply tendsto_zero_iff_norm_tendsto_zero.mpr\n suffices Tendsto (fun (x : ℝ) ↦ ‖cexp (c * ↑x)‖ / ‖c‖) atTop (𝓝 (0 / ‖c‖)) by\n simpa [f, f'] using this\n apply Filter.Tendsto.div_const\n suffices Tendsto (· * (1 - σ')) atTop atBot by simpa [Complex.norm_exp, mul_comm (1 - σ'), c]\n exact Tendsto.atTop_mul_const_of_neg (by linarith) fun ⦃s⦄ h ↦ h\n rw [integral_Ici_eq_integral_Ioi,\n integral_Ioi_of_hasDerivAt_of_tendsto' hderiv (second_fourier_integrable_aux2 hσ) hf]\n simpa [f, f'] using second_fourier_aux hx\n\nblueprint_comment /--\n","line":217,"end_line":283,"proof_status":"formalized"} {"id":"limiting","label":"limiting","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["second-fourier","first-fourier"],"nlp_text":"If \\(\\psi : \\mathbb {R}\\to \\mathbb {C}\\) is \\(C^2\\) and compactly supported and \\(x \\geq 1\\), then \\[ \\sum _{n=1}^\\infty \\frac{f(n)}{n} \\hat\\psi ( \\frac{1}{2\\pi } \\log \\frac{n}{x} ) - A \\int _{-\\log x}^\\infty \\hat\\psi (\\frac{u}{2\\pi })\\ du = \\int _\\mathbb {R}G(1+it) \\psi (t) x^{it}\\ dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_fourier","latex_link":"sect0002.html#limiting","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_fourier","lean_decl_name":"limiting_fourier","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"Limiting Fourier identity\")\n (statement := /--\n If $\\psi: \\R \\to \\C$ is $C^2$ and compactly supported and $x \\geq 1$, then\n $$ \\sum_{n=1}^\\infty \\frac{f(n)}{n} \\hat \\psi( \\frac{1}{2\\pi} \\log \\frac{n}{x} )\n - A \\int_{-\\log x}^\\infty \\hat \\psi(\\frac{u}{2\\pi})\\ du\n = \\int_\\R G(1+it) \\psi(t) x^{it}\\ dt.$$\n -/)\n (proof := /--\n By Lemma \\ref{first-fourier} and Lemma \\ref{second-fourier}, we know that for any $\\sigma>1$,\n we have\n $$ \\sum_{n=1}^\\infty \\frac{f(n)}{n^\\sigma} \\hat \\psi( \\frac{1}{2\\pi} \\log \\frac{n}{x} )\n - A x^{1-\\sigma} \\int_{-\\log x}^\\infty e^{-u(\\sigma-1)} \\hat \\psi(\\frac{u}{2\\pi})\\ du\n = \\int_\\R G(\\sigma+it) \\psi(t) x^{it}\\ dt.$$\n Now take limits as $\\sigma \\to 1$ using dominated convergence together with \\eqref{cheby}\n and Lemma \\ref{decay} to obtain the result.\n -/)\n (latexEnv := \"lemma\")]\nlemma limiting_fourier (hcheby : cheby f)\n (hG : ContinuousOn G {s | 1 ≤ s.re})\n (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re})\n (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ')) (ψ : CS 2 ℂ) (hx : 1 ≤ x) :\n ∑' n, f n / n * 𝓕 (ψ : ℝ → ℂ) (1 / (2 * π) * log (n / x)) -\n A * ∫ u in Set.Ici (-log x), 𝓕 (ψ : ℝ → ℂ) (u / (2 * π)) =\n ∫ (t : ℝ), (G (1 + t * I)) * (ψ t) * x ^ (t * I) := by\n\n have l1 := limiting_fourier_lim1 hcheby ψ (by linarith)\n have l2 := limiting_fourier_lim2 A ψ hx\n have l3 := limiting_fourier_lim3 hG ψ hx\n apply tendsto_nhds_unique_of_eventuallyEq (l1.sub l2) l3\n simpa [eventuallyEq_nhdsWithin_iff] using Eventually.of_forall (limiting_fourier_aux hG' hf ψ hx)\n\n\n","line":1107,"end_line":1138,"proof_status":"formalized"} {"id":"limiting-cor","label":"limiting-cor","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["limiting"],"nlp_text":"With the hypotheses as above, we have \\[ \\sum _{n=1}^\\infty \\frac{f(n)}{n} \\hat\\psi ( \\frac{1}{2\\pi } \\log \\frac{n}{x} ) = A \\int _{-\\infty }^\\infty \\hat\\psi (\\frac{u}{2\\pi })\\ du + o(1) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_cor","latex_link":"sect0002.html#limiting-cor","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limiting_cor","lean_decl_name":"limiting_cor","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"Corollary of limiting identity\")\n (statement := /--\n With the hypotheses as above, we have\n $$ \\sum_{n=1}^\\infty \\frac{f(n)}{n} \\hat \\psi( \\frac{1}{2\\pi} \\log \\frac{n}{x} )\n = A \\int_{-\\infty}^\\infty \\hat \\psi(\\frac{u}{2\\pi})\\ du + o(1)$$\n as $x \\to \\infty$.\n -/)\n (proof := /--\n Immediate from the Riemann-Lebesgue lemma, and also noting that\n $\\int_{-\\infty}^{-\\log x} \\hat \\psi(\\frac{u}{2\\pi})\\ du = o(1)$.\n -/)\n (latexEnv := \"corollary\")]\nlemma limiting_cor (ψ : CS 2 ℂ) (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ')) (hcheby : cheby f)\n (hG : ContinuousOn G {s | 1 ≤ s.re})\n (hG' : Set.EqOn G (fun s ↦ LSeries f s - A / (s - 1)) {s | 1 < s.re}) :\n Tendsto (fun x : ℝ ↦ ∑' n, f n / n * 𝓕 (ψ : ℝ → ℂ) (1 / (2 * π) * log (n / x)) -\n A * ∫ u in Set.Ici (-log x), 𝓕 (ψ : ℝ → ℂ) (u / (2 * π))) atTop (𝓝 0) := by\n\n apply limiting_cor_aux.congr'\n filter_upwards [eventually_ge_atTop 1] with x hx using\n limiting_fourier hcheby hG hG' hf ψ hx |>.symm\n\n\n","line":1165,"end_line":1187,"proof_status":"formalized"} {"id":"lem:abadeuleulmit1","label":"abadeuleulmit1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(z\\in \\mathbb {C}\\), \\(z\\notin \\mathbb {Z}\\). Then \\[ \\frac{\\pi }{\\sin \\pi z} = \\frac{1}{z} + \\sum _{n {\\gt} 0} (-1)^n\\left(\\frac{1}{z - n} + \\frac{1}{z + n}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeuleulmit1","latex_link":"zeta-chapter.html#lem:abadeuleulmit1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeuleulmit1","lean_decl_name":"ZetaAppendix.lemma_abadeuleulmit1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadeuleulmit1\"\n (title := \"Euler/Mittag-Leffler expansion for cosec\")\n (statement := /--\nLet $z\\in \\mathbb{C}$, $z\\notin \\mathbb{Z}$. Then\n\\[\\frac{\\pi}{\\sin \\pi z} = \\frac{1}{z} +\n \\sum_{n > 0} (-1)^n\\left(\\frac{1}{z - n} + \\frac{1}{z + n}\\right).\n\\]\n-/)\n (proof := /--\nLet us start from the Mittag-Leffler expansion\n$\\pi \\cot \\pi s = \\frac{1}{s} + \\sum_n \\left(\\frac{1}{s-n} + \\frac{1}{s+n}\\right)$.\n\nApplying the trigonometric identity\n$\\cot u - \\cot \\left(u + \\frac{\\pi}{2}\\right) = \\cot u + \\tan u = \\frac{2}{\\sin 2 u}$\nwith $u=\\pi z/2$, and letting $s = z/2$, $s = (z+1)/2$, we see that\n\\[\\begin{aligned}\\frac{\\pi}{\\sin \\pi z}\n &= \\frac{\\pi}{2} \\cot \\frac{\\pi z}{2} - \\frac{\\pi}{2} \\cot \\frac{\\pi (z+1)}{2} \\\\\n &= \\frac{1/2}{z/2} +\n \\sum_n \\left(\\frac{1/2}{\\frac{z}{2} -n} + \\frac{1/2}{\\frac{z}{2} +n}\\right)\n -\\frac{1/2}{(z+1)/2}\n - \\sum_n \\left(\\frac{1/2}{\\frac{z+1}{2} -n} + \\frac{1/2}{\\frac{z+1}{2} +n}\\right)\\\\\n &= \\frac{1}{z} + \\sum_n \\left(\\frac{1}{z - 2 n} + \\frac{1}{z + 2 n}\\right) -\n \\sum_n \\left(\\frac{1}{z - (2 n - 1)} + \\frac{1}{z + (2 n - 1)}\\right)\n\\end{aligned}\\]\nafter reindexing the second sum. Regrouping terms again, we obtain our equation.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 569)]\ntheorem lemma_abadeuleulmit1 {z : ℂ} (hz : z ∈ integerComplement) :\n (π / sin (π * z)) =\n (1 / z) + ∑' (n : ℕ+), (-1) ^ (n : ℕ) * ((1 / (z - n) : ℂ) + (1 / (z + n) : ℂ)) := calc\n _ = (1 / 2) * π * 2 / sin (π * z) := by field_simp\n _ = (1 / 2) * (π * cot (π * z / 2)) - (1 / 2) * (π * cot (π * (z + 1) / 2)) := by\n have : π * z / 2 + π / 2 = π * (z + 1) / 2 := by grind\n have := this ▸ trig'' (z := π * z / 2) ?_\n · by_contra!\n obtain ⟨n, hn⟩ := this\n have := mul_right_cancel₀ (by exact_mod_cast pi_ne_zero)\n ((mul_comm (π : ℂ) z) ▸ ((div_left_inj' (by grind)).1 hn))\n simp_all [integerComplement]\n · rw [mul_div_assoc, ← mul_sub, ← mul_sub, mul_assoc, this]; field_simp\n _ = (1 / 2) * (1 / (z / 2) + ∑' n : ℕ+, (1 / (z / 2 - n) + 1 / (z / 2 + n))) -\n (1 / 2) * (1 / ((z + 1) / 2) + ∑' n : ℕ+, (1 / ((z + 1) / 2 - n)\n + 1 / ((z + 1) / 2 + n))) := by\n congr\n · have : z / 2 ∈ integerComplement := by\n simp_all only [integerComplement, Set.mem_compl_iff, Set.mem_range, not_exists]\n refine fun n hn ↦ hz (2 * n) ?_\n grind\n simpa [mul_div_assoc] using cot_series_rep this\n · have : (z + 1) / 2 ∈ integerComplement := by\n simp_all only [integerComplement, Set.mem_compl_iff, Set.mem_range, not_exists]\n refine fun n hn ↦ hz (2 * n - 1) ?_\n grind\n simpa [mul_div_assoc] using cot_series_rep this\n _ = 1 / z + ∑' n : ℕ+, (1 / (z - 2 * n) + 1 / (z + 2 * n)) -\n (1 / (z + 1) + ∑' n : ℕ+, (1 / (z + 1 - 2 * n) + 1 / (z + 1 + 2 * n))) := by\n field_simp\n rw [mul_sub, mul_add, mul_add, ← div_eq_mul_one_div, ← div_eq_mul_one_div,\n Summable.tsum_mul_left 2 (hsummable hz), Summable.tsum_mul_left 2 (hsummable' hz)]\n _ = 1 / z + ∑' n : ℕ+, (1 / (z - 2 * n) + 1 / (z + 2 * n)) -\n ∑' n : ℕ+, (1 / (z - (2 * n - 1)) + 1 / (z + (2 * n - 1))) := by\n congr\n refine Eq.symm (sub_eq_iff_eq_add.1 ?_)\n rw [← Summable.tsum_sub ?_ (hsummable' hz)]\n · simp only [sub_sub_eq_add_sub, add_sub_add_left_eq_sub, tsum_pnat_eq_tsum_succ\n (f := fun b ↦ (1 / (z + (2 * b - 1)) - 1 / (z + (2 * b + 1)))), add_assoc z 1,\n add_comm (1 : ℂ)]\n refine HasSum.tsum_eq ((Summable.hasSum_iff_tendsto_nat ?_).2 ?_)\n · suffices Summable (fun n : ℤ ↦ 2 * ((z + n + 1) * (z + n + 3))⁻¹) by\n have hi : (fun n : ℕ ↦ (2 * n : ℤ)).Injective := fun _ _ _ ↦ by simp_all\n have := this.comp_injective hi\n convert this using 2 with n\n rw [one_div, one_div, inv_sub_inv]\n · simp; field_simp; ring\n · simp_all only [integerComplement, mem_compl_iff, Set.mem_range, not_exists,\n ne_eq, add_eq_zero_iff_eq_neg]\n exact fun h ↦ hz (-(2 * (n + 1) - 1)) (by simp_all)\n · simp_all only [integerComplement, mem_compl_iff, Set.mem_range, not_exists,\n ne_eq, add_eq_zero_iff_eq_neg]\n exact fun h ↦ hz (-(2 * (n + 1) + 1)) (by simp_all)\n refine Summable.mul_left 2 ?_\n apply EisensteinSeries.summable_inv_of_isBigO_rpow_inv (a := 2) (by norm_cast)\n simpa [pow_two] using (EisensteinSeries.linear_inv_isBigO_right_add 1 3 z).mul\n (EisensteinSeries.linear_inv_isBigO_right_add 1 1 z)\n · refine (Filter.tendsto_congr (telescoping_sum z)).2 ?_\n nth_rw 2 [← sub_zero (1 / (z + 1))]\n simpa [add_comm _ (1 : ℂ), ← add_assoc, one_mul, - one_div, Function.comp_def] using\n ((EisensteinSeries.tendsto_zero_inv_linear (1 + z) 1).comp\n (tendsto_id.const_mul_atTop' (by linarith))).const_sub (1 / (z + 1))\n · exact hsummable'' hz\n _ = 1 / z + ∑' n : ℕ+, (-1) ^ (2 * n : ℕ) * (1 / (z - 2 * n) + 1 / (z + 2 * n)) +\n ∑' n : ℕ+, (-1) * (1 / (z - (2 * n - 1)) + 1 / (z + (2 * n - 1))) := by\n rw [Summable.tsum_mul_left (-1), neg_one_mul, ← sub_eq_add_neg]\n · congr; ext ; simp\n · exact hsummable'' hz\n _ = 1 / z + ∑' n : ℕ+, (-1) ^ (2 * n : ℕ) * (1 / (z - 2 * n) + 1 / (z + 2 * n)) +\n ∑' n : ℕ+, (-1) ^ (2 * n - 1 : ℕ) * (1 / (z - (2 * n - 1)) + 1 / (z + (2 * n - 1))) := by\n congr; simp [neg_one_pow]\n _ = (1 / z) + ∑' (n : ℕ+), (-1) ^ (n : ℕ) * ((1 / (z - n) : ℂ) + (1 / (z + n) : ℂ)) := by\n have hn (n : ℕ+) : ((2 * n - 1 : ℕ+) : ℕ) = 2 * n - 1 := by\n have : 1 < 2 * n := Nat.le_trans (by norm_num) (Nat.mul_le_mul_left 2 n.2)\n simp [PNat.sub_coe, this]\n rw [add_assoc, ← tsum_even_add_odd' (f := fun n ↦ (-1) ^ (n : ℕ) * ((1 / (z - n) : ℂ)\n + (1 / (z + n) : ℂ))), add_comm (∑' (k : ℕ+), (-1) ^ ((2 * k - 1 : ℕ+) : ℕ) * _) _]\n · congr <;> aesop\n · simpa using asummable hz\n · convert asummable'' hz <;> aesop\n","line":1447,"end_line":1555,"proof_status":"formalized"} {"id":"thm:carneiroetal_2019_rh","label":"carneiroetal_2019_rh","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Assuming the Riemann Hypothesis, for \\(x \\geq 4\\), there is a prime in the interval \\[ \\left( x - \\frac{22}{25}\\sqrt{x}\\log x, x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CarneiroEtAl2019RH.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:carneiroetal_2019_rh","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CarneiroEtAl2019RH.has_prime_in_interval","lean_decl_name":"CarneiroEtAl2019RH.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:carneiroetal_2019_rh\"\n (title := \"Carneiro et al. 2019 under RH\")\n (statement := /-- Assuming the Riemann Hypothesis, for $x \\geq 4$, there is a prime in the interval\n \\[ \\left( x - \\frac{22}{25}\\sqrt{x}\\log x, x \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem CarneiroEtAl2019RH.has_prime_in_interval (x : ℝ) (hx : x ≥ 4) (RH : RiemannHypothesis) :\n HasPrimeInInterval (x - (22 / 25) * sqrt x * log x) ((22 / 25) * sqrt x * log x) := by sorry","line":251,"end_line":259,"proof_status":"formalized"} {"id":"first-fourier","label":"first-fourier","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(\\psi : \\mathbb {R}\\to \\mathbb {C}\\) is integrable and \\(x {\\gt} 0\\), then for any \\(\\sigma {\\gt}1\\) \\[ \\sum _{n=1}^\\infty \\frac{f(n)}{n^\\sigma } \\hat\\psi ( \\frac{1}{2\\pi } \\log \\frac{n}{x} ) = \\int _\\mathbb {R}F(\\sigma + it) \\psi (t) x^{it}\\ dt. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/first_fourier","latex_link":"sect0002.html#first-fourier","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/first_fourier","lean_decl_name":"first_fourier","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (statement := /--\n If $\\psi: \\R \\to \\C$ is integrable and $x > 0$, then for any $\\sigma>1$\n $$ \\sum_{n=1}^\\infty \\frac{f(n)}{n^\\sigma} \\hat \\psi( \\frac{1}{2\\pi} \\log \\frac{n}{x} ) =\n \\int_\\R F(\\sigma + it) \\psi(t) x^{it}\\ dt.$$\n -/)\n (proof := /--\n By the definition of the Fourier transform, the left-hand side expands as\n $$ \\sum_{n=1}^\\infty \\int_\\R \\frac{f(n)}{n^\\sigma} \\psi(t) e( - \\frac{1}{2\\pi} t \\log\n \\frac{n}{x})\\ dt$$\n while the right-hand side expands as\n $$ \\int_\\R \\sum_{n=1}^\\infty \\frac{f(n)}{n^{\\sigma+it}} \\psi(t) x^{it}\\ dt.$$\n Since\n $$\\frac{f(n)}{n^\\sigma} \\psi(t) e( - \\frac{1}{2\\pi} t \\log \\frac{n}{x}) =\n \\frac{f(n)}{n^{\\sigma+it}} \\psi(t) x^{it}$$\n the claim then follows from Fubini's theorem.\n -/)\n (latexEnv := \"lemma\")]\nlemma first_fourier (hf : ∀ (σ' : ℝ), 1 < σ' → Summable (nterm f σ'))\n (hsupp : Integrable ψ) (hx : 0 < x) (hσ : 1 < σ') :\n ∑' n : ℕ, term f σ' n * (𝓕 (ψ : ℝ → ℂ) (1 / (2 * π) * log (n / x))) =\n ∫ t : ℝ, LSeries f (σ' + t * I) * ψ t * x ^ (t * I) := by\n\n calc\n _ = ∑' n, term f σ' n * ∫ (v : ℝ), 𝐞 (-(v * ((1 : ℝ) /\n ((2 : ℝ) * π) * Real.log (n / x)))) • ψ v := by\n simp only [Real.fourier_eq]\n simp only [one_div, mul_inv_rev, RCLike.inner_apply', conj_trivial]\n _ = ∑' n, ∫ (v : ℝ), term f σ' n * 𝐞 (-(v * ((1 : ℝ) /\n ((2 : ℝ) * π) * Real.log (n / x)))) • ψ v := by\n simp [integral_const_mul]\n _ = ∫ (v : ℝ), ∑' n, term f σ' n * 𝐞 (-(v * ((1 : ℝ) /\n ((2 : ℝ) * π) * Real.log (n / x)))) • ψ v := by\n refine (integral_tsum ?_ ?_).symm\n · refine fun _ ↦ AEMeasurable.aestronglyMeasurable ?_\n have := hsupp.aemeasurable\n fun_prop\n · simp only [enorm_mul]\n simp_rw [lintegral_const_mul'' _ (first_fourier_aux1 hsupp.aemeasurable _)]\n calc\n _ = (∑' (i : ℕ), ‖term f σ' i‖ₑ) * ∫⁻ (a : ℝ), ‖ψ a‖ₑ ∂volume := by\n simp [ENNReal.tsum_mul_right, enorm_eq_nnnorm]\n _ ≠ ⊤ := ENNReal.mul_ne_top (hf_coe1 hf hσ)\n (ne_top_of_lt hsupp.2)\n _ = _ := by\n congr 1; ext y\n simp_rw [mul_assoc (LSeries _ _), ← smul_eq_mul (a := (LSeries _ _)), LSeries]\n rw [← Summable.tsum_smul_const]\n · simp_rw [first_fourier_aux2 hx]\n · apply Summable.of_norm\n convert hf σ' hσ with n\n rw [norm_term_eq_nterm_re]\n simp\n\n\n","line":109,"end_line":162,"proof_status":"formalized"} {"id":"lem:qi-product","label":"qi-product","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:choose-qi"],"nlp_text":"With \\(p_i,q_i\\) as in Lemmas 10.1.9 and 10.1.10, we have \\begin{equation} \\label{eq:qi-upper} \\prod _{i=1}^3 \\Bigl(1 + \\frac{1}{q_i}\\Bigr) \\le \\prod _{i=1}^3 \\Bigl(1 + \\frac{\\bigl(1 + \\frac{1}{\\log ^3 \\sqrt{n}}\\bigr)^i}{n} \\Bigr). \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.prod_q_ge","latex_link":"tertiary-chapter.html#lem:qi-product","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.prod_q_ge","lean_decl_name":"Lcm.prod_q_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":" \\Bigl(1 + 3.01\\varepsilon + 3.01\\varepsilon^2 + 1.01\\varepsilon^3\\Bigr),\n \\]\n and\n \\[\n \\prod_{i=1}^3 \\Bigl(1 + \\frac{\\varepsilon}{1.000675^{2i}}\\frac{1}{1 + 1/89693}\\Bigr)\n \\Bigl(1 + \\frac{3}{8}\\varepsilon\\Bigr)\n \\Bigl(1 - \\frac{4 \\times 1.000675^{12}}{89693}\\varepsilon\\Bigr)\n \\ge\n 1 + 3.36683\\varepsilon - 0.01\\varepsilon^2.\n \\]\n -/)\n (proof := /--\n Expand each finite product as a polynomial in \\(\\varepsilon\\), estimate the coefficients using\n the bounds in Lemma~\\ref{lem:eps-bounds}, and bound the tails by simple inequalities such as\n \\[\n (1+C\\varepsilon)^k \\le 1 + k C\\varepsilon + \\dots\n \\]\n for small \\(\\varepsilon\\).\n All coefficients can be bounded numerically in a rigorous way; this step is a finite computation\n that can be checked mechanically.\n -/)\n (latexEnv := \"lemma\")]\ntheorem prod_epsilon_le {ε : ℝ} (hε : 0 ≤ ε ∧ ε ≤ 1 / (89693 ^ 2 : ℝ)) :\n ∏ i : Fin 3, (1 + (1.000675 : ℝ) ^ ((i : ℕ) + 1 : ℝ) * ε) ≤\n 1 + 3.01 * ε + 3.01 * ε ^ 2 + 1.01 * ε ^ 3 := by\n norm_cast; norm_num [Fin.prod_univ_three]; nlinarith\n\n@[blueprint\n \"lem:poly-ineq\"\n (title := \"Polynomial approximation of the inequality\")\n (statement := /--\n For \\(0 \\le \\varepsilon \\le 1/89693^2\\), we have\n \\[\n \\prod_{i=1}^3 (1 + 1.000675^i \\varepsilon)\n \\le\n \\Bigl(1 + 3.01\\varepsilon + 3.01\\varepsilon^2 + 1.01\\varepsilon^3\\Bigr),\n \\]\n and\n \\[\n \\prod_{i=1}^3 \\Bigl(1 + \\frac{\\varepsilon}{1.000675^{2i} (1 + \\frac{1}{89693})}\\Bigr)\n \\Bigl(1 + \\frac{3}{8}\\varepsilon\\Bigr)\n \\Bigl(1 - \\frac{4 \\times 1.000675^{12}}{89693}\\varepsilon\\Bigr)\n \\ge\n 1 + 3.36683\\varepsilon - 0.01\\varepsilon^2.\n","line":1222,"end_line":1265,"proof_status":"formalized"} {"id":"thm:cully-hugill2021","label":"cully-hugill2021","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} \\exp (\\exp (33.99))\\), then there is a prime in the interval \\[ \\left( x, x + 3x^{2/3} \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CullyHugill2021.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:cully-hugill2021","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CullyHugill2021.has_prime_in_interval","lean_decl_name":"CullyHugill2021.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:cully-hugill2021\"\n (title := \"Cully-Hugill 2021\")\n (statement := /-- If $x > \\exp(\\exp(33.99))$, then there is a prime in the interval\n \\[ \\left( x, x + 3x^{2/3} \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem CullyHugill2021.has_prime_in_interval (x : ℝ) (hx : x > exp (exp 33.99)) :\n HasPrimeInInterval x (3 * x ^ (2 / 3 : ℝ)) := by sorry","line":222,"end_line":230,"proof_status":"formalized"} {"id":"bklnw-sigma_2_def","label":"bklnw-sigma_2_def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta"],"nlp_text":"We denote \\[ \\Sigma _2 := \\sum _{|\\gamma | \\leq T; \\beta \\geq 1 - \\delta } \\frac{x^{\\rho - 1}}{\\rho } \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Sigma₂","latex_link":"primary-chapter.html#bklnw-sigma_2_def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Sigma₂","lean_decl_name":"BKLNW_app.Sigma₂","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-sigma_2_def\"\n (title := \"Definition of Sigma 2\")\n (statement := /-- We denote $$ \\Sigma_2 := \\sum_{|\\gamma| \\leq T; \\beta \\geq 1 - \\delta} \\frac{x^{\\rho - 1}}{\\rho} $$ -/)]\nnoncomputable def Sigma₂ (x T δ : ℝ) : ℂ := riemannZeta.zeroes_sum (Set.Ioc (1 - δ) 1) (Set.Ioo (-T) T) (fun ρ ↦ x^(ρ-1) / ρ)","line":52,"end_line":56,"proof_status":"formalized"} {"id":"bklnw-eq_A_9","label":"bklnw-eq_A_9","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-sigma_2_def","bklnw-sigma_1_def"],"nlp_text":"We have \\[ \\sum _{|\\gamma | {\\lt} T} \\frac{x^{\\rho -1}}{\\rho } = \\Sigma _1 + \\Sigma _2 \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_9","latex_link":"primary-chapter.html#bklnw-eq_A_9","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_9","lean_decl_name":"BKLNW_app.bklnw_eq_A_9","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_9\"\n (title := \"Equation (A.9)\")\n (statement := /-- We have\n $$ \\sum_{|\\gamma| < T} \\frac{x^{\\rho-1}}{\\rho} = \\Sigma_1 + \\Sigma_2 $$ -/)\n (proof := /-- Follows directly from the definitions of Σ₁ and Σ₂. -/)\n (latexEnv := \"sublemma\")\n (discussion := 750)]\ntheorem bklnw_eq_A_9 (x T δ : ℝ) : riemannZeta.zeroes_sum (Set.Icc 0 1) (Set.Ioo (-T) T) (fun ρ ↦ x^(ρ-1) / ρ) = Sigma₁ x T δ + Sigma₂ x T δ := by sorry","line":58,"end_line":66,"proof_status":"statement_formalized"} {"id":"fks-theorem-3-2","label":"fks-theorem-3-2","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta"],"nlp_text":"For any \\(\\alpha \\in (0,1/2]\\) and \\(\\omega \\in [0,1]\\) there exist \\(M, x_M\\) such that for \\(\\max (51, \\log x) {\\lt} T {\\lt} (x^\\alpha -2)/5\\) and some \\(T^* \\in [T, 2.45 T]\\), \\[ |\\psi (x) - (x - \\sum _{|\\gamma | \\leq T^*} x^\\rho /\\rho )| ≤ M x / T * log^{1-\\omega } x \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_3_2","latex_link":"primary-chapter.html#fks-theorem-3-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_3_2","lean_decl_name":"FKS.theorem_3_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-theorem-3-2\"\n (title := \"FKS Theorem 3.2\")\n (statement := /--\n For any $\\alpha \\in (0,1/2]$ and $\\omega \\in [0,1]$ there exist $M, x_M$ such that for\n $\\max(51, \\log x) < T < (x^\\alpha-2)/5$ and some $T^* \\in [T, 2.45 T]$,\n $$ |\\psi(x) - (x - \\sum_{|\\gamma| \\leq T^*} x^\\rho/\\rho)| ≤ M x / T * log^{1-\\omega} x $$\n for all $x ≥ x_M$.\n -/)]\ntheorem theorem_3_2 (α ω : ℝ) (hα : α ∈ Set.Ioc 0 (1 / 2)) (hω : ω ∈ Set.Icc 0 1) :\n ∃ M xM : ℝ, ∀ x, ∀ T ∈ Set.Ioo (max 51 (log x)) ((x ^ α - 2) / 5),\n ∃ Tstar ∈ Set.Icc T (2.45 * T), ∀ x ≥ xM,\n ‖ψ x - (x - riemannZeta.zeroes_sum (Set.Ioo 0 1) (Set.Ioo (-Tstar) Tstar)\n (fun ρ ↦ x ^ ρ / ρ))‖ ≤ M * x / T * (log x) ^ (1 - ω) := by sorry\n","line":298,"end_line":311,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-2","label":"costa-pereira-sublemma-1-2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-1"],"nlp_text":"For every \\(x {\\gt} 0\\) and \\(n\\) we have \\(\\psi (x^{1/n}) = \\sum _{k \\geqslant 1} \\theta (x^{1/nk})\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_2","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_2","lean_decl_name":"CostaPereira.sublemma_1_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":" simp only [this, add_zero]\n have h_eq : Icc 0 ⌊log x / Real.log 2⌋₊ \\ {0} = Icc 1 ⌊log x / Real.log 2⌋₊ := ((fun {_} ↦ val_inj.mp) rfl).symm\n simpa [h_eq, theta, psi] using psi_eq_sum_theta hx.le\n\n@[blueprint\n \"costa-pereira-sublemma-1-2\"\n (title := \"Costa-Pereira Sublemma 1.2\")\n (statement := /-- For every $x > 0$ and $n$ we have $\\psi(x^{1/n}) = \\sum_{k \\geqslant 1} \\theta(x^{1/nk})$. -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-1} and substitution.-/)\n (latexEnv := \"sublemma\")\n (discussion := 677)]\n","line":55,"end_line":65,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-5","label":"costa-pereira-sublemma-1-5","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["costa-pereira-sublemma-1-2"],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\[ \\psi (x^{1/3}) = \\sum _{k \\geqslant 1} \\theta (x^{1/(6k-3)}) + \\sum _{k \\geqslant 1} \\theta (x^{1/(6k)}). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_5","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_5","lean_decl_name":"CostaPereira.sublemma_1_5","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":" (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-6} and the fact that $\\theta$ is an increasing function. -/)\n (latexEnv := \"sublemma\")\n (discussion := 682)]\ntheorem sublemma_1_7 {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≤\n ψ (x ^ (1 / 2:ℝ)) +\n ψ (x ^ (1 / 3:ℝ)) +\n ∑' (k : ℕ), θ (x ^ (1 / (5 * (k:ℝ)))) := by sorry\n\n@[blueprint\n \"costa-pereira-sublemma-1-8\"\n (title := \"Costa-Pereira Sublemma 1.8\")\n (statement := /-- For every $x > 0$ we have\n \\[\n \\psi(x) - \\theta(x) \\geqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\sum_{k \\geqslant 1} \\theta(x^{1/7k}\n \\]\n -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-6} and the fact that $\\theta$ is an increasing function. -/)\n (latexEnv := \"sublemma\")\n (discussion := 683)]\ntheorem sublemma_1_8 {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≥\n ψ (x ^ (1 / 2:ℝ)) +\n ψ (x ^ (1 / 3:ℝ)) +\n ∑' (k : ℕ), θ (x ^ (1 / (7 * (k:ℝ)))) := by sorry\n\n@[blueprint\n \"costa-pereira-theorem-1a\"\n (title := \"Costa-Pereira Theorem 1a\")\n (statement := /-- For every $x > 0$ we have\n $\\psi(x) - \\theta(x) \\leqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\psi(x^{1/5})$. -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-7} and Sublemma \\ref{costa-pereira-sublemma-1-2}. -/)\n (latexEnv := \"theorem\")\n (discussion := 684)]\ntheorem theorem_1a {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≤ ψ (x ^ (1 / 2 : ℝ)) + ψ (x ^ (1 / 3 : ℝ)) + ψ (x ^ (1 / 5 : ℝ)) := by\n rw [show ψ (x ^ (1 / 5 : ℝ)) = ∑' k : ℕ, θ (x ^ (1 / (5 * (k : ℝ)))) from by\n simp only [sublemma_1_1 <| rpow_pos_of_pos hx .., ← rpow_mul hx.le]; congr! 2; field_simp]\n exact sublemma_1_7 hx\n\n@[blueprint\n \"costa-pereira-theorem-1b\"\n (title := \"Costa-Pereira Theorem 1b\")\n (statement := /-- For every $x > 0$ we have\n $\\psi(x) - \\theta(x) \\geqslant \\psi(x^{1/2}) + \\psi(x^{1/3}) + \\psi(x^{1/7})$. -/)\n (proof := /-- Follows from Sublemma \\ref{costa-pereira-sublemma-1-8} and Sublemma \\ref{costa-pereira-sublemma-1-2}. -/)\n (latexEnv := \"theorem\")\n (discussion := 685)]\ntheorem theorem_1b {x : ℝ} (hx : 0 < x) :\n ψ x - θ x ≥ ψ (x ^ (1 / 2:ℝ)) + ψ (x ^ (1 / 3:ℝ)) + ψ (x ^ (1 / 7:ℝ)) := by\n rw [show ψ (x ^ (1 / 7 : ℝ)) = ∑' k : ℕ, θ (x ^ (1 / (7 * (k : ℝ)))) from by\n simp only [sublemma_1_1 <| rpow_pos_of_pos hx .., ← rpow_mul hx.le]; congr! 2; field_simp]\n exact sublemma_1_8 hx\n\nend CostaPereira\n","line":144,"end_line":209,"proof_status":"formalized"} {"id":"smooth-ury","label":"smooth-ury","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(I\\) is a closed interval contained in an open interval \\(J\\), then there exists a smooth function \\(\\Psi : \\mathbb {R}\\to \\mathbb {R}\\) with \\(1_I \\leq \\Psi \\leq 1_J\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/smooth_urysohn","latex_link":"sect0002.html#smooth-ury","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/smooth_urysohn","lean_decl_name":"smooth_urysohn","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"Smooth Urysohn lemma\")\n (statement := /--\n If $I$ is a closed interval contained in an open interval $J$, then there exists a smooth\n function $\\Psi: \\R \\to \\R$ with $1_I \\leq \\Psi \\leq 1_J$.\n -/)\n (proof := /--\n A standard analysis lemma, which can be proven by convolving $1_K$ with a smooth approximation\n to the identity for some interval $K$ between $I$ and $J$. Note that we have\n ``SmoothBumpFunction''s on smooth manifolds in Mathlib, so this shouldn't be too hard...\n -/)\n (latexEnv := \"lemma\")]\nlemma smooth_urysohn (a b c d : ℝ) (h1 : a < b) (h3 : c < d) : ∃ Ψ : ℝ → ℝ,\n (ContDiff ℝ ∞ Ψ) ∧ (HasCompactSupport Ψ) ∧\n Set.indicator (Set.Icc b c) 1 ≤ Ψ ∧ Ψ ≤ Set.indicator (Set.Ioo a d) 1 := by\n\n obtain ⟨ψ, l1, l2, l3, l4, -⟩ := smooth_urysohn_support_Ioo h1 h3\n refine ⟨ψ, l1, l2, l3, l4⟩\n\n\n","line":1193,"end_line":1211,"proof_status":"formalized"} {"id":"fks-proposition-3-4","label":"fks-proposition-3-4","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta","Epsi-def"],"nlp_text":"Let \\(x {\\gt} e^{50}\\) and \\(3 \\log x {\\lt} T {\\lt} \\sqrt{x}/3\\). Then \\(E_\\psi (x) ≤ \\sum _{|\\gamma | {\\lt} T} |x^{\\rho -1}/\\rho | + 2 \\log ^2 x / T\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_4","latex_link":"primary-chapter.html#fks-proposition-3-4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.proposition_3_4","lean_decl_name":"FKS.proposition_3_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-proposition-3-4\"\n (title := \"FKS Proposition 3.4\")\n (statement := /--\n Let $x > e^{50}$ and $3 \\log x < T < \\sqrt{x}/3$. Then\n $E_\\psi(x) ≤ \\sum_{|\\gamma| < T} |x^{\\rho-1}/\\rho| + 2 \\log^2 x / T$.\n -/)]\ntheorem proposition_3_4 {x T : ℝ} (hx : x > exp 50)\n (hT : T ∈ Set.Ioo (3 * log x) (sqrt x / 3)) :\n Eψ x ≤ riemannZeta.zeroes_sum (Set.Ioo 0 1) (Set.Ioo (-T) T)\n (fun ρ ↦ ‖x ^ (ρ - 1) / ρ‖) + ε₁ x T := by sorry\n","line":315,"end_line":325,"proof_status":"formalized"} {"id":"Dusart_prop_5_4","label":"Dusart_prop_5_4","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"There exists a constant \\(X_0\\) (one may take \\(X_0 = 89693\\)) with the following property: for every real \\(x \\geq X_0\\), there exists a prime \\(p\\) with \\[ x {\\lt} p \\le x\\Bigl(1 + \\frac{1}{\\log ^3 x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_4","latex_link":"secondary-chapter.html#Dusart_prop_5_4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_4","lean_decl_name":"Dusart.proposition_5_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_5_4\"\n (title := \"Dusart Proposition 5.4\")\n (statement := /--\n There exists a constant $X_0$ (one may take $X_0 = 89693$) with the following property:\n for every real $x \\geq X_0$, there exists a prime $p$ with\n \\[\n x < p \\le x\\Bigl(1 + \\frac{1}{\\log^3 x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_5_4 : HasPrimeInInterval.log_thm 89693 3 := sorry\n","line":331,"end_line":341,"proof_status":"formalized"} {"id":"lem:choose-qi","label":"choose-qi","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Dusart_prop_5_4"],"nlp_text":"Let \\(n \\ge X_0^2\\). Then there exist primes \\(q_1 {\\lt} q_2 {\\lt} q_3\\) with \\[ q_{4-i} \\ge n \\Bigl(1 + \\frac{1}{\\log ^3 \\sqrt{n}}\\Bigr)^{-i} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.exists_q_primes","latex_link":"tertiary-chapter.html#lem:choose-qi","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.exists_q_primes","lean_decl_name":"Lcm.exists_q_primes","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":" (statement := /--\n With \\(p_i,q_i\\) as in Lemmas~\\ref{lem:choose-pi} and \\ref{lem:choose-qi}, we have\n \\begin{equation}\\label{eq:pq-ratio}\n 1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\n \\ge\n 1 - \\frac{4 \\bigl(1 + \\frac{1}{\\log^3 \\sqrt{n}}\\bigr)^{12}}{n^{3/2}}.\n \\end{equation}\n -/)\n (proof := /--\n We have \\(p_i \\le \\sqrt{n} (1+1/\\log^3 \\sqrt{n})^i\\), so\n \\[\n p_1 p_2 p_3 \\le n^{3/2} \\bigl(1 + \\tfrac{1}{\\log^3 \\sqrt{n}}\\bigr)^{6}.\n \\]\n Similarly, \\(q_i \\ge n(1+1/\\log^3 \\sqrt{n})^{-i}\\), so\n \\[\n q_1 q_2 q_3 \\ge n^3 \\bigl(1 + \\tfrac{1}{\\log^3 \\sqrt{n}}\\bigr)^{-6}.\n \\]\n Combining,\n \\[\n \\frac{p_1 p_2 p_3}{q_1 q_2 q_3} \\le\n \\frac{n^{3/2} \\bigl(1 + \\frac{1}{\\log^3 \\sqrt{n}}\\bigr)^{6}}{n^3\n \\bigl(1 + \\frac{1}{\\log^3\\sqrt{n}}\\bigr)^{-6}}\n = \\frac{\\bigl(1 + \\frac{1}{\\log^3 \\sqrt{n}}\\bigr)^{12}}{n^{3/2}}.\n \\]\n This implies \\eqref{eq:pq-ratio}.\n -/)\n (latexEnv := \"lemma\")\n (discussion := 534)]\ntheorem pq_ratio_ge {n : ℕ} (hn : n ≥ X₀ ^ 2) :\n 1 - ((4 : ℝ) * ∏ i, ((exists_p_primes hn).choose i : ℝ))\n / ∏ i, ((exists_q_primes hn).choose i : ℝ) ≥\n 1 - 4 * (1 + 1 / (log √(n : ℝ)) ^ 3) ^ 12 / n ^ (3 / 2 : ℝ) := by\n have l1 : ((1 + 1 / Real.log √n ^ 3) ^ 12 / n ^ (3 / 2 : ℝ)) =\n (n ^ (3 / 2 : ℝ) * (1 + 1 / Real.log √n ^ 3) ^ 6) /\n (n ^ (3 : ℝ) * (1 + 1 / Real.log √n ^ 3) ^ (- 6 : ℝ)) := by\n rw [rpow_neg (hε_pos hn).le, ← div_eq_mul_inv, div_div_eq_mul_div, mul_assoc,\n mul_comm, ← rpow_natCast, ← rpow_natCast (n := 6), ← rpow_add (hε_pos hn),\n ← div_div_eq_mul_div]\n · congr\n · grind\n · rw [← rpow_sub (by norm_cast; linarith)]; grind\n have l2 : n ^ (3 / 2 : ℝ) * (1 + 1 / Real.log √n ^ 3) ^ 6 = ∏ i : Fin 3,\n √n * (1 + 1 / Real.log √n ^ 3) ^ ((i : ℝ) + 1) := by\n rw [← Finset.pow_card_mul_prod, Fin.prod_univ_three, ← rpow_add (hε_pos hn),\n ← rpow_add (hε_pos hn), rpow_div_two_eq_sqrt _ (by linarith)]\n norm_num\n have l3 : n ^ (3 : ℝ) * (1 + 1 / Real.log √n ^ 3) ^ (- 6 : ℝ) =\n ∏ i : Fin 3, n * (1 + 1 / Real.log √n ^ 3) ^ (-((3 : ℝ) - i.1)) := by\n rw [← Finset.pow_card_mul_prod, Fin.prod_univ_three, ← rpow_add (hε_pos hn),\n ← rpow_add (hε_pos hn)]\n norm_num\n rw [← mul_div_assoc', ← mul_div_assoc', l1, l2, l3]\n gcongr\n · have := hε_pos hn\n exact Finset.prod_nonneg fun _ _ => by positivity\n · exact Finset.prod_pos fun _ _ => by positivity [hε_pos hn]\n · exact (exists_p_primes hn).choose_spec.2.2.1 _\n · exact fun _ _ => by positivity [hε_pos hn]\n · exact (exists_q_primes hn).choose_spec.2.2.1 _\n\nblueprint_comment /--\n\\subsection{Reduction to a small epsilon-inequality}\n-/\n\n@[blueprint\n \"lem:eps-bounds\"\n (title := \"Uniform bounds for large \\\\(n\\\\)\")\n (statement := /--\n For all \\(n \\ge X_0^2 = 89693^2\\) we have\n \\[\n \\frac{1}{\\log^3 \\sqrt{n}}\n \\le 0.000675,\n \\qquad\n \\frac{1}{n^{3/2}} \\le \\frac{1}{89693}\\cdot\\frac{1}{n}.\n \\]\n and\n \\[ \\frac{1}{n+\\sqrt{n}} \\ge \\frac{1}{1 + 1/89693}\\cdot\\frac{1}{n}. \\]\n -/)\n (proof := /-- This is a straightforward calculus and monotonicity check: the left-hand sides are\n decreasing in \\(n\\) for \\(n \\ge X_0^2\\), and equality (or the claimed upper bound) holds at\n \\(n=X_0^2\\). One can verify numerically or symbolically. -/)\n (latexEnv := \"lemma\")]\ntheorem inv_cube_log_sqrt_le {n : ℕ} (hn : n ≥ X₀ ^ 2) :\n 1 / (log √(n : ℝ)) ^ 3 ≤ 0.000675 := by\n calc\n 1 / Real.log √n ^ 3 ≤ 1 / Real.log X₀ ^ 3 := by\n gcongr\n exact Real.le_sqrt_of_sq_le (mod_cast hn)\n _ ≤ _ := by\n grw [← log_X₀_gt.le]\n norm_num\n\n@[blueprint\n \"lem:eps-bounds\"\n (title := \"Uniform bounds for large \\\\(n\\\\)\")\n (statement := /--\n For all \\(n \\ge X_0^2 = 89693^2\\) we have\n \\[\n \\frac{1}{\\log^3 \\sqrt{n}}\n \\le 0.000675,\n \\qquad\n \\frac{1}{n^{3/2}} \\le \\frac{1}{89693}\\cdot\\frac{1}{n}.\n \\]\n and\n \\[ \\frac{1}{n+\\sqrt{n}} \\ge \\frac{1}{1 + 1/89693}\\cdot\\frac{1}{n}. \\]\n -/)\n (proof := /-- This is a straightforward calculus and monotonicity check: the left-hand sides are\n decreasing in \\(n\\) for \\(n \\ge X_0^2\\), and equality (or the claimed upper bound) holds at\n \\(n=X_0^2\\). One can verify numerically or symbolically. -/)\n (latexEnv := \"lemma\")]\ntheorem inv_n_pow_3_div_2_le {n : ℕ} (hn : n ≥ X₀ ^ 2) :\n 1 / ((n : ℝ) ^ (3 / 2 : ℝ)) ≤ (1 / (89693 : ℝ)) * (1 / (n : ℝ)) := by\n have hn_pos : (0 : ℝ) < n := cast_pos.mpr (lt_of_lt_of_le (by grind) hn)\n rw [one_div_mul_one_div, one_div_le_one_div (rpow_pos_of_pos hn_pos _)\n (mul_pos (by norm_num) hn_pos), show (3 / 2 : ℝ) = 1 + 1 / 2 by ring,\n rpow_add hn_pos, rpow_one, mul_comm, ← sqrt_eq_rpow]\n refine mul_le_mul_of_nonneg_left ?_ hn_pos.le\n have := Real.sqrt_le_sqrt (cast_le.mpr hn)\n simp_all\n\n@[blueprint\n \"lem:eps-bounds\"\n (title := \"Uniform bounds for large \\\\(n\\\\)\")\n (statement := /--\n For all \\(n \\ge X_0^2 = 89693^2\\) we have\n \\[\n \\frac{1}{\\log^3 \\sqrt{n}}\n \\le 0.000675,\n \\qquad\n \\frac{1}{n^{3/2}} \\le \\frac{1}{89693}\\cdot\\frac{1}{n}.\n \\]\n and\n \\[ \\frac{1}{n+\\sqrt{n}} \\ge \\frac{1}{1 + 1/89693}\\cdot\\frac{1}{n}. \\]\n -/)\n (proof := /-- This is a straightforward calculus and monotonicity check: the left-hand sides are\n decreasing in \\(n\\) for \\(n \\ge X_0^2\\), and equality (or the claimed upper bound) holds at\n \\(n=X_0^2\\). One can verify numerically or symbolically. -/)\n (latexEnv := \"lemma\")\n (discussion := 511)]\ntheorem inv_n_add_sqrt_ge {n : ℕ} (hn : n ≥ X₀ ^ 2) :\n 1 / (n + √(n : ℝ)) ≥ (1 / (1 + 1 / (89693 : ℝ))) * (1 / (n : ℝ)) := by\n field_simp\n have : 89693 ≤ √n := by grw [hn]; simp\n linear_combination √n * this + sq_sqrt (cast_nonneg n)\n\n@[blueprint\n \"lem:poly-ineq\"\n (title := \"Polynomial approximation of the inequality\")\n","line":1069,"end_line":1216,"proof_status":"formalized"} {"id":"lem:choose-pi","label":"choose-pi","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Dusart_prop_5_4"],"nlp_text":"Let \\(n \\ge X_0^2\\). Set \\(x := \\sqrt{n}\\). Then there exist primes \\(p_1,p_2,p_3\\) with \\[ p_i \\le x \\Bigl(1 + \\frac{1}{\\log ^3 x}\\Bigr)^i \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.exists_p_primes","latex_link":"tertiary-chapter.html#lem:choose-pi","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.exists_p_primes","lean_decl_name":"Lcm.exists_p_primes","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":" \\Bigl(\n 1 + \\frac{1}{\\bigl(1 + \\frac{1}{\\log^3 \\sqrt{n}}\\bigr)^{2i} (n + \\sqrt{n})}\n \\Bigr).\n \\end{equation}\n -/)\n (proof := /--\n By Lemma~\\ref{lem:choose-pi}, \\(p_i \\le \\sqrt{n} (1+1/\\log^3\\sqrt{n})^i\\). Hence\n \\[\n p_i^2 \\le n\\bigl(1 + \\tfrac{1}{\\log^3 \\sqrt{n}}\\bigr)^{2i}\n \\quad\\text{and}\\quad\n p_i+1 \\le p_i(1 + 1/\\sqrt{n}) \\le (1+1/\\sqrt{n}) p_i.\n \\]\n From these one gets\n \\[\n p_i(p_i+1) \\le \\bigl(1 + \\tfrac{1}{\\log^3 \\sqrt{n}}\\bigr)^{2i} (n + \\sqrt{n}),\n \\]\n and hence\n \\[\n \\frac{1}{p_i(p_i+1)} \\ge\n \\frac{1}{\\bigl(1 + \\tfrac{1}{\\log^3 \\sqrt{n}}\\bigr)^{2i} (n + \\sqrt{n})}.\n \\]\n Taking \\(1+\\cdot\\) and multiplying over \\(i=1,2,3\\) gives \\eqref{eq:pi-lower}.\n -/)\n (latexEnv := \"lemma\")]\ntheorem prod_p_ge {n : ℕ} (hn : n ≥ X₀ ^ 2) :\n ∏ i, (1 + (1 : ℝ) /\n ((exists_p_primes hn).choose i * ((exists_p_primes hn).choose i + 1))) ≥\n ∏ i : Fin 3,\n (1 + 1 / ((1 + 1 / (log √(n : ℝ)) ^ 3) ^ (2 * (i : ℕ) + 2 : ℝ) * (n + √n))) := by\n refine Finset.prod_le_prod (fun i _ => by positivity [hlog hn]) fun i _ => ?_\n set p := (exists_p_primes hn).choose\n have h₀ (i) : √n < p i := by\n have : p 0 ≤ p i := by\n apply (exists_p_primes hn).choose_spec.2.1.monotone\n simp\n grw [← this]\n exact (exists_p_primes hn).choose_spec.2.2.2\n gcongr 1 + 1 / ?_\n · have := ((exists_p_primes hn).choose_spec.1 i).pos\n positivity\n have : p i ≤ √n * (1 + 1 / log √n ^ 3) ^ (i + 1 : ℝ) :=\n (exists_p_primes hn).choose_spec.2.2.1 i\n have h₁ : p i ^ 2 ≤ n * (1 + 1 / log √n ^ 3) ^ (2 * i + 2 : ℝ) := by\n grw [this, mul_pow, sq_sqrt (by simp)]\n norm_cast\n rw [← pow_mul]\n grind\n have h₂ : p i + 1 ≤ p i * (1 / n * (n + √n)) := by\n field_simp [this]\n linear_combination √n * h₀ i - sq_sqrt (cast_nonneg n)\n grw [h₂, ← mul_assoc, ← sq, h₁]\n field_simp\n rfl\n\n","line":1012,"end_line":1065,"proof_status":"formalized"} {"id":"lem:pq-ratio","label":"pq-ratio","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["lem:choose-qi","lem:choose-pi"],"nlp_text":"With \\(p_i,q_i\\) as in Lemmas 10.1.9 and 10.1.10, we have \\begin{equation} \\label{eq:pq-ratio} 1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3} \\ge 1 - \\frac{4 \\bigl(1 + \\frac{1}{\\log ^3 \\sqrt{n}}\\bigr)^{12}}{n^{3/2}}. \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.pq_ratio_ge","latex_link":"tertiary-chapter.html#lem:pq-ratio","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.pq_ratio_ge","lean_decl_name":"Lcm.pq_ratio_ge","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"noncomputable def Criterion.mk' {n : ℕ} (hn : n ≥ X₀ ^ 2) : Criterion where\n n := n\n p := (exists_p_primes hn).choose\n q := (exists_q_primes hn).choose\n hn := le_trans (by decide : 1 ≤ 89693 ^ 2) hn\n hp := (exists_p_primes hn).choose_spec.1\n hp_mono := (exists_p_primes hn).choose_spec.2.1\n hq := (exists_q_primes hn).choose_spec.1\n hq_mono := (exists_q_primes hn).choose_spec.2.1\n h_ord_1 := (exists_p_primes hn).choose_spec.2.2.2\n h_ord_2 := by\n have hn_pos : (0 : ℝ) < n := by positivity\n have hp' : ((exists_p_primes hn).choose 2 : ℝ) ≤ √n * (1 + 1 / (log √n) ^ 3) ^ 3 := by\n convert (exists_p_primes hn).choose_spec.2.2.1 2 using 2; norm_cast\n have hq' : n * (1 + 1 / (log √n) ^ 3) ^ (-3 : ℝ) ≤ (exists_q_primes hn).choose 0 := by\n convert (exists_q_primes hn).choose_spec.2.2.1 0 using 2\n norm_num\n have hε_pos := hε_pos hn\n have hmid :\n √n * (1 + 1 / (log √n) ^ 3) ^ 3 < n * (1 + 1 / (log √n) ^ 3) ^ (-3 : ℝ) := by\n norm_cast\n norm_num [rpow_neg_one] at *\n rw [← div_eq_mul_inv, lt_div_iff₀ <| pow_pos hε_pos 3]\n have : (1 + ((log √n) ^ 3)⁻¹) ^ 6 < 2 :=\n calc (1 + ((log √n) ^ 3)⁻¹) ^ 6 < (1 + (11 ^ 3 : ℝ)⁻¹) ^ 6 := by gcongr; linarith [hlog hn]\n _ ≤ 2 := by norm_num\n nlinarith [mul_self_sqrt (Nat.cast_nonneg n), hsqrt_ge hn]\n exact_mod_cast hp'.trans_lt <| hmid.trans_le hq'\n h_ord_3 := (exists_q_primes hn).choose_spec.2.2.2\n h_crit := by\n have hn₀ : 0 ≤ Real.log √n := by\n grw [hn]\n simp [log_nonneg]\n have h₁ : 1 - (4 : ℝ) *\n (∏ i, (exists_p_primes hn).choose i : ℝ) / ∏ i, ((exists_q_primes hn).choose i : ℝ) ≥\n 1 - 4 * (1 + 0.000675) ^ 12 * ((1 / 89693) * (1 / n)) := by\n grw [pq_ratio_ge hn, inv_cube_log_sqrt_le hn, ← inv_n_pow_3_div_2_le hn]\n simp [field]\n have : 0 ≤ 1 - 4 * (1 + 0.000675 : ℝ) ^ 12 * ((1 / 89693) * (1 / n)) := by\n grw [hn]\n norm_num\n have := this.trans h₁\n have hn' : (0 : ℝ) ≤ 1 / ↑n ∧ (1 : ℝ) / ↑n ≤ 1 / 89693 ^ 2 := ⟨by simp, by grw [hn]; simp⟩\n grw [Lcm.prod_q_ge hn, Lcm.prod_p_ge hn, h₁]\n simp_rw [div_eq_mul_one_div (_ ^ (_ : ℝ) : ℝ) (n : ℝ),\n show 3 / (8 * n : ℝ) = 3 / 8 * (1 / n) by field_simp, ← one_div_mul_one_div]\n grw [inv_cube_log_sqrt_le hn, inv_n_add_sqrt_ge hn]\n set ε : ℝ := 1 / n\n calc\n _ ≤ ∏ i : Fin 3, (1 + (1 + 0.000675 : ℝ) ^ (i + 1 : ℝ) * ε) := by gcongr\n _ = ∏ i : Fin 3, (1 + (1.000675 : ℝ) ^ (i + 1 : ℝ) * ε) := by norm_num [div_eq_mul_inv]\n _ ≤ _ := (prod_epsilon_le (ε := ε) hn')\n _ ≤ _ := final_comparison hn'\n _ ≤ _ := by\n grw [← prod_epsilon_ge hn']\n apply le_of_eq\n simp [field]\n ring_nf\n\nblueprint_comment /--\n\\subsection{Conclusion for large \\(n\\)}\n-/\n","line":1330,"end_line":1391,"proof_status":"formalized"} {"id":"mun","label":"mun","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have \\(|\\sum _{n \\leq x} \\frac{\\mu (n)}{n}| \\leq 1\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/sum_mobius_div_self_le","latex_link":"sect0005.html#mun","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/sum_mobius_div_self_le","lean_decl_name":"sum_mobius_div_self_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n \"mun\"\n (statement := /-- We have $|\\sum_{n \\leq x} \\frac{\\mu(n)}{n}| \\leq 1$. -/)\n (proof := /--\n From M\\\"obius inversion $1_{n=1} = \\sum_{d|n} \\mu(d)$ and summing we have\n $$ 1 = \\sum_{d \\leq x} \\mu(d) \\lfloor \\frac{x}{d} \\rfloor$$\n for any $x \\geq 1$. Since $\\lfloor \\frac{x}{d} \\rfloor = \\frac{x}{d} - \\epsilon_d$ with\n $0 \\leq \\epsilon_d < 1$ and $\\epsilon_x = 0$, we conclude that\n $$ 1 ≥ x \\sum_{d \\leq x} \\frac{\\mu(d)}{d} - (x - 1)$$\n and the claim follows.\n -/)\n (latexEnv := \"proposition\")]\ntheorem sum_mobius_div_self_le (N : ℕ) : |∑ n ∈ range N, μ n / (n : ℚ)| ≤ 1 := by\n cases N with\n | zero => simp only [range_zero, sum_empty, abs_zero, zero_le_one]\n | succ N =>\n /- simple cases -/\n obtain rfl | hN := N.eq_zero_or_pos\n · simp\n /- annoying case -/\n have h_sum : 1 = (∑ d ∈ range (N + 1), (μ d / d : ℚ)) * N - ∑ d ∈ range (N + 1),\n μ d * Int.fract (N / d : ℚ) := calc\n (1 : ℚ) = ∑ m ∈ Ioc 0 N, ∑ d ∈ m.divisors, μ d := by\n have (x : ℕ) (hx : x ∈ Ioc 0 N) : ∑ d ∈ divisors x, μ d = if x = 1 then 1 else 0 := by\n rw [mem_Ioc] at hx\n rw [← coe_mul_zeta_apply, moebius_mul_coe_zeta, one_apply]\n rw [sum_congr rfl this]\n simp [hN.ne']\n _ = ∑ d ∈ range (N + 1), μ d * (N / d : ℕ) := by\n simp_rw [← coe_mul_zeta_apply, ArithmeticFunction.sum_Ioc_mul_zeta_eq_sum]\n rw [range_eq_Ico, ← Finset.insert_Ico_add_one_left_eq_Ico (add_one_pos _),\n sum_insert (by simp), Ico_add_one_add_one_eq_Ioc]\n simp\n _ = ∑ d ∈ range (N + 1), (μ d : ℚ) * ⌊(N / d : ℚ)⌋ := by\n simp_rw [Rat.floor_natCast_div_natCast]\n simp [← Int.natCast_ediv]\n _ = (∑ d ∈ range (N + 1), (μ d / d : ℚ)) * N - ∑ d ∈ range (N + 1),\n μ d * Int.fract (N / d : ℚ) := by\n simp_rw [sum_mul, ← sum_sub_distrib, mul_comm_div, ← mul_sub, Int.self_sub_fract]\n rw [eq_sub_iff_add_eq, eq_comm, ← eq_div_iff (by norm_num [Nat.pos_iff_ne_zero.mp hN])] at h_sum\n\n /- Next, we establish bounds for the error term -/\n have hf' (d : ℕ) : |Int.fract ((N : ℚ) / d)| < 1 := by\n rw [abs_of_nonneg (Int.fract_nonneg _)]\n exact Int.fract_lt_one _\n have h_bound : |∑ d ∈ range (N + 1), μ d * Int.fract ((N : ℚ) / d)| ≤ N - 1 := by\n /- range (N + 1) → Icc 1 N + part that evals to 0 -/\n rw [range_eq_Ico, ← Finset.insert_Ico_add_one_left_eq_Ico (by simp), sum_insert (by simp),\n ArithmeticFunction.map_zero, Int.cast_zero, zero_mul, zero_add,\n Finset.Ico_add_one_right_eq_Icc, zero_add]\n /- Ico 1 (N + 1) → Ico 1 N ∪ {N + 1} that evals to 0 -/\n rw [← Ico_insert_right hN, sum_insert (by simp), div_self (by simp; grind), Int.fract_one,\n mul_zero, zero_add]\n /- bound sum -/\n have (d : ℕ) : |μ d * Int.fract ((N : ℚ) / d)| ≤ 1 := by\n rw [abs_mul, ← one_mul 1]\n refine mul_le_mul ?_ (hf' _).le (abs_nonneg _) zero_le_one\n norm_cast\n exact abs_moebius_le_one\n apply (abs_sum_le_sum_abs _ _).trans\n apply (sum_le_sum fun d _ ↦ this d).trans\n simp [cast_sub (one_le_iff_ne_zero.mpr hN.ne')]\n\n rw [h_sum, abs_le]\n rw [abs_le, neg_sub] at h_bound\n constructor\n <;> simp only [le_div_iff₀, div_le_iff₀, cast_pos.mpr hN]\n <;> linarith [h_bound.left]\n","line":1582,"end_line":1649,"proof_status":"formalized"} {"id":"Etheta-def","label":"Etheta-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"\\(E_\\theta (x) = |\\theta (x) - x| / x\\)","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eθ","latex_link":"secondary-chapter.html#Etheta-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eθ","lean_decl_name":"Eθ","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"Etheta-def\"\n (title := \"Equation (2) of FKS2\")\n (statement := /-- $E_\\theta(x) = |\\theta(x) - x| / x$ -/)]\nnoncomputable def Eθ (x : ℝ) : ℝ := |θ x - x| / x","line":131,"end_line":135,"proof_status":"formalized"} {"id":"buthe-theorem-2c","label":"buthe-theorem-2c","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Etheta-def"],"nlp_text":"If \\(1 \\leq x \\leq 10^{19}\\), then \\(x - \\vartheta (x) {\\gt} 0.05\\sqrt{x}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2c","latex_link":"secondary-chapter.html#buthe-theorem-2c","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2c","lean_decl_name":"Buthe.theorem_2c","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Buthe.lean","lean4_code":"@[blueprint\n \"buthe-theorem-2c\"\n (title := \"Buthe Theorem 2(c)\")\n (statement := /-- If $1 \\leq x \\leq 10^{19}$, then $x - \\vartheta(x) > 0.05\\sqrt{x}$. --/)\n (latexEnv := \"theorem\")]\ntheorem theorem_2c {x : ℝ} (hx1 : 1 ≤ x) (hx2 : x ≤ 10 ^ 19) :\n Eθ x ≥ 0.05 / sqrt x := by sorry\n","line":40,"end_line":46,"proof_status":"formalized"} {"id":"fks2-lemma-19","label":"fks2-lemma-19","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Etheta-def","li-def"],"nlp_text":"Let \\(x_1 {\\gt} x_0 \\geq 2\\), \\(N \\in \\mathbb {N}\\), and let \\((b_i)_{i=1}^N\\) be a finite partition of \\([x_0,x_1]\\). Then \\[ |\\int _{x_0}^{x_1} \\frac{\\theta (t)-t}{t \\log ^2 t}\\ dt| \\leq \\sum _{i=1}^{N-1} \\varepsilon _{\\theta ,num}(e^{b_i}) ( \\operatorname {Li}(e^{b_{i+1}}) - \\operatorname {Li}(e^{b_i}) + \\frac{e^{b_i}}{b_i} - \\frac{e^{b_{i+1}}}{b_{i+1}}). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_19","latex_link":"secondary-chapter.html#fks2-lemma-19","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_19","lean_decl_name":"FKS2.lemma_19","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" $\\varepsilon_{\\theta,\\mathrm{num}}$ gives computable admissible numerical bounds for\n $x = \\exp(b_i)$, for each $i=1,\\dots,N$. For $x_1 \\leq x_2 \\leq x_1 \\log x_1$, we define\n $$ \\mu_{num}(x_0,x_1,x_2) = \\frac{x_0 \\log x_1}{\\varepsilon_{\\theta,num}(x_0) x_1 \\log x_0}\n \\left|\\frac{\\pi(x_0) - \\Li(x_0)}{x_0/\\log x_0} - \\frac{\\theta(x_0) - x_0}{x_0}\\right|$$\n $$ + \\frac{\\log x_1}{\\varepsilon_{theta,num}(x_1) x_1} \\sum_{i=1}^{N-1}\n \\varepsilon_{\\theta,num}(\\exp(b_i))\n \\left( Li(e^{b_{i+1}}) - Li(e^{b_i}) + \\frac{e^{b_i}}{b_i} - \\frac{e^{b_{i+1}}}{b_{i+1}}\\right)$$\n $$ + \\frac{\\log x_2}{x_2}\n \\left( Li(x_2) - \\frac{x_2}{\\log x_2} - Li(x_1) + \\frac{x_1}{\\log x_1} \\right)$$\n and for $x_2 > x_1 \\log x_1$, including the case $x_2 = \\infty$, we define\n $$ \\mu_{num}(x_0,x_1,x_2) = \\frac{x_0 \\log x_1}{\\varepsilon_{\\theta,num}(x_1) x_1 \\log x_0}\n \\left|\\frac{\\pi(x_0) - \\Li(x_0)}{x_0/\\log x_0} - \\frac{\\theta(x_0) - x_0}{x_0}\\right|$$\n $$ + \\frac{\\log x_1}{\\varepsilon_{\\theta,num}(x_1) x_1} \\sum_{i=1}^{N-1}\n \\varepsilon_{\\theta,num}(\\exp(b_i))\n \\left( Li(e^{b_{i+1}}) - Li(e^{b_i}) + \\frac{e^{b_i}}{b_i} - \\frac{e^{b_{i+1}}}{b_{i+1}}\\right)$$\n $$ + \\frac{1}{\\log x_1 + \\log\\log x_1 - 1}.$$\n Then, for all $x_1 \\leq x \\leq x_2$ we have\n $$ E_\\pi(x) \\leq \\varepsilon_{\\pi,num}(x_1,x_2) :=\n \\varepsilon_{\\theta,num}(x_1)(1 + \\mu_{num}(x_0,x_1,x_2)).$$ -/)]\ntheorem theorem_6_alt {x₀ x₁ : ℝ} (h : x₁ ≥ max x₀ 14)\n {N : ℕ} (b : Fin (N + 1) → ℝ) (hmono : Monotone b)\n (h_b_start : b 0 = log x₀)\n (h_b_end : b (Fin.last N) = log x₁)\n (εθ_num : ℝ → ℝ)\n (h_εθ_num : Eθ.numericalBound x₁ εθ_num) (x : ℝ) (hx₁ : x₁ ≤ x) :\n Eπ x ≤ εθ_num x₁ * (1 + μ_num_2 b εθ_num x₀ x₁) :=\n sorry\n\n\n@[blueprint\n \"fks2-corollary-8\"\n (title := \"FKS2 Corollary 8\")\n (statement := /--\n Let $\\{b'_i\\}_{i=1}^M$ be a set of finite subdivisions of $[\\log(x_1),\\infty)$, with\n","line":537,"end_line":570,"proof_status":"statement_formalized"} {"id":"Dusart_thm_4_2","label":"Dusart_thm_4_2","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Etheta-def"],"nlp_text":"We have \\(|\\vartheta (x) - x| {\\lt} \\eta _k x / \\log ^k x\\) for \\(x \\geq x_k\\) with \\((k,\\eta _k,x_k)\\) given by the table in [ 9 , Theorem 4.2 ] .","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_4_2","latex_link":"secondary-chapter.html#Dusart_thm_4_2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_4_2","lean_decl_name":"Dusart.theorem_4_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_thm_4_2\"\n (title := \"Dusart Theorem 4.2\")\n (statement := /--\n We have $|\\vartheta(x) - x| < \\eta_k x / \\log^k x$ for $x \\geq x_k$ with $(k,\\eta_k,x_k)$ given by the table in \\cite[Theorem 4.2]{Dusart2018}.-/)\n (latexEnv := \"theorem\")]\ntheorem theorem_4_2 {k : ℕ} {ηk xk : ℝ} (h : (k, ηk, xk) ∈ Table_4_2) {x : ℝ} (hx : x ≥ xk) :\n Eθ x ≤ ηk / (log x) ^ k := by sorry\n","line":160,"end_line":166,"proof_status":"formalized"} {"id":"classical-bound-theta","label":"classical-bound-theta","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Etheta-def"],"nlp_text":"We say that \\(E_\\theta \\) satisfies a classical bound with parameters \\(A, B, C, R, x_0\\) if for all \\(x \\geq x_0\\) we have \\[ E_\\theta (x) \\leq A \\left(\\frac{\\log x}{R}\\right)^B \\exp \\left(-C \\left(\\frac{\\log x}{R}\\right)^{1/2}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eθ.classicalBound","latex_link":"secondary-chapter.html#classical-bound-theta","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eθ.classicalBound","lean_decl_name":"Eθ.classicalBound","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PrimaryDefinitions.lean","lean4_code":" (statement := /-- $E_ψ(x) = |ψ(x) - x| / x$ -/)]\nnoncomputable def Eψ (x : ℝ) : ℝ := |ψ x - x| / x\n\nnoncomputable def admissible_bound (A B C R : ℝ) (x : ℝ) := A * (log x / R) ^ B * exp (-C * (log x / R) ^ (1/2))\n\n@[blueprint\n \"classical-bound-psi\"\n (title := \"Definition 1, FKS2\")\n","line":30,"end_line":37,"proof_status":"formalized"} {"id":"buthe-theorem-2b","label":"buthe-theorem-2b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Etheta-def"],"nlp_text":"If \\(1423 \\leq x \\leq 10^{19}\\), then \\(x - \\vartheta (x) \\leq 1.95\\sqrt{x}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2b","latex_link":"secondary-chapter.html#buthe-theorem-2b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2b","lean_decl_name":"Buthe.theorem_2b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Buthe.lean","lean4_code":"@[blueprint\n \"buthe-theorem-2b\"\n (title := \"Buthe Theorem 2(b)\")\n (statement := /-- If $1423 \\leq x \\leq 10^{19}$, then $x - \\vartheta(x) \\leq 1.95\\sqrt{x}$. --/)\n (latexEnv := \"theorem\")]\ntheorem theorem_2b {x : ℝ} (hx1 : 1423 ≤ x) (hx2 : x ≤ 10 ^ 19) :\n Eθ x ≤ 1.95 / sqrt x := by sorry\n","line":32,"end_line":38,"proof_status":"formalized"} {"id":"ZetaNear1BndFilter","label":"ZetaNear1BndFilter","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"As \\(\\sigma \\to 1^+\\), \\[ |\\zeta (\\sigma )| \\ll 1/(\\sigma -1). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNear1BndFilter","latex_link":"sect0003.html#ZetaNear1BndFilter","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNear1BndFilter","lean_decl_name":"ZetaNear1BndFilter","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaNear1BndFilter\")\n (statement := /--\n As $\\sigma\\to1^+$,\n $$\n |\\zeta(\\sigma)| \\ll 1/(\\sigma-1).\n $$\n -/)\n (proof := /--\n Zeta has a simple pole at $s=1$. Equivalently, $\\zeta(s)(s-1)$ remains bounded near $1$.\n Lots of ways to prove this.\n Probably the easiest one: use the expression for $\\zeta_0 (N,s)$ with $N=1$ (the term $N^{1-s}/(1-s)$ being the only unbounded one).\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaNear1BndFilter :\n (fun σ : ℝ ↦ ζ σ) =O[𝓝[>](1 : ℝ)] (fun σ ↦ (1 : ℂ) / (σ - 1)) := by\n have := Tendsto_nhdsWithin_punctured_add (a := -1) (x := 1)\n simp only [add_neg_cancel, ← sub_eq_add_neg] at this\n have := riemannZeta_isBigO_near_one_horizontal.comp_tendsto this\n convert this using 1 <;> {ext; simp}\n","line":2398,"end_line":2417,"proof_status":"formalized"} {"id":"ZetaNear1BndExact","label":"ZetaNear1BndExact","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaNear1BndFilter"],"nlp_text":"There exists a \\(c{\\gt}0\\) such that for all \\(1 {\\lt} \\sigma ≤ 2\\), \\[ |\\zeta (\\sigma )| ≤ c/(\\sigma -1). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNear1BndExact","latex_link":"sect0003.html#ZetaNear1BndExact","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaNear1BndExact","lean_decl_name":"ZetaNear1BndExact","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaNear1BndExact\")\n (statement := /--\n There exists a $c>0$ such that for all $1 < \\sigma ≤ 2$,\n $$\n |\\zeta(\\sigma)| ≤ c/(\\sigma-1).\n $$\n -/)\n (proof := /--\n Split into two cases, use Lemma \\ref{ZetaNear1BndFilter} for $\\sigma$ sufficiently small\n and continuity on a compact interval otherwise.\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaNear1BndExact :\n ∃ (c : ℝ) (_ : 0 < c), ∀ (σ : ℝ) (_ : σ ∈ Ioc 1 2), ‖ζ σ‖ ≤ c / (σ - 1) := by\n have := ZetaNear1BndFilter\n rw [Asymptotics.isBigO_iff] at this\n obtain ⟨c, U, hU, V, hV, h⟩ := this\n obtain ⟨T, hT, T_open, h1T⟩ := mem_nhds_iff.mp hU\n obtain ⟨ε, εpos, hε⟩ := Metric.isOpen_iff.mp T_open 1 h1T\n simp only [Metric.ball] at hε\n replace hε : Ico 1 (1 + ε) ⊆ U := by\n refine subset_trans (subset_trans ?_ hε) hT\n intro x hx\n simp only [mem_Ico] at hx\n simp only [dist, abs_lt]\n exact ⟨by linarith, by linarith⟩\n let W := Icc (1 + ε) 2\n have W_compact : IsCompact {ofReal z | z ∈ W} :=\n IsCompact.image isCompact_Icc continuous_ofReal\n have cont : ContinuousOn ζ {ofReal z | z ∈ W} := by\n apply HasDerivAt.continuousOn (f' := ζ')\n intro σ hσ\n exact (differentiableAt_riemannZeta (by contrapose! hσ; simp [W, hσ, εpos])).hasDerivAt\n obtain ⟨C, hC⟩ := IsCompact.exists_bound_of_continuousOn W_compact cont\n let C' := max (C + 1) 1\n replace hC : ∀ (σ : ℝ), σ ∈ W → ‖ζ σ‖ < C' := by\n intro σ hσ\n simp only [lt_max_iff, C']\n have := hC σ\n simp only [mem_setOf_eq, ofReal_inj, exists_eq_right] at this\n exact Or.inl <| lt_of_le_of_lt (this hσ) (by norm_num)\n have Cpos : 0 < C' := by simp [C']\n use max (2 * C') c, (by simp [Cpos])\n intro σ ⟨σ_ge, σ_le⟩\n by_cases hσ : σ ∈ U ∩ V\n · simp only [← h, mem_setOf_eq] at hσ\n apply le_trans hσ ?_\n norm_cast\n have : 0 ≤ 1 / (σ - 1) := by apply one_div_nonneg.mpr; linarith\n simp only [Real.norm_eq_abs, abs_eq_self.mpr this, mul_div, mul_one]\n exact div_le_div₀ (by simp [Cpos.le]) (by simp) (by linarith) (by rfl)\n · replace hσ : σ ∈ W := by\n simp only [mem_inter_iff, hV σ_ge, and_true] at hσ\n simp only [mem_Icc, σ_le, and_true, W]\n contrapose! hσ; exact hε ⟨σ_ge.le, hσ⟩\n apply le_trans (hC σ hσ).le ((le_div_iff₀ (by linarith)).mpr ?_)\n rw [le_max_iff, mul_comm 2]; exact Or.inl <| mul_le_mul_of_nonneg_left (by linarith) Cpos.le\n","line":2419,"end_line":2476,"proof_status":"formalized"} {"id":"MellinOf1","label":"MellinOf1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The Mellin transform of \\(1_{(0,1]}\\) is \\[ \\mathcal{M}(1_{(0,1]})(s) = \\frac{1}{s}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOf1","latex_link":"sect0003.html#MellinOf1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOf1","lean_decl_name":"MellinOf1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOf1\")\n (statement := /--\n The Mellin transform of $1_{(0,1]}$ is\n $$\\mathcal{M}(1_{(0,1]})(s) = \\frac{1}{s}.$$\n -/)\n (proof := /-- This is a straightforward calculation. -/)]\nlemma MellinOf1 (s : ℂ) (h : s.re > 0) :\n 𝓜 ((fun x ↦ if 0 < x ∧ x ≤ 1 then 1 else 0)) s = 1 / s := by\n convert (hasMellin_one_Ioc h).right\n congr\n","line":767,"end_line":777,"proof_status":"formalized"} {"id":"riemannZeta0","label":"riemannZeta0","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any natural \\(N\\ge 1\\), we define \\[ \\zeta _0(N,s) := \\sum _{1\\le n \\le N} \\frac1{n^s} + \\frac{- N^{1-s}}{1-s} + \\frac{-N^{-s}}{2} + s \\int _N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta0","latex_link":"sect0003.html#riemannZeta0","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta0","lean_decl_name":"riemannZeta0","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"riemannZeta0\")\n (statement := /--\n For any natural $N\\ge1$, we define\n $$\n \\zeta_0(N,s) :=\n \\sum_{1\\le n \\le N} \\frac1{n^s}\n +\n \\frac{- N^{1-s}}{1-s} + \\frac{-N^{-s}}{2} + s \\int_N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx\n $$\n -/)]\nnoncomputable def riemannZeta0 (N : ℕ) (s : ℂ) : ℂ :=\n (∑ n ∈ Finset.range (N + 1), 1 / (n : ℂ) ^ s) +\n (- N ^ (1 - s)) / (1 - s) + (- N ^ (-s)) / 2\n + s * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)\n","line":675,"end_line":689,"proof_status":"formalized"} {"id":"HolomorphicOn_riemannZeta0","label":"HolomorphicOn_riemannZeta0","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["riemannZeta0"],"nlp_text":"For any \\(N\\ge 1\\), the function \\(\\zeta _0(N,s)\\) is holomorphic on \\(\\{ s\\in \\mathbb {C}\\mid \\Re (s){\\gt}0 ∧ s \\ne 1\\} \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/HolomorphicOn_riemannZeta0","latex_link":"sect0003.html#HolomorphicOn_riemannZeta0","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/HolomorphicOn_riemannZeta0","lean_decl_name":"HolomorphicOn_riemannZeta0","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"HolomorphicOn-riemannZeta0\")\n (statement := /--\n For any $N\\ge1$, the function $\\zeta_0(N,s)$ is holomorphic on $\\{s\\in \\C\\mid \\Re(s)>0 ∧ s \\ne 1\\}$.\n -/)\n (proof := /--\n The function $\\zeta_0(N,s)$ is a finite sum of entire functions, plus an integral\n that's absolutely convergent on $\\{s\\in \\C\\mid \\Re(s)>0 ∧ s \\ne 1\\}$ by Lemma \\ref{ZetaBnd_aux1b}.\n -/)]\nlemma HolomorphicOn_riemannZeta0 {N : ℕ} (N_pos : 0 < N) :\n HolomorphicOn (ζ₀ N) {s : ℂ | s ≠ 1 ∧ 0 < s.re} :=\n fun _ ⟨hs₁, hs₂⟩ ↦ (HasDerivAtZeta0 N_pos hs₂ hs₁).differentiableAt.differentiableWithinAt\n","line":1462,"end_line":1473,"proof_status":"formalized"} {"id":"costa-pereira-sublemma-1-1","label":"costa-pereira-sublemma-1-1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For every \\(x {\\gt} 0\\) we have \\(\\psi (x) = \\sum _{k \\geqslant 1} \\theta (x^{1/k})\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_1","latex_link":"secondary-chapter.html#costa-pereira-sublemma-1-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/CostaPereira.sublemma_1_1","lean_decl_name":"CostaPereira.sublemma_1_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/CostaPereira.lean","lean4_code":" \"costa-pereira-sublemma-1-1\"\n (title := \"Costa-Pereira Sublemma 1.1\")\n (statement := /-- For every $x > 0$ we have $\\psi(x) = \\sum_{k \\geqslant 1} \\theta(x^{1/k})$. -/)\n (proof := /-- This follows directly from the definitions of $\\psi$ and $\\theta$. -/)\n (latexEnv := \"sublemma\")\n (discussion := 676)]\ntheorem sublemma_1_1 {x : ℝ} (hx : 0 < x) : ψ x = ∑' (k : ℕ), θ (x ^ (1 / (k : ℝ))) := by\n have theta_zero_large_k : ∀ k, k ∉ Icc 0 ⌊log x / Real.log 2⌋₊ → θ (x ^ (1 / (k : ℝ))) = 0 := by\n intro k hk\n simp only [mem_Icc, zero_le, true_and, not_le] at hk\n apply theta_eq_zero_of_lt_two\n by_cases hk0 : k = 0\n · simp [hk0, CharP.cast_eq_zero, div_zero, rpow_zero, one_lt_ofNat]\n have hk_pos : (k : ℝ) > 0 := cast_pos.mpr <| pos_of_ne_zero hk0\n by_cases hx1 : x < 1\n · linarith [rpow_le_one hx.le hx1.le <| one_div_cast_nonneg k]\n have h1 : log x / Real.log 2 < k := by\n calc log x / Real.log 2 < ⌊log x / Real.log 2⌋₊ + 1 := lt_floor_add_one _\n _ ≤ k := by exact_mod_cast hk\n have : Real.log x < k * Real.log 2 := by linarith [(div_lt_iff₀ <| log_pos <| one_lt_two).mp h1]\n have : Real.log x < Real.log (2 ^ (k : ℕ)) := by rw [Real.log_pow]; exact this\n have : x < 2 ^ (k : ℕ) := (Real.log_lt_log_iff hx (by positivity)).mp this\n calc x ^ (1 / (k : ℝ)) = x ^ ((k : ℝ)⁻¹) := by rw [one_div]\n _ < (2 ^ (k : ℕ)) ^ ((k : ℝ)⁻¹) := rpow_lt_rpow hx.le this <| inv_pos.mpr hk_pos\n _ = 2 ^ ((k : ℕ) * (k : ℝ)⁻¹) := by rw [← rpow_natCast, ← rpow_mul <| zero_le_two]\n _ = 2 ^ (1 : ℝ) := by congr 1; field_simp\n _ = 2 := rpow_one 2\n rw [tsum_eq_sum (s := Icc 0 ⌊log x / Real.log 2⌋₊) theta_zero_large_k]\n by_cases hx1 : x < 1\n · have hpsi : ψ x = 0 := psi_eq_zero_of_lt_two (by linarith)\n refine hpsi ▸ (sum_eq_zero fun k _ ↦ theta_eq_zero_of_lt_two ?_).symm\n have h_exp_le : x ^ (1 / (k : ℝ)) ≤ 1 := by\n by_cases hk0 : k = 0\n · simp [hk0]\n · exact rpow_le_one hx.le hx1.le <| one_div_cast_nonneg k\n linarith\n rw [sum_eq_sum_diff_singleton_add (i := 0) <| insert_eq_self.mp rfl]\n have : θ (x ^ (1 / (0 : ℕ) : ℝ)) = 0 := by\n","line":16,"end_line":53,"proof_status":"formalized"} {"id":"finsum_range_eq_sum_range","label":"finsum_range_eq_sum_range","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any arithmetic function \\(f\\) and real number \\(x\\), one has \\[ \\sum _{n \\leq x} f(n) = \\sum _{n \\leq ⌊x⌋_+} f(n) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/finsum_range_eq_sum_range","latex_link":"sect0005.html#finsum_range_eq_sum_range","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/finsum_range_eq_sum_range","lean_decl_name":"finsum_range_eq_sum_range","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"@[blueprint\n (title := \"finsum-range-eq-sum-range\")\n (statement := /--\n For any arithmetic function $f$ and real number $x$, one has\n $$ \\sum_{n \\leq x} f(n) = \\sum_{n \\leq ⌊x⌋_+} f(n)$$\n and\n $$ \\sum_{n < x} f(n) = \\sum_{n < ⌈x⌉_+} f(n).$$\n -/)\n (proof := /-- Straightforward. -/)\n (latexEnv := \"lemma\")]\nlemma finsum_range_eq_sum_range {R : Type*} [AddCommMonoid R] {f : ArithmeticFunction R} (x : ℝ) :\n ∑ᶠ (n : ℕ) (_: n < x), f n = ∑ n ∈ range ⌈x⌉₊, f n := by\n apply finsum_cond_eq_sum_of_cond_iff f\n intros\n simp only [mem_range]\n exact Iff.symm Nat.lt_ceil\n","line":36,"end_line":51,"proof_status":"formalized"} {"id":"limitOfConstant","label":"limitOfConstant","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(a:\\mathbb {R}\\to \\mathbb {C}\\) be a function, and let \\(\\sigma {\\gt}0\\) be a real number. Suppose that, for all \\(\\sigma , \\sigma '{\\gt}0\\), we have \\(a(\\sigma ')=a(\\sigma )\\), and that \\(\\lim _{\\sigma \\to \\infty }a(\\sigma )=0\\). Then \\(a(\\sigma )=0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limitOfConstant","latex_link":"sect0003.html#limitOfConstant","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limitOfConstant","lean_decl_name":"limitOfConstant","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"limitOfConstant\")\n (statement := /--\n Let $a:\\R\\to\\C$ be a function, and let $\\sigma>0$ be a real number. Suppose that, for all\n $\\sigma, \\sigma'>0$, we have $a(\\sigma')=a(\\sigma)$, and that\n $\\lim_{\\sigma\\to\\infty}a(\\sigma)=0$. Then $a(\\sigma)=0$.\n -/)\n (latexEnv := \"lemma\")]\nlemma limitOfConstant {a : ℝ → ℂ} {σ : ℝ} (σpos : 0 < σ)\n (ha : ∀ (σ' : ℝ) (σ'' : ℝ) (_ : 0 < σ') (_ : 0 < σ''), a σ' = a σ'')\n (ha' : Tendsto a atTop (𝓝 0)) : a σ = 0 := by\n /--\n \\begin{align*}\n \\lim_{\\sigma'\\to\\infty}a(\\sigma) &= \\lim_{\\sigma'\\to\\infty}a(\\sigma') \\\\\n &= 0\n \\end{align*}\n -/\n have := eventuallyEq_of_mem (mem_atTop σ) fun σ' h ↦ ha σ' σ (σpos.trans_le h) σpos\n exact tendsto_const_nhds_iff.mp (ha'.congr' this)\n","line":187,"end_line":205,"proof_status":"formalized"} {"id":"Dusart_prop_5_11a","label":"Dusart_prop_5_11a","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"We have for \\(p_k \\geq 10^{11}\\), \\[ \\vartheta (p_k) \\geq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2.050735}{\\log k}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_11a","latex_link":"secondary-chapter.html#Dusart_prop_5_11a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_11a","lean_decl_name":"Dusart.proposition_5_11a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_5_11a\"\n (title := \"Dusart Proposition 5.11\")\n (statement := /--\n We have for $p_k \\geq 10^{11}$,\n \\[\n \\vartheta(p_k) \\geq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2.050735}{\\log k}.\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_5_11a {k : ℕ} (hk : nth Nat.Prime k ≥ 10 ^ 11) :\n θ (nth Nat.Prime k) ≥ k * Real.log k + Real.log (Real.log k) - 1 + (Real.log (Real.log k) - 2.050735) / (Real.log k) := by sorry\n","line":432,"end_line":442,"proof_status":"formalized"} {"id":"logDerivResidue","label":"logDerivResidue","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["existsDifferentiableOn_of_bddAbove"],"nlp_text":"If \\(f\\) is holomorphic in a neighborhood of \\(p\\), and there is a simple pole at \\(p\\), then \\(f'/ f\\) has a simple pole at \\(p\\) with residue \\(-1\\): \\[ \\frac{f'(s)}{f(s)} = \\frac{-1}{s - p} + O(1). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/logDerivResidue","latex_link":"sect0003.html#logDerivResidue","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/logDerivResidue","lean_decl_name":"logDerivResidue","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"theorem logDerivResidue' {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ}\n (U_is_open : IsOpen U)\n (non_zero : ∀ x ∈ U \\ {p}, f x ≠ 0)\n (holc : HolomorphicOn f (U \\ {p}))\n (U_in_nhds : U ∈ 𝓝 p) {A : ℂ} (A_ne_zero : A ≠ 0)\n (f_near_p : BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (U \\ {p}))) :\n (deriv f * f⁻¹ + (fun s ↦ (s - p)⁻¹)) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by\n\n\n have simpleHolo : HolomorphicOn (fun s ↦ A / (s - p)) (U \\ {p}) := by\n apply DifferentiableOn.mono (t := {p}ᶜ)\n · apply DifferentiableOn.div\n · exact differentiableOn_const _\n · exact DifferentiableOn.sub differentiableOn_id (differentiableOn_const _)\n · exact fun x hx => by rw [sub_ne_zero]; exact hx\n · rintro s ⟨_, hs⟩ ; exact hs\n\n have f_minus_pole_is_holomorphic : HolomorphicOn (f - (fun s ↦ A * (s - p)⁻¹)) (U \\ {p}) := by\n exact (DifferentiableOn.sub_iff_right holc).mpr simpleHolo\n\n let ⟨g, ⟨g_is_holomorphic, g_is_f_minus_pole⟩⟩ := existsDifferentiableOn_of_bddAbove\n U_in_nhds f_minus_pole_is_holomorphic f_near_p\n\n /- TODO: Assert that the derivatives match too -/\n\n let h := (fun _ ↦ A) + g * (fun (s : ℂ) ↦ (s - p))\n\n\n have linear_is_holomorphic : HolomorphicOn (fun (s : ℂ ) ↦ (s - p)) U := by\n exact DifferentiableOn.sub_const differentiableOn_id p\n\n have h_is_holomorphic : HolomorphicOn h U := by\n have T := DifferentiableOn.mul g_is_holomorphic linear_is_holomorphic\n exact DifferentiableOn.const_add A T\n\n have h_continuous : ContinuousOn h U :=\n by exact DifferentiableOn.continuousOn h_is_holomorphic\n\n have deriv_h_identity : ∀x ∈ (U \\ {p}), (deriv h) x = f x + (deriv f x) * (x - p) := by\n intro x x_in_u_not_p\n have x_in_u : x ∈ U := by exact mem_of_mem_diff x_in_u_not_p\n have x_not_p : x ≠ p := by\n exact ((Set.mem_diff x).mp x_in_u_not_p).2\n\n have weird : U ∈ 𝓝 x := by\n exact IsOpen.mem_nhds (U_is_open) (x_in_u)\n\n rw [derivative_const_plus_product, ← g_is_f_minus_pole x_in_u_not_p,\n ← deriv_eqOn_of_eqOn_punctured _ _ U p U_is_open g_is_f_minus_pole x_in_u_not_p,\n deriv_f_minus_A_inv_sub_clean]\n · simp only [Pi.sub_apply]\n have := sub_ne_zero_of_ne x_not_p\n field_simp\n ring\n · apply holc.differentiableAt\n exact Filter.inter_mem weird <| compl_singleton_mem_nhds x_not_p\n · exact x_not_p\n · exact g_is_holomorphic.differentiableAt weird\n have h_identity : ∀x ∈ (U \\ {p}), h x = (f x) * (x - p) := by\n intro x x_in_u_not_p\n have hyp_x_not_p : x ≠ p := by\n exact ((Set.mem_diff x).mp x_in_u_not_p).2\n simp only [h, Pi.add_apply, Pi.mul_apply]\n rw [← g_is_f_minus_pole x_in_u_not_p]\n simp only [Pi.sub_apply]\n ring_nf\n rw [add_eq_right]\n calc\n _ = A * (1 - (x - p) * (x - p)⁻¹) := by ring\n _= _ := by field_simp; simp [sub_ne_zero.mpr hyp_x_not_p]\n\n have log_deriv_f_plus_pole_equal_log_deriv_h :\n EqOn (deriv f * f⁻¹ + fun s ↦ (s - p)⁻¹) ((deriv h) * h⁻¹) (U \\ {p}) := by\n simp only [mem_diff, mem_singleton_iff, ne_eq, and_imp, Function.comp_apply, Pi.sub_apply,\n DifferentiableOn.sub_iff_right, differentiableOn_const, DifferentiableOn.fun_sub_iff_left,\n holc] at *\n intro x hyp_x\n have x_not_p : x ≠ p := by\n exact ((Set.mem_diff x).mp hyp_x).2\n have x_in_u : x ∈ U := by exact mem_of_mem_diff hyp_x\n simp only [Pi.add_apply, Pi.mul_apply, Pi.inv_apply]\n rw [deriv_h_identity _ x_in_u x_not_p, h_identity _ x_in_u x_not_p]\n\n /- This is just an identity at this point -/\n field_simp [sub_ne_zero.mpr x_not_p, non_zero x (x_in_u) x_not_p]\n ring\n\n have h_inv_bounded :\n h⁻¹ =O[𝓝[≠] p] (1 : ℂ → ℂ) := by\n have : ContinuousAt h⁻¹ p := by\n apply ContinuousOn.continuousAt h_continuous U_in_nhds |>.inv₀\n simp [h, A_ne_zero]\n exact Asymptotics.IsBigO.mono (this.norm.isBoundedUnder_le.isBigO_one ℂ) inf_le_left\n\n have h_deriv_bounded :\n (deriv h) =O[𝓝[≠] p] (1 : ℂ → ℂ) :=\n analytic_deriv_bounded_near_point h U_is_open\n (by exact mem_of_mem_nhds U_in_nhds) h_is_holomorphic\n\n\n have h_log_deriv_bounded :\n ((deriv h) * h⁻¹) =O[𝓝[≠] p] (1 : ℂ → ℂ) := by\n have T := Asymptotics.IsBigO.mul h_deriv_bounded h_inv_bounded\n exact IsBigO.of_const_mul_right T\n\n have u_not_p_in_filter : U \\ {p} ∈ 𝓝[≠] p := by\n exact diff_mem_nhdsWithin_compl U_in_nhds {p}\n have T := Set.EqOn.eventuallyEq_of_mem log_deriv_f_plus_pole_equal_log_deriv_h u_not_p_in_filter\n exact EventuallyEq.trans_isBigO T h_log_deriv_bounded\n","line":347,"end_line":455,"proof_status":"formalized"} {"id":"fks-corollary-3-10","label":"fks-corollary-3-10","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta"],"nlp_text":"If \\(\\sigma _1 \\geq 0.9\\) then \\(\\Sigma _{\\sigma _1}^{\\sigma _2} \\leq 0.00125994 x^{\\sigma _2-1}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_3_10","latex_link":"primary-chapter.html#fks-corollary-3-10","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.corollary_3_10","lean_decl_name":"FKS.corollary_3_10","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-corollary-3-10\"\n (title := \"FKS Corollary 3.10\")\n (statement := /-- If $\\sigma_1 \\geq 0.9$ then $\\Sigma_{\\sigma_1}^{\\sigma_2} \\leq 0.00125994 x^{\\sigma_2-1}$. -/)]\ntheorem corollary_3_10 {σ₁ σ₂ T x : ℝ} (hσ₁ : σ₁ ∈ Set.Icc 0.9 1) (hσ₂ : σ₂ ∈ Set.Ioc σ₁ 1) :\n riemannZeta.Sigma T x σ₁ σ₂ ≤ 0.00125994 * x ^ (σ₂ - 1) := by sorry\n","line":392,"end_line":397,"proof_status":"formalized"} {"id":"fks2-lemma-10-substep","label":"fks2-lemma-10-substep","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-eq-16"],"nlp_text":"We have \\[ \\frac{d}{dx} g(a, b, c, x) = \\left( -a \\log (x) + b + \\frac{c}{2}\\sqrt{\\log (x)} \\right) x^{-a-1} (\\log (x))^{b-1} \\exp (c\\sqrt{\\log (x)}). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10_substep","latex_link":"secondary-chapter.html#fks2-lemma-10-substep","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10_substep","lean_decl_name":"FKS2.lemma_10_substep","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" have he {x} (hx : 2 ≤ x) : pi x - Li x = (θ x - x) / log x + 2 / log 2\n + ∫ t in 2..x, (θ t - t) / (t * log t ^ 2) := by\n simp only [RS_prime.eq_417 hx, hL hx, sub_div, intervalIntegral.integral_sub (l1 hx) (l2 hx)]\n rw [intervalIntegral.integral_congr fun t ht => div_mul_cancel_left₀ _ ((log t) ^ 2)]\n · ring_nf\n · simp_all; grind\n calc\n _ = (θ x - x) / log x - (θ x₀ - x₀) / log x₀ + ((∫ t in 2..x, (θ t - t) / (t * log t ^ 2)) -\n ∫ t in 2..x₀, (θ t - t) / (t * log t ^ 2)) := by rw [he px, he hx₀]; ring\n _ = (θ x - x) / log x - (θ x₀ - x₀) / log x₀ + ∫ t in x₀..x, (θ t - t) / (t * log t ^ 2) := by\n rw [intervalIntegral.integral_interval_sub_left]\n · simpa [sub_div] using IntervalIntegrable.sub (l1 px) (l2 px)\n · simpa [sub_div] using IntervalIntegrable.sub (l1 hx₀) (l2 hx₀)\n\n@[blueprint\n \"fks2-lemma-10-substep\"\n (title := \"FKS2 Sublemma 10-1\")\n (statement := /-- We have\n$$ \\frac{d}{dx} g(a, b, c, x) = \\left( -a \\log(x) + b + \\frac{c}{2}\\sqrt{\\log(x)} \\right) x^{-a-1} (\\log(x))^{b-1} \\exp(c\\sqrt{\\log(x)}).$$\n -/)\n (proof := /-- This follows from straightforward differentiation. -/)\n (latexEnv := \"sublemma\")\n","line":81,"end_line":102,"proof_status":"formalized"} {"id":"fks2-lemma-10-substep-2","label":"fks2-lemma-10-substep-2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-lemma-10-substep"],"nlp_text":"\\(\\frac{d}{dx} g(a, b, c, x) \\) is negative when \\(-au^2 + \\frac{c}{2}u + b {\\lt} 0\\), where \\(u = \\sqrt{\\log (x)}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10_substep_2","latex_link":"secondary-chapter.html#fks2-lemma-10-substep-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10_substep_2","lean_decl_name":"FKS2.lemma_10_substep_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"theorem lemma_10_substep {a b c x : ℝ} (hx : x > 1) :\n deriv (g_bound a b c) x =\n (-a * log x + b + (c / 2) * sqrt (log x)) * x ^ (-a - 1) * (log x) ^ (b - 1) * exp (c * sqrt (log x)) := by\n have h_prod_rule : deriv (fun x => x ^ (-a) * (log x) ^ b * exp (c * sqrt (log x))) x =\n (deriv (fun x => x ^ (-a)) x) * (log x) ^ b * exp (c * sqrt (log x)) +\n x ^ (-a) * (deriv (fun x => (log x) ^ b) x) * exp (c * sqrt (log x)) +\n x ^ (-a) * (log x) ^ b * (deriv (fun x => exp (c * sqrt (log x))) x) := by\n norm_num [ DifferentiableAt.mul, DifferentiableAt.rpow, DifferentiableAt.sqrt, show x ≠ 0 by linarith, show log x ≠ 0 by exact ne_of_gt <| log_pos hx ] ; ring\n unfold g_bound\n rw [h_prod_rule]\n norm_num [ show x ≠ 0 by linarith, show log x ≠ 0 by exact ne_of_gt ( log_pos hx ), sqrt_eq_rpow, rpow_sub_one, mul_assoc, mul_comm, mul_left_comm, div_eq_mul_inv ] ; ring_nf\n norm_num [ ne_of_gt ( log_pos hx ) ]\n rw [ show ( - ( 1 / 2 : ℝ ) ) = ( 1 / 2 : ℝ ) - 1 by norm_num, rpow_sub ( log_pos hx ) ] ; norm_num ; ring\n\n@[blueprint\n \"fks2-lemma-10-substep-2\"\n (title := \"FKS2 Sublemma 10-2\")\n (statement := /-- $\\frac{d}{dx} g(a, b, c, x) $ is negative when $-au^2 + \\frac{c}{2}u + b < 0$, where $u = \\sqrt{\\log(x)}$.\n -/)\n (proof := /-- Clear from previous sublemma. -/)\n","line":104,"end_line":123,"proof_status":"formalized"} {"id":"fks2-lemma-10b","label":"fks2-lemma-10b","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-lemma-10-substep-2"],"nlp_text":"For any \\(a{\\gt}0\\), \\(c{\\gt}0\\) and \\(b \\geq -c^2/16a\\), \\(g(a,b,c,x)\\) decreases with \\(x\\) for \\(x {\\gt} \\exp ((\\frac{c}{4a} + \\frac{1}{2a} \\sqrt{\\frac{c^2}{4} + 4ab})^2)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10b","latex_link":"secondary-chapter.html#fks2-lemma-10b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10b","lean_decl_name":"FKS2.lemma_10b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"theorem lemma_10a {a b c : ℝ} (ha : a > 0) (hc : c > 0) (hb : b < -c ^ 2 / (16 * a)) :\n StrictAnti (g_bound a b c) :=\n sorry\n\n@[blueprint\n \"fks2-lemma-10b\"\n (title := \"FKS2 Lemma 10b\")\n (statement := /--\n For any $a>0$, $c>0$ and $b \\geq -c^2/16a$, $g(a,b,c,x)$ decreases with $x$ for\n $x > \\exp((\\frac{c}{4a} + \\frac{1}{2a} \\sqrt{\\frac{c^2}{4} + 4ab})^2)$. -/)\n (proof := /-- We apply Lemma \\ref{fks2-lemma-10-substep-2}. If $a > 0$, there are two real roots only if $\\frac{c^2}{4} + 4ab \\geq 0$ or equivalently $b \\geq -\\frac{c^2}{16a}$, and the derivative is negative for $u > \\frac{\\frac{c}{2} + \\sqrt{\\frac{c^2}{4} + 4ab}}{2a}$.\n -/)\n (latexEnv := \"lemma\")\n (discussion := 613)]\ntheorem lemma_10b {a b c : ℝ} (ha : a > 0) (hc : c > 0) (hb : b ≥ -c ^ 2 / (16 * a)) :\n StrictAntiOn (g_bound a b c)\n (Set.Ioi (exp ((c / (4 * a) + (1 / (2 * a)) * sqrt (c ^ 2 / 4 + 4 * a * b)) ^ 2))) :=\n sorry\n\n@[blueprint\n \"fks2-lemma-10c\"\n (title := \"FKS2 Lemma 10c\")\n (statement := /--\n If $c>0$, $g(0,b,c,x)$ decreases with $x$ for $\\sqrt{\\log x} < -2b/c$. -/)\n (proof := /-- We apply Lemma \\ref{fks2-lemma-10-substep-2}. If $a = 0$, it is negative when $u < \\frac{-2b}{c}$.\n Note: this lemma is mistyped as $\\sqrt{\\log x} > -2b/c$ in \\cite{FKS2}.\n -/)\n (latexEnv := \"lemma\")\n (discussion := 614)]\ntheorem lemma_10c {b c : ℝ} (hb : b < 0) (hc : c > 0) :\n StrictAntiOn (g_bound 0 b c) (Set.Ioo 1 (exp ((-2 * b / c) ^ 2))) := by\n intro x hx y hy hxy\n simp only [g_bound, neg_zero, rpow_zero, one_mul]\n rw [rpow_def_of_pos <| log_pos hy.1, rpow_def_of_pos <| log_pos hx.1, ← exp_add, ← exp_add, exp_lt_exp]\n have huy_bound : sqrt (log y) < -2 * b / c := by\n","line":147,"end_line":181,"proof_status":"formalized"} {"id":"existsDifferentiableOn_of_bddAbove","label":"existsDifferentiableOn_of_bddAbove","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(f\\) is differentiable on a set \\(s\\) except at \\(c\\in s\\), and \\(f\\) is bounded above on \\(s\\setminus \\{ c\\} \\), then there exists a differentiable function \\(g\\) on \\(s\\) such that \\(f\\) and \\(g\\) agree on \\(s\\setminus \\{ c\\} \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/existsDifferentiableOn_of_bddAbove","latex_link":"sect0003.html#existsDifferentiableOn_of_bddAbove","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/existsDifferentiableOn_of_bddAbove","lean_decl_name":"existsDifferentiableOn_of_bddAbove","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"@[blueprint\n (title := \"existsDifferentiableOn-of-bddAbove\")\n (statement := /--\n If $f$ is differentiable on a set $s$ except at $c\\in s$, and $f$ is bounded above on\n $s\\setminus\\{c\\}$, then there exists a differentiable function $g$ on $s$ such that $f$ and $g$\n agree on $s\\setminus\\{c\\}$.\n -/)\n (proof := /--\n This is the Riemann Removable Singularity Theorem, slightly rephrased from what's in Mathlib.\n (We don't care what the function $g$ is, just that it's holomorphic.)\n -/)]\ntheorem existsDifferentiableOn_of_bddAbove [CompleteSpace E] {s : Set ℂ} {c : ℂ} (hc : s ∈ nhds c)\n (hd : HolomorphicOn f (s \\ {c})) (hb : BddAbove (norm ∘ f '' (s \\ {c}))) :\n ∃ (g : ℂ → E), HolomorphicOn g s ∧ (Set.EqOn f g (s \\ {c})) :=\n ⟨Function.update f c (limUnder (𝓝[{c}ᶜ] c) f),\n differentiableOn_update_limUnder_of_bddAbove hc hd hb,\n fun z hz ↦ if h : z = c then (hz.2 h).elim else by simp [h]⟩\n","line":118,"end_line":134,"proof_status":"formalized"} {"id":"ResidueOfTendsTo","label":"ResidueOfTendsTo","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["existsDifferentiableOn_of_bddAbove"],"nlp_text":"If a function \\(f\\) is holomorphic in a neighborhood of \\(p\\) and \\(\\lim _{s\\to p} (s-p)f(s) = A\\), then \\(f(s) = \\frac{A}{s-p} + O(1)\\) near \\(p\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueOfTendsTo","latex_link":"sect0003.html#ResidueOfTendsTo","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ResidueOfTendsTo","lean_decl_name":"ResidueOfTendsTo","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ResidueOfTendsTo\")\n (statement := /--\n If a function $f$ is holomorphic in a neighborhood of $p$ and\n $\\lim_{s\\to p} (s-p)f(s) = A$, then\n $f(s) = \\frac{A}{s-p} + O(1)$ near $p$.\n -/)\n (proof := /--\n The function $(s - p)\\cdot f(s)$ bounded, so by Theorem\n \\ref{existsDifferentiableOn_of_bddAbove}, there is a holomorphic function, $g$, say, so that\n $(s-p)f(s) = g(s)$ in a neighborhood of $s=p$, and $g(p)=A$. Now because $g$ is holomorphic,\n near $s=p$, we have $g(s)=A+O(s-p)$. Then when you divide by $(s-p)$, you get\n $f(s) = A/(s-p) + O(1)$.\n -/)]\ntheorem ResidueOfTendsTo {f : ℂ → ℂ} {p : ℂ} {U : Set ℂ}\n (hU : U ∈ 𝓝 p)\n (hf : HolomorphicOn f (U \\ {p}))\n {A : ℂ}\n (h_limit : Tendsto (fun s ↦ (s - p) * f s) (𝓝[≠] p) (𝓝 A)) :\n ∃ V ∈ 𝓝 p,\n BddAbove (norm ∘ (f - fun s ↦ A * (s - p)⁻¹) '' (V \\ {p})) := by\n -- Step 1. `(s-p) f s` is bounded on some punctured nbhd `V`.\n have h_event : ∀ᶠ s in 𝓝[≠] p, ‖(s - p) * f s - A‖ < 1 :=\n h_limit.eventually (Metric.ball_mem_nhds _ (by norm_num))\n have h_event_nhds :\n ∀ᶠ s in 𝓝 p, s ≠ p → ‖(s - p) * f s - A‖ < 1 := by\n exact (eventually_nhdsWithin_iff).1 h_event\n rcases (eventually_nhds_iff.1 h_event_nhds) with ⟨V₀, hV₀_mem, hV₀_prop⟩\n have h_bound :\n ∀ s, s ∈ V₀ \\ {p} → ‖(s - p) * f s‖ ≤ ‖A‖ + 1 := by\n intro s hs\n rcases hs with ⟨hV₀, hsne⟩\n calc ‖(s - p) * f s‖ = ‖((s - p) * f s - A) + A‖ := by\n ring_nf\n _ ≤ ‖(s - p) * f s - A‖ + ‖A‖ := norm_add_le ((s - p) * f s - A) A\n _ ≤ 1 + ‖A‖ := add_le_add_left (le_of_lt (hV₀_mem s hV₀ hsne)) ‖A‖\n _ = ‖A‖ + 1 := add_comm 1 ‖A‖\n have h_bdd :\n BddAbove (norm ∘ (fun s ↦ (s - p) * f s) '' (V₀ \\ {p})) := by\n refine ⟨‖A‖ + 1, ?_⟩\n rintro _ ⟨s, hs, rfl⟩\n exact h_bound s hs\n -- From now on work inside `W = V₀ ∩ U`, still a nbhd of `p`.\n set W : Set ℂ := V₀ ∩ U with hW_def\n have hW_mem : (W : Set ℂ) ∈ 𝓝 p := inter_mem (IsOpen.mem_nhds hV₀_prop.1 hV₀_prop.2) hU\n have h_subset_V₀ : (W \\ {p}) ⊆ (V₀ \\ {p}) := by\n intro z hz; exact ⟨hz.1.1, hz.2⟩\n have h_prod_holo : HolomorphicOn (fun z ↦ (z - p) * f z) (W \\ {p}) := by\n have h_id : HolomorphicOn (fun z : ℂ ↦ z - p) (W \\ {p}) :=\n Differentiable.differentiableOn (Differentiable.sub_const differentiable_fun_id p)\n have hfW : HolomorphicOn f (W \\ {p}) := by\n apply hf.mono\n exact diff_subset_diff_left inter_subset_right\n simpa using h_id.mul hfW\n have h_bdd_W : BddAbove (norm ∘ (fun s ↦ (s - p) * f s) '' (W \\ {p})) :=\n h_bdd.mono (image_mono h_subset_V₀)\n -- Step 2. Extend the product across `p`; obtain holomorphic `g`.\n obtain ⟨g, hg_holo, hg_eq⟩ :=\n existsDifferentiableOn_of_bddAbove hW_mem h_prod_holo h_bdd_W\n have h_event_eq :\n (fun z ↦ g z) =ᶠ[𝓝[≠] p] fun z ↦ (z - p) * f z := by\n have hW_diff_mem : (W \\ {p} : Set ℂ) ∈ 𝓝[≠] p :=\n diff_mem_nhdsWithin_compl hW_mem {p}\n exact (hg_eq.eventuallyEq_of_mem hW_diff_mem).symm\n have h_tendsto_gA : Tendsto g (𝓝[≠] p) (𝓝 A) :=\n h_limit.congr' (id (EventuallyEq.symm h_event_eq))\n have hpW : p ∈ W := by\n exact mem_of_mem_nhds hW_mem\n have h_cont_g : ContinuousAt g p := by\n apply (hg_holo.continuousOn.continuousWithinAt hpW).continuousAt hW_mem\n have h_tendsto_gp : Tendsto g (𝓝[≠] p) (𝓝 (g p)) :=\n h_cont_g.tendsto.mono_left inf_le_left\n have g_p_eq : g p = A :=\n tendsto_nhds_unique' (NormedField.nhdsNE_neBot p) h_tendsto_gp h_tendsto_gA\n let q : ℂ → ℂ := fun z ↦ (g z - A) / (z - p)\n have h_deriv : HasDerivAt g (deriv g p) p := by\n exact DifferentiableOn.hasDerivAt hg_holo hW_mem\n have h_q_limit : Tendsto q (𝓝[≠] p) (𝓝 (deriv g p)) := by\n rw [hasDerivAt_iff_tendsto_slope] at h_deriv\n unfold slope at h_deriv\n simp only [vsub_eq_sub, smul_eq_mul, inv_mul_eq_div, g_p_eq] at h_deriv\n exact h_deriv\n have h_event_q : ∀ᶠ z in 𝓝[≠] p, ‖q z - deriv g p‖ < 1 :=\n h_q_limit.eventually (Metric.ball_mem_nhds _ (by norm_num))\n have h_event_q_nhds : ∀ᶠ z in 𝓝 p, z ≠ p → ‖q z - deriv g p‖ < 1 := by\n simpa using (eventually_nhdsWithin_iff).1 h_event_q\n rcases (eventually_nhds_iff.1 h_event_q_nhds) with\n ⟨V₁, hV₁_mem, hV₁_prop⟩\n have h_q_bound :\n ∀ z, z ∈ V₁ \\ {p} → ‖q z‖ ≤ ‖deriv g p‖ + 1 := by\n intro z hz\n rcases hz with ⟨hV₁, hz_ne⟩\n calc ‖q z‖ = ‖(q z - deriv g p) + (deriv g p)‖ := by\n ring_nf\n _ ≤ ‖q z - deriv g p‖ + ‖deriv g p‖ := norm_add_le (q z - deriv g p) (deriv g p)\n _ ≤ 1 + ‖deriv g p‖ := add_le_add_left (le_of_lt (hV₁_mem z hV₁ hz_ne)) ‖deriv g p‖\n _ = ‖deriv g p‖ + 1 := add_comm 1 ‖deriv g p‖\n -- Step 4. Relate `f` to `q` and pass the bound.\n have h_eq_diff :\n EqOn (fun z ↦ f z - A * (z - p)⁻¹) q (W \\ {p}) := by\n intro z hz\n simp only\n have hz_ne : (z - p) ≠ 0 := sub_ne_zero.mpr hz.2\n have hgz : g z = (z - p) * f z := by\n exact id (EqOn.symm hg_eq) hz\n simp only [hgz, q]\n field_simp\n apply IsBigO_to_BddAbove\n rw [isBigO_iff]\n use ‖deriv g p‖ + 1\n apply eventually_nhdsWithin_iff.mpr\n filter_upwards [IsOpen.mem_nhds hV₁_prop.1 hV₁_prop.2, hW_mem] with z hV₁ hW z_ne_p\n specialize h_eq_diff ⟨ hW, z_ne_p⟩\n simp only [Pi.sub_apply, Pi.one_apply, one_mem, CStarRing.norm_of_mem_unitary,\n mul_one] at h_eq_diff ⊢\n rw [h_eq_diff]\n exact h_q_bound _ ⟨hV₁, z_ne_p⟩\n","line":41,"end_line":157,"proof_status":"formalized"} {"id":"riemannZetaResidue","label":"riemannZetaResidue","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ResidueOfTendsTo"],"nlp_text":"The Riemann zeta function \\(\\zeta (s)\\) has a simple pole at \\(s=1\\) with residue \\(1\\). In particular, the function \\(\\zeta (s) - \\frac{1}{s-1}\\) is bounded in a neighborhood of \\(s=1\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZetaResidue","latex_link":"sect0003.html#riemannZetaResidue","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZetaResidue","lean_decl_name":"riemannZetaResidue","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"riemannZetaResidue\")\n (statement := /--\n The Riemann zeta function $\\zeta(s)$ has a simple pole at $s=1$ with residue $1$. In particular,\n the function $\\zeta(s) - \\frac{1}{s-1}$ is bounded in a neighborhood of $s=1$.\n -/)\n (proof := /--\n From \\texttt{riemannZeta\\_residue\\_one} (in Mathlib), we know that\n $(s-1)\\zeta(s)$ goes to $1$ as $s\\to1$. Now apply Theorem \\ref{ResidueOfTendsTo}.\n (This can also be done using $\\zeta_0$ below, which is expressed as\n $1/(s-1)$ plus things that are holomorphic for $\\Re(s)>0$...)\n -/)]\ntheorem riemannZetaResidue :\n ∃ U ∈ 𝓝 1, BddAbove (norm ∘ (ζ - (fun s ↦ (s - 1)⁻¹)) '' (U \\ {1})) := by\n have zeta_holc : HolomorphicOn ζ (univ \\ {1}) := by\n intro y hy\n exact DifferentiableAt.differentiableWithinAt <| differentiableAt_riemannZeta hy.2\n convert ResidueOfTendsTo univ_mem zeta_holc riemannZeta_residue_one using 6\n simp\n","line":173,"end_line":191,"proof_status":"formalized"} {"id":"lem:abadeulmit2","label":"abadeulmit2","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(z\\in \\mathbb {C}\\), \\(z\\notin \\mathbb {Z}\\). Then \\[ \\frac{\\pi ^2}{\\sin ^2 \\pi z} = \\sum _{n=-\\infty }^\\infty \\frac{1}{(z-n)^2}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeulmit2","latex_link":"zeta-chapter.html#lem:abadeulmit2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadeulmit2","lean_decl_name":"ZetaAppendix.lemma_abadeulmit2","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadeulmit2\"\n (title := \"Euler/Mittag-Leffler expansion for cosec squared\")\n (statement := /--\nLet $z\\in \\mathbb{C}$, $z\\notin \\mathbb{Z}$. Then\n\\[\\frac{\\pi^2}{\\sin^2 \\pi z} = \\sum_{n=-\\infty}^\\infty \\frac{1}{(z-n)^2}.\\]\n-/)\n (proof := /--\nDifferentiate the expansion of $\\pi \\cot \\pi z$ term-by-term because it converges\nuniformly on compact subsets of $\\mathbb{C}\\setminus \\mathbb{Z}$.\nBy $\\left(\\pi \\cot \\pi z\\right)' = - \\frac{\\pi^2}{\\sin^2 \\pi z}$ and\n$\\left(\\frac{1}{z\\pm n}\\right)' = -\\frac{1}{(z\\pm n)^2}$, we are done.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 570)]\ntheorem lemma_abadeulmit2 {z : ℂ} (hz : ¬∃ n : ℤ, z = n) :\n (π ^ 2 / (sin (π * z) ^ 2 : ℂ)) = ∑' (n : {m : ℤ // m > 0}), (1 / ((z - n) ^ 2 : ℂ)) := by\n sorry\n","line":1557,"end_line":1574,"proof_status":"statement_formalized"} {"id":"bklnw-eq_A_8","label":"bklnw-eq_A_8","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We denote \\[ s_0(b, T) = \\frac{2b^2}{T}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_8","latex_link":"primary-chapter.html#bklnw-eq_A_8","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_8","lean_decl_name":"BKLNW_app.bklnw_eq_A_8","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_8\"\n (title := \"Equation (A.8)\")\n (statement := /-- We denote\n $$ s_0(b, T) = \\frac{2b^2}{T}. $$ -/)]\nnoncomputable def bklnw_eq_A_8 (b T : ℝ) : ℝ := 2 * b^2 / T","line":39,"end_line":44,"proof_status":"formalized"} {"id":"BlaschkeB","label":"BlaschkeB","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(0 {\\lt} r {\\lt} R{\\lt}1\\), and \\(f:\\overline{\\mathbb {D}_1}\\to \\mathbb {C}\\) be analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)\\neq 0\\). We define a function \\(B_f:\\overline{\\mathbb {D}_R}\\to \\mathbb {C}\\) as follows. \\[ B_f(z)=C_f(z)\\prod _{\\rho \\in \\mathcal{K}_f(r)} \\left(R-\\frac{z\\overline{\\rho }}{R}\\right)^{m_f(\\rho )} \\]","doc_url":null,"latex_link":"sect0004.html#BlaschkeB","lean_link":null,"lean_decl_name":"BlaschkeB","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"BlaschkeOfZero","label":"BlaschkeOfZero","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["BlaschkeB"],"nlp_text":"Let \\(0 {\\lt} r {\\lt} R{\\lt}1\\), and \\(f:\\overline{\\mathbb {D}_1}\\to \\mathbb {C}\\) be analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)\\neq 0\\). Then \\[ |B_f(0)|=|f(0)|\\prod _{\\rho \\in \\mathcal{K}_f(r)} \\left(\\frac{R}{|\\rho |}\\right)^{m_f(\\rho )}. \\]","doc_url":null,"latex_link":"sect0004.html#BlaschkeOfZero","lean_link":null,"lean_decl_name":"BlaschkeOfZero","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"DiskBound","label":"DiskBound","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["BlaschkeB"],"nlp_text":"Let \\(B{\\gt}1\\) and \\(0 {\\lt} R{\\lt}1\\). If \\(f:\\mathbb {C}\\to \\mathbb {C}\\) is a function analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(|f(z)|\\leq B\\) for \\(|z|\\leq R\\), then \\(|B_f(z)|\\leq B\\) for \\(|z|\\leq R\\) also.","doc_url":null,"latex_link":"sect0004.html#DiskBound","lean_link":null,"lean_decl_name":"DiskBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"thm:HLineq","label":"HLineq","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any \\(p{\\gt}0\\) and \\(t\\in \\mathbb {R}\\), \\[ 3+p^{2it}+p^{-2it}+2p^{it}+2p^{-it} \\ge 0. \\]","doc_url":null,"latex_link":"sect0004.html#thm:HLineq","lean_link":null,"lean_decl_name":"HLineq","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"FsigmaThm","label":"FsigmaThm","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["thm:HLineq","FsigmaDef"],"nlp_text":"Then \\(F\\) is real-valued, and whence \\(F(\\sigma )\\ge 1\\) there.","doc_url":null,"latex_link":"sect0004.html#FsigmaThm","lean_link":null,"lean_decl_name":"FsigmaThm","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"thm:StrongZeroFree","label":"StrongZeroFree","background_color":"white","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["FsigmaThm"],"nlp_text":"There is a constant \\(c{\\gt}0\\), so that \\(\\zeta (s)\\) does not vanish in the region \\(\\sigma {\\gt}1-\\frac{c}{\\log t}\\), and moreover, \\[ -\\frac{\\zeta '}{\\zeta }(\\sigma +it) \\ll (\\log t)^2 \\]","doc_url":null,"latex_link":"sect0004.html#thm:StrongZeroFree","lean_link":null,"lean_decl_name":"StrongZeroFree","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"log_lower_1","label":"log_lower_1","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(t \\geq 0\\), one has \\(t - \\frac{t^2}{2} \\leq \\log (1+t)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_ge","latex_link":"secondary-chapter.html#log_lower_1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_ge","lean_decl_name":"log_ge","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"log_lower_1\"\n (title := \"First log lower bound\")\n (statement := /-- For $t \\geq 0$, one has $t - \\frac{t^2}{2} \\leq \\log(1+t)$. -/)\n (proof := /-- Use Taylor's theorem with remainder and the fact that the second derivative of $\\log(1+t)$ is at most $1$ for $t \\geq 0$.-/)\n (latexEnv := \"sublemma\")]\ntheorem log_ge\n (t s : ℝ) (ht : t ≥ 0) (hs : s > 0) :\n t - t ^ 2 / (2 * s ^ 2) ≤ log (1 + t) := by\n sorry","line":48,"end_line":57,"proof_status":"statement_formalized"} {"id":"rs-418","label":"rs-418","background_color":"#9CEC8B","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["rs-413"],"nlp_text":"\\[ \\sum _{p \\leq x} \\frac{1}{p} = \\frac{\\vartheta (x)}{x \\log x} + \\int _2^x \\frac{\\vartheta (y) (1 + \\log y)\\ dy}{y^2 \\log ^2 y}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_418","latex_link":"secondary-chapter.html#rs-418","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_418","lean_decl_name":"RS_prime.eq_418","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"theorem eq_418 {x : ℝ} (hx : 2 ≤ x) :\n ∑ p ∈ filter Prime (Iic ⌊x⌋₊), 1 / (p : ℝ) = θ x / (x * log x) +\n ∫ y in 2..x, θ y * (1 + log y) / (y ^ 2 * log y ^ 2) := by\n have : DifferentiableOn ℝ (fun y : ℝ ↦ 1 / y) (Set.Icc 2 x) :=\n fun y hy => by simpa [one_div] using differentiableWithinAt_inv (by grind) (Set.Icc 2 x)\n rw [eq_413 (f := fun x => 1 / x) hx this, mul_comm_div, one_mul, div_div, sub_eq_add_neg,\n ← intervalIntegral.integral_neg, add_left_cancel_iff]\n refine intervalIntegral.integral_congr fun y hy => ?_\n have hy := Set.uIcc_of_le hx ▸ hy\n have := deriv_fun_inv'' (y.hasDerivAt_mul_log (by grind)).differentiableAt\n (mul_ne_zero_iff.2 ⟨by grind, by linarith [Real.log_pos (by grind : 1 < y)]⟩)\n simp only [neg_mul_eq_mul_neg, mul_div_assoc, mul_left_cancel_iff_of_pos\n (Chebyshev.theta_pos hy.1), div_div, fun t : ℝ => one_div (t * log t), this,\n deriv_mul_log (by grind : y ≠ 0)]\n ring\n\n","line":201,"end_line":216,"proof_status":"formalized"} {"id":"ZetaBnd_aux1b","label":"ZetaBnd_aux1b","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaBnd_aux1a"],"nlp_text":"For any \\(N\\ge 1\\) and \\(s = \\sigma + tI \\in \\mathbb {C}\\), \\(\\sigma {\\gt} 0\\), \\[ \\left| \\int _N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx \\right| \\le \\frac{N^{-\\sigma }}{\\sigma }. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1b","latex_link":"sect0003.html#ZetaBnd_aux1b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1b","lean_decl_name":"ZetaBnd_aux1b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaBnd-aux1b\")\n (statement := /--\n For any $N\\ge1$ and $s = \\sigma + tI \\in \\C$, $\\sigma > 0$,\n $$\n \\left| \\int_N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx \\right|\n \\le \\frac{N^{-\\sigma}}{\\sigma}.\n $$\n -/)\n (proof := /-- Apply Lemma \\ref{ZetaBnd_aux1a} with $a=N$ and $b\\to \\infty$. -/)\n (latexEnv := \"lemma\")]\nlemma ZetaBnd_aux1b (N : ℕ) (Npos : 1 ≤ N) {σ t : ℝ} (σpos : 0 < σ) :\n ‖∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ ((σ + t * I) + 1)‖\n ≤ N ^ (-σ) / σ := by\n apply le_trans (by apply norm_integral_le_integral_norm)\n apply le_of_tendsto (x := atTop (α := ℝ)) (f := fun (t : ℝ) ↦ ∫ (x : ℝ) in N..t,\n ‖(⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (σ + t * I + 1)‖) ?_ ?_\n · apply intervalIntegral_tendsto_integral_Ioi (μ := volume) (l := atTop) (b := id)\n (f := fun (x : ℝ) ↦ ‖(⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (σ + t * I + 1)‖) N ?_ ?_ |>.congr' ?_\n · filter_upwards [Filter.mem_atTop ((N : ℝ))]\n intro u hu\n simp only [id_eq, intervalIntegral.integral_of_le hu, norm_div]\n apply setIntegral_congr_fun (by simp)\n intro x hx; beta_reduce\n iterate 2 (rw [norm_cpow_eq_rpow_re_of_pos (by linarith [hx.1])])\n simp\n · apply IntegrableOn.integrable ?_ |>.norm\n convert integrableOn_of_Zeta0_fun (s := σ + t * I) Npos (by simp [σpos]) using 1\n simp_rw [div_eq_mul_inv, cpow_neg]\n · exact fun ⦃_⦄ a ↦ a\n · filter_upwards [mem_atTop (N + 1 : ℝ)] with t ht\n have : (N ^ (-σ) - t ^ (-σ)) / σ ≤ N ^ (-σ) / σ :=\n div_le_div_iff_of_pos_right σpos |>.mpr (by simp [Real.rpow_nonneg (by linarith)])\n apply le_trans ?_ this\n convert ZetaBnd_aux1a (a := N) (b := t) (by positivity) (by linarith) ?_ <;> simp [σpos]\n","line":1156,"end_line":1190,"proof_status":"formalized"} {"id":"ZetaBnd_aux1p","label":"ZetaBnd_aux1p","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaBnd_aux1b"],"nlp_text":"For any \\(N\\ge 1\\) and \\(s = \\sigma + tI \\in \\mathbb {C}\\), \\(\\sigma =\\in (0,2], 2 {\\lt} |t|\\), \\[ \\left| s\\int _N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx \\right| \\ll |t| \\frac{N^{-\\sigma }}{\\sigma }. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1p","latex_link":"sect0003.html#ZetaBnd_aux1p","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1p","lean_decl_name":"ZetaBnd_aux1p","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaBnd-aux1p\")\n (statement := /--\n For any $N\\ge1$ and $s = \\sigma + tI \\in \\C$, $\\sigma=\\in(0,2], 2 < |t|$,\n $$\n \\left| s\\int_N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx \\right|\n \\ll |t| \\frac{N^{-\\sigma}}{\\sigma}.\n $$\n -/)\n (proof := /-- Apply Lemma \\ref{ZetaBnd_aux1b} and estimate $|s|\\ll |t|$. -/)\n (latexEnv := \"lemma\")]\nlemma ZetaBnd_aux1p (N : ℕ) (Npos : 1 ≤ N) {σ : ℝ} (hσ : σ ∈ Ioc 0 2) :\n (fun (t : ℝ) ↦\n ‖(σ + t * I) * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ ((σ + t * I) + 1)‖)\n =O[Filter.principal {t | 2 ≤ |t|}] fun t ↦ |t| * N ^ (-σ) / σ := by\n rw [Asymptotics.IsBigO_def]\n use 2\n rw [Asymptotics.isBigOWith_principal]\n intro t ht\n simp only [mem_setOf_eq] at ht\n rw [norm_norm, norm_mul, mul_div_assoc, norm_mul]\n have : 2 * (‖|t|‖ * ‖↑N ^ (-σ) / σ‖) = (2 * |t|) * ((N : ℝ) ^ (-σ) / σ) := by\n simp only [Real.norm_eq_abs, _root_.abs_abs, norm_div]\n have : σ ≠ 0 := by linarith [hσ.1]\n field_simp\n rw [abs_of_pos hσ.1]\n have : 0 < (N : ℝ) ^ (-σ) := by\n refine Real.rpow_pos_of_pos ?_ _\n positivity\n rw [abs_of_pos this]\n ring\n rw [this]\n apply mul_le_mul ?_ (ZetaBnd_aux1b N Npos hσ.1) (norm_nonneg _) (by positivity)\n refine le_trans (by apply norm_add_le) ?_\n simp only [norm_real, norm_mul, norm_I, mul_one, Complex.norm_of_nonneg hσ.1.le, Real.norm_eq_abs]\n linarith [hσ.2]\n","line":1217,"end_line":1252,"proof_status":"formalized"} {"id":"ZetaBnd_aux1","label":"ZetaBnd_aux1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaBnd_aux1b"],"nlp_text":"For any \\(N\\ge 1\\) and \\(s = \\sigma + tI \\in \\mathbb {C}\\), \\(\\sigma =\\in (0,2], 2 {\\lt} |t|\\), \\[ \\left| s\\int _N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx \\right| \\le 2 |t| \\frac{N^{-\\sigma }}{\\sigma }. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1","latex_link":"sect0003.html#ZetaBnd_aux1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1","lean_decl_name":"ZetaBnd_aux1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaBnd-aux1\")\n (statement := /--\n For any $N\\ge1$ and $s = \\sigma + tI \\in \\C$, $\\sigma=\\in(0,2], 2 < |t|$,\n $$\n \\left| s\\int_N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx \\right|\n \\le 2 |t| \\frac{N^{-\\sigma}}{\\sigma}.\n $$\n -/)\n (proof := /-- Apply Lemma \\ref{ZetaBnd_aux1b} and estimate $|s|\\ll |t|$. -/)\n (latexEnv := \"lemma\")]\nlemma ZetaBnd_aux1 (N : ℕ) (Npos : 1 ≤ N) {σ t : ℝ} (hσ : σ ∈ Ioc 0 2) (ht : 2 ≤ |t|) :\n ‖(σ + t * I) * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ ((σ + t * I) + 1)‖\n ≤ 2 * |t| * N ^ (-σ) / σ := by\n rw [norm_mul, mul_div_assoc]\n rw [Set.mem_Ioc] at hσ\n apply mul_le_mul ?_ (ZetaBnd_aux1b N Npos hσ.1) (norm_nonneg _) (by positivity)\n refine le_trans (by apply norm_add_le) ?_\n simp only [Complex.norm_of_nonneg hσ.1.le, Complex.norm_mul, norm_real, Real.norm_eq_abs, norm_I,\n mul_one]\n linarith [hσ.2]\n","line":1192,"end_line":1212,"proof_status":"formalized"} {"id":"Dusart_lemma_5_10a","label":"Dusart_lemma_5_10a","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have for \\(k \\geq 4\\), \\(p_k \\leq k \\log p_k\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_5_10a","latex_link":"secondary-chapter.html#Dusart_lemma_5_10a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_5_10a","lean_decl_name":"Dusart.lemma_5_10a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_lemma_5_10a\"\n (title := \"Dusart Lemma 5.10\")\n (statement := /--\n We have for $k \\geq 4$, $p_k \\leq k \\log p_k$.\n -/)\n (latexEnv := \"lemma\")]\ntheorem lemma_5_10a {k : ℕ} (hk : k ≥ 4) : nth Nat.Prime k ≤ k * Real.log (nth Nat.Prime k) := by sorry\n","line":404,"end_line":410,"proof_status":"formalized"} {"id":"thm:ramare-saouter2003","label":"ramare-saouter2003","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} 10,726,905,041\\), then there is a prime in the interval \\((x(1-1/28314000), x]\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RamareSaouter2003.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:ramare-saouter2003","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RamareSaouter2003.has_prime_in_interval","lean_decl_name":"RamareSaouter2003.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:ramare-saouter2003\"\n (title := \"Ramaré-Saouter 2003\")\n (statement := /--\n If $x > 10,726,905,041$, then there is a prime in the interval $(x(1-1/28314000), x]$.\n -/)\n (latexEnv := \"theorem\")]\ntheorem RamareSaouter2003.has_prime_in_interval (x : ℝ) (hx : x > 10726905041) :\n HasPrimeInInterval (x*(1-1/28314000)) (x/28314000) := by sorry","line":138,"end_line":146,"proof_status":"formalized"} {"id":"lem:aachIBP","label":"aachIBP","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["e-def"],"nlp_text":"Let \\(s = \\sigma + i \\tau \\), \\(\\sigma \\geq 0\\), \\(\\tau \\in \\mathbb {R}\\). Let \\(\\nu \\in \\mathbb {R}\\setminus \\{ 0\\} \\), \\(b{\\gt}a{\\gt}\\frac{|\\tau |}{2\\pi |\\nu |}\\). Then \\begin{equation} \\label{eq:aachquno}\\int _a^b t^{-s} e(\\nu t) dt = \\left. \\frac{t^{-\\sigma } e(\\varphi _\\nu (t))}{2\\pi i \\varphi _\\nu '(t)}\\right|_a^b + \\sigma \\int _a^b \\frac{t^{-\\sigma -1}}{2\\pi i \\varphi _\\nu '(t)} e(\\varphi _\\nu (t)) dt + \\int _a^b \\frac{t^{-\\sigma } \\varphi _\\nu ''(t)}{2\\pi i (\\varphi _\\nu '(t))^2} e(\\varphi _\\nu (t)) dt, \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachIBP","latex_link":"zeta-chapter.html#lem:aachIBP","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachIBP","lean_decl_name":"ZetaAppendix.lemma_aachIBP","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:aachIBP\"\n (title := \"Fourier transform of a truncated power law\")\n (statement := /--\nLet $s = \\sigma + i \\tau$, $\\sigma\\geq 0$, $\\tau\\in \\mathbb{R}$.\nLet $\\nu\\in \\mathbb{R}\\setminus \\{0\\}$, $b>a>\\frac{|\\tau|}{2\\pi |\\nu|}$.\nThen\n\\begin{equation}\\label{eq:aachquno}\\int_a^b t^{-s} e(\\nu t) dt =\n \\left. \\frac{t^{-\\sigma} e(\\varphi_\\nu(t))}{2\\pi i \\varphi_\\nu'(t)}\\right|_a^b\n + \\sigma \\int_a^b \\frac{t^{-\\sigma-1}}{2\\pi i \\varphi_\\nu'(t)} e(\\varphi_\\nu(t)) dt\n + \\int_a^b \\frac{t^{-\\sigma} \\varphi_\\nu''(t)}{2\\pi i (\\varphi_\\nu'(t))^2}\n e(\\varphi_\\nu(t)) dt,\n\\end{equation}\nwhere $\\varphi_\\nu(t) = \\nu t - \\frac{\\tau}{2\\pi} \\log t$.\n-/)\n (proof := /--\nWe write $t^{-s} e(\\nu t) = t^{-\\sigma} e(\\varphi_\\nu(t))$ and integrate by parts with\n$u = t^{-\\sigma}/(2\\pi i \\varphi_\\nu'(t))$, $v = e(\\varphi_\\nu(t))$.\nHere $\\varphi_\\nu'(t) = \\nu - \\tau/(2\\pi t)\\ne 0$ for $t\\in [a,b]$ because\n$t\\geq a > |\\tau|/(2\\pi |\\nu|)$ implies $|\\nu|>|\\tau|/(2\\pi t)$.\nClearly\n\\[u dv = \\frac{ t^{-\\sigma}}{2\\pi i \\varphi_\\nu'(t)} \\cdot 2\\pi i \\varphi_\\nu'(t)\n e(\\varphi_\\nu(t)) dt = t^{-\\sigma} e(\\varphi_\\nu(t)) dt,\\]\nwhile\n\\[du = \\left(\\frac{-\\sigma t^{-\\sigma-1}}{2\\pi i \\varphi_\\nu'(t)}\n - \\frac{t^{-\\sigma} \\varphi_\\nu''(t)}{2\\pi i (\\varphi_\\nu'(t))^2}\\right) dt.\\]\n-/)\n (latexEnv := \"lemma\")\n (discussion := 546)]\ntheorem lemma_aachIBP (s : ℂ) (hsigma : 0 ≤ s.re) (ν : ℝ) (hν : ν ≠ 0) (a b : ℝ)\n (ha : a > |s.im| / (2 * π * |ν|)) (hb : b > a) :\n let φ : ℝ → ℝ := fun t ↦ ν * t - (s.im / (2 * π)) * Real.log t\n let Φ : ℝ → ℂ := fun t ↦\n (t ^ (-s.re) : ℝ) * e (φ t) / (2 * π * I * (deriv φ t))\n ∫ t in Set.Icc a b, t ^ (-s) * e (ν * t) = Φ b - Φ a +\n s.re * ∫ t in Set.Icc a b,\n (t ^ (-s.re - 1) : ℝ) / (2 * π * I * (deriv φ t)) * e (φ t) +\n ∫ t in Set.Icc a b, (t ^ (-s.re) : ℝ) * (deriv (deriv φ) t) /\n (2 * π * I * (deriv φ t) ^ 2) * e (φ t) := by\n sorry\n","line":72,"end_line":111,"proof_status":"statement_formalized"} {"id":"lem:abadimpseri","label":"abadimpseri","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(\\vartheta \\in \\mathbb {R}\\) with \\(0\\leq |\\vartheta |{\\lt} 1\\), \\[ \\sum _n\\left(\\frac{1}{(n-\\vartheta )^3} + \\frac{1}{(n+\\vartheta )^3}\\right) \\leq \\frac{1}{(1-|\\vartheta |)^3} + 2\\zeta (3)-1. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadimpseri","latex_link":"zeta-chapter.html#lem:abadimpseri","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadimpseri","lean_decl_name":"ZetaAppendix.lemma_abadimpseri","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadimpseri\"\n (title := \"Estimate for an inverse cubic series\")\n (statement := /--\nFor $\\vartheta\\in \\mathbb{R}$ with $0\\leq |\\vartheta|< 1$,\n\\[\\sum_n\\left(\\frac{1}{(n-\\vartheta)^3} + \\frac{1}{(n+\\vartheta)^3}\\right)\n\\leq \\frac{1}{(1-|\\vartheta|)^3} + 2\\zeta(3)-1.\\]\n-/)\n (proof := /--\nSince $\\frac{1}{(n-\\vartheta)^3} + \\frac{1}{(n+\\vartheta)^3}$ is even,\nwe may replace $\\vartheta$ by $|\\vartheta|$. Then we rearrange the sum:\n\\[\\sum_{n=1}^\\infty \\left(\\frac{1}{(n-|\\vartheta|)^3} + \\frac{1}{(n+|\\vartheta|)^3}\\right)\n = \\frac{1}{(1-|\\vartheta|)^3}\n + \\sum_{n=1}^\\infty \\left(\\frac{1}{\\left(n+1-|\\vartheta|\\right)^3}\n + \\frac{1}{\\left(n+|\\vartheta|\\right)^3}\\right).\\]\nWe may write $(n+1-|\\vartheta|)^3$, $(n+|\\vartheta|)^3$\nas $(n+\\frac{1}{2}-t)^3$, $(n+\\frac{1}{2} + t)^3$ for $t = |\\vartheta|-1/2$.\nSince $1/u^3$ is convex, $\\frac{1}{(n+1/2-t)^3} + \\frac{1}{(n+1/2+t)^3}$ reaches its\nmaximum on $[-1/2,1/2]$ at the endpoints. Hence\n\\[\\sum_{n=1}^\\infty \\left(\\frac{1}{\\left(n+1-|\\vartheta|\\right)^3}\n + \\frac{1}{\\left(n+|\\vartheta|\\right)^3}\\right)\n \\leq \\sum_{n=1}^\\infty \\left(\\frac{1}{n^3} + \\frac{1}{(n+1)^3}\\right) = 2 \\zeta(3)-1.\n\\]\n-/)\n (latexEnv := \"lemma\")\n (discussion := 571)]\nlemma lemma_abadimpseri (ϑ : ℝ) (hϑ : |ϑ| < 1) :\n ∑' n : ℕ, (1 / ((n + 1 : ℝ) - ϑ) ^ 3 + 1 / ((n + 1 : ℝ) + ϑ) ^ 3) ≤\n 1 / (1 - |ϑ|) ^ 3 + 2 * (riemannZeta 3).re - 1 := by\n have h_sum_bound : ∀ n : ℕ, (1 / (n + 1 - ϑ) ^ 3 + 1 / (n + 1 + ϑ) ^ 3) ≤\n (1 / (n + 1 - |ϑ|) ^ 3 + 1 / (n + 1 + |ϑ|) ^ 3) := by intro n; cases abs_cases ϑ <;> grind\n have h_sum_bound_endpoints : (∑' n : ℕ, (1 / (n + 1 - |ϑ|) ^ 3 + 1 / (n + 1 + |ϑ|) ^ 3)) ≤\n (1 / (1 - |ϑ|) ^ 3) + 2 * (riemannZeta 3).re - 1 := by\n have h_sum_endpoints_bound : (∑' n : ℕ, (1 / (n + 2 - |ϑ|) ^ 3 + 1 / (n + 1 + |ϑ|) ^ 3)) ≤\n 2 * (riemannZeta 3).re - 1 := by\n have h_term_bound : ∀ n : ℕ, (1 / (n + 2 - |ϑ|) ^ 3 + 1 / (n + 1 + |ϑ|) ^ 3) ≤\n (1 / (n + 1) ^ 3 + 1 / (n + 2) ^ 3) := by\n intro n\n rw [div_add_div, div_add_div, div_le_div_iff₀] <;> try positivity\n · have h_simp : (n + 1 + |ϑ|) ^ 3 + (n + 2 - |ϑ|) ^ 3 ≤ (n + 1) ^ 3 + (n + 2) ^ 3 := by\n nlinarith [abs_nonneg ϑ, pow_two_nonneg (|ϑ| : ℝ), pow_two_nonneg (n : ℝ),\n mul_lt_mul_of_pos_left hϑ <| Nat.cast_add_one_pos n]\n field_simp\n refine le_trans (mul_le_mul_of_nonneg_left h_simp <| by positivity) ?_\n have h_simp : (n + 1 : ℝ) ^ 3 * (n + 2) ^ 3 ≤ (n + 1 + |ϑ|) ^ 3 * (n + 2 - |ϑ|) ^ 3 := by\n rw [← mul_pow, ← mul_pow]; exact pow_le_pow_left₀ (by positivity) (by nlinarith [abs_nonneg ϑ]) _\n exact mul_le_mul h_simp (by linarith) (by positivity)\n (by exact mul_nonneg (pow_nonneg (by positivity) _) (pow_nonneg (by linarith [abs_nonneg ϑ]) _))\n · exact mul_pos (pow_pos (by linarith [abs_nonneg ϑ]) _) (pow_pos (by linarith [abs_nonneg ϑ]) _)\n · exact pow_ne_zero _ (by linarith [abs_nonneg ϑ])\n refine le_trans (Summable.tsum_le_tsum h_term_bound ?_ ?_) ?_\n · exact of_nonneg_of_le (fun n ↦ add_nonneg (one_div_nonneg.mpr (pow_nonneg (by linarith [abs_nonneg ϑ]) _))\n (one_div_nonneg.mpr (pow_nonneg (by linarith [abs_nonneg ϑ]) _)))\n h_term_bound (add (by exact_mod_cast summable_nat_add_iff 1 |>.2 <| summable_one_div_nat_pow.2 <| by omega)\n (by exact_mod_cast summable_nat_add_iff 2 |>.2 <| summable_one_div_nat_pow.2 <| by omega))\n · exact add (by simpa using summable_nat_add_iff 1 |>.2 <| summable_one_div_nat_pow.2 <| by omega)\n (by simpa using summable_nat_add_iff 2 |>.2 <| summable_one_div_nat_pow.2 <| by omega)\n · have h_sum_zeta : ∑' n : ℕ, (1 / (n + 1 : ℝ) ^ 3 + 1 / (n + 2 : ℝ) ^ 3) =\n 2 * (∑' n : ℕ, (1 / (n + 1 : ℝ) ^ 3)) - 1 := by\n rw [Summable.tsum_add, Summable.tsum_eq_zero_add] <;> norm_num\n · norm_num [add_assoc]; ring\n · exact_mod_cast summable_nat_add_iff 1 |>.2 <| summable_nat_pow_inv.2 <| by omega\n · exact_mod_cast summable_nat_add_iff 1 |>.2 <| summable_nat_pow_inv.2 <| by omega\n · exact_mod_cast summable_nat_add_iff 2 |>.2 <| summable_nat_pow_inv.2 <| by omega\n convert h_sum_zeta.le using 2\n erw [zeta_eq_tsum_one_div_nat_add_one_cpow] <;> norm_num\n · convert ofReal_re _; simp [Complex.ofReal_tsum]\n rw [Summable.tsum_eq_zero_add]\n · norm_num [add_assoc, add_left_comm, add_comm, div_eq_mul_inv, mul_add, mul_comm,\n mul_left_comm, tsum_mul_left] at *\n have hs₁ : Summable fun n : ℕ ↦ ((|ϑ| + (n + 1)) ^ 3)⁻¹ :=\n of_nonneg_of_le (fun n ↦ inv_nonneg.2 (pow_nonneg (by positivity) _))\n (fun n ↦ by simpa using inv_anti₀ (by positivity) (pow_le_pow_left₀ (by positivity)\n (show (|ϑ| + (n + 1) : ℝ) ≥ n + 1 by linarith [abs_nonneg ϑ]) 3))\n (summable_nat_add_iff 1 |>.2 <| Real.summable_one_div_nat_pow.2 <| by omega)\n have hs₂ : Summable fun n : ℕ ↦ (((n : ℝ) + 2 - |ϑ|) ^ 3)⁻¹ :=\n of_nonneg_of_le (fun n ↦ inv_nonneg.2 (pow_nonneg (by linarith [abs_nonneg ϑ]) _))\n (fun n ↦ by rw [inv_le_comm₀] <;> norm_num <;> ring_nf <;>\n nlinarith [abs_nonneg ϑ, pow_two_nonneg ((n : ℝ) + 1 - |ϑ|)])\n (summable_nat_add_iff 1 |>.2 <| Real.summable_one_div_nat_pow.2 one_lt_two)\n rw [Summable.tsum_add hs₁ hs₂] at h_sum_endpoints_bound\n rw [Summable.tsum_add]\n · rw [show (∑' b : ℕ, ((|ϑ| + (b + 2)) ^ 3)⁻¹) = (∑' b : ℕ, ((|ϑ| + (b + 1)) ^ 3)⁻¹) - ((|ϑ| + 1) ^ 3)⁻¹ from ?_]\n · nlinarith [show 0 < (|ϑ| + 1) ^ 3 by positivity, inv_mul_cancel₀ (show (|ϑ| + 1) ^ 3 ≠ 0 by positivity)]\n · rw [eq_comm, Summable.tsum_eq_zero_add]\n · norm_num [add_assoc]\n · exact hs₁\n · exact_mod_cast of_nonneg_of_le (fun n ↦ by positivity)\n (fun n ↦ by rw [inv_le_comm₀] <;> norm_num <;> ring_nf <;> nlinarith only [abs_nonneg ϑ, hϑ])\n (summable_nat_add_iff 1 |>.2 <| Real.summable_one_div_nat_pow.2 one_lt_two)\n · exact hs₂\n · refine Summable.add ?_ ?_\n · have : Summable (fun n : ℕ ↦ (1 : ℝ) / (n : ℝ) ^ 3) := summable_one_div_nat_pow.2 (by omega)\n rw [← summable_nat_add_iff 1] at this ⊢\n exact of_nonneg_of_le (fun n ↦ one_div_nonneg.mpr (pow_nonneg (by cases abs_cases ϑ <;> linarith) _))\n (fun n ↦ one_div_le_one_div_of_le (by positivity)\n (pow_le_pow_left₀ (by positivity) (by cases abs_cases ϑ <;> linarith) _)) this\n · exact_mod_cast of_nonneg_of_le (fun n ↦ by positivity)\n (fun n ↦ by simpa using inv_anti₀ (by positivity) (pow_le_pow_left₀ (by positivity)\n (show (n : ℝ) + 1 + |ϑ| ≥ n + 1 by linarith [abs_nonneg ϑ]) 3))\n (summable_nat_add_iff 1 |>.2 <| Real.summable_one_div_nat_pow.2 <| by omega)\n refine le_trans (Summable.tsum_le_tsum h_sum_bound ?_ ?_) h_sum_bound_endpoints\n · have h_bound : ∀ n : ℕ,\n (1 / (n + 1 - ϑ) ^ 3 + 1 / (n + 1 + ϑ) ^ 3) ≤ 2 / (n + 1 - |ϑ|) ^ 3 := fun n ↦ by\n have : (1 / (n + 1 - ϑ) ^ 3 + 1 / (n + 1 + ϑ) ^ 3) ≤\n (1 / (n + 1 - |ϑ|) ^ 3 + 1 / (n + 1 - |ϑ|) ^ 3) := by\n cases abs_cases ϑ <;> simp only [add_le_add_iff_left, one_div, sub_neg_eq_add, add_le_add_iff_right, *]\n · exact inv_anti₀ (pow_pos (by linarith) _) (by gcongr <;> linarith)\n · exact inv_anti₀ (pow_pos (by linarith) _)\n (pow_le_pow_left₀ (by linarith) (by linarith) _)\n exact this.trans_eq (by ring)\n refine of_nonneg_of_le (fun n ↦ ?_) (fun n ↦ h_bound n) ?_\n · exact add_nonneg (one_div_nonneg.mpr (pow_nonneg (by linarith [abs_lt.mp hϑ]) _))\n (one_div_nonneg.mpr (pow_nonneg (by linarith [abs_lt.mp hϑ]) _))\n · have : Summable (fun n : ℕ ↦ 2 / (n : ℝ) ^ 3) :=\n mul_left 2 <| Real.summable_nat_pow_inv.2 (by norm_num : (1 : ℕ) < 3)\n rw [← summable_nat_add_iff 1] at this ⊢\n exact of_nonneg_of_le (fun n ↦ div_nonneg zero_le_two (pow_nonneg (by linarith [abs_nonneg ϑ]) _))\n (fun n ↦ div_le_div_of_nonneg_left (by positivity) (by positivity)\n (pow_le_pow_left₀ (by linarith [abs_nonneg ϑ]) (by linarith [abs_nonneg ϑ]) _)) this\n · refine add ?_ ?_\n · rw [← summable_nat_add_iff 1]\n simp only [one_div, Nat.cast_add, Nat.cast_one] at *\n exact of_nonneg_of_le (fun n ↦ inv_nonneg.2 (pow_nonneg (by linarith [abs_nonneg ϑ]) _))\n (fun n ↦ by rw [inv_le_comm₀] <;> norm_num <;> ring_nf <;>\n nlinarith [abs_nonneg ϑ, pow_two_nonneg ((n : ℝ) ^ 2), pow_two_nonneg ((n : ℝ) + 1),\n pow_two_nonneg ((n : ℝ) + 1 - |ϑ|)]) (summable_nat_add_iff 1 |>.2 <| summable_one_div_nat_pow.2 one_lt_two)\n · exact of_nonneg_of_le (fun n ↦ by positivity)\n (fun n ↦ by simpa using inv_anti₀ (by positivity) (pow_le_pow_left₀ (by positivity)\n (show (n : ℝ) + 1 + |ϑ| ≥ n + 1 by linarith [abs_nonneg ϑ]) 3))\n (summable_nat_add_iff 1 |>.2 <| summable_one_div_nat_pow.2 <| by omega)\n","line":1576,"end_line":1706,"proof_status":"formalized"} {"id":"conj_riemannZeta_conj_aux1","label":"conj_riemannZeta_conj_aux1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Conjugation symmetry of the Riemann zeta function in the half-plane of convergence. Let \\(s \\in \\mathbb {C}\\) with \\(\\Re (s) {\\gt} 1\\). Then \\(\\overline{\\zeta (\\overline{s})} = \\zeta (s)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/conj_riemannZeta_conj_aux1","latex_link":"sect0003.html#conj_riemannZeta_conj_aux1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/conj_riemannZeta_conj_aux1","lean_decl_name":"conj_riemannZeta_conj_aux1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaConj.lean","lean4_code":"@[blueprint\n (title := \"conj-riemannZeta-conj-aux1\")\n (statement := /--\n Conjugation symmetry of the Riemann zeta function in the half-plane of convergence. Let\n $s \\in \\mathbb{C}$ with $\\Re(s) > 1$. Then $\\overline{\\zeta(\\overline{s})} = \\zeta(s)$.\n -/)\n (proof := /--\n We expand the definition of the Riemann zeta function as a series and find that the two sides\n are equal term by term.\n -/)]\nlemma conj_riemannZeta_conj_aux1 (s : ℂ) (hs : 1 < s.re) :\n conj (riemannZeta (conj s)) = riemannZeta s := by\n rw [zeta_eq_tsum_one_div_nat_add_one_cpow hs]\n rw [zeta_eq_tsum_one_div_nat_add_one_cpow]\n swap\n · simpa\n rw [Complex.conj_tsum]\n congr\n ext n\n have : n + 1 ≠ 0 := by linarith\n have : (n : ℂ) + 1 ≠ 0 := by exact_mod_cast this\n rw [Complex.cpow_def_of_ne_zero this]\n rw [Complex.cpow_def_of_ne_zero this]\n rw [RCLike.conj_div, map_one, ← Complex.exp_conj, map_mul, Complex.conj_conj]\n norm_cast\n rw [Complex.conj_ofReal]\n","line":63,"end_line":88,"proof_status":"formalized"} {"id":"score-lower-1","label":"score-lower-1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["score-def"],"nlp_text":"If there is a prime \\(p\\) in surplus, one can remove it without increasing the score.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lower_score_1","latex_link":"tertiary-chapter.html#score-lower-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.lower_score_1","lean_decl_name":"Erdos392.Factorization.lower_score_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"score-lower-1\"\n (statement := /-- If there is a prime $p$ in surplus, one can remove it without increasing the\n score. -/)\n (proof := /-- Locate a factor $a_i$ that contains the surplus prime $p$, then\n replace $a_i$ with $a_i/p$.-/)\n (latexEnv := \"sublemma\")]\ntheorem Factorization.lower_score_1 {n : ℕ} (f : Factorization n) (L : ℕ)\n (hf : ∃ p ∈ (n + 1).primesBelow, f.balance p > 0) :\n ∃ f' : Factorization n,\n f'.total_imbalance < f.total_imbalance ∧ f'.score L ≤ f.score L := by\n obtain ⟨p, hp_mem, hp_pos⟩ := hf\n obtain ⟨m, hm, h_fac_pos⟩ : ∃ m ∈ f.a, 0 < m.factorization p := by\n contrapose! hp_pos\n simp_all [balance, sum]\n exact ⟨_, replace_div_total_imbalance f m p hm h_fac_pos (prime_of_mem_primesBelow hp_mem)\n hp_mem hp_pos, replace_div_score_le f m p hm h_fac_pos (prime_of_mem_primesBelow hp_mem)\n hp_mem hp_pos L⟩","line":627,"end_line":644,"proof_status":"formalized"} {"id":"balance-def","label":"balance-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["factorization-def"],"nlp_text":"The balance of a factorization \\(a_1 \\dots a_t\\) at a prime \\(p\\) is defined as the number of times \\(p\\) divides \\(a_1 \\dots a_t\\), minus the number of times \\(p\\) divides \\(n!\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.balance","latex_link":"tertiary-chapter.html#balance-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.balance","lean_decl_name":"Erdos392.Factorization.balance","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"balance-def\"\n (statement := /--\n The balance of a factorization $a_1 \\dots a_t$ at a prime $p$ is defined as the number of\n times $p$ divides $a_1 \\dots a_t$, minus the number of times $p$ divides $n!$.\n -/)]\ndef Factorization.balance {n : ℕ} (f : Factorization n) (p : ℕ) : ℤ :=\n f.sum (fun m ↦ m.factorization p) - (n.factorial.factorization p:ℤ)\n","line":43,"end_line":50,"proof_status":"formalized"} {"id":"score-def","label":"score-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["balance-def","waste-def"],"nlp_text":"The score of a factorization (relative to a cutoff parameter \\(L\\)) is equal to its waste, plus \\(\\log p\\) for every surplus prime \\(p\\), \\(\\log (n/p)\\) for every deficit prime above \\(L\\), \\(\\log L\\) for every deficit prime below \\(L\\) and an additional \\(\\log n\\) if one is not in total balance.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.score","latex_link":"tertiary-chapter.html#score-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.score","lean_decl_name":"Erdos392.Factorization.score","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"score-def\"\n (statement := /--\n The score of a factorization (relative to a cutoff parameter $L$) is equal to its waste,\n plus $\\log p$ for every surplus prime $p$, $\\log (n/p)$ for every deficit prime above $L$,\n $\\log L$ for every deficit prime below $L$ and an additional $\\log n$ if one is not in\n total balance.\n -/)]\nnoncomputable def Factorization.score {n : ℕ} (f : Factorization n) (L : ℕ) : ℝ :=\n f.waste\n + (if f.total_imbalance > 0 then Real.log n else 0)\n + ∑ p ∈ (n+1).primesBelow,\n if f.balance p > 0 then (f.balance p) * (Real.log p)\n else if p ≤ L then (-f.balance p) * (Real.log L)\n else (-f.balance p) * (Real.log (n/p))\n","line":117,"end_line":131,"proof_status":"formalized"} {"id":"limitOfConstantLeft","label":"limitOfConstantLeft","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(a:\\mathbb {R}\\to \\mathbb {C}\\) be a function, and let \\(\\sigma {\\lt}-3/2\\) be a real number. Suppose that, for all \\(\\sigma , \\sigma '{\\gt}0\\), we have \\(a(\\sigma ')=a(\\sigma )\\), and that \\(\\lim _{\\sigma \\to -\\infty }a(\\sigma )=0\\). Then \\(a(\\sigma )=0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limitOfConstantLeft","latex_link":"sect0003.html#limitOfConstantLeft","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/limitOfConstantLeft","lean_decl_name":"limitOfConstantLeft","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"limitOfConstantLeft\")\n (statement := /--\n Let $a:\\R\\to\\C$ be a function, and let $\\sigma<-3/2$ be a real number. Suppose that, for all\n $\\sigma, \\sigma'>0$, we have $a(\\sigma')=a(\\sigma)$, and that\n $\\lim_{\\sigma\\to-\\infty}a(\\sigma)=0$. Then $a(\\sigma)=0$.\n -/)\n (latexEnv := \"lemma\")]\nlemma limitOfConstantLeft {a : ℝ → ℂ} {σ : ℝ} (σlt : σ ≤ -3 / 2)\n (ha : ∀ (σ' : ℝ) (σ'' : ℝ) (_ : σ' ≤ -3 / 2) (_ : σ'' ≤ -3 / 2), a σ' = a σ'')\n (ha' : Tendsto a atBot (𝓝 0)) : a σ = 0 := by\n /--\n \\begin{align*}\n \\lim_{\\sigma'\\to-\\infty}a(\\sigma) &= \\lim_{\\sigma'\\to-\\infty}a(\\sigma') \\\\\n &= 0\n \\end{align*}\n -/\n have := eventuallyEq_of_mem (mem_atBot (-3/2)) fun σ' h ↦ ha σ' σ h σlt\n exact tendsto_const_nhds_iff.mp (ha'.congr' this)\n","line":209,"end_line":227,"proof_status":"formalized"} {"id":"fks-theorem-1-1b","label":"fks-theorem-1-1b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"Moreover, a collection of values, \\(\\varepsilon (x_0)\\) computed with well chosen parameters are provided in Table 5.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_1_1b","latex_link":"primary-chapter.html#fks-theorem-1-1b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_1_1b","lean_decl_name":"FKS.theorem_1_1b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-theorem-1-1b\"\n (title := \"FKS Theorem 1.1b\")\n (statement := /--\n Moreover, a collection of values, $\\varepsilon(x_0)$ computed with well chosen parameters are\n provided in Table 5.\n -/)]\ntheorem theorem_1_1b {log_x0 σ2 c N K ε1 ε2 ε3 ε4 ε_total : ℝ}\n (h : (log_x0, σ2, ε1, ε2, ε3, ε4, ε_total) ∈ table_5) :\n ∀ x, log x ≥ log_x0 → Eψ x ≤ ε_total := by sorry\n","line":550,"end_line":559,"proof_status":"formalized"} {"id":"bklnw-def-a-1","label":"bklnw-def-a-1","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(a_1\\) is equal to \\(1 + \\varepsilon (\\log x_1)\\) if \\(b \\leq 2\\log x_1\\), and equal to \\(1 + \\varepsilon (b/2)\\) if \\(b {\\gt} 2\\log x_1\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.Inputs.a₁","latex_link":"secondary-chapter.html#bklnw-def-a-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.Inputs.a₁","lean_decl_name":"BKLNW.Inputs.a₁","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" [ (20, 1.4263, 4)\n , (25, 1.2196, 4)\n , (30, 1.1211, 4)\n , (35, 1.07086, 5)\n , (40, 1.04320, 5)\n , (43, 1.03253, 5)\n , (100, 1 + 2.421e-4, 7)\n","line":405,"end_line":411,"proof_status":"formalized"} {"id":"sigma-def","label":"sigma-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\sigma (n)\\) is the sum of the divisors of \\(n\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.σ","latex_link":"tertiary-chapter.html#sigma-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.σ","lean_decl_name":"Lcm.σ","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" simpa [hSdef σ, y] using (tsum_eq_ofReal_T σ)\n\n have rterm_nonneg : ∀ σ n, 0 ≤ rterm σ n := by\n intro σ n\n by_cases hn : n = 0\n · subst hn; simp [rterm]\n · have hf : 0 ≤ f n := hpos n\n have hw : 0 ≤ w n := hw_nonneg n\n have hnpos : 0 < (n : ℝ) := by\n exact_mod_cast (Nat.pos_of_ne_zero hn)\n have hden : 0 < (n : ℝ) ^ σ := Real.rpow_pos_of_pos hnpos σ\n have : 0 ≤ (f n) / ((n : ℝ) ^ σ) := div_nonneg hf (le_of_lt hden)\n simp [rterm, hn, mul_nonneg this hw]\n\n have T_nonneg : ∀ σ, 0 ≤ T σ := by\n intro σ\n exact tsum_nonneg (fun n => rterm_nonneg σ n)\n\n have hT_eq_normS : ∀ σ, T σ = ‖S σ‖ := by\n intro σ\n have := hS_ofReal_T σ\n calc\n T σ = ‖Complex.ofReal (T σ)‖ := by simp [abs_of_nonneg (T_nonneg σ)]\n _ = ‖S σ‖ := by simp [this]\n\n have hboundedT : BoundedAtFilter (𝓝[>] (1 : ℝ)) (fun σ : ℝ => T σ) := by\n have : (fun σ : ℝ => T σ) = (fun σ : ℝ => ‖S σ‖) := by\n funext σ; exact hT_eq_normS σ\n simpa [this] using hbounded\n\n have rterm_antitone : ∀ n, AntitoneOn (fun σ => rterm σ n) (Set.Ioi 1) := by\n intro n\n intro σ₁ hσ₁ σ₂ hσ₂ hσ₁₂\n by_cases hn : n = 0\n · subst hn; simp [rterm]\n · have hf : 0 ≤ f n := hpos n\n have hw : 0 ≤ w n := hw_nonneg n\n have hnpos : 0 < (n : ℝ) := by exact_mod_cast (Nat.pos_of_ne_zero hn)\n have hn1 : (1 : ℝ) ≤ (n : ℝ) := by\n exact_mod_cast (Nat.one_le_iff_ne_zero.mpr hn)\n have hpow : (n : ℝ) ^ σ₁ ≤ (n : ℝ) ^ σ₂ :=\n Real.rpow_le_rpow_of_exponent_le hn1 hσ₁₂\n have hinv :\n (1 / ((n : ℝ) ^ σ₂)) ≤ (1 / ((n : ℝ) ^ σ₁)) := by\n have hpos1 : 0 < (n : ℝ) ^ σ₁ := Real.rpow_pos_of_pos hnpos σ₁\n exact one_div_le_one_div_of_le hpos1 hpow\n have hinv_inv : ((n : ℝ) ^ σ₂)⁻¹ ≤ ((n : ℝ) ^ σ₁)⁻¹ := by\n simpa [one_div] using hinv\n have hmul1 :\n (f n) * (((n : ℝ) ^ σ₂)⁻¹) ≤ (f n) * (((n : ℝ) ^ σ₁)⁻¹) :=\n","line":3140,"end_line":3189,"proof_status":"formalized"} {"id":"ZetaBnd_aux2","label":"ZetaBnd_aux2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Given \\(n ≤ t\\) and \\(\\sigma \\) with \\(1-A/\\log t \\le \\sigma \\), we have that \\[ |n^{-s}| \\le n^{-1} e^A. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux2","latex_link":"sect0003.html#ZetaBnd_aux2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux2","lean_decl_name":"ZetaBnd_aux2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaBnd-aux2\")\n (statement := /--\n Given $n ≤ t$ and $\\sigma$ with $1-A/\\log t \\le \\sigma$, we have\n that\n $$\n |n^{-s}| \\le n^{-1} e^A.\n $$\n -/)\n (proof := /--\n Use $|n^{-s}| = n^{-\\sigma}\n = e^{-\\sigma \\log n}\n \\le\n \\exp(-\\left(1-\\frac{A}{\\log t}\\right)\\log n)\n \\le\n n^{-1} e^A$,\n since $n\\le t$.\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaBnd_aux2 {n : ℕ} {t A σ : ℝ} (Apos : 0 < A) (σpos : 0 < σ) (n_le_t : n ≤ |t|)\n (σ_ge : (1 : ℝ) - A / Real.log |t| ≤ σ) :\n ‖(n : ℂ) ^ (-(σ + t * I))‖ ≤ (n : ℝ)⁻¹ * Real.exp A := by\n set s := σ + t * I\n by_cases n0 : n = 0\n · simp_rw [n0, CharP.cast_eq_zero, inv_zero, zero_mul]\n rw [Complex.zero_cpow ?_]\n · simp\n · exact fun h ↦ σpos.ne' <| zero_eq_neg.mp <| zero_re ▸ h ▸ (by simp [s])\n have n_gt_0 : 0 < n := Nat.pos_of_ne_zero n0\n have n_gt_0' : (0 : ℝ) < (n : ℝ) := Nat.cast_pos.mpr n_gt_0\n have n_ge_1 : 1 ≤ (n : ℝ) := Nat.one_le_cast.mpr <| Nat.succ_le_of_lt n_gt_0\n calc\n _ = |((n : ℝ) ^ (-σ))| := ?_\n _ ≤ Real.exp (Real.log n * -σ) := Real.abs_rpow_le_exp_log_mul (n : ℝ) (-σ)\n _ ≤ Real.exp (Real.log n * -(1 - A / Real.log t)) := ?_\n _ ≤ Real.exp (- Real.log n + A) := Real.exp_le_exp_of_le ?_\n _ ≤ _ := by rw [Real.exp_add, Real.exp_neg, Real.exp_log n_gt_0']\n · have : ‖(n : ℂ) ^ (-s)‖ = n ^ (-s.re) := norm_cpow_eq_rpow_re_of_pos n_gt_0' (-s)\n rw [this, abs_eq_self.mpr <| Real.rpow_nonneg n_gt_0'.le _]; simp [s]\n · apply Real.exp_le_exp_of_le <| mul_le_mul_of_nonneg_left _ <| Real.log_nonneg n_ge_1\n rw [neg_sub, neg_le_sub_iff_le_add, add_comm, ← Real.log_abs]; linarith\n · simp only [neg_sub, le_neg_add_iff_add_le]\n ring_nf\n conv => rw [mul_comm, ← mul_assoc, ← Real.log_abs]; rhs; rw [← one_mul A]\n gcongr\n by_cases ht1 : |t| = 1\n · simp [ht1]\n apply (inv_mul_le_iff₀ ?_).mpr\n · convert Real.log_le_log n_gt_0' n_le_t using 1; rw [mul_one]\n · exact Real.log_pos <| lt_of_le_of_ne (le_trans n_ge_1 n_le_t) <| fun t ↦ ht1 (t.symm)\n","line":1635,"end_line":1684,"proof_status":"formalized"} {"id":"ThreeFourOneTrigIdentity","label":"ThreeFourOneTrigIdentity","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have that \\[ 0\\leq 3+4\\cos \\theta +\\cos 2\\theta \\]","doc_url":null,"latex_link":"sect0004.html#ThreeFourOneTrigIdentity","lean_link":null,"lean_decl_name":"ThreeFourOneTrigIdentity","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"log_lower_2","label":"log_lower_2","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(0 \\leq t \\leq t_0 {\\lt} 1\\), one has \\(\\frac{t}{t_0} \\log (1-t_0) \\leq \\log (1-t)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_ge'","latex_link":"secondary-chapter.html#log_lower_2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_ge'","lean_decl_name":"log_ge'","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"log_lower_2\"\n (title := \"Second log lower bound\")\n (statement := /-- For $0 \\leq t \\leq t_0 < 1$, one has $\\frac{t}{t_0} \\log (1-t_0) \\leq \\log(1-t)$. -/)\n (proof := /-- Use concavity of log.-/)\n (latexEnv := \"sublemma\")]\ntheorem log_ge'\n (t t₀ : ℝ) (ht : 0 ≤ t) (ht0 : t ≤ t₀) (ht0' : t₀ < 1) :\n (t / t₀) * log (1 - t₀) ≤ log (1 - t) := by\n sorry","line":59,"end_line":68,"proof_status":"statement_formalized"} {"id":"fks2-lemma-20b","label":"fks2-lemma-20b","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["li-def"],"nlp_text":"Assume \\(x \\geq 6.58\\). Then \\(\\operatorname {Li}(x) - \\frac{x}{\\log x} {\\gt} \\frac{x-6.58}{\\log ^2 x} {\\gt} 0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_20_b","latex_link":"secondary-chapter.html#fks2-lemma-20b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_20_b","lean_decl_name":"FKS2.lemma_20_b","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":"\n@[blueprint\n \"fks2-corollary-21\"\n (title := \"FKS2 Corollary 21\")\n (statement := /--\n Let $B \\geq \\max(\\frac{3}{2}, 1 + \\frac{C^2}{16R})$. Let $x_0, x_1 > 0$ with\n $x_1 \\geq \\max(x_0, \\exp( (1 + \\frac{C}{2\\sqrt{R}})^2))$. If $E_\\psi$ satisfies an admissible\n classical bound with parameters $A_\\psi,B,C,R,x_0$, then $E_\\pi$ satisfies an admissible\n classical bound with $A_\\pi, B, C, R, x_1$, where\n $$ A_\\pi = (1 + \\nu_{asymp}(x_0)) (1 + \\mu_{asymp}(x_0, x_1)) A_\\psi$$\n for all $x \\geq x_0$, where\n $$ |E_\\theta(x)| \\leq \\varepsilon_{\\theta,asymp}(x) :=\n A (1 + \\mu_{asymp}(x_0,x)) \\exp(-C \\sqrt{\\frac{\\log x}{R}})$$\n where\n","line":588,"end_line":601,"proof_status":"statement_formalized"} {"id":"tendsto_zero_Lower","label":"tendsto_zero_Lower","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(x{\\gt}0\\) and \\(\\sigma ',\\sigma ''\\in \\mathbb {R}\\). Then \\[ \\int _{\\sigma '}^{\\sigma ''}\\frac{x^{\\sigma +it}}{(\\sigma +it)(1+\\sigma + it)}d\\sigma \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.tendsto_zero_Lower","latex_link":"sect0003.html#tendsto_zero_Lower","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.tendsto_zero_Lower","lean_decl_name":"Perron.tendsto_zero_Lower","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"tendsto_zero_Lower\"\n (title := \"tendsto-zero-Lower\")\n (statement := /--\n Let $x>0$ and $\\sigma',\\sigma''\\in\\R$. Then\n $$\\int_{\\sigma'}^{\\sigma''}\\frac{x^{\\sigma+it}}{(\\sigma+it)(1+\\sigma + it)}d\\sigma$$\n goes to $0$ as $t\\to-\\infty$.\n -/)\n (proof := /-- The numerator is bounded and the denominator tends to infinity. -/)\n (latexEnv := \"lemma\")]\nlemma tendsto_zero_Lower (xpos : 0 < x) (σ' σ'' : ℝ) :\n Tendsto (fun (t : ℝ) ↦ ∫ (σ : ℝ) in σ'..σ'', f x (σ + t * I)) atBot (𝓝 0) := by\n\n have hcast : (fun (y : ℝ) ↦ 1 / y ^ 2) =ᶠ[atBot] fun y ↦ (-y) ^ (-2 : ℝ) := by\n filter_upwards [Iic_mem_atBot 0] with y hy using\n by rw [rpow_neg (neg_nonneg.mpr hy), inv_eq_one_div, rpow_two, neg_sq]\n exact isBigO_sup.mp (horizontal_integral_isBigO xpos σ' σ'' volume)\n |>.1.trans_eventuallyEq hcast |>.trans_tendsto\n <| tendsto_rpow_neg_atTop (by norm_num) |>.comp tendsto_neg_atBot_atTop\n","line":565,"end_line":583,"proof_status":"formalized"} {"id":"Complex.norm_le_norm_two_mul_sub_of_re_le","label":"Complex.norm_le_norm_two_mul_sub_of_re_le","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(M{\\gt}0\\) and let \\(x\\) be a complex number such that \\(\\Re x\\leq M\\). Then, \\(|x|\\leq |2M - x|\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Complex.norm_le_norm_two_mul_sub_of_re_le","latex_link":"sect0004.html#Complex.norm_le_norm_two_mul_sub_of_re_le","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Complex.norm_le_norm_two_mul_sub_of_re_le","lean_decl_name":"Complex.norm_le_norm_two_mul_sub_of_re_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BorelCaratheodory.lean","lean4_code":"@[blueprint\n (statement := /--\n Let $M>0$ and let $x$ be a complex number such that $\\Re x\\leq M$.\n Then, $|x|\\leq|2M - x|$.\n -/)\n (proof := /--\n We square both sides and simplify to obtain the equivalent inequality\n $$0\\leq 4M^2 -4M\\Re x,$$\n which follows directly from the assumption $\\Re x\\leq M$ and the positivity of $M$.\n -/)\n (latexEnv := \"lemma\")]\nlemma Complex.norm_le_norm_two_mul_sub_of_re_le {M : ℝ} {x : ℂ}\n (Mpos : 0 < M) (hyp_re_x : x.re ≤ M) : ‖x‖ ≤ ‖2 * M - x‖ := by\n rw [← sq_le_sq₀ (by positivity) (by positivity)]\n repeat rw [Complex.sq_norm, Complex.normSq_apply]\n rw [calc\n (2 * M - x).re * (2 * M - x).re + (2 * M - x).im * (2 * M - x).im =\n (2 * M - x.re) * (2 * M - x.re) + x.im * x.im := by simp\n _ = x.re * x.re + (x.im * x.im + 4 * M * (M - x.re)) := by ring]\n bound","line":200,"end_line":219,"proof_status":"formalized"} {"id":"fks-theorem-3-1","label":"fks-theorem-3-1","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta","Epsi-def"],"nlp_text":"Let \\(x {\\gt} e^{50}\\) and \\(50 {\\lt} T {\\lt} x\\). Then \\(E_\\psi (x) \\leq \\sum _{|\\gamma | {\\lt} T} |x^{\\rho -1}/\\rho | + 2 \\log ^2 x / T\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_3_1","latex_link":"primary-chapter.html#fks-theorem-3-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.theorem_3_1","lean_decl_name":"FKS.theorem_3_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-theorem-3-1\"\n (title := \"FKS Theorem 3.1\")\n (statement := /--\n Let $x > e^{50}$ and $50 < T < x$. Then\n $E_\\psi(x) \\leq \\sum_{|\\gamma| < T} |x^{\\rho-1}/\\rho| + 2 \\log^2 x / T$.\n -/)]\ntheorem theorem_3_1 {x T : ℝ} (hx : x > exp 50) (hodd : ∃ X, Odd X ∧ x = X / 2)\n (hT : T ∈ Set.Ioo 50 x) :\n Eψ x ≤ riemannZeta.zeroes_sum (Set.Ioo 0 1) (Set.Ioo (-T) T)\n (fun ρ ↦ ‖x ^ (ρ - 1) / ρ‖) + 2 * (log x) ^ 2 / T := by sorry\n","line":286,"end_line":296,"proof_status":"formalized"} {"id":"buthe-theorem-2a","label":"buthe-theorem-2a","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"If \\(11 {\\lt} x \\leq 10^{19}\\), then \\(|x - \\psi (x)| \\leq 0.94\\sqrt{x}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2a","latex_link":"secondary-chapter.html#buthe-theorem-2a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Buthe.theorem_2a","lean_decl_name":"Buthe.theorem_2a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Buthe.lean","lean4_code":"@[blueprint\n \"buthe-theorem-2a\"\n (title := \"Buthe Theorem 2(a)\")\n (statement := /-- If $11 < x \\leq 10^{19}$, then $|x - \\psi(x)| \\leq 0.94\\sqrt{x}$. --/)\n (latexEnv := \"theorem\")]\ntheorem theorem_2a {x : ℝ} (hx1 : 11 < x) (hx2 : x ≤ 10 ^ 19) :\n Eψ x ≤ 0.94 / sqrt x := by sorry\n","line":24,"end_line":30,"proof_status":"formalized"} {"id":"CFunction","label":"CFunction","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(0 {\\lt} r {\\lt} R{\\lt}1\\), and \\(f:\\overline{\\mathbb {D}_1}\\to \\mathbb {C}\\) be analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)\\neq 0\\). We define a function \\(C_f:\\overline{\\mathbb {D}_R}\\to \\mathbb {C}\\) as follows. This function is constructed by dividing \\(f(z)\\) by a polynomial whose roots are the zeros of \\(f\\) inside \\(\\overline{\\mathbb {D}_r}\\). \\[ C_f(z)=\\begin{cases} \\displaystyle \\frac{f(z)}{\\prod _{\\rho \\in \\mathcal{K}_f(r)}(z-\\rho )^{m_f(\\rho )}} \\qquad \\text{for }z\\not\\in \\mathcal{K}_f(r) \\\\ \\displaystyle \\frac{h_z(z)}{\\prod _{\\rho \\in \\mathcal{K}_f(r)\\setminus \\{ z\\} } (z-\\rho )^{m_f(\\rho )}}\\qquad \\text{for }z\\in \\mathcal{K}_f(r) \\end{cases} \\]","doc_url":null,"latex_link":"sect0004.html#CFunction","lean_link":null,"lean_decl_name":"CFunction","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"IBound_aux1","label":"IBound_aux1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Given a natural number \\(k\\) and a real number \\(X_0 {\\gt} 0\\), there exists \\(C \\geq 1\\) so that for all \\(X \\geq X_0\\), \\[ \\log ^k X \\le C \\cdot X. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/IBound_aux1","latex_link":"sect0003.html#IBound_aux1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/IBound_aux1","lean_decl_name":"IBound_aux1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"\nblueprint_comment /--\nThis auxiliary lemma is useful for what follows.\n-/\n@[blueprint\n (title := \"IBound-aux1\")\n (statement := /--\n Given a natural number $k$ and a real number $X_0 > 0$, there exists $C \\geq 1$ so that for all $X \\geq X_0$,\n $$\n \\log^k X \\le C \\cdot X.\n $$\n -/)\n (proof := /--\n We use the fact that $\\log^k X / X$ goes to $0$ as $X \\to \\infty$.\n Then we use the extreme value theorem to find a constant $C$ that works for all $X \\geq X_0$.\n -/)\n (latexEnv := \"lemma\")]\nlemma IBound_aux1 (X₀ : ℝ) (X₀pos : X₀ > 0) (k : ℕ) : ∃ C ≥ 1, ∀ X ≥ X₀, Real.log X ^ k ≤ C * X := by\n -- When X is large, the ratio goes to 0.\n have ⟨M, hM⟩ := Filter.eventually_atTop.mp (isLittleO_log_rpow_rpow_atTop k zero_lt_one).eventuallyLE\n -- When X is small, use the extreme value theorem.\n let f := fun X ↦ Real.log X ^ k / X\n let I := Icc X₀ M\n have : 0 ∉ I := notMem_Icc_of_lt X₀pos\n have f_cont : ContinuousOn f (Icc X₀ M) :=\n ((continuousOn_log.pow k).mono (subset_compl_singleton_iff.mpr this)).div\n continuous_id.continuousOn (fun x hx ↦ ne_of_mem_of_not_mem hx this)\n have ⟨C₁, hC₁⟩ := isCompact_Icc.exists_bound_of_continuousOn f_cont\n use max C₁ 1, le_max_right C₁ 1\n intro X hX\n have Xpos : X > 0 := lt_of_lt_of_le X₀pos hX\n by_cases hXM : X ≤ M\n · rw[← div_le_iff₀ Xpos]\n calc\n f X ≤ ‖f X‖ := le_norm_self _\n _ ≤ C₁ := hC₁ X ⟨hX, hXM⟩\n _ ≤ max C₁ 1 := le_max_left C₁ 1\n · calc\n Real.log X ^ k ≤ ‖Real.log X ^ k‖ := le_norm_self _\n _ ≤ ‖X ^ 1‖ := by exact_mod_cast hM X (by linarith[hXM])\n _ = 1 * X := by\n rw[pow_one, one_mul]\n apply norm_of_nonneg\n","line":1772,"end_line":1814,"proof_status":"formalized"} {"id":"ZetaInvBound1","label":"ZetaInvBound1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For all \\(\\sigma {\\gt}1\\), \\[ 1/|\\zeta (\\sigma +it)| \\le |\\zeta (\\sigma )|^{3/4}|\\zeta (\\sigma +2it)|^{1/4} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaInvBound1","latex_link":"sect0003.html#ZetaInvBound1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaInvBound1","lean_decl_name":"ZetaInvBound1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaInvBound1\")\n (statement := /--\n For all $\\sigma>1$,\n $$\n 1/|\\zeta(\\sigma+it)| \\le |\\zeta(\\sigma)|^{3/4}|\\zeta(\\sigma+2it)|^{1/4}\n $$\n -/)\n (proof := /--\n The identity\n $$\n 1 \\le |\\zeta(\\sigma)|^3 |\\zeta(\\sigma+it)|^4 |\\zeta(\\sigma+2it)|\n $$\n for $\\sigma>1$\n is already proved by Michael Stoll in the EulerProducts PNT file.\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaInvBound1 {σ t : ℝ} (σ_gt : 1 < σ) :\n 1 / ‖ζ (σ + t * I)‖ ≤ ‖ζ σ‖ ^ ((3 : ℝ) / 4) * ‖ζ (σ + 2 * t * I)‖ ^ ((1 : ℝ) / 4) := by\n apply (div_le_iff₀ ?_).mpr\n · apply (Real.rpow_le_rpow_iff (z := 4) (by norm_num) ?_ (by norm_num)).mp\n · simp only [Real.one_rpow]\n rw [Real.mul_rpow, Real.mul_rpow, ← Real.rpow_mul, ← Real.rpow_mul]\n · simp only [isUnit_iff_ne_zero, ne_eq, OfNat.ofNat_ne_zero, not_false_eq_true,\n IsUnit.div_mul_cancel, Real.rpow_one]\n conv => rw [mul_assoc]; rhs; rhs; rw [mul_comm]\n rw [← mul_assoc]\n have := norm_zeta_product_ge_one (x := σ - 1) (by linarith) t\n simp_rw [ge_iff_le, norm_mul, norm_pow, ofReal_sub, ofReal_one, add_sub_cancel, ← Real.rpow_natCast] at this\n convert this using 3 <;> ring_nf\n any_goals ring_nf\n any_goals apply norm_nonneg\n any_goals apply Real.rpow_nonneg <| norm_nonneg _\n apply mul_nonneg <;> apply Real.rpow_nonneg <| norm_nonneg _\n · refine mul_nonneg (mul_nonneg ?_ ?_) ?_ <;> simp [Real.rpow_nonneg]\n · have s_ne_one : σ + t * I ≠ 1 := by\n contrapose! σ_gt; apply le_of_eq; apply And.left; simpa [Complex.ext_iff] using σ_gt\n simpa using riemannZeta_ne_zero_of_one_le_re (by simp [σ_gt.le])\n","line":2639,"end_line":2676,"proof_status":"formalized"} {"id":"integralPosAux","label":"integralPosAux","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The integral \\[ \\int _\\mathbb {R}\\frac{1}{|(1+t^2)(2+t^2)|^{1/2}}dt \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.integralPosAux","latex_link":"sect0003.html#integralPosAux","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.integralPosAux","lean_decl_name":"Perron.integralPosAux","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"lemma integralPosAux'_of_le (c₁ c₂ : ℝ) (c₁_pos : 0 < c₁) (hle : c₁ ≤ c₂) :\n 0 < ∫ (t : ℝ), 1 / ((c₁ + t ^ 2).sqrt * (c₂ + t ^ 2).sqrt) := by\n have c₂_pos : 0 < c₂ := by linarith\n have hlower (t : ℝ) : 1 / (c₂ + t ^ 2) ≤ 1 / ((c₁ + t ^ 2).sqrt * (c₂ + t ^ 2).sqrt) := by\n gcongr\n calc\n _ ≤ (c₂ + t ^ 2).sqrt * (c₂ + t ^ 2).sqrt := by gcongr\n _ ≤ c₂ + t ^ 2 := by rw [← Real.sqrt_mul, sqrt_mul_self] <;> positivity\n have hupper (t : ℝ) : 1 / ((c₁ + t ^ 2).sqrt * (c₂ + t ^ 2).sqrt) ≤ 1 / (c₁ + t ^ 2) := by\n gcongr\n calc\n _ ≥ (c₁ + t ^ 2).sqrt * (c₁ + t ^ 2).sqrt := by gcongr\n _ ≥ c₁ + t ^ 2 := by rw [← Real.sqrt_mul, sqrt_mul_self] <;> positivity\n calc 0 < ∫ t, 1 / (c₂ + t^2) := integral_one_div_const_add_sq_pos c₂ c₂_pos\n _ ≤ ∫ t, 1 / (Real.sqrt (c₁ + t^2) * Real.sqrt (c₂ + t^2)) := ?_\n refine integral_mono (Integrable.one_div_const_add_sq c₂ c₂_pos) ?_ hlower\n apply MeasureTheory.Integrable.mono (g := fun t : ℝ ↦ 1 / (c₁ + t ^ 2))\n <| Integrable.one_div_const_add_sq c₁ c₁_pos\n · refine (measurable_const.div <| Measurable.mul ?_ ?_).aestronglyMeasurable <;>\n exact (measurable_const.add <| measurable_id'.pow_const 2).sqrt\n · refine ae_of_all _ (fun x ↦ ?_)\n repeat rewrite [norm_of_nonneg (by positivity)]\n exact hupper x\n","line":334,"end_line":356,"proof_status":"formalized"} {"id":"Dusart_cor_5_5","label":"Dusart_cor_5_5","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For all \\(x \\geq 468991632\\), there exists a prime \\(p\\) such that \\[ x {\\lt} p \\leq x\\Bigl(1 + \\frac{1}{5000 \\log ^2 x}\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_5","latex_link":"secondary-chapter.html#Dusart_cor_5_5","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.corollary_5_5","lean_decl_name":"Dusart.corollary_5_5","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_cor_5_5\"\n (title := \"Dusart Corollary 5.5\")\n (statement := /--\n For all $x \\geq 468991632$, there exists a prime $p$ such that\n \\[\n x < p \\leq x\\Bigl(1 + \\frac{1}{5000 \\log^2 x}\\Bigr).\n \\]\n -/)\n (latexEnv := \"corollary\")]\ntheorem corollary_5_5 {x : ℝ} (hx : x ≥ 468991632) : HasPrimeInInterval x (x * (1 + 1 / (5000 * (log x) ^ 2))) := by sorry\n","line":343,"end_line":352,"proof_status":"formalized"} {"id":"Dusart_prop_5_16","label":"Dusart_prop_5_16","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have for \\(k \\geq 3\\), \\[ p_k \\geq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2.1}{\\log k}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_16","latex_link":"secondary-chapter.html#Dusart_prop_5_16","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_16","lean_decl_name":"Dusart.proposition_5_16","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_5_16\"\n (title := \"Dusart Proposition 5.16\")\n (statement := /--\n We have for $k \\geq 3$,\n \\[\n p_k \\geq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2.1}{\\log k}.\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_5_16 {k : ℕ} (hk : k ≥ 3) :\n nth Nat.Prime k ≥ k * Real.log k + Real.log (Real.log k) - 1 + (Real.log (Real.log k) - 2.1) / (Real.log k) := by sorry\n","line":492,"end_line":502,"proof_status":"formalized"} {"id":"e-def","label":"e-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We recall that \\(e(\\alpha ) = e^{2\\pi i \\alpha }\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.e","latex_link":"zeta-chapter.html#e-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.e","lean_decl_name":"ZetaAppendix.e","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/Fourier.lean","lean4_code":"noncomputable def e (u : ℝ) : ℝ →ᵇ ℂ where\n toFun v := 𝐞 (-v * u)\n map_bounded' :=\n ⟨2, fun x y => (dist_le_norm_add_norm _ _).trans (by simp [one_add_one_eq_two])⟩\n\n","line":22,"end_line":26,"proof_status":"formalized"} {"id":"lem:abadusepoisson","label":"abadusepoisson","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["e-def"],"nlp_text":"Let \\(a,b\\in \\mathbb {R}\\setminus \\mathbb {Z}\\), \\(b{\\gt}a{\\gt}0\\). Let \\(s\\in \\mathbb {C}\\setminus \\{ 1\\} \\). Define \\(f:\\mathbb {R}\\to \\mathbb {C}\\) by \\(f(y) = 1_{[a,b]}(y)/y^s\\). Then \\[ \\sum _{a {\\lt} n\\leq b} \\frac{1}{n^s} = \\frac{b^{1-s} - a^{1-s}}{1-s} + \\lim _{N\\to \\infty } \\sum _{n=1}^N (\\widehat{f}(n) + \\widehat{f}(-n)). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadusepoisson","latex_link":"zeta-chapter.html#lem:abadusepoisson","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_abadusepoisson","lean_decl_name":"ZetaAppendix.lemma_abadusepoisson","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:abadusepoisson\"\n (title := \"Poisson summation for a partial sum of $\\\\zeta(s)$\")\n (statement := /--\nLet $a,b\\in \\mathbb{R}\\setminus \\mathbb{Z}$, $b>a>0$. Let $s\\in \\mathbb{C}\\setminus \\{1\\}$.\nDefine $f:\\mathbb{R}\\to\\mathbb{C}$ by $f(y) = 1_{[a,b]}(y)/y^s$. Then\n$$\\sum_{a < n\\leq b} \\frac{1}{n^s} = \\frac{b^{1-s} - a^{1-s}}{1-s}\n + \\lim_{N\\to \\infty} \\sum_{n=1}^N (\\widehat{f}(n) + \\widehat{f}(-n)).$$\n-/)\n (proof := /--\nSince $a\\notin \\mathbb{Z}$, $\\sum_{a < n\\leq b} \\frac{1}{n^s} = \\sum_{n\\in \\mathbb{Z}} f(n)$.\nBy Poisson summation (as in \\cite[Thm.~D.3]{MR2378655})\n$$\\sum_{n\\in \\mathbb{Z}} f(n) = \\lim_{N\\to \\infty} \\sum_{n=-N}^N \\widehat{f}(n) =\n\\widehat{f}(0) + \\lim_{N\\to \\infty} \\sum_{n=1}^N (\\widehat{f}(n) + \\widehat{f}(-n)),$$\nwhere we use the facts that $f$ is in $L^1$, of bounded variation, and\n(by $a,b\\not\\in \\mathbb{Z}$) continuous at every integer. Now\n$$\\widehat{f}(0) = \\int_{\\mathbb{R}} f(y) dy\n = \\int_a^b \\frac{dy}{y^s} = \\frac{b^{1-s}-a^{1-s}}{1-s}.$$\n-/)\n (latexEnv := \"lemma\")\n (discussion := 568)]\ntheorem lemma_abadusepoisson {a b : ℝ} (ha : ¬∃ n : ℤ, a = n) (hb : ¬∃ n : ℤ, b = n)\n (hab : b > a) (ha' : 0 < a) {s : ℂ} (hs1 : s ≠ 1) :\n let f : ℝ → ℂ := fun y ↦\n if a ≤ y ∧ y ≤ b then (y ^ (-s.re) : ℝ) * e (-(s.im / (2 * π)) * Real.log y) else 0\n ∃ L : ℂ, Filter.atTop.Tendsto\n (fun (N : ℕ) ↦ ∑ n ∈ Ioc 1 N,\n (FourierTransform.fourier f n + FourierTransform.fourier f (-n))) (nhds L) ∧\n ∑ n ∈ Ioc ⌊a⌋₊ ⌊b⌋₊, (n : ℂ) ^ (-s) =\n ((b ^ (1 - s) : ℂ) - (a ^ (1 - s) : ℂ)) / (1 - s) + L := by\n sorry\n","line":1333,"end_line":1363,"proof_status":"statement_formalized"} {"id":"sum_eq_int_deriv","label":"sum_eq_int_deriv","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(a {\\lt} b\\), and let \\(\\phi \\) be continuously differentiable on \\([a, b]\\). Then \\[ \\sum _{a {\\lt} n \\le b} \\phi (n) = \\int _a^b \\phi (x) \\, dx + \\left(\\lfloor b \\rfloor + \\frac{1}{2} - b\\right) \\phi (b) - \\left(\\lfloor a \\rfloor + \\frac{1}{2} - a\\right) \\phi (a) - \\int _a^b \\left(\\lfloor x \\rfloor + \\frac{1}{2} - x\\right) \\phi '(x) \\, dx. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/sum_eq_int_deriv","latex_link":"sect0003.html#sum_eq_int_deriv","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/sum_eq_int_deriv","lean_decl_name":"sum_eq_int_deriv","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"sum-eq-int-deriv\")\n (statement := /--\n Let $a < b$, and let $\\phi$ be continuously differentiable on $[a, b]$.\n Then\n \\[\n \\sum_{a < n \\le b} \\phi(n) = \\int_a^b \\phi(x) \\, dx\n + \\left(\\lfloor b \\rfloor + \\frac{1}{2} - b\\right) \\phi(b)\n - \\left(\\lfloor a \\rfloor + \\frac{1}{2} - a\\right) \\phi(a)\n - \\int_a^b \\left(\\lfloor x \\rfloor + \\frac{1}{2} - x\\right) \\phi'(x) \\, dx.\n \\]\n -/)\n (proof := /--\n Specialize Abel summation from Mathlib to the trivial arithmetic function and then manipulate\n integrals.\n -/)\n (latexEnv := \"lemma\")]\nlemma sum_eq_int_deriv {φ : ℝ → ℂ} {a b : ℝ} (apos : 0 ≤ a) (a_lt_b : a < b)\n (φDiff : ∀ x ∈ [[a, b]], HasDerivAt φ (deriv φ x) x)\n (derivφCont : ContinuousOn (deriv φ) [[a, b]]) :\n ∑ n ∈ Finset.Ioc ⌊a⌋ ⌊b⌋, φ n =\n (∫ x in a..b, φ x) + (⌊b⌋ + 1 / 2 - b) * φ b - (⌊a⌋ + 1 / 2 - a) * φ a\n - ∫ x in a..b, (⌊x⌋ + 1 / 2 - x) * deriv φ x := by\n rw [uIcc_of_le a_lt_b.le] at φDiff\n have : MeasureTheory.IntegrableOn (deriv φ) (Icc a b) := by\n apply intervalIntegrable_iff_integrableOn_Icc_of_le a_lt_b.le |>.mp\n exact ContinuousOn.intervalIntegrable derivφCont\n have := sum_mul_eq_sub_sub_integral_mul (c := fun _ ↦ 1) apos a_lt_b.le\n (fun x hx ↦ (φDiff x hx).differentiableAt) this\n simp only [mul_one, Finset.sum_const, Nat.card_Icc, tsub_zero, nsmul_eq_mul, Nat.cast_add,\n Nat.cast_one] at this\n have coe :=Finset_coe_Nat_Int (fun n ↦ φ n) ⌊a⌋₊ ⌊b⌋₊\n rw [Int.natCast_floor_eq_floor apos, Int.natCast_floor_eq_floor (by linarith)] at coe\n rw [← coe]\n convert this using 1\n rw [← intervalIntegral.integral_of_le a_lt_b.le]\n rw [← Int.natCast_floor_eq_floor apos, ← Int.natCast_floor_eq_floor (by linarith)]\n have := by\n calc ∫ (t : ℝ) in a..b, deriv φ t * (↑⌊t⌋₊ + 1)\n _ = ∫ (t : ℝ) in a..b, ((↑⌊t⌋ + 1 / 2 - t) * deriv φ t - (-1/2 - t) * deriv φ t) := by\n apply intervalIntegral.integral_congr\n intro x hx\n rw [uIcc_of_le a_lt_b.le] at hx\n beta_reduce\n rw [← Int.natCast_floor_eq_floor (by linarith[hx.1])]\n simp only [Int.cast_natCast]\n ring\n _ = (∫ (t : ℝ) in a..b, (↑⌊t⌋ + 1 / 2 - t) * deriv φ t) -\n (∫ (t : ℝ) in a..b, (-1 / 2 - t) * deriv φ t) := by\n apply intervalIntegral.integral_sub\n · apply integrability_aux.mul_continuousOn derivφCont\n · apply ContinuousOn.intervalIntegrable\n exact ContinuousOn.mul (by fun_prop) derivφCont\n _ = (∫ (t : ℝ) in a..b, (⌊t⌋ + 1 / 2 - t) * deriv φ t) -\n ((-1 / 2 - b) * φ b - (-1 / 2 - a) * φ a + ∫ (x : ℝ) in a..b, φ x) := by\n rw [← uIcc_of_le a_lt_b.le] at φDiff\n rw [sum_eq_int_deriv_aux2 _ φDiff derivφCont]\n rw [this]\n ring_nf!\n","line":792,"end_line":850,"proof_status":"formalized"} {"id":"ZetaSum_aux1","label":"ZetaSum_aux1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["sum_eq_int_deriv"],"nlp_text":"Let \\(0 {\\lt} a {\\lt} b\\) be natural numbers and \\(s\\in \\mathbb {C}\\) with \\(s \\ne 1\\) and \\(s \\ne 0\\). Then \\[ \\sum _{a {\\lt} n \\le b} \\frac{1}{n^s} = \\frac{b^{1-s} - a^{1-s}}{1-s} + \\frac{b^{-s}-a^{-s}}{2} + s \\int _a^b \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaSum_aux1","latex_link":"sect0003.html#ZetaSum_aux1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaSum_aux1","lean_decl_name":"ZetaSum_aux1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaSum-aux1\")\n (statement := /--\n Let $0 < a < b$ be natural numbers and $s\\in \\C$ with $s \\ne 1$ and $s \\ne 0$.\n Then\n \\[\n \\sum_{a < n \\le b} \\frac{1}{n^s} = \\frac{b^{1-s} - a^{1-s}}{1-s} + \\frac{b^{-s}-a^{-s}}{2}\n + s \\int_a^b \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx.\n \\]\n -/)\n (proof := /-- Apply Lemma \\ref{sum_eq_int_deriv} to the function $x \\mapsto x^{-s}$. -/)\n (latexEnv := \"lemma\")]\nlemma ZetaSum_aux1 {a b : ℕ} {s : ℂ} (s_ne_one : s ≠ 1) (s_ne_zero : s ≠ 0) (ha : a ∈ Ioo 0 b) :\n ∑ n ∈ Finset.Ioc (a : ℤ) b, 1 / (n : ℂ) ^ s =\n (b ^ (1 - s) - a ^ (1 - s)) / (1 - s) + 1 / 2 * (1 / b ^ (s)) - 1 / 2 * (1 / a ^ s)\n + s * ∫ x in a..b, (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-(s + 1)) := by\n let φ := fun (x : ℝ) ↦ 1 / (x : ℂ) ^ s\n let φ' := fun (x : ℝ) ↦ -s * (x : ℂ) ^ (-(s + 1))\n have xpos : ∀ x ∈ [[(a : ℝ), b]], 0 < x := fun x hx ↦ xpos_of_uIcc ha hx\n have φDiff : ∀ x ∈ [[(a : ℝ), b]], HasDerivAt φ (deriv φ x) x :=\n fun x hx ↦ ZetaSum_aux1φDiff (xpos x hx)\n have φderiv : ∀ x ∈ [[(a : ℝ), b]], deriv φ x = φ' x := by\n exact fun x hx ↦ ZetaSum_aux1φderiv s_ne_zero (xpos x hx)\n have derivφCont : ContinuousOn (deriv φ) [[a, b]] := ZetaSum_aux1derivφCont s_ne_zero ha\n convert sum_eq_int_deriv (by linarith) (by exact_mod_cast ha.2) φDiff derivφCont using 1\n · congr <;> simp only [Int.floor_natCast]\n · rw [Int.floor_natCast, Int.floor_natCast, ← intervalIntegral.integral_const_mul]\n simp_rw [mul_div, ← mul_div, φ, ZetaSum_aux1₁ s_ne_one ha]\n conv => rhs; rw [sub_eq_add_neg]\n congr; any_goals norm_cast; simp only [one_div, add_sub_cancel_left]\n rw [← intervalIntegral.integral_neg, intervalIntegral.integral_congr]\n simp only [φ, one_div] at φderiv\n intro x hx; simp_rw [φderiv x hx, φ']; ring_nf\n","line":901,"end_line":933,"proof_status":"formalized"} {"id":"ZetaSum_aux2","label":"ZetaSum_aux2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["ZetaSum_aux1"],"nlp_text":"Let \\(N\\) be a natural number and \\(s\\in \\mathbb {C}\\), \\(\\Re (s){\\gt}1\\). Then \\[ \\sum _{N {\\lt} n} \\frac{1}{n^s} = \\frac{- N^{1-s}}{1-s} + \\frac{-N^{-s}}{2} + s \\int _N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaSum_aux2","latex_link":"sect0003.html#ZetaSum_aux2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaSum_aux2","lean_decl_name":"ZetaSum_aux2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaSum-aux2\")\n (statement := /--\n Let $N$ be a natural number and $s\\in \\C$, $\\Re(s)>1$.\n Then\n \\[\n \\sum_{N < n} \\frac{1}{n^s} = \\frac{- N^{1-s}}{1-s} + \\frac{-N^{-s}}{2}\n + s \\int_N^\\infty \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx.\n \\]\n -/)\n (proof := /-- Apply Lemma \\ref{ZetaSum_aux1} with $a=N$ and $b\\to \\infty$. -/)\n (latexEnv := \"lemma\")]\nlemma ZetaSum_aux2 {N : ℕ} (N_pos : 0 < N) {s : ℂ} (s_re_gt : 1 < s.re) :\n ∑' (n : ℕ), 1 / (n + N + 1 : ℂ) ^ s =\n (- N ^ (1 - s)) / (1 - s) - N ^ (-s) / 2\n + s * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-(s + 1)) := by\n have s_ne_zero : s ≠ 0 := fun hs ↦ by linarith [zero_re ▸ hs ▸ s_re_gt]\n have s_ne_one : s ≠ 1 := fun hs ↦ (lt_self_iff_false _).mp <| one_re ▸ hs ▸ s_re_gt\n apply tendsto_nhds_unique (X := ℂ) (Y := ℕ) (l := atTop)\n (f := fun k ↦ ((k : ℂ) ^ (1 - s) - (N : ℂ) ^ (1 - s)) / (1 - s) +\n 1 / 2 * (1 / ↑k ^ s) - 1 / 2 * (1 / ↑N ^ s)\n + s * ∫ (x : ℝ) in (N : ℝ)..k, (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-(s + 1)))\n (b := (- N ^ (1 - s)) / (1 - s) - N ^ (-s) / 2\n + s * ∫ x in Ioi (N : ℝ), (⌊x⌋ + 1 / 2 - x) * (x : ℂ) ^ (-(s + 1)))\n · apply Filter.Tendsto.congr'\n (f₁ := fun (k : ℕ) ↦ ∑ n ∈ Finset.Ioc N k, 1 / (n : ℂ) ^ s) (l₁ := atTop)\n · apply Filter.eventually_atTop.mpr\n use N + 1\n intro k hk\n convert ZetaSum_aux1 (a := N) (b := k) s_ne_one s_ne_zero ⟨N_pos, hk⟩ using 1\n convert Finset_coe_Nat_Int (fun n ↦ 1 / (n : ℂ) ^ s) N k\n · exact ZetaSum_aux3 s_re_gt\n · apply (Tendsto.sub ?_ ?_).add (Tendsto.const_mul _ ?_)\n · rw [(by ring : -↑N ^ (1 - s) / (1 - s) = (0 - ↑N ^ (1 - s)) / (1 - s) + 0)]\n apply cpow_tendsto s_re_gt |>.sub_const _ |>.div_const _ |>.add\n simp_rw [mul_comm_div, one_mul, one_div, (by congr; ring : 𝓝 (0 : ℂ) = 𝓝 ((0 : ℂ) / 2))]\n apply Tendsto.div_const <| cpow_inv_tendsto (by positivity)\n · simp_rw [mul_comm_div, one_mul, one_div, cpow_neg]; exact tendsto_const_nhds\n · exact MeasureTheory.intervalIntegral_tendsto_integral_Ioi (a := N)\n (b := (fun (n : ℕ) ↦ (n : ℝ)))\n (integrableOn_of_Zeta0_fun N_pos <| by positivity) tendsto_natCast_atTop_atTop\n","line":1113,"end_line":1153,"proof_status":"formalized"} {"id":"LogOfAnalyticFunction","label":"LogOfAnalyticFunction","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(0 {\\lt} r {\\lt} R{\\lt}1\\). Let \\(B:\\overline{\\mathbb {D}_R}\\to \\mathbb {C}\\) be analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_R}\\) with \\(B(z)\\neq 0\\) for all \\(z\\in \\overline{\\mathbb {D}_R}\\). Then there exists \\(J_B:\\overline{\\mathbb {D}_r}\\to \\mathbb {C}\\) that is analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_r}\\) such that \\(J_B(0)=0\\) \\(J_B'(z)=B'(z)/B(z)\\) \\(\\log |B(z)|-\\log |B(0)|=\\Re J_B(z)\\) for all \\(z\\in \\overline{\\mathbb {D}_r}\\).","doc_url":null,"latex_link":"sect0004.html#LogOfAnalyticFunction","lean_link":null,"lean_decl_name":"LogOfAnalyticFunction","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"bklnw-inputs","label":"bklnw-inputs","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["bklnw-cor-2-1","bknlw-theorem-2","from-buthe-eq-1-7"],"nlp_text":"We take \\(\\alpha = 1.93378 \\times 10^{-8}\\), \\(\\varepsilon \\) as in Table 8 of [ 1 ] , and \\(x_1 = 10^{19}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.Inputs.default","latex_link":"secondary-chapter.html#bklnw-inputs","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.Inputs.default","lean_decl_name":"BKLNW.Inputs.default","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"noncomputable def Inputs.default : Inputs := {\n b₁ := 0.1038\n b₂ := 0.2573\n b₃ := 9.3675\n hRvM := HSW.main_theorem\n ZDB := corollary_2_9_merged\n H₀ := 3e12\n hH₀ := PT_theorem_1\n R := 5.5666305\n hR := MT_theorem_1\n S₀ := 39.5797647802\n T₀ := 30610046000\n hS₀T₀ := table_1_prop (by unfold table_1; aesop)\n}\n","line":160,"end_line":173,"proof_status":"formalized"} {"id":"thm:dudek2014","label":"dudek2014","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} \\exp (\\exp (34.32))\\), then there is a prime in the interval \\[ \\left( x, x + 3x^{2/3} \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dudek2014.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:dudek2014","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dudek2014.has_prime_in_interval","lean_decl_name":"Dudek2014.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:dudek2014\"\n (title := \"Dudek 2014\")\n (statement := /-- If $x > \\exp(\\exp(34.32))$, then there is a prime in the interval\n \\[ \\left( x, x + 3x^{2/3} \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem Dudek2014.has_prime_in_interval (x : ℝ) (hx : x > exp (exp 34.32)) :\n HasPrimeInInterval x (3 * x ^ (2 / 3 : ℝ)) := by sorry","line":212,"end_line":220,"proof_status":"formalized"} {"id":"ChebyshevPsi","label":"ChebyshevPsi","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The (second) Chebyshev Psi function is defined as \\[ \\psi (x) := \\sum _{n \\le x} \\Lambda (n), \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ChebyshevPsi","latex_link":"sect0003.html#ChebyshevPsi","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ChebyshevPsi","lean_decl_name":"ChebyshevPsi","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint \"ChebyshevPsi\"\n (title := \"ChebyshevPsi\")\n (statement := /--\n The (second) Chebyshev Psi function is defined as\n $$\n \\psi(x) := \\sum_{n \\le x} \\Lambda(n),\n $$\n where $\\Lambda(n)$ is the von Mangoldt function.\n -/)\n (latexEnv := \"definition\")]\nnoncomputable abbrev ChebyshevPsi (x : ℝ) : ℝ :=\n Chebyshev.psi x","line":39,"end_line":50,"proof_status":"formalized"} {"id":"FsigmaDef","label":"FsigmaDef","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(\\sigma {\\gt}1\\) and \\(t\\in \\mathbb {R}\\), define \\[ F(\\sigma ) := \\zeta ^3(\\sigma )\\zeta ^2(\\sigma +it)\\zeta ^2(\\sigma -it)\\zeta (\\sigma +2it)\\zeta (\\sigma -2it). \\]","doc_url":null,"latex_link":"sect0004.html#FsigmaDef","lean_link":null,"lean_decl_name":"FsigmaDef","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"logan-function","label":"logan-function","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We define Logan’s function \\[ \\ell _{c,\\varepsilon }(\\xi ) = \\frac{c}{\\sinh c} \\frac{\\sin (\\sqrt{(\\xi \\varepsilon )^2 - c^2})}{\\sqrt{(\\xi \\varepsilon )^2 - c^2}}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.ℓ","latex_link":"primary-chapter.html#logan-function","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.ℓ","lean_decl_name":"BKLNW_app.ℓ","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":true,"source_repo":"mathlib","source_path":"./Mathlib/Topology/MetricSpace/GromovHausdorff.lean","lean4_code":"/-- setoid instance identifying two isometric nonempty compact subspaces of ℓ^∞(ℝ) -/\n","line":73,"end_line":73,"proof_status":"formalized"} {"id":"prop:dadaro","label":"dadaro","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(s = \\sigma + i \\tau \\), \\(\\sigma \\geq 0\\), \\(\\tau \\in \\mathbb {R}\\), with \\(s\\ne 1\\). Let \\(a\\in \\mathbb {Z} + \\frac{1}{2}\\) with \\(a{\\gt}\\frac{|\\tau |}{2\\pi }\\). Then \\begin{equation} \\label{eq:abadlondie} \\zeta (s) = \\sum _{n\\leq a} \\frac{1}{n^s} - \\frac{a^{1-s}}{1-s} + c_\\vartheta a^{-s} + O^*\\left(\\frac{C_{\\sigma ,\\vartheta }}{a^{\\sigma +1}}\\right), \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.proposition_dadaro","latex_link":"zeta-chapter.html#prop:dadaro","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.proposition_dadaro","lean_decl_name":"ZetaAppendix.proposition_dadaro","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"prop:dadaro\"\n (title := \"Approximation of zeta(s) by a partial sum\")\n (statement := /--\nLet $s = \\sigma + i \\tau$, $\\sigma\\geq 0$, $\\tau\\in \\mathbb{R}$, with $s\\ne 1$.\nLet $a\\in \\mathbb{Z} + \\frac{1}{2}$ with $a>\\frac{|\\tau|}{2\\pi}$. Then\n\\begin{equation}\\label{eq:abadlondie}\n \\zeta(s) = \\sum_{n\\leq a} \\frac{1}{n^s} - \\frac{a^{1-s}}{1-s} + c_\\vartheta a^{-s}\n + O^*\\left(\\frac{C_{\\sigma,\\vartheta}}{a^{\\sigma+1}}\\right),\n\\end{equation}\nwhere $\\vartheta = \\frac{\\tau}{2\\pi a}$,\n$c_\\vartheta = \\frac{i}{2} \\left(\\frac{1}{\\sin \\pi \\vartheta} - \\frac{1}{\\pi \\vartheta}\\right)$\nfor $\\vartheta\\ne 0$, $c_0 =0$, and $C_{\\sigma,\\vartheta}$ is as in \\eqref{eq:defcsigth}.\n-/)\n (proof := /--\nAssume first that $\\sigma>0$. Let $b\\in \\mathbb{Z}+\\frac{1}{2}$ with $b>a$, and define\n$f(y) = \\frac{1_{[a,b]}(y)}{y^s}$.\nBy Lemma~\\ref{lem:abadtoabsum} and Lemma~\\ref{lem:abadusepoisson},\n$$\\sum_{n\\leq a} \\frac{1}{n^s} = \\zeta(s) + \\frac{a^{1-s}}{1-s}\n - \\lim_{N\\to \\infty} \\sum_{n=1}^N (\\widehat{f}(n) + \\widehat{f}(-n))\n + O^*\\left(\\frac{2 |s|}{\\sigma b^\\sigma}\\right).$$\nWe apply Lemma~\\ref{lem:abadsumas} to estimate\n$\\lim_{N\\to \\infty} \\sum_{n=1}^N (\\widehat{f}(n) + \\widehat{f}(-n))$. We obtain\n\\[\\sum_{n\\leq a} \\frac{1}{n^s} = \\zeta(s) + \\frac{a^{1-s}}{1-s} -\n\\frac{a^{-s} g(\\vartheta)}{2 i} + O^*\\left(\\frac{C_{\\sigma,\\vartheta}}{a^{\\sigma+1}}\\right)\n+ \\frac{b^{-s} g(\\vartheta_-)}{2 i} + O^*\\left(\\frac{2 |s|}{\\sigma b^\\sigma}\\right),\n\\]\nwhere $\\vartheta_- = \\frac{\\tau}{2\\pi b}$ and $g(t)$ is as in Lemma~\\ref{lem:abadsumas},\nand so $-\\frac{g(\\vartheta)}{2 i} = c_\\vartheta$.\nWe let $b\\to \\infty$ through the half-integers, and obtain \\eqref{eq:abadlondie},\nsince $b^{-\\sigma}\\to 0$, $\\vartheta_-\\to 0$ and $g(\\vartheta_-)\\to g(0) = 0$\nas $b\\to \\infty$.\n\nFinally, the case $\\sigma=0$ follows since all terms in \\eqref{eq:abadlondie} extend\ncontinuously to $\\sigma=0$.\n-/)\n (latexEnv := \"proposition\")\n (discussion := 573)]\ntheorem proposition_dadaro {s : ℂ} (hs1 : s ≠ 1) (hsigma : 0 ≤ s.re) {a : ℝ} (ha : 0 < a)\n (ha' : a.IsHalfInteger) (haτ : a > |s.im| / (2 * π)) :\n let ϑ : ℝ := s.im / (2 * π * a)\n let C : ℝ :=\n if ϑ ≠ 0 then\n s.re / 2 * ((1 / (Complex.sin (π * ϑ) ^ 2 : ℂ)).re - (1 / ((π * ϑ) ^ 2 : ℂ)).re) +\n |ϑ| / (2 * π ^ 2) * ((1 / ((1 - |ϑ|) ^ 3 : ℝ)) + 2 * (riemannZeta 3).re - 1)\n else\n s.re / 6\n let c : ℂ :=\n if ϑ ≠ 0 then\n I / 2 * ((1 / Complex.sin (π * ϑ) : ℂ) - (1 / (π * ϑ : ℂ)))\n else\n 0\n ∃ E : ℂ, riemannZeta s =\n ∑ n ∈ Icc 1 ⌊a⌋₊, (n : ℂ) ^ (-s) -\n (a ^ (1 - s) : ℂ) / (1 - s) + c * (a ^ (-s) : ℂ) + E ∧\n ‖E‖ ≤ C / (a ^ (s.re + 1 : ℝ)) := by\n sorry\n","line":1772,"end_line":1828,"proof_status":"statement_formalized"} {"id":"Dusart_thm_3_3","label":"Dusart_thm_3_3","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"We have \\(|\\psi (x) - x| {\\lt} \\eta _k x / \\log ^k x\\) for \\(x \\geq 2\\) with \\((k,\\eta )\\) given by the table in [ 9 , Theorem 3.3 ] .","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_3_3","latex_link":"secondary-chapter.html#Dusart_thm_3_3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_3_3","lean_decl_name":"Dusart.theorem_3_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_thm_3_3\"\n (title := \"Dusart Theorem 3.3\")\n (statement := /--\n We have $|\\psi(x) - x| < \\eta_k x / \\log^k x$ for $x \\geq 2$ with $(k,\\eta)$ given by the table in \\cite[Theorem 3.3]{Dusart2018}.-/)\n (latexEnv := \"theorem\")]\ntheorem theorem_3_3 {k : ℕ} {η : ℝ} (h : (k, η) ∈ Table_3_3) {x : ℝ} (hx : x ≥ 2) :\n Eψ x ≤ η / (log x) ^ k := by sorry\n","line":77,"end_line":83,"proof_status":"formalized"} {"id":"ZetaBnd_aux1a","label":"ZetaBnd_aux1a","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any \\(0 {\\lt} a {\\lt} b\\) and \\(s \\in \\mathbb {C}\\) with \\(\\sigma =\\Re (s){\\gt}0\\), \\[ \\int _a^b \\left|\\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx\\right| \\le \\frac{a^{-\\sigma }-b^{-\\sigma }}{\\sigma }. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1a","latex_link":"sect0003.html#ZetaBnd_aux1a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaBnd_aux1a","lean_decl_name":"ZetaBnd_aux1a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"ZetaBnd-aux1a\")\n (statement := /--\n For any $0 < a < b$ and $s \\in \\C$ with $\\sigma=\\Re(s)>0$,\n $$\n \\int_a^b \\left|\\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx\\right|\n \\le \\frac{a^{-\\sigma}-b^{-\\sigma}}{\\sigma}.\n $$\n -/)\n (proof := /--\n Apply the triangle inequality\n $$\n \\left|\\int_a^b \\frac{\\lfloor x\\rfloor + 1/2 - x}{x^{s+1}} \\, dx\\right|\n \\le \\int_a^b \\frac{1}{x^{\\sigma+1}} \\, dx,\n $$\n and evaluate the integral.\n -/)\n (latexEnv := \"lemma\")]\nlemma ZetaBnd_aux1a {a b : ℝ} (apos : 0 < a) (a_lt_b : a < b) {s : ℂ} (σpos : 0 < s.re) :\n ∫ x in a..b, ‖(⌊x⌋ + 1 / 2 - x) / (x : ℂ) ^ (s + 1)‖ ≤\n (a ^ (-s.re) - b ^ (-s.re)) / s.re := by\n calc\n _ = ∫ x in a..b, |(⌊x⌋ + 1 / 2 - x)| / x ^ (s+1).re := ZetaSum_aux1_4 apos a_lt_b\n _ ≤ ∫ x in a..b, 1 / x ^ (s.re + 1) := ZetaSum_aux1_5 apos a_lt_b σpos\n _ = (a ^ (-s.re) - b ^ (-s.re)) / s.re := ?_\n refine ZetaSum_aux1_2 (c := s.re) apos a_lt_b ⟨ne_of_gt σpos, ?_⟩\n exact fun h ↦ (lt_self_iff_false 0).mp <| ZetaSum_aux1_1 apos a_lt_b h\n","line":1018,"end_line":1044,"proof_status":"formalized"} {"id":"R-def","label":"R-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Q-def"],"nlp_text":"\\(R(x) = Q(x) - x / \\zeta (2)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.R","latex_link":"primary-chapter.html#R-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.R","lean_decl_name":"MobiusLemma.R","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Consequences.lean","lean4_code":"noncomputable def R (x : ℝ) : ℝ := Psi x - x\n","line":1734,"end_line":1734,"proof_status":"formalized"} {"id":"mobius-lemma-2","label":"mobius-lemma-2","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["R-def","M-def"],"nlp_text":"For any \\(x{\\gt}0\\) and any integer \\(K\\geq 0\\), \\begin{equation} \\label{eq:singdot} \\begin{aligned} R(x) & = \\sum _{k\\leq K} M\\left(\\sqrt{\\frac{x}{k}}\\right) - \\int _0^{K+\\frac{1}{2}} M\\left(\\sqrt{\\frac{x}{u}}\\right) du \\\\ & -\\sum _{K {\\lt} k\\leq x+1} \\int _{k-\\frac{1}{2}}^{k+\\frac{1}{2}} \\left(M\\left(\\sqrt{\\frac{x}{u}}\\right) -M\\left(\\sqrt{\\frac{x}{k}}\\right)\\right) du \\end{aligned} \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_2","latex_link":"primary-chapter.html#mobius-lemma-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_2","lean_decl_name":"MobiusLemma.mobius_lemma_2","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MobiusLemma.lean","lean4_code":"@[blueprint\n \"mobius-lemma-2\"\n (title := \"Mobius Lemma 2\")\n (statement := /--\n For any $x>0$ and any integer $K\\geq 0$,\n \\begin{equation}\\label{eq:singdot}\n \\begin{aligned}\n R(x) &= \\sum_{k\\leq K} M\\left(\\sqrt{\\frac{x}{k}}\\right) -\n \\int_0^{K+\\frac{1}{2}} M\\left(\\sqrt{\\frac{x}{u}}\\right) du \\\\\n &-\\sum_{K < k\\leq x+1} \\int_{k-\\frac{1}{2}}^{k+\\frac{1}{2}}\n \\left(M\\left(\\sqrt{\\frac{x}{u}}\\right) -M\\left(\\sqrt{\\frac{x}{k}}\\right)\\right) du\n \\end{aligned}\n \\end{equation}\n -/)\n (proof := /--\n We split into two cases. If $K>x$, the second line of \\eqref{eq:singdot} is empty, and the\n first one equals \\eqref{eq:antenor}, by $M(t)=0$ for $t<1$, so \\eqref{eq:singdot} holds.\n\n Now suppose that $K \\leq x$. Then we combine Sublemma \\ref{mobius-lemma-2-sub-1} and Sublemma\n \\ref{mobius-lemma-2-sub-2} with Lemma \\ref{mobius-lemma-1} to give the claim.\n -/)\n (latexEnv := \"lemma\")\n (discussion := 530)]\ntheorem mobius_lemma_2 (x : ℝ) (hx : x > 0) (K : ℕ) : R x =\n ∑ k ∈ Finset.range (K + 1), M (Real.sqrt (x / k)) -\n ∫ u in 0..(K + 0.5), (M (Real.sqrt (x / u)) : ℝ) -\n ∑ k ∈ Finset.Ico (K + 1) (⌊x⌋₊ + 2),\n ∫ u in (k - 0.5)..(k + 0.5), (M (Real.sqrt (x / u)) - M (Real.sqrt (x / k)) : ℝ) -\n 2 * x *\n ∑ k ∈ Finset.Ico (K + 1) (⌊x⌋₊ + 1),\n ∫ t in Real.sqrt (x / (k + 0.5))..Real.sqrt (x / (k - 0.5)),\n ((M t - M (Real.sqrt (x / k))) : ℝ) / t ^ 3 := by sorry\n","line":490,"end_line":521,"proof_status":"statement_formalized"} {"id":"mobius-lemma-1","label":"mobius-lemma-1","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["R-def","mobius-lemma-1-sub"],"nlp_text":"For any \\(x{\\gt}0\\), \\begin{equation} \\label{eq:antenor} R(x) = \\sum _{k\\leq x} M\\left(\\sqrt{\\frac{x}{k}}\\right) - \\int _0^x M\\left(\\sqrt{\\frac{x}{u}}\\right) du. \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_1","latex_link":"primary-chapter.html#mobius-lemma-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_1","lean_decl_name":"MobiusLemma.mobius_lemma_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MobiusLemma.lean","lean4_code":"@[blueprint\n \"mobius-lemma-1\"\n (title := \"Mobius Lemma 1\")\n (statement := /--\n For any $x>0$,\n \\begin{equation}\\label{eq:antenor}\n R(x) = \\sum_{k\\leq x} M\\left(\\sqrt{\\frac{x}{k}}\\right) -\n \\int_0^x M\\left(\\sqrt{\\frac{x}{u}}\\right) du.\n \\end{equation}\n -/)\n (proof := /--\n The equality is immediate from Theorem \\ref{mobius-lemma-1-sub} and exchanging the order of\n $\\sum$ and $\\int$, as is justified by\n $\\sum_n |\\mu(n)|\\int_0^{x/n^2} du \\leq \\sum_n x/n^2 < \\infty$)\n $$\\int_0^x M\\left(\\sqrt{\\frac{x}{u}}\\right) du = \\int_0^x \\sum_{n\\leq \\sqrt{\\frac{x}{u}}}\n \\mu(n) du = \\sum_n \\mu(n) \\int_0^{\\frac{x}{n^2}} du = x \\sum_n \\frac{\\mu(n)}{n^2}\n = \\frac{x}{\\zeta(2)}.$$\n -/)\n (latexEnv := \"lemma\")\n (discussion := 527)]\ntheorem mobius_lemma_1 (x : ℝ) (hx : x > 0) :\n R x = ∑ k ∈ Ioc 0 ⌊x⌋₊, M (sqrt (x / k)) - ∫ u in 0..x, (M (sqrt (x / u)) : ℝ) := by\n unfold R\n congr 1\n · exact mod_cast mobius_lemma_1_sub x hx ▸ rfl\n · rw [integral_M_sqrt_div x hx, div_eq_mul_inv, mul_eq_mul_left_iff]\n exact Or.inl <| by simpa using sum_moebius_div_sq.symm\n","line":369,"end_line":395,"proof_status":"formalized"} {"id":"fks2-eq-19","label":"fks2-eq-19","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The Dawson function \\(D_+ : \\mathbb {R} \\to \\mathbb {R}\\) is defined by the formula \\(D_+(x) := e^{-x^2} \\int _0^x e^{t^2}\\ dt\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.dawson","latex_link":"secondary-chapter.html#fks2-eq-19","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.dawson","lean_decl_name":"FKS2.dawson","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (discussion := 616)]\ntheorem remark_after_corollary_11 :\n ∃ x₀ : ℝ, x₀ ∈ Set.Icc 0.924 0.925 ∧ (∀ x, dawson x ≤ dawson x₀) ∧\n StrictAntiOn dawson (Set.Ioi x₀) := sorry\n\n@[blueprint\n \"fks2-lemma-12\"\n","line":235,"end_line":241,"proof_status":"formalized"} {"id":"fks2-proposition-17","label":"fks2-proposition-17","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"Let \\(x {\\gt} x_0 {\\gt} 2\\). If \\(E_\\psi (x) \\leq \\varepsilon _{\\psi ,num}(x_0)\\), then \\[ - \\varepsilon _{\\theta ,num}(x_0) \\leq \\frac{\\theta (x)-x}{x} \\leq \\varepsilon _{\\psi ,num}(x_0) \\leq \\varepsilon _{\\theta ,num}(x_0) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.proposition_17","latex_link":"secondary-chapter.html#fks2-proposition-17","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.proposition_17","lean_decl_name":"FKS2.proposition_17","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" Assume $x \\geq 6.58$. Then $\\Li(x) - \\frac{x}{\\log x}$ is strictly increasing and\n $\\Li(x) - \\frac{x}{\\log x} > \\frac{x-6.58}{\\log^2 x} > 0$.\n -/)\n (latexEnv := \"lemma\")]\ntheorem lemma_20_b {x : ℝ} (hx : x ≥ 6.58) :\n Li x - x / log x > (x - 6.58) / (log x) ^ 2 ∧\n (x - 6.58) / (log x) ^ 2 > 0 :=\n sorry\n\n\n\n@[blueprint\n \"fks2-theorem-6\"\n (title := \"FKS2 Theorem 6\")\n (latexEnv := \"theorem\")]\ntheorem theorem_6 {x₀ x₁ : ℝ} (x₂ : EReal) (h : x₁ ≥ max x₀ 14)\n {N : ℕ} (b : Fin (N + 1) → ℝ) (hmono : Monotone b)\n (h_b_start : b 0 = log x₀)\n (h_b_end : b (Fin.last N) = log x₁)\n (εθ_num : ℝ → ℝ)\n (h_εθ_num : Eθ.numericalBound x₁ εθ_num) (x : ℝ) (hx₁ : x₁ ≤ x) (hx₂ : x.toEReal ≤ x₂) :\n Eπ x ≤ επ_num b εθ_num x₀ x₁ x₂ :=\n sorry\n\n@[blueprint\n \"fks2-theorem-6\"\n (title := \"FKS2 Theorem 6\")\n (statement := /--\n Let $x_0 > 0$ be chosen such that $\\pi(x_0)$ and $\\theta(x_0)$ are computable, and let\n $x_1 \\geq \\max(x_0, 14)$. Let $\\{b_i\\}_{i=1}^N$ be a finite partition of\n","line":506,"end_line":535,"proof_status":"statement_formalized"} {"id":"bklnw-eq_A_26","label":"bklnw-eq_A_26","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"For \\(100 \\leq x \\leq 10^{19}\\), one has \\[ | (x - \\psi (x)) / \\sqrt{x} | \\leq 0.94. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_26","latex_link":"primary-chapter.html#bklnw-eq_A_26","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_26","lean_decl_name":"BKLNW_app.bklnw_eq_A_26","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_26\"\n (title := \"Equation (A.26)\")\n (statement := /-- For $100 \\leq x \\leq 10^{19}$, one has\n $$ | (x - \\psi(x)) / \\sqrt{x} | \\leq 0.94. $$ -/)\n (proof := /-- This follows from Theorem \\ref{buthe-theorem-2a}. TODO: create a primary Buthe section to place this result -/)]\ntheorem bklnw_eq_A_26 (x : ℝ) (hx1 : 100 ≤ x) (hx2 : x ≤ 1e19) :\n Eψ x ≤ 0.94 / sqrt x := by sorry","line":206,"end_line":213,"proof_status":"statement_formalized"} {"id":"Massias_Robin_thm_Bv","label":"Massias_Robin_thm_Bv","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"We have for \\(k \\geq 198\\), \\[ \\vartheta (p_k) \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2}{\\log k}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.massias_robin_thm_Bv","latex_link":"secondary-chapter.html#Massias_Robin_thm_Bv","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.massias_robin_thm_Bv","lean_decl_name":"Dusart.massias_robin_thm_Bv","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Massias_Robin_thm_Bv\"\n (title := \"Massias and Robin Theorem B (v)\")\n (statement := /--\n We have for $k \\geq 198$,\n \\[\n \\vartheta(p_k) \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2}{\\log k}.\n \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem massias_robin_thm_Bv {k : ℕ} (hk : k ≥ 198) :\n θ (nth Nat.Prime k) ≤ k * Real.log k + Real.log (Real.log k) - 1 + (Real.log (Real.log k) - 2) / (Real.log k) := by sorry\n","line":420,"end_line":430,"proof_status":"formalized"} {"id":"bij","label":"bij","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The Fourier transform is a bijection on the Schwartz class. [Note: only surjectivity is actually used.]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/fourier_surjection_on_schwartz","latex_link":"sect0002.html#bij","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/fourier_surjection_on_schwartz","lean_decl_name":"fourier_surjection_on_schwartz","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (title := \"Bijectivity of Fourier transform\")\n (statement := /--\n The Fourier transform is a bijection on the Schwartz class. [Note: only surjectivity is\n actually used.]\n -/)\n (proof := /--\n This is a standard result in Fourier analysis.\n It can be proved here by appealing to Mellin inversion, Theorem \\ref{MellinInversion}.\n In particular, given $f$ in the Schwartz class, let\n $F : \\R_+ \\to \\C : x \\mapsto f(\\log x)$ be a function in the ``Mellin space''; then the\n Mellin transform of $F$ on the imaginary axis $s=it$ is the Fourier transform of $f$.\n The Mellin inversion theorem gives Fourier inversion.\n -/)\n (latexEnv := \"lemma\")]\nlemma fourier_surjection_on_schwartz (f : 𝓢(ℝ, ℂ)) : ∃ g : 𝓢(ℝ, ℂ), 𝓕 g = f := by\n refine ⟨𝓕⁻ f, ?_⟩\n exact FourierTransform.fourier_fourierInv_eq f\n\n\n","line":1823,"end_line":1841,"proof_status":"formalized"} {"id":"zeroes-of-riemann-zeta","label":"zeroes-of-riemann-zeta","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\rho \\) is understood to lie in the set \\(\\{ s: \\zeta (s)=0\\} \\), counted with multiplicity. We will often restrict the zeroes \\(\\rho \\) to a rectangle \\(\\{ \\Re \\rho \\in I, \\Im \\rho \\in J \\} \\), for instance through sums of the form \\(\\sum _{\\Re \\rho \\in I, \\Im \\rho \\in J} f(\\rho )\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.zeroes","latex_link":"zeta-chapter.html#zeroes-of-riemann-zeta","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.zeroes","lean_decl_name":"riemannZeta.zeroes","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaDefinitions.lean","lean4_code":"@[blueprint\n \"zeroes-of-riemann-zeta\"\n (statement := /--\n $\\rho$ is understood to lie in the set $\\{s: \\zeta(s)=0\\}$, counted with multiplicity. We will\n often restrict the zeroes $\\rho$ to a rectangle $\\{ \\Re \\rho \\in I, \\Im \\rho \\in J \\}$, for\n instance through sums of the form $\\sum_{\\Re \\rho \\in I, \\Im \\rho \\in J} f(\\rho)$.\n -/)]\n-- Note that the junk value of zeta at s=1 is known to be nonzero\nnoncomputable def riemannZeta.zeroes : Set ℂ := {s : ℂ | riemannZeta s = 0}\n","line":11,"end_line":19,"proof_status":"formalized"} {"id":"bklnw-eq_A_7","label":"bklnw-eq_A_7","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta"],"nlp_text":"Let \\(x \\geq e^{1000}\\) and \\(T\\) satisfies \\(50 {\\lt} T \\leq x\\). Then \\[ \\frac{\\psi (x) - x}{x} = \\sum _{|\\gamma | {\\lt} T} \\frac{x^{\\rho - 1}}{\\rho } + \\mathcal{O}^*\\left(\\frac{2(\\log x)^2}{T}\\right) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_7","latex_link":"primary-chapter.html#bklnw-eq_A_7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_eq_A_7","lean_decl_name":"BKLNW_app.bklnw_eq_A_7","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-eq_A_7\"\n (title := \"Equation (A.7)\")\n (statement := /-- Let $x \\geq e^{1000}$ and $T$ satisfies $50 < T \\leq x$. Then\n $$ \\frac{\\psi(x) - x}{x} = \\sum_{|\\gamma| < T} \\frac{x^{\\rho - 1}}{\\rho} + \\mathcal{O}^*\\left(\\frac{2(\\log x)^2}{T}\\right) $$ where $A = \\mathcal{O}^*(B)$ means $|A| \\leq B$. -/)\n (proof := /-- See \\cite[Theorem 1.3]{Dudek}. -/)\n (latexEnv := \"sublemma\")]\ntheorem bklnw_eq_A_7 (x T : ℝ) (hx : x ≥ exp 1000) (hT1 : 50 < T) (hT2 : T ≤ x) : ∃ E, ((ψ x - x) / x = riemannZeta.zeroes_sum (Set.Icc 0 1) (Set.Ioo (-T) T) (fun ρ ↦ x^(ρ-1) / ρ) + E ∧ ‖E‖ ≤ 2 * (log x)^2 / T) := by sorry","line":30,"end_line":37,"proof_status":"statement_formalized"} {"id":"bklnw-sigma_1_def","label":"bklnw-sigma_1_def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["zeroes-of-riemann-zeta"],"nlp_text":"We denote \\[ \\Sigma _1 := \\sum _{|\\gamma | \\leq T; \\beta {\\lt} 1 - \\delta } \\frac{x^{\\rho - 1}}{\\rho } \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Sigma₁","latex_link":"primary-chapter.html#bklnw-sigma_1_def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.Sigma₁","lean_decl_name":"BKLNW_app.Sigma₁","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-sigma_1_def\"\n (title := \"Definition of Sigma 1\")\n (statement := /-- We denote $$ \\Sigma_1 := \\sum_{|\\gamma| \\leq T; \\beta < 1 - \\delta} \\frac{x^{\\rho - 1}}{\\rho} $$ -/)]\nnoncomputable def Sigma₁ (x T δ : ℝ) : ℂ := riemannZeta.zeroes_sum (Set.Ico 0 (1 - δ)) (Set.Ioo (-T) T) (fun ρ ↦ x^(ρ-1) / ρ)","line":46,"end_line":50,"proof_status":"formalized"} {"id":"mobius-lemma-2-sub-2","label":"mobius-lemma-2-sub-2","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["M-def"],"nlp_text":"For any \\(K \\leq x\\), for \\(f(u) = M(\\sqrt{x/u})\\), \\[ \\sum _{K {\\lt} k\\leq x+1} \\int _{k-\\frac{1}{2}}^{k+\\frac{1}{2}} f(u) du = \\int _{K+\\frac{1}{2}}^{\\lfloor x\\rfloor + \\frac{3}{2}} f(u) du = \\int _{K+\\frac{1}{2}}^x f(u) du, \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_2_sub_2","latex_link":"primary-chapter.html#mobius-lemma-2-sub-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_2_sub_2","lean_decl_name":"MobiusLemma.mobius_lemma_2_sub_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MobiusLemma.lean","lean4_code":"@[blueprint\n \"mobius-lemma-2-sub-2\"\n (title := \"Mobius Lemma 2 - second step\")\n (statement := /--\n For any $K \\leq x$, for $f(u) = M(\\sqrt{x/u})$,\n \\[\\sum_{K < k\\leq x+1} \\int_{k-\\frac{1}{2}}^{k+\\frac{1}{2}} f(u) du =\n \\int_{K+\\frac{1}{2}}^{\\lfloor x\\rfloor + \\frac{3}{2}} f(u) du =\n \\int_{K+\\frac{1}{2}}^x f(u) du,\\]\n -/)\n (proof := /--\n This is just splitting the integral at $K$, since $f(u) = M(\\sqrt{x/u}) = 0$ for $x>u$.\n -/)\n (latexEnv := \"sublemma\")\n (discussion := 529)]\ntheorem mobius_lemma_2_sub_2 (x : ℝ) (K : ℕ) (hK : (K : ℝ) ≤ x) :\n let f : ℝ → ℝ := fun u ↦ (M (sqrt (x / u)) : ℝ)\n ∑ k ∈ Ico (K + 1) (⌊x⌋₊ + 2), ∫ u in (k - 0.5)..(k + 0.5), f u =\n ∫ u in (K + 0.5)..(⌊x⌋₊ + 1.5), f u := by\n intro f\n have h_split : ∑ k ∈ Ico (K + 1) (⌊x⌋₊ + 2), ∫ u in ((k : ℝ) - 0.5)..((k : ℝ) + 0.5), f u =\n ∫ u in (↑(K + 1) - 0.5)..(↑(⌊x⌋₊ + 2) - 0.5), f u := by\n rw [sum_Ico_eq_sum_range]\n convert intervalIntegral.sum_integral_adjacent_intervals _ using 3\n · push_cast; ring\n · rw [Nat.add_sub_of_le (by linarith [Nat.le_floor hK])]\n · intro k hk\n apply_rules [IntegrableOn.intervalIntegrable]\n refine Integrable.mono' (g := fun u ↦ 2 ^ (Nat.floor (Real.sqrt (x / u)))) ?_ ?_ ?_\n · refine Integrable.mono'\n (g := fun u ↦ 2 ^ (Nat.floor (Real.sqrt (x / ((K + 1 + k : ℝ) - 0.5))) + 1)) ?_ ?_ ?_\n · exact Continuous.integrableOn_Icc (by continuity)\n · exact aestronglyMeasurable <| by measurability\n · filter_upwards [ae_restrict_mem measurableSet_Icc] with u hu\n norm_num at *\n refine pow_le_pow_right₀ (by norm_num) ?_\n refine Nat.le_of_lt_succ ?_\n rw [Nat.floor_lt', Real.sqrt_lt'] <;> norm_num <;> try positivity\n rw [div_lt_iff₀]\n · have := Nat.lt_floor_add_one (Real.sqrt (x / (K + 1 + k - 1 / 2)))\n rw [sqrt_lt' <| by positivity] at this\n rw [div_lt_iff₀] at this <;>\n nlinarith [show (⌊sqrt (x / (K + 1 + k - 1 / 2))⌋₊ : ℝ) ≥ 0 by positivity]\n · linarith\n · refine aestronglyMeasurable ?_\n have h_meas_floor : Measurable (fun u ↦ Nat.floor (sqrt (x / u))) :=\n nat_floor (.sqrt (measurable_const.div measurable_id'))\n have h_meas_sum : Measurable (fun n : ℕ ↦ ∑ k ∈ Ioc 0 n, (moebius k : ℤ)) := by fun_prop\n exact Measurable.comp (by fun_prop) (h_meas_sum.comp h_meas_floor)\n · refine Filter.Eventually.of_forall fun u ↦ ?_\n norm_num [f, M, moebius]\n refine le_trans (abs_sum_le_sum_abs ..) ?_\n refine le_trans (sum_le_sum (g := fun _ ↦ 1) fun i hi ↦ ?_) ?_\n · split_ifs <;> norm_num\n · induction ⌊sqrt (x / u)⌋₊ with\n | zero => simp\n | succ n ih =>\n norm_num [Nat.pow_succ', sum_Ioc_succ_top] at *\n rw [pow_succ']\n linarith [show (1 : ℝ) ≤ 2 ^ n by exact one_le_pow₀ (by norm_num)]\n convert h_split using 2 <;>\n · push_cast; ring\n","line":428,"end_line":488,"proof_status":"formalized"} {"id":"M-def","label":"M-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(M(x)\\) is the summatory function of the Möbius function.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.M","latex_link":"primary-chapter.html#M-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.M","lean_decl_name":"MobiusLemma.M","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Lcm.lean","lean4_code":" \\item \\(M < L_n\\).\n \\item\n \\[\n 1 < \\frac{L_n}{M} = \\Bigl(1 - \\frac{r}{q_1 q_2 q_3}\\Bigr)^{-1}\n < \\Bigl(1 - \\frac{4 p_1 p_2 p_3}{q_1 q_2 q_3}\\Bigr)^{-1}.\n \\]\n \\end{enumerate}\n -/)\n (proof := /--\n","line":447,"end_line":455,"proof_status":"formalized"} {"id":"mobius-lemma-1-sub","label":"mobius-lemma-1-sub","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["M-def","Q-def"],"nlp_text":"For any \\(x{\\gt}0\\), \\[ Q(x) = \\sum _{k\\leq x} M\\left(\\sqrt{\\frac{x}{k}}\\right) \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_1_sub","latex_link":"primary-chapter.html#mobius-lemma-1-sub","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.mobius_lemma_1_sub","lean_decl_name":"MobiusLemma.mobius_lemma_1_sub","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MobiusLemma.lean","lean4_code":"@[blueprint\n \"mobius-lemma-1-sub\"\n (title := \"Mobius Lemma 1, initial step\")\n (statement := /--\n For any $x>0$, $$Q(x) = \\sum_{k\\leq x} M\\left(\\sqrt{\\frac{x}{k}}\\right)$$.\n -/)\n (proof := /--\n We compute\n $$Q(x) = \\sum_{n\\leq x} \\sum_{d: d^2|n} \\mu(d) = \\sum_{k, d: k d^2\\leq x} \\mu(d)$$\n giving the claim.\n -/)\n (latexEnv := \"sublemma\")\n (discussion := 526)]\ntheorem mobius_lemma_1_sub (x : ℝ) (hx : x > 0) :\n Q x = ∑ k ∈ Ioc 0 ⌊x⌋₊, M (sqrt (x / k)) := by\n have h_exercise : ∑ n ∈ Ioc 0 ⌊x⌋₊, (if Squarefree n then 1 else 0) =\n ∑ k ∈ Ioc 0 ⌊x⌋₊, ∑ d ∈ filter (fun d ↦ d ^ 2 ∣ k) (Nat.divisors k), (moebius d : ℤ) :=\n sum_congr rfl fun n hn ↦ by\n rw [← sum_sq_div_moebius_eq_squarefree n (mem_Ioc.mp hn).1]; rfl\n have h_rewrite : ∑ k ∈ Ioc 0 ⌊x⌋₊, ∑ d ∈ filter (fun d ↦ d ^ 2 ∣ k) (Nat.divisors k),\n (moebius d : ℤ) = ∑ d ∈ Icc 1 ⌊sqrt x⌋₊, ∑ k ∈ Icc 1 ⌊x / (d ^ 2)⌋₊, (moebius d : ℤ) := by\n have h_reorder : ∑ k ∈ Ioc 0 ⌊x⌋₊, ∑ d ∈ filter (fun d ↦ d ^ 2 ∣ k) (Nat.divisors k),\n (moebius d : ℤ) =\n ∑ d ∈ Icc 1 ⌊sqrt x⌋₊, ∑ k ∈ filter (fun k ↦ d ^ 2 ∣ k) (Ioc 0 ⌊x⌋₊),\n (moebius d : ℤ) := by\n repeat rw [sum_sigma']\n apply sum_bij (fun p hp ↦ ⟨p.snd, p.fst⟩)\n · simp only [mem_sigma, mem_Ioc, mem_filter, Nat.mem_divisors, mem_Icc, and_imp] at *\n exact fun a ha₁ ha₂ ha₃ ha₄ ha₅ ↦ ⟨⟨Nat.pos_of_dvd_of_pos ha₃ ha₁, Nat.le_floor <|\n le_sqrt_of_sq_le <| le_trans (mod_cast Nat.le_of_dvd ha₁ ha₅) (Nat.floor_le hx.le |>\n le_trans (Nat.cast_le.mpr ha₂))⟩, ⟨ha₁, ha₂⟩, ha₅⟩\n · aesop\n · simp only [mem_sigma, mem_Icc, mem_filter, mem_Ioc, Nat.mem_divisors, Sigma.exists,\n and_imp]\n exact fun b hb₁ hb₂ hb₃ hb₄ hb₅ ↦\n ⟨b.snd, b.fst, ⟨⟨hb₃, hb₄⟩, ⟨dvd_of_mul_left_dvd hb₅, by grind⟩, hb₅⟩, rfl⟩\n · grind\n have h_div : ∀ d ∈ Icc 1 ⌊sqrt x⌋₊,\n filter (fun k ↦ d ^ 2 ∣ k) (Ioc 0 ⌊x⌋₊) =\n image (fun m ↦ d ^ 2 * m) (Icc 1 ⌊x / (d ^ 2)⌋₊) := by\n intro d hd\n ext k\n simp only [mem_filter, mem_Ioc, mem_image, mem_Icc]\n refine ⟨fun hk ↦ ?_, ?_⟩\n · obtain ⟨a, rfl⟩ := hk.2\n refine ⟨a, ⟨by nlinarith [mem_Icc.mp hd], Nat.le_floor ?_⟩, rfl⟩\n rw [le_div_iff₀ (by norm_cast; nlinarith [mem_Icc.mp hd])]\n exact Nat.floor_le hx.le |> le_trans (mod_cast by nlinarith)\n · simp only [mem_Icc, forall_exists_index, and_imp] at *\n rintro m hm₁ hm₂ rfl\n refine ⟨⟨by nlinarith, ?_⟩, dvd_mul_right _ _⟩\n rw [Nat.le_floor_iff (by positivity), le_div_iff₀ (by norm_cast; nlinarith)] at *\n norm_cast at *\n simpa [mul_comm] using hm₂\n simp_all only [sum_const]\n exact sum_congr rfl fun i hi ↦ by\n rw [card_image_of_injective _ fun a b h ↦\n mul_left_cancel₀ (pow_ne_zero 2 <| Nat.ne_of_gt <| (mem_Icc.mp hi).1) h]\n have h_interchange : ∑ d ∈ Icc 1 ⌊Real.sqrt x⌋₊, ∑ k ∈ Icc 1 ⌊x / (d ^ 2)⌋₊, (moebius d : ℤ) =\n ∑ k ∈ Ioc 0 ⌊x⌋₊, ∑ d ∈ Icc 1 ⌊Real.sqrt (x / k)⌋₊, (moebius d : ℤ) := by\n rw [sum_sigma', sum_sigma']\n apply sum_bij (fun p hp ↦ ⟨p.snd, p.fst⟩)\n · norm_num at *\n refine fun a ha₁ ha₂ ha₃ ha₄ ↦ ⟨⟨ha₃, ha₄.trans (Nat.floor_mono <| div_le_self hx.le <|\n mod_cast Nat.one_le_pow _ _ ha₁)⟩, ha₁, ?_⟩\n rw [Nat.le_floor_iff (by positivity), le_div_iff₀ (by positivity)] at *\n exact le_sqrt_of_sq_le (by nlinarith [mul_self_sqrt (Nat.cast_nonneg a.snd)])\n · grind\n · simp only [Nat.cast_nonneg, sqrt_div', mem_sigma, mem_Ioc, mem_Icc, Sigma.exists,\n and_imp] at *\n refine fun ⟨a, b⟩ ha hb ha' hb' ↦ ⟨b, a, ?_, rfl⟩\n rw [Nat.le_floor_iff (by positivity), le_div_iff₀] at * <;> norm_num at *\n · refine ⟨⟨ha', le_trans (le_mul_of_one_le_right (by positivity)\n (le_sqrt_of_sq_le (mod_cast ha))) hb'⟩, ha, Nat.le_floor ?_⟩\n rw [le_div_iff₀ (by positivity)]\n nlinarith [mul_self_sqrt (Nat.cast_nonneg a), mul_self_sqrt (show 0 ≤ x by positivity),\n sqrt_nonneg a, sqrt_nonneg x, mul_le_mul_of_nonneg_left hb' (sqrt_nonneg a),\n mul_le_mul_of_nonneg_left hb' (sqrt_nonneg a)]\n · positivity\n · intro a ha; simp_all\n simp_all only [Q, M, sum_boole, Nat.cast_id]; rfl\n","line":159,"end_line":239,"proof_status":"formalized"} {"id":"bklnw-thm-1b","label":"bklnw-thm-1b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(k\\) be an integer with \\(1 \\leq k \\leq 5\\). For any fixed \\(X_0 \\geq 1\\), there exists \\(m_k {\\gt} 0\\) such that, for all \\(x \\geq X_0\\) \\[ x(1 - \\frac{m_k}{(\\log x)^k}) \\leq \\theta (x). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.thm_1b","latex_link":"secondary-chapter.html#bklnw-thm-1b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.thm_1b","lean_decl_name":"BKLNW.thm_1b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" -/)]\nnoncomputable def Inputs.A (I : Inputs) (σ x₀ : ℝ) : ℝ :=\n 2.0025 * 25^(-2 * σ) * I.c1 σ + I.c3 σ x₀ + I.c4 σ x₀ + I.c5 σ x₀\n\n@[blueprint\n \"bklnw-eq_A_21\"\n (title := \"Equation (A.21)\")\n (statement := /-- We define\n $$ B = 5/2 - \\sigma, $$\n and\n $$ C = 16 \\sigma/3 - \\frac{10}{3}. $$\n -/)]\nnoncomputable def Inputs.B (_ : Inputs) (σ : ℝ) : ℝ := 5/2 - σ\n\n@[blueprint\n","line":653,"end_line":667,"proof_status":"formalized"} {"id":"DerivUpperBnd_aux7","label":"DerivUpperBnd_aux7","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any \\(s = \\sigma + tI \\in \\mathbb {C}\\), \\(1/2 \\le \\sigma \\le 2, 3 {\\lt} |t|\\), and any \\(0 {\\lt} A {\\lt} 1\\) sufficiently small, and \\(1-A/\\log |t| \\le \\sigma \\), we have \\[ \\left\\| s \\cdot \\int _{N}^{\\infty } \\left(\\left\\lfloor x \\right\\rfloor + \\frac{1}{2} - x\\right) \\cdot x^{-s-1} \\cdot (-\\log x) \\right\\| \\le 2 \\cdot |t| \\cdot N^{-\\sigma } / \\sigma \\cdot \\log |t|. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DerivUpperBnd_aux7","latex_link":"sect0003.html#DerivUpperBnd_aux7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/DerivUpperBnd_aux7","lean_decl_name":"DerivUpperBnd_aux7","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"DerivUpperBnd-aux7\")\n (statement := /--\n For any $s = \\sigma + tI \\in \\C$, $1/2 \\le \\sigma\\le 2, 3 < |t|$, and any $0 < A < 1$\n sufficiently small, and $1-A/\\log |t| \\le \\sigma$, we have\n $$\n \\left\\|s \\cdot \\int_{N}^{\\infty}\n \\left(\\left\\lfloor x \\right\\rfloor + \\frac{1}{2} - x\\right) \\cdot x^{-s-1} \\cdot (-\\log x)\n \\right\\|\n \\le 2 \\cdot |t| \\cdot N^{-\\sigma} / \\sigma \\cdot \\log |t|.\n $$\n -/)\n (proof := /--\n Estimate $|s|= |\\sigma + tI|$ by $|s|\\le 2 +|t| \\le 2|t|$ (since $|t|>3$).\n Estimating $|\\left\\lfloor x \\right\\rfloor+1/2-x|$ by $1$,\n and using $|x^{-s-1}| = x^{-\\sigma-1}$, we have\n $$\n \\left\\| s \\cdot \\int_{N}^{\\infty}\n \\left(\\left\\lfloor x \\right\\rfloor + \\frac{1}{2} - x\\right) \\cdot x^{-s-1} \\cdot (-\\log x)\n \\right\\|\n \\le 2 \\cdot |t|\n \\int_{N}^{\\infty} x^{-\\sigma} \\cdot (\\log x).\n $$\n For the last integral, integrate by parts, getting:\n $$\n \\int_{N}^{\\infty} x^{-\\sigma-1} \\cdot (\\log x) =\n \\frac{1}{\\sigma}N^{-\\sigma} \\cdot \\log N + \\frac1{\\sigma^2} \\cdot N^{-\\sigma}.\n $$\n Now use $\\log N \\le \\log |t|$ to get the result.\n -/)\n (latexEnv := \"lemma\")]\ntheorem DerivUpperBnd_aux7 {A σ t : ℝ} (t_gt : 3 < |t|) (hσ : σ ∈ Icc (1 - A / |t|.log) 2) :\n let N := ⌊|t|⌋₊;\n let s := ↑σ + ↑t * I;\n 0 < N → ↑N ≤ |t| → s ≠ 1 → 1 / 2 < σ →\n ‖s * ∫ (x : ℝ) in Ioi (N : ℝ), (↑⌊x⌋ + 1 / 2 - ↑x) * (x : ℂ) ^ (-s - 1) * -↑x.log‖ ≤\n 6 * |t| * ↑N ^ (-σ) / σ * |t|.log := by\n intro N s Npos N_le_t neOne σ_gt\n have σpos : 0 < σ := lt_trans (by norm_num) σ_gt\n rw [norm_mul, (by ring : 6 * |t| * ↑N ^ (-σ) / σ * Real.log |t| = (2 * |t|) * (3 * ↑N ^ (-σ) / σ * Real.log |t|))]\n apply mul_le_mul _ _ (by positivity) (by positivity)\n · apply le_trans (by apply norm_add_le)\n simp [abs_of_pos σpos]\n linarith [hσ.2]\n apply le_trans (by apply norm_integral_le_integral_norm)\n calc ∫ (x : ℝ) in Ioi (N : ℝ), ‖(↑⌊x⌋ + 1 / 2 - ↑x) * (x : ℂ) ^ (-s - 1) * -↑x.log‖\n _ = ∫ (x : ℝ) in Ioi (N : ℝ), |(↑⌊x⌋ + 1 / 2 - x)| * x ^ (-σ - 1) * x.log := by\n apply setIntegral_congr_fun (by measurability)\n intro x hx\n simp only [mem_Ioi] at hx\n exact DerivUpperBnd_aux7_1 (lt_of_le_of_lt (mod_cast Npos) hx).le\n _ ≤ ∫ (x : ℝ) in Ioi (N : ℝ), x ^ (-σ - 1) * x.log := by\n apply setIntegral_mono_on _ _ (by measurability)\n · intro x hx\n exact DerivUpperBnd_aux7_2 (lt_of_le_of_lt (mod_cast Npos) hx).le\n · apply DerivUpperBnd_aux7_5 σpos (mod_cast Npos)\n apply DerivUpperBnd_aux7_4 σpos (mod_cast Npos)\n _ = 1 / σ^2 * N ^ (-σ) + 1 / σ * N ^ (-σ) * Real.log N :=\n DerivUpperBnd_aux7_integral_eq (mod_cast Npos) σpos\n _ ≤ 3 * ↑N ^ (-σ) / σ * |t|.log := by\n have h2 : 1 / σ * ↑N ^ (-σ) * Real.log ↑N ≤ ↑N ^ (-σ) / σ * Real.log |t| := calc\n _ = ↑N ^ (-σ) / σ * Real.log N := by ring\n _ ≤ _ := by\n apply mul_le_mul_of_nonneg_left _ (by positivity)\n exact Real.log_le_log (mod_cast Npos) N_le_t\n have : 2 ≤ 2 * Real.log |t| := by\n nth_rewrite 1 [← mul_one 2]\n apply mul_le_mul_of_nonneg_left _ (by norm_num)\n exact logt_gt_one t_gt.le |>.le\n have h1 : 1 / σ^2 * ↑N ^ (-σ) ≤ 2 * ↑N ^ (-σ) / σ * Real.log |t| := calc\n 1 / σ^2 * ↑N ^ (-σ) = (↑N ^ (-σ) / σ) * (1 / σ) := by ring\n _ ≤ ↑N ^ (-σ) / σ * (2 * Real.log |t|):= by\n apply mul_le_mul_of_nonneg_left _ (by positivity)\n apply le_trans _ this\n exact (one_div_le σpos (by norm_num)).mpr σ_gt.le\n _ = _ := by ring\n convert add_le_add h1 h2 using 1\n ring\n","line":2137,"end_line":2214,"proof_status":"formalized"} {"id":"fks-remark-3-7","label":"fks-remark-3-7","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(\\sigma {\\lt} 1 - 1/R \\log H_0\\) then \\(H_σ = H_0\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.remark_3_7","latex_link":"primary-chapter.html#fks-remark-3-7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.remark_3_7","lean_decl_name":"FKS.remark_3_7","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-remark-3-7\"\n (title := \"FKS Remark 3.7\")\n (statement := /-- If $\\sigma < 1 - 1/R \\log H_0$ then $H_σ = H_0$. -/)]\ntheorem remark_3_7 {H₀ R σ : ℝ} (hσ : σ < 1 - 1 / (R * log H₀)) : Hσ H₀ R σ = H₀ := by sorry\n","line":366,"end_line":370,"proof_status":"formalized"} {"id":"symm_inv_log","label":"symm_inv_log","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(0 {\\lt} t \\leq 1/2\\), one has \\(| \\frac{1}{\\log (1+t)} + \\frac{1}{\\log (1-t)}| \\leq \\frac{\\log (4/3)}{4/3}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/symm_inv_log","latex_link":"secondary-chapter.html#symm_inv_log","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/symm_inv_log","lean_decl_name":"symm_inv_log","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"symm_inv_log\"\n (title := \"Symmetrization of inverse log\")\n (statement := /-- For $0 < t \\leq 1/2$, one has $| \\frac{1}{\\log(1+t)} + \\frac{1}{\\log(1-t)}| \\leq \\frac{\\log(4/3)}{4/3}$. -/)\n (proof := /-- The expression can be written as $\\frac{|\\log(1-t^2)|}{|\\log(1-t)| |\\log(1+t)|}$. Now use the previous upper and lower bounds, noting that $t^2 \\leq 1/4$. -/)\n (latexEnv := \"sublemma\")]\ntheorem symm_inv_log\n (t : ℝ) (ht : 0 < t) (ht' : t ≤ 1 / 2) :\n |1 / log (1 + t) + 1 / log (1 - t)| ≤ log (4 / 3) / (4 / 3) := by\n sorry","line":70,"end_line":79,"proof_status":"statement_formalized"} {"id":"classical-zero-free-region","label":"classical-zero-free-region","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We say that one has a classical zero-free region with parameter \\(R\\) if \\(zeta(s)\\) has no zeroes in the region \\(Re(s) \\geq 1 - 1 / R * \\log |\\Im s|\\) for \\(\\Im (s) {\\gt} 3\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.classicalZeroFree","latex_link":"zeta-chapter.html#classical-zero-free-region","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/riemannZeta.classicalZeroFree","lean_decl_name":"riemannZeta.classicalZeroFree","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaDefinitions.lean","lean4_code":"@[blueprint\n \"classical-zero-free-region\"\n (title := \"Section 1.1, FKS2\")\n (statement := /--\n We say that one has a classical zero-free region with parameter $R$ if $zeta(s)$ has no zeroes\n in the region $Re(s) \\geq 1 - 1 / R * \\log |\\Im s|$ for $\\Im(s) > 3$.\n -/)]\nnoncomputable def riemannZeta.classicalZeroFree (R : ℝ) :=\n ∀ (σ t : ℝ), t ≥ 3 → σ ≥ 1 - 1 / (R * log t) →\n riemannZeta (σ + t * Complex.I) ≠ 0\n","line":45,"end_line":54,"proof_status":"formalized"} {"id":"fks-lemma-5-3","label":"fks-lemma-5-3","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"For all \\(2100 {\\lt} \\log x \\leq 200000\\) we have that \\[ E_\\psi (x) \\leq 9.22022(\\log x)^{3/2} \\exp \\left(-0.8476836\\sqrt{\\log x}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_5_4","latex_link":"primary-chapter.html#fks-lemma-5-3","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_5_4","lean_decl_name":"FKS.lemma_5_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-lemma-5-3\"\n (title := \"FKS Lemma 5.3\")\n (statement := /--\n For all $2100 < \\log x \\leq 200000$ we have that\n \\[\n E_\\psi(x) \\leq 9.22022(\\log x)^{3/2} \\exp\\left(-0.8476836\\sqrt{\\log x}\\right).\n \\]\n -/)]\ntheorem lemma_5_4 {x : ℝ} (h : log x ∈ Set.Ioc 2100 200000) :\n Eψ x ≤ 9.22022 * (log x) ^ (3 / 2) * exp (-0.8476836 * sqrt (log x)) := by sorry\n","line":573,"end_line":583,"proof_status":"formalized"} {"id":"SetOfZeros","label":"SetOfZeros","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(R{\\gt}0\\) and \\(f:\\overline{\\mathbb {D}_R}\\to \\mathbb {C}\\). Define the set of zeros \\(\\mathcal{K}_f(R)=\\{ \\rho \\in \\mathbb {C}:|\\rho |\\leq R,\\, f(\\rho )=0\\} \\).","doc_url":null,"latex_link":"sect0004.html#SetOfZeros","lean_link":null,"lean_decl_name":"SetOfZeros","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"lem:aachra","label":"aachra","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(g:[a,b]\\to \\mathbb {R}\\) be continuous, with \\(|g(t)|\\) non-increasing. Then \\(g\\) is monotone, and \\(\\| g\\| _{\\mathrm{TV}} = |g(a)|-|g(b)|\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachra","latex_link":"zeta-chapter.html#lem:aachra","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachra","lean_decl_name":"ZetaAppendix.lemma_aachra","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:aachra\"\n (title := \"Total variation of a function with monotone absolute value\")\n (statement := /--\nLet $g:[a,b]\\to \\mathbb{R}$ be continuous, with $|g(t)|$ non-increasing. Then\n$g$ is monotone, and $\\|g\\|_{\\mathrm{TV}} = |g(a)|-|g(b)|$.\n-/)\n (proof := /--\nSuppose $g$ changed sign: $g(a')>0>g(b')$ or $g(a') <0 < g(b')$ for some\n$a\\leq a'< b'\\leq b$. By IVT, there would be an $r\\in [a',b']$ such that $g(r)=0$.\nSince $|g|$ is non-increasing, $g(b')=0$; contradiction. So, $g$ does not change sign:\neither $g\\leq 0$ or $g\\geq 0$.\n\nThus, there is an $\\varepsilon\\in \\{-1,1\\}$ such that $g(t) = \\varepsilon |g(t)|$ for all\n$t\\in [a,b]$. Hence, $g$ is monotone. Then $\\|g\\|_{\\mathrm{TV}} = |g(a)-g(b)|$.\nSince $|g(a)|\\geq |g(b)|$ and $g(a)$, $g(b)$ are either both non-positive or non-negative,\n$|g(a)-g(b)| = |g(a)|-|g(b)|$.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 547)]\ntheorem lemma_aachra {a b : ℝ} (ha : a < b) (g : ℝ → ℝ)\n (hg_cont : ContinuousOn g (Set.Icc a b))\n (hg_mon : AntitoneOn (fun t ↦ |g t|) (Set.Icc a b)) :\n BoundedVariationOn g (Set.Icc a b) ∧\n (eVariationOn g (Set.Icc a b)).toReal = |g a| - |g b| := by\n have h_no_sign_change : (∀ t ∈ Set.Icc a b, g t ≥ 0) ∨ (∀ t ∈ Set.Icc a b, g t ≤ 0) := by\n by_contra h_contra\n obtain ⟨a', b', ha', hb', hab', h_sign⟩ :\n ∃ a' b' : ℝ, a ≤ a' ∧ a' < b' ∧ b' ≤ b ∧ (g a' > 0 ∧ g b' < 0) ∨\n (∃ a' b' : ℝ, a ≤ a' ∧ a' < b' ∧ b' ≤ b ∧ (g a' < 0 ∧ g b' > 0)) := by\n simp only [Set.mem_Icc, and_imp, not_or, not_forall, not_le, exists_and_left] at *\n obtain ⟨⟨x, hx₁, hx₂, hx₃⟩, ⟨y, hy₁, hy₂, hy₃⟩⟩ := h_contra\n cases lt_trichotomy x y with\n | inl hxy => exact ⟨x, y, Or.inr ⟨x, hx₁, y, by grind, by grind, hx₃, hy₃⟩⟩\n | inr h => cases h with\n | inl heq => grind\n | inr hxy => exact ⟨y, x, Or.inl ⟨by grind, hxy, by grind, hy₃, hx₃⟩⟩\n · obtain ⟨c, hc⟩ : ∃ c ∈ Set.Ioo a' b', g c = 0 := by\n refine intermediate_value_Ioo' (by grind) (hg_cont.mono <| Set.Icc_subset_Icc ha' hab')\n ⟨?_, ?_⟩ <;> linarith [h_sign.1, h_sign.2]\n have := hg_mon ⟨by linarith [hc.1.1], by linarith [hc.1.2]⟩\n ⟨by linarith [hc.1.1], by linarith [hc.1.2]⟩ hc.1.2.le\n aesop\n · obtain ⟨a', b', ha', hb', hab', h₁, h₂⟩ := ‹_›\n obtain ⟨c, hc⟩ : ∃ c ∈ Set.Ioo a' b', g c = 0 := by\n apply intermediate_value_Ioo\n · grind\n · exact hg_cont.mono (Set.Icc_subset_Icc ha' hab')\n · constructor <;> grind\n have := hg_mon ⟨by linarith [hc.1.1], by linarith [hc.1.2]⟩\n ⟨by linarith [hc.1.1], by linarith [hc.1.2]⟩ hc.1.2.le\n simp_all\n rcases h_no_sign_change with h | h\n · have h_monotone : AntitoneOn g (Set.Icc a b) := fun x hx y hy hxy => by\n simpa only [abs_of_nonneg (h x hx), abs_of_nonneg (h y hy)] using hg_mon hx hy hxy\n have h_total_variation : eVariationOn g (Set.Icc a b) = ENNReal.ofReal (g a - g b) := by\n refine le_antisymm ?_ ?_\n · refine csSup_le ?_ ?_ <;> norm_num\n · exact ⟨_, ⟨⟨0, ⟨fun _ ↦ a, fun _ _ _ ↦ by grind, fun _ ↦ ⟨by grind, by grind⟩⟩⟩, rfl⟩⟩\n · rintro _ n x hx₁ hx₂ rfl\n calc ∑ i ∈ range n, edist (g (x (i + 1))) (g (x i))\n ≤ ∑ i ∈ range n, ENNReal.ofReal (g (x i) - g (x (i + 1))) := by\n refine sum_le_sum (fun i _ ↦ ?_)\n simp only [edist_dist, sub_nonneg, h_monotone (hx₂ i) (hx₂ (i + 1)) (hx₁ (Nat.le_succ _)),\n ENNReal.ofReal_le_ofReal_iff]\n rw [dist_eq_norm, Real.norm_of_nonpos] <;>\n linarith [h_monotone (hx₂ i) (hx₂ (i + 1)) (hx₁ (Nat.le_succ _))]\n _ ≤ ENNReal.ofReal (g a - g b) := by\n rw [← ENNReal.ofReal_sum_of_nonneg] <;> norm_num\n · apply ENNReal.ofReal_le_ofReal\n have := sum_range_sub' (fun i ↦ g (x i)) n\n norm_num at *\n linarith [h_monotone ⟨le_refl a, ha.le⟩ (hx₂ 0) (by linarith [hx₂ 0]),\n h_monotone (hx₂ n) ⟨ha.le, le_refl b⟩ (by linarith [hx₂ n])]\n · exact fun i hi ↦ h_monotone (hx₂ i) (hx₂ (i + 1)) (hx₁ (Nat.le_succ _))\n · refine le_csSup ?_ ?_ <;> norm_num\n refine ⟨1, fun i ↦ if i = 0 then a else b, ?_, ?_⟩ <;> norm_num [Monotone]\n · grind\n · simp only [edist_dist, dist_eq_norm, norm_eq_abs, abs_sub_comm, abs_of_nonneg\n (sub_nonneg.mpr (h_monotone (Set.left_mem_Icc.mpr ha.le) (Set.right_mem_Icc.mpr ha.le) ha.le))]\n rw [h_total_variation, ENNReal.toReal_ofReal]\n · constructor\n · exact ne_of_lt <| lt_of_le_of_lt h_total_variation.le ENNReal.ofReal_lt_top\n · rw [abs_of_nonneg <| h a <| Set.left_mem_Icc.mpr ha.le,\n abs_of_nonneg <| h b <| Set.right_mem_Icc.mpr ha.le]\n · linarith [h_monotone (Set.left_mem_Icc.mpr ha.le) (Set.right_mem_Icc.mpr ha.le) ha.le]\n · have h_monotone : MonotoneOn g (Set.Icc a b) := fun x hx y hy hxy ↦ by have := hg_mon hx hy hxy; grind\n have h_bounded_variation : eVariationOn g (Set.Icc a b) = ENNReal.ofReal (g b - g a) := by\n refine le_antisymm ?_ ?_\n · refine csSup_le ?_ ?_ <;> norm_num\n · exact ⟨_, ⟨⟨0, ⟨fun _ ↦ a, fun _ _ _ ↦ by grind, fun _ ↦ ⟨by grind, by grind⟩⟩⟩, rfl⟩⟩\n · rintro _ n x hx₁ hx₂ rfl\n calc ∑ i ∈ range n, edist (g (x (i + 1))) (g (x i))\n ≤ ∑ i ∈ range n, ENNReal.ofReal (g (x (i + 1)) - g (x i)) := by\n refine sum_le_sum (fun i _ ↦ ?_)\n rw [edist_dist, dist_eq_norm, Real.norm_of_nonneg (sub_nonneg.mpr (h_monotone (hx₂ _)\n (hx₂ _) (hx₁ (Nat.le_succ _))))]\n _ ≤ ENNReal.ofReal (g b - g a) := by\n rw [← ENNReal.ofReal_sum_of_nonneg]\n · rw [sum_range_sub (fun i ↦ g (x i))]\n apply ENNReal.ofReal_le_ofReal\n have hx0_mem : x 0 ∈ Set.Icc a b := ⟨by linarith [hx₂ 0], by linarith [hx₂ 0]⟩\n have hxn_mem : x n ∈ Set.Icc a b := ⟨by linarith [hx₂ n], by linarith [hx₂ n]⟩\n linarith [h_monotone ⟨le_refl a, ha.le⟩ hx0_mem (by linarith [hx₂ 0]),\n h_monotone hxn_mem ⟨ha.le, le_refl b⟩ (by linarith [hx₂ n])]\n · exact fun i hi ↦ sub_nonneg_of_le <| h_monotone (hx₂ _) (hx₂ _) <| hx₁ <| Nat.le_succ _\n · refine le_csSup ?_ ?_ <;> norm_num\n refine ⟨1, fun i ↦ if i = 0 then a else b, ?_, ?_⟩ <;> norm_num [Monotone]\n · grind\n · simp [edist_dist, Real.dist_eq, abs_of_nonneg, h_monotone (show a ∈ Set.Icc a b by\n constructor <;> grind) (show b ∈ Set.Icc a b by constructor <;> grind) ha.le]\n simp_all only [Set.mem_Icc, and_imp]\n constructor\n · rw [BoundedVariationOn]\n exact ne_of_lt (lt_of_le_of_lt h_bounded_variation.le ENNReal.ofReal_lt_top)\n · rw [ENNReal.toReal_ofReal (sub_nonneg.mpr (h_monotone ⟨by grind, by grind⟩ ⟨by grind, by grind⟩ ha.le)),\n abs_of_nonpos (h a le_rfl ha.le), abs_of_nonpos (h b ha.le le_rfl)]\n ring\n","line":113,"end_line":230,"proof_status":"formalized"} {"id":"Dusart_prop_3_2","label":"Dusart_prop_3_2","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"For \\(x \\geq e^{b}\\) we have \\(\\psi (x) - x| \\leq \\varepsilon \\), where \\(b, \\varepsilon \\) are given by [ 9 , Table 1 ] .","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_3_2","latex_link":"secondary-chapter.html#Dusart_prop_3_2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_3_2","lean_decl_name":"Dusart.proposition_3_2","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_3_2\"\n (title := \"Dusart Proposition 3.2\")\n (statement := /--\n For $x \\geq e^{b}$ we have $\\psi(x) - x| \\leq \\varepsilon$, where $b, \\varepsilon$ are given by \\cite[Table 1]{Dusart2018}.-/)\n (latexEnv := \"proposition\")]\ntheorem proposition_3_2 {b σ₀ : ℝ} {m : ℕ} {δ T₁ ε : ℝ} (h : (b, σ₀, m, δ, T₁, ε) ∈ Table1)\n{x : ℝ} (hx : x ≥ exp b) : Eψ x ≤ ε := by sorry\n","line":61,"end_line":67,"proof_status":"formalized"} {"id":"Dusart_lemma_5_10b","label":"Dusart_lemma_5_10b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have for \\(k \\geq 2\\), \\(\\log p_k \\leq \\log k + \\log \\log k + 1\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_5_10b","latex_link":"secondary-chapter.html#Dusart_lemma_5_10b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_5_10b","lean_decl_name":"Dusart.lemma_5_10b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_lemma_5_10b\"\n (title := \"Dusart Lemma 5.10\")\n (statement := /--\n We have for $k \\geq 2$, $\\log p_k \\leq \\log k + \\log \\log k + 1$.\n -/)\n (latexEnv := \"lemma\")]\ntheorem lemma_5_10b {k : ℕ} (hk : k ≥ 2) : Real.log (nth Nat.Prime k) ≤ Real.log k + Real.log (Real.log k) + 1 := by sorry\n","line":412,"end_line":418,"proof_status":"formalized"} {"id":"fks-remark-2-6-b","label":"fks-remark-2-6-b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(s{\\gt}1\\), one has \\(\\Gamma (s,x) \\sim x^{s-1} e^{-x}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.remark_2_6_b","latex_link":"primary-chapter.html#fks-remark-2-6-b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.remark_2_6_b","lean_decl_name":"FKS.remark_2_6_b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-remark-2-6-b\"\n (title := \"FKS Remark 2-6-b\")\n (statement := /-- For $s>1$, one has $\\Gamma(s,x) \\sim x^{s-1} e^{-x}$. -/)]\ntheorem remark_2_6_b (s : ℝ) (h : s > 1) :\n Filter.Tendsto (fun x ↦ Gamma.incomplete s x / (x ^ (s - 1) * exp (-x)))\n Filter.atTop (nhds 1) := by sorry\n","line":276,"end_line":282,"proof_status":"formalized"} {"id":"fks-lemma-5-2","label":"fks-lemma-5-2","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"For all \\(0 {\\lt} \\log x \\leq 2100\\) we have that \\[ E_\\psi (x) \\leq 2(\\log x)^{3/2} \\exp \\left(-0.8476836\\sqrt{\\log x}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_5_3","latex_link":"primary-chapter.html#fks-lemma-5-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.lemma_5_3","lean_decl_name":"FKS.lemma_5_3","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-lemma-5-2\"\n (title := \"FKS Lemma 5.2\")\n (statement := /--\n For all $0 < \\log x \\leq 2100$ we have that\n \\[\n E_\\psi(x) \\leq 2(\\log x)^{3/2} \\exp\\left(-0.8476836\\sqrt{\\log x}\\right).\n \\]\n -/)]\ntheorem lemma_5_3 {x : ℝ} (h : log x ∈ Set.Ioc 0 2100) :\n Eψ x ≤ 2 * (log x) ^ (3 / 2) * exp (-0.8476836 * sqrt (log x)) := by sorry\n","line":561,"end_line":571,"proof_status":"formalized"} {"id":"isPathConnected_aux","label":"isPathConnected_aux","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"The set \\(\\{ s\\in \\mathbb {C}\\mid \\Re (s){\\gt}0 ∧ s \\ne 1\\} \\) is path-connected.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/isPathConnected_aux","latex_link":"sect0003.html#isPathConnected_aux","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/isPathConnected_aux","lean_decl_name":"isPathConnected_aux","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"isPathConnected-aux\")\n (statement := /-- The set $\\{s\\in \\C\\mid \\Re(s)>0 ∧ s \\ne 1\\}$ is path-connected. -/)\n (proof := /--\n Construct explicit paths from $2$ to any point, either a line segment or two joined ones.\n -/)\n (latexEnv := \"lemma\")]\nlemma isPathConnected_aux : IsPathConnected {z : ℂ | z ≠ 1 ∧ 0 < z.re} := by\n use (2 : ℂ)\n constructor\n · simp\n intro w hw; simp only [ne_eq, mem_setOf_eq] at hw\n by_cases w_im : w.im = 0\n · apply JoinedIn.trans (y := 1 + I)\n · let f : ℝ → ℂ := fun t ↦ (1 + I) * t + 2 * (1 - t)\n have cont : Continuous f := by continuity\n apply JoinedIn.ofLine cont.continuousOn (by simp [f]) (by simp [f])\n simp only [unitInterval, ne_eq, image_subset_iff, preimage_setOf_eq, add_re, mul_re, one_re,\n I_re, add_zero, ofReal_re, one_mul, add_im, one_im, I_im, zero_add, ofReal_im, mul_zero,\n sub_zero, re_ofNat, sub_re, im_ofNat, sub_im, sub_self, f]\n intro x hx; simp only [mem_Icc] at hx\n refine ⟨?_, by linarith⟩\n intro h\n rw [Complex.ext_iff] at h; simp [(by apply And.right; simpa [w_im] using h : x = 0)] at h\n · let f : ℝ → ℂ := fun t ↦ w * t + (1 + I) * (1 - t)\n have cont : Continuous f := by continuity\n apply JoinedIn.ofLine cont.continuousOn (by simp [f]) (by simp [f])\n simp only [unitInterval, ne_eq, image_subset_iff, preimage_setOf_eq, add_re, mul_re,\n ofReal_re, ofReal_im, mul_zero, sub_zero, one_re, I_re, add_zero, sub_re, one_mul, add_im,\n one_im, I_im, zero_add, sub_im, sub_self, f]\n intro x hx; simp only [mem_Icc] at hx\n simp only [mem_setOf_eq]\n constructor\n · intro h\n refine hw.1 ?_\n rw [Complex.ext_iff] at h\n have : x = 1 := by linarith [(by apply And.right; simpa [w_im] using h : 1 - x = 0)]\n rw [Complex.ext_iff, one_re, one_im]; exact ⟨by simpa [this, w_im] using h, w_im⟩\n · by_cases hxx : x = 0\n · simp only [hxx]; linarith\n · have : 0 < x := lt_of_le_of_ne hx.1 (Ne.symm hxx)\n have : 0 ≤ 1 - x := by linarith\n have := hw.2\n positivity\n · let f : ℝ → ℂ := fun t ↦ w * t + 2 * (1 - t)\n have cont : Continuous f := by continuity\n apply JoinedIn.ofLine cont.continuousOn (by simp [f]) (by simp [f])\n simp only [unitInterval, ne_eq, image_subset_iff, preimage_setOf_eq, add_re, mul_re, ofReal_re,\n ofReal_im, mul_zero, sub_zero, re_ofNat, sub_re, one_re, im_ofNat, sub_im, one_im, sub_self,\n f]\n intro x hx; simp only [mem_Icc] at hx\n constructor\n · intro h\n rw [Complex.ext_iff] at h;\n simp [(by apply And.right; simpa [w_im] using h : x = 0)] at h\n · by_cases hxx : x = 0\n · simp only [hxx]; linarith\n · have : 0 < x := lt_of_le_of_ne hx.1 (Ne.symm hxx)\n have : 0 ≤ 1 - x := by linarith\n have := hw.2\n positivity\n","line":1482,"end_line":1542,"proof_status":"formalized"} {"id":"factorization-def","label":"factorization-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We work with (approximate) factorizations \\(a_1 \\dots a_t\\) of a factorial \\(n!\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization","latex_link":"tertiary-chapter.html#factorization-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization","lean_decl_name":"Erdos392.Factorization","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"factorization-def\"\n (statement := /--\n We work with (approximate) factorizations $a_1 \\dots a_t$ of a factorial $n!$.\n -/)]\nstructure Factorization (n : ℕ) where\n a : Multiset ℕ\n ha : ∀ m ∈ a, m ≤ n\n hpos : ∀ m ∈ a, 0 < m\n","line":17,"end_line":25,"proof_status":"formalized"} {"id":"waste-def","label":"waste-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["factorization-def"],"nlp_text":"The waste of a factorizations \\(a_1 \\dots a_t\\) is defined as \\(\\sum _i \\log (n / a_i)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.waste","latex_link":"tertiary-chapter.html#waste-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.Factorization.waste","lean_decl_name":"Erdos392.Factorization.waste","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"waste-def\"\n (statement := /--\n The waste of a factorizations $a_1 \\dots a_t$ is defined as $\\sum_i \\log (n / a_i)$.\n -/)]\nnoncomputable def Factorization.waste {n : ℕ} (f : Factorization n) : ℝ :=\n f.sum (fun m ↦ log (n / m : ℝ))\n","line":35,"end_line":41,"proof_status":"formalized"} {"id":"thm:prime_gaps_2014","label":"prime_gaps_2014","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(x {\\gt} \\exp (60)\\), then there is a prime in the interval \\[ \\left( x\\left(1 - \\frac{1}{1966196911}\\right), x \\right]. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PrimeGaps2014.has_prime_in_interval","latex_link":"secondary-chapter.html#thm:prime_gaps_2014","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PrimeGaps2014.has_prime_in_interval","lean_decl_name":"PrimeGaps2014.has_prime_in_interval","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondarySummary.lean","lean4_code":"@[blueprint\n \"thm:prime_gaps_2014\"\n (title := \"Prime Gaps 2014\")\n (statement := /-- If $x > \\exp(60)$, then there is a prime in the interval\n \\[ \\left( x\\left(1 - \\frac{1}{1966196911}\\right), x \\right]. \\]\n -/)\n (latexEnv := \"theorem\")]\ntheorem PrimeGaps2014.has_prime_in_interval (x : ℝ) (hx : x > exp 60) :\n HasPrimeInInterval (x*(1-1/1966196911)) (x/1966196911) := by sorry","line":181,"end_line":189,"proof_status":"formalized"} {"id":"ZeroFactorization","label":"ZeroFactorization","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(f:\\overline{\\mathbb {D}_1}\\to \\mathbb {C}\\) be analytic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\) with \\(f(0)\\neq 0\\). For all \\(\\rho \\in \\mathcal{K}_f(1)\\) there exists \\(h_\\rho (z)\\) that is analytic at \\(\\rho \\), \\(h_\\rho (\\rho )\\neq 0\\), and \\(f(z)=(z-\\rho )^{m_f(\\rho )}\\, h_\\rho (z)\\).","doc_url":null,"latex_link":"sect0004.html#ZeroFactorization","lean_link":null,"lean_decl_name":"ZeroFactorization","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"bklnw-cor_15_1_alt","label":"bklnw-cor_15_1_alt","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"Let \\(b\\) be a positive constant such that \\(\\log 11 {\\lt} b \\leq 19 \\log (10)\\). Then we have \\[ \\left|\\frac{\\psi (x) - x}{x}\\right| \\leq \\max \\left\\{ \\frac{0.94}{e^{\\frac{b}{2}}}, 1.93378 \\cdot 10^{-8}\\right\\} \\quad \\text{for all } x \\geq e^b. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_cor_15_1'","latex_link":"primary-chapter.html#bklnw-cor_15_1_alt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.bklnw_cor_15_1'","lean_decl_name":"BKLNW_app.bklnw_cor_15_1'","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/BKLNW_app.lean","lean4_code":"@[blueprint\n \"bklnw-cor_15_1_alt\"\n (title := \"Corollary 15.1, alternative version\")\n (statement := /-- Let $b$ be a positive constant such that $\\log 11 < b \\leq 19 \\log(10)$. Then we have\n $$ \\left|\\frac{\\psi(x) - x}{x}\\right| \\leq \\max\\left\\{\\frac{0.94}{e^{\\frac{b}{2}}}, 1.93378 \\cdot 10^{-8}\\right\\} \\quad \\text{for all } x \\geq e^b. $$\n -/)\n (proof := /-- From Table 8 we have $\\varepsilon(19 \\log 10) = 1.93378 \\cdot 10^{-8}$.\n Now apply Corollary \\ref{bklnw-cor_15_1} and Theorem \\ref{bklnw-theorem-2}. -/)\n (latexEnv := \"corollary\")]\ntheorem bklnw_cor_15_1' (b : ℝ) (hb1 : log 11 < b) (hb2 : b ≤ 19 * log 10) :\n ∀ x ≥ exp b, Eψ x ≤ max (0.94 / exp (b / 2)) 1.93378e-8 := by sorry","line":374,"end_line":384,"proof_status":"statement_formalized"} {"id":"UpperUIntegral","label":"UpperUIntegral","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"An UpperUIntegral of a function \\(f\\) comes from \\(\\sigma +i\\infty \\) down to \\(\\sigma +iT\\), over to \\(\\sigma '+iT\\), and back up to \\(\\sigma '+i\\infty \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/UpperUIntegral","latex_link":"sect0003.html#UpperUIntegral","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/UpperUIntegral","lean_decl_name":"UpperUIntegral","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"@[blueprint\n (title := \"UpperUIntegral\")\n (statement := /--\n An UpperUIntegral of a function $f$ comes from $\\sigma+i\\infty$ down to $\\sigma+iT$, over to\n $\\sigma'+iT$, and back up to $\\sigma'+i\\infty$. -/)]\nnoncomputable def UpperUIntegral (f : ℂ → E) (σ σ' T : ℝ) : E := HIntegral f σ σ' T +\n I • (∫ y : ℝ in Ici T, f (σ' + y * I)) - I • (∫ y : ℝ in Ici T, f (σ + y * I))\n","line":47,"end_line":53,"proof_status":"formalized"} {"id":"primeCounting-le-bound","label":"primeCounting-le-bound","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For all \\(n \\geq 2\\), one has \\[ \\pi (n) \\leq \\sqrt{n} + \\frac{2n \\log 4}{\\log n}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.primeCounting_le_bound","latex_link":"tertiary-chapter.html#primeCounting-le-bound","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Erdos392.primeCounting_le_bound","lean_decl_name":"Erdos392.primeCounting_le_bound","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Erdos392.lean","lean4_code":"@[blueprint\n \"primeCounting-le-bound\"\n (statement := /-- For all $n \\geq 2$, one has $$\\pi(n) \\leq \\sqrt{n} + \\frac{2n \\log 4}{\\log n}.$$ -/)\n (proof := /-- By Chebyshev's bound, $\\prod_{p \\leq n} p \\leq 4^n$, so\n$\\sum_{p \\leq n} \\log p \\leq n \\log 4$. The number of primes $p \\leq \\sqrt{n}$ is trivially\nat most $\\sqrt{n}$. For primes $p > \\sqrt{n}$, we have $\\log p > \\frac{1}{2} \\log n$, hence\n$$\\bigl(\\pi(n) - \\pi(\\sqrt{n})\\bigr) \\cdot \\tfrac{1}{2} \\log n\n < \\sum_{\\sqrt{n} < p \\leq n} \\log p \\leq n \\log 4,$$\ngiving $\\pi(n) - \\pi(\\sqrt{n}) < \\frac{2n \\log 4}{\\log n}$. Adding $\\pi(\\sqrt{n}) \\leq \\sqrt{n}$\nyields the result. -/)\n (latexEnv := \"sublemma\")]\nlemma primeCounting_le_bound (n : ℕ) (hn : 2 ≤ n) :\n (Nat.primeCounting n : ℝ) ≤ Real.sqrt n + (2 * n * Real.log 4) / Real.log n := by\n have h_sum_log_bound :\n (∑ p ∈ filter Prime (Icc 1 n), Real.log p) ≤ n * Real.log 4 := by\n have h_prod_le : (∏ p ∈ filter Prime (Icc 1 n), p : ℕ) ≤ 4 ^ n := by\n convert primorial_le_4_pow n using 1; congr 1 with (_ | p) <;> aesop\n have h_prod_le_real : (∏ p ∈ filter Prime (Icc 1 n), (p : ℝ)) ≤ 4 ^ n := by\n rw [← cast_prod]; exact_mod_cast h_prod_le\n rw [← log_prod fun x hx ↦ cast_ne_zero.mpr <| Nat.Prime.ne_zero <| by aesop]\n have h_prod_pos : 0 < ∏ p ∈ filter Prime (Icc 1 n), (p : ℝ) :=\n prod_pos fun p hp ↦ cast_pos.mpr <| Prime.pos <| by aesop\n simpa using log_le_log h_prod_pos h_prod_le_real\n have h_large_primes :\n (∑ p ∈ filter Prime (Icc (⌊Real.sqrt n⌋₊ + 1) n), Real.log p) ≥\n (primeCounting n - primeCounting ⌊Real.sqrt n⌋₊) * Real.log (Real.sqrt n) := by\n have h_log_lower : ∀ p ∈ Finset.filter Prime (Icc (⌊Real.sqrt n⌋₊ + 1) n),\n Real.log p ≥ Real.log (Real.sqrt n) := fun p hp ↦ log_le_log (by positivity)\n (le_trans (lt_floor_add_one _ |> le_of_lt) (mod_cast (Finset.mem_Icc.mp (mem_filter.mp hp).1).1))\n refine le_trans ?_ (sum_le_sum h_log_lower)\n norm_num [primeCounting, primeCounting', count_eq_card_filter_range]\n rw [show Finset.filter Prime (Icc (n.sqrt + 1) n) =\n Finset.filter Prime (range (n + 1)) \\ filter Nat.Prime (range (n.sqrt + 1)) from ?_, card_sdiff]\n · rw [cast_sub]\n · rw [inter_eq_left.mpr (filter_subset_filter _ <| range_mono <| succ_le_succ <| sqrt_le_self _)]\n · exact card_mono inter_subset_right\n · ext; simp [Finset.mem_Icc, Finset.mem_range, mem_sdiff]; grind\n have h_combined :\n (Nat.primeCounting n - Nat.primeCounting ⌊Real.sqrt n⌋₊) * Real.log (Real.sqrt n) ≤\n n * Real.log 4 := by\n refine le_trans h_large_primes <| h_sum_log_bound.trans' <| sum_le_sum_of_subset_of_nonneg ?_\n (fun _ _ _ ↦ log_nonneg <| one_le_cast.mpr <| Prime.pos <| by aesop)\n exact filter_subset_filter _ <| Icc_subset_Icc (succ_pos _) le_rfl\n have h_trivial : primeCounting ⌊Real.sqrt n⌋₊ ≤ Real.sqrt n := by\n have : primeCounting ⌊Real.sqrt n⌋₊ ≤ ⌊Real.sqrt n⌋₊ := by\n rw [primeCounting, primeCounting', count_eq_card_filter_range]\n calc (Finset.filter Prime (range (⌊Real.sqrt n⌋₊ + 1))).card\n ≤ (Finset.Ico 2 (⌊Real.sqrt n⌋₊ + 1)).card := card_le_card fun x hx ↦ Finset.mem_Ico.mpr\n ⟨Prime.two_le (mem_filter.mp hx).2, Finset.mem_range.mp (mem_filter.mp hx).1⟩\n _ ≤ ⌊Real.sqrt n⌋₊ := by simp\n exact le_trans (cast_le.mpr this) (floor_le (sqrt_nonneg _))\n rw [log_sqrt (cast_nonneg _)] at h_combined\n rw [add_div', le_div_iff₀] <;> nlinarith [log_pos <| show (n : ℝ) > 1 by norm_cast,\n log_le_sub_one_of_pos <| show (n : ℝ) > 0 by positivity]\n","line":2220,"end_line":2273,"proof_status":"formalized"} {"id":"Perron.tendsto_zero_Upper","label":"Perron.tendsto_zero_Upper","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(x{\\gt}0\\) and \\(\\sigma ',\\sigma ''\\in \\mathbb {R}\\). Then \\[ \\int _{\\sigma '}^{\\sigma ''}\\frac{x^{\\sigma +it}}{(\\sigma +it)(1+\\sigma + it)}d\\sigma \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.tendsto_zero_Upper","latex_link":"sect0003.html#Perron.tendsto_zero_Upper","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.tendsto_zero_Upper","lean_decl_name":"Perron.tendsto_zero_Upper","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n (title := \"tendsto-zero-Upper\")\n (statement := /--\n Let $x>0$ and $\\sigma',\\sigma''\\in\\R$. Then\n $$\\int_{\\sigma'}^{\\sigma''}\\frac{x^{\\sigma+it}}{(\\sigma+it)(1+\\sigma + it)}d\\sigma$$\n goes to $0$ as $t\\to\\infty$.\n -/)\n (proof := /-- The numerator is bounded and the denominator tends to infinity. -/)\n (latexEnv := \"lemma\")]\nlemma tendsto_zero_Upper (xpos : 0 < x) (σ' σ'' : ℝ) :\n Tendsto (fun (t : ℝ) ↦ ∫ (σ : ℝ) in σ'..σ'', f x (σ + t * I)) atTop (𝓝 0) := by\n\n have hcast : (fun (y : ℝ) ↦ 1 / y ^ 2) =ᶠ[atTop] fun y ↦ y ^ (-2 : ℝ) := by\n filter_upwards [Ici_mem_atTop 0] with y hy using by rw [rpow_neg hy, inv_eq_one_div, rpow_two]\n refine isBigO_sup.mp (horizontal_integral_isBigO xpos σ' σ'' volume)\n |>.2.trans_eventuallyEq hcast |>.trans_tendsto <| tendsto_rpow_neg_atTop (by norm_num)\n","line":586,"end_line":601,"proof_status":"formalized"} {"id":"classical-bound-psi","label":"classical-bound-psi","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["Epsi-def"],"nlp_text":"We say that \\(E_ψ\\) satisfies a classical bound with parameters \\(A, B, C, R, x_0\\) if for all \\(x \\geq x_0\\) we have \\[ E_ψ(x) \\leq A \\left(\\frac{\\log x}{R}\\right)^B \\exp \\left(-C \\left(\\frac{\\log x}{R}\\right)^{1/2}\\right). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eψ.classicalBound","latex_link":"primary-chapter.html#classical-bound-psi","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eψ.classicalBound","lean_decl_name":"Eψ.classicalBound","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PrimaryDefinitions.lean","lean4_code":" (statement := /-- $E_ψ(x) = |ψ(x) - x| / x$ -/)]\nnoncomputable def Eψ (x : ℝ) : ℝ := |ψ x - x| / x\n\nnoncomputable def admissible_bound (A B C R : ℝ) (x : ℝ) := A * (log x / R) ^ B * exp (-C * (log x / R) ^ (1/2))\n\n@[blueprint\n \"classical-bound-psi\"\n (title := \"Definition 1, FKS2\")\n","line":30,"end_line":37,"proof_status":"formalized"} {"id":"Dusart_lemma_4_1","label":"Dusart_lemma_4_1","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["theta-def"],"nlp_text":"We have \\(\\vartheta (x)\\) and \\(\\psi (x)-\\vartheta (x)\\) for various \\(x\\) given by [ 9 , Table 2 ] , in particular \\(\\vartheta (10^{15}) = 999999965752660.939839805291048\\dots \\)","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_4_1","latex_link":"secondary-chapter.html#Dusart_lemma_4_1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.lemma_4_1","lean_decl_name":"Dusart.lemma_4_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_lemma_4_1\"\n (title := \"Dusart Lemma 4.1\")\n (statement := /--\n We have $\\vartheta(x)$ and $\\psi(x)-\\vartheta(x)$ for various $x$ given by \\cite[Table 2]{Dusart2018}, in particular\n $\\vartheta(10^{15}) = 999999965752660.939839805291048\\dots$-/)\n (latexEnv := \"lemma\")]\ntheorem lemma_4_1 {x ϑx ψϑx : ℝ} (h : (x, ϑx, ψϑx) ∈ Table2) : θ x ∈ Set.Icc ϑx (ϑx + 1e-6) ∧ ψ x - θ x ∈ Set.Icc ψϑx (ψϑx + 1e-6) := by sorry\n","line":137,"end_line":143,"proof_status":"formalized"} {"id":"bklnw-cor-2-1","label":"bklnw-cor-2-1","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\theta (x) \\leq (1 + 1.93378 \\times 10^{-8}) x\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.cor_2_1","latex_link":"secondary-chapter.html#bklnw-cor-2-1","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.cor_2_1","lean_decl_name":"BKLNW.cor_2_1","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"theorem cor_2_1 : ∀ x > 0, θ x ≤ (1 + 1.93378e-8) * x := by sorry\n\nnoncomputable def table_8_ε (b : ℝ) : ℝ :=\n if b < 20 then 1 -- junk value\n else if b < 21 then 4.2670e-5\n else if b < 22 then 2.58843e-5\n","line":31,"end_line":36,"proof_status":"formalized"} {"id":"ZeroOrder","label":"ZeroOrder","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(0 {\\lt} R{\\lt}1\\) and \\(f:\\mathbb {C}\\to \\mathbb {C}\\) be analtyic on neighborhoods of points in \\(\\overline{\\mathbb {D}_1}\\). For any zero \\(\\rho \\in \\mathcal{K}_f(R)\\), we define \\(m_f(\\rho )\\) as the order of the zero \\(\\rho \\) w.r.t \\(f\\).","doc_url":null,"latex_link":"sect0004.html#ZeroOrder","lean_link":null,"lean_decl_name":"ZeroOrder","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"ZeroWindows","label":"ZeroWindows","background_color":"#A3D6FF","border_color":"blue","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(\\mathcal{Z}_t=\\{ \\rho \\in \\mathbb {C}:\\zeta (\\rho )=0,\\, |\\rho -(3/2+it)|\\leq 5/6\\} \\).","doc_url":null,"latex_link":"sect0004.html#ZeroWindows","lean_link":null,"lean_decl_name":"ZeroWindows","kind_description":"definitions","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"Q-def","label":"Q-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(Q(x)\\) is the number of squarefree integers \\(\\leq x\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.Q","latex_link":"primary-chapter.html#Q-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MobiusLemma.Q","lean_decl_name":"MobiusLemma.Q","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MobiusLemma.lean","lean4_code":"@[blueprint\n \"Q-def\"\n (title := \"Q\")\n (statement := /-- $Q(x)$ is the number of squarefree integers $\\leq x$. -/)]\nnoncomputable def Q (x : ℝ) : ℕ := ∑ n ∈ Finset.Ioc 0 ⌊x⌋₊, if Squarefree n then 1 else 0\n","line":26,"end_line":30,"proof_status":"formalized"} {"id":"bklnw-prop-3-sub-4","label":"bklnw-prop-3-sub-4","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(u_{n+1} {\\lt} u_n\\) for \\(n \\geq 9\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_4","latex_link":"secondary-chapter.html#bklnw-prop-3-sub-4","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_3_sub_4","lean_decl_name":"BKLNW.prop_3_sub_4","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"@[blueprint\n \"bklnw-prop-3-sub-6\"\n (title := \"Proposition 3, substep 6\")\n (statement := /-- $f(x) \\leq f(2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1})$ on $[2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1}, \\infty)$. -/)\n (proof := /-- Follows from Sublemmas \\ref{bklnw-prop-3-sub-2} and \\ref{bklnw-prop-3-sub-5}. -/)\n (latexEnv := \"sublemma\")\n (discussion := 636)]\ntheorem prop_3_sub_6 (x₀ : ℝ) (hx₀ : x₀ ≥ 2 ^ 9) (x : ℝ)\n (hx : x ≥ 2 ^ (⌊(log x₀) / (log 2)⌋ + 1)) :\n f x ≤ f (2 ^ (⌊(log x₀)/(log 2)⌋ + 1)) := by sorry\n\n@[blueprint\n \"bklnw-prop-3-sub-7\"\n (title := \"Proposition 3, substep 7\")\n (statement := /-- $f(x) \\leq f(x_0)$ for $x \\in [x_0, 2^{\\lfloor \\frac{\\log x_0}{\\log 2} \\rfloor + 1})$. -/)\n","line":197,"end_line":211,"proof_status":"formalized"} {"id":"prelim-decay-2","label":"prelim-decay-2","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(\\psi :\\mathbb {R}\\to \\mathbb {C}\\) is absolutely integrable and of bounded variation, then \\[ |\\hat\\psi (u)| \\leq \\| \\psi \\| _{TV} / 2\\pi |u| \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prelim_decay_2","latex_link":"sect0002.html#prelim-decay-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/prelim_decay_2","lean_decl_name":"prelim_decay_2","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Wiener.lean","lean4_code":" (statement := /--\nIf $\\psi:\\R \\to \\C$ is absolutely integrable and of bounded variation, then\n$$ |\\hat \\psi(u)| \\leq \\| \\psi \\|_{TV} / 2\\pi |u| $$\nfor all non-zero $u \\in \\R$.\n -/)\n (proof := /-- By Lebesgue--Stiejtes integration by parts we have\n$$ 2\\pi i u \\hat \\psi(u) = \\int _\\R e(-tu) d\\psi(t)$$\nand the claim then follows from the triangle inequality. -/)\n (latexEnv := \"lemma\")\n (discussion := 562)]\ntheorem prelim_decay_2 (ψ : ℝ → ℂ) (hψ : Integrable ψ) (hvar : BoundedVariationOn ψ Set.univ)\n (u : ℝ) (hu : u ≠ 0) :\n ‖𝓕 (ψ : ℝ → ℂ) u‖ ≤ (eVariationOn ψ Set.univ).toReal / (2 * π * ‖u‖) := by sorry\n\nnoncomputable def AbsolutelyContinuous (f : ℝ → ℂ) : Prop := (∀ᵐ x, DifferentiableAt ℝ f x) ∧\n","line":310,"end_line":324,"proof_status":"statement_formalized"} {"id":"ZetaAltFormula","label":"ZetaAltFormula","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\[ \\zeta _0(s)=1+\\frac{1}{s-1}-s\\int _1^\\infty \\{ x\\} \\, x^{-s}\\, \\frac{dx}{x}. \\]","doc_url":null,"latex_link":"sect0004.html#ZetaAltFormula","lean_link":null,"lean_decl_name":"ZetaAltFormula","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"SmoothExistence","label":"SmoothExistence","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"There exists a smooth (once differentiable would be enough), nonnegative “bumpfunction” \\(\\nu \\), supported in \\([1/2,2]\\) with total mass one: \\[ \\int _0^\\infty \\nu (x)\\frac{dx}{x} = 1. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothExistence","latex_link":"sect0003.html#SmoothExistence","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/SmoothExistence","lean_decl_name":"SmoothExistence","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/SmoothExistence.lean","lean4_code":"lemma smooth_urysohn_support_Ioo {a b c d : ℝ} (h1 : a < b) (h3 : c < d) :\n ∃ Ψ : ℝ → ℝ, (ContDiff ℝ ∞ Ψ) ∧ (HasCompactSupport Ψ) ∧\n Set.indicator (Set.Icc b c) 1 ≤ Ψ ∧\n Ψ ≤ Set.indicator (Set.Ioo a d) 1 ∧ (Function.support Ψ = Set.Ioo a d) := by\n\n have := exists_contMDiff_zero_iff_one_iff_of_isClosed (n := ⊤)\n (modelWithCornersSelf ℝ ℝ) (s := Set.Iic a ∪ Set.Ici d) (t := Set.Icc b c)\n (IsClosed.union isClosed_Iic isClosed_Ici)\n (isClosed_Icc)\n (by\n simp_rw [Set.disjoint_union_left, Set.disjoint_iff, Set.subset_def, Set.mem_inter_iff,\n Set.mem_Iic, Set.mem_Icc, Set.mem_empty_iff_false, and_imp, imp_false, not_le,\n Set.mem_Ici]\n constructor <;> intros <;> linarith)\n\n rcases this with ⟨Ψ, hΨSmooth, hΨrange, hΨ0, hΨ1⟩\n\n simp only [Set.mem_union, Set.mem_Iic, Set.mem_Ici, Set.mem_Icc] at *\n use Ψ\n simp only [range_subset_iff, mem_Icc] at hΨrange\n refine ⟨ContMDiff.contDiff hΨSmooth, ?_, ?_, ?_, ?_⟩\n · apply HasCompactSupport.of_support_subset_isCompact (K := Set.Icc a d) isCompact_Icc\n simp only [Function.support_subset_iff, ne_eq, mem_Icc, ← hΨ0, not_or]\n bound\n · apply Set.indicator_le'\n · intro x hx\n rw [hΨ1 x|>.mp, Pi.one_apply]\n simpa using hx\n · exact fun x _ ↦ (hΨrange x).1\n · intro x\n apply Set.le_indicator_apply\n · exact fun _ ↦ (hΨrange x).2\n · intro hx\n rw [← hΨ0 x|>.mp]\n simpa [-not_and, mem_Ioo, not_and_or, not_lt] using hx\n · ext x\n simp only [Function.mem_support, ne_eq, mem_Ioo, ← hΨ0, not_or, not_le]\n","line":13,"end_line":49,"proof_status":"formalized"} {"id":"diffBddAtNegOne","label":"diffBddAtNegOne","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["keyIdentity"],"nlp_text":"Let \\(x{\\gt}0\\). Then for \\(0 {\\lt} c {\\lt} 1 /2\\), we have that the function \\[ s ↦ \\frac{x^s}{s(s+1)} - \\frac{-x^{-1}}{s+1} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.diffBddAtNegOne","latex_link":"sect0003.html#diffBddAtNegOne","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.diffBddAtNegOne","lean_decl_name":"Perron.diffBddAtNegOne","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"diffBddAtNegOne\"\n (title := \"diffBddAtNegOne\")\n (statement := /--\n Let $x>0$. Then for $0 < c < 1 /2$, we have that the function\n $$\n s ↦ \\frac{x^s}{s(s+1)} - \\frac{-x^{-1}}{s+1}\n $$\n is bounded above on the rectangle with corners at $-1-c-i*c$ and $-1+c+i*c$ (except at $s=-1$).\n -/)\n (proof := /--\n Applying Lemma \\ref{keyIdentity}, the\n function $s ↦ x^s/s(s+1) - x^{-1}/(s+1) = x^s/s - x^s/(s+1) - (-x^{-1})/(s+1)$. The first term\n is bounded for $s$\n away from $0$. The last two terms are the difference quotient of the function $s ↦ x^s$ at\n $-1$; since it's differentiable, the difference remains bounded as $s\\to -1$.\n -/)\n (latexEnv := \"lemma\")]\nlemma diffBddAtNegOne {x : ℝ} (xpos : 0 < x) :\n ∀ᶠ (c : ℝ) in 𝓝[>] 0,\n BddAbove ((norm ∘ (fun (s : ℂ) ↦ (x : ℂ) ^ s / (s * (s + 1)) - (-x⁻¹) / (s+1))) ''\n (Square (-1) c \\ {-1})) := by\n\n apply bddAbove_square_of_tendsto\n suffices Tendsto (norm ∘ (fun (s : ℂ) ↦ ↑x ^ s / s - (↑x ^ s / (s + 1) - x⁻¹ / (s + 1))))\n (𝓝[≠] (-1)) (𝓝 (‖x ^ (-1 : ℂ) / -1 - (deriv (fun (s : ℂ) ↦ (x : ℂ) ^ s) (-1))‖)) by\n apply this.congr'\n filter_upwards [diff_mem_nhdsWithin_compl (isOpen_compl_singleton.mem_nhds\n (Set.mem_compl_singleton_iff.mpr (by norm_num : (-1 : ℂ) ≠ 0))) {-1}] with s hs\n rw [Function.comp_apply, Function.comp_apply, keyIdentity _ hs.1 hs.2]\n ring_nf\n have hx0 : (x : ℂ) ≠ 0 := slitPlane_ne_zero (.inl xpos)\n refine (Tendsto.sub (tendsto_nhdsWithin_of_tendsto_nhds ?_) ?_).norm\n · exact ((continuous_id.const_cpow (.inl hx0)).tendsto _).div tendsto_id (by norm_num)\n · convert hasDerivAt_iff_tendsto_slope.mp\n (differentiableAt_fun_id.const_cpow (.inl hx0)).hasDerivAt using 2\n rw [slope_def_field, cpow_neg_one, ofReal_inv]; ring\n","line":769,"end_line":805,"proof_status":"formalized"} {"id":"lem:aachdecre","label":"aachdecre","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(\\sigma \\geq 0\\), \\(\\tau \\in \\mathbb {R}\\), \\(\\nu \\in \\mathbb {R}\\setminus \\{ 0\\} \\). Let \\(b{\\gt}a{\\gt}\\frac{|\\tau |}{2\\pi |\\nu |}\\). Then, for any \\(k\\geq 1\\), \\(f(t) = t^{-\\sigma -k} |2\\pi \\nu -\\tau /t|^{-k-1}\\) is decreasing on \\([a,b]\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachdecre","latex_link":"zeta-chapter.html#lem:aachdecre","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/ZetaAppendix.lemma_aachdecre","lean_decl_name":"ZetaAppendix.lemma_aachdecre","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaAppendix.lean","lean4_code":"@[blueprint\n \"lem:aachdecre\"\n (title := \"A decreasing function\")\n (statement := /--\nLet $\\sigma\\geq 0$, $\\tau\\in \\mathbb{R}$, $\\nu \\in \\mathbb{R}\\setminus \\{0\\}$.\nLet $b>a>\\frac{|\\tau|}{2\\pi |\\nu|}$. Then, for any $k\\geq 1$,\n$f(t) = t^{-\\sigma-k} |2\\pi \\nu-\\tau/t|^{-k-1}$ is decreasing on $[a,b]$.\n-/)\n (proof := /--\nLet $a\\leq t\\leq b$. Since $\\left|\\frac{\\tau}{t \\nu}\\right| < 2\\pi$, we see that\n$2\\pi-\\frac{\\tau}{\\nu t} >0$, and so\n$|2\\pi \\nu-\\tau/t|^{-k-1} = |\\nu|^{-k-1} \\left(2\\pi - \\frac{\\tau}{t \\nu}\\right)^{-k-1}$.\nNow we take logarithmic derivatives:\n\\[t (\\log f(t))' = - (\\sigma+k) - (k+1) \\frac{\\tau/t}{2\\pi \\nu - \\tau/t}\n= -\\sigma - \\frac{2\\pi k + \\frac{\\tau}{t \\nu}}{2\\pi - \\frac{\\tau}{t \\nu}} < -\\sigma \\leq 0,\\]\nsince, again by $\\frac{|\\tau|}{t |\\nu|} < 2\\pi$ and $k\\geq 1$, we have\n$2\\pi k + \\frac{\\tau}{t \\nu}>0$, and, as we said, $2\\pi - \\frac{\\tau}{t \\nu}>0$.\n-/)\n (latexEnv := \"lemma\")\n (discussion := 549)]\ntheorem lemma_aachdecre (σ : ℝ) (hσ : 0 ≤ σ) (τ : ℝ) (ν : ℝ) (hν : ν ≠ 0) (a b : ℝ)\n (ha : a > |τ| / (2 * π * |ν|)) (hb : b > a) (k : ℕ) (hk : 1 ≤ k) :\n let f : ℝ → ℝ := fun t ↦ t ^ (-σ - k) * |2 * π * ν - τ / t| ^ (-(k : ℝ) - 1)\n AntitoneOn f (Set.Icc a b) := by\n have h_deriv_neg : ∀ t ∈ Set.Icc a b,\n deriv (fun t ↦ -(σ + k) * Real.log t - (k + 1) * Real.log |2 * Real.pi * ν - τ / t|) t < 0 := by\n intro t ht\n have h_abs : |τ / (t * ν)| < 2 * Real.pi := by\n rw [abs_div, abs_mul]\n rw [div_lt_iff₀] at *\n all_goals cases abs_cases t <;> cases abs_cases ν <;>\n nlinarith [Real.pi_gt_three, ht.1, ht.2, mul_pos Real.pi_pos (abs_pos.mpr hν),\n abs_nonneg τ, mul_div_cancel₀ (|τ|) (by positivity : (2 * Real.pi * |ν|) ≠ 0)]\n have h_deriv_neg :\n deriv (fun t ↦ -(σ + k) * Real.log t - (k + 1) * Real.log |2 * Real.pi * ν - τ / t|) t =\n -(σ + k) / t - (k + 1) * (τ / t ^ 2) / (2 * Real.pi * ν - τ / t) := by\n have ht_ne : t ≠ 0 := by linarith [ht.1, show 0 < a from lt_of_le_of_lt (by positivity) ha]\n convert HasDerivAt.deriv (HasDerivAt.sub (HasDerivAt.const_mul (-(σ + k : ℝ))\n (Real.hasDerivAt_log (show t ≠ 0 from ht_ne))) (HasDerivAt.const_mul (k + 1 : ℝ)\n (HasDerivAt.log (HasDerivAt.sub (hasDerivAt_const _ _) (HasDerivAt.const_mul τ\n (hasDerivAt_inv (show t ≠ 0 from ht_ne)))) _))) using 1 <;> norm_num\n · congr! 1\n · ring\n · contrapose! h_abs\n field_simp\n rw [abs_div, abs_mul, le_div_iff₀ (mul_pos (abs_pos.mpr\n (by linarith [ht.1, lt_of_le_of_lt (by positivity) ha])) (abs_pos.mpr hν))]\n have ht_ne' : t ≠ 0 := by positivity\n cases abs_cases t <;> cases abs_cases ν <;> cases abs_cases τ <;> push_cast [*] <;>\n nlinarith [inv_mul_cancel_left₀ ht_ne' τ, inv_mul_cancel₀ ht_ne', Real.pi_pos]\n have h_deriv_eq :\n deriv (fun t ↦ -(σ + k) * Real.log t - (k + 1) * Real.log |2 * Real.pi * ν - τ / t|) t =\n -(σ + k) / t - (k + 1) * (τ / (t * ν)) / (2 * Real.pi - τ / (t * ν)) / t := by\n convert h_deriv_neg using 1; simp only [neg_add_rev, sub_right_inj]; ring_nf; grind\n have h_expr_neg : -(σ + k) - (k + 1) * (τ / (t * ν)) / (2 * Real.pi - τ / (t * ν)) < 0 := by\n rw [sub_div', div_lt_iff₀] <;> nlinarith [abs_lt.mp h_abs, show (k : ℝ) ≥ 1 by norm_cast]\n have ht_pos : 0 < t := lt_of_lt_of_le (lt_of_le_of_lt (by positivity) ha) ht.1\n rw [h_deriv_eq]\n have h_goal : -(σ + k) / t - (k + 1) * (τ / (t * ν)) / (2 * Real.pi - τ / (t * ν)) / t =\n (-(σ + k) - (k + 1) * (τ / (t * ν)) / (2 * Real.pi - τ / (t * ν))) / t := by ring\n exact h_goal ▸ div_neg_of_neg_of_pos h_expr_neg ht_pos\n have h_decreasing : ∀ t1 t2 : ℝ, a ≤ t1 → t1 < t2 → t2 ≤ b →\n Real.exp ((-(σ + k) * Real.log t1) - (k + 1) * Real.log |2 * Real.pi * ν - τ / t1|) ≥\n Real.exp ((-(σ + k) * Real.log t2) - (k + 1) * Real.log |2 * Real.pi * ν - τ / t2|) := by\n intro t1 t2 ht1 ht2 ht3\n have h_mean_val : ∃ c ∈ Set.Ioo t1 t2,\n deriv (fun t ↦ -(σ + k) * Real.log t - (k + 1) * Real.log |2 * Real.pi * ν - τ / t|) c =\n ((fun t ↦ -(σ + k) * Real.log t - (k + 1) * Real.log |2 * Real.pi * ν - τ / t|) t2 -\n (fun t ↦ -(σ + k) * Real.log t - (k + 1) * Real.log |2 * Real.pi * ν - τ / t|) t1) /\n (t2 - t1) := by\n apply_rules [exists_deriv_eq_slope]\n · exact continuousOn_of_forall_continuousAt fun t ht ↦ DifferentiableAt.continuousAt <|\n differentiableAt_of_deriv_ne_zero <| ne_of_lt <| h_deriv_neg t ⟨by grind, by grind⟩\n · exact fun x hx ↦ DifferentiableAt.differentiableWithinAt (by\n exact differentiableAt_of_deriv_ne_zero (ne_of_lt\n (h_deriv_neg x ⟨by linarith [hx.1], by linarith [hx.2]⟩)))\n obtain ⟨c, ⟨hc1, hc2⟩, hc3⟩ := h_mean_val\n let f := fun t ↦ -(σ + ↑k) * Real.log t - (↑k + 1) * Real.log |2 * π * ν - τ / t|\n have h_diff_neg : f t2 - f t1 < 0 := neg_of_div_neg_left\n (hc3 ▸ h_deriv_neg c ⟨by linarith, by linarith⟩) (le_of_lt <| sub_pos.mpr ht2)\n exact exp_le_exp.mpr (le_of_lt <| sub_neg.mp h_diff_neg)\n have h_f_eq_exp : ∀ t ∈ Set.Icc a b,\n t ^ (-σ - k : ℝ) * |2 * Real.pi * ν - τ / t| ^ (-(k : ℝ) - 1) =\n Real.exp ((-(σ + k) * Real.log t) - (k + 1) * Real.log |2 * Real.pi * ν - τ / t|) := by\n intro t ht\n have h_pos : 0 < t ∧ 0 < |2 * Real.pi * ν - τ / t| := by\n have ht_pos : 0 < t := lt_of_lt_of_le (lt_of_le_of_lt (by positivity) ha) ht.1\n constructor\n · exact ht_pos\n · rw [abs_pos, sub_ne_zero, ne_eq, eq_div_iff (ne_of_gt ht_pos)]\n intro h_eq\n have : |τ| / (2 * π * |ν|) ≥ a := by\n rw [ge_iff_le, le_div_iff₀ (by positivity)]\n calc a * (2 * π * |ν|) = 2 * π * |ν| * a := by ring\n _ ≤ 2 * π * |ν| * t := mul_le_mul_of_nonneg_left ht.1 (by positivity)\n _ = |2 * π * ν * t| := by\n rw [abs_mul, abs_mul, abs_of_pos Real.two_pi_pos, abs_of_pos ht_pos]\n _ = |τ| := by rw [h_eq]\n linarith\n rw [rpow_def_of_pos h_pos.1, rpow_def_of_pos h_pos.2, ← Real.exp_add]; ring_nf\n refine fun x hx y hy hxy ↦ by cases eq_or_lt_of_le hxy <;> simp_all only [Set.mem_Icc, and_imp, le_refl]\n","line":744,"end_line":844,"proof_status":"formalized"} {"id":"bklnw-prop-4-a","label":"bklnw-prop-4-a","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(7 \\leq b \\leq 2\\log x_1\\), then we have \\begin{equation} \\theta (x^{1/2}) \\leq (1 + \\varepsilon (\\log x_1))x^{1/2} \\quad \\text{for } x \\geq e^b. \\end{equation}","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_4_a","latex_link":"secondary-chapter.html#bklnw-prop-4-a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.prop_4_a","lean_decl_name":"BKLNW.prop_4_a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"\\theta(x^{1/2}) \\leq \\psi(x^{1/2}) \\leq (1 + \\varepsilon(b/2))x^{1/2},\n\\]\nsince $x^{1/2} > e^{b/2} > x_1 \\geq e^7$.\n -/)\n (latexEnv := \"proposition\")\n (discussion := 642)]\ntheorem prop_4_b (I : Inputs) {b x : ℝ} (hb : b > 2 * log I.x₁) (hx : x ≥ exp b) :\n θ (x^(1/2)) < (1 + I.ε (b / 2)) * x^(1/2) := by sorry\n\nnoncomputable def Inputs.a₁ (I : Inputs) (b : ℝ) : ℝ :=\n if b ≤ 2 * log I.x₁ then 1 + I.ε (log I.x₁)\n else 1 + I.ε (b / 2)\n\nnoncomputable def Inputs.a₂ (I : Inputs) (b : ℝ) : ℝ :=\n (1 + I.α) * (max (f (exp b)) (f (⌊ b / (log 2) ⌋ + 1)))\n\n@[blueprint\n \"bklnw-thm-5\"\n (title := \"Theorem 5\")\n (statement := /-- Let $\\alpha > 0$ exist such that\n\\[\n\\theta(x) \\leq (1 + \\alpha)x \\quad \\text{for all } x > 0.\n\\]\nAssume for every $b \\geq 7$ there exists a positive constant $\\varepsilon(b)$ such that\n\\[\n\\psi(x) - x \\leq \\varepsilon(b)x \\quad \\text{for all } x \\geq e^b.\n\\]\nAssume there exists $x_1 \\geq e^7$ such that\n\\begin{equation}\n\\theta(x) < x \\quad \\text{for } x \\leq x_1.\n\\end{equation}\nLet $b \\geq 7$. Then, for all $x \\geq e^b$ we have\n\\[\n\\psi(x) - \\theta(x) < a_1 x^{1/2} + a_2 x^{1/3},\n\\]\nwhere\n\\[\na_1 = \\begin{cases}\n1 + \\varepsilon(\\log x_1) & \\text{if } b \\leq 2\\log x_1, \\\\\n1 + \\varepsilon(b/2) & \\text{if } b > 2\\log x_1,\n\\end{cases}\n","line":336,"end_line":376,"proof_status":"formalized"} {"id":"fks2-lemma-10c","label":"fks2-lemma-10c","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["fks2-eq-16"],"nlp_text":"If \\(c{\\gt}0\\), \\(g(0,b,c,x)\\) decreases with \\(x\\) for \\(\\sqrt{\\log x} {\\lt} -2b/c\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10c","latex_link":"secondary-chapter.html#fks2-lemma-10c","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.lemma_10c","lean_decl_name":"FKS2.lemma_10c","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" exact sqrt_lt_sqrt (log_pos hy.1).le <| (log_exp _).symm.trans_gt (log_lt_log (by linarith [hy.1]) hy.2)\n rw [show log (log x) = 2 * log (sqrt (log x)) from by rw [log_sqrt (log_pos hx.1).le]; ring,\n show log (log y) = 2 * log (sqrt (log y)) from by rw [log_sqrt (log_pos hy.1).le]; ring]\n have hderiv_neg : 2 * b / sqrt (log y) + c < 0 := by\n have : c * sqrt (log y) < -2 * b := by\n calc c * sqrt (log y) < c * (-2 * b / c) := mul_lt_mul_of_pos_left huy_bound hc\n _ = -2 * b := by field_simp\n have h2 : 2 * b / sqrt (log y) < -c := by rw [div_lt_iff₀ <| sqrt_pos.mpr <| log_pos hy.1]; linarith\n linarith\n have hconcave : log (sqrt (log y)) - log (sqrt (log x)) ≥ (sqrt (log y) - sqrt (log x)) / sqrt (log y) := by\n have := one_sub_inv_le_log_of_pos <| div_pos (sqrt_pos.mpr <| log_pos hy.1) <| sqrt_pos.mpr <| log_pos hx.1\n simp only [inv_div] at this\n calc log (sqrt (log y)) - log (sqrt (log x)) = log (sqrt (log y) / sqrt (log x)) := by\n rw [log_div (sqrt_pos.mpr <| log_pos hy.1).ne' (sqrt_pos.mpr <| log_pos hx.1).ne']\n _ ≥ 1 - sqrt (log x) / sqrt (log y) := this\n _ = (sqrt (log y) - sqrt (log x)) / sqrt (log y) := by rw [sub_div, div_self (sqrt_pos.mpr <| log_pos hy.1).ne']\n calc 2 * log (sqrt (log y)) * b + c * sqrt (log y)\n _ ≤ 2 * b * (log (sqrt (log x)) + (sqrt (log y) - sqrt (log x)) / sqrt (log y)) + c * sqrt (log y) := by nlinarith [hconcave]\n _ = 2 * b * log (sqrt (log x)) + (sqrt (log y) - sqrt (log x)) * (2 * b / sqrt (log y) + c) + c * sqrt (log x) := by field_simp; ring\n _ < 2 * log (sqrt (log x)) * b + c * sqrt (log x) := by nlinarith [hderiv_neg, sqrt_lt_sqrt (log_pos hx.1).le <| log_lt_log (by linarith [hx.1]) hxy]\n\n@[blueprint\n \"fks2-corollary-11\"\n (title := \"FKS2 Corollary 11\")\n (statement := /--\n If $B \\geq 1 + C^2 / 16R$ then $g(1,1-B,C/\\sqrt{R},x)$ is decreasing in $x$. -/)\n (proof := /-- This follows from Lemma \\ref{fks2-lemma-10a} applied with $a=1$, $b=1-B$ and $c=C/\\sqrt{R}$. -/)\n (latexEnv := \"corollary\")\n (discussion := 615)]\ntheorem corollary_11 {B C R : ℝ} (hR : R > 0) (hB : B > 1 + C ^ 2 / (16 * R)) (hC : C > 0) :\n StrictAnti (g_bound 1 (1 - B) (C / sqrt R)) := by\n apply lemma_10a one_pos (div_pos hC (sqrt_pos.mpr hR))\n rw [div_pow, sq_sqrt hR.le, mul_one]\n linarith [show C ^ 2 / R / 16 = C ^ 2 / (16 * R) by ring]\n\n@[blueprint\n \"fks2-eq-19\"\n","line":183,"end_line":219,"proof_status":"formalized"} {"id":"bknlw-theorem-2","label":"bknlw-theorem-2","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(b{\\gt}0\\) then \\(|\\psi (x) - x| \\leq \\varepsilon (b) x\\) for all \\(x \\geq \\exp (b)\\), where \\(\\varepsilon \\) is as in [ 1 , Table 8 ] .","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.theorem_2","latex_link":"primary-chapter.html#bknlw-theorem-2","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW_app.theorem_2","lean_decl_name":"BKLNW_app.theorem_2","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":"theorem theorem_2 : ∀ b ≥ 0, ∀ x ≥ exp b,\n |ψ x - x| ≤ table_8_ε b * x := by sorry\n\n","line":99,"end_line":101,"proof_status":"statement_formalized"} {"id":"Epsi-def","label":"Epsi-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(E_ψ(x) = |ψ(x) - x| / x\\)","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eψ","latex_link":"primary-chapter.html#Epsi-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Eψ","lean_decl_name":"Eψ","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PrimaryDefinitions.lean","lean4_code":"\n/-- The Chebyshev function ψ. TODO: align this with notation used elsewhere in PNT+ -/\nnoncomputable def ψ (x : ℝ) : ℝ := Chebyshev.psi x\n\n\n","line":22,"end_line":26,"proof_status":"formalized"} {"id":"dlog_riemannZeta_bdd_on_vertical_lines","label":"dlog_riemannZeta_bdd_on_vertical_lines","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(\\sigma _0 {\\gt} 1\\), there exists a constant \\(C {\\gt} 0\\) such that \\[ \\forall t \\in \\mathbb {R}, \\quad \\left\\| \\frac{\\zeta '(\\sigma _0 + t i)}{\\zeta (\\sigma _0 + t i)} \\right\\| \\leq C. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/dlog_riemannZeta_bdd_on_vertical_lines","latex_link":"sect0003.html#dlog_riemannZeta_bdd_on_vertical_lines","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/dlog_riemannZeta_bdd_on_vertical_lines","lean_decl_name":"dlog_riemannZeta_bdd_on_vertical_lines","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint\n (title := \"dlog-riemannZeta-bdd-on-vertical-lines\")\n (statement := /--\n For $\\sigma_0 > 1$, there exists a constant $C > 0$ such that\n $$\n \\forall t \\in \\R, \\quad\n \\left\\| \\frac{\\zeta'(\\sigma_0 + t i)}{\\zeta(\\sigma_0 + t i)} \\right\\| \\leq C.\n $$\n -/)\n (proof := /--\n Write as Dirichlet series and estimate trivially using Theorem \\ref{LogDerivativeDirichlet}.\n -/)\n (latexEnv := \"lemma\")]\ntheorem dlog_riemannZeta_bdd_on_vertical_lines {σ₀ : ℝ} (σ₀_gt : 1 < σ₀) :\n ∃ c > 0, ∀(t : ℝ), ‖ζ' (σ₀ + t * I) / ζ (σ₀ + t * I)‖ ≤ c := by\n refine ⟨1 + ‖(ζ' σ₀ / ζ σ₀)‖, (by positivity), fun t ↦ ?_⟩\n have := dlog_riemannZeta_bdd_on_vertical_lines_explicit σ₀_gt t\n rw [neg_div, norm_neg] at this\n exact le_trans this (lt_one_add _).le\n","line":1039,"end_line":1057,"proof_status":"formalized"} {"id":"fks-remark-2-6-a","label":"fks-remark-2-6-a","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\Gamma (3,x) = (x^2 + 2(x+1)) e^{-x}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.remark_2_6_a","latex_link":"primary-chapter.html#fks-remark-2-6-a","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS.remark_2_6_a","lean_decl_name":"FKS.remark_2_6_a","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FioriKadiriSwidinsky.lean","lean4_code":"@[blueprint\n \"fks-remark-2-6-a\"\n (title := \"FKS Remark 2-6-a\")\n (statement := /-- $\\Gamma(3,x) = (x^2 + 2(x+1)) e^{-x}$. -/)]\ntheorem remark_2_6_a (x : ℝ) (hx : 0 ≤ x) :\n Gamma.incomplete 3 x = (x ^ 2 + 2 * (x + 1)) * exp (-x) := by\n have integrableOn_Ioi (s : ℝ) {a : ℝ} (hs : 0 < s) (ha : 0 ≤ a) :\n IntegrableOn (fun t ↦ exp (-t) * t ^ (s - 1)) (Set.Ioi a) :=\n (GammaIntegral_convergent hs).mono_set (Set.Ioi_subset_Ioi ha)\n have recurrence (s : ℝ) (hs : 0 < s) {y : ℝ} (hy : 0 ≤ y) :\n Gamma.incomplete (s + 1) y = y ^ s * exp (-y) + s * Gamma.incomplete s y := by\n unfold Gamma.incomplete\n conv_lhs => arg 2; intro t; rw [mul_comm]\n norm_num\n rw [integral_Ioi_mul_deriv_eq_deriv_mul (u := fun t ↦ t ^ s) (v := fun t ↦ -exp (-t))\n (u' := fun t ↦ s * t ^ (s - 1)) (v' := fun t ↦ exp (-t))\n (a' := -y ^ s * exp (-y)) (b' := 0)]\n · ring_nf\n simp [sub_eq_add_neg, integral_neg, ← integral_const_mul, mul_assoc, mul_comm]\n · exact fun t ht ↦ hasDerivAt_rpow_const (by grind)\n · exact fun t _ ↦ by convert (hasDerivAt_neg t).exp.neg using 1; norm_num\n · simpa [mul_comm] using integrableOn_Ioi (s + 1) (by grind) (by grind : 0 ≤ y)\n · refine ((integrableOn_Ioi s hs hy).const_mul (-s)).congr ?_\n filter_upwards [ae_restrict_mem measurableSet_Ioi] with t _; norm_num; ring\n · convert Filter.Tendsto.mul\n (Filter.Tendsto.rpow (Filter.tendsto_id.mono_left inf_le_left) tendsto_const_nhds _)\n (Filter.Tendsto.neg (continuous_exp.continuousAt.tendsto.comp\n (Filter.Tendsto.neg (Filter.tendsto_id.mono_left inf_le_left)))) using 1 <;> aesop\n · have h_lim : Filter.Tendsto (fun t : ℝ ↦ t ^ s * exp (-t)) Filter.atTop (nhds 0) := by\n apply squeeze_zero_norm' _ (tendsto_pow_mul_exp_neg_atTop_nhds_zero ⌈s⌉₊)\n filter_upwards [Filter.eventually_gt_atTop 1] with t ht\n rw [norm_of_nonneg (by positivity)]\n exact mul_le_mul_of_nonneg_right\n (by simpa using rpow_le_rpow_of_exponent_le ht.le <| Nat.le_ceil s) (by positivity)\n convert h_lim.neg using 2 <;> norm_num\n rw [show (3 : ℝ) = 2 + 1 by norm_num, recurrence 2 (by norm_num) hx,\n show (2 : ℝ) = 1 + 1 by norm_num, recurrence 1 (by norm_num) hx]\n norm_num [Gamma.incomplete, integral_exp_neg_Ioi x]; ring\n","line":237,"end_line":274,"proof_status":"formalized"} {"id":"rs-pnt","label":"rs-pnt","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\vartheta (x) = x + O( x / \\log ^2 x)\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.pnt","latex_link":"secondary-chapter.html#rs-pnt","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.pnt","lean_decl_name":"RS_prime.pnt","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"@[blueprint\n \"rs-pnt\"\n (title := \"A medium version of the prime number theorem\")\n (statement := /-- $\\vartheta(x) = x + O( x / \\log^2 x)$. -/)\n (proof := /-- This in principle follows by establishing an analogue of Theorem \\ref{chebyshev-asymptotic}, using mediumPNT in place of weakPNT. -/)\n (latexEnv := \"theorem\")\n (discussion := 597)]\ntheorem pnt : ∃ C, ∀ x ≥ 2, |θ x - x| ≤ C * x / log x ^ 2 := by sorry\n","line":23,"end_line":30,"proof_status":"statement_formalized"} {"id":"rs-413","label":"rs-413","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\sum _{p \\leq x} f(p) = \\frac{f(x) \\vartheta (x)}{\\log x} - \\int _2^x \\vartheta (y) \\frac{d}{dy}( \\frac{f(y)}{\\log y} )\\ dy.\\)","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_413","latex_link":"secondary-chapter.html#rs-413","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/RS_prime.eq_413","lean_decl_name":"RS_prime.eq_413","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"theorem eq_413 {f : ℝ → ℝ} {x : ℝ} (hx : 2 ≤ x) (hf : DifferentiableOn ℝ f (Set.Icc 2 x)) :\n ∑ p ∈ filter Prime (Iic ⌊x⌋₊), f p = f x * θ x / log x -\n ∫ y in 2..x, θ y * deriv (fun t ↦ f t / log t) y := by\n sorry\n\n","line":70,"end_line":74,"proof_status":"statement_formalized"} {"id":"lem:poly-ineq","label":"poly-ineq","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(0 \\le \\varepsilon \\le 1/89693^2\\), we have \\[ \\prod _{i=1}^3 (1 + 1.000675^i \\varepsilon ) \\le \\Bigl(1 + 3.01\\varepsilon + 3.01\\varepsilon ^2 + 1.01\\varepsilon ^3\\Bigr), \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.prod_epsilon_le","latex_link":"tertiary-chapter.html#lem:poly-ineq","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Lcm.prod_epsilon_le","lean_decl_name":"Lcm.prod_epsilon_le","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/Lcm.lean","lean4_code":"@[blueprint\n \"lem:poly-ineq\"\n (title := \"Polynomial approximation of the inequality\")\n (statement := /--\n For \\(0 \\le \\varepsilon \\le 1/89693^2\\), we have\n \\[\n \\prod_{i=1}^3 (1 + 1.000675^i \\varepsilon)\n \\le\n \\Bigl(1 + 3.01\\varepsilon + 3.01\\varepsilon^2 + 1.01\\varepsilon^3\\Bigr),\n \\]\n and\n \\[\n \\prod_{i=1}^3 \\Bigl(1 + \\frac{\\varepsilon}{1.000675^{2i}}\\frac{1}{1 + 1/89693}\\Bigr)\n \\Bigl(1 + \\frac{3}{8}\\varepsilon\\Bigr)\n \\Bigl(1 - \\frac{4 \\times 1.000675^{12}}{89693}\\varepsilon\\Bigr)\n \\ge\n 1 + 3.36683\\varepsilon - 0.01\\varepsilon^2.\n \\]\n -/)\n (proof := /--\n Expand each finite product as a polynomial in \\(\\varepsilon\\), estimate the coefficients using\n the bounds in Lemma~\\ref{lem:eps-bounds}, and bound the tails by simple inequalities such as\n \\[\n (1+C\\varepsilon)^k \\le 1 + k C\\varepsilon + \\dots\n \\]\n for small \\(\\varepsilon\\).\n All coefficients can be bounded numerically in a rigorous way; this step is a finite computation\n that can be checked mechanically.\n -/)\n (latexEnv := \"lemma\")]\ntheorem prod_epsilon_le {ε : ℝ} (hε : 0 ≤ ε ∧ ε ≤ 1 / (89693 ^ 2 : ℝ)) :\n ∏ i : Fin 3, (1 + (1.000675 : ℝ) ^ ((i : ℕ) + 1 : ℝ) * ε) ≤\n 1 + 3.01 * ε + 3.01 * ε ^ 2 + 1.01 * ε ^ 3 := by\n norm_cast; norm_num [Fin.prod_univ_three]; nlinarith","line":1478,"end_line":1511,"proof_status":"formalized"} {"id":"Dusart_prop_5_15","label":"Dusart_prop_5_15","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have for \\(k \\geq 688383\\), \\[ p_k \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2}{\\log k}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_15","latex_link":"secondary-chapter.html#Dusart_prop_5_15","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.proposition_5_15","lean_decl_name":"Dusart.proposition_5_15","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_prop_5_15\"\n (title := \"Dusart Proposition 5.15\")\n (statement := /--\n We have for $k \\geq 688383$,\n \\[\n p_k \\leq k \\log k + \\log \\log k - 1 + \\frac{\\log \\log k - 2}{\\log k}.\n \\]\n -/)\n (latexEnv := \"proposition\")]\ntheorem proposition_5_15 {k : ℕ} (hk : k ≥ 688383) :\n nth Nat.Prime k ≤ k * Real.log k + Real.log (Real.log k) - 1 + (Real.log (Real.log k) - 2) / (Real.log k) := by sorry\n","line":480,"end_line":490,"proof_status":"formalized"} {"id":"MellinOfPsi","label":"MellinOfPsi","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["PartialIntegration"],"nlp_text":"The Mellin transform of \\(\\nu \\) is \\[ \\mathcal{M}(\\nu )(s) = O\\left(\\frac{1}{|s|}\\right), \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfPsi","latex_link":"sect0003.html#MellinOfPsi","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinOfPsi","lean_decl_name":"MellinOfPsi","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinOfPsi\")\n (statement := /--\n The Mellin transform of $\\nu$ is\n $$\\mathcal{M}(\\nu)(s) = O\\left(\\frac{1}{|s|}\\right),$$\n as $|s|\\to\\infty$ with $\\sigma_1 \\le \\Re(s) \\le 2$.\n -/)\n (proof := /--\n Integrate by parts:\n $$\n \\left|\\int_0^\\infty \\nu(x)x^s\\frac{dx}{x}\\right| =\n \\left|-\\int_0^\\infty \\nu'(x)\\frac{x^{s}}{s}dx\\right|\n $$\n $$\n \\le \\frac{1}{|s|} \\int_{1/2}^2|\\nu'(x)|x^{\\Re(s)}dx.\n $$\n Since $\\Re(s)$ is bounded, the right-hand side is bounded by a\n constant times $1/|s|$.\n -/)]\nlemma MellinOfPsi {ν : ℝ → ℝ} (diffν : ContDiff ℝ 1 ν)\n (suppν : ν.support ⊆ Set.Icc (1 / 2) 2) :\n ∃ C > 0, ∀ (σ₁ : ℝ) (_ : 0 < σ₁) (s : ℂ) (_ : σ₁ ≤ s.re) (_ : s.re ≤ 2),\n ‖𝓜 (fun x ↦ (ν x : ℂ)) s‖ ≤ C * ‖s‖⁻¹ := by\n let f := fun (x : ℝ) ↦ ‖deriv ν x‖\n have cont : ContinuousOn f (Icc (1 / 2) 2) :=\n (Continuous.comp (by continuity) <| diffν.continuous_deriv (by norm_num)).continuousOn\n obtain ⟨a, _, max⟩ := isCompact_Icc.exists_isMaxOn (f := f) (by norm_num) cont\n let σ₂ : ℝ := 2\n let C : ℝ := f a * 2 ^ σ₂ * (3 / 2)\n have mainBnd : ∀ (σ₁ : ℝ), 0 < σ₁ → ∀ (s : ℂ), σ₁ ≤ s.re → s.re ≤ 2 →\n ‖𝓜 (fun x ↦ (ν x : ℂ)) s‖ ≤ C * ‖s‖⁻¹ := by\n intro σ₁ σ₁pos s hs₁ hs₂\n have s_ne_zero: s ≠ 0 := fun h ↦ by linarith [zero_re ▸ h ▸ hs₁]\n simp only [mellin, f, MellinOfPsi_aux diffν suppν s_ne_zero, norm_mul, smul_eq_mul, mul_comm]\n gcongr\n · simp\n calc\n _ ≤ ∫ (x : ℝ) in Ioi 0, ‖(deriv ν x * (x : ℂ) ^ s)‖ := ?_\n _ = ∫ (x : ℝ) in Icc (1 / 2) 2, ‖(deriv ν x * (x : ℂ) ^ s)‖ := ?_\n _ ≤ ‖∫ (x : ℝ) in Icc (1 / 2) 2, ‖(deriv ν x * (x : ℂ) ^ s)‖‖ :=\n le_abs_self _\n _ ≤ _ := ?_\n · simp_rw [norm_integral_le_integral_norm]\n · apply SetIntegral.integral_eq_integral_inter_of_support_subset_Icc\n · simp only [Function.support_abs, Function.support_mul, Function.support_ofReal]\n apply subset_trans (by apply inter_subset_left) <| Function.support_deriv_subset_Icc suppν\n · exact (Icc_subset_Ioi_iff (by norm_num)).mpr (by norm_num)\n · have := intervalIntegral.norm_integral_le_of_norm_le_const' (C := f a * 2 ^ σ₂)\n (f := fun x ↦ f x * ‖(x : ℂ) ^ s‖) (a := (1 / 2 : ℝ)) ( b := 2) (by norm_num) ?_\n · simp only [Real.norm_eq_abs, norm_real, norm_mul] at this ⊢\n rwa [(by norm_num: |(2 : ℝ) - 1 / 2| = 3 / 2),\n intervalIntegral.integral_of_le (by norm_num), ← integral_Icc_eq_integral_Ioc] at this\n · intro x hx;\n have f_bound := isMaxOn_iff.mp max x hx\n have pow_bound : ‖(x : ℂ) ^ s‖ ≤ 2 ^ σ₂ := by\n rw [norm_cpow_eq_rpow_re_of_pos (by linarith [mem_Icc.mp hx])]\n have xpos : 0 ≤ x := by linarith [(mem_Icc.mp hx).1]\n have h := rpow_le_rpow xpos (mem_Icc.mp hx).2 (by linarith : 0 ≤ s.re)\n exact le_trans h <| rpow_le_rpow_of_exponent_le (by norm_num) hs₂\n convert mul_le_mul f_bound pow_bound (norm_nonneg _) ?_ using 1 <;> simp [f]\n have Cnonneg : 0 ≤ C := by\n have hh := mainBnd 1 (by norm_num) ((3 : ℂ) / 2) (by norm_num) (by norm_num)\n have hhh : 0 ≤ ‖𝓜 (fun x ↦ (ν x : ℂ)) ((3 : ℂ) / 2)‖ := by positivity\n have hhhh : 0 < ‖(3 : ℂ) / 2‖⁻¹ := by norm_num\n have := hhh.trans hh\n exact (mul_nonneg_iff_of_pos_right hhhh).mp this\n by_cases CeqZero : C = 0\n · refine ⟨1, by linarith, ?_⟩\n intro ε εpos s hs₁ hs₂\n have := mainBnd ε εpos s hs₁ hs₂\n rw [CeqZero, zero_mul] at this\n have : 0 ≤ 1 * ‖s‖⁻¹ := by positivity\n linarith\n · exact ⟨C, lt_of_le_of_ne Cnonneg fun a ↦ CeqZero (id (Eq.symm a)), mainBnd⟩\n","line":493,"end_line":566,"proof_status":"formalized"} {"id":"ZetaFixedLowerBound","label":"ZetaFixedLowerBound","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For all \\(t\\in \\mathbb {R}\\) one has \\[ |\\zeta (3/2+it)|\\geq \\frac{\\zeta (3)}{\\zeta (3/2)}. \\]","doc_url":null,"latex_link":"sect0004.html#ZetaFixedLowerBound","lean_link":null,"lean_decl_name":"ZetaFixedLowerBound","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"PartialIntegration","label":"PartialIntegration","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(f, g\\) be once differentiable functions from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {C}\\) so that \\(fg'\\) and \\(f'g\\) are both integrable, and \\(f\\cdot g (x)\\to 0\\) as \\(x\\to 0^+,\\infty \\). Then \\[ \\int _0^\\infty f(x)g'(x) dx = -\\int _0^\\infty f'(x)g(x)dx. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PartialIntegration","latex_link":"sect0003.html#PartialIntegration","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/PartialIntegration","lean_decl_name":"PartialIntegration","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"/-- *Need differentiability, and decay at `0` and `∞`* -/\n@[blueprint\n (title := \"PartialIntegration\")\n (statement := /--\n Let $f, g$ be once differentiable functions from $\\mathbb{R}_{>0}$ to $\\mathbb{C}$ so that $fg'$\n and $f'g$ are both integrable, and $f\\cdot g (x)\\to 0$ as $x\\to 0^+,\\infty$.\n Then\n $$\n \\int_0^\\infty f(x)g'(x) dx = -\\int_0^\\infty f'(x)g(x)dx.\n $$\n -/)\n (proof := /-- Partial integration. -/)\n (latexEnv := \"lemma\")]\nlemma PartialIntegration (f g : ℝ → ℂ)\n (fDiff : DifferentiableOn ℝ f (Ioi 0))\n (gDiff : DifferentiableOn ℝ g (Ioi 0))\n (fDerivgInt : IntegrableOn (f * deriv g) (Ioi 0))\n (gDerivfInt : IntegrableOn (deriv f * g) (Ioi 0))\n (lim_at_zero : Tendsto (f * g) (𝓝[>] 0) (𝓝 0))\n (lim_at_inf : Tendsto (f * g) atTop (𝓝 0)) :\n ∫ x in Ioi 0, f x * deriv g x = -∫ x in Ioi 0, deriv f x * g x := by\n simpa using integral_Ioi_mul_deriv_eq_deriv_mul\n (fun x hx ↦ fDiff.hasDerivAt (Ioi_mem_nhds hx))\n (fun x hx ↦ gDiff.hasDerivAt (Ioi_mem_nhds hx))\n fDerivgInt gDerivfInt lim_at_zero lim_at_inf\n","line":202,"end_line":226,"proof_status":"formalized"} {"id":"ZetaExtend","label":"ZetaExtend","background_color":"#A3D6FF","border_color":"blue","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have that \\[ \\zeta (s)=1+\\frac{1}{s-1}-s\\int _1^\\infty \\{ x\\} \\, x^{-s}\\, \\frac{dx}{x} \\]","doc_url":null,"latex_link":"sect0004.html#ZetaExtend","lean_link":null,"lean_decl_name":"ZetaExtend","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"proof_status":"nlp_only"} {"id":"BddAbove_to_IsBigO","label":"BddAbove_to_IsBigO","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"If \\(f\\) is bounded above in a punctured neighborhood of \\(p\\), then \\(f\\) is \\(O(1)\\) in that neighborhood.","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BddAbove_to_IsBigO","latex_link":"sect0003.html#BddAbove_to_IsBigO","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BddAbove_to_IsBigO","lean_decl_name":"BddAbove_to_IsBigO","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ZetaBounds.lean","lean4_code":"@[blueprint\n (title := \"BddAbove-to-IsBigO\")\n (statement := /--\n If $f$ is bounded above in a punctured neighborhood of $p$, then $f$ is $O(1)$ in that\n neighborhood.\n -/)\n (proof := /-- Elementary. -/)]\nlemma BddAbove_to_IsBigO {f : ℂ → ℂ} {p : ℂ}\n {U : Set ℂ} (hU : U ∈ 𝓝 p) (bdd : BddAbove (norm ∘ f '' (U \\ {p}))) :\n f =O[𝓝[≠] p] (1 : ℂ → ℂ) := by\n dsimp [BddAbove, upperBounds] at bdd\n rcases bdd with ⟨C, hC⟩\n\n have h : ∀ x ∈ U \\ {p}, ‖f x‖ ≤ C := by\n intro x hx\n have fx_is_norm : ‖f x‖ ∈ norm ∘ f ''(U \\ {p}) := by\n exact ⟨x, hx, rfl⟩\n exact hC fx_is_norm\n\n rw [Asymptotics.isBigO_iff]\n use C\n rw [eventually_nhdsWithin_iff]\n simp only [mem_diff, mem_singleton_iff, and_imp, mem_compl_iff, Pi.one_apply, one_mem,\n CStarRing.norm_of_mem_unitary, mul_one] at h ⊢\n filter_upwards [hU] using h\n","line":500,"end_line":524,"proof_status":"formalized"} {"id":"from-buthe-eq-1-7","label":"from-buthe-eq-1-7","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\theta (x) {\\lt} x\\) for all \\(1 \\leq x \\leq 10^{19}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.buthe_eq_1_7","latex_link":"secondary-chapter.html#from-buthe-eq-1-7","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/BKLNW.buthe_eq_1_7","lean_decl_name":"BKLNW.buthe_eq_1_7","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/BKLNW.lean","lean4_code":" else if b < 24 then 9.52229e-6\n else if b < 25 then 5.77556e-6\n else if b < 30 then 3.50306e-6\n else if b < 35 then 2.87549e-7\n else if b < 40 then 2.36034e-8\n else if b < 45 then 1.93378e-8\n else if b < 50 then 1.09073e-8\n","line":38,"end_line":44,"proof_status":"statement_formalized"} {"id":"LogDerivativeDirichlet","label":"LogDerivativeDirichlet","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have that, for \\(\\Re (s){\\gt}1\\), \\[ -\\frac{\\zeta '(s)}{\\zeta (s)} = \\sum _{n=1}^\\infty \\frac{\\Lambda (n)}{n^s}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivativeDirichlet","latex_link":"sect0003.html#LogDerivativeDirichlet","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LogDerivativeDirichlet","lean_decl_name":"LogDerivativeDirichlet","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MediumPNT.lean","lean4_code":"@[blueprint \"LogDerivativeDirichlet\"\n (title := \"LogDerivativeDirichlet\")\n (statement := /--\n We have that, for $\\Re(s)>1$,\n $$-\\frac{\\zeta'(s)}{\\zeta(s)} = \\sum_{n=1}^\\infty \\frac{\\Lambda(n)}{n^s}. $$-/)\n (proof := /-- Already in Mathlib. -/)]\ntheorem LogDerivativeDirichlet (s : ℂ) (hs : 1 < s.re) :\n - deriv riemannZeta s / riemannZeta s = ∑' n, Λ n / (n : ℂ) ^ s := by\n rw [← ArithmeticFunction.LSeries_vonMangoldt_eq_deriv_riemannZeta_div hs]\n dsimp [LSeries, LSeries.term]\n nth_rewrite 2 [Summable.tsum_eq_add_tsum_ite (b := 0) ?_]\n · simp\n · have := ArithmeticFunction.LSeriesSummable_vonMangoldt hs\n dsimp [LSeriesSummable] at this\n convert this; rename ℕ => n\n by_cases h : n = 0 <;> simp [LSeries.term, h]\n","line":58,"end_line":73,"proof_status":"formalized"} {"id":"Ramanujan-Soldner-constant","label":"Ramanujan-Soldner-constant","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":["li-def"],"nlp_text":"\\(\\operatorname {li}(2) = 1.0451\\dots \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/li.two_approx","latex_link":"secondary-chapter.html#Ramanujan-Soldner-constant","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/li.two_approx","lean_decl_name":"li.two_approx","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"Ramanujan-Soldner-constant\"\n (title := \"Ramanujan-Soldner constant\")\n (statement := /-- $\\li(2) = 1.0451\\dots$. -/)\n (proof := /-- Use Sublemma \\ref{li-approx} and some numerical integration. -/)\n (latexEnv := \"lemma\")\n (discussion := 759)]\ntheorem li.two_approx : li 2 ∈ Set.Icc 1.0451 1.0452 := by\n sorry","line":106,"end_line":114,"proof_status":"statement_formalized"} {"id":"Dusart_thm_5_9b","label":"Dusart_thm_5_9b","background_color":"white","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"We have for \\(x \\geq 2278382\\), \\[ \\prod _{p \\leq x} \\frac{p}{p-1} = e^{\\gamma } \\log x \\Bigl(1 + O^*\\Bigl(\\frac{0.2}{\\log ^3 x}\\Bigr)\\Bigr). \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_9b","latex_link":"secondary-chapter.html#Dusart_thm_5_9b","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Dusart.theorem_5_9b","lean_decl_name":"Dusart.theorem_5_9b","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/Dusart.lean","lean4_code":"@[blueprint \"Dusart_thm_5_9b\"\n (title := \"Dusart Theorem 5.9 (b)\")\n (statement := /--\n We have for $x \\geq 2278382$,\n \\[\n \\prod_{p \\leq x} \\frac{p}{p-1} = e^{\\gamma} \\log x \\Bigl(1 + O^*\\Bigl(\\frac{0.2}{\\log^3 x}\\Bigr)\\Bigr).\n \\] -/)\n (latexEnv := \"theorem\")]\ntheorem theorem_5_9b {x : ℝ} (hx : x ≥ 2278382) : ∃ E,\n ( (∏ p ∈ Finset.filter Prime (Finset.range (⌊x⌋₊ + 1)), p / (p - 1)) = exp eulerMascheroniConstant * log x * (1 + E) ∧ |E| ≤ 0.2 / (log x) ^ 3 ) := by sorry\n","line":391,"end_line":400,"proof_status":"formalized"} {"id":"MellinConvolution","label":"MellinConvolution","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(f\\) and \\(g\\) be functions from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {C}\\). Then we define the Mellin convolution of \\(f\\) and \\(g\\) to be the function \\(f\\ast g\\) from \\(\\mathbb {R}_{{\\gt}0}\\) to \\(\\mathbb {C}\\) defined by \\[ (f\\ast g)(x) = \\int _0^\\infty f(y)g(x/y)\\frac{dy}{y}. \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinConvolution","latex_link":"sect0003.html#MellinConvolution","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/MellinConvolution","lean_decl_name":"MellinConvolution","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/MellinCalculus.lean","lean4_code":"@[blueprint\n (title := \"MellinConvolution\")\n (statement := /--\n Let $f$ and $g$ be functions from $\\mathbb{R}_{>0}$ to $\\mathbb{C}$. Then we define the\n Mellin convolution of $f$ and $g$ to be the function $f\\ast g$ from $\\mathbb{R}_{>0}$\n to $\\mathbb{C}$ defined by\n $$(f\\ast g)(x) = \\int_0^\\infty f(y)g(x/y)\\frac{dy}{y}.$$\n -/)]\nnoncomputable def MellinConvolution (f g : ℝ → 𝕂) (x : ℝ) : 𝕂 :=\n ∫ y in Ioi 0, f y * g (x / y) / y\n","line":279,"end_line":288,"proof_status":"formalized"} {"id":"li-def","label":"li-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\mathrm{li}(x) = \\int _0^x \\frac{dt}{\\log t}\\) (in the principal value sense) and \\(\\mathrm{Li}(x) = \\int _2^x \\frac{dt}{\\log t}\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/li","latex_link":"secondary-chapter.html#li-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/li","lean_decl_name":"li","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"\n@[blueprint\n \"li-def\"\n (title := \"li and Li\")\n (statement := /-- $\\mathrm{li}(x) = \\int_0^x \\frac{dt}{\\log t}$ and $\\mathrm{Li}(x) = \\int_2^x \\frac{dt}{\\log t}$. -/)]\n","line":28,"end_line":32,"proof_status":"formalized"} {"id":"fks2-eq-16","label":"fks2-eq-16","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For any \\(a,b,c,x \\in \\mathbb {R}\\) we define \\(g(a,b,c,x) := x^{-a} (\\log x)^b \\exp ( c (\\log x)^{1/2} )\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.g_bound","latex_link":"secondary-chapter.html#fks2-eq-16","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/FKS2.g_bound","lean_decl_name":"FKS2.g_bound","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/FKS2.lean","lean4_code":" (title := \"Remark in FKS2 Section 1.1\")\n (statement := /-- $\\li(x) - \\Li(x) = \\li(2)$. -/)\n (proof := /-- This follows directly from the definitions of $\\li$ and $\\Li$. -/)\n (latexEnv := \"remark\")\n (discussion := 608)]\ntheorem sec_1_1_remark\n (h02 : IntervalIntegrable (fun t => 1 / Real.log t) MeasureTheory.volume 0 2)\n","line":18,"end_line":24,"proof_status":"formalized"} {"id":"LowerUIntegral","label":"LowerUIntegral","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"A LowerUIntegral of a function \\(f\\) comes from \\(\\sigma -i\\infty \\) up to \\(\\sigma -iT\\), over to \\(\\sigma '-iT\\), and back down to \\(\\sigma '-i\\infty \\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LowerUIntegral","latex_link":"sect0003.html#LowerUIntegral","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/LowerUIntegral","lean_decl_name":"LowerUIntegral","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/ResidueCalcOnRectangles.lean","lean4_code":"@[blueprint\n (title := \"LowerUIntegral\")\n (statement := /--\n A LowerUIntegral of a function $f$ comes from $\\sigma-i\\infty$ up to $\\sigma-iT$, over to\n $\\sigma'-iT$, and back down to $\\sigma'-i\\infty$.\n -/)]\nnoncomputable def LowerUIntegral (f : ℂ → E) (σ σ' T : ℝ) : E := HIntegral f σ σ' (-T) -\n I • (∫ y : ℝ in Iic (-T), f (σ' + y * I)) + I • (∫ y : ℝ in Iic (-T), f (σ + y * I))\n","line":56,"end_line":63,"proof_status":"formalized"} {"id":"theta-def","label":"theta-def","background_color":"#B0ECA3","border_color":"green","kind":"box","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"\\(\\theta (x) = \\sum _{p \\leq x} \\log p\\) where the sum is over primes \\(p\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/θ","latex_link":"secondary-chapter.html#theta-def","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/θ","lean_decl_name":"θ","kind_description":"definitions","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"./PrimeNumberTheoremAnd/RosserSchoenfeldPrime.lean","lean4_code":"noncomputable def θ.Stieltjes : StieltjesFunction ℝ := {\n toFun := θ\n mono' := theta_mono\n right_continuous' := fun x ↦ by\n rw [ContinuousWithinAt, theta_eq_theta_coe_floor x]\n refine Filter.Tendsto.congr' ?_ tendsto_const_nhds\n obtain hx | hx := le_total 0 x\n · filter_upwards [Ico_mem_nhdsGE_of_mem ⟨floor_le hx, lt_floor_add_one x⟩] with y hy\n rw [theta_eq_theta_coe_floor y, floor_eq_on_Ico _ _ hy]\n · filter_upwards [Ico_mem_nhdsGE (by grind : x < 1)] with y hy\n simp [floor_of_nonpos hx, theta_eq_theta_coe_floor y, floor_eq_zero.mpr hy.2]\n}\n\n","line":39,"end_line":51,"proof_status":"formalized"} {"id":"keyIdentity","label":"keyIdentity","background_color":"#1CAC78","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"Let \\(x\\in \\mathbb {R}\\) and \\(s \\ne 0, -1\\). Then \\[ \\frac{x^\\sigma }{s(1+s)} = \\frac{x^\\sigma }{s} - \\frac{x^\\sigma }{1+s} \\]","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.keyIdentity","latex_link":"sect0003.html#keyIdentity","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/Perron.keyIdentity","lean_decl_name":"Perron.keyIdentity","kind_description":"theorems and lemmas","status_from_color":"formalized","lookup_in_mathlib4v4.22.0":false,"found_in_mathlib4v4.22.0":false,"source_repo":"PrimeNumberTheoremAnd","source_path":"PrimeNumberTheoremAnd/PerronFormula.lean","lean4_code":"@[blueprint\n \"keyIdentity\"\n (title := \"keyIdentity\")\n (statement := /--\n Let $x\\in \\R$ and $s \\ne 0, -1$. Then\n $$\n \\frac{x^\\sigma}{s(1+s)} = \\frac{x^\\sigma}{s} - \\frac{x^\\sigma}{1+s}\n $$\n -/)\n (proof := /-- By ring. -/)\n (latexEnv := \"lemma\")]\nlemma keyIdentity (x : ℝ) {s : ℂ} (s_ne_zero : s ≠ 0) (s_ne_neg_one : s ≠ -1) :\n (x : ℂ) ^ s / (s * (s + 1))\n = (x : ℂ) ^ s / s - (x : ℂ) ^ s / (s + 1) := by\n field_simp [sPlusOneNeZero, mul_ne_zero]; ring_nf\n","line":695,"end_line":709,"proof_status":"formalized"} {"id":"log_upper","label":"log_upper","background_color":"#A3D6FF","border_color":"green","kind":"ellipse","dep_graph_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/blueprint/dep_graph_document.html","dependencies":[],"nlp_text":"For \\(t {\\gt} -1\\), one has \\(\\log (1+t) \\leq t\\).","doc_url":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_le","latex_link":"secondary-chapter.html#log_upper","lean_link":"https://AlexKontorovich.github.io/PrimeNumberTheoremAnd/docs/find/#doc/log_le","lean_decl_name":"log_le","kind_description":"theorems and lemmas","status_from_color":"ready_to_formalize","lookup_in_mathlib4v4.22.0":true,"found_in_mathlib4v4.22.0":false,"source_repo":"remote_github","source_path":"https://raw.githubusercontent.com/AlexKontorovich/PrimeNumberTheoremAnd/d4a8650068035281b01c319c2a76d2156a1872fd/PrimeNumberTheoremAnd/SecondaryDefinitions.lean","lean4_code":"@[blueprint\n \"log_upper\"\n (title := \"Log upper bound\")\n (statement := /-- For $t > -1$, one has $\\log (1+t) \\leq t$. -/)\n (proof := /-- This follows from the mean value theorem. -/)\n (latexEnv := \"sublemma\")]\ntheorem log_le\n (t : ℝ) (ht : t > -1) :\n log (1 + t) ≤ t := by\n sorry","line":37,"end_line":46,"proof_status":"statement_formalized"}