Download data/lean/OAI/Algebra/DepthFive/AnalyticParameters.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 7.2 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/DepthFive/AnalyticParameters.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/DepthFive/AnalyticParameters.lean
-
curl -L -o AnalyticParameters.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/DepthFive/AnalyticParameters.lean
7.2 kB
| import OAI.Algebra.DepthFive.LowerParameters | |
| namespace OAI | |
| /-! Rounded analytic parameters used by the lower-bound rank measure. -/ | |
| noncomputable section | |
| namespace Problem335.LowerParameters | |
| def a0 (n : β) : β := (v n : β) / (Real.sqrt (n : β) - 1) | |
| def a (n : β) : β := βa0 nββ | |
| def alpha (n : β) : β := (a n : β) / ((a n : β) + (v n : β)) | |
| def b0 (n : β) : β := (u n : β) * (alpha n) ^ (rho n) / (1 - (alpha n) ^ (rho n)) | |
| def b (n : β) : β := βb0 nββ | |
| def beta (n : β) : β := (b n : β) / ((b n : β) + (u n : β)) | |
| def q (n : β) : β := (alpha n) ^ ((1 + rho n) / 2) | |
| theorem sqrt_ge_two {n : β} (hn : 4 β€ n) : 2 β€ Real.sqrt (n : β) := by | |
| apply (Real.le_sqrt (by norm_num) (by positivity)).mpr | |
| exact_mod_cast hn | |
| theorem a0_pos {n : β} (hn : 4 β€ n) : 0 < a0 n := by | |
| unfold a0 | |
| apply div_pos | |
| Β· exact_mod_cast v_pos hn | |
| Β· have := sqrt_ge_two hn | |
| linarith | |
| theorem a_pos {n : β} (hn : 4 β€ n) : 0 < a n := by | |
| exact Nat.ceil_pos.mpr (a0_pos hn) | |
| theorem a0_le_a (n : β) : a0 n β€ (a n : β) := Nat.le_ceil _ | |
| theorem a_lt_a0_add_one {n : β} (hn : 4 β€ n) : (a n : β) < a0 n + 1 := | |
| Nat.ceil_lt_add_one (a0_pos hn).le | |
| theorem alpha_pos {n : β} (hn : 4 β€ n) : 0 < alpha n := by | |
| have ha : (0 : β) < a n := by exact_mod_cast a_pos hn | |
| unfold alpha | |
| positivity | |
| theorem alpha_lt_one {n : β} (hn : 4 β€ n) : alpha n < 1 := by | |
| have hv : (0 : β) < v n := by exact_mod_cast v_pos hn | |
| unfold alpha | |
| apply (div_lt_one (by positivity)).mpr | |
| linarith | |
| theorem inv_sqrt_le_alpha {n : β} (hn : 4 β€ n) : | |
| (Real.sqrt (n : β))β»ΒΉ β€ alpha n := by | |
| have hr := sqrt_ge_two hn | |
| have ha : (0 : β) < a n := by exact_mod_cast a_pos hn | |
| have hv : (0 : β) < v n := by exact_mod_cast v_pos hn | |
| have hround := a0_le_a n | |
| have hmul : (v n : β) β€ (a n : β) * (Real.sqrt (n : β) - 1) := | |
| (div_le_iffβ (by linarith)).mp hround | |
| rw [inv_eq_one_div, alpha] | |
| apply (div_le_div_iffβ (by linarith) (by positivity)).mpr | |
| nlinarith | |
| theorem inv_alpha_le_sqrt {n : β} (hn : 4 β€ n) : | |
| (alpha n)β»ΒΉ β€ Real.sqrt (n : β) := by | |
| have ha := alpha_pos hn | |
| have hs := sqrt_ge_two hn | |
| have h := inv_sqrt_le_alpha hn | |
| calc | |
| (alpha n)β»ΒΉ β€ ((Real.sqrt (n : β))β»ΒΉ)β»ΒΉ := | |
| (inv_le_invβ ha (inv_pos.mpr (by linarith))).mpr h | |
| _ = _ := inv_inv _ | |
| theorem k_mul_n_le_a0 {n : β} (hn : 4 β€ n) : | |
| (k n : β) * (n : β) β€ a0 n := by | |
| have hr := sqrt_ge_two hn | |
| have hn' : (4 : β) β€ n := by exact_mod_cast hn | |
| have hsq := Real.sq_sqrt (show (0 : β) β€ n by positivity) | |
| have hbound : Real.sqrt (n : β) - 1 β€ (n : β) := by nlinarith | |
| unfold a0 | |
| apply (le_div_iffβ (by linarith)).mpr | |
| have h := mul_le_mul_of_nonneg_left hbound | |
| (show 0 β€ (k n : β) * (n : β) by positivity) | |
| simpa [v, Nat.cast_mul, Nat.cast_pow, pow_two, mul_assoc] using h | |
| theorem k_mul_n_le_a {n : β} (hn : 4 β€ n) : k n * n β€ a n := by | |
| have h := (k_mul_n_le_a0 hn).trans (a0_le_a n) | |
| exact_mod_cast h | |
| theorem k_le_a {n : β} (hn : 4 β€ n) : k n β€ a n := by | |
| exact (Nat.le_mul_of_pos_right _ (by omega)).trans (k_mul_n_le_a hn) | |
| theorem four_mul_n_le_a {n : β} (hn : 16 β€ n) : 4 * n β€ a n := by | |
| have hk := three_mul_n_le_eight_mul_k hn | |
| have hka := k_mul_n_le_a (show 4 β€ n by omega) | |
| have hk4 : 4 β€ k n := by omega | |
| exact (Nat.mul_le_mul_right n hk4).trans hka | |
| theorem alpha_rpow_rho_pos {n : β} (hn : 4 β€ n) : | |
| 0 < (alpha n) ^ (rho n) := Real.rpow_pos_of_pos (alpha_pos hn) _ | |
| theorem alpha_rpow_rho_lt_one {n : β} (hn : 4 β€ n) : | |
| (alpha n) ^ (rho n) < 1 := | |
| Real.rpow_lt_one (alpha_pos hn).le (alpha_lt_one hn) (rho_pos hn) | |
| theorem alpha_le_alpha_rpow_rho {n : β} (hn : 4 β€ n) : | |
| alpha n β€ (alpha n) ^ (rho n) := | |
| Real.self_le_rpow_of_le_one (alpha_pos hn).le (alpha_lt_one hn).le (rho_lt_one hn).le | |
| theorem b0_pos {n : β} (hn : 4 β€ n) : 0 < b0 n := by | |
| have hu : (0 : β) < u n := by exact_mod_cast u_pos hn | |
| have hp := alpha_rpow_rho_pos hn | |
| have hp1 := alpha_rpow_rho_lt_one hn | |
| unfold b0 | |
| positivity | |
| theorem b_pos {n : β} (hn : 4 β€ n) : 0 < b n := | |
| Nat.ceil_pos.mpr (b0_pos hn) | |
| theorem b0_le_b (n : β) : b0 n β€ (b n : β) := Nat.le_ceil _ | |
| theorem b_lt_b0_add_one {n : β} (hn : 4 β€ n) : (b n : β) < b0 n + 1 := | |
| Nat.ceil_lt_add_one (b0_pos hn).le | |
| theorem beta_pos {n : β} (hn : 4 β€ n) : 0 < beta n := by | |
| have hb : (0 : β) < b n := by exact_mod_cast b_pos hn | |
| unfold beta | |
| positivity | |
| theorem beta_lt_one {n : β} (hn : 4 β€ n) : beta n < 1 := by | |
| have hu : (0 : β) < u n := by exact_mod_cast u_pos hn | |
| unfold beta | |
| apply (div_lt_one (by positivity)).mpr | |
| linarith | |
| theorem alpha_rpow_rho_le_beta {n : β} (hn : 4 β€ n) : | |
| (alpha n) ^ (rho n) β€ beta n := by | |
| have hu : (0 : β) < u n := by exact_mod_cast u_pos hn | |
| have hp := alpha_rpow_rho_lt_one hn | |
| have hround := b0_le_b n | |
| have hmul : (u n : β) * (alpha n) ^ (rho n) β€ | |
| (b n : β) * (1 - (alpha n) ^ (rho n)) := | |
| (div_le_iffβ (by linarith)).mp hround | |
| rw [beta] | |
| apply (le_div_iffβ (by positivity)).mpr | |
| nlinarith | |
| theorem a_le_b0 {n : β} (hn : 4 β€ n) : (a n : β) β€ b0 n := by | |
| have hap := alpha_pos hn | |
| have ha : (0 : β) < a n := by exact_mod_cast a_pos hn | |
| have hv : (0 : β) < v n := by exact_mod_cast v_pos hn | |
| have hu : (v n : β) β€ u n := by | |
| have hkm : k n β€ m n := (k_lt_m hn).le | |
| exact_mod_cast Nat.mul_le_mul_right (n ^ 2) hkm | |
| have hp := alpha_rpow_rho_pos hn | |
| have hp1 := alpha_rpow_rho_lt_one hn | |
| have hal := alpha_le_alpha_rpow_rho hn | |
| have heq : (a n : β) * (1 - alpha n) = (v n : β) * alpha n := by | |
| unfold alpha | |
| field_simp | |
| ring | |
| unfold b0 | |
| apply (le_div_iffβ (by linarith)).mpr | |
| calc | |
| (a n : β) * (1 - (alpha n) ^ (rho n)) β€ (a n : β) * (1 - alpha n) := by | |
| gcongr | |
| _ = (v n : β) * alpha n := heq | |
| _ β€ (u n : β) * (alpha n) ^ (rho n) := | |
| mul_le_mul hu hal hap.le (by positivity) | |
| theorem a_le_b {n : β} (hn : 4 β€ n) : a n β€ b n := by | |
| exact_mod_cast (a_le_b0 hn).trans (b0_le_b n) | |
| theorem four_mul_n_le_b {n : β} (hn : 16 β€ n) : 4 * n β€ b n := | |
| (four_mul_n_le_a hn).trans (a_le_b (by omega)) | |
| theorem q_pos {n : β} (hn : 4 β€ n) : 0 < q n := | |
| Real.rpow_pos_of_pos (alpha_pos hn) _ | |
| theorem q_lt_one {n : β} (hn : 4 β€ n) : q n < 1 := by | |
| have hr := rho_pos hn | |
| exact Real.rpow_lt_one (alpha_pos hn).le (alpha_lt_one hn) (by linarith) | |
| theorem alpha_le_q {n : β} (hn : 4 β€ n) : alpha n β€ q n := by | |
| have hr := rho_lt_one hn | |
| exact Real.self_le_rpow_of_le_one (alpha_pos hn).le (alpha_lt_one hn).le (by linarith) | |
| theorem q_le_alpha_rpow_rho {n : β} (hn : 4 β€ n) : | |
| q n β€ (alpha n) ^ (rho n) := by | |
| have hr := rho_lt_one hn | |
| exact Real.rpow_le_rpow_of_exponent_ge (alpha_pos hn) (alpha_lt_one hn).le (by linarith) | |
| theorem q_le_beta {n : β} (hn : 4 β€ n) : q n β€ beta n := | |
| (q_le_alpha_rpow_rho hn).trans (alpha_rpow_rho_le_beta hn) | |
| theorem inv_sqrt_le_q {n : β} (hn : 4 β€ n) : (Real.sqrt (n : β))β»ΒΉ β€ q n := | |
| (inv_sqrt_le_alpha hn).trans (alpha_le_q hn) | |
| end Problem335.LowerParameters | |
| end | |
| end OAI | |