# mathlibdocumentation

linear_algebra.linear_independent

# 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 linear_independent 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.

• linear_independent R v states that the elements of the family v are linearly independent.

• linear_independent.repr hv x returns 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 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.linear_independent_iff: if ι is a finite type, then any function f : ι → R has finite support, so we can reformulate the statement using ∑ i : ι, f i • v i instead of a sum over an auxiliary s : finset ι;
• linear_independent_empty_type: a family indexed by an empty type is linearly independent;
• linear_independent_unique_iff: if ι is a singleton, then linear_independent K v is equivalent to v default ≠ 0;
• linear_independent_option,linear_independent_sum,linear_independent_fin_cons,linear_independent_fin_succ: type-specific tests for linear independence of families of vector fields;
• linear_independent_insert, linear_independent_union, linear_independent_pair, linear_independent_singleton: linear independence tests for set operations.

In many cases we additionally provide dot-style operations (e.g., linear_independent.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 (λ 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

def linear_independent {ι : Type u_1} (R : Type u_3) {M : Type u_5} (v : ι → M) [semiring R] [ M] :
Prop

linear_independent R v states the family of vectors v is linearly independent over R.

Equations
theorem linear_independent_iff {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] :
∀ (l : ι →₀ R), M R v) l = 0l = 0
theorem linear_independent_iff' {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] :
∀ (s : finset ι) (g : ι → R), s.sum (λ (i : ι), g i v i) = 0∀ (i : ι), i sg i = 0
theorem linear_independent_iff'' {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] :
∀ (s : finset ι) (g : ι → R), (∀ (i : ι), i sg i = 0)s.sum (λ (i : ι), g i v i) = 0∀ (i : ι), g i = 0
theorem not_linear_independent_iff {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] :
∃ (s : finset ι) (g : ι → R), s.sum (λ (i : ι), g i v i) = 0 ∃ (i : ι) (H : i s), g i 0
theorem fintype.linear_independent_iff {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] [fintype ι] :
∀ (g : ι → R), finset.univ.sum (λ (i : ι), g i v i) = 0∀ (i : ι), g i = 0
theorem fintype.linear_independent_iff' {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] [fintype ι] :
linear_map.ker ( (λ (i : ι), R) ) (λ (i : ι), linear_map.id.smul_right (v i))) =

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.

theorem fintype.not_linear_independent_iff {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] [fintype ι] :
∃ (g : ι → R), finset.univ.sum (λ (i : ι), g i v i) = 0 ∃ (i : ι), g i 0
theorem linear_independent_empty_type {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] [is_empty ι] :
theorem linear_independent.ne_zero {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] [nontrivial R] (i : ι) (hv : v) :
v i 0
theorem linear_independent.comp {ι : Type u_1} {ι' : Type u_2} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] (h : v) (f : ι' → ι) (hf : function.injective f) :
(v f)

A subfamily of a linearly independent family (i.e., a composition with an injective map) is a linearly independent family.

theorem linear_independent.coe_range {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] (i : v) :
theorem linear_independent.map {ι : Type u_1} {R : Type u_3} {M : Type u_5} {M' : Type u_6} {v : ι → M} [semiring R] [add_comm_monoid M'] [ M] [ M'] (hv : v) {f : M →ₗ[R] M'} (hf_inj : disjoint (set.range v)) ) :
(f v)

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 linear_independent.map' for a special case assuming ker f = ⊥.

