Download data/lean/OAI/LinearAlgebra/MatrixFields/Entropy/ComplexPolynomialPowerGrowth.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.57 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixFields/Entropy/ComplexPolynomialPowerGrowth.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/LinearAlgebra/MatrixFields/Entropy/ComplexPolynomialPowerGrowth.lean
-
curl -L -o ComplexPolynomialPowerGrowth.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixFields/Entropy/ComplexPolynomialPowerGrowth.lean
3.57 kB
| import Mathlib | |
| namespace OAI | |
| namespace MatrixAllFields | |
| open scoped BigOperators Topology Polynomial | |
| noncomputable section | |
| open Filter | |
| open scoped Topology | |
| namespace MatrixMultiplication.Foundation | |
| theorem tendsto_affine_mul_geometric_zero (D C : β) {q : β} | |
| (hq : 0 β€ q) (hq_one : q < 1) : | |
| Tendsto (fun n : β => (D * (n : β) + C) * q ^ n) atTop (π 0) := by | |
| have hlinear := (tendsto_self_mul_const_pow_of_lt_one hq hq_one).const_mul D | |
| have hconstant := (tendsto_pow_atTop_nhds_zero_of_lt_one hq hq_one).const_mul C | |
| simpa only [mul_zero, add_zero, add_mul, mul_assoc] using hlinear.add hconstant | |
| theorem eventually_affine_mul_pow_le_pow (D C : β) {r s : β} | |
| (hr : 0 β€ r) (hrs : r < s) : | |
| βαΆ n : β in atTop, (D * (n : β) + C) * r ^ n β€ s ^ n := by | |
| have hs : 0 < s := hr.trans_lt hrs | |
| have hratio : 0 β€ r / s := div_nonneg hr hs.le | |
| have hratio_one : r / s < 1 := (div_lt_one hs).2 hrs | |
| have hsmall := | |
| (tendsto_affine_mul_geometric_zero D C hratio hratio_one).eventually_lt_const | |
| (show (0 : β) < 1 from zero_lt_one) | |
| filter_upwards [hsmall] with n hn | |
| rw [div_pow, β mul_div_assoc] at hn | |
| exact ((div_lt_iffβ (pow_pos hs n)).1 hn).le.trans_eq (one_mul _) | |
| theorem eventually_affine_mul_pow_le_add_pow (D C : β) {r Ξ΅ : β} | |
| (hr : 0 β€ r) (hΞ΅ : 0 < Ξ΅) : | |
| βαΆ n : β in atTop, (D * (n : β) + C) * r ^ n β€ (r + Ξ΅) ^ n := | |
| eventually_affine_mul_pow_le_pow D C hr (lt_add_of_pos_right r hΞ΅) | |
| theorem power_le_of_eventually_pow_le_affine_mul_pow {a r D C : β} | |
| (hr : 0 β€ r) | |
| (h : βαΆ n : β in atTop, a ^ n β€ (D * (n : β) + C) * r ^ n) : | |
| a β€ r := by | |
| by_contra hnot | |
| have hra : r < a := lt_of_not_ge hnot | |
| have ha : 0 < a := hr.trans_lt hra | |
| have hratio : 0 β€ r / a := div_nonneg hr ha.le | |
| have hratio_one : r / a < 1 := (div_lt_one ha).2 hra | |
| have hsmall := | |
| (tendsto_affine_mul_geometric_zero D C hratio hratio_one).eventually_lt_const | |
| (show (0 : β) < 1 from zero_lt_one) | |
| rcases (h.and hsmall).exists with β¨n, hbound, hltβ© | |
| have hge : (1 : β) β€ (D * (n : β) + C) * (r / a) ^ n := by | |
| rw [div_pow, β mul_div_assoc] | |
| exact (le_div_iffβ (pow_pos ha n)).2 (by simpa only [one_mul] using hbound) | |
| exact (not_lt_of_ge hge) hlt | |
| theorem power_le_of_forall_pow_le_affine_mul_pow {a r D C : β} | |
| (hr : 0 β€ r) | |
| (h : β n : β, 0 < n β a ^ n β€ (D * (n : β) + C) * r ^ n) : | |
| a β€ r := by | |
| apply power_le_of_eventually_pow_le_affine_mul_pow hr | |
| exact eventually_atTop.2 β¨1, fun n hn => h n (Nat.zero_lt_one.trans_le hn)β© | |
| theorem power_le_of_forall_pow_le_mul_pow {a r C : β} | |
| (hr : 0 β€ r) (h : β n : β, 0 < n β a ^ n β€ C * r ^ n) : | |
| a β€ r := by | |
| apply power_le_of_forall_pow_le_affine_mul_pow (D := 0) (C := C) hr | |
| simpa only [zero_mul, zero_add] using h | |
| theorem power_le_of_forall_pow_le_linear_mul_pow (D : β) {a r : β} | |
| (hr : 0 β€ r) | |
| (h : β n : β, 0 < n β a ^ n β€ ((D * n + 1 : β) : β) * r ^ n) : | |
| a β€ r := by | |
| apply power_le_of_forall_pow_le_affine_mul_pow (D := (D : β)) (C := 1) hr | |
| simpa only [Nat.cast_add, Nat.cast_mul, Nat.cast_one] using h | |
| theorem eventually_linear_mul_pow_le_add_pow (D : β) {r Ξ΅ : β} | |
| (hr : 0 β€ r) (hΞ΅ : 0 < Ξ΅) : | |
| βαΆ n : β in atTop, ((D * n + 1 : β) : β) * r ^ n β€ (r + Ξ΅) ^ n := by | |
| simpa only [Nat.cast_add, Nat.cast_mul, Nat.cast_one] using | |
| eventually_affine_mul_pow_le_add_pow (D : β) 1 hr hΞ΅ | |
| end MatrixMultiplication.Foundation | |
| end | |
| end MatrixAllFields | |
| end OAI | |