Finsupp.linearCombination #
Main definitions #
Finsupp.linearCombination R (v : ι → M): sendsl : ι →₀ Rto the linear combination ofv iwith coefficientsl i;Finsupp.linearCombinationOn: a restricted version ofFinsupp.linearCombinationwith domainFintype.linearCombination R (v : ι → M): sendsl : ι → Rto the linear combination ofv iwith coefficientsl i(for a finite typeι)Finsupp.bilinearCombination R S,Fintype.bilinearCombination R S: a bilinear version ofFinsupp.linearCombinationandFintype.linearCombination. It requires thatMis both anR-module and anS-module, withSMulCommClass R S M; the caseS = Rtypically requires thatRis commutative.
Tags #
function with finite support, module, linear algebra
Interprets (l : α →₀ R) as a linear combination of the elements in the family (v : α → M) and evaluates this linear combination.
Equations
- Finsupp.linearCombination R v = (Finsupp.lsum ℕ) fun (i : α) => LinearMap.id.smulRight (v i)
Instances For
Any module is a quotient of a free module. This is stated as surjectivity of
Finsupp.linearCombination R id : (M →₀ R) →ₗ[R] M.
A version of Finsupp.range_linearCombination which is useful for going in the other
direction
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.
Equations
- Finsupp.linearCombinationOn α M R v s = LinearMap.codRestrict (Submodule.span R (v '' s)) (Finsupp.linearCombination R v ∘ₗ (Finsupp.supported R R s).subtype) ⋯
Instances For
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.
Equations
- Finsupp.bilinearCombination R S = { toFun := fun (v : α → M) => Finsupp.linearCombination R v, map_add' := ⋯, map_smul' := ⋯ }
Instances For
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.
Equations
- Fintype.linearCombination R v = { toFun := fun (f : α → R) => ∑ i : α, f i • v i, map_add' := ⋯, map_smul' := ⋯ }
Instances For
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.
Equations
- Fintype.bilinearCombination R S = { toFun := fun (v : α → M) => Fintype.linearCombination R v, map_add' := ⋯, map_smul' := ⋯ }
Instances For
An element x lies in the span of v iff it can be written as sum ∑ cᵢ • vᵢ = x.
A family v : α → V is generating V iff every element (x : V)
can be written as sum ∑ cᵢ • vᵢ = x.
Pick some representation of x : span R w as a linear combination in w,
((Finsupp.mem_span_iff_linearCombination _ _ _).mp x.2).choose
Instances For
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.
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.
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.
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).
Equations
- One or more equations did not get rendered due to their size.