Linear independence #
This file defines linear independence in a module or vector space.
It is inspired by Isabelle/HOL's linear algebra, and hence indirectly by HOL Light.
We define LinearIndependent R v
as ker (Finsupp.total ι M R v) = ⊥
. Here Finsupp.total
is the
linear map sending a function f : ι →₀ R
with finite support to the linear combination of vectors
from v
with these coefficients. Then we prove that several other statements are equivalent to this
one, including injectivity of Finsupp.total ι M R v
and some versions with explicitly written
linear combinations.
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.
-
LinearIndependent R v
states that the elements of the familyv
are linearly independent. -
LinearIndependent.repr hv x
returns the linear combination representingx : span R (range v)
on the linearly independent vectorsv
, givenhv : LinearIndependent R v
(using classical choice).LinearIndependent.repr hv
is provided as a linear map.
Main statements #
We prove several specialized tests for linear independence of families of vectors and of sets of vectors.
Fintype.linearIndependent_iff
: ifι
is a finite type, then any functionf : ι → R
has finite support, so we can reformulate the statement using∑ i : ι, f i • v i
instead of a sum over an auxiliarys : Finset ι
;linearIndependent_empty_type
: a family indexed by an empty type is linearly independent;linearIndependent_unique_iff
: ifι
is a singleton, thenLinearIndependent K v
is equivalent tov default ≠ 0
;linearIndependent_option
,linearIndependent_sum
,linearIndependent_fin_cons
,linearIndependent_fin_succ
: type-specific tests for linear independence of families of vector fields;linearIndependent_insert
,linearIndependent_union
,linearIndependent_pair
,linearIndependent_singleton
: linear independence tests for set operations.
In many cases we additionally provide dot-style operations (e.g., LinearIndependent.union
) to
make the linear independence tests usable as hv.insert ha
etc.
We also prove that, when working over a division ring, any family of vectors includes a linear independent subfamily spanning the same subspace.
Implementation notes #
We use families instead of sets because it allows us to say that two identical vectors are linearly dependent.
If you want to use sets, use the family (fun x ↦ x : s → M)
given a set s : Set M
. The lemmas
LinearIndependent.to_subtype_range
and LinearIndependent.of_subtype_range
connect those two
worlds.
Tags #
linearly dependent, linear dependence, linearly independent, linear independence
LinearIndependent R v
states the family of vectors v
is linearly independent over R
.
Equations
- LinearIndependent R v = (LinearMap.ker (Finsupp.total ι M R v) = ⊥)
Instances For
A finite family of vectors v i
is linear independent iff the linear map that sends
c : ι → R
to ∑ i, c i • v i
has the trivial kernel.
A subfamily of a linearly independent family (i.e., a composition with an injective map) is a linearly independent family.
If v
is a linearly independent family of vectors and the kernel of a linear map f
is
disjoint with the submodule spanned by the vectors of v
, then f ∘ v
is a linearly independent
family of vectors. See also LinearIndependent.map'
for a special case assuming ker f = ⊥
.
If v
is an injective family of vectors such that f ∘ v
is linearly independent, then v
spans a submodule disjoint from the kernel of f
An injective linear map sends linearly independent families of vectors to linearly independent
families of vectors. See also LinearIndependent.map
for a more general statement.
If the image of a family of vectors under a linear map is linearly independent, then so is the original family.
If f
is an injective linear map, then the family f ∘ v
is linearly independent
if and only if the family v
is linearly independent.
Alias of the forward direction of linearIndependent_subtype_range
.
See LinearIndependent.fin_cons
for a family of elements in a vector space.
A set of linearly independent vectors in a module M
over a semiring K
is also linearly
independent over a subring R
of K
.
The implementation uses minimal assumptions about the relationship between R
, K
and M
.
The version where K
is an R
-algebra is LinearIndependent.restrict_scalars_algebras
.
Every finite subset of a linearly independent set is linearly independent.
If every finite set of linearly independent vectors has cardinality at most n
,
then the same is true for arbitrary sets of linearly independent vectors.
The following lemmas use the subtype defined by a set in M
as the index set ι
.
A version of linearDependent_comp_subtype'
with Finsupp.total
unfolded.
Alias of the forward direction of linearIndependent_iff_injective_total
.
If two vectors x
and y
are linearly independent, so are their linear combinations
a x + b y
and c x + d y
provided the determinant a * d - b * c
is nonzero.
A linearly independent family is maximal if there is no strictly larger linearly independent family.
Equations
- LinearIndependent.Maximal _i = ∀ (s : Set M), LinearIndependent R Subtype.val → Set.range v ≤ s → Set.range v = s
Instances For
An alternative characterization of a maximal linearly independent family,
quantifying over types (in the same universe as M
) into which the indexing family injects.
Linear independent families are injective, even if you multiply either side.
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
- One or more equations did not get rendered due to their size.
Instances For
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 LinearIndependent.total_equiv
.
Equations
Instances For
See also CompleteLattice.independent_iff_linearIndependent_of_ne_zero
.
Dedekind's linear independence of characters
Alias of the reverse direction of linearIndependent_unique_iff
.
Properties which require DivisionRing K
#
These can be considered generalizations of properties of linear independence in vector spaces.
See LinearIndependent.fin_cons'
for an uglier version that works if you
only have a module over a semiring.
LinearIndependent.extend
adds vectors to a linear independent set s ⊆ t
until it spans
all elements of t
.
Equations
- LinearIndependent.extend hs hst = Classical.choose (_ : ∃ b x, s ⊆ b ∧ t ⊆ ↑(Submodule.span K b) ∧ LinearIndependent K Subtype.val)