Download data/lean/OAI/LinearAlgebra/MatrixMultiplication/Rectangular/Witness.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 5.42 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/Rectangular/Witness.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/LinearAlgebra/MatrixMultiplication/Rectangular/Witness.lean
-
curl -L -o Witness.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/LinearAlgebra/MatrixMultiplication/Rectangular/Witness.lean
5.42 kB
| import OAI.LinearAlgebra.MatrixMultiplication.Tensor.ComplexWitness | |
| import OAI.LinearAlgebra.MatrixMultiplication.Numerical.ComplexCertificates | |
| import OAI.LinearAlgebra.MatrixMultiplication.Rectangular.ASI | |
| import OAI.LinearAlgebra.MatrixMultiplication.Rectangular.RateLimit | |
| namespace OAI | |
| /-! Rectangular matrix multiplication algorithms and their asymptotic exponents. -/ | |
| namespace MatrixMultiplication.RectangularWitness | |
| open Filter | |
| open scoped Topology | |
| theorem aspect_lower {g h : β} | |
| (hg : (27961 : β) / 25000 < g) | |
| (hhβ : 0 < h) (hh : h < (15761 : β) / 5000) : | |
| (55922 : β) / 78805 < 2 * g / h := by | |
| apply (lt_div_iffβ hhβ).2 | |
| nlinarith | |
| theorem target_aspect_lt {g h : β} | |
| (hg : (27961 : β) / 25000 < g) | |
| (hhβ : 0 < h) (hh : h < (15761 : β) / 5000) : | |
| (709 : β) / 1000 < 2 * g / h := by | |
| exact (by norm_num : (709 : β) / 1000 < 55922 / 78805).trans | |
| (aspect_lower hg hhβ hh) | |
| theorem aspect_lt_one {g h : β} | |
| (hg : g < (6991 : β) / 6250) | |
| (hh : (31519 : β) / 10000 < h) : 2 * g / h < 1 := by | |
| have hhβ : 0 < h := by linarith | |
| apply (div_lt_iffβ hhβ).2 | |
| linarith | |
| theorem exponent_upper {c h : β} | |
| (hc : c < (10987 : β) / 10000) | |
| (hh : (31519 : β) / 10000 < h) : | |
| 6 * c / h < (65922 : β) / 31519 := by | |
| have hhβ : 0 < h := by linarith | |
| apply (div_lt_iffβ hhβ).2 | |
| nlinarith | |
| theorem exponent_lt_target {c h : β} | |
| (hc : c < (10987 : β) / 10000) | |
| (hh : (31519 : β) / 10000 < h) : | |
| 6 * c / h < (523 : β) / 250 := by | |
| exact (exponent_upper hc hh).trans | |
| (by norm_num : (65922 : β) / 31519 < 523 / 250) | |
| theorem omega_lt_of_balanced_family | |
| (W : β β ComplexWitness.FiniteRectangularWitness) | |
| (scale : β β β) (k target g h H : β) | |
| (k_nonneg : 0 β€ k) (h_positive : 0 < h) | |
| (aspect_gap : k * h < 2 * g) (cost_gap : 6 * Real.log 3 < target * h) | |
| (scale_positive : βαΆ n in atTop, 0 < scale n) | |
| (outer_rate : Tendsto | |
| (fun n => Real.log ((W n).outer : β) / scale n) atTop (π h)) | |
| (inner_rate : Tendsto | |
| (fun n => Real.log ((W n).inner : β) / scale n) atTop (π (2 * g))) | |
| (multiplicity_rate : Tendsto | |
| (fun n => Real.log ((W n).multiplicity : β) / scale n) atTop (π (2 * H))) | |
| (rank_rate : Tendsto | |
| (fun n => Real.log ((W n).rank : β) / scale n) atTop | |
| (π (6 * Real.log 3 + 2 * H))) : | |
| Arithmetic.rectangularOmega β k < target := by | |
| have hbound := RectangularRateLimit.exponent_le_of_finite_asi | |
| (fun n => (W n).outer_pos) (fun n => (W n).inner_pos) | |
| scale_positive outer_rate inner_rate multiplicity_rate rank_rate h_positive aspect_gap | |
| (fun n ha hab => Arithmetic.equalRectangular_log_inequality_of_polynomialApproximation | |
| ha (W n).multiplicity_pos k_nonneg hab (W n).approximation) | |
| have hcancel : (6 * Real.log 3 + 2 * H - 2 * H) / h = 6 * Real.log 3 / h := by ring | |
| rw [hcancel] at hbound | |
| exact hbound.trans_lt ((div_lt_iffβ h_positive).2 cost_gap) | |
| theorem omega_lt_target_of_nearby_balanced_family | |
| (W : β β ComplexWitness.FiniteRectangularWitness) | |
| (scale : β β β) (g h H : β) | |
| (g_lower : (27961 : β) / 25000 < g) | |
| (h_lower : (31519 : β) / 10000 < h) | |
| (h_upper : h < (15761 : β) / 5000) | |
| (scale_positive : βαΆ n in atTop, 0 < scale n) | |
| (outer_rate : Tendsto | |
| (fun n => Real.log ((W n).outer : β) / scale n) atTop | |
| (π h)) | |
| (inner_rate : Tendsto | |
| (fun n => Real.log ((W n).inner : β) / scale n) atTop | |
| (π (2 * g))) | |
| (multiplicity_rate : Tendsto | |
| (fun n => Real.log ((W n).multiplicity : β) / scale n) atTop (π (2 * H))) | |
| (rank_rate : Tendsto | |
| (fun n => Real.log ((W n).rank : β) / scale n) atTop | |
| (π (6 * Real.log 3 + 2 * H))) : | |
| Arithmetic.rectangularOmega β ((709 : β) / 1000) < (523 : β) / 250 := by | |
| have hhβ : 0 < h := by linarith | |
| have hgap : (709 : β) / 1000 * h < 2 * g := | |
| (lt_div_iffβ hhβ).1 (target_aspect_lt g_lower hhβ h_upper) | |
| apply omega_lt_of_balanced_family W scale (709 / 1000) (523 / 250) g h H | |
| (by norm_num) hhβ hgap _ scale_positive outer_rate inner_rate multiplicity_rate rank_rate | |
| exact (div_lt_iffβ hhβ).1 | |
| (exponent_lt_target ComplexCertificates.log_three_upper h_lower) | |
| theorem omega_lt_target_of_balanced_family | |
| (W : β β ComplexWitness.FiniteRectangularWitness) | |
| (scale : β β β) (H : β) | |
| (scale_positive : βαΆ n in atTop, 0 < scale n) | |
| (outer_rate : Tendsto | |
| (fun n => Real.log ((W n).outer : β) / scale n) atTop | |
| (π ComplexCertificates.curveH)) | |
| (inner_rate : Tendsto | |
| (fun n => Real.log ((W n).inner : β) / scale n) atTop | |
| (π (2 * ComplexCertificates.curveG))) | |
| (multiplicity_rate : Tendsto | |
| (fun n => Real.log ((W n).multiplicity : β) / scale n) atTop (π (2 * H))) | |
| (rank_rate : Tendsto | |
| (fun n => Real.log ((W n).rank : β) / scale n) atTop | |
| (π (6 * Real.log 3 + 2 * H))) : | |
| Arithmetic.rectangularOmega β ((709 : β) / 1000) < (523 : β) / 250 := | |
| omega_lt_target_of_nearby_balanced_family W scale | |
| ComplexCertificates.curveG ComplexCertificates.curveH H | |
| ComplexCertificates.curveG_bounds.1 ComplexCertificates.curveH_bounds.1 | |
| ComplexCertificates.curveH_bounds.2 scale_positive outer_rate inner_rate | |
| multiplicity_rate rank_rate | |
| end MatrixMultiplication.RectangularWitness | |
| end OAI | |