File size: 2,211 Bytes
4a56cd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | import Mathlib
namespace OAI
namespace Problem367
open Filter Topology
theorem le_one_of_pow_le_affine {q a c : β}
(h : β n : β, q ^ n β€ a + c * (n : β)) : q β€ 1 := by
by_contra hq
have hq1 : 1 < q := lt_of_not_ge hq
have hq0 : 0 < q := lt_trans zero_lt_one hq1
have hconst : Tendsto (fun n : β => a / q ^ n) atTop (π 0) := by
simpa [div_eq_mul_inv] using (tendsto_pow_const_div_const_pow_of_one_lt 0 hq1).const_mul a
have hlinear : Tendsto (fun n : β => c * ((n : β) / q ^ n)) atTop (π 0) := by
simpa using (tendsto_pow_const_div_const_pow_of_one_lt 1 hq1).const_mul c
have hlim : Tendsto (fun n : β => (a + c * (n : β)) / q ^ n)
atTop (π 0) := by
simpa [add_div, mul_div_assoc] using hconst.add hlinear
have hfalse : (1 : β) β€ 0 := ge_of_tendsto' hlim fun n => by
exact (le_div_iffβ (pow_pos hq0 n)).2 (by simpa using h n)
exact (not_le_of_gt zero_lt_one) hfalse
theorem le_inv_sqrt_of_normalized_pow_bound {theta b a c : β} (hb : 0 < b)
(h : β n : β, (theta * Real.sqrt b) ^ n β€ a + c * (n : β)) :
theta β€ 1 / Real.sqrt b := by
apply (le_div_iffβ (Real.sqrt_pos.2 hb)).2
exact le_one_of_pow_le_affine h
theorem le_inv_sqrt_of_pow_bound {theta b a c : β} (hb : 0 < b)
(h : β n : β,
theta ^ n β€ (a + c * (n : β)) * (Real.sqrt b)β»ΒΉ ^ n) :
theta β€ 1 / Real.sqrt b := by
apply le_inv_sqrt_of_normalized_pow_bound hb
intro n
rw [mul_pow]
calc
theta ^ n * Real.sqrt b ^ n β€
((a + c * (n : β)) * (Real.sqrt b)β»ΒΉ ^ n) * Real.sqrt b ^ n :=
mul_le_mul_of_nonneg_right (h n) (pow_nonneg (Real.sqrt_nonneg b) n)
_ = a + c * (n : β) := by
rw [mul_assoc, β mul_pow, inv_mul_cancelβ (Real.sqrt_pos.2 hb).ne',
one_pow, mul_one]
theorem threshold_of_bsv_pow_bound {d : β} {theta : β} (hd : 3 β€ d)
(h : β n : β,
theta ^ n β€ (1 + (((d : β) - 2) / (d : β)) * (n : β)) *
(Real.sqrt ((d : β) - 1))β»ΒΉ ^ n) :
theta β€ 1 / Real.sqrt ((d : β) - 1) := by
have hd' : (3 : β) β€ (d : β) := by exact_mod_cast hd
exact le_inv_sqrt_of_pow_bound (by linarith) h
end Problem367
end OAI
|