The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V07. Linear algebra

Mathlib.LinearAlgebra.Dimension.Constructions

82 declarations. Mathlib docs · Source

Rank of various constructions

Main statements

  • rank_quotient_add_rank_le : rank M/N + rank N ≤ rank M.
  • lift_rank_add_lift_rank_le_rank_prod: rank M × N ≤ rank M + rank N.
  • rank_span_le_of_finite: rank (span s) ≤ #s for finite s.

For free modules, we have

  • rank_prod : rank M × N = rank M + rank N.
  • rank_finsupp : rank (ι →₀ M) = #ι * rank M
  • rank_directSum: rank (⨁ Mᵢ) = ∑ rank Mᵢ
  • rank_tensorProduct: rank (M ⊗ N) = rank M * rank N.

Lemmas for ranks of submodules and subalgebras are also provided. We have finrank variants for most lemmas as well.

theorem LinearIndependent.sumElim_of_quotient E1 #

∀ {R : Type u} {M : Type v} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Submodule R M}
  {ι₁ : Type u_2} {ι₂ : Type u_3} {f : ι₁ → ↥M'},
  LinearIndependent R f →
    ∀ (g : ι₂ → M), LinearIndependent R (Submodule.Quotient.mk ∘ g) → LinearIndependent R (Sum.elim (fun x ↦ ↑(f x)) g)

theorem LinearIndepOn.union_of_quotient E1 #

∀ {R : Type u} {M : Type v} {ι : Type w} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] {s t : Set ι}
  {f : ι → M},
  LinearIndepOn R f s → LinearIndepOn R (⇑(Submodule.span R (f '' s)).mkQ ∘ f) t → LinearIndepOn R f (s ∪ t)

theorem LinearIndepOn.union_id_of_quotient E1 #

∀ {R : Type u} {M : Type v} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] {M' : Submodule R M}
  {s : Set M}, s ⊆ ↑M' → LinearIndepOn R id s → ∀ {t : Set M}, LinearIndepOn R (⇑M'.mkQ) t → LinearIndepOn R id (s ∪ t)

theorem linearIndepOn_union_iff_quotient E1 #

∀ {R : Type u} {M : Type v} {ι : Type w} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] {s t : Set ι}
  {f : ι → M},
  Disjoint s t →
    (LinearIndepOn R f (s ∪ t) ↔ LinearIndepOn R f s ∧ LinearIndepOn R (⇑(Submodule.span R (f '' s)).mkQ ∘ f) t)

theorem LinearIndepOn.quotient_iff_union E1 #

∀ {R : Type u} {M : Type v} {ι : Type w} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] {s t : Set ι}
  {f : ι → M},
  LinearIndepOn R f s →
    Disjoint s t → (LinearIndepOn R (⇑(Submodule.span R (f '' s)).mkQ ∘ f) t ↔ LinearIndepOn R f (s ∪ t))

theorem rank_quotient_add_rank_le E3 #

∀ {R : Type u} {M : Type v} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] [Nontrivial R]
  (M' : Submodule R M), Module.rank R (M ⧸ M') + Module.rank R ↥M' ≤ Module.rank R M

theorem rank_quotient_le E1 #

∀ {R : Type u} {M : Type v} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] (p : Submodule R M),
  Module.rank R (M ⧸ p) ≤ Module.rank R M

theorem Submodule.finrank_quotient_le E1 #

∀ {R : Type u} {M : Type v} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Finite R M] (s : Submodule R M), Module.finrank R (M ⧸ s) ≤ Module.finrank R M

The dimension of a quotient is bounded by the dimension of the ambient space.

theorem rank_ulift E0 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Module.rank R (ULift.{w, v} M) = Cardinal.lift.{w, v} (Module.rank R M)

theorem finrank_ulift E0 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Module.finrank R (ULift.{u_2, v} M) = Module.finrank R M

theorem rank_add_rank_le_rank_prod E1 #

