Download data/lean/OAI/Computability/PerfectCompleteness/Algebra/TensorSliceDimension.lean from introvoyz045/math: direct link, hf CLI and curl.
- Browser
- Download file 3.34 kB
-
https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Algebra/TensorSliceDimension.lean
- Command line
-
hf download hf://datasets/introvoyz045/math/data/lean/OAI/Computability/PerfectCompleteness/Algebra/TensorSliceDimension.lean
-
curl -L -o TensorSliceDimension.lean https://huggingface.co/datasets/introvoyz045/math/resolve/main/data/lean/OAI/Computability/PerfectCompleteness/Algebra/TensorSliceDimension.lean
3.34 kB
| import Mathlib.Algebra.Order.Field.Basic | |
| import Mathlib.Basic.Real.Basic | |
| import Mathlib.LinearAlgebra.FreeModule.Finite.Matrix | |
| import Mathlib.Tactic.NormNum | |
| import OAI.Computability.PerfectCompleteness.Algebra.BilinearGramCompressionLemmas | |
| namespace OAI | |
| namespace PerfectCompleteness.TensorSliceDimension | |
| noncomputable section | |
| open UniqueGamesTheorem.Integration.BinaryLinear (F2) | |
| theorem mask_card (n : Nat) : Fintype.card (Fin n β Bool) = 2 ^ n := by | |
| simp only [Fintype.card_fun, Fintype.card_bool, Fintype.card_fin] | |
| theorem mask_card_le {n N : Nat} (h : n β€ N) : | |
| Fintype.card (Fin n β Bool) β€ 2 ^ N := by | |
| rw [mask_card] | |
| exact Nat.pow_le_pow_right (by decide : 0 < 2) h | |
| theorem reciprocal_mask_card_ge {n N : Nat} (h : n β€ N) : | |
| 1 / (2 ^ N : β) β€ 1 / (Fintype.card (Fin n β Bool) : β) := by | |
| simpa only [mask_card, Nat.cast_pow, Nat.cast_ofNat] using | |
| (one_div_pow_le_one_div_pow_of_le (by norm_num : (1 : β) β€ 2) h) | |
| section GeneralEquationSpace | |
| variable {Q W : Type*} [AddCommGroup Q] [Module F2 Q] | |
| [AddCommGroup W] [Module F2 W] | |
| [FiniteDimensional F2 Q] [FiniteDimensional F2 W] | |
| theorem linearMap_finrank_le {r β : Nat} | |
| (hQ : Module.finrank F2 Q β€ r) (hW : Module.finrank F2 W β€ β) : | |
| Module.finrank F2 (Q ββ[F2] W) β€ r * β := by | |
| rw [Module.finrank_linearMap] | |
| exact Nat.mul_le_mul hQ hW | |
| theorem reciprocal_linearMap_masks_ge {r β : Nat} | |
| (hQ : Module.finrank F2 Q β€ r) (hW : Module.finrank F2 W β€ β) : | |
| 1 / (2 ^ (r * β) : β) β€ | |
| 1 / (Fintype.card (Fin (Module.finrank F2 (Q ββ[F2] W)) β Bool) : β) := | |
| reciprocal_mask_card_ge (linearMap_finrank_le hQ hW) | |
| end GeneralEquationSpace | |
| variable {H : Type*} [AddCommGroup H] [Module F2 H] [FiniteDimensional F2 H] | |
| {β : Nat} (W : Submodule F2 (Fin β β F2)) | |
| (Q : Submodule F2 (Module.Dual F2 H)) | |
| theorem row_finrank_le : Module.finrank F2 W β€ β := by | |
| simpa only [Module.finrank_fin_fun] using (Submodule.finrank_le W) | |
| theorem equation_finrank_le {r : Nat} (hQ : Module.finrank F2 Q β€ r) : | |
| Module.finrank F2 (Q ββ[F2] W) β€ r * β := | |
| linearMap_finrank_le (Q := Q) (W := W) hQ (row_finrank_le W) | |
| theorem equation_mask_card : | |
| Fintype.card (Fin (Module.finrank F2 (Q ββ[F2] W)) β Bool) = | |
| 2 ^ (Module.finrank F2 Q * Module.finrank F2 W) := by | |
| let : Module.Free F2 Q := Module.Free.of_divisionRing F2 Q | |
| let : Module.Free F2 W := Module.Free.of_divisionRing F2 W | |
| rw [mask_card, Module.finrank_linearMap F2 F2 Q W] | |
| theorem equation_mask_card_le {r : Nat} (hQ : Module.finrank F2 Q β€ r) : | |
| Fintype.card (Fin (Module.finrank F2 (Q ββ[F2] W)) β Bool) β€ 2 ^ (r * β) := | |
| mask_card_le (equation_finrank_le W Q hQ) | |
| theorem reciprocal_equation_mask_card_ge {r : Nat} (hQ : Module.finrank F2 Q β€ r) : | |
| 1 / (2 ^ (r * β) : β) β€ | |
| 1 / (Fintype.card (Fin (Module.finrank F2 (Q ββ[F2] W)) β Bool) : β) := | |
| reciprocal_mask_card_ge (equation_finrank_le W Q hQ) | |
| theorem restriction_finrank_le {r : Nat} (hQ : Module.finrank F2 Q β€ r) : | |
| Module.finrank F2 (LinearMap.range (TensorRestriction.restrictionMap (W := W) Q)) β€ | |
| r * β := by | |
| rw [TensorRestriction.finrank_range, Nat.mul_comm] | |
| exact Nat.mul_le_mul hQ (row_finrank_le W) | |
| end | |
| end PerfectCompleteness.TensorSliceDimension | |
| end OAI | |