theorem linear_independent.map' {ι : Type u_1} {R : Type u_3} {M : Type u_5} {M' : Type u_6} {v : ι → M} [semiring R] [add_comm_monoid M'] [ M] [ M'] (hv : v) (f : M →ₗ[R] M') (hf_inj : = ) :
(f v)

An injective linear map sends linearly independent families of vectors to linearly independent families of vectors. See also linear_independent.map for a more general statement.

theorem linear_independent.of_comp {ι : Type u_1} {R : Type u_3} {M : Type u_5} {M' : Type u_6} {v : ι → M} [semiring R] [add_comm_monoid M'] [ M] [ M'] (f : M →ₗ[R] M') (hfv : (f v)) :

If the image of a family of vectors under a linear map is linearly independent, then so is the original family.

@[protected]
theorem linear_map.linear_independent_iff {ι : Type u_1} {R : Type u_3} {M : Type u_5} {M' : Type u_6} {v : ι → M} [semiring R] [add_comm_monoid M'] [ M] [ M'] (f : M →ₗ[R] M') (hf_inj : = ) :
(f v)

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.

theorem linear_independent_of_subsingleton {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] [subsingleton R] :
theorem linear_independent_equiv {ι : Type u_1} {ι' : Type u_2} {R : Type u_3} {M : Type u_5} [semiring R] [ M] (e : ι ι') {f : ι' → M} :
(f e)
theorem linear_independent_equiv' {ι : Type u_1} {ι' : Type u_2} {R : Type u_3} {M : Type u_5} [semiring R] [ M] (e : ι ι') {f : ι' → M} {g : ι → M} (h : f e = g) :
theorem linear_independent_subtype_range {R : Type u_3} {M : Type u_5} [semiring R] [ M] {ι : Type u_1} {f : ι → M} (hf : function.injective f) :
theorem linear_independent.of_subtype_range {R : Type u_3} {M : Type u_5} [semiring R] [ M] {ι : Type u_1} {f : ι → M} (hf : function.injective f) :

Alias of the forward direction of linear_independent_subtype_range.

theorem linear_independent_image {R : Type u_3} {M : Type u_5} [semiring R] [ M] {ι : Type u_1} {s : set ι} {f : ι → M} (hf : s) :
(λ (x : s), f x) (λ (x : (f '' s)), x)
theorem linear_independent_span {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] (hs : v) :
(λ (i : ι), v i, _⟩)
theorem linear_independent.fin_cons' {R : Type u_3} {M : Type u_5} [semiring R] [ M] {m : } (x : M) (v : fin m → M) (hli : v) (x_ortho : ∀ (c : R) (y : (set.range v))), c x + y = 0c = 0) :
(fin.cons x v)

See linear_independent.fin_cons for a family of elements in a vector space.

theorem linear_independent.restrict_scalars {ι : Type u_1} {R : Type u_3} {K : Type u_4} {M : Type u_5} {v : ι → M} [semiring R] [ M] [semiring K] [ K] [ M] [ M] (hinj : function.injective (λ (r : R), r 1)) (li : v) :

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 linear_independent.restrict_scalars_algebras.

theorem linear_independent_finset_map_embedding_subtype {R : Type u_3} {M : Type u_5} [semiring R] [ M] (s : set M) (li : coe) (t : finset s) :

Every finite subset of a linearly independent set is linearly independent.

theorem linear_independent_bounded_of_finset_linear_independent_bounded {R : Type u_3} {M : Type u_5} [semiring R] [ M] {n : } (H : ∀ (s : finset M), (λ (i : s), i)s.card n) (s : set M) :

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 ι.

theorem linear_independent_comp_subtype {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] {s : set ι} :
(v coe) ∀ (l : ι →₀ R), l s M R v) l = 0l = 0
theorem linear_dependent_comp_subtype' {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] {s : set ι} :
¬ (v coe) ∃ (f : ι →₀ R), f s M R v) f = 0 f 0
theorem linear_dependent_comp_subtype {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] {s : set ι} :
¬ (v coe) ∃ (f : ι →₀ R), f s f.support.sum (λ (i : ι), f i v i) = 0 f 0

A version of linear_dependent_comp_subtype' with finsupp.total unfolded.

