module public import ConditionalGoldbach.Proofs.QuadraticNormChange public import ConditionalGoldbach.Proofs.Asymptotics /-! Strict energy positivity and uniform norm bounds for arbitrary strip widths. -/ public section set_option autoImplicit false noncomputable section open scoped BigOperators ComplexConjugate Topology ContDiff open MeasureTheory Filter Set Complex namespace ConditionalGoldbach attribute [local instance] Classical.propDecidable lemma derivativeWeight_nonzero_of_weight {φ : ℝ → ℝ} (hφ : IsWeight φ) : ∃ u : ℝ, 0 < u ∧ derivativeWeight φ u ≠ 0 := by obtain ⟨u, hu⟩ := hφ.exists_ne_zero have hus := hφ.mem_support_interval hu have hu0 : 0 < u := by linarith [hus.1] have hψu : 0 < companion φ u := mul_pos (Real.sqrt_pos.mpr hu0) (lt_of_le_of_ne (hφ.nonneg u) hu.symm) obtain ⟨v,hv,hmax⟩ := isCompact_Icc.exists_isMaxOn (show (Icc (1/3 : ℝ) (2/3)).Nonempty from ⟨u,hus⟩) (companion_contDiff hφ).continuous.continuousOn have hψv : 0 < companion φ v := hψu.trans_le (hmax hus) have hv0 : 0 < v := by linarith [hv.1] have hglobal (x : ℝ) : companion φ x ≤ companion φ v := by by_cases hx : x ∈ Icc (1/3 : ℝ) (2/3) · exact hmax hx · have hz : companion φ x = 0 := by by_contra he exact hx (companion_support_subset hφ he) rw [hz] exact hψv.le have hl : IsLocalMax (companion φ) v := Filter.Eventually.of_forall hglobal refine ⟨v,hv0,?_⟩ simpa [derivativeWeight, hl.deriv_eq_zero] using hψv.ne' lemma weightEnergy_pos {φ : ℝ → ℝ} (hφ : IsWeight φ) : 0 < weightEnergy φ := by obtain ⟨u,hu,hd⟩ := derivativeWeight_nonzero_of_weight hφ let f : ℝ → ℝ := fun x => derivativeWeight φ x^2/x have hs : Function.support f ⊆ Icc (1/3 : ℝ) (2/3) := by intro x hx apply derivativeWeight_support_subset hφ intro he exact hx (by simp [f,he]) have hc : Continuous f := by rw [continuous_iff_continuousAt] intro x by_cases hx : x = 0 · subst x apply (continuousAt_const (y := (0 : ℝ))).congr_of_eventuallyEq filter_upwards [Iio_mem_nhds (show (0 : ℝ)<1/3 by norm_num)] with x hx have hz : f x = 0 := by by_contra he exact (not_lt_of_ge (hs he).1) hx exact hz · exact ((derivativeWeight_continuous hφ).continuousAt.pow 2).div continuousAt_id hx have hf : HasCompactSupport f := HasCompactSupport.of_support_subset_isCompact isCompact_Icc hs have hn : 0 ≤ f := by intro x change 0 ≤ f x by_cases hx : f x = 0 · rw [hx] · exact div_nonneg (sq_nonneg _) (by have hh := (hs hx).1; linarith) have hp : 0 < ∫ x, f x := hc.integral_pos_of_hasCompactSupport_nonneg_nonzero hf hn (show f u ≠ 0 from div_ne_zero (pow_ne_zero _ hd) hu.ne') have he : (∫ x, f x) = ∫ x in Ioi (0 : ℝ), f x := by symm apply setIntegral_eq_integral_of_forall_compl_eq_zero intro x hx by_contra he have hh := (hs he).1 exact hx (show 0