Download data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldConstruction/RateLimit.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 8.42 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldConstruction/RateLimit.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldConstruction/RateLimit.lean
-
curl -L -o RateLimit.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/FieldConstruction/RateLimit.lean
8.42 kB
| import OAI.LinearAlgebra.MatrixMultiplication.FieldConstruction.Witness | |
| import OAI.LinearAlgebra.MatrixMultiplication.Recovery.FiniteSchedule | |
| import OAI.LinearAlgebra.MatrixMultiplication.Arithmetic.Exponent | |
| namespace OAI | |
| /-! Tensor extraction over arbitrary fields and its asymptotic rate. -/ | |
| noncomputable section | |
| namespace MatrixMultiplication.AllFieldRateLimit | |
| open Filter | |
| open scoped Topology | |
| variable {F : Type*} [Field F] | |
| structure HasRates (W : β β AllFieldWitness F) (scale : β β β) | |
| (Y S R : β) : Prop where | |
| scale_positive : βαΆ n in atTop, 0 < scale n | |
| yield_limit : Tendsto (fun n => Real.log ((W n).multiplicity : β) / scale n) atTop (π Y) | |
| volume_limit : Tendsto (fun n => Real.log ((W n).volume : β) / scale n) atTop (π S) | |
| rank_limit : Tendsto (fun n => Real.log ((W n).rankBound : β) / scale n) atTop (π R) | |
| structure HasRateBounds (W : β β AllFieldWitness F) (scale : β β β) | |
| (Y S R : β) : Prop where | |
| scale_positive : βαΆ n in atTop, 0 < scale n | |
| yield_lower : β Ξ΅ : β, 0 < Ξ΅ β βαΆ n in atTop, | |
| Y - Ξ΅ β€ Real.log ((W n).multiplicity : β) / scale n | |
| volume_lower : β Ξ΅ : β, 0 < Ξ΅ β βαΆ n in atTop, | |
| S - Ξ΅ β€ Real.log ((W n).volume : β) / scale n | |
| rank_upper : β Ξ΅ : β, 0 < Ξ΅ β βαΆ n in atTop, | |
| Real.log ((W n).rankBound : β) / scale n β€ R + Ξ΅ | |
| theorem HasRates.toBounds {W : β β AllFieldWitness F} {scale : β β β} | |
| {Y S R : β} (h : HasRates W scale Y S R) : HasRateBounds W scale Y S R where | |
| scale_positive := h.scale_positive | |
| yield_lower Ξ΅ hΞ΅ := (h.yield_limit.eventually_const_lt (by linarith : Y - Ξ΅ < Y)).mono | |
| (fun _ hn => hn.le) | |
| volume_lower Ξ΅ hΞ΅ := (h.volume_limit.eventually_const_lt (by linarith : S - Ξ΅ < S)).mono | |
| (fun _ hn => hn.le) | |
| rank_upper Ξ΅ hΞ΅ := (h.rank_limit.eventually_lt_const (by linarith : R < R + Ξ΅)).mono | |
| (fun _ hn => hn.le) | |
| theorem inequality_of_rates {W : β β AllFieldWitness F} {scale : β β β} | |
| {Y S R : β} (h : HasRates W scale Y S R) : | |
| Y + (Arithmetic.omega F / 3) * S β€ R := by | |
| apply le_of_tendsto_of_tendsto | |
| (h.yield_limit.add (h.volume_limit.const_mul (Arithmetic.omega F / 3))) h.rank_limit | |
| filter_upwards [h.scale_positive] with n hn | |
| have hb := div_le_div_of_nonneg_right (W n).log_inequality hn.le | |
| simpa only [add_div, mul_div_assoc] using hb | |
| theorem inequality_of_rateBounds {W : β β AllFieldWitness F} {scale : β β β} | |
| {Y S R : β} (h : HasRateBounds W scale Y S R) : | |
| Y + (Arithmetic.omega F / 3) * S β€ R := by | |
| apply le_of_forall_pos_le_add | |
| intro Ξ΅ hΞ΅ | |
| have hΞ΄ : 0 < Ξ΅ / 3 := by positivity | |
| obtain β¨n, hnscale, hnyield, hnvolume, hnrankβ© := | |
| (h.scale_positive.and ((h.yield_lower (Ξ΅ / 3) hΞ΄).and | |
| ((h.volume_lower (Ξ΅ / 3) hΞ΄).and (h.rank_upper (Ξ΅ / 3) hΞ΄)))).exists | |
| have hfinite := div_le_div_of_nonneg_right (W n).log_inequality hnscale.le | |
| simp only [add_div, mul_div_assoc] at hfinite | |
| have hΟ : 0 β€ Arithmetic.omega F / 3 := div_nonneg Arithmetic.omega_nonneg (by norm_num) | |
| have hvolume := mul_le_mul_of_nonneg_left hnvolume hΟ | |
| have hΟupper := mul_le_mul_of_nonneg_right | |
| (Arithmetic.omega_le_three (F := F)) hΞ΄.le | |
| nlinarith | |
| theorem omega_le_of_rates {W : β β AllFieldWitness F} {scale : β β β} | |
| {Y S R : β} (h : HasRates W scale Y S R) (positive : 0 < S) : | |
| Arithmetic.omega F β€ 3 * (R - Y) / S := by | |
| apply (le_div_iffβ positive).mpr | |
| have hb := inequality_of_rates h | |
| nlinarith | |
| theorem omega_le_of_rateBounds {W : β β AllFieldWitness F} {scale : β β β} | |
| {Y S R : β} (h : HasRateBounds W scale Y S R) (positive : 0 < S) : | |
| Arithmetic.omega F β€ 3 * (R - Y) / S := by | |
| apply (le_div_iffβ positive).mpr | |
| have hb := inequality_of_rateBounds h | |
| nlinarith | |
| structure FixedLotFamily (F : Type*) [Field F] where | |
| witness : β β β β AllFieldWitness F | |
| scale : β β β β β | |
| yieldRate : β β β | |
| volumeRate : β β β | |
| rankRate : β β β | |
| bounds : β j, HasRateBounds (witness j) (scale j) | |
| (yieldRate j) (volumeRate j) (rankRate j) | |
| theorem inequality_of_fixedLotFamily (family : FixedLotFamily F) {Y S R : β} | |
| (yield_limit : Tendsto family.yieldRate atTop (π Y)) | |
| (volume_limit : Tendsto family.volumeRate atTop (π S)) | |
| (rank_limit : Tendsto family.rankRate atTop (π R)) : | |
| Y + (Arithmetic.omega F / 3) * S β€ R := by | |
| apply le_of_tendsto_of_tendsto' | |
| (yield_limit.add (volume_limit.const_mul (Arithmetic.omega F / 3))) rank_limit | |
| intro j | |
| exact inequality_of_rateBounds (family.bounds j) | |
| theorem inequality_of_outer_families | |
| (family : β β FixedLotFamily F) {Y S R : β β β} {Yfinal Sfinal Rfinal : β} | |
| (yield_limit : β K, Tendsto (family K).yieldRate atTop (π (Y K))) | |
| (volume_limit : β K, Tendsto (family K).volumeRate atTop (π (S K))) | |
| (rank_limit : β K, Tendsto (family K).rankRate atTop (π (R K))) | |
| (outer_yield : Tendsto Y atTop (π Yfinal)) | |
| (outer_volume : Tendsto S atTop (π Sfinal)) | |
| (outer_rank : Tendsto R atTop (π Rfinal)) : | |
| Yfinal + (Arithmetic.omega F / 3) * Sfinal β€ Rfinal := by | |
| apply le_of_tendsto_of_tendsto' | |
| (outer_yield.add (outer_volume.const_mul (Arithmetic.omega F / 3))) outer_rank | |
| intro K | |
| exact inequality_of_fixedLotFamily (family K) | |
| (yield_limit K) (volume_limit K) (rank_limit K) | |
| theorem omega_le_of_outer_families | |
| (family : β β FixedLotFamily F) {Y S R : β β β} {Yfinal Sfinal Rfinal : β} | |
| (yield_limit : β K, Tendsto (family K).yieldRate atTop (π (Y K))) | |
| (volume_limit : β K, Tendsto (family K).volumeRate atTop (π (S K))) | |
| (rank_limit : β K, Tendsto (family K).rankRate atTop (π (R K))) | |
| (outer_yield : Tendsto Y atTop (π Yfinal)) | |
| (outer_volume : Tendsto S atTop (π Sfinal)) | |
| (outer_rank : Tendsto R atTop (π Rfinal)) (positive : 0 < Sfinal) : | |
| Arithmetic.omega F β€ 3 * (Rfinal - Yfinal) / Sfinal := by | |
| apply (le_div_iffβ positive).mpr | |
| have hb := inequality_of_outer_families family yield_limit volume_limit rank_limit | |
| outer_yield outer_volume outer_rank | |
| nlinarith | |
| theorem staggered_rank_constraint | |
| (family : β K : β, 2 β€ K β FixedLotFamily F) {H0 Cstar Sstar beta : β} | |
| (yield_limit : β K hK, Tendsto (family K hK).yieldRate atTop | |
| (π (H0 + Cstar - beta / (K : β)))) | |
| (volume_limit : β K hK, Tendsto (family K hK).volumeRate atTop (π Sstar)) | |
| (rank_limit : β K hK, Tendsto (family K hK).rankRate atTop (π (8 * Real.log 7))) : | |
| H0 + Cstar + (Arithmetic.omega F / 3) * Sstar β€ 8 * Real.log 7 := by | |
| have hfixed (K : β) (hK : 2 β€ K) : | |
| H0 + Cstar - beta / (K : β) + Arithmetic.omega F * Sstar / 3 β€ | |
| 8 * Real.log 7 := by | |
| have hb := inequality_of_fixedLotFamily (family K hK) | |
| (yield_limit K hK) (volume_limit K hK) (rank_limit K hK) | |
| convert hb using 1; ring | |
| have hb := FiniteSchedule.fixed_lot_boundary_limit hfixed | |
| convert hb using 1; ring | |
| theorem omega_le_of_staggered_families | |
| (family : β K : β, 2 β€ K β FixedLotFamily F) {H0 Cstar Sstar beta : β} | |
| (yield_limit : β K hK, Tendsto (family K hK).yieldRate atTop | |
| (π (H0 + Cstar - beta / (K : β)))) | |
| (volume_limit : β K hK, Tendsto (family K hK).volumeRate atTop (π Sstar)) | |
| (rank_limit : β K hK, Tendsto (family K hK).rankRate atTop (π (8 * Real.log 7))) | |
| (positive : 0 < Sstar) : | |
| Arithmetic.omega F β€ 3 * (8 * Real.log 7 - (H0 + Cstar)) / Sstar := by | |
| apply (le_div_iffβ positive).mpr | |
| have hb := staggered_rank_constraint family yield_limit volume_limit rank_limit | |
| nlinarith | |
| theorem omega_lt_of_staggered_families | |
| (family : β K : β, 2 β€ K β FixedLotFamily F) {H0 Cstar Sstar beta target : β} | |
| (yield_limit : β K hK, Tendsto (family K hK).yieldRate atTop | |
| (π (H0 + Cstar - beta / (K : β)))) | |
| (volume_limit : β K hK, Tendsto (family K hK).volumeRate atTop (π Sstar)) | |
| (rank_limit : β K hK, Tendsto (family K hK).rankRate atTop (π (8 * Real.log 7))) | |
| (positive : 0 < Sstar) | |
| (gap : 3 * (8 * Real.log 7 - (H0 + Cstar)) / Sstar < target) : | |
| Arithmetic.omega F < target := | |
| lt_of_le_of_lt (omega_le_of_staggered_families family yield_limit volume_limit | |
| rank_limit positive) gap | |
| end MatrixMultiplication.AllFieldRateLimit | |
| end | |
| end OAI | |