theorem linear_independent_subtype {R : Type u_3} {M : Type u_5} [semiring R] [ M] {s : set M} :
(λ (x : s), x) ∀ (l : M →₀ R), l s M R id) l = 0l = 0
theorem linear_independent_comp_subtype_disjoint {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] {s : set ι} :
(v coe) disjoint s) (linear_map.ker M R v))
theorem linear_independent_subtype_disjoint {R : Type u_3} {M : Type u_5} [semiring R] [ M] {s : set M} :
(λ (x : s), x) disjoint s) (linear_map.ker M R id))
theorem linear_independent_iff_total_on {R : Type u_3} {M : Type u_5} [semiring R] [ M] {s : set M} :
(λ (x : s), x) linear_map.ker M R id s) =
theorem linear_independent.restrict_of_comp_subtype {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [semiring R] [ M] {s : set ι} (hs : (v coe)) :
(s.restrict v)
theorem linear_independent_empty (R : Type u_3) (M : Type u_5) [semiring R] [ M] :
(λ (x : ), x)
theorem linear_independent.mono {R : Type u_3} {M : Type u_5} [semiring R] [ M] {t s : set M} (h : t s) :
(λ (x : s), x) (λ (x : t), x)
theorem linear_independent_of_finite {R : Type u_3} {M : Type u_5} [semiring R] [ M] (s : set M) (H : ∀ (t : set M), t st.finite (λ (x : t), x)) :
(λ (x : s), x)
theorem linear_independent_Union_of_directed {R : Type u_3} {M : Type u_5} [semiring R] [ M] {η : Type u_1} {s : η → set M} (hs : s) (h : ∀ (i : η), (λ (x : (s i)), x)) :
(λ (x : ⋃ (i : η), s i), x)
theorem linear_independent_sUnion_of_directed {R : Type u_3} {M : Type u_5} [semiring R] [ M] {s : set (set M)} (hs : s) (h : ∀ (a : set M), a s (λ (x : a), x)) :
(λ (x : ⋃₀ s), x)
theorem linear_independent_bUnion_of_directed {R : Type u_3} {M : Type u_5} [semiring R] [ M] {η : Type u_1} {s : set η} {t : η → set M} (hs : s) (h : ∀ (a : η), a s (λ (x : (t a)), x)) :
(λ (x : ⋃ (a : η) (H : a s), t a), x)

### Properties which require ring R#

theorem linear_independent_iff_injective_total {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] :
theorem linear_independent.injective_total {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] :

Alias of the forward direction of linear_independent_iff_injective_total.

theorem linear_independent.injective {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] [nontrivial R] (hv : v) :
theorem linear_independent.to_subtype_range {R : Type u_3} {M : Type u_5} [ring R] [ M] {ι : Type u_1} {f : ι → M} (hf : f) :
theorem linear_independent.to_subtype_range' {R : Type u_3} {M : Type u_5} [ring R] [ M] {ι : Type u_1} {f : ι → M} (hf : f) {t : set M} (ht : = t) :
theorem linear_independent.image_of_comp {R : Type u_3} {M : Type u_5} [ring R] [ M] {ι : Type u_1} {ι' : Type u_2} (s : set ι) (f : ι → ι') (g : ι' → M) (hs : (λ (x : s), g (f x))) :
(λ (x : (f '' s)), g x)
theorem linear_independent.image {R : Type u_3} {M : Type u_5} [ring R] [ M] {ι : Type u_1} {s : set ι} {f : ι → M} (hs : (λ (x : s), f x)) :
(λ (x : (f '' s)), x)
theorem linear_independent.group_smul {ι : Type u_1} {R : Type u_3} {M : Type u_5} [ring R] [ M] {G : Type u_2} [hG : group G] [ R] [ M] [ M] [ M] {v : ι → M} (hv : v) (w : ι → G) :
(w v)
theorem linear_independent.units_smul {ι : Type u_1} {R : Type u_3} {M : Type u_5} [ring R] [ M] {v : ι → M} (hv : v) (w : ι → Rˣ) :
(w v)
@[nolint]
def linear_independent.maximal {ι : Type w} {R : Type u} [semiring R] {M : Type v} [ M] {v : ι → M} (i : v) :
Prop

A linearly independent family is maximal if there is no strictly larger linearly independent family.

Equations
theorem linear_independent.maximal_iff {ι : Type w} {R : Type u} [ring R] [nontrivial R] {M : Type v} [ M] {v : ι → M} (i : v) :
i.maximal ∀ (κ : Type v) (w : κ → M), ∀ (j : ι → κ), w j = v

An alternative characterization of a maximal linearly independent family, quantifying over types (in the same universe as M) into which the indexing family injects.

theorem linear_independent.eq_of_smul_apply_eq_smul_apply {ι : Type u_1} {R : Type u_3} [ring R] {M : Type u_2} [ M] {v : ι → M} (li : v) (c d : R) (i j : ι) (hc : c 0) (h : c v i = d v j) :
i = j

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 ι.

theorem linear_independent.disjoint_span_image {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) {s t : set ι} (hs : t) :
disjoint (v '' s)) (v '' t))
theorem linear_independent.not_mem_span_image {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] [nontrivial R] (hv : v) {s : set ι} {x : ι} (h : x s) :
v x (v '' s)
theorem linear_independent.total_ne_of_not_mem_support {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] [nontrivial R] (hv : v) {x : ι} (f : ι →₀ R) (h : x f.support) :
M R v) f v x
theorem linear_independent_sum {ι : Type u_1} {ι' : Type u_2} {R : Type u_3} {M : Type u_5} [ring R] [ M] {v : ι ι' → M} :
theorem linear_independent.sum_type {ι : Type u_1} {ι' : Type u_2} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] {v' : ι' → M} (hv : v) (hv' : v') (h : disjoint (set.range v)) (set.range v'))) :
(sum.elim v v')
theorem linear_independent.union {R : Type u_3} {M : Type u_5} [ring R] [ M] {s t : set M} (hs : (λ (x : s), x)) (ht : (λ (x : t), x)) (hst : disjoint s) t)) :
(λ (x : (s t)), x)
theorem linear_independent_Union_finite_subtype {R : Type u_3} {M : Type u_5} [ring R] [ M] {ι : Type u_1} {f : ι → set M} (hl : ∀ (i : ι), (λ (x : (f i)), x)) (hd : ∀ (i : ι) (t : set ι), t.finitei tdisjoint (f i)) (⨆ (i : ι) (H : i t), (f i))) :
(λ (x : ⋃ (i : ι), f i), x)
theorem linear_independent_Union_finite {R : Type u_3} {M : Type u_5} [ring R] [ M] {η : Type u_1} {ιs : η → Type u_2} {f : Π (j : η), ιs j → M} (hindep : ∀ (j : η), (f j)) (hd : ∀ (i : η) (t : set η), t.finitei tdisjoint (set.range (f i))) (⨆ (i : η) (H : i t), (set.range (f i)))) :
(λ (ji : Σ (j : η), ιs j), f ji.fst ji.snd)
@[simp]
theorem linear_independent.total_equiv_apply_coe {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) (ᾰ : ι →₀ R) :
((hv.total_equiv) ᾰ) = M R v)
noncomputable def linear_independent.total_equiv {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) :

