The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V07. Linear algebra

Mathlib.LinearAlgebra.Finsupp.LinearCombination

69 declarations. Mathlib docs · Source

Finsupp.linearCombination

Main definitions

  • Finsupp.linearCombination R (v : ι → M): sends l : ι →₀ R to the linear combination of v i with coefficients l i;

  • Finsupp.linearCombinationOn: a restricted version of Finsupp.linearCombination with domain

  • Fintype.linearCombination R (v : ι → M): sends l : ι → R to the linear combination of v i with coefficients l i (for a finite type ι)

  • Finsupp.bilinearCombination R S, Fintype.bilinearCombination R S: a bilinear version of Finsupp.linearCombination and Fintype.linearCombination. It requires that M is both an R-module and an S-module, with SMulCommClass R S M; the case S = R typically requires that R is commutative.

Tags

function with finite support, module, linear algebra

theorem LinearMap.restrictScalars.congr_simp E1 #

∀ (R : Type u_1) {S : Type u_5} {M : Type u_8} {M₂ : Type u_10} [inst : Semiring R] [inst_1 : Semiring S]
  [inst_2 : AddCommMonoid M] [inst_3 : AddCommMonoid M₂] [inst_4 : Module R M] [inst_5 : Module R M₂]
  [inst_6 : Module S M] [inst_7 : Module S M₂] [inst_8 : LinearMap.CompatibleSMul M M₂ R S] (fₗ fₗ_1 : M →ₗ[S] M₂),
  fₗ = fₗ_1 → ↑R fₗ = ↑R fₗ_1

theorem LinearEquiv.ofLinearMap.congr_simp E1 #

∀ {R : Type u_1} {R₂ : Type u_2} {M : Type u_5} {M₂ : Type u_7} [inst : Semiring R] [inst_1 : Semiring R₂]
  [inst_2 : AddCommMonoid M] [inst_3 : AddCommMonoid M₂] {module_M : Module R M} {module_M₂ : Module R₂ M₂}
  {σ₁₂ : R →+* R₂} {σ₂₁ : R₂ →+* R} {re₁₂ : RingHomInvPair σ₁₂ σ₂₁} {re₂₁ : RingHomInvPair σ₂₁ σ₁₂}
  (f f_1 : M →ₛₗ[σ₁₂] M₂) (e_f : f = f_1) (g g_1 : M₂ →ₛₗ[σ₂₁] M) (e_g : g = g_1) (h₁ : f ∘ₛₗ g = LinearMap.id)
  (h₂ : g ∘ₛₗ f = LinearMap.id), LinearEquiv.ofLinearMap f g h₁ h₂ = LinearEquiv.ofLinearMap f_1 g_1 ⋯ ⋯

theorem Finsupp.equivFunOnFinite.congr_simp E1 #

∀ {α : Type u_1} {M : Type u_4} [inst : Zero M] [inst_1 : Finite α], Finsupp.equivFunOnFinite = Finsupp.equivFunOnFinite

def Finsupp.linearCombination E3 #

{α : Type u_1} →
  {M : Type u_2} →
    (R : Type u_3) →
      [inst : Semiring R] → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → (α → M) → (α →₀ R) →ₗ[R] M

Interprets (l : α →₀ R) as a linear combination of the elements in the family (v : α → M) and evaluates this linear combination.

theorem Finsupp.linearCombination_apply E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} (l : α →₀ R), (Finsupp.linearCombination R v) l = l.sum fun i a ↦ a • v i

theorem Finsupp.linearCombination_apply_of_mem_supported E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} {l : α →₀ R} {s : Finset α},
  l ∈ Finsupp.supported R R ↑s → (Finsupp.linearCombination R v) l = ∑ i ∈ s, l i • v i

theorem Finsupp.linearCombination_single E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} (c : R) (a : α), ((Finsupp.linearCombination R v) fun₀ | a => c) = c • v a

theorem Finsupp.linearCombination_zero_apply E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  (x : α →₀ R), (Finsupp.linearCombination R 0) x = 0

theorem Finsupp.linearCombination_zero E0 #

