doc-next-gen

Mathlib.LinearAlgebra.Basis.Cardinality

Module docstring

{"# Results relating bases and cardinality. "}

finite_of_span_finite_eq_top_finsupp theorem
[Nontrivial M] {ι : Type*} {s : Set (ι →₀ M)} (hs : s.Finite) (hsspan : span R s = ⊤) : Finite ι
Full source
lemma finite_of_span_finite_eq_top_finsupp [Nontrivial M] {ι : Type*} {s : Set (ι →₀ M)}
    (hs : s.Finite) (hsspan : span R s = ) : Finite ι :=
  suffices ⋃ i ∈ s, i.support.toSet = .univ from
    .of_finite_univ (this ▸ hs.biUnion fun _ _ ↦ by simp)
  have ⟨x, hx⟩ := exists_ne (0 : M)
  eq_univ_of_forall fun j ↦ (top_unique (hsspan.ge.trans (span_le_supported_biUnion_support R s)) ▸
    mem_top (x := single j x)) ((mem_support_single ..).mpr ⟨rfl, hx⟩)
Finiteness of Index Type for Finite Spanning Set of Finitely Supported Functions
Informal description
Let $M$ be a nontrivial module over a ring $R$, and let $\iota$ be a type. Given a finite set $s$ of finitely supported functions from $\iota$ to $M$ (i.e., $s \subseteq \iota \to_{\text{f}} M$) such that the span of $s$ is the entire module $\iota \to_{\text{f}} M$, then the type $\iota$ must be finite.
basis_finite_of_finite_spans theorem
[Nontrivial R] {s : Set M} (hs : s.Finite) (hsspan : span R s = ⊤) {ι : Type w} (b : Basis ι R M) : Finite ι
Full source
/--
Over any nontrivial ring, the existence of a finite spanning set implies that any basis is finite.
-/
lemma basis_finite_of_finite_spans [Nontrivial R] {s : Set M} (hs : s.Finite)
    (hsspan : span R s = ) {ι : Type w} (b : Basis ι R M) : Finite ι := by
  have := congr(($hsspan).map b.repr)
  rw [← span_image, Submodule.map_top, LinearEquivClass.range] at this
  exact finite_of_span_finite_eq_top_finsupp (hs.image _) this
