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/Rigidity/L25Aux.lean

All files · 314 lines · source at the verified commit

1module
2
3public import E424.Rigidity.Core
4
5@[expose] public section
6
7/-!
8# Section 5: auxiliary lemmas for L25 and Proposition D (iii)
9
10Weighted Hölder (4/3, 4), the shift argument of Lemma 25 for one divisor family, and asymptotics.
11-/
12
13set_option linter.style.header false
14open Finset Filter
15
16namespace E424
17
18/-- Hölder with exponents 4/3 and 4 for the window average, first factor with values in `[0,1]`. -/
19theorem E_holder {W : Win} (hL : 0 < W.len) {g h : ℕ → ℝ} {y V : ℝ} (hg : ∀ n, 0 ≤ g n)
20 (hg1 : ∀ n, g n ≤ 1) (hy : W.E g ≤ y) (hV : W.E (fun n => h n ^ 4) ≤ V) :
21 W.E (fun n => g n * |h n|) ≤ y ^ (3 / 4 : ℝ) * V ^ (1 / 4 : ℝ) := by
22 have hw : ∀ n, 0 ≤ g n / n / W.len := fun n => by have := hg n; positivity
23 have key := Real.inner_le_weight_mul_Lp_of_nonneg W.pts (p := 4) (by norm_num)
24 (fun n => g n / n / W.len) (fun n => |h n|) hw (fun n => abs_nonneg _)
25 have e1 : W.E (fun n => g n * |h n|) = ∑ n ∈ W.pts, g n / n / W.len * |h n| := by
26 unfold Win.E Win.sum; rw [sum_div]; exact sum_congr rfl fun n _ => by ring
27 have e2 : W.E g = ∑ n ∈ W.pts, g n / n / W.len := by
28 unfold Win.E Win.sum; rw [sum_div]
29 have e3 : ∑ n ∈ W.pts, g n / n / W.len * |h n| ^ (4 : ℝ) ≤ V := by
30 refine le_trans ?_ hV
31 unfold Win.E Win.sum; rw [sum_div]
32 refine sum_le_sum fun n _ => ?_
33 have h4 : |h n| ^ (4 : ℝ) = h n ^ 4 := by
34 rw [show (4 : ℝ) = ((4 : ℕ) : ℝ) by norm_num, Real.rpow_natCast]
35 exact (by decide : Even 4).pow_abs _
36 rw [h4]
37 have : g n / n / W.len * h n ^ 4 = g n * (h n ^ 4 / n / W.len) := by ring
38 rw [this]
39 have h0 : 0 ≤ h n ^ 4 / n / W.len := by positivity
40 exact mul_le_of_le_one_left h0 (hg1 n)
41 have h3 : 0 ≤ ∑ n ∈ W.pts, g n / n / W.len * |h n| ^ (4 : ℝ) :=
42 sum_nonneg fun n _ => mul_nonneg (hw n) (by positivity)
43 rw [e1]
44 refine key.trans ?_
45 rw [← e2, show (1 - (4 : ℝ)⁻¹) = 3 / 4 by norm_num, show (4 : ℝ)⁻¹ = 1 / 4 by norm_num]
46 have hE0 : 0 ≤ W.E g := by rw [e2]; exact sum_nonneg fun n _ => hw n
47 have hy0 := hE0.trans hy
48 exact mul_le_mul (Real.rpow_le_rpow hE0 hy (by norm_num))
49 (Real.rpow_le_rpow h3 e3 (by norm_num)) (by positivity) (by positivity)
50
51theorem rpow34_add {a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) :
52 (a + b) ^ (3 / 4 : ℝ) ≤ a ^ (3 / 4 : ℝ) + b ^ (3 / 4 : ℝ) := by
53 lift a to NNReal using ha
54 lift b to NNReal using hb
55 exact_mod_cast NNReal.rpow_add_le_add_rpow a b (by norm_num) (by norm_num)
56
57theorem abs_E_le {W : Win} (hL : 0 < W.len) {g h : ℕ → ℝ} (hgh : ∀ n ∈ W.pts, |g n| ≤ h n) :
58 |W.E g| ≤ W.E h := by
59 unfold Win.E
60 rw [abs_div, abs_of_pos hL]
61 exact div_le_div_of_nonneg_right (Win.abs_sum_le.trans (Win.sum_mono hgh)) hL.le
62
63theorem rc_le_card (T : Finset ℕ) (n : ℕ) : rc T n ≤ T.card := by
64 unfold rc; exact_mod_cast card_filter_le _ _
65
66/-- The shift argument of Lemma 25 for a divisor family `T` and a 54-periodic weight `c`. -/
67theorem shift_core {η N0 : ℝ} (hη : 0 < η) {W : Win} (hW : W.Adm η N0) (T : Finset ℕ) {H : ℕ}
68 (hH : 1 ≤ H) (c : ℕ → ℝ) (hc0 : ∀ n, 0 ≤ c n) (hc1 : ∀ n, c n ≤ 1)
69 (hcp : ∀ n i, c (n + 54 * i) = c n) {y V v e t : ℝ} (ht : 0 < t)
70 (he : e = 4 / (W.lo * W.len)) (hD : ∀ i ∈ Icc 1 H, W.D (54 * i) ≤ y) (hG : W.mu G1 ≤ y)
71 (h4 : W.E (fun n => (rc T n - ms T) ^ 4) ≤ V)
72 (h2 : W.E (fun n => ((∑ i ∈ Icc 1 H, rc T (n + 54 * i)) / H - ms T) ^ 2) ≤ v) :
73 |W.E fun n => c n * f (n - 1) * (ms T - rc T n)| ≤
74 2 * ((y + e) ^ (3 / 4 : ℝ) * (V + 54 * H * (ms T + T.card) ^ 4 * e) ^ (1 / 4 : ℝ)) +
75 54 * H * (ms T + T.card) * e + (t * v + (1 + e) / t) := by
76 have hL := hW.len_pos hη
77 have hlo := hW.lo_pos
78 have he0 : 0 < e := by rw [he]; positivity
79 have hH0 : (0 : ℝ) < H := by exact_mod_cast hH
80 set M := ms T with hM
81 set b : ℝ := M + T.card with hb
82 have hM0 : 0 ≤ M := ms_nonneg T
83 have hb0 : 0 ≤ b := by positivity
84 have hu : ∀ n, |M - rc T n| ≤ b := fun n => by
85 have h1 := rc_nonneg T n
86 have h2 := rc_le_card T n
87 rw [abs_le]; constructor <;> linarith
88 set p : ℕ → ℝ := fun n => c n * ind (n % 3 ≠ 2) with hp
89 have hp0 : ∀ n, 0 ≤ p n := fun n => mul_nonneg (hc0 n) (ind_nonneg _)
90 have hp1 : ∀ n, p n ≤ 1 := fun n => mul_le_one₀ (hc1 n) (ind_nonneg _) (ind_le_one _)
91 have hpp : ∀ n i, p (n + 54 * i) = p n := fun n i => by
92 simp only [hp, hcp]; congr 2; rw [show (n + 54 * i) % 3 = n % 3 by omega]
93 have hV : 0 ≤ V := (Win.E_nonneg hL.le fun _ _ => by positivity).trans h4
94 have hVe : V ≤ V + 54 * H * b ^ 4 * e := by
95 have : 0 ≤ 54 * H * b ^ 4 * e := by positivity
96 linarith
97 -- step 1: `f(n-1)` to `F(n-1)`
98 set X := W.E fun n => p n * F (n - 1) * (M - rc T n) with hX
99 set Q := (y + e) ^ (3 / 4 : ℝ) * (V + 54 * H * b ^ 4 * e) ^ (1 / 4 : ℝ) with hQ
100 have s1 : |W.E (fun n => c n * f (n - 1) * (M - rc T n)) - X| ≤ Q := by
101 rw [hX, ← Win.E_sub]
102 have hg : W.E (fun n => ind (n - 1 ∈ G1)) ≤ y + e := by
103 have := (abs_le.mp (E_shift_le hη hW 1 (fun n => ind (n - 1 ∈ G1)) 1 fun n => by
104 rw [abs_of_nonneg (ind_nonneg _)]; exact ind_le_one _)).1
105 simp only [Nat.add_sub_cancel, Nat.cast_one, one_mul, ← he] at this
106 have h' : W.E (fun n => ind (n ∈ G1)) ≤ y := hG
107 linarith
108 refine le_trans (abs_E_le hL (h := fun n => ind (n - 1 ∈ G1) * |M - rc T n|) ?_)
109 (E_holder hL (fun _ => ind_nonneg _) (fun _ => ind_le_one _) hg ?_)
110 · intro n hn
111 have hn3 : 2 ≤ n := by
112 have h1 := Win.lo_lt_of_mem_pts hlo.le hn
113 have h2 : (2 : ℝ) < n := by linarith [hW.three_le]
114 exact_mod_cast h2.le
115 rw [← sub_mul, abs_mul]
116 refine mul_le_mul_of_nonneg_right ?_ (abs_nonneg _)
117 simp only [hp]
118 by_cases h3 : n % 3 = 2
119 · rw [ind_false (p := n % 3 ≠ 2) (by simpa using h3),
120 f_eq_zero_of_not_U (n := n - 1) (fun h => h.2 (by omega))]
121 simpa using ind_nonneg _
122 · rw [ind_true h3, mul_one, ← mul_sub, abs_mul, abs_of_nonneg (hc0 n)]
123 by_cases hG1 : n - 1 ∈ G1
124 · rw [ind_true hG1]
125 have hab : |f (n - 1) - F (n - 1)| ≤ 1 := by
126 rw [abs_le]
127 constructor <;> linarith [f_nonneg (n - 1), f_le_one (n - 1), F_nonneg (n - 1), F_le_one (n - 1)]
128 exact mul_le_one₀ (hc1 n) (abs_nonneg _) hab
129 · have : F (n - 1) = f (n - 1) := by
130 by_contra h
131 exact hG1 ⟨⟨by omega, by omega⟩, h⟩
132 rw [this, sub_self, abs_zero, mul_zero]; exact ind_nonneg _
133 · refine le_trans (le_of_eq ?_) (h4.trans hVe)
134 congr 1; funext n; ring
135 -- step 2: shift by `54 i`
136 set q : ℕ → ℝ := fun i => W.E fun n => p n * F (n - 1) * (M - rc T (n + 54 * i)) with hq
137 have s2 : ∀ i ∈ Icc 1 H, |X - q i| ≤ 54 * H * b * e + Q := by
138 intro i hi
139 have hiH : (i : ℝ) ≤ H := by exact_mod_cast (mem_Icc.mp hi).2
140 have hi0 : (0 : ℝ) ≤ i := Nat.cast_nonneg i
141 have a1 := E_shift_le hη hW (54 * i) (fun n => p n * F (n - 1) * (M - rc T n)) b fun n => by
142 rw [abs_mul, abs_of_nonneg (mul_nonneg (hp0 n) (F_nonneg _))]
143 refine le_trans (mul_le_of_le_one_left (abs_nonneg _) ?_) (hu n)
144 exact mul_le_one₀ (hp1 n) (F_nonneg _) (F_le_one _)
145 rw [← he] at a1
146 have a2 : ((54 * i : ℕ) : ℝ) * b * e ≤ 54 * H * b * e := by
147 push_cast; gcongr
148 have a3 : |W.E (fun n => p (n + 54 * i) * F (n + 54 * i - 1) * (M - rc T (n + 54 * i))) - q i| ≤ Q := by
149 rw [hq, ← Win.E_sub]
150 have hg : W.E (fun n => ind (F (n - 1 + 54 * i) ≠ F (n - 1))) ≤ y + e := by
151 have := (abs_le.mp (E_shift_le hη hW 1 (fun n => ind (F (n - 1 + 54 * i) ≠ F (n - 1))) 1
152 fun n => by rw [abs_of_nonneg (ind_nonneg _)]; exact ind_le_one _)).1
153 simp only [Nat.add_sub_cancel, Nat.cast_one, one_mul, ← he] at this
154 have h' : W.E (fun n => ind (F (n + 54 * i) ≠ F n)) ≤ y := hD i hi
155 linarith
156 refine le_trans (abs_E_le hL
157 (h := fun n => ind (F (n - 1 + 54 * i) ≠ F (n - 1)) * |M - rc T (n + 54 * i)|) ?_)
158 (E_holder hL (fun _ => ind_nonneg _) (fun _ => ind_le_one _) hg ?_)
159 · intro n hn
160 have hn1 := one_le_of_mem_pts hW hn
161 rw [hpp, ← sub_mul, abs_mul, ← mul_sub, abs_mul, abs_of_nonneg (hp0 n),
162 show n + 54 * i - 1 = n - 1 + 54 * i by omega]
163 refine mul_le_mul_of_nonneg_right ?_ (abs_nonneg _)
164 refine le_trans (mul_le_of_le_one_left (abs_nonneg _) (hp1 n)) ?_
165 by_cases h : F (n - 1 + 54 * i) = F (n - 1)
166 · rw [h, sub_self, abs_zero]; exact ind_nonneg _
167 · rw [ind_true h, abs_le]
168 constructor <;> linarith [F_nonneg (n - 1), F_le_one (n - 1), F_nonneg (n - 1 + 54 * i),
169 F_le_one (n - 1 + 54 * i)]
170 · have a4 := (abs_le.mp (E_shift_le hη hW (54 * i) (fun n => (M - rc T n) ^ 4) (b ^ 4) fun n => by
171 rw [abs_pow]; exact pow_le_pow_left₀ (abs_nonneg _) (hu n) 4)).2
172 rw [← he] at a4
173 have a5 : ((54 * i : ℕ) : ℝ) * b ^ 4 * e ≤ 54 * H * b ^ 4 * e := by
174 push_cast; gcongr
175 have a6 : W.E (fun n => (M - rc T n) ^ 4) ≤ V := by
176 refine le_trans (le_of_eq ?_) h4
177 congr 1; funext n; ring
178 linarith
179 rw [abs_le] at a1 a3 ⊢
180 constructor <;> linarith [a1.1, a1.2, a3.1, a3.2]
181 -- step 3: average over `i`
182 have s3 : |X - (∑ i ∈ Icc 1 H, q i) / H| ≤ 54 * H * b * e + Q := by
183 have e1 : X - (∑ i ∈ Icc 1 H, q i) / H = (∑ i ∈ Icc 1 H, (X - q i)) / H := by
184 rw [sum_sub_distrib, sum_const, Nat.card_Icc, Nat.add_sub_cancel, nsmul_eq_mul]
185 field_simp
186 rw [e1, abs_div, abs_of_pos hH0, div_le_iff₀ hH0]
187 refine (abs_sum_le_sum_abs _ _).trans ((sum_le_sum s2).trans (le_of_eq ?_))
188 rw [sum_const, Nat.card_Icc, Nat.add_sub_cancel, nsmul_eq_mul, mul_comm]
189 have s4 : |(∑ i ∈ Icc 1 H, q i) / H| ≤ t * v + (1 + e) / t := by
190 have e1 : (∑ i ∈ Icc 1 H, q i) / H =
191 W.E fun n => p n * F (n - 1) * (M - (∑ i ∈ Icc 1 H, rc T (n + 54 * i)) / H) := by
192 have e2 : ∑ i ∈ Icc 1 H, q i =
193 W.E fun n => ∑ i ∈ Icc 1 H, p n * F (n - 1) * (M - rc T (n + 54 * i)) := by
194 simp only [hq]; unfold Win.E; rw [Win.sum_finset_sum, sum_div]
195 rw [e2, div_eq_inv_mul, ← Win.E_const_mul]
196 congr 1; funext n
197 rw [← mul_sum, sum_sub_distrib, sum_const, Nat.card_Icc, Nat.add_sub_cancel, nsmul_eq_mul]
198 field_simp
199 rw [e1]
200 refine (abs_E_le hL (h := fun n =>
201 t * ((∑ i ∈ Icc 1 H, rc T (n + 54 * i)) / H - M) ^ 2 + 1 / t * 1) fun n _ => ?_).trans ?_
202 · rw [abs_mul, abs_of_nonneg (mul_nonneg (hp0 n) (F_nonneg _))]
203 refine le_trans (mul_le_of_le_one_left (abs_nonneg _)
204 (mul_le_one₀ (hp1 n) (F_nonneg _) (F_le_one _))) ?_
205 rw [abs_sub_comm]
206 set z := (∑ i ∈ Icc 1 H, rc T (n + 54 * i)) / (H : ℝ) - M with hz
207 rw [← sq_abs z, mul_one]
208 have hz0 := abs_nonneg z
209 have : t * (t * |z| ^ 2 + 1 / t - |z|) = (t * |z| - 1) ^ 2 + t * |z| := by
210 field_simp; ring
211 have h3 : 0 ≤ t * (t * |z| ^ 2 + 1 / t - |z|) := by rw [this]; positivity
212 linarith [nonneg_of_mul_nonneg_right h3 ht]
213 · rw [Win.E_add, Win.E_const_mul, Win.E_const_mul]
214 have h1 : W.E (fun _ => (1 : ℝ)) ≤ 1 + e := by
215 refine (E_le_const hη hW (c := 1) zero_le_one fun _ _ => le_rfl).trans ?_
216 rw [one_mul, he, mul_comm W.len]
217 gcongr; norm_num
218 have : 1 / t * W.E (fun _ => (1 : ℝ)) ≤ (1 + e) / t := by
219 rw [one_div, inv_mul_eq_div]; gcongr
220 gcongr
221 rw [abs_le] at s1 s3 s4 ⊢
222 constructor <;> linarith [s1.1, s1.2, s3.1, s3.2, s4.1, s4.2]
223
224/-- Powers of `log lo` are small against `lo^0.01`. -/
225theorem log_pow_small (a : ℝ) (k : ℕ) : ∃ N0 : ℝ, ∀ lo ≥ N0, 1 ≤ lo →
226 a * Real.log lo ^ k * lo ^ (-(0.01 : ℝ)) ≤ 1 := by
227 have h := isLittleO_log_rpow_rpow_atTop (k : ℝ) (show (0 : ℝ) < 0.01 by norm_num)
228 obtain ⟨N0, hN0⟩ := eventually_atTop.mp (h.bound (show 0 < 1 / (|a| + 1) by positivity))
229 refine ⟨N0, fun lo hlo h1 => ?_⟩
230 have hb := hN0 lo hlo
231 have hl : 0 ≤ Real.log lo := Real.log_nonneg h1
232 have hlo0 : 0 < lo := by linarith
233 rw [Real.norm_of_nonneg (by positivity), Real.norm_of_nonneg (by positivity),
234 Real.rpow_natCast] at hb
235 rw [Real.rpow_neg hlo0.le, ← div_eq_mul_inv, div_le_one (by positivity)]
236 have hk : 0 ≤ Real.log lo ^ k := by positivity
237 calc a * Real.log lo ^ k ≤ (|a| + 1) * (1 / (|a| + 1) * lo ^ (0.01 : ℝ)) := by
238 refine mul_le_mul (by linarith [le_abs_self a]) hb hk (by positivity)
239 _ = _ := by field_simp
240
241/-- All error terms with the factor `4 / (lo len)` are tiny. -/
242theorem tiny_le (η : ℝ) (hη : 0 < η) (a : ℝ) (k : ℕ) : ∃ N0 : ℝ, ∀ W : Win, W.Adm η N0 →
243 a * Real.log W.lo ^ k * Real.exp (Real.sqrt (Real.log W.lo)) ^ 4 * (4 / (W.lo * W.len)) ≤
244 W.lo ^ (-(0.01 : ℝ)) := by
245 obtain ⟨N1, h1⟩ := log_pow_small (|a| * (4 / η)) k
246 refine ⟨max N1 (Real.exp 256), fun W hW => ?_⟩
247 have hlo := hW.lo_pos
248 have hl := hW.one_lt_log
249 have hL := hW.len_pos hη
250 have hs := h1 W.lo ((le_max_left _ _).trans hW.le_lo) (by linarith [hW.three_le])
251 have hl2 : 256 ≤ Real.log W.lo := by
252 rw [Real.le_log_iff_exp_le hlo]; exact (le_max_right _ _).trans hW.le_lo
253 set l := Real.log W.lo with hldef
254 have e1 : Real.exp (Real.sqrt l) ^ 4 ≤ W.lo ^ (1 / 4 : ℝ) := by
255 rw [← Real.exp_nat_mul, Real.rpow_def_of_pos hlo, ← hldef, Real.exp_le_exp]
256 have h16 : 16 ≤ Real.sqrt l := by rw [Real.le_sqrt (by norm_num) (by linarith)]; linarith
257 have := Real.sq_sqrt (show 0 ≤ l by linarith)
258 push_cast; nlinarith
259 have e2 : 4 / (W.lo * W.len) ≤ 4 / η * W.lo ^ (-1 : ℝ) := by
260 rw [Real.rpow_neg_one, ← div_eq_mul_inv, div_div]
261 have : η ≤ W.len := by have := hW.le_len; nlinarith
262 rw [mul_comm η]
263 gcongr
264 have hlk : 0 ≤ l ^ k := by positivity
265 calc a * l ^ k * Real.exp (Real.sqrt l) ^ 4 * (4 / (W.lo * W.len))
266 ≤ |a| * l ^ k * W.lo ^ (1 / 4 : ℝ) * (4 / η * W.lo ^ (-1 : ℝ)) := by
267 gcongr; exact le_abs_self a
268 _ = (|a| * (4 / η) * l ^ k * W.lo ^ (-(0.01 : ℝ))) * W.lo ^ (-0.74 : ℝ) := by
269 have : W.lo ^ (1 / 4 : ℝ) * W.lo ^ (-1 : ℝ) = W.lo ^ (-(0.01 : ℝ)) * W.lo ^ (-0.74 : ℝ) := by
270 rw [← Real.rpow_add hlo, ← Real.rpow_add hlo]; norm_num
271 linear_combination (|a| * (4 / η) * l ^ k) * this
272 _ ≤ 1 * W.lo ^ (-0.74 : ℝ) := by gcongr
273 _ ≤ W.lo ^ (-(0.01 : ℝ)) := by
274 rw [one_mul]
275 exact Real.rpow_le_rpow_of_exponent_le (by linarith [hW.three_le]) (by norm_num)
276
277/-- `lo^{-0.01} ≤ (log lo)^{-k}/a` for large `lo`. -/
278theorem lo_rpow_le (η a : ℝ) (k : ℕ) (ha : 0 < a) : ∃ N0 : ℝ, ∀ W : Win, W.Adm η N0 →
279 W.lo ^ (-(0.01 : ℝ)) ≤ 1 / (a * Real.log W.lo ^ k) := by
280 obtain ⟨N1, h1⟩ := log_pow_small a k
281 refine ⟨N1, fun W hW => ?_⟩
282 have hs := h1 W.lo hW.le_lo (by linarith [hW.three_le])
283 have hl := hW.one_lt_log
284 rw [le_div_iff₀ (by positivity)]
285 linarith
286
287theorem inv_log_le_edge {η N0 : ℝ} {W : Win} (hW : W.Adm η N0) : 1 / Real.log W.lo ≤ W.edge ^ 2 := by
288 have hl := hW.one_lt_log
289 rw [one_div, ← Real.rpow_neg_one, Win.edge, ← Real.rpow_natCast, ← Real.rpow_mul (by linarith)]
290 exact Real.rpow_le_rpow_of_exponent_le hl.le (by norm_num)
291
292theorem edge_le_one {η N0 : ℝ} {W : Win} (hW : W.Adm η N0) : W.edge ≤ 1 :=
293 Real.rpow_le_one_of_one_le_of_nonpos hW.one_lt_log.le (by norm_num)
294
295/-- `a ≤ log lo` and `x ≤ a / log lo` with `x^{3/4}`: `(a / log lo)^{3/4} ≤ C edge`. -/
296theorem rpow34_le_edge {η N0 : ℝ} {W : Win} (hW : W.Adm η N0) {x a : ℝ} (hx : 0 ≤ x) (ha : 0 ≤ a)
297 (h : x ≤ a * (1 / Real.log W.lo)) : x ^ (3 / 4 : ℝ) ≤ a ^ (3 / 4 : ℝ) * W.edge := by
298 have hl := hW.one_lt_log
299 refine (Real.rpow_le_rpow hx h (by norm_num)).trans ?_
300 rw [Real.mul_rpow ha (by positivity)]
301 gcongr
302 rw [one_div, ← Real.rpow_neg_one, ← Real.rpow_mul (by linarith), Win.edge]
303 exact Real.rpow_le_rpow_of_exponent_le hl.le (by norm_num)
304
305/-- A finite set of positive integers up to `E` has at most `E` elements. -/
306theorem card_le_of_le {T : Finset ℕ} {x : ℝ} (hx : 0 ≤ x) (h : ∀ s ∈ T, 1 ≤ s ∧ (s : ℝ) ≤ x) :
307 (T.card : ℝ) ≤ x := by
308 have : T ⊆ Icc 1 ⌊x⌋₊ := fun s hs => mem_Icc.mpr ⟨(h s hs).1, Nat.le_floor (h s hs).2⟩
309 have h1 := card_le_card this
310 rw [Nat.card_Icc, Nat.add_sub_cancel] at h1
311 exact le_trans (by exact_mod_cast h1) (Nat.floor_le hx)
312
313end E424
314