∀ (α : Type u_1) (M : Type u_2) (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Finsupp.linearCombination R 0 = 0

theorem Finsupp.linearCombination_single_index E0 #

∀ (α : Type u_1) (M : Type u_2) (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  (c : M) (a : α) (f : α →₀ R) [inst_3 : DecidableEq α], (Finsupp.linearCombination R (Pi.single a c)) f = f a • c

theorem Finsupp.linearCombination_linear_comp E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {M' : Type u_6} [inst_3 : AddCommMonoid M'] [inst_4 : Module R M'] {v : α → M} (f : M →ₗ[R] M'),
  Finsupp.linearCombination R (⇑f ∘ v) = f ∘ₗ Finsupp.linearCombination R v

theorem Finsupp.apply_linearCombination E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {M' : Type u_6} [inst_3 : AddCommMonoid M'] [inst_4 : Module R M'] (f : M →ₗ[R] M') (v : α → M) (l : α →₀ R),
  f ((Finsupp.linearCombination R v) l) = (Finsupp.linearCombination R (⇑f ∘ v)) l

theorem Finsupp.apply_linearCombination_id E1 #

∀ {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {M' : Type u_6}
  [inst_3 : AddCommMonoid M'] [inst_4 : Module R M'] (f : M →ₗ[R] M') (l : M →₀ R),
  f ((Finsupp.linearCombination R id) l) = (Finsupp.linearCombination R ⇑f) l

theorem Finsupp.linearCombination_unique E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  [inst_3 : Unique α] (l : α →₀ R) (v : α → M), (Finsupp.linearCombination R v) l = l default • v default

theorem Finsupp.linearCombination_surjective E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M}, Function.Surjective v → Function.Surjective ⇑(Finsupp.linearCombination R v)

theorem Finsupp.linearCombination_range E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M}, Function.Surjective v → (Finsupp.linearCombination R v).range = ⊤

theorem Finsupp.linearCombination_id_surjective E1 #

∀ (R : Type u_3) [inst : Semiring R] (M : Type u_7) [inst_1 : AddCommMonoid M] [inst_2 : Module R M],
  Function.Surjective ⇑(Finsupp.linearCombination R id)

Any module is a quotient of a free module. This is stated as surjectivity of Finsupp.linearCombination R id : (M →₀ R) →ₗ[R] M.

theorem Finsupp.range_linearCombination E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M}, (Finsupp.linearCombination R v).range = Submodule.span R (Set.range v)

theorem span_range_eq_top_iff_surjective_finsuppLinearCombination E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M}, Submodule.span R (Set.range v) = ⊤ ↔ Function.Surjective ⇑(Finsupp.linearCombination R v)

theorem Finsupp.lmapDomain_linearCombination E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {α' : Type u_5} {M' : Type u_6} [inst_3 : AddCommMonoid M'] [inst_4 : Module R M'] {v : α → M} {v' : α' → M'}
  (f : α → α') (g : M →ₗ[R] M'),
  (∀ (i : α), g (v i) = v' (f i)) →
    Finsupp.linearCombination R v' ∘ₗ Finsupp.lmapDomain R R f = g ∘ₗ Finsupp.linearCombination R v

theorem Finsupp.linearCombination_comp_lmapDomain E1 #

∀ {α : Type u_1} (R : Type u_3) [inst : Semiring R] {α' : Type u_5} {M' : Type u_6} [inst_1 : AddCommMonoid M']
  [inst_2 : Module R M'] {v' : α' → M'} (f : α → α'),
  Finsupp.linearCombination R v' ∘ₗ Finsupp.lmapDomain R R f = Finsupp.linearCombination R (v' ∘ f)

theorem Finsupp.linearCombination_embDomain E0 #

∀ {α : Type u_1} (R : Type u_3) [inst : Semiring R] {α' : Type u_5} {M' : Type u_6} [inst_1 : AddCommMonoid M']
  [inst_2 : Module R M'] {v' : α' → M'} (f : α ↪ α') (l : α →₀ R),
  (Finsupp.linearCombination R v') (Finsupp.embDomain f l) = (Finsupp.linearCombination R (v' ∘ ⇑f)) l

theorem Finsupp.linearCombination_mapDomain E0 #

∀ {α : Type u_1} (R : Type u_3) [inst : Semiring R] {α' : Type u_5} {M' : Type u_6} [inst_1 : AddCommMonoid M']
  [inst_2 : Module R M'] {v' : α' → M'} (f : α → α') (l : α →₀ R),
  (Finsupp.linearCombination R v') (Finsupp.mapDomain f l) = (Finsupp.linearCombination R (v' ∘ f)) l

theorem Finsupp.linearCombination_equivMapDomain E0 #

∀ {α : Type u_1} (R : Type u_3) [inst : Semiring R] {α' : Type u_5} {M' : Type u_6} [inst_1 : AddCommMonoid M']
  [inst_2 : Module R M'] {v' : α' → M'} (f : α ≃ α') (l : α →₀ R),
  (Finsupp.linearCombination R v') (Finsupp.equivMapDomain f l) = (Finsupp.linearCombination R (v' ∘ ⇑f)) l

theorem Finsupp.span_eq_range_linearCombination E1 #

∀ {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (s : Set M),
  Submodule.span R s = (Finsupp.linearCombination R Subtype.val).range

A version of Finsupp.range_linearCombination which is useful for going in the other direction

theorem Finsupp.mem_span_iff_linearCombination E0 #

∀ {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (s : Set M)
  (x : M), x ∈ Submodule.span R s ↔ ∃ l, (Finsupp.linearCombination R Subtype.val) l = x

theorem Finsupp.mem_span_range_iff_exists_finsupp E0 #

∀ {α : Type u_1} {M : Type u_2} {R : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} {x : M}, x ∈ Submodule.span R (Set.range v) ↔ ∃ c, (c.sum fun i a ↦ a • v i) = x

theorem Finsupp.span_image_eq_map_linearCombination E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} (s : Set α),
  Submodule.span R (v '' s) = Submodule.map (Finsupp.linearCombination R v) (Finsupp.supported R R s)

theorem Finsupp.mem_span_image_iff_linearCombination E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} {s : Set α} {x : M},
  x ∈ Submodule.span R (v '' s) ↔ ∃ l ∈ Finsupp.supported R R s, (Finsupp.linearCombination R v) l = x

theorem Finsupp.linearCombination_option E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  (v : Option α → M) (f : Option α →₀ R),
  (Finsupp.linearCombination R v) f = f none • v none + (Finsupp.linearCombination R (v ∘ some)) f.some

theorem Finsupp.linearCombination_linearCombination E1 #

∀ {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {α : Type u_7}
  {β : Type u_8} (A : α → M) (B : β → α →₀ R) (f : β →₀ R),
  (Finsupp.linearCombination R A) ((Finsupp.linearCombination R B) f) =
    (Finsupp.linearCombination R fun b ↦ (Finsupp.linearCombination R A) (B b)) f

theorem Finsupp.linearCombination_smul E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) {S : Type u_4} [inst : Semiring R] [inst_1 : Semiring S]
  [inst_2 : AddCommMonoid M] [inst_3 : Module R M] {α' : Type u_5} {v : α → M} [inst_4 : Module R S]
  [inst_5 : Module S M] [inst_6 : IsScalarTower R S M] {w : α' → S},
  (Finsupp.linearCombination R fun i ↦ w i.2 • v i.1) =
    ↑R (Finsupp.linearCombination S v) ∘ₗ
      Finsupp.mapRange.linearMap (Finsupp.linearCombination R w) ∘ₗ ↑(Finsupp.curryLinearEquiv R)

theorem Finsupp.linearCombination_fin_zero E0 #

∀ {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (f : Fin 0 → M),
  Finsupp.linearCombination R f = 0

def Finsupp.linearCombinationOn E3 #

(α : Type u_1) →
  (M : Type u_2) →
    (R : Type u_3) →
      [inst : Semiring R] →
        [inst_1 : AddCommMonoid M] →
          [inst_2 : Module R M] →
            (v : α → M) → (s : Set α) → ↥(Finsupp.supported R R s) →ₗ[R] ↥(Submodule.span R (v '' s))

Finsupp.linearCombinationOn M v s interprets p : α →₀ R as a linear combination of a subset of the vectors in v, mapping it to the span of those vectors.

The subset is indicated by a set s : Set α of indices.

theorem Finsupp.linearCombinationOn_range E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} (s : Set α), (Finsupp.linearCombinationOn α M R v s).range = ⊤

theorem Finsupp.linearCombination_restrict E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} (s : Set α),
  Finsupp.linearCombination R (s.domRestrict v) =
    (Submodule.span R (v '' s)).subtype ∘ₗ
      Finsupp.linearCombinationOn α M R v s ∘ₗ ↑(Finsupp.supportedEquivFinsupp s).symm

theorem Finsupp.linearCombination_comp E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {α' : Type u_5} {v : α → M} (f : α' → α),
  Finsupp.linearCombination R (v ∘ f) = Finsupp.linearCombination R v ∘ₗ Finsupp.lmapDomain R R f

theorem Finsupp.linearCombination_comapDomain E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {α' : Type u_5} {v : α → M} (f : α → α') (l : α' →₀ R) (hf : Set.InjOn f (f ⁻¹' ↑l.support)),
  (Finsupp.linearCombination R v) (Finsupp.comapDomain f l hf) = ∑ i ∈ l.support.preimage f hf, l (f i) • v i

theorem Finsupp.linearCombination_onFinset E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {s : Finset α} {f : α → R} (g : α → M) (hf : ∀ (a : α), f a ≠ 0 → a ∈ s),
  (Finsupp.linearCombination R g) (Finsupp.onFinset s f hf) = ∑ x ∈ s, f x • g x

def Finsupp.bilinearCombination E1 #

{α : Type u_1} →
  {M : Type u_2} →
    (R : Type u_3) →
      (S : Type u_4) →
        [inst : Semiring R] →
          [inst_1 : Semiring S] →
            [inst_2 : AddCommMonoid M] →
              [inst_3 : Module R M] →
                [inst_4 : Module S M] → [inst_5 : SMulCommClass R S M] → (α → M) →ₗ[S] (α →₀ R) →ₗ[R] M

Finsupp.bilinearCombination R S v f is the linear combination of vectors in v with weights in f, as a bilinear map of v and f. In the absence of SMulCommClass R S M, use Finsupp.linearCombination.

See note [bundled maps over different rings] for why separate R and S semirings are used.

theorem Finsupp.bilinearCombination_apply E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) {S : Type u_4} [inst : Semiring R] [inst_1 : Semiring S]
  [inst_2 : AddCommMonoid M] [inst_3 : Module R M] {v : α → M} [inst_4 : Module S M] [inst_5 : SMulCommClass R S M],
  (Finsupp.bilinearCombination R S) v = Finsupp.linearCombination R v

def Fintype.linearCombination E3 #

{α : Type u_1} →
  {M : Type u_2} →
    (R : Type u_3) →
      [Fintype α] → [inst : Semiring R] → [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → (α → M) → (α → R) →ₗ[R] M

Fintype.linearCombination R v f is the linear combination of vectors in v with weights in f. This variant of Finsupp.linearCombination is defined on fintype indexed vectors.

This map is linear in v if R is commutative, and always linear in f. See note [bundled maps over different rings] for why separate R and S semirings are used.

theorem Fintype.linearCombination_apply E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] (v : α → M) (f : α → R), (Fintype.linearCombination R v) f = ∑ i, f i • v i

theorem Fintype.linearCombination_apply_single E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] (v : α → M) [inst_4 : DecidableEq α] (i : α) (r : R),
  (Fintype.linearCombination R v) (Pi.single i r) = r • v i

theorem Finsupp.linearCombination_eq_fintype_linearCombination_apply E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] (v : α → M) (x : α → R),
  (Finsupp.linearCombination R v) ((Finsupp.linearEquivFunOnFinite R R α).symm x) = (Fintype.linearCombination R v) x

theorem Finsupp.linearCombination_eq_fintype_linearCombination E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] (v : α → M),
  Finsupp.linearCombination R v ∘ₗ ↑(Finsupp.linearEquivFunOnFinite R R α).symm = Fintype.linearCombination R v

theorem Fintype.range_linearCombination E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] (v : α → M), (Fintype.linearCombination R v).range = Submodule.span R (Set.range v)

theorem span_range_eq_top_iff_surjective_fintypeLinearCombination E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] (v : α → M),
  Submodule.span R (Set.range v) = ⊤ ↔ Function.Surjective ⇑(Fintype.linearCombination R v)

def Fintype.bilinearCombination E1 #

{α : Type u_1} →
  {M : Type u_2} →
    (R : Type u_3) →
      [Fintype α] →
        [inst : Semiring R] →
          [inst_1 : AddCommMonoid M] →
            [inst_2 : Module R M] →
              (S : Type u_4) →
                [inst_3 : Semiring S] →
                  [inst_4 : Module S M] → [inst_5 : SMulCommClass R S M] → (α → M) →ₗ[S] (α → R) →ₗ[R] M

Fintype.bilinearCombination R S v f is the linear combination of vectors in v with weights in f. This variant of Finsupp.linearCombination is defined on fintype indexed vectors.

This map is linear in v if R is commutative, and always linear in f. See note [bundled maps over different rings] for why separate R and S semirings are used.

theorem Fintype.bilinearCombination_apply E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] {S : Type u_4} [inst_4 : Semiring S] [inst_5 : Module S M] [inst_6 : SMulCommClass R S M]
  (v : α → M), (Fintype.bilinearCombination R S) v = Fintype.linearCombination R v

