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 Mathlib.MeasureTheory.Function.L2Space |
| 4 | public import Mathlib.MeasureTheory.Integral.Prod |
| 5 | public import ConditionalGoldbach.Proofs.SpectralHilbertSchmidtCompact |
| 6 | |
| 7 | @[expose] public section |
| 8 | |
| 9 | set_option autoImplicit false |
| 10 | noncomputable section |
| 11 | open scoped BigOperators ComplexConjugate Topology |
| 12 | open MeasureTheory Filter Set Complex InnerProductSpace |
| 13 | namespace ConditionalGoldbach |
| 14 | attribute [local instance] Classical.propDecidable |
| 15 | variable {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] |
| 16 | variable {μ : Measure α} {ν : Measure β} |
| 17 | |
| 18 | /-- The squared norm of a scalar L² class is the integral of its pointwise squared norm. -/ |
| 19 | theorem l2Kernel_norm_sq_integral (f : Lp ℂ 2 μ) : |
| 20 | ‖f‖ ^ 2 = ∫ x, ‖f x‖ ^ 2 ∂μ := by |
| 21 | rw [← real_inner_self_eq_norm_sq, L2.inner_def] |
| 22 | simp only [real_inner_self_eq_norm_sq] |
| 23 | |
| 24 | /-- An L² row acts boundedly on L² by the un-conjugated integral pairing. -/ |
| 25 | theorem l2Kernel_row_bound {k : β → ℂ} (hk : MemLp k 2 ν) (f : Lp ℂ 2 ν) : |
| 26 | Integrable (fun y => k y * f y) ν ∧ |
| 27 | ‖∫ y, k y * f y ∂ν‖ ^ 2 ≤ (∫ y, ‖k y‖ ^ 2 ∂ν) * ‖f‖ ^ 2 := by |
| 28 | have hi : Integrable (fun y => k y * f y) ν := |
| 29 | memLp_one_iff_integrable.mp (hk.fun_mul (Lp.memLp f)) |
| 30 | let g : Lp ℂ 2 ν := hk.star.toLp (star k) |
| 31 | have heq : (∫ y, k y * f y ∂ν) = inner ℂ g f := by |
| 32 | rw [L2.inner_def] |
| 33 | apply integral_congr_ae |
| 34 | filter_upwards [hk.star.coeFn_toLp] with y hy |
| 35 | change k y * f y = inner ℂ ((hk.star.toLp (star k)) y) (f y) |
| 36 | rw [hy] |
| 37 | change k y * f y = f y * star (star (k y)) |
| 38 | simp only [star_star, mul_comm] |
| 39 | have hg : ‖g‖ ^ 2 = ∫ y, ‖k y‖ ^ 2 ∂ν := by |
| 40 | rw [l2Kernel_norm_sq_integral] |
| 41 | apply integral_congr_ae |
| 42 | filter_upwards [hk.star.coeFn_toLp] with y hy |
| 43 | change ‖(hk.star.toLp (star k)) y‖ ^ 2 = _ |
| 44 | rw [hy] |
| 45 | simp only [Pi.star_apply, norm_star] |
| 46 | refine ⟨hi, ?_⟩ |
| 47 | rw [heq, ← hg] |
| 48 | simpa only [mul_pow] using |
| 49 | pow_le_pow_left₀ (norm_nonneg _) (norm_inner_le_norm (𝕜 := ℂ) g f) 2 |
| 50 | |
| 51 | variable [SFinite μ] [SFinite ν] |
| 52 | |
| 53 | /-- Almost every section of an L² product kernel is an L² row. -/ |
| 54 | theorem l2Kernel_rows_memLp {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) : |
| 55 | ∀ᵐ x ∂μ, MemLp (fun y => K (x, y)) 2 ν := by |
| 56 | filter_upwards [hK.aestronglyMeasurable.prodMk_left, hK.norm.integrable_sq.prod_right_ae] with x hx hi |
| 57 | exact (memLp_two_iff_integrable_sq_norm hx).mpr hi |
| 58 | |
| 59 | /-- Applying a square-integrable kernel to an L² class again gives an L² function. -/ |
| 60 | theorem l2Kernel_apply_memLp {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) |
| 61 | (f : Lp ℂ 2 ν) : MemLp (fun x => ∫ y, K (x, y) * f y ∂ν) 2 μ := by |
| 62 | have hm : AEStronglyMeasurable (fun x => ∫ y, K (x, y) * f y ∂ν) μ := |
| 63 | (hK.aestronglyMeasurable.mul (Lp.aestronglyMeasurable f).comp_snd).integral_prod_right' |
| 64 | apply (memLp_two_iff_integrable_sq_norm hm).mpr |
| 65 | apply Integrable.mono' (hK.norm.integrable_sq.integral_prod_left.mul_const (‖f‖ ^ 2)) |
| 66 | (hm.norm.pow 2) |
| 67 | filter_upwards [l2Kernel_rows_memLp hK] with x hx |
| 68 | simpa only [Pi.pow_apply, Real.norm_eq_abs, abs_pow, abs_norm] using (l2Kernel_row_bound hx f).2 |
| 69 | |
| 70 | /-- The L² class obtained by applying the integral kernel. -/ |
| 71 | def l2KernelApply {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) |
| 72 | (f : Lp ℂ 2 ν) : Lp ℂ 2 μ := |
| 73 | (l2Kernel_apply_memLp hK f).toLp (fun x => ∫ y, K (x, y) * f y ∂ν) |
| 74 | |
| 75 | /-- The defining integral formula holds almost everywhere. -/ |
| 76 | theorem l2KernelApply_coeFn {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) |
| 77 | (f : Lp ℂ 2 ν) : |
| 78 | (l2KernelApply hK f : α → ℂ) =ᵐ[μ] fun x => ∫ y, K (x, y) * f y ∂ν := |
| 79 | (l2Kernel_apply_memLp hK f).coeFn_toLp |
| 80 | |
| 81 | /-- The kernel L² norm bounds the squared output norm. -/ |
| 82 | theorem l2KernelApply_norm_sq_le {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) |
| 83 | (f : Lp ℂ 2 ν) : |
| 84 | ‖l2KernelApply hK f‖ ^ 2 ≤ (∫ p, ‖K p‖ ^ 2 ∂(μ.prod ν)) * ‖f‖ ^ 2 := by |
| 85 | rw [l2Kernel_norm_sq_integral] |
| 86 | calc |
| 87 | (∫ x, ‖l2KernelApply hK f x‖ ^ 2 ∂μ) = |
| 88 | ∫ x, ‖∫ y, K (x, y) * f y ∂ν‖ ^ 2 ∂μ := by |
| 89 | apply integral_congr_ae |
| 90 | filter_upwards [l2KernelApply_coeFn hK f] with x hx |
| 91 | rw [hx] |
| 92 | _ ≤ ∫ x, (∫ y, ‖K (x, y)‖ ^ 2 ∂ν) * ‖f‖ ^ 2 ∂μ := by |
| 93 | apply integral_mono_ae (l2Kernel_apply_memLp hK f).norm.integrable_sq |
| 94 | (hK.norm.integrable_sq.integral_prod_left.mul_const (‖f‖ ^ 2)) |
| 95 | filter_upwards [l2Kernel_rows_memLp hK] with x hx |
| 96 | exact (l2Kernel_row_bound hx f).2 |
| 97 | _ = _ := by rw [integral_mul_const, ← integral_prod _ hK.norm.integrable_sq] |
| 98 | |
| 99 | /-- Linearity of the kernel action on equivalence classes. -/ |
| 100 | def l2KernelLinearMap {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) : |
| 101 | Lp ℂ 2 ν →ₗ[ℂ] Lp ℂ 2 μ where |
| 102 | toFun := l2KernelApply hK |
| 103 | map_add' f g := by |
| 104 | apply Lp.ext |
| 105 | filter_upwards [l2KernelApply_coeFn hK (f + g), l2KernelApply_coeFn hK f, |
| 106 | l2KernelApply_coeFn hK g, Lp.coeFn_add (l2KernelApply hK f) (l2KernelApply hK g), |
| 107 | l2Kernel_rows_memLp hK] with x hfg hf hg hout hx |
| 108 | rw [hfg, hout] |
| 109 | change (∫ y, K (x, y) * (f + g) y ∂ν) = l2KernelApply hK f x + l2KernelApply hK g x |
| 110 | rw [hf, hg, ← integral_add (l2Kernel_row_bound hx f).1 (l2Kernel_row_bound hx g).1] |
| 111 | apply integral_congr_ae |
| 112 | filter_upwards [Lp.coeFn_add f g] with y hy |
| 113 | rw [hy] |
| 114 | exact mul_add _ _ _ |
| 115 | map_smul' c f := by |
| 116 | apply Lp.ext |
| 117 | filter_upwards [l2KernelApply_coeFn hK (c • f), l2KernelApply_coeFn hK f, |
| 118 | Lp.coeFn_smul c (l2KernelApply hK f)] with x hcf hf hout |
| 119 | simp only [RingHom.id_apply] |
| 120 | rw [hcf, hout] |
| 121 | change (∫ y, K (x, y) * (c • f) y ∂ν) = c * l2KernelApply hK f x |
| 122 | rw [hf, ← integral_const_mul] |
| 123 | apply integral_congr_ae |
| 124 | filter_upwards [Lp.coeFn_smul c f] with y hy |
| 125 | rw [hy] |
| 126 | change K (x, y) * (c * f y) = c * (K (x, y) * f y) |
| 127 | ring |
| 128 | |
| 129 | /-- A square-integrable kernel defines a bounded continuous linear map. -/ |
| 130 | def l2KernelOperator {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) : |
| 131 | Lp ℂ 2 ν →L[ℂ] Lp ℂ 2 μ := |
| 132 | (l2KernelLinearMap hK).mkContinuous (Real.sqrt (∫ p, ‖K p‖ ^ 2 ∂(μ.prod ν))) (by |
| 133 | intro f |
| 134 | have hn : 0 ≤ ∫ p, ‖K p‖ ^ 2 ∂(μ.prod ν) := integral_nonneg (fun _ => sq_nonneg _) |
| 135 | apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp |
| 136 | simpa only [l2KernelLinearMap, LinearMap.coe_mk, AddHom.coe_mk, mul_pow, Real.sq_sqrt hn] using l2KernelApply_norm_sq_le hK f) |
| 137 | |
| 138 | /-- The bounded integral operator retains the original pointwise integral formula. -/ |
| 139 | theorem l2KernelOperator_coeFn {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) |
| 140 | (f : Lp ℂ 2 ν) : |
| 141 | (l2KernelOperator hK f : α → ℂ) =ᵐ[μ] fun x => ∫ y, K (x, y) * f y ∂ν := |
| 142 | l2KernelApply_coeFn hK f |
| 143 | |
| 144 | /-- Operator norm bound by the square-integral of the actual kernel. -/ |
| 145 | theorem l2KernelOperator_norm_le {K : α × β → ℂ} (hK : MemLp K 2 (μ.prod ν)) : |
| 146 | ‖l2KernelOperator hK‖ ≤ Real.sqrt (∫ p, ‖K p‖ ^ 2 ∂(μ.prod ν)) := by |
| 147 | apply ContinuousLinearMap.opNorm_le_bound _ (Real.sqrt_nonneg _) |
| 148 | intro f |
| 149 | have hn : 0 ≤ ∫ p, ‖K p‖ ^ 2 ∂(μ.prod ν) := integral_nonneg (fun _ => sq_nonneg _) |
| 150 | apply (sq_le_sq₀ (norm_nonneg _) (mul_nonneg (Real.sqrt_nonneg _) (norm_nonneg _))).mp |
| 151 | simpa only [l2KernelOperator, LinearMap.mkContinuous_apply, l2KernelLinearMap, |
| 152 | LinearMap.coe_mk, AddHom.coe_mk, mul_pow, Real.sq_sqrt hn] using l2KernelApply_norm_sq_le hK f |
| 153 | |
| 154 | end ConditionalGoldbach |