Finiteness of Basis in Presence of Finite Spanning Set
Informal description
Let $R$ be a nontrivial ring and $M$ an $R$-module. If there exists a finite subset $s \subseteq M$ whose span is the entire module $M$, then any basis of $M$ indexed by a type $\iota$ must have $\iota$ finite.
union_support_maximal_linearIndependent_eq_range_basis theorem
{ι : Type w} (b : Basis ι R M) {κ : Type w'} (v : κ → M) (ind : LinearIndependent R v) (m : ind.Maximal) : ⋃ k, ((b.repr (v k)).support : Set ι) = Set.univ
Full source
/-- Over any ring `R`, if `b` is a basis for a module `M`,
and `s` is a maximal linearly independent set,
then the union of the supports of `x ∈ s` (when written out in the basis `b`) is all of `b`.
-/
theorem union_support_maximal_linearIndependent_eq_range_basis {ι : Type w} (b : Basis ι R M)
    {κ : Type w'} (v : κ → M) (ind : LinearIndependent R v) (m : ind.Maximal) :
    ⋃ k, ((b.repr (v k)).support : Set ι) = Set.univ := by
  -- If that's not the case,
  by_contra h
  simp only [← Ne.eq_def, ne_univ_iff_exists_not_mem, mem_iUnion, not_exists_not,
    Finsupp.mem_support_iff, Finset.mem_coe] at h
  -- We have some basis element `b i` which is not in the support of any of the `v k`.
  obtain ⟨i, w⟩ := h
  have repr_eq_zero (l) : b.repr (linearCombination R v l) i = 0 := by
    simp [linearCombination_apply, Finsupp.sum, w]
  -- Using this, we'll construct a linearly independent family strictly larger than `v`,
  -- by also using this `b i`.
  let v' (o : Option κ) : M := o.elim (b i) v
  have r : rangerange v ⊆ range v' := by rintro - ⟨k, rfl⟩; exact ⟨some k, rfl⟩
  have r' : b i ∉ range v := fun ⟨k, p⟩ ↦ by simpa [w] using congr(b.repr $p i)
  have r'' : rangerange v ≠ range v' := (r' <| · ▸ ⟨none, rfl⟩)
  -- The key step in the proof is checking that this strictly larger family is linearly independent.
  have i' : LinearIndepOn R id (range v') := by
    apply LinearIndependent.linearIndepOn_id
    rw [linearIndependent_iffₛ]
    intro l l' z
    simp_rw [linearCombination_option, v', Option.elim'] at z
    change _ + linearCombination R v l.some = _ + linearCombination R v l'.some at z
    -- We have some equality between linear combinations of `b i` and the `v k`,
    -- and want to show the coefficients are equal.
    ext (_ | a)
    -- We'll first show the coefficient of `b i` is zero,
    -- by expressing the `v k` in the basis `b`, and using that the `v k` have no `b i` term.
    · simpa [repr_eq_zero] using congr(b.repr $z i)
    -- All the other coefficients are also equal, because `v` is linear independent,
    -- by comparing the coefficients in the basis `b`.
    have l₁ : l.some = l'.some := ind <| b.repr.injective <| ext fun j ↦ by
      obtain rfl | ne := eq_or_ne i j
      · simp_rw [repr_eq_zero]
      classical simpa [single_apply, ne] using congr(b.repr $z j)
    exact DFunLike.congr_fun l₁ a
  exact r'' (m (range v') i' r)
Union of Supports of Maximal Linearly Independent Family Covers Basis Index Set
Informal description
Let $M$ be a module over a ring $R$ with a basis $b$ indexed by a type $\iota$. Given a maximal linearly independent family of vectors $v : \kappa \to M$, the union of the supports of the coordinate representations of the vectors $v_k$ (with respect to the basis $b$) covers the entire index set $\iota$. In other words, $\bigcup_{k \in \kappa} \text{supp}(b.\text{repr}(v_k)) = \iota$.
infinite_basis_le_maximal_linearIndependent' theorem
{ι : Type w} (b : Basis ι R M) [Infinite ι] {κ : Type w'} (v : κ → M) (i : LinearIndependent R v) (m : i.Maximal) : Cardinal.lift.{w'} #ι ≤ Cardinal.lift.{w} #κ
Full source
/-- Over any ring `R`, if `b` is an infinite basis for a module `M`,
and `s` is a maximal linearly independent set,
then the cardinality of `b` is bounded by the cardinality of `s`.
-/
theorem infinite_basis_le_maximal_linearIndependent' {ι : Type w} (b : Basis ι R M) [Infinite ι]
    {κ : Type w'} (v : κ → M) (i : LinearIndependent R v) (m : i.Maximal) :
    Cardinal.lift.{w'} Cardinal.lift.{w}  := by
  let Φ := fun k : κ => (b.repr (v k)).support
  have w₁ : #(Set.range Φ) := by
    apply Cardinal.le_range_of_union_finset_eq_top
    exact union_support_maximal_linearIndependent_eq_range_basis b v i m
  have w₂ : Cardinal.lift.{w'} #(Set.range Φ)Cardinal.lift.{w}  := Cardinal.mk_range_le_lift
  exact (Cardinal.lift_le.mpr w₁).trans w₂
Cardinality Bound for Infinite Basis by Maximal Linearly Independent Set
Informal description
Let $M$ be a module over a ring $R$ with an infinite basis $b$ indexed by a type $\iota$. If $v : \kappa \to M$ is a maximal linearly independent family of vectors in $M$, then the cardinality of $\iota$ is bounded by the cardinality of $\kappa$, i.e., $\#\iota \leq \#\kappa$ (where the cardinalities are lifted to a common universe if necessary).
infinite_basis_le_maximal_linearIndependent theorem
{ι : Type w} (b : Basis ι R M) [Infinite ι] {κ : Type w} (v : κ → M) (i : LinearIndependent R v) (m : i.Maximal) : #ι ≤ #κ
Full source
/-- Over any ring `R`, if `b` is an infinite basis for a module `M`,
and `s` is a maximal linearly independent set,
then the cardinality of `b` is bounded by the cardinality of `s`.
-/
theorem infinite_basis_le_maximal_linearIndependent {ι : Type w} (b : Basis ι R M) [Infinite ι]
    {κ : Type w} (v : κ → M) (i : LinearIndependent R v) (m : i.Maximal) :  :=
  Cardinal.lift_le.mp (infinite_basis_le_maximal_linearIndependent' b v i m)
Cardinality Bound for Infinite Basis by Maximal Linearly Independent Set
Informal description
Let $M$ be a module over a ring $R$ with an infinite basis $b$ indexed by a type $\iota$. If $v : \kappa \to M$ is a maximal linearly independent family of vectors in $M$, then the cardinality of $\iota$ is bounded by the cardinality of $\kappa$, i.e., $\#\iota \leq \#\kappa$.