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.Analysis.SpectralData |
| 4 | |
| 5 | @[expose] public section |
| 6 | |
| 7 | set_option autoImplicit false |
| 8 | noncomputable section |
| 9 | open scoped BigOperators ComplexConjugate Topology |
| 10 | open Filter Set Complex |
| 11 | namespace ConditionalGoldbach |
| 12 | attribute [local instance] Classical.propDecidable |
| 13 | variable {H : Type*} [NormedAddCommGroup H] [InnerProductSpace ℂ H] |
| 14 | |
| 15 | theorem hilbertBasis_hasSum_sq_inner (b : HilbertBasis ℕ ℂ H) (x : H) : |
| 16 | HasSum (fun j => ‖inner ℂ (b j) x‖ ^ 2) (‖x‖ ^ 2) := by |
| 17 | have hh := Complex.hasSum_re (b.hasSum_inner_mul_inner x x) |
| 18 | convert hh using 1 |
| 19 | · funext j |
| 20 | rw [← inner_conj_symm (𝕜 := ℂ) x (b j), mul_comm, Complex.mul_conj, |
| 21 | Complex.ofReal_re, Complex.normSq_eq_norm_sq] |
| 22 | · exact (inner_self_eq_norm_sq (𝕜 := ℂ) x).symm |
| 23 | |
| 24 | /-- The Hilbert--Schmidt square sum of a symmetric operator does not depend on the basis. -/ |
| 25 | theorem symmetric_hs_basis_independent (T : H →L[ℂ] H) (hT : T.IsSymmetric) |
| 26 | (b c : HilbertBasis ℕ ℂ H) (hb : Summable (fun j => ‖T (b j)‖ ^ 2)) : |
| 27 | Summable (fun j => ‖T (c j)‖ ^ 2) ∧ |
| 28 | (∑' j, ‖T (b j)‖ ^ 2) = ∑' j, ‖T (c j)‖ ^ 2 := by |
| 29 | let f : ℕ → ℕ → ℝ := fun i j => ‖inner ℂ (c j) (T (b i))‖ ^ 2 |
| 30 | have hrow (i : ℕ) : HasSum (f i) (‖T (b i)‖ ^ 2) := |
| 31 | hilbertBasis_hasSum_sq_inner c (T (b i)) |
| 32 | have hflip (i j : ℕ) : f i j = ‖inner ℂ (b i) (T (c j))‖ ^ 2 := by |
| 33 | dsimp [f] |
| 34 | rw [← hT.apply_clm (c j) (b i), norm_inner_symm] |
| 35 | have hcol (j : ℕ) : HasSum (fun i => f i j) (‖T (c j)‖ ^ 2) := by |
| 36 | simpa only [hflip] using hilbertBasis_hasSum_sq_inner b (T (c j)) |
| 37 | have hp : Summable (Function.uncurry f) := by |
| 38 | apply (summable_prod_of_nonneg (fun p => sq_nonneg _)).2 |
| 39 | refine ⟨fun i => (hrow i).summable, ?_⟩ |
| 40 | exact hb.congr (fun i => (hrow i).tsum_eq.symm) |
| 41 | -- Fix the summand before reindexing to avoid higher-order unification through `Summable`. |
| 42 | have hp' : Summable (fun p : ℕ × ℕ => f p.2 p.1) := |
| 43 | ((Equiv.prodComm ℕ ℕ).summable_iff (f := Function.uncurry f)).2 hp |
| 44 | refine ⟨?_, ?_⟩ |
| 45 | · exact hp'.prod.congr (fun j => (hcol j).tsum_eq) |
| 46 | · calc |
| 47 | (∑' j, ‖T (b j)‖ ^ 2) = ∑' i, ∑' j, f i j := by simp only [(hrow _).tsum_eq] |
| 48 | _ = ∑' j, ∑' i, f i j := hp.tsum_comm.symm |
| 49 | _ = ∑' j, ‖T (c j)‖ ^ 2 := by simp only [(hcol _).tsum_eq] |
| 50 | |
| 51 | /-- Squaring a symmetric Hilbert--Schmidt operator gives a positive trace-class operator. -/ |
| 52 | theorem symmetric_square_positiveTraceClass (T : H →L[ℂ] H) (hT : T.IsSymmetric) |
| 53 | (hHS : IsHilbertSchmidt T) : IsPositiveTraceClass (T.comp T) := by |
| 54 | obtain ⟨b, hb⟩ := hHS |
| 55 | have hquad (x : H) : (paperInner ((T.comp T) x) x).re = ‖T x‖ ^ 2 := by |
| 56 | change (inner ℂ x (T (T x))).re = _ |
| 57 | rw [← hT.apply_clm x (T x)] |
| 58 | exact inner_self_eq_norm_sq (𝕜 := ℂ) (T x) |
| 59 | refine ⟨?_, fun x => by rw [hquad]; positivity, b, ?_⟩ |
| 60 | · intro x y |
| 61 | change inner ℂ (T (T x)) y = inner ℂ x (T (T y)) |
| 62 | rw [hT.apply_clm (T x) y, hT.apply_clm x (T y)] |
| 63 | · simpa only [hquad] using hb |
| 64 | |
| 65 | /-- The trace of the square equals the squared Hilbert--Schmidt norm, with both arbitrary |
| 66 | basis choices in the original definitions explicitly discharged. -/ |
| 67 | theorem symmetric_square_trace_eq_hsNorm (T : H →L[ℂ] H) (hT : T.IsSymmetric) |
| 68 | (hHS : IsHilbertSchmidt T) : positiveTrace (T.comp T) = hsNorm T ^ 2 := by |
| 69 | have hquad (x : H) : (paperInner ((T.comp T) x) x).re = ‖T x‖ ^ 2 := by |
| 70 | change (inner ℂ x (T (T x))).re = _ |
| 71 | rw [← hT.apply_clm x (T x)] |
| 72 | exact inner_self_eq_norm_sq (𝕜 := ℂ) (T x) |
| 73 | have htrace : ∃ b : HilbertBasis ℕ ℂ H, |
| 74 | Summable (fun j => (paperInner ((T.comp T) (b j)) (b j)).re) := |
| 75 | (symmetric_square_positiveTraceClass T hT hHS).2.2 |
| 76 | unfold IsHilbertSchmidt at hHS |
| 77 | unfold positiveTrace hsNorm |
| 78 | rw [dite_eq_left htrace, dite_eq_left hHS, Real.sq_sqrt (tsum_nonneg fun j => sq_nonneg _)] |
| 79 | simp only [hquad] |
| 80 | |
| 81 | |
| 82 | /-- Real diagonal spectral data imply symmetry of the operator on the whole Hilbert space. -/ |
| 83 | theorem SpectralData.isSymmetric {T : H →L[ℂ] H} (d : SpectralData T) : T.IsSymmetric := by |
| 84 | intro x y |
| 85 | change inner ℂ (T x) y = inner ℂ x (T y) |
| 86 | rw [← d.basis.repr.inner_map_map (T x) y, ← d.basis.repr.inner_map_map x (T y), |
| 87 | lp.inner_eq_tsum, lp.inner_eq_tsum] |
| 88 | apply tsum_congr |
| 89 | intro j |
| 90 | rw [SpectralData.repr_apply d x j, SpectralData.repr_apply d y j] |
| 91 | simp only [RCLike.inner_apply, map_mul, Complex.conj_ofReal] |
| 92 | ring |
| 93 | |
| 94 | /-- Diagonal square summability is the original Hilbert--Schmidt predicate. -/ |
| 95 | theorem SpectralData.isHilbertSchmidt {T : H →L[ℂ] H} (d : SpectralData T) : IsHilbertSchmidt T := by |
| 96 | refine ⟨d.basis, ?_⟩ |
| 97 | have hn (j : ℕ) : ‖T (d.basis j)‖ ^ 2 = d.values j ^ 2 := by |
| 98 | rw [d.diagonal, norm_smul, d.basis.orthonormal.norm_eq_one, mul_one, |
| 99 | Complex.norm_real, Real.norm_eq_abs, sq_abs] |
| 100 | simpa only [hn] using d.squareSummable |
| 101 | |
| 102 | /-- The Hilbert--Schmidt norm is the square sum for any diagonal spectral data. -/ |
| 103 | theorem SpectralData.hsNorm_sq {T : H →L[ℂ] H} (d : SpectralData T) : |
| 104 | hsNorm T ^ 2 = ∑' j, d.values j ^ 2 := by |
| 105 | have hHS := d.isHilbertSchmidt |
| 106 | unfold IsHilbertSchmidt at hHS |
| 107 | unfold hsNorm |
| 108 | rw [dite_eq_left hHS, Real.sq_sqrt (tsum_nonneg fun j => sq_nonneg _)] |
| 109 | rw [(symmetric_hs_basis_independent T d.isSymmetric (Classical.choose hHS) |
| 110 | d.basis (Classical.choose_spec hHS)).2] |
| 111 | apply tsum_congr |
| 112 | intro j |
| 113 | rw [d.diagonal, norm_smul, d.basis.orthonormal.norm_eq_one, mul_one, |
| 114 | Complex.norm_real, Real.norm_eq_abs, sq_abs] |
| 115 | |
| 116 | /-- Squaring spectral data gives spectral data for the squared operator. -/ |
| 117 | def SpectralData.square {T : H →L[ℂ] H} (d : SpectralData T) : SpectralData (T.comp T) where |
| 118 | basis := d.basis |
| 119 | values := fun j => d.values j ^ 2 |
| 120 | diagonal := by |
| 121 | intro j |
| 122 | simp only [ContinuousLinearMap.comp_apply, d.diagonal, map_smul, smul_smul, |
| 123 | pow_two, Complex.ofReal_mul] |
| 124 | squareSummable := by |
| 125 | apply Summable.of_nonneg_of_le (fun j => sq_nonneg _) _ |
| 126 | (d.squareSummable.mul_left (‖T‖ ^ 2)) |
| 127 | intro j |
| 128 | have hb := (sq_le_sq₀ (abs_nonneg (d.values j)) (norm_nonneg T)).2 (d.abs_value_le_norm j) |
| 129 | rw [sq_abs] at hb |
| 130 | nlinarith [mul_le_mul_of_nonneg_right hb (sq_nonneg (d.values j))] |
| 131 | |
| 132 | end ConditionalGoldbach |
