Download data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/AsymptoticLayoutLabels.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.81 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/AsymptoticLayoutLabels.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/AsymptoticLayoutLabels.lean
-
curl -L -o AsymptoticLayoutLabels.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algorithms/SubexponentialSAT/SqrtLog/AsymptoticLayoutLabels.lean
3.81 kB
| import OAI.Algorithms.SubexponentialSAT.LeanCompat | |
| import OAI.Algorithms.SubexponentialSAT.SqrtLog.AsymptoticLayoutRate | |
| namespace OAI.Algorithms | |
| namespace SubexponentialSAT.SqrtLog.Asymptotic | |
| open Filter | |
| open scoped Topology | |
| private theorem label_log_bound (N B Q : β) (R : β) | |
| (hN : 1 β€ N) (hB : 1 β€ B) (hQ : 1 β€ Q) : | |
| Real.log (4 * N * B * (8 * Q) ^ (2 * R) + 1) β€ | |
| 7 + Real.log N + Real.log B + (2 * R : β) * (7 + Real.log Q) := by | |
| have hN0 : 0 < N := by linarith | |
| have hB0 : 0 < B := by linarith | |
| have hQ0 : 0 < Q := by linarith | |
| have hp : 1 β€ (8 * Q) ^ (2 * R) := one_le_powβ (by linarith) | |
| have hz : 1 β€ 4 * N * B * (8 * Q) ^ (2 * R) := by | |
| have hNB := one_le_mul_of_one_le_of_one_le hN hB | |
| have hNBp := one_le_mul_of_one_le_of_one_le hNB hp | |
| nlinarith | |
| have hlog8 : Real.log 8 β€ 7 := by | |
| have h := Real.log_le_sub_one_of_pos (by norm_num : (0 : β) < 8) | |
| linarith | |
| calc | |
| Real.log (4 * N * B * (8 * Q) ^ (2 * R) + 1) β€ | |
| Real.log (8 * N * B * (8 * Q) ^ (2 * R)) := | |
| Real.log_le_log (by positivity) (by nlinarith) | |
| _ = Real.log 8 + Real.log N + Real.log B + | |
| (2 * R : β) * (Real.log 8 + Real.log Q) := by | |
| simp [Real.log_mul, Real.log_pow, hN0.ne', hB0.ne', hQ0.ne'] | |
| _ β€ 7 + Real.log N + Real.log B + (2 * R : β) * (7 + Real.log Q) := by gcongr | |
| theorem eventually_layout_label_log (b : β β β) (q : β) | |
| (hb : βαΆ n : β in atTop, 1 β€ b n β§ b n β€ L n ^ q) : | |
| βαΆ n : β in atTop, | |
| Real.log (4 * (n : β) * b n * (8 * (layoutQ n : β)) ^ | |
| (2 * layoutCutoff n (b n)) + 1) β€ 4 * (L n : β) ^ 2 := by | |
| have hbp : βαΆ n : β in atTop, b n β€ L n ^ q := hb.mono fun _ h => h.2 | |
| filter_upwards [hb, eventually_layout_fits b q hbp, eventually_layoutQ_ge 1, | |
| eventually_L_ge (max 16 q), eventually_ge_atTop (1 : β)] with n hbn hfit hQ hL hn | |
| have hL16 : (16 : β) β€ L n := by exact_mod_cast (le_max_left 16 q).trans hL | |
| have hqL : (q : β) β€ L n := by exact_mod_cast (le_max_right 16 q).trans hL | |
| have hN : (1 : β) β€ n := by exact_mod_cast hn | |
| have hB : (1 : β) β€ b n := by exact_mod_cast hbn.1 | |
| have hQ' : (1 : β) β€ layoutQ n := by exact_mod_cast hQ | |
| have hR : (layoutCutoff n (b n) : β) β€ L n := by | |
| have hQle : layoutQ n β€ L n := Nat.div_le_self _ _ | |
| exact_mod_cast (show layoutCutoff n (b n) β€ L n by omega) | |
| have hLn : Real.log (n : β) β€ L n := by | |
| calc | |
| Real.log (n : β) β€ Real.log ((n : β) + 16) := Real.log_le_log (by linarith) (by linarith) | |
| _ β€ logSize n := (logSize_natural_bounds n).1 | |
| _ β€ L n := (logSize_lt_L n).le | |
| have hLL : Real.log (L n : β) β€ L n := by | |
| have h := Real.log_le_sub_one_of_pos (by linarith : (0 : β) < L n) | |
| linarith | |
| have hLB : Real.log (b n : β) β€ (q : β) * (L n : β) := by | |
| calc | |
| Real.log (b n : β) β€ Real.log ((L n : β) ^ q) := | |
| Real.log_le_log (by linarith) (by exact_mod_cast hbn.2) | |
| _ = (q : β) * Real.log (L n : β) := Real.log_pow _ _ | |
| _ β€ (q : β) * (L n : β) := mul_le_mul_of_nonneg_left hLL (Nat.cast_nonneg q) | |
| have hLQ : Real.log (layoutQ n : β) β€ L n := by | |
| calc | |
| Real.log (layoutQ n : β) β€ Real.log (L n : β) := | |
| Real.log_le_log (by linarith) (by exact_mod_cast Nat.div_le_self (L n) (layoutDen n)) | |
| _ β€ L n := hLL | |
| have hmain := label_log_bound (n : β) (b n : β) (layoutQ n : β) | |
| (layoutCutoff n (b n)) hN hB hQ' | |
| have hprod : (2 * layoutCutoff n (b n) : β) * (7 + Real.log (layoutQ n : β)) β€ | |
| 2 * (L n : β) * (7 + (L n : β)) := by | |
| push_cast | |
| gcongr | |
| have hqb := mul_le_mul_of_nonneg_right hqL (show (0 : β) β€ L n by positivity) | |
| nlinarith | |
| end SubexponentialSAT.SqrtLog.Asymptotic | |
| end OAI.Algorithms | |