theorem Fintype.bilinearCombination_apply_single E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] {S : Type u_4} [inst_4 : Semiring S] [inst_5 : Module S M] [inst_6 : SMulCommClass R S M]
  (v : α → M) [inst_7 : DecidableEq α] (i : α) (r : R), ((Fintype.bilinearCombination R S) v) (Pi.single i r) = r • v i

theorem Submodule.mem_span_range_iff_exists_fun E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] {v : α → M} {x : M}, x ∈ Submodule.span R (Set.range v) ↔ ∃ c, ∑ i, c i • v i = x

An element x lies in the span of v iff it can be written as sum ∑ cᵢ • vᵢ = x.

theorem Submodule.top_le_span_range_iff_forall_exists_fun E1 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Fintype α] [inst_1 : Semiring R] [inst_2 : AddCommMonoid M]
  [inst_3 : Module R M] {v : α → M}, ⊤ ≤ Submodule.span R (Set.range v) ↔ ∀ (x : M), ∃ c, ∑ i, c i • v i = x

A family v : α → V is generating V iff every element (x : V) can be written as sum ∑ cᵢ • vᵢ = x.

theorem Submodule.mem_span_image_iff_exists_fun E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} {x : M} {s : Set α}, x ∈ Submodule.span R (v '' s) ↔ ∃ t, ↑t ⊆ s ∧ ∃ c, ∑ i, c i • v ↑i = x

