module public import ConditionalGoldbach.Proofs.SpectralModelGrowth public import ConditionalGoldbach.Proofs.WeightedComponentKernel import ConditionalGoldbach.Proofs.HalfPlaneWeightedCauchy /-! Integration of the model kernel's pole along the four Hardy boundary blocks. -/ public section set_option autoImplicit false noncomputable section open scoped BigOperators ComplexConjugate Topology open MeasureTheory Filter Set Complex namespace ConditionalGoldbach /-- The pole at `s + conj z = 0` depends on the difference of the two heights. -/ private lemma boundary_pole_weight_le {a x y w : ℝ} (ha : 0 < a) (hxy : a ≤ x + y) (hw : 0 ≤ w) (hw1 : w ≤ 1) (t u : ℝ) : (max 1 ‖line x t + conj (line y u)‖⁻¹)^2 * w ≤ w + (a^2 + (t-u)^2)⁻¹ := by have hnorm : ‖line x t + conj (line y u)‖^2 = (x+y)^2 + (t-u)^2 := by rw [← Complex.normSq_eq_norm_sq, Complex.normSq_apply] simp [line] <;> ring rcases le_total ‖line x t + conj (line y u)‖⁻¹ 1 with h | h · rw [max_eq_left h, one_pow, one_mul] exact le_add_of_nonneg_right (by positivity) · rw [max_eq_right h] calc _ ≤ (‖line x t + conj (line y u)‖⁻¹)^2 := mul_le_of_le_one_right (sq_nonneg _) hw1 _ ≤ (a^2 + (t-u)^2)⁻¹ := by rw [inv_pow, hnorm] have hd : a^2 + (t-u)^2 ≤ (x+y)^2 + (t-u)^2 := by gcongr simpa only [one_div] using div_le_div_of_nonneg_left zero_le_one (by positivity) hd _ ≤ _ := le_add_of_nonneg_left hw /-- Integrate an ordinary boundary weight and a translated Cauchy kernel in each row. -/ private lemma boundary_square_le_of_cauchy_majorant {a b M : ℝ} (ha : 0 < a) (hab : a < b) (K : ℂ → ℂ → ℂ) (d : ℝ → ℝ) (hd : Integrable d) (hbound : ∀ x ∈ Icc a b, ∀ y ∈ Icc a b, ∀ t u : ℝ, ‖K (line x t) (line y u)‖^2 ≤ M * d t * (d u + (a^2 + (t-u)^2)⁻¹)) : BoundaryKernelSquareIntegral a b K ≤ 4 * M * (∫ t, d t) * ((∫ t, d t) + Real.pi / a) := by obtain ⟨hi, he⟩ := cauchy_weight_integral ha have hblock (x : ℝ) (hx : x ∈ Icc a b) (y : ℝ) (hy : y ∈ Icc a b) : (∫ t : ℝ, ∫ u : ℝ, ‖K (line x t) (line y u)‖^2) ≤ M * (∫ t, d t) * ((∫ t, d t) + Real.pi / a) := by calc _ ≤ ∫ t, M * d t * ((∫ u, d u) + Real.pi / a) := by apply integral_mono_of_nonneg (Eventually.of_forall fun t => integral_nonneg fun u => sq_nonneg _) ((hd.const_mul M).mul_const _) apply Eventually.of_forall intro t have ht : Integrable (fun u : ℝ => (a^2 + (t-u)^2)⁻¹) := hi.comp_sub_left t calc _ ≤ ∫ u, M * d t * (d u + (a^2 + (t-u)^2)⁻¹) := integral_mono_of_nonneg (Eventually.of_forall fun u => sq_nonneg _) ((hd.add ht).const_mul _) (Eventually.of_forall (hbound x hx y hy t)) _ = _ := by rw [integral_const_mul, integral_add hd ht, integral_sub_left_eq_self (fun v : ℝ => (a^2 + v^2)⁻¹) volume t, he] _ = _ := by rw [integral_mul_const, integral_const_mul] have hl : a ∈ Icc a b := ⟨le_rfl, hab.le⟩ have hr : b ∈ Icc a b := ⟨hab.le, le_rfl⟩ simp only [BoundaryKernelSquareIntegral, Finset.sum_pair hab.ne] linarith only [hblock a hl a hl, hblock a hl b hr, hblock b hr a hl, hblock b hr b hr] /-- The sum of the four squared boundary integrals for the genuine model is at most a uniform constant times the inverse cube of the left boundary. -/ theorem continuedModel_boundary_square_bound : ∃ C : ℝ, 0 < C ∧ ∀ a : ℝ, 0 < a → a < beta → ∀ N : ℕ, 0 < N → BoundaryKernelSquareIntegral a beta (weightedAnalyticKernel (continuedModel N)) ≤ C * (a⁻¹)^3 := by obtain ⟨B, hB, hb⟩ := continuedModel_uniform_pole_bound let d : ℝ → ℝ := fun t => (1 + |t|)^(-(3 / 2 : ℝ)) let J := ∫ t, d t have hd (t : ℝ) : 0 ≤ d t := Real.rpow_nonneg (by positivity) _ have hJ : 0 ≤ J := integral_nonneg hd refine ⟨64 * B^2 * (J + 1) * (J + Real.pi), by positivity, ?_⟩ intro a ha hab N hN have henergy : BoundaryKernelSquareIntegral a beta (weightedAnalyticKernel (continuedModel N)) ≤ 4 * (16 * (B * a⁻¹)^2) * J * (J + Real.pi / a) := by apply boundary_square_le_of_cauchy_majorant ha hab _ d hardy_decay_integrable intro x hx y hy t u let m := max 1 ‖line x t + conj (line y u)‖⁻¹ have hn := hb a ha hab N hN (line x t) (line y u) (by simpa [line] using hx) (by simpa [line] using hy) have hpoint := weightedAnalyticKernel_power_bound_at (ha.le.trans hx.1) (ha.le.trans hy.1) (continuedModel N) t u (B * a⁻¹ * m) (by dsimp [m]; positivity) (by simpa [m, line] using hn) have hweight : m^2 * d u ≤ d u + (a^2 + (t-u)^2)⁻¹ := boundary_pole_weight_le ha (by linarith [hx.1, hy.1]) (hd u) (Real.rpow_le_one_of_one_le_of_nonpos (by linarith [abs_nonneg u]) (by norm_num)) t u calc _ ≤ 16 * (B * a⁻¹ * m)^2 * d t * d u := hpoint _ = 16 * (B * a⁻¹)^2 * d t * (m^2 * d u) := by ring _ ≤ _ := mul_le_mul_of_nonneg_left hweight (mul_nonneg (by positivity) (hd t)) have hinv : 1 ≤ a⁻¹ := (one_le_inv₀ ha).mpr (hab.le.trans (by norm_num [beta])) have hscale : J + Real.pi / a ≤ (J + Real.pi) * a⁻¹ := by rw [div_eq_mul_inv, add_mul] exact add_le_add_right (le_mul_of_one_le_right hJ hinv) _ calc _ ≤ _ := henergy _ ≤ 4 * (16 * (B * a⁻¹)^2) * (J + 1) * ((J + Real.pi) * a⁻¹) := by gcongr <;> linarith _ = _ := by ring end ConditionalGoldbach