Canonical isomorphism between linear combinations and the span of linearly independent vectors.

Equations
@[simp]
theorem linear_independent.total_equiv_symm_apply {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) (ᾰ : (set.range v))) :
(hv.total_equiv.symm) ᾰ = ((linear_equiv.of_injective M R v) linear_independent.total_equiv._proof_3) _).to_equiv.trans (linear_equiv.of_top (linear_map.range M R v) linear_independent.total_equiv._proof_3)) _).to_equiv).inv_fun
noncomputable def linear_independent.repr {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) :

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
@[simp]
theorem linear_independent.total_repr {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) (x : (set.range v))) :
M R v) ((hv.repr) x) = x
theorem linear_independent.total_comp_repr {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) :
M R v).comp hv.repr = (set.range v)).subtype
theorem linear_independent.repr_ker {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) :
theorem linear_independent.repr_range {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) :
theorem linear_independent.repr_eq {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) {l : ι →₀ R} {x : (set.range v))} (eq : M R v) l = x) :
(hv.repr) x = l
theorem linear_independent.repr_eq_single {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) (i : ι) (x : (set.range v))) (hx : x = v i) :
(hv.repr) x =
theorem linear_independent.span_repr_eq {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) [nontrivial R] (x : (set.range v))) :
(set.range v) x = ((hv.repr) x)
theorem linear_independent_iff_not_smul_mem_span {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] :
∀ (i : ι) (a : R), a v i (v '' (set.univ \ {i}))a = 0
theorem linear_independent.independent_span_singleton {ι : Type u_1} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] (hv : v) :
complete_lattice.independent (λ (i : ι), {v i})

