Linear independence and bases
This file defines linear independence and bases in a module or vector space.
It is inspired by Isabelle/HOL's linear algebra, and hence indirectly by HOL Light.
Main definitions
All definitions are given for families of vectors, i.e. v : ι → M where M is the module or
vector space and ι : Type* is an arbitrary indexing type.
- linear_independent R vstates that the elements of the family- vare linearly independent.
- linear_independent.repr hv xreturns the linear combination representing- x : span R (range v)on the linearly independent vectors- v, given- hv : linear_independent R v(using classical choice).- linear_independent.repr hvis provided as a linear map.
- is_basis R vstates that the vector family- vis a basis, i.e. it is linearly independent and spans the entire space.
- is_basis.repr hv xis the basis version of- linear_independent.repr hv x. It returns the linear combination representing- x : Mon a basis- vof- M(using classical choice). The argument- hvmust be a proof that- is_basis R v.- is_basis.repr hvis given as a linear map as well.
- is_basis.constr hv fconstructs a linear map- M₁ →ₗ[R] M₂given the values- f : ι → M₂at the basis- v : ι → M₁, given- hv : is_basis R v.
Main statements
- is_basis.extstates that two linear maps are equal if they coincide on a basis.
- exists_is_basisstates that every vector space has a basis.
Implementation notes
We use families instead of sets because it allows us to say that two identical vectors are linearly
dependent. For bases, this is useful as well because we can easily derive ordered bases by using an
ordered index type ι.
If you want to use sets, use the family (λ x, x : s → M) given a set s : set M. The lemmas
linear_independent.to_subtype_range and linear_independent.of_subtype_range connect those two
worlds.
Tags
linearly dependent, linear dependence, linearly independent, linear independence, basis
Linearly independent family of vectors
Equations
- linear_independent R v = ((finsupp.total ι M R v).ker = ⊥)
The following lemmas use the subtype defined by a set in M as the index set ι.
Canonical isomorphism between linear combinations and the span of linearly independent vectors.
Equations
- hv.total_equiv = linear_equiv.of_bijective (linear_map.cod_restrict (submodule.span R (set.range v)) (finsupp.total ι M R v) linear_independent.total_equiv._proof_1) _ linear_independent.total_equiv._proof_3
Linear combination representing a vector in the span of linearly independent vectors.
Given a family of linearly independent vectors, we can represent any vector in their span as
a linear combination of these vectors. These are provided by this linear map.
It is simply one direction of linear_independent.total_equiv.
Equations
- hv.repr = ↑(hv.total_equiv.symm)
Dedekind's linear independence of characters
A family of vectors is a basis if it is linearly independent and all vectors are in the span.
Equations
- is_basis R v = (linear_independent R v ∧ submodule.span R (set.range v) = ⊤)
Given a basis, any vector can be written as a linear combination of the basis vectors. They are
given by this linear map. This is one direction of module_equiv_finsupp.
Equations
- hv.repr = _.repr.comp (linear_map.cod_restrict (submodule.span R (set.range v)) linear_map.id _)
Construct a linear map given the value at the basis.
Equations
- hv.constr f = (finsupp.total M' M' R id).comp ((finsupp.lmap_domain R R f).comp hv.repr)
Canonical equivalence between a module and the linear combinations of basis vectors.
Equations
- module_equiv_finsupp hv = (_.total_equiv.trans (linear_equiv.of_top (submodule.span R (set.range v)) _)).symm
Isomorphism between the two modules, given two modules M and M' with respective bases
v and v' and a bijection between the indexing sets of the two bases.
Isomorphism between the two modules, given two modules M and M' with respective bases
v and v' and a bijection between the two bases.
A module over R with a finite basis is linearly equivalent to functions from its basis to R.
Equations
- equiv_fun_basis h = (module_equiv_finsupp h).trans {to_fun := finsupp.to_fun (mul_zero_class.to_has_zero R), map_add' := _, map_smul' := _, inv_fun := finsupp.equiv_fun_on_fintype.inv_fun, left_inv := _, right_inv := _}
A module over a finite ring that admits a finite basis is finite.
Equations
- module.fintype_of_fintype h = fintype.of_equiv (ι → R) (equiv_fun_basis h).to_equiv.symm
Given a basis v indexed by ι, the canonical linear equivalence between ι → R and M maps
a function x : ι → R to the linear combination ∑_i x i • v i.