Download PFR/ForMathlib/AffineSpaceDim.lean from cfahlgren1/lean-pfr: direct link, hf CLI and curl.
- Browser
- Download file 1.35 kB
-
https://huggingface.co/datasets/cfahlgren1/lean-pfr/resolve/main/PFR/ForMathlib/AffineSpaceDim.lean
- Command line
-
hf download hf://datasets/cfahlgren1/lean-pfr/PFR/ForMathlib/AffineSpaceDim.lean
-
curl -L -o AffineSpaceDim.lean https://huggingface.co/datasets/cfahlgren1/lean-pfr/resolve/main/PFR/ForMathlib/AffineSpaceDim.lean
1.35 kB
| module | |
| public import Mathlib.LinearAlgebra.AffineSpace.AffineSubspace.Basic | |
| public import Mathlib.LinearAlgebra.Dimension.Constructions | |
| public import Mathlib.LinearAlgebra.Dimension.Finite | |
| public import PFR.Mathlib.LinearAlgebra.Dimension.Finrank | |
| @[expose] public section | |
| open scoped Pointwise | |
| namespace AffineSpace | |
| variable {k V P : Type*} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : Set P} | |
| {S : Submodule k V} | |
| variable (k) in | |
| open scoped Classical in | |
| /-- The dimension of the affine span over `ℤ` of a subset of an additive group. -/ | |
| noncomputable def finrank (s : Set P) : ℕ := (vectorSpan k s).finrank | |
| variable (k) in | |
| @[simp] | |
| lemma finrank_vadd_set (s : Set P) (v : V) : finrank k (v +ᵥ s) = AffineSpace.finrank k s := by | |
| simp [finrank] | |
| variable (k) in | |
| @[simp] lemma finrank_empty [Nontrivial k] : finrank k (∅ : Set P) = 0 := by simp [finrank] | |
| variable [StrongRankCondition k] | |
| lemma finrank_le_submoduleFinrank [Module.Finite k S] (q : P) (hs : ∀ p ∈ s, p -ᵥ q ∈ S) : | |
| finrank k s ≤ S.finrank := by | |
| refine Submodule.finrank_mono ?_ | |
| simpa [vectorSpan, Submodule.span_le, Set.vsub_subset_iff] | |
| using fun a ha b hb ↦ S.sub_mem (hs _ ha) (hs _ hb) | |
| lemma finrank_le_moduleFinrank [Module.Finite k V] : finrank k s ≤ Module.finrank k V := | |
| (vectorSpan k s).finrank_le | |
| end AffineSpace | |