goldbach-spectral-bridge
Li and Liu's GRH + S ⇒ Goldbach in Lean, checked against the paper by Comparator: clean it up together, and settle S
| 1 | module |
| 2 | |
| 3 | public import ConditionalGoldbach.Proofs.QuadraticNormChange |
| 4 | public import ConditionalGoldbach.Proofs.Asymptotics |
| 5 | |
| 6 | /-! Strict energy positivity and uniform norm bounds for arbitrary strip widths. -/ |
| 7 | public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open scoped BigOperators ComplexConjugate Topology ContDiff |
| 12 | open MeasureTheory Filter Set Complex |
| 13 | namespace ConditionalGoldbach |
| 14 | attribute [local instance] Classical.propDecidable |
| 15 | |
| 16 | lemma derivativeWeight_nonzero_of_weight {φ : ℝ → ℝ} (hφ : IsWeight φ) : |
| 17 | ∃ u : ℝ, 0 < u ∧ derivativeWeight φ u ≠ 0 := by |
| 18 | obtain ⟨u, hu⟩ := hφ.exists_ne_zero |
| 19 | have hus := hφ.mem_support_interval hu |
| 20 | have hu0 : 0 < u := by linarith [hus.1] |
| 21 | have hψu : 0 < companion φ u := mul_pos (Real.sqrt_pos.mpr hu0) |
| 22 | (lt_of_le_of_ne (hφ.nonneg u) hu.symm) |
| 23 | obtain ⟨v,hv,hmax⟩ := isCompact_Icc.exists_isMaxOn |
| 24 | (show (Icc (1/3 : ℝ) (2/3)).Nonempty from ⟨u,hus⟩) |
| 25 | (companion_contDiff hφ).continuous.continuousOn |
| 26 | have hψv : 0 < companion φ v := hψu.trans_le (hmax hus) |
| 27 | have hv0 : 0 < v := by linarith [hv.1] |
| 28 | have hglobal (x : ℝ) : companion φ x ≤ companion φ v := by |
| 29 | by_cases hx : x ∈ Icc (1/3 : ℝ) (2/3) |
| 30 | · exact hmax hx |
| 31 | · have hz : companion φ x = 0 := by |
| 32 | by_contra he |
| 33 | exact hx (companion_support_subset hφ he) |
| 34 | rw [hz] |
| 35 | exact hψv.le |
| 36 | have hl : IsLocalMax (companion φ) v := Filter.Eventually.of_forall hglobal |
| 37 | refine ⟨v,hv0,?_⟩ |
| 38 | simpa [derivativeWeight, hl.deriv_eq_zero] using hψv.ne' |
| 39 | |
| 40 | lemma weightEnergy_pos {φ : ℝ → ℝ} (hφ : IsWeight φ) : 0 < weightEnergy φ := by |
| 41 | obtain ⟨u,hu,hd⟩ := derivativeWeight_nonzero_of_weight hφ |
| 42 | let f : ℝ → ℝ := fun x => derivativeWeight φ x^2/x |
| 43 | have hs : Function.support f ⊆ Icc (1/3 : ℝ) (2/3) := by |
| 44 | intro x hx |
| 45 | apply derivativeWeight_support_subset hφ |
| 46 | intro he |
| 47 | exact hx (by simp [f,he]) |
| 48 | have hc : Continuous f := by |
| 49 | rw [continuous_iff_continuousAt] |
| 50 | intro x |
| 51 | by_cases hx : x = 0 |
| 52 | · subst x |
| 53 | apply (continuousAt_const (y := (0 : ℝ))).congr_of_eventuallyEq |
| 54 | filter_upwards [Iio_mem_nhds (show (0 : ℝ)<1/3 by norm_num)] with x hx |
| 55 | have hz : f x = 0 := by |
| 56 | by_contra he |
| 57 | exact (not_lt_of_ge (hs he).1) hx |
| 58 | exact hz |
| 59 | · exact ((derivativeWeight_continuous hφ).continuousAt.pow 2).div continuousAt_id hx |
| 60 | have hf : HasCompactSupport f := HasCompactSupport.of_support_subset_isCompact isCompact_Icc hs |
| 61 | have hn : 0 ≤ f := by |
| 62 | intro x |
| 63 | change 0 ≤ f x |
| 64 | by_cases hx : f x = 0 |
| 65 | · rw [hx] |
| 66 | · exact div_nonneg (sq_nonneg _) (by have hh := (hs hx).1; linarith) |
| 67 | have hp : 0 < ∫ x, f x := hc.integral_pos_of_hasCompactSupport_nonneg_nonzero hf hn |
| 68 | (show f u ≠ 0 from div_ne_zero (pow_ne_zero _ hd) hu.ne') |
| 69 | have he : (∫ x, f x) = ∫ x in Ioi (0 : ℝ), f x := by |
| 70 | symm |
| 71 | apply setIntegral_eq_integral_of_forall_compl_eq_zero |
| 72 | intro x hx |
| 73 | by_contra he |
| 74 | have hh := (hs he).1 |
| 75 | exact hx (show 0<x by linarith) |
| 76 | rw [he] at hp |
| 77 | exact mul_pos (by positivity : 0 < (2*Real.pi)⁻¹) hp |
| 78 | |
| 79 | lemma normFunctional_uniform_upper (N : ℕ) (hN : 0 < N) (φ : ℝ → ℝ) (hφ : IsWeight φ) |
| 80 | (a : ℝ) (ha : 0 ≤ a) : |
| 81 | normFunctional N φ a ≤ (N : ℝ)^(2*a)*weightEnergy φ := by |
| 82 | have hNr : (0 : ℝ) < N := by exact_mod_cast hN |
| 83 | obtain ⟨hE,hQ⟩ := proposition_7_4_norm_integrals N hN φ hφ a |
| 84 | simp only [Real.rpow_eq_pow] at hQ |
| 85 | have hb : (∫ u in Ioi (0 : ℝ), (N*u)^(2*a)*derivativeWeight φ u^2 / |
| 86 | (1+(N*u)^(-2*(beta-a)))/u) ≤ |
| 87 | ∫ u in Ioi (0 : ℝ), (N : ℝ)^(2*a)*(derivativeWeight φ u^2/u) := by |
| 88 | apply setIntegral_mono_on hQ (hE.const_mul _) measurableSet_Ioi |
| 89 | intro u hu |
| 90 | change 0 < u at hu |
| 91 | by_cases hd : derivativeWeight φ u = 0 |
| 92 | · simp [hd] |
| 93 | · have hs := derivativeWeight_support_subset hφ hd |
| 94 | have hNu0 : 0 ≤ (N : ℝ)*u := by positivity |
| 95 | have hNu : (N : ℝ)*u ≤ N := by nlinarith [hs.2] |
| 96 | have hp := Real.rpow_le_rpow hNu0 hNu (show 0 ≤ 2*a by positivity) |
| 97 | have hv : 0 ≤ (N*u)^(-2*(beta-a)) := by positivity |
| 98 | calc |
| 99 | _ ≤ ((N*u)^(2*a)*derivativeWeight φ u^2)/u := |
| 100 | div_le_div_of_nonneg_right (div_le_self (by positivity) (by linarith)) hu.le |
| 101 | _ ≤ ((N : ℝ)^(2*a)*derivativeWeight φ u^2)/u := |
| 102 | div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_right hp (sq_nonneg _)) hu.le |
| 103 | _ = _ := by ring |
| 104 | rw [integral_const_mul] at hb |
| 105 | have hh := mul_le_mul_of_nonneg_left hb (show 0 ≤ (2*Real.pi)⁻¹ by positivity) |
| 106 | unfold normFunctional weightEnergy |
| 107 | simp only [Real.rpow_eq_pow] |
| 108 | convert hh using 1; ring |
| 109 | |
| 110 | lemma normFunctional_uniform_lower (N : ℕ) (hN : 3 ≤ N) (φ : ℝ → ℝ) (hφ : IsWeight φ) |
| 111 | (a : ℝ) (ha : 0 < a) (ha' : a < 1/10) : |
| 112 | (N : ℝ)^(2*a)*(weightEnergy φ/6) ≤ normFunctional N φ a := by |
| 113 | have hNr : (3 : ℝ) ≤ N := by exact_mod_cast hN |
| 114 | have hN0 : 0 < N := by omega |
| 115 | have hNr0 : (0 : ℝ) < N := by linarith |
| 116 | obtain ⟨hE,hQ⟩ := proposition_7_4_norm_integrals N hN0 φ hφ a |
| 117 | simp only [Real.rpow_eq_pow] at hQ |
| 118 | have hb : (∫ u in Ioi (0 : ℝ), ((N : ℝ)^(2*a)/6)*(derivativeWeight φ u^2/u)) ≤ |
| 119 | ∫ u in Ioi (0 : ℝ), (N*u)^(2*a)*derivativeWeight φ u^2 / |
| 120 | (1+(N*u)^(-2*(beta-a)))/u := by |
| 121 | apply setIntegral_mono_on (hE.const_mul _) hQ measurableSet_Ioi |
| 122 | intro u hu |
| 123 | change 0 < u at hu |
| 124 | by_cases hd : derivativeWeight φ u = 0 |
| 125 | · simp [hd] |
| 126 | · have hs := derivativeWeight_support_subset hφ hd |
| 127 | have hu1 : u ≤ 1 := by linarith [hs.2] |
| 128 | have hNu : 1 ≤ (N : ℝ)*u := by nlinarith [hs.1] |
| 129 | have huPow : 1/3 ≤ u^(2*a) := by |
| 130 | have hh := Real.rpow_le_rpow_of_exponent_ge hu hu1 (show 2*a ≤ 1 by linarith) |
| 131 | rw [Real.rpow_one] at hh |
| 132 | exact hs.1.trans hh |
| 133 | have hNum : (N : ℝ)^(2*a)/3 ≤ (N*u)^(2*a) := by |
| 134 | rw [Real.mul_rpow hNr0.le hu.le] |
| 135 | have hh := mul_le_mul_of_nonneg_left huPow (Real.rpow_nonneg hNr0.le (2*a)) |
| 136 | nlinarith |
| 137 | have hv0 : 0 ≤ (N*u)^(-2*(beta-a)) := by positivity |
| 138 | have hv : (N*u)^(-2*(beta-a)) ≤ 1 := by |
| 139 | have hh := Real.rpow_le_rpow_of_exponent_le hNu |
| 140 | (show -2*(beta-a) ≤ 0 by dsimp [beta]; linarith) |
| 141 | simpa using hh |
| 142 | have hfrac : (N : ℝ)^(2*a)/6 ≤ (N*u)^(2*a)/(1+(N*u)^(-2*(beta-a))) := by |
| 143 | apply (le_div_iff₀ (by positivity)).2 |
| 144 | have hp := Real.rpow_nonneg hNr0.le (2*a) |
| 145 | nlinarith |
| 146 | have hh := mul_le_mul_of_nonneg_right hfrac |
| 147 | (div_nonneg (sq_nonneg (derivativeWeight φ u)) hu.le) |
| 148 | convert hh using 1; ring |
| 149 | rw [integral_const_mul] at hb |
| 150 | have hh := mul_le_mul_of_nonneg_left hb (show 0 ≤ (2*Real.pi)⁻¹ by positivity) |
| 151 | unfold normFunctional weightEnergy |
| 152 | simp only [Real.rpow_eq_pow] |
| 153 | convert hh using 1; ring |
| 154 | |
| 155 | lemma nat_rpow_alpha (N : ℕ) (hN : 1 < N) (c : ℝ) : |
| 156 | (N : ℝ)^(2*alpha N c) = Real.exp (2*c) := by |
| 157 | have hNr : (0 : ℝ) < N := by exact_mod_cast (show 0<N by omega) |
| 158 | have hl : Real.log (N : ℝ) ≠ 0 := (Real.log_pos (by exact_mod_cast hN)).ne' |
| 159 | rw [Real.rpow_def_of_pos hNr] |
| 160 | congr 1 |
| 161 | unfold alpha |
| 162 | field_simp |
| 163 | |
| 164 | end ConditionalGoldbach |