theorem Submodule.mem_span_image_finset_iff_exists_fun E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} {x : M} {s : Finset α}, x ∈ Submodule.span R (v '' ↑s) ↔ ∃ c, ∑ i, c i • v ↑i = x

theorem Submodule.mem_span_image_finset_iff_exists_fun' E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} {x : M} {s : Finset α}, x ∈ Submodule.span R (v '' ↑s) ↔ ∃ c, ∑ i ∈ s, c i • v i = x

theorem Fintype.mem_span_image_iff_exists_fun E0 #

∀ {α : Type u_1} {M : Type u_2} (R : Type u_3) [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  {v : α → M} {x : M} {s : Set α} [inst_3 : Fintype ↑s], x ∈ Submodule.span R (v '' s) ↔ ∃ c, ∑ i, c i • v ↑i = x

def Span.repr E1 #

(R : Type u_1) →
  {M : Type u_2} →
    [inst : Semiring R] →
      [inst_1 : AddCommMonoid M] → [inst_2 : Module R M] → (w : Set M) → ↥(Submodule.span R w) → ↑w →₀ R

Pick some representation of x : span R w as a linear combination in w, ((Finsupp.mem_span_iff_linearCombination _ _ _).mp x.2).choose

theorem Span.finsupp_linearCombination_repr E0 #

∀ (R : Type u_1) {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {w : Set M}
  (x : ↥(Submodule.span R w)), (Finsupp.linearCombination R Subtype.val) (Span.repr R w x) = ↑x

theorem LinearMap.map_finsupp_linearCombination E0 #

∀ {R : Type u_1} {M : Type u_2} {N : Type u_3} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M]
  [inst_3 : AddCommMonoid N] [inst_4 : Module R N] (f : M →ₗ[R] N) {ι : Type u_4} {g : ι → M} (l : ι →₀ R),
  f ((Finsupp.linearCombination R g) l) = (Finsupp.linearCombination R (⇑f ∘ g)) l

theorem Submodule.mem_span_iff_exists_finset_subset E0 #

∀ {R : Type u_1} {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {s : Set M}
  {x : M}, x ∈ Submodule.span R s ↔ ∃ f t, ↑t ⊆ s ∧ Function.support f ⊆ ↑t ∧ ∑ a ∈ t, f a • a = x

theorem Submodule.mem_span_finset E0 #

∀ {R : Type u_1} {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {s : Finset M}
  {x : M}, x ∈ Submodule.span R ↑s ↔ ∃ f, Function.support f ⊆ ↑s ∧ ∑ a ∈ s, f a • a = x

theorem Submodule.mem_span_iff_of_fintype E0 #

∀ {R : Type u_1} {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {s : Set M}
  [inst_3 : Fintype ↑s] {x : M}, x ∈ Submodule.span R s ↔ ∃ f, ∑ a, f a • ↑a = x

theorem Submodule.mem_span_finset' E0 #

∀ {R : Type u_1} {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {s : Finset M}
  {x : M}, x ∈ Submodule.span R ↑s ↔ ∃ f, ∑ a, f a • ↑a = x

A variant of Submodule.mem_span_finset using s as the index type.

theorem Submodule.mem_span_set E0 #

∀ {R : Type u_1} {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {m : M}
  {s : Set M}, m ∈ Submodule.span R s ↔ ∃ c, ↑c.support ⊆ s ∧ (c.sum fun mi r ↦ r • mi) = m

An element m ∈ M is contained in the R-submodule spanned by a set s ⊆ M, if and only if m can be written as a finite R-linear combination of elements of s. The implementation uses Finsupp.sum.

theorem Submodule.mem_span_set' E0 #

∀ {R : Type u_1} {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] {m : M}
  {s : Set M}, m ∈ Submodule.span R s ↔ ∃ n f g, ∑ i, f i • ↑(g i) = m

An element m ∈ M is contained in the R-submodule spanned by a set s ⊆ M, if and only if m can be written as a finite R-linear combination of elements of s. The implementation uses a sum indexed by Fin n for some n.

theorem Submodule.span_eq_iUnion_nat E1 #

∀ {R : Type u_1} {M : Type u_2} [inst : Semiring R] [inst_1 : AddCommMonoid M] [inst_2 : Module R M] (s : Set M),
  ↑(Submodule.span R s) = ⋃ n, (fun f ↦ ∑ i, (f i).1 • (f i).2) '' {f | ∀ (i : Fin n), (f i).2 ∈ s}

The span of a subset s is the union over all n of the set of linear combinations of at most n terms belonging to s.

def Finsupp.addSingleEquiv E1 #

{R : Type u_4} → {ι : Type u_6} → [inst : Ring R] → (i : ι) → (c : ι → R) → c i = 0 → (ι →₀ R) ≃ₗ[R] ι →₀ R

Given c : ι → R and an index i such that c i = 0, this is the linear isomorphism sending the j-th standard basis vector to itself plus c j multiplied with the i-th standard basis vector (in particular, the i-th standard basis vector is kept invariant).

theorem Finsupp.linearCombination_comp_addSingleEquiv E1 #

∀ {R : Type u_4} {M : Type u_5} {ι : Type u_6} [inst : Ring R] [inst_1 : AddCommGroup M] [inst_2 : Module R M] (i : ι)
  (c : ι → R) (h₀ : c i = 0) (v : ι → M),
  Finsupp.linearCombination R v ∘ₗ ↑(Finsupp.addSingleEquiv i c h₀) =
    Finsupp.linearCombination R (v + fun x ↦ c x • v i)