File size: 3,734 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 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | import Mathlib.Analysis.SpecialFunctions.Log.Basic
import OAI.NumberTheory.Ostmann.Tree.CellGroupPigeonhole
namespace OAI
/-! # The exact cell-list pigeonhole costs only a fixed exponential in m -/
namespace Ostmann
open Filter
open scoped Classical BigOperators
theorem eventual_cell_group_cost (N r : β) (C z : β)
(hC : 0 β€ C) (hz : 1 β€ z) (hsize : (N + r : β) β€ z) :
βαΆ L : β in atTop, β (B : β) (m : β),
(B + 1 : β) β€ Real.exp (C * L) β z * L β€ 2 * m β
(((N + r + 1) * (max N B + 1) ^ (N + r) : β) : β) β€
Real.exp (2 * (C + 2) * m) := by
filter_upwards [eventually_ge_atTop (max 0 (max (Real.log (N + r + 1 : β))
(Real.log (N + 1 : β))))] with L hL
intro B m hB hm
have hL0 : 0 β€ L := (le_max_left _ _).trans hL
have hLr : Real.log (N + r + 1 : β) β€ L :=
(le_max_left _ _).trans ((le_max_right _ _).trans hL)
have hLN : Real.log (N + 1 : β) β€ L :=
(le_max_right _ _).trans ((le_max_right _ _).trans hL)
have hpref : (N + r + 1 : β) β€ Real.exp L := by
rw [β Real.exp_log (by positivity : (0 : β) < (N + r + 1 : β))]
exact Real.exp_le_exp.mpr hLr
have hN : (N + 1 : β) β€ Real.exp L := by
rw [β Real.exp_log (by positivity : (0 : β) < (N + 1 : β))]
exact Real.exp_le_exp.mpr hLN
have hmax : (max N B + 1 : β) β€ Real.exp ((C + 1) * L) := by
rw [Nat.cast_add, Nat.cast_one, Nat.cast_max, β max_add_add_right]
apply max_le
Β· exact (show (N : β) + 1 β€ Real.exp L from by simpa only [Nat.cast_add, Nat.cast_one] using hN).trans
(Real.exp_le_exp.mpr (by nlinarith only [mul_nonneg hC hL0]))
Β· exact (show (B : β) + 1 β€ Real.exp (C * L) from by simpa only [Nat.cast_add, Nat.cast_one] using hB).trans
(Real.exp_le_exp.mpr (by nlinarith only [hL0]))
calc
_ β€ Real.exp L * (Real.exp ((C + 1) * L)) ^ (N + r) := by
rw [Nat.cast_mul, Nat.cast_pow]
exact mul_le_mul hpref (pow_le_pow_leftβ (Nat.cast_nonneg _) hmax _)
(by positivity) (Real.exp_nonneg _)
_ = Real.exp ((1 + (C + 1) * (N + r : β)) * L) := by
rw [β Real.exp_nat_mul, β Real.exp_add]
congr 1
ring
_ β€ Real.exp ((C + 2) * z * L) := by
apply Real.exp_le_exp.mpr
have hh := mul_le_mul_of_nonneg_left hsize (by linarith : 0 β€ C + 1)
have hcoef : 1 + (C + 1) * (N + r : β) β€ (C + 2) * z := by nlinarith only [hh, hz]
exact mul_le_mul_of_nonneg_right hcoef hL0
_ β€ _ := Real.exp_le_exp.mpr (by
have hh := mul_le_mul_of_nonneg_left hm (by linarith : 0 β€ C + 2)
nlinarith only [hh])
/-- The endpoint count after fixing all cell lists keeps an explicit
exponential rate, with no dependence on the number of fixed labels in it. -/
theorem cell_group_endpoint_rate (e s : β) (F X A B m : β)
(hcount : (e : β) β€ F * s) (hF : F β€ Real.exp (B * m))
(he : Real.sqrt X * Real.exp (-A * m) β€ e) :
Real.sqrt X * Real.exp (-(A + B) * m) β€ s := by
have hb : Real.sqrt X * Real.exp (-A * m) β€ Real.exp (B * m) * s :=
he.trans (hcount.trans (mul_le_mul_of_nonneg_right hF (Nat.cast_nonneg s)))
have hh := mul_le_mul_of_nonneg_left hb (Real.exp_nonneg (-B * m))
have hid : Real.exp (-B * m) * (Real.exp (B * m) * (s : β)) = s := by
rw [β mul_assoc, β Real.exp_add, show -B * m + B * m = 0 by ring, Real.exp_zero, one_mul]
rw [hid] at hh
calc
_ = Real.exp (-B * m) * (Real.sqrt X * Real.exp (-A * m)) := by
calc
_ = Real.sqrt X * (Real.exp (-B * m) * Real.exp (-A * m)) := by
rw [β Real.exp_add]
congr 1
congr 1
ring
_ = _ := by ring
_ β€ _ := hh
end Ostmann
end OAI
|