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.Definitions.Asymptotics |
| 4 | public import Mathlib.MeasureTheory.Function.L2Space |
| 5 | public import ConditionalGoldbach.Proofs.SpectralL2KernelBasis |
| 6 | public import ConditionalGoldbach.Proofs.SpectralL2KernelAdjoint |
| 7 | public import ConditionalGoldbach.Proofs.SpectralProductBasis |
| 8 | |
| 9 | @[expose] public section |
| 10 | |
| 11 | set_option autoImplicit false |
| 12 | noncomputable section |
| 13 | open scoped BigOperators ComplexConjugate Topology |
| 14 | open MeasureTheory Filter Set Complex InnerProductSpace |
| 15 | namespace ConditionalGoldbach |
| 16 | attribute [local instance] Classical.propDecidable |
| 17 | |
| 18 | abbrev BoundaryL2 := Lp ℂ 2 (volume : Measure ℝ) |
| 19 | abbrev BoundaryL2Pair := WithLp 2 (BoundaryL2 × BoundaryL2) |
| 20 | |
| 21 | /-- The actual two-by-two operator on the orthogonal sum of the two vertical boundaries. -/ |
| 22 | def boundaryBlockOperator (A B C D : BoundaryL2 →L[ℂ] BoundaryL2) : |
| 23 | BoundaryL2Pair →L[ℂ] BoundaryL2Pair := |
| 24 | (WithLp.prodContinuousLinearEquiv 2 ℂ BoundaryL2 BoundaryL2).symm.toContinuousLinearMap ∘L |
| 25 | ((A ∘L WithLp.fstL 2 ℂ BoundaryL2 BoundaryL2 + |
| 26 | B ∘L WithLp.sndL 2 ℂ BoundaryL2 BoundaryL2).prod |
| 27 | (C ∘L WithLp.fstL 2 ℂ BoundaryL2 BoundaryL2 + |
| 28 | D ∘L WithLp.sndL 2 ℂ BoundaryL2 BoundaryL2)) |
| 29 | |
| 30 | @[simp] theorem boundaryBlockOperator_fst (A B C D : BoundaryL2 →L[ℂ] BoundaryL2) |
| 31 | (f : BoundaryL2Pair) : (boundaryBlockOperator A B C D f).fst = A f.fst + B f.snd := rfl |
| 32 | |
| 33 | @[simp] theorem boundaryBlockOperator_snd (A B C D : BoundaryL2 →L[ℂ] BoundaryL2) |
| 34 | (f : BoundaryL2Pair) : (boundaryBlockOperator A B C D f).snd = C f.fst + D f.snd := rfl |
| 35 | |
| 36 | /-- The four square-integrable boundary blocks determine a bounded operator, with no extra factor. -/ |
| 37 | def boundaryKernelOperator (a b : ℝ) (K : ℂ → ℂ → ℂ) |
| 38 | (hK : ∀ x ∈ ({a, b} : Finset ℝ), ∀ y ∈ ({a, b} : Finset ℝ), |
| 39 | MemLp (fun p : ℝ × ℝ => K (line x p.1) (line y p.2)) 2 volume) : |
| 40 | BoundaryL2Pair →L[ℂ] BoundaryL2Pair := |
| 41 | boundaryBlockOperator |
| 42 | (l2KernelOperator (hK a (by simp) a (by simp))) |
| 43 | (l2KernelOperator (hK a (by simp) b (by simp))) |
| 44 | (l2KernelOperator (hK b (by simp) a (by simp))) |
| 45 | (l2KernelOperator (hK b (by simp) b (by simp))) |
| 46 | |
| 47 | /-- Both rows of the boundary operator equal the two integrals in the paper's convention. -/ |
| 48 | theorem boundaryKernelOperator_coeFn (a b : ℝ) (K : ℂ → ℂ → ℂ) |
| 49 | (hK : ∀ x ∈ ({a, b} : Finset ℝ), ∀ y ∈ ({a, b} : Finset ℝ), |
| 50 | MemLp (fun p : ℝ × ℝ => K (line x p.1) (line y p.2)) 2 volume) |
| 51 | (f : BoundaryL2Pair) : |
| 52 | ((boundaryKernelOperator a b K hK f).fst : ℝ → ℂ) =ᵐ[volume] |
| 53 | (fun t => (∫ u, K (line a t) (line a u) * f.fst u) + |
| 54 | ∫ u, K (line a t) (line b u) * f.snd u) ∧ |
| 55 | ((boundaryKernelOperator a b K hK f).snd : ℝ → ℂ) =ᵐ[volume] |
| 56 | (fun t => (∫ u, K (line b t) (line a u) * f.fst u) + |
| 57 | ∫ u, K (line b t) (line b u) * f.snd u) := by |
| 58 | constructor |
| 59 | · filter_upwards [Lp.coeFn_add (l2KernelOperator (hK a (by simp) a (by simp)) f.fst) |
| 60 | (l2KernelOperator (hK a (by simp) b (by simp)) f.snd), |
| 61 | l2KernelOperator_coeFn (hK a (by simp) a (by simp)) f.fst, |
| 62 | l2KernelOperator_coeFn (hK a (by simp) b (by simp)) f.snd] with t hadd h₁ h₂ |
| 63 | exact hadd.trans (congrArg₂ (· + ·) h₁ h₂) |
| 64 | · filter_upwards [Lp.coeFn_add (l2KernelOperator (hK b (by simp) a (by simp)) f.fst) |
| 65 | (l2KernelOperator (hK b (by simp) b (by simp)) f.snd), |
| 66 | l2KernelOperator_coeFn (hK b (by simp) a (by simp)) f.fst, |
| 67 | l2KernelOperator_coeFn (hK b (by simp) b (by simp)) f.snd] with t hadd h₁ h₂ |
| 68 | exact hadd.trans (congrArg₂ (· + ·) h₁ h₂) |
| 69 | |
| 70 | /-- The four kernel energies sum to the Hilbert--Schmidt square sum of the boundary operator. -/ |
| 71 | theorem boundaryKernelOperator_hasSum_norm_sq (a b : ℝ) (hab : a ≠ b) (K : ℂ → ℂ → ℂ) |
| 72 | (hK : ∀ x ∈ ({a, b} : Finset ℝ), ∀ y ∈ ({a, b} : Finset ℝ), |
| 73 | MemLp (fun p : ℝ × ℝ => K (line x p.1) (line y p.2)) 2 volume) |
| 74 | (c : HilbertBasis ℕ ℂ BoundaryL2) : |
| 75 | HasSum (fun j => ‖boundaryKernelOperator a b K hK (hilbertBasisProdNat c c j)‖ ^ 2) |
| 76 | (BoundaryKernelSquareIntegral a b K) := by |
| 77 | let A := boundaryKernelOperator a b K hK |
| 78 | have hleft : HasSum (fun j => ‖A (hilbertBasisProd c c (Sum.inl j))‖ ^ 2) |
| 79 | ((∫ p : ℝ × ℝ, ‖K (line a p.1) (line a p.2)‖ ^ 2) + |
| 80 | ∫ p : ℝ × ℝ, ‖K (line b p.1) (line a p.2)‖ ^ 2) := by |
| 81 | have hh := (l2KernelOperator_hasSum_norm_sq (hK a (by simp) a (by simp)) c).add |
| 82 | (l2KernelOperator_hasSum_norm_sq (hK b (by simp) a (by simp)) c) |
| 83 | simpa only [hilbertBasisProd_inl, WithLp.prod_norm_sq_eq_of_L2, A, boundaryKernelOperator, |
| 84 | boundaryBlockOperator_fst, boundaryBlockOperator_snd, WithLp.toLp_fst, WithLp.toLp_snd, |
| 85 | map_zero, add_zero, MeasureTheory.Measure.volume_eq_prod] using hh |
| 86 | have hright : HasSum (fun j => ‖A (hilbertBasisProd c c (Sum.inr j))‖ ^ 2) |
| 87 | ((∫ p : ℝ × ℝ, ‖K (line a p.1) (line b p.2)‖ ^ 2) + |
| 88 | ∫ p : ℝ × ℝ, ‖K (line b p.1) (line b p.2)‖ ^ 2) := by |
| 89 | have hh := (l2KernelOperator_hasSum_norm_sq (hK a (by simp) b (by simp)) c).add |
| 90 | (l2KernelOperator_hasSum_norm_sq (hK b (by simp) b (by simp)) c) |
| 91 | simpa only [hilbertBasisProd_inr, WithLp.prod_norm_sq_eq_of_L2, A, boundaryKernelOperator, |
| 92 | boundaryBlockOperator_fst, boundaryBlockOperator_snd, WithLp.toLp_fst, WithLp.toLp_snd, |
| 93 | map_zero, zero_add, MeasureTheory.Measure.volume_eq_prod] using hh |
| 94 | have hs : HasSum (fun j : ℕ ⊕ ℕ => ‖A (hilbertBasisProd c c j)‖ ^ 2) |
| 95 | (BoundaryKernelSquareIntegral a b K) := by |
| 96 | convert HasSum.sum (f := fun j : ℕ ⊕ ℕ => ‖A (hilbertBasisProd c c j)‖ ^ 2) hleft hright using 1 |
| 97 | unfold BoundaryKernelSquareIntegral |
| 98 | simp only [Finset.sum_pair hab] |
| 99 | simp only [MeasureTheory.Measure.volume_eq_prod] |
| 100 | rw [integral_prod _ (hK a (by simp) a (by simp)).norm.integrable_sq, |
| 101 | integral_prod _ (hK a (by simp) b (by simp)).norm.integrable_sq, |
| 102 | integral_prod _ (hK b (by simp) a (by simp)).norm.integrable_sq, |
| 103 | integral_prod _ (hK b (by simp) b (by simp)).norm.integrable_sq] |
| 104 | ring |
| 105 | simpa only [hilbertBasisProdNat, hilbertBasisReindex_apply, Function.comp_def, A] using |
| 106 | sumNatEnumeration.hasSum_iff.mpr hs |
| 107 | |
| 108 | /-- The exact boundary-kernel square integral is the boundary operator's squared HS norm. -/ |
| 109 | theorem boundaryKernelOperator_hilbertSchmidt (a b : ℝ) (hab : a ≠ b) (K : ℂ → ℂ → ℂ) |
| 110 | (hK : ∀ x ∈ ({a, b} : Finset ℝ), ∀ y ∈ ({a, b} : Finset ℝ), |
| 111 | MemLp (fun p : ℝ × ℝ => K (line x p.1) (line y p.2)) 2 volume) |
| 112 | (c : HilbertBasis ℕ ℂ BoundaryL2) : |
| 113 | IsHilbertSchmidt (boundaryKernelOperator a b K hK) ∧ |
| 114 | hsNorm (boundaryKernelOperator a b K hK) ^ 2 = BoundaryKernelSquareIntegral a b K := by |
| 115 | have hs := boundaryKernelOperator_hasSum_norm_sq a b hab K hK c |
| 116 | have hHS : IsHilbertSchmidt (boundaryKernelOperator a b K hK) := |
| 117 | ⟨hilbertBasisProdNat c c, hs.summable⟩ |
| 118 | exact ⟨hHS, (proposition_5_3_hs_basis_independent _ hHS _).2.trans hs.tsum_eq⟩ |
| 119 | |
| 120 | /-- Transposed conjugate kernels give adjoint cross-blocks. -/ |
| 121 | theorem l2Kernel_cross_adjoint {K L : ℝ × ℝ → ℂ} |
| 122 | (hK : MemLp K 2 volume) (hL : MemLp L 2 volume) |
| 123 | (hherm : ∀ᵐ p ∂(volume : Measure (ℝ × ℝ)), L p.swap = conj (K p)) |
| 124 | (f g : BoundaryL2) : |
| 125 | inner ℂ (l2KernelOperator hK f) g = inner ℂ f (l2KernelOperator hL g) := by |
| 126 | rw [← inner_conj_symm (𝕜 := ℂ) (l2KernelOperator hK f) g, |
| 127 | l2KernelOperator_pairing hK g f, l2KernelOperator_pairing hL f g, ← integral_conj] |
| 128 | rw [← integral_prod_swap (fun p : ℝ × ℝ => conj (f p.1) * L p * g p.2)] |
| 129 | apply integral_congr_ae |
| 130 | filter_upwards [hherm] with p hp |
| 131 | simp only [map_mul, Complex.conj_conj, Prod.fst_swap, Prod.snd_swap] |
| 132 | rw [hp] |
| 133 | ring |
| 134 | |
| 135 | /-- Hermitian symmetry of the actual boundary kernel makes the four-block operator self-adjoint. -/ |
| 136 | theorem boundaryKernelOperator_isSelfAdjoint (a b : ℝ) (K : ℂ → ℂ → ℂ) |
| 137 | (hK : ∀ x ∈ ({a, b} : Finset ℝ), ∀ y ∈ ({a, b} : Finset ℝ), |
| 138 | MemLp (fun p : ℝ × ℝ => K (line x p.1) (line y p.2)) 2 volume) |
| 139 | (hherm : ∀ x ∈ ({a, b} : Finset ℝ), ∀ y ∈ ({a, b} : Finset ℝ), ∀ t u : ℝ, |
| 140 | K (line y u) (line x t) = conj (K (line x t) (line y u))) : |
| 141 | IsSelfAdjoint (boundaryKernelOperator a b K hK) := by |
| 142 | have hp (x : ℝ) (hx : x ∈ ({a, b} : Finset ℝ)) (y : ℝ) (hy : y ∈ ({a, b} : Finset ℝ)) |
| 143 | (f g : BoundaryL2) : |
| 144 | inner ℂ (l2KernelOperator (hK x hx y hy) f) g = |
| 145 | inner ℂ f (l2KernelOperator (hK y hy x hx) g) := by |
| 146 | apply l2Kernel_cross_adjoint |
| 147 | exact Filter.Eventually.of_forall fun p => hherm x hx y hy p.1 p.2 |
| 148 | apply ContinuousLinearMap.isSelfAdjoint_iff_isSymmetric.mpr |
| 149 | intro f g |
| 150 | change inner ℂ (boundaryKernelOperator a b K hK f) g = |
| 151 | inner ℂ f (boundaryKernelOperator a b K hK g) |
| 152 | simp only [WithLp.prod_inner_apply, WithLp.ofLp_fst, WithLp.ofLp_snd, |
| 153 | boundaryKernelOperator, boundaryBlockOperator_fst, boundaryBlockOperator_snd, |
| 154 | inner_add_left, inner_add_right, |
| 155 | hp a (by simp) a (by simp), hp a (by simp) b (by simp), |
| 156 | hp b (by simp) a (by simp), hp b (by simp) b (by simp)] |
| 157 | ring |
| 158 | |
| 159 | end ConditionalGoldbach |