See also complete_lattice.independent_iff_linear_independent_of_ne_zero.

theorem exists_maximal_independent' {ι : Type u_1} (R : Type u_3) {M : Type u_5} [ring R] [ M] (s : ι → M) :
∃ (I : set ι), (λ (x : I), s x) ∀ (J : set ι), I J (λ (x : J), s x)I = J
theorem exists_maximal_independent {ι : Type u_1} (R : Type u_3) {M : Type u_5} [ring R] [ M] (s : ι → M) :
∃ (I : set ι), (λ (x : I), s x) ∀ (i : ι), i I(∃ (a : R), a 0 a s i (s '' I))
theorem surjective_of_linear_independent_of_span {ι : Type u_1} {ι' : Type u_2} {R : Type u_3} {M : Type u_5} {v : ι → M} [ring R] [ M] [nontrivial R] (hv : v) (f : ι' ι) (hss : (set.range (v f)))) :
theorem eq_of_linear_independent_of_span_subtype {R : Type u_3} {M : Type u_5} [ring R] [ M] [nontrivial R] {s t : set M} (hs : (λ (x : s), x)) (h : t s) (hst : s t)) :
s = t
theorem linear_independent.image_subtype {R : Type u_3} {M : Type u_5} {M' : Type u_6} [ring R] [add_comm_group M'] [ M] [ M'] {s : set M} {f : M →ₗ[R] M'} (hs : (λ (x : s), x)) (hf_inj : disjoint s) ) :
(λ (x : (f '' s)), x)
theorem linear_independent.inl_union_inr {R : Type u_3} {M : Type u_5} {M' : Type u_6} [ring R] [add_comm_group M'] [ M] [ M'] {s : set M} {t : set M'} (hs : (λ (x : s), x)) (ht : (λ (x : t), x)) :
(λ (x : ( M M') '' s M M') '' t)), x)
theorem linear_independent_inl_union_inr' {ι : Type u_1} {ι' : Type u_2} {R : Type u_3} {M : Type u_5} {M' : Type u_6} [ring R] [add_comm_group M'] [ M] [ M'] {v : ι → M} {v' : ι' → M'} (hv : v) (hv' : v') :
(sum.elim ( M M') v) ( M M') v'))
theorem linear_independent_monoid_hom (G : Type u_1) [monoid G] (L : Type u_2) [comm_ring L]  :
(λ (f : G →* L), f)

Dedekind's linear independence of characters

theorem le_of_span_le_span {R : Type u_3} {M : Type u_5} [ring R] [ M] [nontrivial R] {s t u : set M} (hl : coe) (hsu : s u) (htu : t u) (hst : ) :
s t
theorem span_le_span_iff {R : Type u_3} {M : Type u_5} [ring R] [ M] [nontrivial R] {s t u : set M} (hl : coe) (hsu : s u) (htu : t u) :
s t
theorem linear_independent_unique_iff {ι : Type u_1} {R : Type u_3} {M : Type u_5} [ring R] [nontrivial R] [ M] (v : ι → M) [unique ι] :
theorem linear_independent_unique {ι : Type u_1} {R : Type u_3} {M : Type u_5} [ring R] [nontrivial R] [ M] (v : ι → M) [unique ι] :

Alias of the reverse direction of linear_independent_unique_iff.

theorem linear_independent_singleton {R : Type u_3} {M : Type u_5} [ring R] [nontrivial R] [ M] {x : M} (hx : x 0) :
(λ (x_1 : {x}), x_1)

### Properties which require division_ring K#

These can be considered generalizations of properties of linear independence in vector spaces.

theorem mem_span_insert_exchange {K : Type u_4} {V : Type u} [ V] {s : set V} {x y : V} :
x s)x y s)
theorem linear_independent_iff_not_mem_span {ι : Type u_1} {K : Type u_4} {V : Type u} [ V] {v : ι → V} :
∀ (i : ι), v i (v '' (set.univ \ {i}))
theorem linear_independent.insert {K : Type u_4} {V : Type u} [ V] {s : set V} {x : V} (hs : (λ (b : s), b)) (hx : x ) :
(λ (b : s)), b)
theorem linear_independent_option' {ι : Type u_1} {K : Type u_4} {V : Type u} [ V] {v : ι → V} {x : V} :
(λ (o : option ι), o.cases_on' x v) x (set.range v)
theorem linear_independent.option {ι : Type u_1} {K : Type u_4} {V : Type u} [ V] {v : ι → V} {x : V} (hv : v) (hx : x (set.range v)) :
(λ (o : option ι), o.cases_on' x v)
theorem linear_independent_option {ι : Type u_1} {K : Type u_4} {V : Type u} [ V] {v : → V} :
theorem linear_independent_insert' {K : Type u_4} {V : Type u} [ V] {ι : Type u_1} {s : set ι} {a : ι} {f : ι → V} (has : a s) :
(λ (x : s)), f x) (λ (x : s), f x) f a (f '' s)
theorem linear_independent_insert {K : Type u_4} {V : Type u} [ V] {s : set V} {x : V} (hxs : x s) :
(λ (b : s)), b) (λ (b : s), b) x
theorem linear_independent_pair {K : Type u_4} {V : Type u} [ V] {x y : V} (hx : x 0) (hy : ∀ (a : K), a x y) :
theorem linear_independent_fin_cons {K : Type u_4} {V : Type u} [ V] {x : V} {n : } {v : fin n → V} :
theorem linear_independent_fin_snoc {K : Type u_4} {V : Type u} [ V] {x : V} {n : } {v : fin n → V} :
theorem linear_independent.fin_cons {K : Type u_4} {V : Type u} [ V] {x : V} {n : } {v : fin n → V} (hv : v) (hx : x (set.range v)) :
(fin.cons x v)

