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, f 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} [inst : CommSemiring R] {s : ι → Type u_7} [inst_1 : (i : ι) → AddCommMonoid (s i)] [inst_2 : (i : ι) → Module R (s i)] (r : R) (f : (i : ι) → s i) (i : ι), f i = 0 → PiTensorProduct.Eqv R s (FreeAddMonoid.of (r, f)) 0
- of_zero_scalar: ∀ {ι : Type u_1} {R : Type u_4} [inst : CommSemiring R] {s : ι → Type u_7} [inst_1 : (i : ι) → AddCommMonoid (s i)] [inst_2 : (i : ι) → Module R (s i)] (f : (i : ι) → s i), PiTensorProduct.Eqv R s (FreeAddMonoid.of (0, f)) 0
- of_add: ∀ {ι : Type u_1} {R : Type u_4} [inst : CommSemiring R] {s : ι → Type u_7} [inst_1 : (i : ι) → AddCommMonoid (s i)] [inst_2 : (i : ι) → Module R (s i)] (x : DecidableEq ι) (r : R) (f : (i : ι) → s i) (i : ι) (m₁ m₂ : s i), PiTensorProduct.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} [inst : CommSemiring R] {s : ι → Type u_7} [inst_1 : (i : ι) → AddCommMonoid (s i)] [inst_2 : (i : ι) → Module R (s i)] (r r' : R) (f : (i : ι) → s i), PiTensorProduct.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} [inst : CommSemiring R] {s : ι → Type u_7} [inst_1 : (i : ι) → AddCommMonoid (s i)] [inst_2 : (i : ι) → Module R (s i)] (x : DecidableEq ι) (r : R) (f : (i : ι) → s i) (i : ι) (r' : R), PiTensorProduct.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} [inst : CommSemiring R] {s : ι → Type u_7} [inst_1 : (i : ι) → AddCommMonoid (s i)] [inst_2 : (i : ι) → Module R (s i)] (x y : FreeAddMonoid (R × ((i : ι) → s i))), PiTensorProduct.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
- PiTensorProduct R s = AddCon.Quotient (addConGen (PiTensorProduct.Eqv R s))
Instances For
Pretty printer defined by notation3 command.
Equations
- One or more equations did not get rendered due to their size.
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- PiTensorProduct.instInhabitedPiTensorProduct s = { default := 0 }
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
- PiTensorProduct.tprodCoeff R r f = (AddCon.mk' (addConGen (PiTensorProduct.Eqv R fun (i : ι) => s i))) (FreeAddMonoid.of (r, f))
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
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Equations
- PiTensorProduct.instSMulPiTensorProduct = PiTensorProduct.hasSMul'
Equations
- One or more equations did not get rendered due to their size.
Equations
- (_ : SMulCommClass R₁ R₂ (PiTensorProduct R fun (i : ι) => s i)) = (_ : SMulCommClass R₁ R₂ (PiTensorProduct R fun (i : ι) => s i))
Equations
- (_ : IsScalarTower R₁ R₂ (PiTensorProduct R fun (i : ι) => s i)) = (_ : IsScalarTower R₁ R₂ (PiTensorProduct R fun (i : ι) => s i))
Equations
- One or more equations did not get rendered due to their size.
Equations
- PiTensorProduct.instModulePiTensorProductToSemiringInstAddCommMonoidPiTensorProduct = PiTensorProduct.module'
Equations
- (_ : SMulCommClass R R (PiTensorProduct R fun (i : ι) => s i)) = (_ : SMulCommClass R R (PiTensorProduct R fun (i : ι) => s i))
Equations
- (_ : IsScalarTower R R (PiTensorProduct R fun (i : ι) => s i)) = (_ : IsScalarTower R R (PiTensorProduct R fun (i : ι) => s i))
The canonical MultilinearMap R s (⨂[R] i, s i).
Equations
- One or more equations did not get rendered due to their size.
Instances For
pure tensor in tensor product over some index type
Equations
- One or more equations did not get rendered due to their size.
Instances For
Pretty printer defined by notation3 command.
Equations
- One or more equations did not get rendered due to their size.
Instances For
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
- One or more equations did not get rendered due to their size.
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
- One or more equations did not get rendered due to their size.
Instances For
Re-index the components of the tensor power by e.
Equations
- One or more equations did not get rendered due to their size.
Instances For
This lemma is impractical to state in the dependent case.
The tensor product over an empty index type ι is isomorphic to the base ring.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Tensor product of M over a singleton set is equivalent to M
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equivalence between a TensorProduct of PiTensorProducts and a single
PiTensorProduct indexed by a Sum type.
For simplicity, this is defined only for homogeneously- (rather than dependently-) typed components.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- PiTensorProduct.instAddCommGroupPiTensorProductToCommSemiringToAddCommMonoid = Module.addCommMonoidToAddCommGroup R