Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit 594e884

Browse files
committed
feat(combinatorics/additive/behrend): Behrend's lower bound on Roth numbers (#15327)
This proves the explicit bound on Roth's numbers of the form `n / exp (O (sqrt (log n)))`. Co-authored-by: Bhavik Mehta <bmehta8@gmail.com>
1 parent 732279d commit 594e884

File tree

3 files changed

+345
-1
lines changed

3 files changed

+345
-1
lines changed

src/algebra/order/floor.lean

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ eq_of_forall_ge_iff $ λ a, ceil_le.trans nat.cast_le
199199

200200
@[simp] lemma ceil_eq_zero : ⌈a⌉₊ = 0 ↔ a ≤ 0 := by rw [← le_zero_iff, ceil_le, nat.cast_zero]
201201

202+
@[simp] lemma ceil_pos : 0 < ⌈a⌉₊ ↔ 0 < a := by rw [lt_ceil, cast_zero]
203+
202204
lemma lt_of_ceil_lt (h : ⌈a⌉₊ < n) : a < n := (le_ceil a).trans_lt (nat.cast_lt.2 h)
203205

204206
lemma le_of_ceil_le (h : ⌈a⌉₊ ≤ n) : a ≤ n := (le_ceil a).trans (nat.cast_le.2 h)
@@ -647,7 +649,7 @@ by rw [eq_sub_iff_add_eq, ← ceil_add_one, sub_add_cancel]
647649
lemma ceil_lt_add_one (a : α) : (⌈a⌉ : α) < a + 1 :=
648650
by { rw [← lt_ceil, ← int.cast_one, ceil_add_int], apply lt_add_one }
649651

650-
lemma ceil_pos : 0 < ⌈a⌉ ↔ 0 < a := by rw [lt_ceil, int.cast_zero]
652+
@[simp] lemma ceil_pos : 0 < ⌈a⌉ ↔ 0 < a := by rw [lt_ceil, cast_zero]
651653

652654
@[simp] lemma ceil_zero : ⌈(0 : α)⌉ = 0 := by rw [← int.cast_zero, ceil_coe]
653655

src/analysis/special_functions/pow.lean

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ by rw [rpow_def_of_nonneg (le_of_lt hx), if_neg (ne_of_gt hx)]
294294
lemma exp_mul (x y : ℝ) : exp (x * y) = (exp x) ^ y :=
295295
by rw [rpow_def_of_pos (exp_pos _), log_exp]
296296

297+
@[simp] lemma exp_one_rpow (x : ℝ) : exp 1 ^ x = exp x := by rw [←exp_mul, one_mul]
298+
297299
lemma rpow_eq_zero_iff_of_nonneg {x y : ℝ} (hx : 0 ≤ x) : x ^ y = 0 ↔ x = 0 ∧ y ≠ 0 :=
298300
by { simp only [rpow_def_of_nonneg hx], split_ifs; simp [*, exp_ne_zero] }
299301

src/combinatorics/additive/behrend.lean

Lines changed: 340 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Authors: Yaël Dillies, Bhavik Mehta
55
-/
66
import analysis.inner_product_space.pi_L2
77
import combinatorics.additive.salem_spencer
8+
import combinatorics.pigeonhole
9+
import data.complex.exponential_bounds
810

911
/-!
1012
# Behrend's bound on Roth numbers
@@ -26,6 +28,7 @@ integer points on that sphere and map them onto `ℕ` in a way that preserves ar
2628
digits in base `d`.
2729
* `behrend.card_sphere_le_roth_number_nat`: Implicit lower bound on Roth numbers in terms of
2830
`behrend.sphere`.
31+
* `behrend.roth_lower_bound`: Behrend's explicit lower bound on Roth numbers.
2932
3033
## References
3134
@@ -196,4 +199,341 @@ begin
196199
exact λ h _ i, (h i).trans_le le_self_add,
197200
end
198201

