File size: 2,143 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 | import OAI.Algorithms.SubexponentialSAT.LeanCompat
import OAI.Algorithms.SubexponentialSAT.SqrtLog.AsymptoticLayoutRate
namespace OAI.Algorithms
namespace SubexponentialSAT.SqrtLog.Asymptotic
open Filter
open scoped Topology
theorem eventually_layout_small_grid :
βαΆ n : β in atTop, 16 * layoutQ n * layoutR n ^ 2 β€ n := by
filter_upwards [eventually_L_power_le_n 3 (show (0 : β) < 16 by norm_num)] with n hn
have hnat : 16 * L n ^ 3 β€ n := by exact_mod_cast hn
have hQ : layoutQ n β€ L n := Nat.div_le_self _ _
have hr := layoutR_le_L n
calc
16 * layoutQ n * layoutR n ^ 2 β€ 16 * L n * L n ^ 2 := by gcongr
_ = 16 * L n ^ 3 := by ring
_ β€ n := hnat
theorem eventually_layout_large_grid (a b : β β β) (q : β)
(ha : βαΆ n : β in atTop, a n β€ L n ^ q)
(hb : βαΆ n : β in atTop, b n β€ L n ^ q) :
βαΆ n : β in atTop,
4096 * (b n + a n) * b n ^ 2 * layoutR n ^ 2 * L n ^ 4 *
(layoutR n ^ (2 * layoutQ n)) ^ 2 β€ n := by
let f (n : β) : β := 4096 * ((b n : β) + a n) * (b n : β) ^ 2 *
(layoutR n : β) ^ 2 * (L n : β) ^ 4
have hf : βαΆ n : β in atTop, f n β€ 8192 * (L n : β) ^ (3 * q + 6) := by
filter_upwards [ha, hb] with n han hbn
have ha' : (a n : β) β€ (L n : β) ^ q := by exact_mod_cast han
have hb' : (b n : β) β€ (L n : β) ^ q := by exact_mod_cast hbn
have hr : (layoutR n : β) β€ L n := by exact_mod_cast layoutR_le_L n
calc
f n β€ 4096 * ((L n : β) ^ q + (L n : β) ^ q) * ((L n : β) ^ q) ^ 2 *
(L n : β) ^ 2 * (L n : β) ^ 4 := by dsimp [f]; gcongr
_ = 8192 * (L n : β) ^ (3 * q + 6) := by
simp only [pow_add, pow_mul]
ring
have h := eventually_polylog_grid_le_n f (3 * q + 6)
(show (0 : β) < 8192 by norm_num) (by intro n; dsimp [f]; positivity) hf
filter_upwards [h] with n hn
have heq : (layoutR n ^ (2 * layoutQ n)) ^ 2 = layoutR n ^ (4 * layoutQ n) := by
rw [β pow_mul]
congr 1
omega
rw [heq]
dsimp [f] at hn
exact_mod_cast hn
end SubexponentialSAT.SqrtLog.Asymptotic
end OAI.Algorithms
|