Documentation

Mathlib.LinearAlgebra.LinearIndependent

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.

Main statements #

We prove several specialized tests for linear independence of families of vectors and of sets of vectors.

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

def LinearIndependent {ι : Type u'} (R : Type u_2) {M : Type u_4} (v : ιM) [Semiring R] [AddCommMonoid M] [Module R M] :

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

Equations
Instances For
    theorem linearIndependent_iff {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] :
    LinearIndependent R v ∀ (l : ι →₀ R), ↑(Finsupp.total ι M R v) l = 0l = 0
    theorem linearIndependent_iff' {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] :
    LinearIndependent R v ∀ (s : Finset ι) (g : ιR), (Finset.sum s fun i => g i v i) = 0∀ (i : ι), i sg i = 0
    theorem linearIndependent_iff'' {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] :
    LinearIndependent R v ∀ (s : Finset ι) (g : ιR), (∀ (i : ι), ¬i sg i = 0) → (Finset.sum s fun i => g i v i) = 0∀ (i : ι), g i = 0
    theorem not_linearIndependent_iff {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] :
    ¬LinearIndependent R v s g, (Finset.sum s fun i => g i v i) = 0 i, i s g i 0
    theorem Fintype.linearIndependent_iff {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] [Fintype ι] :
    LinearIndependent R v ∀ (g : ιR), (Finset.sum Finset.univ fun i => g i v i) = 0∀ (i : ι), g i = 0
    theorem Fintype.linearIndependent_iff' {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] [Fintype ι] [DecidableEq ι] :
    LinearIndependent R v LinearMap.ker (↑(LinearMap.lsum R (fun x => R) ) fun i => LinearMap.smulRight LinearMap.id (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_linearIndependent_iff {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] [Fintype ι] :
    ¬LinearIndependent R v g, (Finset.sum Finset.univ fun i => g i v i) = 0 i, g i 0
    theorem linearIndependent_empty_type {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] [IsEmpty ι] :
    theorem LinearIndependent.ne_zero {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] [Nontrivial R] (i : ι) (hv : LinearIndependent R v) :
    v i 0
    theorem LinearIndependent.eq_zero_of_pair {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {x : M} {y : M} (h : LinearIndependent R ![x, y]) {s : R} {t : R} (h' : s x + t y = 0) :
    s = 0 t = 0
    theorem LinearIndependent.pair_iff {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {x : M} {y : M} :
    LinearIndependent R ![x, y] ∀ (s t : R), s x + t y = 0s = 0 t = 0
    theorem LinearIndependent.comp {ι : Type u'} {ι' : Type u_1} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] (h : LinearIndependent R v) (f : ι'ι) (hf : Function.Injective f) :

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

    theorem LinearIndependent.coe_range {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] (i : LinearIndependent R v) :
    LinearIndependent R Subtype.val
    theorem LinearIndependent.map {ι : Type u'} {R : Type u_2} {M : Type u_4} {M' : Type u_5} {v : ιM} [Semiring R] [AddCommMonoid M] [AddCommMonoid M'] [Module R M] [Module R M'] (hv : LinearIndependent R v) {f : M →ₗ[R] M'} (hf_inj : Disjoint (Submodule.span R (Set.range v)) (LinearMap.ker f)) :

    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 = ⊥.

    theorem Submodule.range_ker_disjoint {ι : Type u'} {R : Type u_2} {M : Type u_4} {M' : Type u_5} {v : ιM} [Semiring R] [AddCommMonoid M] [AddCommMonoid M'] [Module R M] [Module R M'] {f : M →ₗ[R] M'} (hv : LinearIndependent R (f v)) :

    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

    theorem LinearIndependent.map' {ι : Type u'} {R : Type u_2} {M : Type u_4} {M' : Type u_5} {v : ιM} [Semiring R] [AddCommMonoid M] [AddCommMonoid M'] [Module R M] [Module R M'] (hv : LinearIndependent R v) (f : M →ₗ[R] M') (hf_inj : LinearMap.ker 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.

    theorem LinearIndependent.of_comp {ι : Type u'} {R : Type u_2} {M : Type u_4} {M' : Type u_5} {v : ιM} [Semiring R] [AddCommMonoid M] [AddCommMonoid M'] [Module R M] [Module R M'] (f : M →ₗ[R] M') (hfv : LinearIndependent R (f v)) :

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

    theorem LinearMap.linearIndependent_iff {ι : Type u'} {R : Type u_2} {M : Type u_4} {M' : Type u_5} {v : ιM} [Semiring R] [AddCommMonoid M] [AddCommMonoid M'] [Module R M] [Module R M'] (f : M →ₗ[R] M') (hf_inj : LinearMap.ker f = ) :

    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 linearIndependent_of_subsingleton {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] [Subsingleton R] :
    theorem linearIndependent_equiv {ι : Type u'} {ι' : Type u_1} {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] (e : ι ι') {f : ι'M} :
    theorem linearIndependent_equiv' {ι : Type u'} {ι' : Type u_1} {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] (e : ι ι') {f : ι'M} {g : ιM} (h : f e = g) :
    theorem linearIndependent_subtype_range {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {ι : Type u_8} {f : ιM} (hf : Function.Injective f) :
    theorem LinearIndependent.of_subtype_range {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {ι : Type u_8} {f : ιM} (hf : Function.Injective f) :
    LinearIndependent R Subtype.valLinearIndependent R f

    Alias of the forward direction of linearIndependent_subtype_range.

    theorem linearIndependent_image {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {ι : Type u_8} {s : Set ι} {f : ιM} (hf : Set.InjOn f s) :
    (LinearIndependent R fun x => f x) LinearIndependent R fun x => x
    theorem linearIndependent_span {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] (hs : LinearIndependent R v) :
    LinearIndependent R fun i => { val := v i, property := (_ : v i ↑(Submodule.span R (Set.range v))) }
    theorem LinearIndependent.fin_cons' {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {m : } (x : M) (v : Fin mM) (hli : LinearIndependent R v) (x_ortho : ∀ (c : R) (y : { x // x Submodule.span R (Set.range v) }), c x + y = 0c = 0) :

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

    theorem LinearIndependent.restrict_scalars {ι : Type u'} {R : Type u_2} {K : Type u_3} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] [Semiring K] [SMulWithZero R K] [Module K M] [IsScalarTower R K M] (hinj : Function.Injective fun r => r 1) (li : LinearIndependent K 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 LinearIndependent.restrict_scalars_algebras.

    theorem linearIndependent_finset_map_embedding_subtype {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] (s : Set M) (li : LinearIndependent R Subtype.val) (t : Finset s) :
    LinearIndependent R Subtype.val

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

    theorem linearIndependent_bounded_of_finset_linearIndependent_bounded {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {n : } (H : ∀ (s : Finset M), (LinearIndependent R fun i => i) → Finset.card s n) (s : Set M) :
    LinearIndependent R Subtype.valCardinal.mk s n

    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 linearIndependent_comp_subtype {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set ι} :
    LinearIndependent R (v Subtype.val) ∀ (l : ι →₀ R), l Finsupp.supported R R s↑(Finsupp.total ι M R v) l = 0l = 0
    theorem linearDependent_comp_subtype' {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set ι} :
    ¬LinearIndependent R (v Subtype.val) f, f Finsupp.supported R R s ↑(Finsupp.total ι M R v) f = 0 f 0
    theorem linearDependent_comp_subtype {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set ι} :
    ¬LinearIndependent R (v Subtype.val) f, f Finsupp.supported R R s (Finset.sum f.support fun i => f i v i) = 0 f 0

    A version of linearDependent_comp_subtype' with Finsupp.total unfolded.

    theorem linearIndependent_subtype {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set M} :
    (LinearIndependent R fun x => x) ∀ (l : M →₀ R), l Finsupp.supported R R s↑(Finsupp.total M M R id) l = 0l = 0
    theorem linearIndependent_comp_subtype_disjoint {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set ι} :
    theorem linearIndependent_subtype_disjoint {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set M} :
    theorem linearIndependent_iff_totalOn {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set M} :
    (LinearIndependent R fun x => x) LinearMap.ker (Finsupp.totalOn M M R id s) =
    theorem LinearIndependent.restrict_of_comp_subtype {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set ι} (hs : LinearIndependent R (v Subtype.val)) :
    theorem linearIndependent_empty (R : Type u_2) (M : Type u_4) [Semiring R] [AddCommMonoid M] [Module R M] :
    LinearIndependent R fun x => x
    theorem LinearIndependent.mono {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {t : Set M} {s : Set M} (h : t s) :
    (LinearIndependent R fun x => x) → LinearIndependent R fun x => x
    theorem linearIndependent_of_finite {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] (s : Set M) (H : ∀ (t : Set M), t sSet.Finite tLinearIndependent R fun x => x) :
    LinearIndependent R fun x => x
    theorem linearIndependent_iUnion_of_directed {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {η : Type u_8} {s : ηSet M} (hs : Directed (fun x x_1 => x x_1) s) (h : ∀ (i : η), LinearIndependent R fun x => x) :
    LinearIndependent R fun x => x
    theorem linearIndependent_sUnion_of_directed {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {s : Set (Set M)} (hs : DirectedOn (fun x x_1 => x x_1) s) (h : ∀ (a : Set M), a sLinearIndependent R Subtype.val) :
    LinearIndependent R fun x => x
    theorem linearIndependent_biUnion_of_directed {R : Type u_2} {M : Type u_4} [Semiring R] [AddCommMonoid M] [Module R M] {η : Type u_8} {s : Set η} {t : ηSet M} (hs : DirectedOn (t ⁻¹'o fun x x_1 => x x_1) s) (h : ∀ (a : η), a sLinearIndependent R fun x => x) :
    LinearIndependent R fun x => x

    Properties which require Ring R #

    theorem linearIndependent_iff_injective_total {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] :
    theorem LinearIndependent.injective_total {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] :

    Alias of the forward direction of linearIndependent_iff_injective_total.

    theorem LinearIndependent.injective {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] [Nontrivial R] (hv : LinearIndependent R v) :
    theorem LinearIndependent.to_subtype_range {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {ι : Type u_8} {f : ιM} (hf : LinearIndependent R f) :
    LinearIndependent R Subtype.val
    theorem LinearIndependent.to_subtype_range' {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {ι : Type u_8} {f : ιM} (hf : LinearIndependent R f) {t : Set M} (ht : Set.range f = t) :
    LinearIndependent R Subtype.val
    theorem LinearIndependent.image_of_comp {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {ι : Type u_8} {ι' : Type u_9} (s : Set ι) (f : ιι') (g : ι'M) (hs : LinearIndependent R fun x => g (f x)) :
    LinearIndependent R fun x => g x
    theorem LinearIndependent.image {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {ι : Type u_8} {s : Set ι} {f : ιM} (hs : LinearIndependent R fun x => f x) :
    LinearIndependent R fun x => x
    theorem LinearIndependent.group_smul {ι : Type u'} {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {G : Type u_8} [hG : Group G] [DistribMulAction G R] [DistribMulAction G M] [IsScalarTower G R M] [SMulCommClass G R M] {v : ιM} (hv : LinearIndependent R v) (w : ιG) :
    theorem LinearIndependent.units_smul {ι : Type u'} {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {v : ιM} (hv : LinearIndependent R v) (w : ιRˣ) :
    theorem LinearIndependent.eq_of_pair {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {x : M} {y : M} (h : LinearIndependent R ![x, y]) {s : R} {t : R} {s' : R} {t' : R} (h' : s x + t y = s' x + t' y) :
    s = s' t = t'
    theorem LinearIndependent.eq_zero_of_pair' {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {x : M} {y : M} (h : LinearIndependent R ![x, y]) {s : R} {t : R} (h' : s x = t y) :
    s = 0 t = 0
    theorem LinearIndependent.linear_combination_pair_of_det_ne_zero {R : Type u_8} {M : Type u_9} [CommRing R] [NoZeroDivisors R] [AddCommGroup M] [Module R M] {x : M} {y : M} (h : LinearIndependent R ![x, y]) {a : R} {b : R} {c : R} {d : R} (h' : a * d - b * c 0) :
    LinearIndependent R ![a x + b y, c x + d y]

    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.

    def LinearIndependent.Maximal {ι : Type w} {R : Type u} [Semiring R] {M : Type v} [AddCommMonoid M] [Module R M] {v : ιM} (_i : LinearIndependent R v) :

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

    Equations
    Instances For
      theorem LinearIndependent.maximal_iff {ι : Type w} {R : Type u} [Ring R] [Nontrivial R] {M : Type v} [AddCommGroup M] [Module R M] {v : ιM} (i : LinearIndependent R v) :
      LinearIndependent.Maximal i ∀ (κ : Type v) (w : κM), LinearIndependent R w∀ (j : ικ), w j = vFunction.Surjective j

      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 LinearIndependent.eq_of_smul_apply_eq_smul_apply {ι : Type u'} {R : Type u_2} [Ring R] {M : Type u_8} [AddCommGroup M] [Module R M] {v : ιM} (li : LinearIndependent R v) (c : R) (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 LinearIndependent.disjoint_span_image {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) {s : Set ι} {t : Set ι} (hs : Disjoint s t) :
      theorem LinearIndependent.not_mem_span_image {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] [Nontrivial R] (hv : LinearIndependent R v) {s : Set ι} {x : ι} (h : ¬x s) :
      ¬v x Submodule.span R (v '' s)
      theorem LinearIndependent.total_ne_of_not_mem_support {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] [Nontrivial R] (hv : LinearIndependent R v) {x : ι} (f : ι →₀ R) (h : ¬x f.support) :
      ↑(Finsupp.total ι M R v) f v x
      theorem linearIndependent_sum {ι : Type u'} {ι' : Type u_1} {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {v : ι ι'M} :
      theorem LinearIndependent.sum_type {ι : Type u'} {ι' : Type u_1} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] {v' : ι'M} (hv : LinearIndependent R v) (hv' : LinearIndependent R v') (h : Disjoint (Submodule.span R (Set.range v)) (Submodule.span R (Set.range v'))) :
      theorem LinearIndependent.union {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {s : Set M} {t : Set M} (hs : LinearIndependent R fun x => x) (ht : LinearIndependent R fun x => x) (hst : Disjoint (Submodule.span R s) (Submodule.span R t)) :
      LinearIndependent R fun x => x
      theorem linearIndependent_iUnion_finite_subtype {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {ι : Type u_8} {f : ιSet M} (hl : ∀ (i : ι), LinearIndependent R fun x => x) (hd : ∀ (i : ι) (t : Set ι), Set.Finite t¬i tDisjoint (Submodule.span R (f i)) (⨆ (i : ι) (_ : i t), Submodule.span R (f i))) :
      LinearIndependent R fun x => x
      theorem linearIndependent_iUnion_finite {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] {η : Type u_8} {ιs : ηType u_9} {f : (j : η) → ιs jM} (hindep : ∀ (j : η), LinearIndependent R (f j)) (hd : ∀ (i : η) (t : Set η), Set.Finite t¬i tDisjoint (Submodule.span R (Set.range (f i))) (⨆ (i : η) (_ : i t), Submodule.span R (Set.range (f i)))) :
      LinearIndependent R fun ji => f ji.fst ji.snd
      @[simp]
      def LinearIndependent.totalEquiv {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) :
      (ι →₀ R) ≃ₗ[R] { x // x Submodule.span R (Set.range v) }

      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
        @[simp]
        theorem LinearIndependent.totalEquiv_apply_coe {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) (l : ι →₀ R) :
        ↑(↑(LinearIndependent.totalEquiv hv) l) = ↑(Finsupp.total ι M R v) l
        def LinearIndependent.repr {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) :
        { x // x Submodule.span R (Set.range v) } →ₗ[R] ι →₀ R

        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
          @[simp]
          theorem LinearIndependent.total_repr {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) (x : { x // x Submodule.span R (Set.range v) }) :
          ↑(Finsupp.total ι M R v) (↑(LinearIndependent.repr hv) x) = x
          theorem LinearIndependent.repr_ker {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) :
          theorem LinearIndependent.repr_range {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) :
          theorem LinearIndependent.repr_eq {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) {l : ι →₀ R} {x : { x // x Submodule.span R (Set.range v) }} (eq : ↑(Finsupp.total ι M R v) l = x) :
          theorem LinearIndependent.repr_eq_single {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) (i : ι) (x : { x // x Submodule.span R (Set.range v) }) (hx : x = v i) :
          ↑(LinearIndependent.repr hv) x = fun₀ | i => 1
          theorem LinearIndependent.span_repr_eq {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) [Nontrivial R] (x : { x // x Submodule.span R (Set.range v) }) :
          theorem linearIndependent_iff_not_smul_mem_span {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] :
          LinearIndependent R v ∀ (i : ι) (a : R), a v i Submodule.span R (v '' (Set.univ \ {i}))a = 0
          theorem LinearIndependent.independent_span_singleton {ι : Type u'} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] (hv : LinearIndependent R v) :

          See also CompleteLattice.independent_iff_linearIndependent_of_ne_zero.

          theorem exists_maximal_independent' {ι : Type u'} (R : Type u_2) {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] (s : ιM) :
          I, (LinearIndependent R fun x => s x) ∀ (J : Set ι), I J(LinearIndependent R fun x => s x) → I = J
          theorem exists_maximal_independent {ι : Type u'} (R : Type u_2) {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] (s : ιM) :
          I, (LinearIndependent R fun x => s x) ∀ (i : ι), ¬i Ia, a 0 a s i Submodule.span R (s '' I)
          theorem surjective_of_linearIndependent_of_span {ι : Type u'} {ι' : Type u_1} {R : Type u_2} {M : Type u_4} {v : ιM} [Ring R] [AddCommGroup M] [Module R M] [Nontrivial R] (hv : LinearIndependent R v) (f : ι' ι) (hss : Set.range v ↑(Submodule.span R (Set.range (v f)))) :
          theorem eq_of_linearIndependent_of_span_subtype {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] [Nontrivial R] {s : Set M} {t : Set M} (hs : LinearIndependent R fun x => x) (h : t s) (hst : s ↑(Submodule.span R t)) :
          s = t
          theorem LinearIndependent.image_subtype {R : Type u_2} {M : Type u_4} {M' : Type u_5} [Ring R] [AddCommGroup M] [AddCommGroup M'] [Module R M] [Module R M'] {s : Set M} {f : M →ₗ[R] M'} (hs : LinearIndependent R fun x => x) (hf_inj : Disjoint (Submodule.span R s) (LinearMap.ker f)) :
          LinearIndependent R fun x => x
          theorem LinearIndependent.inl_union_inr {R : Type u_2} {M : Type u_4} {M' : Type u_5} [Ring R] [AddCommGroup M] [AddCommGroup M'] [Module R M] [Module R M'] {s : Set M} {t : Set M'} (hs : LinearIndependent R fun x => x) (ht : LinearIndependent R fun x => x) :
          LinearIndependent R fun x => x
          theorem linearIndependent_inl_union_inr' {ι : Type u'} {ι' : Type u_1} {R : Type u_2} {M : Type u_4} {M' : Type u_5} [Ring R] [AddCommGroup M] [AddCommGroup M'] [Module R M] [Module R M'] {v : ιM} {v' : ι'M'} (hv : LinearIndependent R v) (hv' : LinearIndependent R v') :
          LinearIndependent R (Sum.elim (↑(LinearMap.inl R M M') v) (↑(LinearMap.inr R M M') v'))
          theorem linearIndependent_monoidHom (G : Type u_8) [Monoid G] (L : Type u_9) [CommRing L] [NoZeroDivisors L] :
          LinearIndependent L fun f => f

          Dedekind's linear independence of characters

          theorem le_of_span_le_span {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] [Nontrivial R] {s : Set M} {t : Set M} {u : Set M} (hl : LinearIndependent R Subtype.val) (hsu : s u) (htu : t u) (hst : Submodule.span R s Submodule.span R t) :
          s t
          theorem span_le_span_iff {R : Type u_2} {M : Type u_4} [Ring R] [AddCommGroup M] [Module R M] [Nontrivial R] {s : Set M} {t : Set M} {u : Set M} (hl : LinearIndependent R Subtype.val) (hsu : s u) (htu : t u) :
          theorem linearIndependent_unique_iff {ι : Type u'} {R : Type u_2} {M : Type u_4} [Ring R] [Nontrivial R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] (v : ιM) [Unique ι] :
          LinearIndependent R v v default 0
          theorem linearIndependent_unique {ι : Type u'} {R : Type u_2} {M : Type u_4} [Ring R] [Nontrivial R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] (v : ιM) [Unique ι] :
          v default 0LinearIndependent R v

          Alias of the reverse direction of linearIndependent_unique_iff.

          theorem linearIndependent_singleton {R : Type u_2} {M : Type u_4} [Ring R] [Nontrivial R] [AddCommGroup M] [Module R M] [NoZeroSMulDivisors R M] {x : M} (hx : x 0) :
          LinearIndependent R fun x => x

          Properties which require DivisionRing K #

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

          theorem mem_span_insert_exchange {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {x : V} {y : V} :
          theorem linearIndependent_iff_not_mem_span {ι : Type u'} {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {v : ιV} :
          LinearIndependent K v ∀ (i : ι), ¬v i Submodule.span K (v '' (Set.univ \ {i}))
          theorem LinearIndependent.insert {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {x : V} (hs : LinearIndependent K fun b => b) (hx : ¬x Submodule.span K s) :
          LinearIndependent K fun b => b
          theorem linearIndependent_option' {ι : Type u'} {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {v : ιV} {x : V} :
          theorem LinearIndependent.option {ι : Type u'} {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {v : ιV} {x : V} (hv : LinearIndependent K v) (hx : ¬x Submodule.span K (Set.range v)) :
          theorem linearIndependent_option {ι : Type u'} {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {v : Option ιV} :
          theorem linearIndependent_insert' {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {ι : Type u_8} {s : Set ι} {a : ι} {f : ιV} (has : ¬a s) :
          (LinearIndependent K fun x => f x) (LinearIndependent K fun x => f x) ¬f a Submodule.span K (f '' s)
          theorem linearIndependent_insert {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {x : V} (hxs : ¬x s) :
          (LinearIndependent K fun b => b) (LinearIndependent K fun b => b) ¬x Submodule.span K s
          theorem linearIndependent_pair {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {x : V} {y : V} (hx : x 0) (hy : ∀ (a : K), a x y) :
          LinearIndependent K Subtype.val
          theorem linearIndependent_fin_cons {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {x : V} {n : } {v : Fin nV} :
          theorem linearIndependent_fin_snoc {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {x : V} {n : } {v : Fin nV} :
          theorem LinearIndependent.fin_cons {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {x : V} {n : } {v : Fin nV} (hv : LinearIndependent K v) (hx : ¬x Submodule.span K (Set.range v)) :

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

          theorem linearIndependent_fin2 {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {f : Fin 2V} :
          LinearIndependent K f f 1 0 ∀ (a : K), a f 1 f 0
          theorem exists_linearIndependent_extension {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {t : Set V} (hs : LinearIndependent K Subtype.val) (hst : s t) :
          b x, s b t ↑(Submodule.span K b) LinearIndependent K Subtype.val
          theorem exists_linearIndependent (K : Type u_3) {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] (t : Set V) :
          b x, Submodule.span K b = Submodule.span K t LinearIndependent K Subtype.val
          noncomputable def LinearIndependent.extend {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {t : Set V} (hs : LinearIndependent K fun x => x) (hst : s t) :
          Set V

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

          Equations
          Instances For
            theorem LinearIndependent.extend_subset {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {t : Set V} (hs : LinearIndependent K fun x => x) (hst : s t) :
            theorem LinearIndependent.subset_extend {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {t : Set V} (hs : LinearIndependent K fun x => x) (hst : s t) :
            theorem LinearIndependent.subset_span_extend {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {t : Set V} (hs : LinearIndependent K fun x => x) (hst : s t) :
            theorem LinearIndependent.linearIndependent_extend {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {t : Set V} (hs : LinearIndependent K fun x => x) (hst : s t) :
            LinearIndependent K Subtype.val
            theorem exists_of_linearIndependent_of_finite_span {K : Type u_3} {V : Type u} [DivisionRing K] [AddCommGroup V] [Module K V] {s : Set V} {t : Finset V} (hs : LinearIndependent K fun x => x) (hst : s ↑(Submodule.span K t)) :
            t', t' s t s t' Finset.card t' = Finset.card t