The rank nullity theorem #
In this file we provide the rank nullity theorem as a typeclass, and prove various corollaries
of the theorem. The main definition is HasRankNullity.{u} R
, which states that
- Every
R
-moduleM : Type u
has a linear independent subset of cardinalityModule.rank R M
. rank (M ⧸ N) + rank N = rank M
for everyR
-moduleM : Type u
and everyN : Submodule R M
.
The following instances are provided in mathlib:
DivisionRing.hasRankNullity
for division rings inLinearAlgebra/Dimension/DivisionRing.lean
.IsDomain.hasRankNullity
for commutative domains inLinearAlgebra/Dimension/Localization.lean
.
TODO: prove the rank-nullity theorem for [Ring R] [IsDomain R] [StrongRankCondition R]
.
See nonempty_oreSet_of_strongRankCondition
for a start.
HasRankNullity.{u}
is a class of rings satisfying
- Every
R
-moduleM : Type u
has a linear independent subset of cardinalityModule.rank R M
. rank (M ⧸ N) + rank N = rank M
for everyR
-moduleM : Type u
and everyN : Submodule R M
.
Usually such a ring satisfies HasRankNullity.{w}
for all universes w
, and the universe
argument is there because of technical limitations to universe polymorphism.
See DivisionRing.hasRankNullity
and IsDomain.hasRankNullity
.
- exists_set_linearIndependent : ∀ (M : Type u) [inst_1 : AddCommGroup M] [inst_2 : Module R M], ∃ (s : Set M), Cardinal.mk ↑s = Module.rank R M ∧ LinearIndependent (ι := ↑s) R Subtype.val
- rank_quotient_add_rank : ∀ {M : Type u} [inst_1 : AddCommGroup M] [inst_2 : Module R M] (N : Submodule R M), Module.rank R (M ⧸ N) + Module.rank R ↥N = Module.rank R M
Instances
Equations
- ⋯ = ⋯
The rank-nullity theorem
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.
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.
Given a nonzero vector in a space of dimension > 1
, one may find another vector linearly
independent of the first one.
Given a family of n
linearly independent vectors in a finite-dimensional space of
dimension > n
, one may extend the family by another vector while retaining linear independence.
Given a family of n
linearly independent vectors in a finite-dimensional space of
dimension > n
, one may extend the family by another vector while retaining linear independence.
Given a nonzero vector in a finite-dimensional space of dimension > 1
, one may find another
vector linearly independent of the first one.