See linear_independent.fin_cons' for an uglier version that works if you only have a module over a semiring.

theorem linear_independent_fin_succ {K : Type u_4} {V : Type u} [ V] {n : } {v : fin (n + 1) → V} :
theorem linear_independent_fin_succ' {K : Type u_4} {V : Type u} [ V] {n : } {v : fin (n + 1) → V} :
theorem linear_independent_fin2 {K : Type u_4} {V : Type u} [ V] {f : fin 2 → V} :
f 1 0 ∀ (a : K), a f 1 f 0
theorem exists_linear_independent_extension {K : Type u_4} {V : Type u} [ V] {s t : set V} (hs : coe) (hst : s t) :
∃ (b : set V) (H : b t), s b t b)
theorem exists_linear_independent (K : Type u_4) {V : Type u} [ V] (t : set V) :
∃ (b : set V) (H : b t), =
def linear_independent.extend {K : Type u_4} {V : Type u} [ V] {s t : set V} (hs : (λ (x : s), x)) (hst : s t) :
set V

linear_independent.extend adds vectors to a linear independent set s ⊆ t until it spans all elements of t`.

Equations
theorem linear_independent.extend_subset {K : Type u_4} {V : Type u} [ V] {s t : set V} (hs : (λ (x : s), x)) (hst : s t) :
hs.extend hst t
theorem linear_independent.subset_extend {K : Type u_4} {V : Type u} [ V] {s t : set V} (hs : (λ (x : s), x)) (hst : s t) :
s hs.extend hst
theorem linear_independent.subset_span_extend {K : Type u_4} {V : Type u} [ V] {s t : set V} (hs : (λ (x : s), x)) (hst : s t) :
t (hs.extend hst))
theorem linear_independent.linear_independent_extend {K : Type u_4} {V : Type u} [ V] {s t : set V} (hs : (λ (x : s), x)) (hst : s t) :
theorem exists_of_linear_independent_of_finite_span {K : Type u_4} {V : Type u} [ V] {s : set V} {t : finset V} (hs : (λ (x : s), x)) (hst : s t)) :
∃ (t' : finset V), t' s t s t' t'.card = t.card
theorem exists_finite_card_le_of_finite_of_linear_independent_of_span {K : Type u_4} {V : Type u} [ V] {s t : set V} (ht : t.finite) (hs : (λ (x : s), x)) (hst : s t)) :