∀ (R : Type u) (M : Type v) {M₁ : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : AddCommMonoid M₁]
  [inst_3 : Module R M] [inst_4 : Module R M₁] [Nontrivial R],
  Module.rank R M + Module.rank R M₁ ≤ Module.rank R (M × M₁)

theorem lift_rank_add_lift_rank_le_rank_prod E3 #

∀ (R : Type u) (M : Type v) (M' : Type v') [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : AddCommMonoid M']
  [inst_3 : Module R M] [inst_4 : Module R M'] [Nontrivial R],
  Cardinal.lift.{v', v} (Module.rank R M) + Cardinal.lift.{v, v'} (Module.rank R M') ≤ Module.rank R (M × M')

theorem rank_prod E3 #

∀ {R : Type u} {M : Type v} {M' : Type v'} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : AddCommMonoid M']
  [inst_3 : Module R M] [inst_4 : Module R M'] [StrongRankCondition R] [Module.Free R M] [Module.Free R M'],
  Module.rank R (M × M') = Cardinal.lift.{v', v} (Module.rank R M) + Cardinal.lift.{v, v'} (Module.rank R M')

If M and M' are free, then the rank of M × M' is (Module.rank R M).lift + (Module.rank R M').lift.

theorem rank_prod' E1 #

∀ {R : Type u} {M M₁ : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : AddCommMonoid M₁]
  [inst_3 : Module R M] [inst_4 : Module R M₁] [StrongRankCondition R] [Module.Free R M] [Module.Free R M₁],
  Module.rank R (M × M₁) = Module.rank R M + Module.rank R M₁

If M and M' are free (and lie in the same universe), the rank of M × M' is (Module.rank R M) + (Module.rank R M').

theorem Module.finrank_prod E0 #

∀ {R : Type u} {M : Type v} {M' : Type v'} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : AddCommMonoid M']
  [inst_3 : Module R M] [inst_4 : Module R M'] [StrongRankCondition R] [Module.Free R M] [Module.Free R M']
  [Module.Finite R M] [Module.Finite R M'], Module.finrank R (M × M') = Module.finrank R M + Module.finrank R M'

The finrank of M × M' is (finrank R M) + (finrank R M').

theorem rank_finsupp E3 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Free R M] (ι : Type w),
  Module.rank R (ι →₀ M) = Cardinal.lift.{v, w} (Cardinal.mk ι) * Cardinal.lift.{w, v} (Module.rank R M)

theorem rank_finsupp' E1 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Free R M] (ι : Type v), Module.rank R (ι →₀ M) = Cardinal.mk ι * Module.rank R M

theorem rank_finsupp_self E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] (ι : Type w),
  Module.rank R (ι →₀ R) = Cardinal.lift.{u, w} (Cardinal.mk ι)

The rank of (ι →₀ R) is (#ι).lift.

theorem rank_finsupp_self' E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {ι : Type u}, Module.rank R (ι →₀ R) = Cardinal.mk ι

If R and ι lie in the same universe, the rank of (ι →₀ R) is # ι.

theorem rank_directSum E3 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {ι : Type v} (M : ι → Type w)
  [inst_2 : (i : ι) → AddCommMonoid (M i)] [inst_3 : (i : ι) → Module R (M i)] [∀ (i : ι), Module.Free R (M i)],
  Module.rank R (DirectSum ι fun i ↦ M i) = Cardinal.sum fun i ↦ Module.rank R (M i)

The rank of the direct sum is the sum of the ranks.

theorem rank_matrix_module E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Free R M] (m : Type w) (n : Type w') [Finite m] [Finite n],
  Module.rank R (Matrix m n M) =
    Cardinal.lift.{max v w', w} (Cardinal.mk m) * Cardinal.lift.{max v w, w'} (Cardinal.mk n) *
      Cardinal.lift.{max w w', v} (Module.rank R M)

If m and n are finite, the rank of m × n matrices over a module M is (#m).lift * (#n).lift * rank R M.

theorem rank_matrix_module' E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Free R M] (m n : Type w) [Finite m] [Finite n],
  Module.rank R (Matrix m n M) =
    Cardinal.lift.{v, w} (Cardinal.mk m * Cardinal.mk n) * Cardinal.lift.{w, v} (Module.rank R M)

If m and n are finite and lie in the same universe, the rank of m × n matrices over a module M is (#m * #n).lift * rank R M.

theorem rank_matrix E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] (m : Type v) (n : Type w) [Finite m] [Finite n],
  Module.rank R (Matrix m n R) =
    Cardinal.lift.{max v w u, v} (Cardinal.mk m) * Cardinal.lift.{max v w u, w} (Cardinal.mk n)

If m and n are finite, the rank of m × n matrices is (#m).lift * (#n).lift.

theorem rank_matrix' E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] (m n : Type v) [Finite m] [Finite n],
  Module.rank R (Matrix m n R) = Cardinal.lift.{u, v} (Cardinal.mk m * Cardinal.mk n)

If m and n are finite and lie in the same universe, the rank of m × n matrices is (#n * #m).lift.

theorem rank_matrix'' E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] (m n : Type u) [Finite m] [Finite n],
  Module.rank R (Matrix m n R) = Cardinal.mk m * Cardinal.mk n

If m and n are finite and lie in the same universe as R, the rank of m × n matrices is # m * # n.

theorem Module.finrank_finsupp E0 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Free R M] {ι : Type v} [inst_5 : Fintype ι], Module.finrank R (ι →₀ M) = Fintype.card ι * Module.finrank R M

theorem Module.finrank_finsupp_self E0 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {ι : Type v} [inst_2 : Fintype ι],
  Module.finrank R (ι →₀ R) = Fintype.card ι

The finrank of (ι →₀ R) is Fintype.card ι.

theorem Module.finrank_directSum E0 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {ι : Type v} [inst_2 : Fintype ι] (M : ι → Type w)
  [inst_3 : (i : ι) → AddCommMonoid (M i)] [inst_4 : (i : ι) → Module R (M i)] [∀ (i : ι), Module.Free R (M i)]
  [∀ (i : ι), Module.Finite R (M i)], Module.finrank R (DirectSum ι fun i ↦ M i) = ∑ i, Module.finrank R (M i)

The finrank of the direct sum is the sum of the finranks.

theorem Module.finrank_matrix E1 #

∀ (R : Type u) (M : Type v) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Free R M] (m : Type u_2) (n : Type u_3) [inst_5 : Fintype m] [inst_6 : Fintype n],
  Module.finrank R (Matrix m n M) = Fintype.card m * Fintype.card n * Module.finrank R M

If m and n are Fintype, the finrank of m × n matrices over a module M is (Fintype.card m) * (Fintype.card n) * finrank R M.

theorem rank_pi E0 #

∀ {R : Type u} {η : Type u₁'} {φ : η → Type u_1} [inst : Semiring R] [StrongRankCondition R]
  [inst_2 : (i : η) → AddCommMonoid (φ i)] [inst_3 : (i : η) → Module R (φ i)] [∀ (i : η), Module.Free R (φ i)]
  [Finite η], Module.rank R ((i : η) → φ i) = Cardinal.sum fun i ↦ Module.rank R (φ i)

The rank of a finite product of free modules is the sum of the ranks.

theorem Module.finrank_pi E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {ι : Type v} [inst_2 : Fintype ι],
  Module.finrank R (ι → R) = Fintype.card ι

The finrank of (ι → R) is Fintype.card ι.

theorem Module.finrank_pi_fintype E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {ι : Type v} [inst_2 : Fintype ι] {M : ι → Type w}
  [inst_3 : (i : ι) → AddCommMonoid (M i)] [inst_4 : (i : ι) → Module R (M i)] [∀ (i : ι), Module.Free R (M i)]
  [∀ (i : ι), Module.Finite R (M i)], Module.finrank R ((i : ι) → M i) = ∑ i, Module.finrank R (M i)

The finrank of a finite product is the sum of the finranks.

theorem rank_fun E1 #

∀ {R : Type u} [inst : Semiring R] [StrongRankCondition R] {M η : Type u} [inst_2 : Fintype η]
  [inst_3 : AddCommMonoid M] [inst_4 : Module R M] [Module.Free R M],
  Module.rank R (η → M) = ↑(Fintype.card η) * Module.rank R M

theorem rank_fun_eq_lift_mul E1 #

∀ {R : Type u} {M : Type v} {η : Type u₁'} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  [StrongRankCondition R] [Module.Free R M] [inst_5 : Fintype η],
  Module.rank R (η → M) = ↑(Fintype.card η) * Cardinal.lift.{u₁', v} (Module.rank R M)

theorem rank_fun' E1 #

∀ {R : Type u} {η : Type u₁'} [inst : Semiring R] [StrongRankCondition R] [inst_2 : Fintype η],
  Module.rank R (η → R) = ↑(Fintype.card η)

theorem rank_fin_fun E1 #

∀ {R : Type u} [inst : Semiring R] [StrongRankCondition R] (n : ℕ), Module.rank R (Fin n → R) = ↑n

theorem Module.finrank_fintype_fun_eq_card E0 #

∀ (R : Type u) {η : Type u₁'} [inst : Semiring R] [StrongRankCondition R] [inst_2 : Fintype η],
  Module.finrank R (η → R) = Fintype.card η

The vector space of functions on a Fintype ι has finrank equal to the cardinality of ι.

theorem Module.finrank_fin_fun E1 #

∀ (R : Type u) [inst : Semiring R] [StrongRankCondition R] {n : ℕ}, Module.finrank R (Fin n → R) = n

The vector space of functions on Fin n has finrank equal to n.

def finDimVectorspaceEquiv E1 #

{R : Type u} →
  {M : Type v} →
    [inst : Semiring R] →
      [inst_1 : AddCommMonoid M] →
        [inst_2 : Module R M] →
          [StrongRankCondition R] → [Module.Free R M] → (n : ℕ) → Module.rank R M = ↑n → M ≃ₗ[R] Fin n → R

An n-dimensional R-vector space is equivalent to Fin n → R.

theorem rank_tensorProduct E3 #

∀ {R : Type u} {S : Type u'} {M : Type v} {M' : Type v'} [inst : Semiring R] [inst_1 : CommSemiring S]
  [inst_2 : AddCommMonoid M] [inst_3 : AddCommMonoid M'] [inst_4 : Module R M] [StrongRankCondition R]
  [StrongRankCondition S] [inst_7 : Module S M] [inst_8 : Module S M'] [Module.Free S M'] [inst_10 : Algebra S R]
  [inst_11 : IsScalarTower S R M] [Module.Free R M],
  Module.rank R (TensorProduct S M M') =
    Cardinal.lift.{v', v} (Module.rank R M) * Cardinal.lift.{v, v'} (Module.rank S M')

The S-rank of M ⊗[R] M' is (Module.rank S M).lift * (Module.rank R M').lift.

theorem rank_tensorProduct' E1 #

∀ {R : Type u} {S : Type u'} {M M₁ : Type v} [inst : Semiring R] [inst_1 : CommSemiring S] [inst_2 : AddCommMonoid M]
  [inst_3 : AddCommMonoid M₁] [inst_4 : Module R M] [StrongRankCondition R] [StrongRankCondition S]
  [inst_7 : Module S M] [inst_8 : Module S M₁] [Module.Free S M₁] [inst_10 : Algebra S R]
  [inst_11 : IsScalarTower S R M] [Module.Free R M],
  Module.rank R (TensorProduct S M M₁) = Module.rank R M * Module.rank S M₁

If M and M' lie in the same universe, the S-rank of M ⊗[R] M' is (Module.rank S M) * (Module.rank R M').

theorem Module.rank_baseChange E1 #

∀ {R : Type u} {S : Type u'} {M' : Type v'} [inst : Semiring R] [inst_1 : CommSemiring S] [inst_2 : AddCommMonoid M']
  [StrongRankCondition R] [StrongRankCondition S] [inst_5 : Module S M'] [Module.Free S M'] [inst_7 : Algebra S R],
  Module.rank R (TensorProduct S R M') = Cardinal.lift.{u, v'} (Module.rank S M')

theorem Module.finrank_tensorProduct E0 #

∀ {R : Type u} {S : Type u'} {M : Type v} {M' : Type v'} [inst : Semiring R] [inst_1 : CommSemiring S]
  [inst_2 : AddCommMonoid M] [inst_3 : AddCommMonoid M'] [inst_4 : Module R M] [StrongRankCondition R]
  [StrongRankCondition S] [inst_7 : Module S M] [inst_8 : Module S M'] [Module.Free S M'] [inst_10 : Algebra S R]
  [inst_11 : IsScalarTower S R M] [Module.Free R M],
  Module.finrank R (TensorProduct S M M') = Module.finrank R M * Module.finrank S M'

The S-finrank of M ⊗[R] M' is (finrank S M) * (finrank R M').

theorem Module.finrank_baseChange E1 #

∀ {R : Type u} {S : Type u'} {M' : Type v'} [inst : Semiring R] [inst_1 : CommSemiring S] [inst_2 : AddCommMonoid M']
  [StrongRankCondition R] [StrongRankCondition S] [inst_5 : Module S M'] [Module.Free S M'] [inst_7 : Algebra S R],
  Module.finrank R (TensorProduct S R M') = Module.finrank S M'

theorem Submodule.lt_of_le_of_finrank_lt_finrank E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {s t : Submodule R M},
  s ≤ t → Module.finrank R ↥s < Module.finrank R ↥t → s < t

theorem Submodule.lt_top_of_finrank_lt_finrank E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {s : Submodule R M},
  Module.finrank R ↥s < Module.finrank R M → s < ⊤

theorem Submodule.finrank_le E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  [Module.Finite R M] (s : Submodule R M), Module.finrank R ↥s ≤ Module.finrank R M

The dimension of a submodule is bounded by the dimension of the ambient space.

theorem Submodule.finrank_map_le E1 #

∀ {R : Type u} {M : Type v} {M' : Type v'} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : AddCommMonoid M']
  [inst_3 : Module R M] [StrongRankCondition R] [inst_5 : Module R M'] (f : M →ₗ[R] M') (p : Submodule R M)
  [Module.Finite R ↥p], Module.finrank R ↥(Submodule.map f p) ≤ Module.finrank R ↥p

Pushforwards of finite submodules have a smaller finrank.

theorem Submodule.finrank_mono E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s t : Submodule R M} [Module.Finite R ↥t], s ≤ t → Module.finrank R ↥s ≤ Module.finrank R ↥t

theorem rank_span_le E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  (s : Set M), Module.rank R ↥(Submodule.span R s) ≤ Cardinal.mk ↑s

theorem rank_span_finset_le E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  (s : Finset M), Module.rank R ↥(Submodule.span R ↑s) ≤ ↑s.card

theorem rank_span_of_finset E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  (s : Finset M), Module.rank R ↥(Submodule.span R ↑s) < Cardinal.aleph0

def Set.finrank E3 #

(R : Type u) → {M : Type v} → [inst : Semiring R] → [inst_1 : AddCommMonoid M] → [Module R M] → Set M → ℕ

The rank of a set of vectors as a natural number.

theorem finrank_span_le_card E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  (s : Set M) [inst_4 : Fintype ↑s], Module.finrank R ↥(Submodule.span R s) ≤ s.toFinset.card

theorem finrank_span_le_ncard E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  (s : Set M), s.Finite → Module.finrank R ↥(Submodule.span R s) ≤ s.ncard

theorem finrank_span_finset_le_card E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  (s : Finset M), Set.finrank R ↑s ≤ s.card

theorem finrank_range_le_card E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {ι : Type u_2} [inst_4 : Fintype ι] (b : ι → M), Set.finrank R (Set.range b) ≤ Fintype.card ι

theorem finrank_span_eq_card E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {ι : Type u_2} [inst_4 : Fintype ι] {b : ι → M},
  LinearIndependent R b → Module.finrank R ↥(Submodule.span R (Set.range b)) = Fintype.card ι

theorem finrank_span_set_eq_ncard E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s : Set M}, LinearIndepOn R id s → Module.finrank R ↥(Submodule.span R s) = s.ncard

theorem finrank_span_set_eq_card E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s : Set M} [inst_4 : Fintype ↑s], LinearIndepOn R id s → Module.finrank R ↥(Submodule.span R s) = s.toFinset.card

theorem finrank_span_finset_eq_card E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s : Finset M}, LinearIndepOn R id ↑s → Module.finrank R ↥(Submodule.span R ↑s) = s.card

theorem span_lt_of_subset_of_card_lt_finrank E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s : Set M} [inst_4 : Fintype ↑s] {t : Submodule R M},
  s ⊆ ↑t → s.toFinset.card < Module.finrank R ↥t → Submodule.span R s < t

theorem span_lt_of_subset_of_ncard_lt_finrank E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s : Set M}, s.Finite → ∀ {t : Submodule R M}, s ⊆ ↑t → s.ncard < Module.finrank R ↥t → Submodule.span R s < t

theorem span_lt_top_of_card_lt_finrank E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s : Set M} [inst_4 : Fintype ↑s], s.toFinset.card < Module.finrank R M → Submodule.span R s < ⊤

theorem span_lt_top_of_ncard_lt_finrank E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {s : Set M}, s.Finite → s.ncard < Module.finrank R M → Submodule.span R s < ⊤

theorem finrank_le_of_span_eq_top E1 #

∀ {R : Type u} {M : Type v} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] [StrongRankCondition R]
  {ι : Type u_2} [inst_4 : Fintype ι] {v : ι → M},
  Submodule.span R (Set.range v) = ⊤ → Module.finrank R M ≤ Fintype.card ι

theorem Pi.dim_spanSubset E0 #

∀ {R : Type u} {ι : Type w} [inst : Semiring R] [StrongRankCondition R] [inst_2 : Finite ι] {s : Set ι},
  Module.finrank R ↥(Pi.spanSubset R s) = s.ncard

theorem Subalgebra.rank_toSubmodule E0 #

∀ {F : Type u_2} {E : Type u_3} [inst : CommSemiring F] [inst_1 : Semiring E] [inst_2 : Algebra F E]
  (S : Subalgebra F E), Module.rank F ↥(Subalgebra.toSubmodule S) = Module.rank F ↥S

theorem Subalgebra.finrank_toSubmodule E0 #

∀ {F : Type u_2} {E : Type u_3} [inst : CommSemiring F] [inst_1 : Semiring E] [inst_2 : Algebra F E]
  (S : Subalgebra F E), Module.finrank F ↥(Subalgebra.toSubmodule S) = Module.finrank F ↥S

theorem subalgebra_top_rank_eq_submodule_top_rank E1 #

∀ {F : Type u_2} {E : Type u_3} [inst : CommSemiring F] [inst_1 : Semiring E] [inst_2 : Algebra F E],
  Module.rank F ↥⊤ = Module.rank F ↥⊤

theorem subalgebra_top_finrank_eq_submodule_top_finrank E1 #

∀ {F : Type u_2} {E : Type u_3} [inst : CommSemiring F] [inst_1 : Semiring E] [inst_2 : Algebra F E],
  Module.finrank F ↥⊤ = Module.finrank F ↥⊤

theorem Subalgebra.rank_top E1 #

∀ {F : Type u_2} {E : Type u_3} [inst : CommSemiring F] [inst_1 : Semiring E] [inst_2 : Algebra F E],
  Module.rank F ↥⊤ = Module.rank F E

theorem Subalgebra.rank_bot E0 #

∀ {F : Type u_2} {E : Type u_3} [inst : CommRing F] [IsDomain F] [inst_2 : Ring E] [inst_3 : Algebra F E]
  [StrongRankCondition F] [Module.IsTorsionFree F E] [Nontrivial E], Module.rank F ↥⊥ = 1

theorem Subalgebra.finrank_bot E0 #

∀ {F : Type u_2} {E : Type u_3} [inst : CommRing F] [IsDomain F] [inst_2 : Ring E] [inst_3 : Algebra F E]
  [StrongRankCondition F] [Module.IsTorsionFree F E] [Nontrivial E], Module.finrank F ↥⊥ = 1

def Module.Basis.sumQuot E1 #

{R : Type u_2} →
  {V : Type u_3} →
    [inst : CommRing R] →
      [inst_1 : AddCommGroup V] →
        [inst_2 : Module R V] →
          {W : Submodule R V} →
            {m : Type u_4} → {n : Type u_5} → Module.Basis m R ↥W → Module.Basis n R (V ⧸ W) → Module.Basis (m ⊕ n) R V

Given a basis bW of a submodule of an R-module V, and a basis bQ of the quotient V ⧸ W, this is a basis of V combining bW and a lift of bQ.

theorem Module.Basis.sumQuot_inl E0 #

∀ {R : Type u_2} {V : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] {W : Submodule R V}
  {m : Type u_4} {n : Type u_5} (bW : Module.Basis m R ↥W) (bQ : Module.Basis n R (V ⧸ W)) (i : m),
  (bW.sumQuot bQ) (Sum.inl i) = ↑(bW i)

theorem Module.Basis.sumQuot_inr E0 #

∀ {R : Type u_2} {V : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] {W : Submodule R V}
  {m : Type u_4} {n : Type u_5} (bW : Module.Basis m R ↥W) (bQ : Module.Basis n R (V ⧸ W)) (j : n),
  Submodule.Quotient.mk ((bW.sumQuot bQ) (Sum.inr j)) = bQ j

theorem Module.Basis.sumQuot_repr_left E0 #

∀ {R : Type u_2} {V : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] {W : Submodule R V}
  {m : Type u_4} {n : Type u_5} (bW : Module.Basis m R ↥W) (bQ : Module.Basis n R (V ⧸ W)) (i : m),
  (bW.sumQuot bQ).repr ↑(bW i) = fun₀ | Sum.inl i => 1

theorem Module.Basis.sumQuot_repr_inl E1 #

∀ {R : Type u_2} {V : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] {W : Submodule R V}
  {m : Type u_4} {n : Type u_5} (bW : Module.Basis m R ↥W) (bQ : Module.Basis n R (V ⧸ W)) (w : ↥W) (i : m),
  ((bW.sumQuot bQ).repr ↑w) (Sum.inl i) = (bW.repr w) i

theorem Module.Basis.sumQuot_repr_inl_of_mem E0 #

∀ {R : Type u_2} {V : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] {W : Submodule R V}
  {m : Type u_4} {n : Type u_5} (bW : Module.Basis m R ↥W) (bQ : Module.Basis n R (V ⧸ W)) (v : V) (hv : v ∈ W) (i : m),
  ((bW.sumQuot bQ).repr v) (Sum.inl i) = (bW.repr ⟨v, hv⟩) i

theorem Module.Basis.sumQuot_repr_inr E0 #

∀ {R : Type u_2} {V : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] {W : Submodule R V}
  {m : Type u_4} {n : Type u_5} (bW : Module.Basis m R ↥W) (bQ : Module.Basis n R (V ⧸ W)) (v : V) (j : n),
  ((bW.sumQuot bQ).repr v) (Sum.inr j) = (bQ.repr (W.mkQ v)) j

theorem Module.Basis.sumQuot_repr_inr_of_mem E1 #

∀ {R : Type u_2} {V : Type u_3} [inst : CommRing R] [inst_1 : AddCommGroup V] [inst_2 : Module R V] {W : Submodule R V}
  {m : Type u_4} {n : Type u_5} (bW : Module.Basis m R ↥W) (bQ : Module.Basis n R (V ⧸ W)),
  ∀ v ∈ W, ∀ (j : n), ((bW.sumQuot bQ).repr v) (Sum.inr j) = 0