Download data/lean/OAI/Algebra/DepthFive/DimensionCorrection.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 4.95 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/DepthFive/DimensionCorrection.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Algebra/DepthFive/DimensionCorrection.lean
-
curl -L -o DimensionCorrection.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Algebra/DepthFive/DimensionCorrection.lean
4.95 kB
| import OAI.Algebra.DepthFive.BinomialRatios | |
| namespace OAI | |
| namespace Problem335 | |
| /-- A uniform Bernoulli bound for the rounding correction in the descending | |
| homogeneous-space dimension ratio. -/ | |
| theorem inverse_one_sub_pow_le_two (N : β) (I : β) | |
| (hN : 1 β€ N) (hI : 2 * (I : β) β€ N) : | |
| ((1 - 1 / N) ^ I)β»ΒΉ β€ 2 := by | |
| have hNpos : 0 < N := by linarith | |
| have hinv : 1 / N β€ 1 := (div_le_one hNpos).2 hN | |
| have hber := one_add_mul_le_pow (a := -(1 / N)) (by linarith : -2 β€ -(1 / N)) I | |
| have hfrac : (I : β) / N β€ 1 / 2 := (div_le_iffβ hNpos).2 (by linarith) | |
| have hhalf : (1 / 2 : β) β€ (1 - 1 / N) ^ I := by | |
| simp only [mul_neg, mul_one_div, β sub_eq_add_neg] at hber | |
| nlinarith | |
| have hpow : 0 < (1 - 1 / N) ^ I := lt_of_lt_of_le (by norm_num) hhalf | |
| rw [inv_eq_one_div] | |
| apply (div_le_iffβ hpow).2 | |
| linarith | |
| /-- Real-exponent version of the preceding natural-power estimate. -/ | |
| theorem one_sub_rpow_neg_nat_le_two (N : β) (I : β) | |
| (hN : 1 β€ N) (hI : 2 * (I : β) β€ N) : | |
| (1 - 1 / N) ^ (-(I : β)) β€ 2 := by | |
| have hbase : 0 β€ 1 - 1 / N := by | |
| have hNpos : 0 < N := by linarith | |
| have := (div_le_one hNpos).2 hN | |
| linarith | |
| rw [Real.rpow_neg hbase, Real.rpow_natCast] | |
| exact inverse_one_sub_pow_le_two N I hN hI | |
| /-- Rounding loss and the balanced multiplication cost combine into one | |
| absolute-discrepancy exponent. -/ | |
| theorem corrected_ratio_product_le (Ξ± Ξ² N Ο : β) (I J : β) | |
| (hΞ± : 0 < Ξ±) (hΞ² : Ξ± ^ Ο β€ Ξ²) | |
| (hN : 1 β€ N) (hI : 2 * (I : β) β€ N) : | |
| (Ξ± / (1 - 1 / N)) ^ I * Ξ² ^ (-(J : β)) β€ | |
| 2 * Ξ± ^ ((I : β) - Ο * J) := by | |
| have hΞ²pos : 0 < Ξ² := lt_of_lt_of_le (Real.rpow_pos_of_pos hΞ± _) hΞ² | |
| have hdown : (Ξ± / (1 - 1 / N)) ^ I β€ 2 * Ξ± ^ I := by | |
| rw [div_pow, div_eq_mul_inv] | |
| have := mul_le_mul_of_nonneg_left (inverse_one_sub_pow_le_two N I hN hI) | |
| (pow_nonneg hΞ±.le I) | |
| simpa only [mul_comm] using this | |
| have hup := Real.rpow_le_rpow_of_nonpos (Real.rpow_pos_of_pos hΞ± Ο) hΞ² | |
| (neg_nonpos.mpr (Nat.cast_nonneg J)) | |
| rw [β Real.rpow_mul hΞ±.le] at hup | |
| calc | |
| _ β€ (2 * Ξ± ^ I) * Ξ± ^ (Ο * -(J : β)) := | |
| mul_le_mul hdown hup (Real.rpow_nonneg hΞ²pos.le _) (by positivity) | |
| _ = 2 * Ξ± ^ ((I : β) - Ο * J) := by | |
| rw [mul_assoc, β Real.rpow_natCast, β Real.rpow_add hΞ±] | |
| congr 2 | |
| ring | |
| /-- The exact intermediate-dimension bound after the harmless rounding factor | |
| has been absorbed. The hypotheses are purely numerical and field-independent. -/ | |
| theorem intermediate_dimension_ratio_le_balanced {v u a b I J : β} | |
| (hv : 1 β€ v) (hu : 1 β€ u) (ha : 0 < a) (hb : 0 < b) (hI : I β€ a) | |
| (hbudget : 2 * I β€ a + v) (Ο : β) | |
| (hbalance : ((a : β) / ((a : β) + v)) ^ Ο β€ | |
| (b : β) / ((b : β) + u)) : | |
| ((homogeneousDim v (a - I) : β) * homogeneousDim u (b + J)) / | |
| ((homogeneousDim v a : β) * homogeneousDim u b) β€ | |
| 2 * ((a : β) / ((a : β) + v)) ^ ((I : β) - Ο * J) := by | |
| have ha' : (0 : β) < a := by exact_mod_cast ha | |
| have hb' : (0 : β) < b := by exact_mod_cast hb | |
| have hv' : (1 : β) β€ v := by exact_mod_cast hv | |
| have hu' : (1 : β) β€ u := by exact_mod_cast hu | |
| have hN : (1 : β) < (a : β) + v := by linarith | |
| have hdown : (a : β) / ((a : β) + v - 1) = | |
| ((a : β) / ((a : β) + v)) / (1 - 1 / ((a : β) + v)) := by | |
| field_simp | |
| have hup : (((b : β) + u) / b) ^ J = | |
| ((b : β) / ((b : β) + u)) ^ (-(J : β)) := by | |
| rw [Real.rpow_neg (by positivity), Real.rpow_natCast, β inv_pow, inv_div] | |
| calc | |
| _ β€ ((a : β) / ((a : β) + v - 1)) ^ I * | |
| (((b : β) + u) / b) ^ J := intermediate_dimension_ratio_le hv hu hb hI | |
| _ = ((((a : β) / ((a : β) + v)) / (1 - 1 / ((a : β) + v))) ^ I) * | |
| ((b : β) / ((b : β) + u)) ^ (-(J : β)) := by rw [hdown, hup] | |
| _ β€ _ := corrected_ratio_product_le _ _ _ Ο I J (by positivity) hbalance hN.le | |
| (by exact_mod_cast hbudget) | |
| /-- Unnormalized form of the balanced intermediate-dimension estimate. -/ | |
| theorem intermediate_dimension_le_balanced {v u a b I J : β} | |
| (hv : 1 β€ v) (hu : 1 β€ u) (ha : 0 < a) (hb : 0 < b) (hI : I β€ a) | |
| (hbudget : 2 * I β€ a + v) (Ο : β) | |
| (hbalance : ((a : β) / ((a : β) + v)) ^ Ο β€ | |
| (b : β) / ((b : β) + u)) : | |
| (homogeneousDim v (a - I) : β) * homogeneousDim u (b + J) β€ | |
| 2 * ((homogeneousDim v a : β) * homogeneousDim u b) * | |
| ((a : β) / ((a : β) + v)) ^ ((I : β) - Ο * J) := by | |
| have hd : (0 : β) < (homogeneousDim v a : β) * homogeneousDim u b := by | |
| exact mul_pos (by exact_mod_cast homogeneousDim_pos hv a) | |
| (by exact_mod_cast homogeneousDim_pos hu b) | |
| have h := (div_le_iffβ hd).mp | |
| (intermediate_dimension_ratio_le_balanced (J := J) hv hu ha hb hI hbudget Ο hbalance) | |
| simpa only [mul_assoc, mul_left_comm, mul_comm] using h | |
| end Problem335 | |
| end OAI | |