Dimension of modules and vector spaces #
Main definitions #
-
The rank of a module is defined as
Module.rank : Cardinal
. This is defined as the supremum of the cardinalities of linearly independent subsets. -
The rank of a linear map is defined as the rank of its range.
Main statements #
LinearMap.rank_le_of_injective
: the source of an injective linear map has dimension at most that of the target.LinearMap.rank_le_of_surjective
: the target of a surjective linear map has dimension at most that of that source.basis_finite_of_finite_spans
: the existence of a finite spanning set implies that any basis is finite.infinite_basis_le_maximal_linearIndependent
: ifb
is an infinite basis for a moduleM
, ands
is a maximal linearly independent set, then the cardinality ofb
is bounded by the cardinality ofs
.
For modules over rings satisfying the rank condition
Basis.le_span
: the cardinality of a basis is bounded by the cardinality of any spanning set
For modules over rings satisfying the strong rank condition
linearIndependent_le_span
: For any linearly independent familyv : ι → M
and any finite spanning setw : Set M
, the cardinality ofι
is bounded by the cardinality ofw
.linearIndependent_le_basis
: Ifb
is a basis for a moduleM
, ands
is a linearly independent set, then the cardinality ofs
is bounded by the cardinality ofb
.
For modules over rings with invariant basis number (including all commutative rings and all noetherian rings)
mk_eq_mk_of_basis
: the dimension theorem, any two bases of the same vector space have the same cardinality.
For vector spaces (i.e. modules over a field), we have
rank_quotient_add_rank
: ifV₁
is a submodule ofV
, thenModule.rank (V/V₁) + Module.rank V₁ = Module.rank V
.rank_range_add_rank_ker
: the rank-nullity theorem.
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 lift
s. The types V
, V'
, ... all live in different universes,
and V₁
, V₂
, ... all live in the same universe.
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
The rank of the range of a linear map is at most the rank of the source.
Two linearly equivalent vector spaces have the same dimension, a version with different universes.
Two linearly equivalent vector spaces have the same dimension.
Pushforwards of submodules along a LinearEquiv
have the same dimension.
A linearly-independent family of vectors in a module over a non-trivial ring must be finite if the module is Noetherian.
Over any nontrivial ring, the existence of a finite spanning set implies that any basis is finite.
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
.
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
.
See rank_subsingleton
for the reason that Nontrivial R
is needed.
The dimension theorem: if v
and v'
are two bases, their index types
have the same cardinalities.
Given two bases indexed by ι
and ι'
of an R
-module, where R
satisfies the invariant
basis number property, an equiv ι ≃ ι'
.
Equations
- Basis.indexEquiv v v' = Nonempty.some (_ : Nonempty (ι ≃ ι'))
Instances For
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
.
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.
If R
satisfies the rank condition,
then the cardinality of any basis is bounded by the cardinality of any spanning set.
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
- linearIndependentFintypeOfLeSpanFintype v i w s = fintypeOfFinsetCardLe (Fintype.card ↑w) (_ : ∀ (t : Finset ι), Finset.card t ≤ Fintype.card ↑w)
Instances For
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
.
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
.
A version of linearIndependent_le_span
for Finset
.
An auxiliary lemma for linearIndependent_le_basis
:
we handle the case where the basis b
is infinite.
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
.
Let R
satisfy the strong rank condition. If m
elements of a free rank n
R
-module are
linearly independent, then m ≤ n
.
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]
If a vector space has a finite basis, then its dimension (seen as a cardinal) is equal to the cardinality of the basis.
If a module has a finite dimension, all bases are indexed by a finite type.
If a module has a finite dimension, all bases are indexed by a finite type.
Equations
- Basis.fintypeIndexOfRankLtAleph0 b h = Classical.choice (_ : Nonempty (Fintype ι))
Instances For
If a module has a finite dimension, all bases are indexed by a finite set.
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
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
.
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.
Two vector spaces are isomorphic if they have the same dimension.
Two vector spaces are isomorphic if they have the same dimension.
Equations
- LinearEquiv.ofLiftRankEq V V' cond = Classical.choice (_ : Nonempty (V ≃ₗ[K] V'))
Instances For
Two vector spaces are isomorphic if they have the same dimension.
Equations
- LinearEquiv.ofRankEq V V₁ cond = Classical.choice (_ : Nonempty (V ≃ₗ[K] V₁))
Instances For
Two vector spaces are isomorphic if and only if they have the same dimension.
Two vector spaces are isomorphic if and only if they have the same dimension.
If M
and N
are free, then the rank of M × N
is
(Module.rank R M).lift + (Module.rank R N).lift
.
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)
.
The rank of a finite product of free modules is the sum of the ranks.
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.
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.
This is mostly an auxiliary lemma for Submodule.rank_sup_add_rank_inf_eq
.
The ι
indexed basis on V
, where ι
is an empty type and V
is zero-dimensional.
See also FiniteDimensional.finBasis
.
Equations
Instances For
A vector space has dimension at most 1
if and only if there is a
single vector of which all vectors are multiples.
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.
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 #
rank f
is the rank of a LinearMap
f
, defined as the dimension of f.range
.
Equations
- LinearMap.rank f = Module.rank K { x // x ∈ LinearMap.range f }
Instances For
The rank of the composition of two maps is less than the minimum of their ranks.
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.