Documentation

Mathlib.LinearAlgebra.Dimension

Dimension of modules and vector spaces #

Main definitions #

Main statements #

For modules over rings satisfying the rank condition

For modules over rings satisfying the strong rank condition

For modules over rings with invariant basis number (including all commutative rings and all noetherian rings)

For vector spaces (i.e. modules over a field), we have

Implementation notes #

Many theorems in this file are not universe-generic when they relate dimensions in different universes. They should be as general as they can be without inserting lifts. The types V, V', ... all live in different universes, and V₁, V₂, ... all live in the same universe.

@[irreducible]
def Module.rank (K : Type u_2) (V : Type u_3) [Semiring K] [AddCommMonoid V] [Module K V] :

The rank of a module, defined as a term of type Cardinal.

We define this as the supremum of the cardinalities of linearly independent subsets.

For a free module over any ring satisfying the strong rank condition (e.g. left-noetherian rings, commutative rings, and in particular division rings and fields), this is the same as the dimension of the space (i.e. the cardinality of any basis).

In particular this agrees with the usual notion of the dimension of a vector space.

The definition is marked as protected to avoid conflicts with _root_.rank, the rank of a linear map.

Equations
Instances For
    theorem Module.rank_def (K : Type u_2) (V : Type u_3) [Semiring K] [AddCommMonoid V] [Module K V] :
    Module.rank K V = ⨆ (ι : { s // LinearIndependent K Subtype.val }), Cardinal.mk ι
    theorem LinearMap.rank_le_of_injective {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M₁ : Type v} [AddCommGroup M₁] [Module R M₁] (f : M →ₗ[R] M₁) (i : Function.Injective f) :
    theorem rank_le {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {n : } (H : ∀ (s : Finset M), (LinearIndependent R fun i => i) → Finset.card s n) :
    Module.rank R M n
    theorem lift_rank_range_le {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M' : Type v'} [AddCommGroup M'] [Module R M'] (f : M →ₗ[R] M') :

    The rank of the range of a linear map is at most the rank of the source.

    theorem rank_range_le {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M₁ : Type v} [AddCommGroup M₁] [Module R M₁] (f : M →ₗ[R] M₁) :
    theorem lift_rank_map_le {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M' : Type v'} [AddCommGroup M'] [Module R M'] (f : M →ₗ[R] M') (p : Submodule R M) :
    theorem rank_map_le {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M₁ : Type v} [AddCommGroup M₁] [Module R M₁] (f : M →ₗ[R] M₁) (p : Submodule R M) :
    Module.rank R { x // x Submodule.map f p } Module.rank R { x // x p }
    theorem rank_le_of_submodule {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] (s : Submodule R M) (t : Submodule R M) (h : s t) :
    Module.rank R { x // x s } Module.rank R { x // x t }
    theorem LinearEquiv.lift_rank_eq {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M' : Type v'} [AddCommGroup M'] [Module R M'] (f : M ≃ₗ[R] M') :

    Two linearly equivalent vector spaces have the same dimension, a version with different universes.

    theorem LinearEquiv.rank_eq {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M₁ : Type v} [AddCommGroup M₁] [Module R M₁] (f : M ≃ₗ[R] M₁) :

    Two linearly equivalent vector spaces have the same dimension.

    theorem rank_range_of_injective {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M₁ : Type v} [AddCommGroup M₁] [Module R M₁] (f : M →ₗ[R] M₁) (h : Function.Injective f) :
    theorem LinearEquiv.rank_map_eq {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M₁ : Type v} [AddCommGroup M₁] [Module R M₁] (f : M ≃ₗ[R] M₁) (p : Submodule R M) :
    Module.rank R { x // x Submodule.map (f) p } = Module.rank R { x // x p }

    Pushforwards of submodules along a LinearEquiv have the same dimension.

    @[simp]
    theorem rank_top (R : Type u) [Ring R] (M : Type v) [AddCommGroup M] [Module R M] :
    Module.rank R { x // x } = Module.rank R M
    theorem rank_range_of_surjective {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M' : Type v'} [AddCommGroup M'] [Module R M'] (f : M →ₗ[R] M') (h : Function.Surjective f) :
    theorem rank_submodule_le {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] (s : Submodule R M) :
    Module.rank R { x // x s } Module.rank R M
    theorem LinearMap.rank_le_of_surjective {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] {M₁ : Type v} [AddCommGroup M₁] [Module R M₁] (f : M →ₗ[R] M₁) (h : Function.Surjective f) :
    theorem rank_quotient_le {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] (p : Submodule R M) :
    theorem cardinal_le_rank_of_linearIndependent {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] {ι : Type v} {v : ιM} (hv : LinearIndependent R v) :
    theorem cardinal_le_rank_of_linearIndependent' {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] {s : Set M} (hs : LinearIndependent R fun x => x) :
    @[simp]
    @[simp]
    theorem rank_bot (R : Type u) [Ring R] (M : Type v) [AddCommGroup M] [Module R M] [Nontrivial R] :
    Module.rank R { x // x } = 0
    theorem exists_mem_ne_zero_of_rank_pos {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] {s : Submodule R M} (h : 0 < Module.rank R { x // x s }) :
    b, b s b 0
    theorem LinearIndependent.finite_of_isNoetherian {ι : Type w} {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] [IsNoetherian R M] {v : ιM} (hv : LinearIndependent R v) :

    A linearly-independent family of vectors in a module over a non-trivial ring must be finite if the module is Noetherian.

    theorem LinearIndependent.set_finite_of_isNoetherian {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] [IsNoetherian R M] {s : Set M} (hi : LinearIndependent R Subtype.val) :
    theorem basis_finite_of_finite_spans {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] (w : Set M) (hw : Set.Finite w) (s : Submodule.span R w = ) {ι : Type w} (b : Basis ι R M) :

    Over any nontrivial ring, the existence of a finite spanning set implies that any basis is finite.

    theorem union_support_maximal_linearIndependent_eq_range_basis {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] {ι : Type w} (b : Basis ι R M) {κ : Type w'} (v : κM) (i : LinearIndependent R v) (m : LinearIndependent.Maximal i) :
    ⋃ (k : κ), (b.repr (v k)).support = Set.univ

    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.

    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 {R : Type u} [Ring R] {M : Type v} [AddCommGroup M] [Module R M] [Nontrivial R] {ι : Type w} (b : Basis ι R M) [Infinite ι] {κ : Type w} (v : κM) (i : LinearIndependent R v) (m : LinearIndependent.Maximal i) :

    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.

    @[simp]
    theorem rank_subsingleton {R : Type u} {M : Type v} [Ring R] [AddCommGroup M] [Module R M] [Subsingleton R] :
    theorem rank_pos {R : Type u} {M : Type v} [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] [Nontrivial M] :
    theorem rank_zero_iff_forall_zero {R : Type u} {M : Type v} [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] [Nontrivial R] :
    Module.rank R M = 0 ∀ (x : M), x = 0
    theorem rank_zero_iff {R : Type u} {M : Type v} [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] [Nontrivial R] :

    See rank_subsingleton for the reason that Nontrivial R is needed.

    theorem rank_pos_iff_exists_ne_zero {R : Type u} {M : Type v} [Ring R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] [Nontrivial R] :
    0 < Module.rank R M x, x 0
    theorem mk_eq_mk_of_basis {ι : Type w} {ι' : Type w'} {R : Type u} [Ring R] [InvariantBasisNumber R] {M : Type v} [AddCommGroup M] [Module R M] (v : Basis ι R M) (v' : Basis ι' R M) :

    The dimension theorem: if v and v' are two bases, their index types have the same cardinalities.

    def Basis.indexEquiv {ι : Type w} {ι' : Type w'} {R : Type u} [Ring R] [InvariantBasisNumber R] {M : Type v} [AddCommGroup M] [Module R M] (v : Basis ι R M) (v' : Basis ι' R M) :
    ι ι'

    Given two bases indexed by ι and ι' of an R-module, where R satisfies the invariant basis number property, an equiv ι ≃ ι' .

    Equations
    Instances For
      theorem mk_eq_mk_of_basis' {ι : Type w} {R : Type u} [Ring R] [InvariantBasisNumber R] {M : Type v} [AddCommGroup M] [Module R M] {ι' : Type w} (v : Basis ι R M) (v' : Basis ι' R M) :
      theorem Basis.le_span'' {R : Type u} [Ring R] [RankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} [Fintype ι] (b : Basis ι R M) {w : Set M} [Fintype w] (s : Submodule.span R w = ) :

      An auxiliary lemma for Basis.le_span.

      If R satisfies the rank condition, then for any finite basis b : Basis ι R M, and any finite spanning set w : Set M, the cardinality of ι is bounded by the cardinality of w.

      theorem basis_le_span' {R : Type u} [Ring R] [RankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (b : Basis ι R M) {w : Set M} [Fintype w] (s : Submodule.span R w = ) :

      Another auxiliary lemma for Basis.le_span, which does not require assuming the basis is finite, but still assumes we have a finite spanning set.

      theorem Basis.le_span {ι : Type w} {R : Type u} [Ring R] [RankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {J : Set M} (v : Basis ι R M) (hJ : Submodule.span R J = ) :

      If R satisfies the rank condition, then the cardinality of any basis is bounded by the cardinality of any spanning set.

      theorem linearIndependent_le_span_aux' {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} [Fintype ι] (v : ιM) (i : LinearIndependent R v) (w : Set M) [Fintype w] (s : Set.range v ↑(Submodule.span R w)) :
      def linearIndependentFintypeOfLeSpanFintype {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (v : ιM) (i : LinearIndependent R v) (w : Set M) [Fintype w] (s : Set.range v ↑(Submodule.span R w)) :

      If R satisfies the strong rank condition, then any linearly independent family v : ι → M contained in the span of some finite w : Set M, is itself finite.

      Equations
      Instances For
        theorem linearIndependent_le_span' {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (v : ιM) (i : LinearIndependent R v) (w : Set M) [Fintype w] (s : Set.range v ↑(Submodule.span R w)) :

        If R satisfies the strong rank condition, then for any linearly independent family v : ι → M contained in the span of some finite w : Set M, the cardinality of ι is bounded by the cardinality of w.

        theorem linearIndependent_le_span {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (v : ιM) (i : LinearIndependent R v) (w : Set M) [Fintype w] (s : Submodule.span R w = ) :

        If R satisfies the strong rank condition, then for any linearly independent family v : ι → M and any finite spanning set w : Set M, the cardinality of ι is bounded by the cardinality of w.

        theorem linearIndependent_le_span_finset {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (v : ιM) (i : LinearIndependent R v) (w : Finset M) (s : Submodule.span R w = ) :

        A version of linearIndependent_le_span for Finset.

        theorem linearIndependent_le_infinite_basis {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (b : Basis ι R M) [Infinite ι] {κ : Type u_2} (v : κM) (i : LinearIndependent R v) :

        An auxiliary lemma for linearIndependent_le_basis: we handle the case where the basis b is infinite.

        theorem linearIndependent_le_basis {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (b : Basis ι R M) {κ : Type u_2} (v : κM) (i : LinearIndependent R v) :

        Over any ring R satisfying the strong rank condition, if b is a basis for a module M, and s is a linearly independent set, then the cardinality of s is bounded by the cardinality of b.

        theorem Basis.card_le_card_of_linearIndependent_aux {R : Type u_2} [Ring R] [StrongRankCondition R] (n : ) {m : } (v : Fin mFin nR) :

        Let R satisfy the strong rank condition. If m elements of a free rank n R-module are linearly independent, then m ≤ n.

        theorem maximal_linearIndependent_eq_infinite_basis {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (b : Basis ι R M) [Infinite ι] {κ : Type u_2} (v : κM) (i : LinearIndependent R v) (m : LinearIndependent.Maximal i) :

        Over any ring R satisfying the strong rank condition, if b is an infinite basis for a module M, then every maximal linearly independent set has the same cardinality as b.

        This proof (along with some of the lemmas above) comes from [Les familles libres maximales d'un module ont-elles le meme cardinal?][lazarus1973]

        theorem Basis.mk_eq_rank'' {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type v} (v : Basis ι R M) :
        theorem Basis.mk_range_eq_rank {ι : Type w} {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] (v : Basis ι R M) :
        theorem rank_eq_card_basis {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type w} [Fintype ι] (h : Basis ι R M) :

        If a vector space has a finite basis, then its dimension (seen as a cardinal) is equal to the cardinality of the basis.

        theorem Basis.card_le_card_of_linearIndependent {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} [Fintype ι] (b : Basis ι R M) {ι' : Type u_3} [Fintype ι'] {v : ι'M} (hv : LinearIndependent R v) :
        theorem Basis.card_le_card_of_submodule {ι : Type w} {ι' : Type w'} {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] (N : Submodule R M) [Fintype ι] (b : Basis ι R M) [Fintype ι'] (b' : Basis ι' R { x // x N }) :
        theorem Basis.card_le_card_of_le {ι : Type w} {ι' : Type w'} {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {N : Submodule R M} {O : Submodule R M} (hNO : N O) [Fintype ι] (b : Basis ι R { x // x O }) [Fintype ι'] (b' : Basis ι' R { x // x N }) :

        If a module has a finite dimension, all bases are indexed by a finite type.

        noncomputable def Basis.fintypeIndexOfRankLtAleph0 {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} (b : Basis ι R M) (h : Module.rank R M < Cardinal.aleph0) :

        If a module has a finite dimension, all bases are indexed by a finite type.

        Equations
        Instances For
          theorem Basis.finite_index_of_rank_lt_aleph0 {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {ι : Type u_2} {s : Set ι} (b : Basis (s) R M) (h : Module.rank R M < Cardinal.aleph0) :

          If a module has a finite dimension, all bases are indexed by a finite set.

          theorem rank_span {ι : Type w} {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {v : ιM} (hv : LinearIndependent R v) :
          theorem rank_span_set {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] {s : Set M} (hs : LinearIndependent R fun x => x) :
          def Submodule.inductionOnRank {ι : Type w} {R : Type u} [Ring R] [StrongRankCondition R] {M : Type v} [AddCommGroup M] [Module R M] [IsDomain R] [Fintype ι] (b : Basis ι R M) (P : Submodule R MSort u_2) (ih : (N : Submodule R M) → ((N' : Submodule R M) → N' N(x : M) → x N(∀ (c : R) (y : M), y N'c x + y = 0c = 0) → P N') → P N) (N : Submodule R M) :
          P N

          An induction (and recursion) principle for proving results about all submodules of a fixed finite free module M. A property is true for all submodules of M if it satisfies the following "inductive step": the property is true for a submodule N if it's true for all submodules N' of N with the property that there exists 0 ≠ x ∈ N such that the sum N' + Rx is direct.

          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Ideal.rank_eq {R : Type u_2} {S : Type u_3} [CommRing R] [StrongRankCondition R] [Ring S] [IsDomain S] [Algebra R S] {n : Type u_4} {m : Type u_5} [Fintype n] [Fintype m] (b : Basis n R S) {I : Ideal S} (hI : I ) (c : Basis m R { x // x I }) :

            If S a module-finite free R-algebra, then the R-rank of a nonzero R-free ideal I of S is the same as the rank of S.

            @[simp]
            theorem rank_self (R : Type u) [Ring R] [StrongRankCondition R] :

            The rank of a free module M over R is the cardinality of ChooseBasisIndex R M.

            The rank of a free module V over an infinite scalar ring K is the cardinality of V whenever #R < #V.

            Two vector spaces are isomorphic if they have the same dimension.

            theorem nonempty_linearEquiv_of_rank_eq {K : Type u} {V : Type v} {V₁ : Type v} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V] [Module.Free K V] [AddCommGroup V₁] [Module K V₁] [Module.Free K V₁] (cond : Module.rank K V = Module.rank K V₁) :
            Nonempty (V ≃ₗ[K] V₁)

            Two vector spaces are isomorphic if they have the same dimension.

            Two vector spaces are isomorphic if they have the same dimension.

            Equations
            Instances For
              def LinearEquiv.ofRankEq {K : Type u} (V : Type v) (V₁ : Type v) [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V] [Module.Free K V] [AddCommGroup V₁] [Module K V₁] [Module.Free K V₁] (cond : Module.rank K V = Module.rank K V₁) :
              V ≃ₗ[K] V₁

              Two vector spaces are isomorphic if they have the same dimension.

              Equations
              Instances For

                Two vector spaces are isomorphic if and only if they have the same dimension.

                theorem LinearEquiv.nonempty_equiv_iff_rank_eq {K : Type u} {V : Type v} {V₁ : Type v} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V] [Module.Free K V] [AddCommGroup V₁] [Module K V₁] [Module.Free K V₁] :

                Two vector spaces are isomorphic if and only if they have the same dimension.

                @[simp]

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

                theorem rank_prod' {K : Type u} {V : Type v} {V₁ : Type v} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V] [Module.Free K V] [AddCommGroup V₁] [Module K V₁] [Module.Free K V₁] :
                Module.rank K (V × V₁) = Module.rank K V + Module.rank K V₁

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

                @[simp]
                @[simp]
                theorem rank_pi {K : Type u} {η : Type u₁'} {φ : ηType u_1} [Ring K] [StrongRankCondition K] [(i : η) → AddCommGroup (φ i)] [(i : η) → Module K (φ i)] [∀ (i : η), Module.Free K (φ i)] [Finite η] :
                Module.rank K ((i : η) → φ i) = Cardinal.sum fun i => Module.rank K (φ i)

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

                theorem rank_fun {K : Type u} [Ring K] [StrongRankCondition K] {V : Type u} {η : Type u} [Fintype η] [AddCommGroup V] [Module K V] [Module.Free K V] :
                Module.rank K (ηV) = ↑(Fintype.card η) * Module.rank K V
                theorem rank_fun_eq_lift_mul {K : Type u} {V : Type v} {η : Type u₁'} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V] [Module.Free K V] [Fintype η] :
                theorem rank_fun' {K : Type u} {η : Type u₁'} [Ring K] [StrongRankCondition K] [Fintype η] :
                Module.rank K (ηK) = ↑(Fintype.card η)
                theorem rank_fin_fun {K : Type u} [Ring K] [StrongRankCondition K] (n : ) :
                Module.rank K (Fin nK) = n
                def finDimVectorspaceEquiv {K : Type u} {V : Type v} [Ring K] [StrongRankCondition K] [AddCommGroup V] [Module K V] [Module.Free K V] (n : ) (hn : Module.rank K V = n) :
                V ≃ₗ[K] Fin nK

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

                Equations
                • One or more equations did not get rendered due to their size.
                Instances For

                  If a vector space has a finite dimension, the index set of Basis.ofVectorSpace is finite.

                  theorem rank_span_le {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (s : Set V) :
                  theorem rank_span_of_finset {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (s : Finset V) :
                  theorem rank_quotient_add_rank {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (p : Submodule K V) :
                  Module.rank K (V p) + Module.rank K { x // x p } = Module.rank K V
                  theorem rank_range_add_rank_ker {K : Type u} {V : Type v} {V₁ : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] [AddCommGroup V₁] [Module K V₁] (f : V →ₗ[K] V₁) :

                  rank-nullity theorem

                  theorem rank_eq_of_surjective {K : Type u} {V : Type v} {V₁ : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] [AddCommGroup V₁] [Module K V₁] (f : V →ₗ[K] V₁) (h : Function.Surjective f) :
                  theorem exists_linearIndependent_cons_of_lt_rank {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] {n : } {v : Fin nV} (hv : LinearIndependent K v) (h : n < Module.rank K V) :

                  Given a family of n linearly independent vectors in a space of dimension > n, one may extend the family by another vector while retaining linear independence.

                  theorem exists_linearIndependent_snoc_of_lt_rank {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] {n : } {v : Fin nV} (hv : LinearIndependent K v) (h : n < Module.rank K V) :

                  Given a family of n linearly independent vectors in a space of dimension > n, one may extend the family by another vector while retaining linear independence.

                  theorem exists_linearIndependent_pair_of_one_lt_rank {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (h : 1 < Module.rank K V) {x : V} (hx : x 0) :
                  y, LinearIndependent K ![x, y]

                  Given a nonzero vector in a space of dimension > 1, one may find another vector linearly independent of the first one.

                  theorem rank_add_rank_split {K : Type u} {V : Type v} {V₁ : Type v} {V₂ : Type v} {V₃ : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] [AddCommGroup V₁] [Module K V₁] [AddCommGroup V₂] [Module K V₂] [AddCommGroup V₃] [Module K V₃] (db : V₂ →ₗ[K] V) (eb : V₃ →ₗ[K] V) (cd : V₁ →ₗ[K] V₂) (ce : V₁ →ₗ[K] V₃) (hde : LinearMap.range db LinearMap.range eb) (hgd : LinearMap.ker cd = ) (eq : LinearMap.comp db cd = LinearMap.comp eb ce) (eq₂ : ∀ (d : V₂) (e : V₃), db d = eb ec, cd c = d ce c = e) :

                  This is mostly an auxiliary lemma for Submodule.rank_sup_add_rank_inf_eq.

                  theorem Submodule.rank_sup_add_rank_inf_eq {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (s : Submodule K V) (t : Submodule K V) :
                  Module.rank K { x // x s t } + Module.rank K { x // x s t } = Module.rank K { x // x s } + Module.rank K { x // x t }
                  theorem Submodule.rank_add_le_rank_add_rank {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (s : Submodule K V) (t : Submodule K V) :
                  Module.rank K { x // x s t } Module.rank K { x // x s } + Module.rank K { x // x t }
                  def Basis.ofRankEqZero {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] {ι : Type u_2} [IsEmpty ι] (hV : Module.rank K V = 0) :
                  Basis ι K V

                  The ι indexed basis on V, where ι is an empty type and V is zero-dimensional.

                  See also FiniteDimensional.finBasis.

                  Equations
                  Instances For
                    @[simp]
                    theorem Basis.ofRankEqZero_apply {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] {ι : Type u_2} [IsEmpty ι] (hV : Module.rank K V = 0) (i : ι) :
                    ↑(Basis.ofRankEqZero hV) i = 0
                    theorem rank_le_one_iff {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] :
                    Module.rank K V 1 v₀, ∀ (v : V), r, r v₀ = v

                    A vector space has dimension at most 1 if and only if there is a single vector of which all vectors are multiples.

                    theorem rank_submodule_le_one_iff {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (s : Submodule K V) :
                    Module.rank K { x // x s } 1 v₀, v₀ s s Submodule.span K {v₀}

                    A submodule has dimension at most 1 if and only if there is a single vector in the submodule such that the submodule is contained in its span.

                    theorem rank_submodule_le_one_iff' {K : Type u} {V : Type v} [DivisionRing K] [AddCommGroup V] [Module K V] (s : Submodule K V) :
                    Module.rank K { x // x s } 1 v₀, s Submodule.span K {v₀}

                    A submodule has dimension at most 1 if and only if there is a single vector, not necessarily in the submodule, such that the submodule is contained in its span.

                    The rank of a linear map #

                    @[inline, reducible]
                    abbrev LinearMap.rank {K : Type u} {V : Type v} {V' : Type v'} [Ring K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] (f : V →ₗ[K] V') :

                    rank f is the rank of a LinearMap f, defined as the dimension of f.range.

                    Equations
                    Instances For
                      theorem LinearMap.rank_le_range {K : Type u} {V : Type v} {V' : Type v'} [Ring K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] (f : V →ₗ[K] V') :
                      theorem LinearMap.rank_le_domain {K : Type u} {V : Type v} {V₁ : Type v} [Ring K] [AddCommGroup V] [Module K V] [AddCommGroup V₁] [Module K V₁] (f : V →ₗ[K] V₁) :
                      @[simp]
                      theorem LinearMap.rank_zero {K : Type u} {V : Type v} {V' : Type v'} [Ring K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] [Nontrivial K] :
                      theorem LinearMap.rank_comp_le_left {K : Type u} {V : Type v} {V' : Type v'} {V'' : Type v''} [Ring K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] [AddCommGroup V''] [Module K V''] (g : V →ₗ[K] V') (f : V' →ₗ[K] V'') :

                      The rank of the composition of two maps is less than the minimum of their ranks.

                      theorem LinearMap.rank_comp_le_right {K : Type u} {V : Type v} {V' : Type v'} {V'₁ : Type v'} [Ring K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] [AddCommGroup V'₁] [Module K V'₁] (g : V →ₗ[K] V') (f : V' →ₗ[K] V'₁) :
                      theorem LinearMap.rank_comp_le {K : Type u} {V : Type v} {V' : Type v'} {V'₁ : Type v'} [Ring K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] [AddCommGroup V'₁] [Module K V'₁] (g : V →ₗ[K] V') (f : V' →ₗ[K] V'₁) :

                      The rank of the composition of two maps is less than the minimum of their ranks.

                      See lift_rank_comp_le for the universe-polymorphic version.

                      theorem LinearMap.rank_add_le {K : Type u} {V : Type v} {V' : Type v'} [DivisionRing K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] (f : V →ₗ[K] V') (g : V →ₗ[K] V') :
                      theorem LinearMap.rank_finset_sum_le {K : Type u} {V : Type v} {V' : Type v'} [DivisionRing K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] {η : Type u_2} (s : Finset η) (f : ηV →ₗ[K] V') :
                      LinearMap.rank (Finset.sum s fun d => f d) Finset.sum s fun d => LinearMap.rank (f d)
                      theorem LinearMap.le_rank_iff_exists_linearIndependent_finset {K : Type u} {V : Type v} {V' : Type v'} [DivisionRing K] [AddCommGroup V] [Module K V] [AddCommGroup V'] [Module K V'] {n : } {f : V →ₗ[K] V'} :
                      n LinearMap.rank f s, Finset.card s = n LinearIndependent K fun x => f x