Tensor product of an indexed family of modules over commutative semirings #
We define the tensor product of an indexed family s : ι → Type* of modules over commutative
semirings. We denote this space by ⨂[R] i, s i and define it as FreeAddMonoid (R × Π i, s i)
quotiented by the appropriate equivalence relation. The treatment follows very closely that of the
binary tensor product in LinearAlgebra/TensorProduct.lean.
Main definitions #
PiTensorProduct R swithRa commutative semiring ands : ι → Type*is the tensor product of all thes i's. This is denoted by⨂[R] i, s i.tprod R fwithf : Π i, s iis the tensor product of the vectorsf iover alli : ι. This is bundled as a multilinear map fromΠ i, s ito⨂[R] i, s i.liftAddHomconstructs anAddMonoidHomfrom(⨂[R] i, s i)to some spaceFfrom a functionφ : (R × Π i, s i) → Fwith the appropriate properties.lift φwithφ : MultilinearMap R s Eis the corresponding linear map(⨂[R] i, s i) →ₗ[R] E. This is bundled as a linear equivalence.PiTensorProduct.reindex ere-indexes the components of⨂[R] i : ι, Malonge : ι ≃ ι₂.PiTensorProduct.tmulEquivequivalence between aTensorProductofPiTensorProducts and a singlePiTensorProduct.
Notations #
⨂[R] i, s iis defined as localized notation in localeTensorProduct.⨂ₜ[R] i, f iwithf : ∀ i, s iis defined globally as the tensor product of all thef i's.
Implementation notes #
- We define it via
FreeAddMonoid (R × Π i, s i)with theRrepresenting a "hidden" tensor factor, rather thanFreeAddMonoid (Π i, s i)to ensure that, ifιis an empty type, the space is isomorphic to the base ringR. - We have not restricted the index type
ιto be aFintype, as nothing we do here strictly requires it. However, problems may arise in the case whereιis infinite; use at your own caution. - Instead of requiring
DecidableEq ιas an argument toPiTensorProductitself, we include it as an argument in the constructors of the relation. A decidability instance still has to come from somewhere due to the use ofFunction.update, but this hides it from the downstream user. See the implementation notes forMultilinearMapfor an extended discussion of this choice.
TODO #
- Define tensor powers, symmetric subspace, etc.
- API for the various ways
ιcan be split into subsets; connect this with the binary tensor product. - Include connection with holors.
- Port more of the API from the binary tensor product over to this case.
Tags #
multilinear, tensor, tensor product
The relation on FreeAddMonoid (R × Π i, s i) that generates a congruence whose quotient is
the tensor product.
- of_zero {ι : Type u_1} {R : Type u_4} [CommSemiring R] {s : ι → Type u_7} [(i : ι) → AddCommMonoid (s i)] [(i : ι) → Module R (s i)] (r : R) (f : (i : ι) → s i) (i : ι) : f i = 0 → Eqv R s (FreeAddMonoid.of (r, f)) 0
- of_zero_scalar {ι : Type u_1} {R : Type u_4} [CommSemiring R] {s : ι → Type u_7} [(i : ι) → AddCommMonoid (s i)] [(i : ι) → Module R (s i)] (f : (i : ι) → s i) : Eqv R s (FreeAddMonoid.of (0, f)) 0
- of_add {ι : Type u_1} {R : Type u_4} [CommSemiring R] {s : ι → Type u_7} [(i : ι) → AddCommMonoid (s i)] [(i : ι) → Module R (s i)] (x✝ : DecidableEq ι) (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i) : Eqv R s (FreeAddMonoid.of (r, Function.update f i m₁) + FreeAddMonoid.of (r, Function.update f i m₂)) (FreeAddMonoid.of (r, Function.update f i (m₁ + m₂)))
- of_add_scalar {ι : Type u_1} {R : Type u_4} [CommSemiring R] {s : ι → Type u_7} [(i : ι) → AddCommMonoid (s i)] [(i : ι) → Module R (s i)] (r r' : R) (f : (i : ι) → s i) : Eqv R s (FreeAddMonoid.of (r, f) + FreeAddMonoid.of (r', f)) (FreeAddMonoid.of (r + r', f))
- of_smul {ι : Type u_1} {R : Type u_4} [CommSemiring R] {s : ι → Type u_7} [(i : ι) → AddCommMonoid (s i)] [(i : ι) → Module R (s i)] (x✝ : DecidableEq ι) (r : R) (f : (i : ι) → s i) (i : ι) (r' : R) : Eqv R s (FreeAddMonoid.of (r, Function.update f i (r' • f i))) (FreeAddMonoid.of (r' * r, f))
- add_comm {ι : Type u_1} {R : Type u_4} [CommSemiring R] {s : ι → Type u_7} [(i : ι) → AddCommMonoid (s i)] [(i : ι) → Module R (s i)] (x y : FreeAddMonoid (R × ((i : ι) → s i))) : Eqv R s (x + y) (y + x)
Instances For
PiTensorProduct R s with R a commutative semiring and s : ι → Type* is the tensor
product of all the s i's. This is denoted by ⨂[R] i, s i.
Equations
Instances For
This enables the notation ⨂[R] i : ι, s i for the pi tensor product PiTensorProduct,
given an indexed family of types s : ι → Type*.
Equations
Instances For
Pretty printer defined by notation3 command.
Equations
Instances For
Equations
Equations
tprodCoeff R r f with r : R and f : Π i, s i is the tensor product of the vectors f i
over all i : ι, multiplied by the coefficient r. Note that this is meant as an auxiliary
definition for this file alone, and that one should use tprod defined below for most purposes.
Equations
Instances For
Construct an AddMonoidHom from (⨂[R] i, s i) to some space F from a function
φ : (R × Π i, s i) → F with the appropriate properties.
Equations
Instances For
Induct using tprodCoeff
Equations
Equations
Equations
Equations
Equations
The canonical MultilinearMap R s (⨂[R] i, s i).
tprod R fun i => f i has notation ⨂ₜ[R] i, f i.
Equations
Instances For
Pretty printer defined by notation3 command.
Equations
Instances For
The canonical MultilinearMap R s (⨂[R] i, s i).
tprod R fun i => f i has notation ⨂ₜ[R] i, f i.
Equations
Instances For
The image of an element p of FreeAddMonoid (R × Π i, s i) in the PiTensorProduct is
equal to the sum of a • ⨂ₜ[R] i, m i over all the entries (a, m) of p.
The set of lifts of an element x of ⨂[R] i, s i in FreeAddMonoid (R × Π i, s i).
Equations
Instances For
An element p of FreeAddMonoid (R × Π i, s i) lifts an element x of ⨂[R] i, s i
if and only if x is equal to the sum of a • ⨂ₜ[R] i, m i over all the entries
(a, m) of p.
Every element of ⨂[R] i, s i has a lift in FreeAddMonoid (R × Π i, s i).
The empty list lifts the element 0 of ⨂[R] i, s i.
If elements p,q of FreeAddMonoid (R × Π i, s i) lift elements x,y of ⨂[R] i, s i
respectively, then p + q lifts x + y.
If an element p of FreeAddMonoid (R × Π i, s i) lifts an element x of ⨂[R] i, s i,
and if a is an element of R, then the list obtained by multiplying the first entry of each
element of p by a lifts a • x.
Induct using scaled versions of PiTensorProduct.tprod.
The pure tensors (i.e. the elements of the image of PiTensorProduct.tprod) span
the tensor product.
Auxiliary function to constructing a linear map (⨂[R] i, s i) → E given a
MultilinearMap R s E with the property that its composition with the canonical
MultilinearMap R s (⨂[R] i, s i) is the given multilinear map.
Equations
Instances For
Constructing a linear map (⨂[R] i, s i) → E given a MultilinearMap R s E with the
property that its composition with the canonical MultilinearMap R s E is
the given multilinear map φ.
Equations
Instances For
Let sᵢ and tᵢ be two families of R-modules.
Let f be a family of R-linear maps between sᵢ and tᵢ, i.e. f : Πᵢ sᵢ → tᵢ,
then there is an induced map ⨂ᵢ sᵢ → ⨂ᵢ tᵢ by ⨂ aᵢ ↦ ⨂ fᵢ aᵢ.
This is TensorProduct.map for an arbitrary family of modules.
Equations
Instances For
Given submodules p i ⊆ s i, this is the natural map: ⨂[R] i, p i → ⨂[R] i, s i.
This is TensorProduct.mapIncl for an arbitrary family of modules.
Equations
Instances For
Upgrading PiTensorProduct.map to a MonoidHom when s = t.
Equations
Instances For
The tensor of a family of linear maps from sᵢ to tᵢ, as a multilinear map of
the family.
Equations
Instances For
Let sᵢ and tᵢ be families of R-modules.
Then there is an R-linear map between ⨂ᵢ Hom(sᵢ, tᵢ) and Hom(⨂ᵢ sᵢ, ⨂ tᵢ) defined by
⨂ᵢ fᵢ ↦ ⨂ᵢ aᵢ ↦ ⨂ᵢ fᵢ aᵢ.
This is TensorProduct.homTensorHomMap for an arbitrary family of modules.
Note that PiTensorProduct.piTensorHomMap (tprod R f) is equal to PiTensorProduct.map f.
Equations
Instances For
If s i and t i are linearly equivalent for every i in ι, then ⨂[R] i, s i and
⨂[R] i, t i are linearly equivalent.
This is the n-ary version of TensorProduct.congr
Equations
Instances For
Let sᵢ, tᵢ and t'ᵢ be families of R-modules, then f : Πᵢ sᵢ → tᵢ → t'ᵢ induces an
element of Hom(⨂ᵢ sᵢ, Hom(⨂ tᵢ, ⨂ᵢ t'ᵢ)) defined by ⨂ᵢ aᵢ ↦ ⨂ᵢ bᵢ ↦ ⨂ᵢ fᵢ aᵢ bᵢ.
This is PiTensorProduct.map for two arbitrary families of modules.
This is TensorProduct.map₂ for families of modules.
Equations
Instances For
Let sᵢ, tᵢ and t'ᵢ be families of R-modules.
Then there is a function from ⨂ᵢ Hom(sᵢ, Hom(tᵢ, t'ᵢ)) to Hom(⨂ᵢ sᵢ, Hom(⨂ tᵢ, ⨂ᵢ t'ᵢ))
defined by ⨂ᵢ fᵢ ↦ ⨂ᵢ aᵢ ↦ ⨂ᵢ bᵢ ↦ ⨂ᵢ fᵢ aᵢ bᵢ.
Equations
Instances For
Let sᵢ, tᵢ and t'ᵢ be families of R-modules.
Then there is an linear map from ⨂ᵢ Hom(sᵢ, Hom(tᵢ, t'ᵢ)) to Hom(⨂ᵢ sᵢ, Hom(⨂ tᵢ, ⨂ᵢ t'ᵢ))
defined by ⨂ᵢ fᵢ ↦ ⨂ᵢ aᵢ ↦ ⨂ᵢ bᵢ ↦ ⨂ᵢ fᵢ aᵢ bᵢ.
This is TensorProduct.homTensorHomMap for two arbitrary families of modules.
Equations
Instances For
Re-index the components of the tensor power by e.
Equations
Instances For
This lemma is impractical to state in the dependent case.
Re-indexing the components of the tensor product by an equivalence e is compatible
with PiTensorProduct.map.
The tensor product over an empty index type ι is isomorphic to the base ring.
Equations
Instances For
Tensor product of M over a singleton set is equivalent to M
Equations
Instances For
Equivalence between a TensorProduct of PiTensorProducts and a single
PiTensorProduct indexed by a Sum type. If N is a constant family of
modules, use the non-dependant version PiTensorProduct.tmulEquiv instead.
Equations
Instances For
Equivalence between a TensorProduct of PiTensorProducts and a single
PiTensorProduct indexed by a Sum type.
See PiTensorProduct.tmulEquivDep for the dependent version.