202+
/-!
203+
### Optimization
204+
205+
Now that we know how to turn the integer points of any sphere into a Salem-Spencer set, we find a
206+
sphere containing many integer points by the pigeonhole principle. This gives us an implicit bound
207+
that we then optimize by tweaking the parameters. The (almost) optimal parameters are
208+
`behrend.n_value` and `behrend.d_value`.
209+
-/
210+
211+
lemma exists_large_sphere_aux (n d : ℕ) :
212+
∃ k ∈ range (n * (d - 1)^2 + 1), (↑(d ^ n) / (↑(n * (d - 1)^2) + 1) : ℝ) ≤ (sphere n d k).card :=
213+
begin
214+
refine exists_le_card_fiber_of_nsmul_le_card_of_maps_to (λ x hx, _) nonempty_range_succ _,
215+
{ rw [mem_range, lt_succ_iff],
216+
exact sum_sq_le_of_mem_box hx },
217+
{ rw [card_range, _root_.nsmul_eq_mul, mul_div_assoc', cast_add_one, mul_div_cancel_left,
218+
card_box],
219+
exact (cast_add_one_pos _).ne' }
220+
end
221+
222+
lemma exists_large_sphere (n d : ℕ) : ∃ k, (d ^ n / ↑(n * d^2) : ℝ) ≤ (sphere n d k).card :=
223+
begin
224+
obtain ⟨k, -, hk⟩ := exists_large_sphere_aux n d,
225+
refine ⟨k, _⟩,
226+
obtain rfl | hn := n.eq_zero_or_pos,
227+
{ simp },
228+
obtain rfl | hd := d.eq_zero_or_pos,
229+
{ simp },
230+
rw ←cast_pow,
231+
refine (div_le_div_of_le_left _ _ _).trans hk,
232+
{ exact cast_nonneg _ },
233+
{ exact cast_add_one_pos _ },
234+
simp only [←le_sub_iff_add_le', cast_mul, ←mul_sub, cast_pow, cast_sub hd, sub_sq,
235+
one_pow, cast_one, mul_one, sub_add, sub_sub_self],
236+
apply one_le_mul_of_one_le_of_one_le,
237+
{ rwa one_le_cast },
238+
rw le_sub_iff_add_le,
239+
norm_num,
240+
exact le_mul_of_one_le_right zero_le_two (one_le_cast.2 hd),
241+
end
242+
243+
lemma bound_aux' (n d : ℕ) : (d ^ n / ↑(n * d^2) : ℝ) ≤ roth_number_nat ((2 * d - 1)^n) :=
244+
let ⟨k, h⟩ := exists_large_sphere n d in h.trans $ cast_le.2 $ card_sphere_le_roth_number_nat _ _ _
245+
246+
lemma bound_aux (hd : d ≠ 0) (hn : 2 ≤ n) :
247+
(d ^ (n - 2) / n : ℝ) ≤ roth_number_nat ((2 * d - 1)^n) :=
248+
begin
249+
convert bound_aux' n d using 1,
250+
rw [cast_mul, cast_pow, mul_comm, ←div_div, pow_sub₀ _ _ hn, ←div_eq_mul_inv],
251+
rwa cast_ne_zero,
252+
end
253+
254+
open_locale filter topological_space
255+
open real
256+
257+
section numerical_bounds
258+
259+
lemma log_two_mul_two_le_sqrt_log_eight : log 2 * 2 ≤ sqrt (log 8) :=
260+
begin
261+
rw [show (8 : ℝ) = 2 ^ ((3 : ℕ) : ℝ), by norm_num1, log_rpow zero_lt_two (3:ℕ)],
262+
apply le_sqrt_of_sq_le,
263+
rw [mul_pow, sq (log 2), mul_assoc, mul_comm],
264+
refine mul_le_mul_of_nonneg_right _ (log_nonneg one_le_two),
265+
rw ←le_div_iff,
266+
apply log_two_lt_d9.le.trans,
267+
all_goals { norm_num1 }
268+
end
269+
270+
lemma two_div_one_sub_two_div_e_le_eight : 2 / (1 - 2 / exp 1) ≤ 8 :=
271+
begin
272+
rw [div_le_iff, mul_sub, mul_one, mul_div_assoc', le_sub, div_le_iff (exp_pos _)],
273+
{ linarith [exp_one_gt_d9] },
274+
rw [sub_pos, div_lt_one];
275+
exact exp_one_gt_d9.trans' (by norm_num),
276+
end
277+
278+
lemma le_sqrt_log (hN : 4096 ≤ N) : log (2 / (1 - 2 / exp 1)) * (69 / 50) ≤ sqrt (log ↑N) :=
279+
begin
280+
have : ((12 : ℕ) : ℝ) * log 2 ≤ log N,
281+
{ rw [←log_rpow zero_lt_two, log_le_log, rpow_nat_cast],
282+
{ norm_num1,
283+
exact_mod_cast hN },
284+
{ exact rpow_pos_of_pos zero_lt_two _ },
285+
rw cast_pos,
286+
exact hN.trans_lt' (by norm_num1) },
287+
refine (mul_le_mul_of_nonneg_right ((log_le_log _ $ by norm_num1).2
288+
two_div_one_sub_two_div_e_le_eight) $ by norm_num1).trans (_),
289+
{ refine div_pos zero_lt_two _,
290+
rw [sub_pos, div_lt_one (exp_pos _)],
291+
exact exp_one_gt_d9.trans_le' (by norm_num1) },
292+
have l8 : log 8 = (3 : ℕ) * log 2,
293+
{ rw [←log_rpow zero_lt_two, rpow_nat_cast],
294+
norm_num },
295+
rw [l8, cast_bit1, cast_one],
296+
apply le_sqrt_of_sq_le (le_trans _ this),
297+
simp only [cast_bit0, cast_bit1, cast_one],
298+
rw [mul_right_comm, mul_pow, sq (log 2), ←mul_assoc],
299+
apply mul_le_mul_of_nonneg_right _ (log_nonneg one_le_two),
300+
rw ←le_div_iff' ,
301+
{ exact log_two_lt_d9.le.trans (by norm_num1) },
302+
exact sq_pos_of_ne_zero _ (by norm_num1),
303+
end
304+
305+
lemma exp_neg_two_mul_le {x : ℝ} (hx : 0 < x) : exp (-2 * x) < exp (2 - ⌈x⌉₊) / ⌈x⌉₊ :=
306+
begin
307+
have h₁ := ceil_lt_add_one hx.le,
308+
have h₂ : 1 - x ≤ 2 - ⌈x⌉₊,
309+
{ rw le_sub_iff_add_le,
310+
apply (add_le_add_left h₁.le _).trans_eq,
311+
rw [←add_assoc, sub_add_cancel],
312+
refl },
313+
have h₃ : exp (-(x+1)) ≤ 1 / (x + 1),
314+
{ rw [exp_neg, inv_eq_one_div],
315+
refine one_div_le_one_div_of_le (add_pos hx zero_lt_one) _,
316+
apply le_trans _ (add_one_le_exp_of_nonneg $ add_nonneg hx.le zero_le_one),
317+
exact le_add_of_nonneg_right zero_le_one },
318+
refine lt_of_le_of_lt _ (div_lt_div_of_lt_left (exp_pos _) (cast_pos.2 $ ceil_pos.2 hx) h₁),
319+
refine le_trans _ (div_le_div_of_le_of_nonneg (exp_le_exp.2 h₂) $ add_nonneg hx.le zero_le_one),
320+
rw [le_div_iff (add_pos hx zero_lt_one), ←le_div_iff' (exp_pos _), ←exp_sub, neg_mul,
321+
sub_neg_eq_add, two_mul, sub_add_add_cancel, add_comm _ x],
322+
refine le_trans _ (add_one_le_exp_of_nonneg $ add_nonneg hx.le zero_le_one),
323+
exact le_add_of_nonneg_right zero_le_one,
324+
end
325+
326+
lemma div_lt_floor {x : ℝ} (hx : 2 / (1 - 2 / exp 1) ≤ x) : x / exp 1 < (⌊x/2⌋₊ : ℝ) :=
327+
begin
328+
apply lt_of_le_of_lt _ (sub_one_lt_floor _),
329+
have : 0 < 1 - 2 / exp 1,
330+
{ rw [sub_pos, div_lt_one (exp_pos _)],
331+
exact lt_of_le_of_lt (by norm_num) exp_one_gt_d9 },
332+
rwa [le_sub, div_eq_mul_one_div x, div_eq_mul_one_div x, ←mul_sub, div_sub', ←div_eq_mul_one_div,
333+
mul_div_assoc', one_le_div, ←div_le_iff this],
334+
{ exact zero_lt_two },
335+
{ exact two_ne_zero }
336+
end
337+
338+
lemma ceil_lt_mul {x : ℝ} (hx : 50/19 ≤ x) : (⌈x⌉₊ : ℝ) < 1.38 * x :=
339+
begin
340+
refine (ceil_lt_add_one $ hx.trans' $ by norm_num).trans_le _,
341+
rwa [←le_sub_iff_add_le', ←sub_one_mul, show (69/50 - 1 : ℝ) = (50/19)⁻¹, by norm_num1,
342+
←div_eq_inv_mul, one_le_div],
343+
norm_num1,
344+
end
345+
346+
end numerical_bounds
347+
348+
/-- The (almost) optimal value of `n` in `behrend.bound_aux`. -/
349+
noncomputable def n_value (N : ℕ) : ℕ := ⌈sqrt (log N)⌉₊
350+
351+
/-- The (almost) optimal value of `d` in `behrend.bound_aux`. -/
352+
noncomputable def d_value (N : ℕ) : ℕ := ⌊(N : ℝ)^(1 / n_value N : ℝ)/2⌋₊
353+
354+
lemma n_value_pos (hN : 2 ≤ N) : 0 < n_value N :=
355+
ceil_pos.2 $ real.sqrt_pos.2 $ log_pos $ one_lt_cast.2 $ hN
356+
357+
lemma two_le_n_value (hN : 3 ≤ N) : 2 ≤ n_value N :=
358+
begin
359+
refine succ_le_of_lt (lt_ceil.2 $ lt_sqrt_of_sq_lt _),
360+
rw [cast_one, one_pow, lt_log_iff_exp_lt],
361+
refine lt_of_lt_of_le _ (cast_le.2 hN),
362+
{ exact exp_one_lt_d9.trans_le (by norm_num) },
363+
rw cast_pos,
364+
exact (zero_lt_succ _).trans_le hN,
365+
end
366+
367+
lemma three_le_n_value (hN : 64 ≤ N) : 3 ≤ n_value N :=
368+
begin
369+
rw [n_value, ←lt_iff_add_one_le, lt_ceil, cast_two],
370+
apply lt_sqrt_of_sq_lt,
371+
have : (2 : ℝ)^((6 : ℕ) : ℝ) ≤ N,
372+
{ rw rpow_nat_cast,
373+
exact (cast_le.2 hN).trans' (by norm_num1) },
374+
apply lt_of_lt_of_le _ ((log_le_log (rpow_pos_of_pos zero_lt_two _) _).2 this),
375+
rw [log_rpow zero_lt_two, cast_bit0, cast_bit1, cast_one, ←div_lt_iff'],
376+
{ exact log_two_gt_d9.trans_le' (by norm_num1) },
377+
{ norm_num1 },
378+
rw cast_pos,
379+
exact hN.trans_lt' (by norm_num1),
380+
end
381+
382+
lemma d_value_pos (hN₃ : 8 ≤ N) : 0 < d_value N :=
383+
begin
384+
have hN₀ : 0 < (N : ℝ) := cast_pos.2 (succ_pos'.trans_le hN₃),
385+
rw [d_value, floor_pos, ←log_le_log zero_lt_one, log_one, log_div _ two_ne_zero, log_rpow hN₀,
386+
div_mul_eq_mul_div, one_mul, sub_nonneg, le_div_iff],
387+
{ have : (n_value N : ℝ) ≤ 2 * sqrt (log N),
388+
{ apply (ceil_lt_add_one $ sqrt_nonneg _).le.trans,
389+
rw [two_mul, add_le_add_iff_left],
390+
apply le_sqrt_of_sq_le,
391+
rw [one_pow, le_log_iff_exp_le hN₀],
392+
exact (exp_one_lt_d9.le.trans $ by norm_num).trans (cast_le.2 hN₃) },
393+
apply (mul_le_mul_of_nonneg_left this $ log_nonneg one_le_two).trans _,
394+
rw [←mul_assoc, ←le_div_iff (real.sqrt_pos.2 $ log_pos $ one_lt_cast.2 _), div_sqrt],
395+
{ apply log_two_mul_two_le_sqrt_log_eight.trans,
396+
apply real.sqrt_le_sqrt,
397+
rw log_le_log _ hN₀,
398+
{ exact_mod_cast hN₃ },
399+
{ norm_num } },
400+
exact hN₃.trans_lt' (by norm_num) },
401+
{ exact cast_pos.2 (n_value_pos $ hN₃.trans' $ by norm_num) },
402+
{ exact (rpow_pos_of_pos hN₀ _).ne' },
403+
{ exact div_pos (rpow_pos_of_pos hN₀ _) zero_lt_two },
404+
end
405+
406+
lemma le_N (hN : 2 ≤ N) : (2 * (d_value N) - 1)^(n_value N) ≤ N :=
407+
begin
408+
have : (2 * d_value N - 1)^(n_value N) ≤ (2 * d_value N)^(n_value N) :=
409+
nat.pow_le_pow_of_le_left (nat.sub_le _ _) _,
410+
apply this.trans,
411+
suffices : ((2 * d_value N)^n_value N : ℝ) ≤ N, by exact_mod_cast this,
412+
rw ←rpow_nat_cast,
413+
suffices i : (2 * d_value N : ℝ) ≤ (N : ℝ)^(1/n_value N : ℝ),
414+
{ apply (rpow_le_rpow (mul_nonneg zero_le_two (cast_nonneg _)) i (cast_nonneg _)).trans,
415+
rw [←rpow_mul (cast_nonneg _), one_div_mul_cancel, rpow_one],
416+
rw cast_ne_zero,
417+
apply (n_value_pos hN).ne', },
418+
rw ←le_div_iff',
419+
{ exact floor_le (div_nonneg (rpow_nonneg_of_nonneg (cast_nonneg _) _) zero_le_two) },
420+
apply zero_lt_two
421+
end
422+
423+
lemma bound (hN : 4096 ≤ N) : (N : ℝ)^(1/n_value N : ℝ) / exp 1 < d_value N :=
424+
begin
425+
apply div_lt_floor _,
426+
rw [←log_le_log, log_rpow, mul_comm, ←div_eq_mul_one_div],
427+
{ apply le_trans _ (div_le_div_of_le_left _ _ (ceil_lt_mul _).le),
428+
rw [mul_comm, ←div_div, div_sqrt, le_div_iff],
429+
{ exact le_sqrt_log hN },
430+
{ norm_num1 },
431+
{ apply log_nonneg,
432+
rw one_le_cast,
433+
exact hN.trans' (by norm_num1) },
434+
{ rw [cast_pos, lt_ceil, cast_zero, real.sqrt_pos],
435+
apply log_pos,
436+
rw one_lt_cast,
437+
exact hN.trans_lt' (by norm_num1) },
438+
apply le_sqrt_of_sq_le,
439+
have : ((12 : ℕ) : ℝ) * log 2 ≤ log N,
440+
{ rw [←log_rpow zero_lt_two, log_le_log, rpow_nat_cast],
441+
{ norm_num1,
442+
exact_mod_cast hN },
443+
{ exact rpow_pos_of_pos zero_lt_two _ },
444+
rw cast_pos,
445+
exact hN.trans_lt' (by norm_num1) },
446+
refine le_trans _ this,
447+
simp only [cast_bit0, cast_bit1, cast_one],
448+
rw ←div_le_iff',
449+
{ exact log_two_gt_d9.le.trans' (by norm_num1) },
450+
{ norm_num1 } },
451+
{ rw cast_pos,
452+
exact hN.trans_lt' (by norm_num1) },
453+
{ refine div_pos zero_lt_two _,
454+
rw [sub_pos, div_lt_one (exp_pos _)],
455+
exact lt_of_le_of_lt (by norm_num1) exp_one_gt_d9 },
456+
apply rpow_pos_of_pos,
457+
rw cast_pos,
458+
exact hN.trans_lt' (by norm_num1),
459+
end
460+
461+
lemma roth_lower_bound_explicit (hN : 4096 ≤ N) :
462+
(N : ℝ) * exp (-4 * sqrt (log N)) < roth_number_nat N :=
463+
begin
464+
let n := n_value N,
465+
have hn : 0 < (n : ℝ) := cast_pos.2 (n_value_pos $ hN.trans' $ by norm_num1),
466+
have hd : 0 < d_value N := d_value_pos (hN.trans' $ by norm_num1),
467+
have hN₀ : 0 < (N : ℝ) := cast_pos.2 (hN.trans' $ by norm_num1),
468+
have hn₂ : 2 ≤ n := two_le_n_value (hN.trans' $ by norm_num1),
469+
have : (2 * d_value N - 1)^n ≤ N := le_N (hN.trans' $ by norm_num1),
470+
refine ((bound_aux hd.ne' hn₂).trans $ cast_le.2 $ roth_number_nat.mono this).trans_lt' _,
471+
refine (div_lt_div_of_lt hn $ pow_lt_pow_of_lt_left (bound hN) _ _).trans_le' _,
472+
{ exact div_nonneg (rpow_nonneg_of_nonneg (cast_nonneg _) _) (exp_pos _).le },
473+
{ exact tsub_pos_of_lt (three_le_n_value $ hN.trans' $ by norm_num1) },
474+
rw [←rpow_nat_cast, div_rpow (rpow_nonneg_of_nonneg hN₀.le _) (exp_pos _).le, ←rpow_mul hN₀.le,
475+
mul_comm (_ / _), mul_one_div, cast_sub hn₂, cast_two, same_sub_div hn.ne', exp_one_rpow,
476+
div_div, rpow_sub hN₀, rpow_one, div_div, div_eq_mul_inv],
477+
refine mul_le_mul_of_nonneg_left _ (cast_nonneg _),
478+
rw [mul_inv, mul_inv, ←exp_neg, ←rpow_neg (cast_nonneg _), neg_sub, ←div_eq_mul_inv],
479+
have : exp ((-4) * sqrt (log N)) = exp (-2 * sqrt (log N)) * exp (-2 * sqrt (log N)),
480+
{ rw [←exp_add, ←add_mul],
481+
norm_num },
482+
rw this,
483+
refine (mul_le_mul _ (exp_neg_two_mul_le $ real.sqrt_pos.2 $ log_pos _).le (exp_pos _).le $
484+
rpow_nonneg_of_nonneg (cast_nonneg _) _),
485+
{ rw [←le_log_iff_exp_le (rpow_pos_of_pos hN₀ _), log_rpow hN₀, ←le_div_iff, mul_div_assoc,
486+
div_sqrt, neg_mul, neg_le_neg_iff, div_mul_eq_mul_div, div_le_iff hn],
487+
{ exact mul_le_mul_of_nonneg_left (le_ceil _) zero_le_two },
488+
refine real.sqrt_pos.2 (log_pos _),
489+
rw one_lt_cast,
490+
exact hN.trans_lt' (by norm_num1) },
491+
{ rw one_lt_cast,
492+
exact hN.trans_lt' (by norm_num1) }
493+
end
494+
495+
lemma exp_four_lt : exp 4 < 64 :=
496+
begin
497+
rw [show (64 : ℝ) = 2 ^ ((6 : ℕ) : ℝ), by norm_num1,
498+
←lt_log_iff_exp_lt (rpow_pos_of_pos zero_lt_two _), log_rpow zero_lt_two, ←div_lt_iff'],
499+
exact log_two_gt_d9.trans_le' (by norm_num1),
500+
norm_num
501+
end
502+
503+
lemma four_zero_nine_six_lt_exp_sixteen : 4096 < exp 16 :=
504+
begin
505+
rw [←log_lt_iff_lt_exp (show (0 : ℝ) < 4096, by norm_num), show (4096 : ℝ) = 2 ^ 12, by norm_num,
506+
←rpow_nat_cast, log_rpow zero_lt_two, cast_bit0, cast_bit0, cast_bit1, cast_one],
507+
linarith [log_two_lt_d9],
508+
end
509+
510+
lemma lower_bound_le_one' (hN : 2 ≤ N) (hN' : N ≤ 4096) : (N : ℝ) * exp (-4 * sqrt (log N)) ≤ 1 :=
511+
begin
512+
rw [←log_le_log (mul_pos (cast_pos.2 (zero_lt_two.trans_le hN)) (exp_pos _)) zero_lt_one,
513+
log_one, log_mul (cast_pos.2 (zero_lt_two.trans_le hN)).ne' (exp_pos _).ne', log_exp,
514+
neg_mul, ←sub_eq_add_neg, sub_nonpos, ←div_le_iff (real.sqrt_pos.2 $ log_pos $
515+
one_lt_cast.2 $ one_lt_two.trans_le hN), div_sqrt, sqrt_le_left
516+
(zero_le_bit0.2 zero_le_two), log_le_iff_le_exp (cast_pos.2 (zero_lt_two.trans_le hN))],
517+
norm_num1,
518+
apply le_trans _ four_zero_nine_six_lt_exp_sixteen.le,
519+
exact_mod_cast hN',
520+
end
521+
522+
lemma lower_bound_le_one (hN : 1 ≤ N) (hN' : N ≤ 4096) : (N : ℝ) * exp (-4 * sqrt (log N)) ≤ 1 :=
523+
begin
524+
obtain rfl | hN := hN.eq_or_lt,
525+
{ norm_num },
526+
{ exact lower_bound_le_one' hN hN' }
527+
end
528+
529+
lemma roth_lower_bound : (N : ℝ) * exp (-4 * sqrt (log N)) ≤ roth_number_nat N :=
530+
begin
531+
obtain rfl | hN := nat.eq_zero_or_pos N,
532+
{ norm_num },
533+
obtain h₁ | h₁ := le_or_lt 4096 N,
534+
{ exact (roth_lower_bound_explicit h₁).le },
535+
{ apply (lower_bound_le_one hN h₁.le).trans,
536+
simpa using roth_number_nat.monotone hN }
537+
end
538+
199539
end behrend

0 commit comments

Comments
 (0)