This journal is in preparation. Submissions are open as a pilot and the editorial board is being formed. Articles marked Demonstration show the format only.
Journal of Machine-Verified MathematicsPeer-reviewed mathematics with machine-checked proofs, for the age of AI

E424/Tools/T4.lean

All files · 191 lines · source at the verified commit

1module
2
3public import E424.Tools.T4Aux
4
5@[expose] public section
6
7/-!
8# Erdős 424: tool T4. Absolute existential constants; Mathlib only.
9
10Mean value of a Dirichlet polynomial over `[-T, T]`. The window `sinc²(t/(4T))` is at least `1/2`
11on `[-T, T]`, and its Fourier transform is the triangle `tri (2T)` (`T11_fejer`). The double sum
12`∑ a_m conj(a_n) tri(2T, log n - log m)` is then bounded by the Schur test, since each row sum over
13`[N, 16 N]` is `≤ 32 N + 6 T` (`row_sum_le`).
14-/
15
16set_option linter.style.header false
17open Finset Complex MeasureTheory
18
19namespace E424
20
21lemma norm_nit (n : ℕ) (t : ℝ) : ‖nit n t‖ = 1 := by
22 unfold nit
23 rw [show -((t * Real.log n : ℝ) : ℂ) * I = ((-(t * Real.log n) : ℝ) : ℂ) * I by push_cast; ring]
24 exact Complex.norm_exp_ofReal_mul_I _
25
26lemma nit_mul_conj (m n : ℕ) (t : ℝ) :
27 nit m t * (starRingEnd ℂ) (nit n t) =
28 Complex.exp (((t * (Real.log n - Real.log m) : ℝ) : ℂ) * I) := by
29 unfold nit
30 rw [← Complex.exp_conj, ← Complex.exp_add]
31 congr 1
32 simp only [map_mul, map_neg, Complex.conj_ofReal, Complex.conj_I]
33 push_cast
34 ring
35
36/-- The Fejér-weighted exponential `sinc²(t/(2Q)) e^{i t u}` is integrable. -/
37lemma integrable_W_exp (Q u : ℝ) (hQ : 0 < Q) :
38 Integrable (fun t : ℝ => ((Real.sinc (t / (2 * Q)) ^ 2 : ℝ) : ℂ) *
39 Complex.exp (((t * u : ℝ) : ℂ) * I)) := by
40 have h := Integrable.bdd_mul (f := fun t : ℝ => Complex.exp (((t * u : ℝ) : ℂ) * I))
41 (g := fun t : ℝ => ((Real.sinc (t / (2 * Q)) ^ 2 : ℝ) : ℂ)) (c := 1)
42 (integrable_sinc_sq Q hQ).ofReal
43 (by fun_prop : Continuous fun t : ℝ => Complex.exp (((t * u : ℝ) : ℂ) * I)).aestronglyMeasurable
44 (Filter.Eventually.of_forall fun t => (Complex.norm_exp_ofReal_mul_I _).le)
45 exact h.congr (Filter.Eventually.of_forall fun t => mul_comm _ _)
46
47/-- **T4**, mean value of a Dirichlet polynomial supported in `[N, 16N]`. -/
48theorem T4_mean_value : ∃ C > 0, ∀ (N T : ℝ), 1 ≤ N → 0 ≤ T → ∀ (s : Finset ℕ) (a : ℕ → ℂ),
49 (∀ n ∈ s, N ≤ n ∧ (n : ℝ) ≤ 16 * N) →
50 ∫ t in (-T)..T, ‖∑ n ∈ s, a n * nit n t‖ ^ 2 ≤ C * (T + N) * ∑ n ∈ s, ‖a n‖ ^ 2 := by
51 refine ⟨128 * Real.pi, by positivity, fun N T hN hT s a hs => ?_⟩
52 rcases hT.eq_or_lt with rfl | hT0
53 · rw [neg_zero, intervalIntegral.integral_same]
54 exact mul_nonneg (mul_nonneg (by positivity) (by linarith)) (sum_nonneg fun _ _ => by positivity)
55 -- the Fejér window has width `Q = 2T`
56 set Q : ℝ := 2 * T with hQdef
57 have hQ : 0 < Q := by positivity
58 set P : ℝ → ℂ := fun t => ∑ n ∈ s, a n * nit n t with hP
59 have hPcont : Continuous P := by
60 apply continuous_finsetSum
61 intro n _
62 unfold nit
63 fun_prop
64 have hPb : ∀ t, ‖P t‖ ≤ ∑ n ∈ s, ‖a n‖ := fun t => by
65 refine (norm_sum_le _ _).trans (le_of_eq ?_)
66 apply sum_congr rfl
67 intro n _
68 rw [norm_mul, norm_nit, mul_one]
69 -- `W ≥ 1/2` on `[-T, T]`
70 have hWwin : ∀ t ∈ Set.Icc (-T) T, 1 / 2 ≤ Real.sinc (t / (2 * Q)) ^ 2 := by
71 intro t ht
72 have hax : |t| ≤ T := abs_le.mpr ht
73 have e : t / (2 * T) / 2 = t / (2 * Q) := by rw [hQdef]; ring
74 have h := (T11_sinc (t / (2 * T))).2
75 rw [e] at h
76 have hx : |t / (2 * T)| ≤ 1 / 2 := by
77 rw [abs_div, abs_of_pos (by positivity : (0 : ℝ) < 2 * T), div_le_iff₀ (by positivity)]
78 linarith
79 have hmin : min 1 |t / (2 * T)| ≤ 1 / 2 := (min_le_right _ _).trans hx
80 linarith
81 have hWint : Integrable (fun t => (Real.sinc (t / (2 * Q)) ^ 2) * ‖P t‖ ^ 2) := by
82 have h := Integrable.bdd_mul (f := fun t => ‖P t‖ ^ 2) (g := fun t => Real.sinc (t / (2 * Q)) ^ 2) (c := (∑ n ∈ s, ‖a n‖) ^ 2)
83 (integrable_sinc_sq Q hQ)
84 (by fun_prop : Continuous fun t => ‖P t‖ ^ 2).aestronglyMeasurable
85 (Filter.Eventually.of_forall fun t => by
86 rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)]
87 exact pow_le_pow_left₀ (norm_nonneg _) (hPb t) 2)
88 exact h.congr (Filter.Eventually.of_forall fun t => mul_comm _ _)
89 -- Step 1: the Fejér window dominates `[-T, T]`
90 have hstep1 : ∫ t in (-T)..T, ‖P t‖ ^ 2 ≤ ∫ t in (-T)..T, 2 * ((Real.sinc (t / (2 * Q)) ^ 2) * ‖P t‖ ^ 2) := by
91 apply intervalIntegral.integral_mono_on (by linarith)
92 · exact (by fun_prop : Continuous fun t => ‖P t‖ ^ 2).intervalIntegrable _ _
93 · exact (hWint.const_mul 2).intervalIntegrable
94 · intro t ht
95 have hw := hWwin t ht
96 have hn : 0 ≤ ‖P t‖ ^ 2 := sq_nonneg _
97 nlinarith
98 have hstep1b : ∫ t in (-T)..T, 2 * ((Real.sinc (t / (2 * Q)) ^ 2) * ‖P t‖ ^ 2) ≤ 2 * ∫ t, (Real.sinc (t / (2 * Q)) ^ 2) * ‖P t‖ ^ 2 := by
99 rw [intervalIntegral.integral_of_le (by linarith), integral_const_mul]
100 apply mul_le_mul_of_nonneg_left _ (by norm_num)
101 exact setIntegral_le_integral hWint
102 (Filter.Eventually.of_forall fun t => mul_nonneg (sq_nonneg _) (sq_nonneg _))
103 -- Step 2: the integral over `ℝ` is the double sum `∑ a_m conj(a_n) · 2π tri(Q, log n - log m)`
104 set J : ℝ := ∫ t, Real.sinc (t / (2 * Q)) ^ 2 * ‖P t‖ ^ 2 with hIdef
105 have hInn : 0 ≤ J := integral_nonneg fun t => mul_nonneg (sq_nonneg _) (sq_nonneg _)
106 have hpt : ∀ t, ((Real.sinc (t / (2 * Q)) ^ 2 * ‖P t‖ ^ 2 : ℝ) : ℂ) =
107 ∑ m ∈ s, ∑ n ∈ s, (a m * (starRingEnd ℂ) (a n)) *
108 (((Real.sinc (t / (2 * Q)) ^ 2 : ℝ) : ℂ) *
109 Complex.exp (((t * (Real.log n - Real.log m) : ℝ) : ℂ) * I)) := by
110 intro t
111 have hsq : ((‖P t‖ ^ 2 : ℝ) : ℂ) = P t * (starRingEnd ℂ) (P t) := by
112 rw [Complex.mul_conj, Complex.normSq_eq_norm_sq]
113 have hPP : P t * (starRingEnd ℂ) (P t) =
114 ∑ m ∈ s, ∑ n ∈ s, a m * (starRingEnd ℂ) (a n) * (nit m t * (starRingEnd ℂ) (nit n t)) := by
115 simp only [hP, map_sum, map_mul]
116 rw [Finset.sum_mul_sum]
117 apply sum_congr rfl; intro m _; apply sum_congr rfl; intro n _
118 ring
119 rw [Complex.ofReal_mul, hsq, hPP, Finset.mul_sum]
120 apply sum_congr rfl; intro m _
121 rw [Finset.mul_sum]
122 apply sum_congr rfl; intro n _
123 rw [nit_mul_conj]
124 ring
125 have hIcast : (J : ℂ) = ∑ m ∈ s, ∑ n ∈ s, (a m * (starRingEnd ℂ) (a n)) *
126 ((2 * Real.pi * tri Q (Real.log n - Real.log m) : ℝ) : ℂ) := by
127 have hcast : (J : ℂ) = ∫ t, ((Real.sinc (t / (2 * Q)) ^ 2 * ‖P t‖ ^ 2 : ℝ) : ℂ) :=
128 integral_ofReal.symm
129 rw [hcast]
130 simp_rw [hpt]
131 rw [integral_finset_sum]
132 · apply sum_congr rfl; intro m _
133 rw [integral_finset_sum]
134 · apply sum_congr rfl; intro n _
135 rw [integral_const_mul, T11_fejer Q (Real.log n - Real.log m) hQ]
136 · intro n _
137 exact (integrable_W_exp Q _ hQ).const_mul _
138 · intro m _
139 exact integrable_finset_sum _ fun n _ => (integrable_W_exp Q _ hQ).const_mul _
140 -- Step 3: the norm of the double sum, then Schur
141 have hJle : J ≤ 2 * Real.pi * ∑ m ∈ s, ∑ n ∈ s, ‖a m‖ * ‖a n‖ * tri Q (Real.log n - Real.log m) := by
142 calc J = ‖(J : ℂ)‖ := by rw [Complex.norm_real, Real.norm_of_nonneg hInn]
143 _ = ‖∑ m ∈ s, ∑ n ∈ s, (a m * (starRingEnd ℂ) (a n)) *
144 ((2 * Real.pi * tri Q (Real.log n - Real.log m) : ℝ) : ℂ)‖ := by rw [hIcast]
145 _ ≤ ∑ m ∈ s, ‖∑ n ∈ s, (a m * (starRingEnd ℂ) (a n)) *
146 ((2 * Real.pi * tri Q (Real.log n - Real.log m) : ℝ) : ℂ)‖ := norm_sum_le _ _
147 _ ≤ ∑ m ∈ s, ∑ n ∈ s, ‖(a m * (starRingEnd ℂ) (a n)) *
148 ((2 * Real.pi * tri Q (Real.log n - Real.log m) : ℝ) : ℂ)‖ :=
149 sum_le_sum fun m _ => norm_sum_le _ _
150 _ = ∑ m ∈ s, ∑ n ∈ s, 2 * Real.pi * (‖a m‖ * ‖a n‖ * tri Q (Real.log n - Real.log m)) := by
151 apply sum_congr rfl; intro m _; apply sum_congr rfl; intro n _
152 rw [norm_mul, norm_mul, Complex.norm_conj, Complex.norm_real,
153 Real.norm_of_nonneg (by
154 have := tri_nonneg' Q (Real.log n - Real.log m) hQ
155 positivity)]
156 ring
157 _ = 2 * Real.pi * ∑ m ∈ s, ∑ n ∈ s, ‖a m‖ * ‖a n‖ * tri Q (Real.log n - Real.log m) := by
158 rw [Finset.mul_sum]
159 apply sum_congr rfl; intro m _
160 rw [Finset.mul_sum]
161 have hrow : ∀ m ∈ s, ∑ n ∈ s, tri Q (Real.log n - Real.log m) ≤ 32 * N + 3 * Q :=
162 fun m hm => row_sum_le N Q hN hQ s m (fun n hn => hs n hn) (hs m hm)
163 have hcol : ∀ n ∈ s, ∑ m ∈ s, tri Q (Real.log n - Real.log m) ≤ 32 * N + 3 * Q := by
164 intro n hn
165 have e : ∀ m, tri Q (Real.log n - Real.log m) = tri Q (Real.log m - Real.log n) := fun m => by
166 rw [← tri_neg_arg Q (Real.log m - Real.log n)]
167 congr 1
168 ring
169 simp only [e]
170 exact row_sum_le N Q hN hQ s n (fun m hm => hs m hm) (hs n hn)
171 have hschur : ∑ m ∈ s, ∑ n ∈ s, ‖a m‖ * ‖a n‖ * tri Q (Real.log n - Real.log m) ≤
172 (32 * N + 3 * Q) * ∑ m ∈ s, ‖a m‖ ^ 2 :=
173 schur_bound s (fun m => ‖a m‖) (fun m n => tri Q (Real.log n - Real.log m))
174 (fun m n => tri_nonneg' Q _ hQ) (32 * N + 3 * Q) hrow hcol
175 -- Step 4: assemble
176 have hS : 0 ≤ ∑ m ∈ s, ‖a m‖ ^ 2 := sum_nonneg fun _ _ => sq_nonneg _
177 have hpi : 0 < Real.pi := Real.pi_pos
178 have hJbound : J ≤ 2 * Real.pi * ((32 * N + 3 * Q) * ∑ m ∈ s, ‖a m‖ ^ 2) :=
179 hJle.trans (mul_le_mul_of_nonneg_left hschur (by positivity))
180 show ∫ t in (-T)..T, ‖P t‖ ^ 2 ≤ 128 * Real.pi * (T + N) * ∑ n ∈ s, ‖a n‖ ^ 2
181 have hQT : Q = 2 * T := hQdef
182 have hmain : 4 * Real.pi * (32 * N + 6 * T) * ∑ m ∈ s, ‖a m‖ ^ 2 ≤
183 128 * Real.pi * (T + N) * ∑ m ∈ s, ‖a m‖ ^ 2 := by
184 have : 0 ≤ Real.pi * T * ∑ m ∈ s, ‖a m‖ ^ 2 := by positivity
185 nlinarith
186 have hfin : 2 * J ≤ 4 * Real.pi * (32 * N + 6 * T) * ∑ m ∈ s, ‖a m‖ ^ 2 := by
187 rw [hQT] at hJbound
188 nlinarith
189 linarith [hstep1, hstep1b]
190
191end E424