Tensor product of modules over commutative semirings #
This file constructs the tensor product of modules over commutative semirings. Given a semiring R
and modules over it M and N, the standard construction of the tensor product is
TensorProduct R M N. It is also a module over R.
It comes with a canonical bilinear map
TensorProduct.mk R M N : M →ₗ[R] N →ₗ[R] TensorProduct R M N.
Notation #
- This file introduces the notation
M ⊗ NandM ⊗[R] Nfor the tensor product spaceTensorProduct R M N. - It introduces the notation
m ⊗ₜ nandm ⊗ₜ[R] nfor the tensor product of two elements, otherwise written asTensorProduct.tmul R m n.
Tags #
bilinear, tensor, tensor product
The relation on FreeAddMonoid (M × N) that generates a congruence whose quotient is
the tensor product.
- of_zero_left {R : Type u_1} [CommSemiring R] {M : Type u_7} {N : Type u_8} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] (n : N) : Eqv R M N (FreeAddMonoid.of (0, n)) 0
- of_zero_right {R : Type u_1} [CommSemiring R] {M : Type u_7} {N : Type u_8} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] (m : M) : Eqv R M N (FreeAddMonoid.of (m, 0)) 0
- of_add_left {R : Type u_1} [CommSemiring R] {M : Type u_7} {N : Type u_8} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] (m₁ m₂ : M) (n : N) : Eqv R M N (FreeAddMonoid.of (m₁, n) + FreeAddMonoid.of (m₂, n)) (FreeAddMonoid.of (m₁ + m₂, n))
- of_add_right {R : Type u_1} [CommSemiring R] {M : Type u_7} {N : Type u_8} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] (m : M) (n₁ n₂ : N) : Eqv R M N (FreeAddMonoid.of (m, n₁) + FreeAddMonoid.of (m, n₂)) (FreeAddMonoid.of (m, n₁ + n₂))
- of_smul {R : Type u_1} [CommSemiring R] {M : Type u_7} {N : Type u_8} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] (r : R) (m : M) (n : N) : Eqv R M N (FreeAddMonoid.of (r • m, n)) (FreeAddMonoid.of (m, r • n))
- add_comm {R : Type u_1} [CommSemiring R] {M : Type u_7} {N : Type u_8} [AddCommMonoid M] [AddCommMonoid N] [Module R M] [Module R N] (x y : FreeAddMonoid (M × N)) : Eqv R M N (x + y) (y + x)
Instances For
The tensor product of two modules M and N over the same commutative semiring R.
The localized notations are M ⊗ N and M ⊗[R] N, accessed by open scoped TensorProduct.
Equations
- TensorProduct R M N = (addConGen (TensorProduct.Eqv R M N)).Quotient
Instances For
The tensor product of two modules M and N over the same commutative semiring R.
The localized notations are M ⊗ N and M ⊗[R] N, accessed by open scoped TensorProduct.
Equations
- TensorProduct.«term_⊗_» = Lean.ParserDescr.trailingNode `TensorProduct.«term_⊗_» 100 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊗ ") (Lean.ParserDescr.cat `term 101))
Instances For
The tensor product of two modules M and N over the same commutative semiring R.
The localized notations are M ⊗ N and M ⊗[R] N, accessed by open scoped TensorProduct.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- TensorProduct.zero M N = (addConGen (TensorProduct.Eqv R M N)).zero
Equations
- TensorProduct.add M N = (addConGen (TensorProduct.Eqv R M N)).hasAdd
Equations
- TensorProduct.addZeroClass M N = { toZero := TensorProduct.zero M N, toAdd := TensorProduct.add M N, zero_add := ⋯, add_zero := ⋯ }
Equations
- TensorProduct.addSemigroup M N = { toAdd := TensorProduct.add M N, add_assoc := ⋯ }
Equations
- TensorProduct.addCommSemigroup M N = { toAddSemigroup := TensorProduct.addSemigroup M N, add_comm := ⋯ }
Equations
- TensorProduct.instInhabited M N = { default := 0 }
The canonical function M → N → M ⊗ N. The localized notations are m ⊗ₜ n and m ⊗ₜ[R] n,
accessed by open scoped TensorProduct.
Equations
- m ⊗ₜ[R] n = (addConGen (TensorProduct.Eqv R M N)).mk' (FreeAddMonoid.of (m, n))
Instances For
The canonical function M → N → M ⊗ N.
Equations
- TensorProduct.«term_⊗ₜ_» = Lean.ParserDescr.trailingNode `TensorProduct.«term_⊗ₜ_» 100 100 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ⊗ₜ ") (Lean.ParserDescr.cat `term 101))
Instances For
The canonical function M → N → M ⊗ N.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Produces an arbitrary representation of the form mₒ ⊗ₜ n₀ + ....
Equations
- One or more equations did not get rendered due to their size.
Equations
- TensorProduct.uniqueLeft = { default := 0, uniq := ⋯ }
Equations
- TensorProduct.uniqueRight = { default := 0, uniq := ⋯ }
A typeclass for SMul structures which can be moved across a tensor product.
This typeclass is generated automatically from an IsScalarTower instance, but exists so that
we can also add an instance for AddCommGroup.toIntModule, allowing z • to be moved even if
R does not support negation.
Note that Module R' (M ⊗[R] N) is available even without this typeclass on R'; it's only
needed if TensorProduct.smul_tmul, TensorProduct.smul_tmul', or TensorProduct.tmul_smul is
used.
Instances
Note that this provides the default CompatibleSMul R R M N instance through
IsScalarTower.left.
smul can be moved from one side of the product to the other .
Auxiliary function to defining scalar multiplication on tensor product.
Equations
- TensorProduct.SMul.aux r = FreeAddMonoid.lift fun (p : M × N) => (r • p.1) ⊗ₜ[R] p.2
Instances For
Given two modules over a commutative semiring R, if one of the factors carries a
(distributive) action of a second type of scalars R', which commutes with the action of R, then
the tensor product (over R) carries an action of R'.
This instance defines this R' action in the case that it is the left module which has the R'
action. Two natural ways in which this situation arises are:
- Extension of scalars
- A tensor product of a group representation with a module not carrying an action
Note that in the special case that R = R', since R is commutative, we just get the usual scalar
action on a tensor product of two modules. This special case is important enough that, for
performance reasons, we define it explicitly below.
Equations
- TensorProduct.leftHasSMul = { smul := fun (r : R') => ⇑((addConGen (TensorProduct.Eqv R M N)).lift (TensorProduct.SMul.aux r) ⋯) }
Equations
- One or more equations did not get rendered due to their size.
Equations
- TensorProduct.addCommMonoid = { toAddMonoid := TensorProduct.addMonoid, add_comm := ⋯ }
Equations
- TensorProduct.leftDistribMulAction = { toSMul := TensorProduct.leftHasSMul, mul_smul := ⋯, one_smul := ⋯, smul_zero := ⋯, smul_add := ⋯ }
Equations
- TensorProduct.leftModule = { toDistribMulAction := TensorProduct.leftDistribMulAction, add_smul := ⋯, zero_smul := ⋯ }
SMulCommClass R' R'₂ M implies SMulCommClass R' R'₂ (M ⊗[R] N)
IsScalarTower R'₂ R' M implies IsScalarTower R'₂ R' (M ⊗[R] N)
IsScalarTower R'₂ R' N implies IsScalarTower R'₂ R' (M ⊗[R] N)
A short-cut instance for the common case, where the requirements for the compatible_smul
instances are sufficient.
The canonical bilinear map M → N → M ⊗[R] N.
Equations
- TensorProduct.mk R M N = LinearMap.mk₂ R (fun (x1 : M) (x2 : N) => x1 ⊗ₜ[R] x2) ⋯ ⋯ ⋯ ⋯
Instances For
The simple (aka pure) elements span the tensor product.