The multi-tensor of internal modules over a monoid object #
The replacement for associativity of the binary module tensor
product of ModTensor.lean: for a list Xs of left modules over a
monoid object A in a braided monoidal category, the multi-tensor
X₁ ⊗_A ⋯ ⊗_A Xₙ is presented in one step, as the coequalizer of a
single wide relation pair
`⊕ₛ mid s ⇉ X₁ ⊗ (X₂ ⊗ (⋯ ⊗ Xₙ))`
whose source is the finite biproduct, over the adjacent slots s of
the list, of the relation objects obtained by inserting A between
the two factors of the slot, and whose legs act on the slot through
the braided right action and the left action respectively — the two
legs of ModTensor.lean at the slot's window, in every adjacent
slot at once.
modList A Xs: the plain tensor fold of the underlying objects, with the monoidal unit as seed;modListCasttransports it along equalities of lists.ModSlot Xs: an adjacent slot, recorded as a decompositionXs = pre ++ M :: N :: post;modSlots Xsenumerates the slots andmem_modSlotsshows the enumeration is complete.modMulti A Xs,modMultiπ,modMulti_rel,modMultiDesc,modMultiπ_desc,modMulti_hom_ext: the multi-tensor and its universal property, with the slot relations quantified over decompositions.modMultiNil/modMultiSingle: with this presentation the empty multi-tensor is the monoidal unit of the ambient category (not the regular moduleA, which is the unit ofMod A— consumers wanting that convention should treat the empty list separately), and the singleton multi-tensor is the module itself.modMultiPair: the two-element multi-tensor agrees with the binarymodTensor, compatibly with the projections.modMultiWhiskerRDesc/modMultiWhiskerLDesc: descent along the whiskered projections, with the whiskered relation condition reduced to the slots through the biproduct distributors.modMultiConcatFst,modMultiConcat: the concatenation mapmodMulti A Xs ⊗ modMulti A Ys ⟶ modMulti A (Xs ++ Ys), by a two-stage descent through the whiskered coequalizers, with the defining equationtensorHom_modMultiπ_concatagainst the projections and the fold concatenationmodListConcat.modMultiHeadAct,modMultiMod: for a commutative monoid the action on the head factor descends, making the multi-tensor of a non-empty list a module; the empty multi-tensor is the monoidal unit and carries no canonicalA-action.
The further descent of modMultiConcat through the middle
A-action — the comparison with modTensor of two multi-tensors —
is outside this module's scope; its substrate (the head modules,
the concatenation map, and the slot relations) is complete.
The underlying tensor fold #
The tensor fold of the underlying objects of a list of modules, folded to the right with the monoidal unit as seed.
Equations
Instances For
Transport of the tensor fold along an equality of lists. It is
an eqToHom, so it composes and cancels by eqToHom simp lemmas.
Equations
Instances For
Whiskering a list transport is a list transport.
The slot relations #
A slot of the list is a decomposition Xs = pre ++ M :: N :: post.
Its relation object inserts A between the two factors of the
slot, nested exactly as the ambient fold, so that the legs below
are typed at the fold on the nose, with no transport.
The relation object of a slot: the ambient fold with the monoid inserted between the two factors of the slot.
Equations
- One or more equations did not get rendered due to their size.
- RS.modMultiMid A (P :: rest) x✝² x✝¹ x✝ = CategoryTheory.MonoidalCategoryStruct.tensorObj P.X (RS.modMultiMid A rest x✝² x✝¹ x✝)
Instances For
Assemble a window morphism on (M.X ⊗ A) ⊗ N.X into a relation
leg over a prefix: resolve the window, reassociate the second factor
onto the suffix, and whisker through the prefix.
Equations
- One or more equations did not get rendered due to their size.
- RS.modMultiLegOf A M N post w (M_1 :: l) = CategoryTheory.MonoidalCategoryStruct.whiskerLeft M_1.X (RS.modMultiLegOf A M N post w l)
Instances For
The first relation leg at a slot: act on the left factor of the window through the braided right action.
Equations
- RS.modMultiLegM A pre M N post = RS.modMultiLegOf A M N post (RS.modTensorLegM A M N) pre
Instances For
The second relation leg at a slot: associate and act on the right factor of the window.
Equations
- RS.modMultiLegN A pre M N post = RS.modMultiLegOf A M N post (RS.modTensorLegN A M N) pre
Instances For
Enumeration of the slots #
An adjacent slot of a list of modules: a decomposition into a prefix, two adjacent factors, and a suffix.
- pre : List (CategoryTheory.Mod D A)
The factors below the slot.
- fst : CategoryTheory.Mod D A
The first factor of the slot.
- snd : CategoryTheory.Mod D A
The second factor of the slot.
- post : List (CategoryTheory.Mod D A)
The factors above the slot.
The decomposition of the ambient list.
Instances For
Extend a slot by one factor below.
Equations
Instances For
The list of all adjacent slots of a list of modules.
Equations
- RS.modSlots A [] = []
- RS.modSlots A [head] = []
- RS.modSlots A (M :: N :: post) = { pre := [], fst := M, snd := N, post := post, eq := ⋯ } :: List.map (RS.ModSlot.consSlot M) (RS.modSlots A (N :: post))
Instances For
Extension by a factor preserves membership in the slot list.
The slot enumeration is complete: every decomposition of the list occurs among its slots.
The relation pair of the multi-tensor #
The relation object of a slot, in slot form.
Instances For
The first relation leg of a slot, transported to the ambient list.
Equations
- s.legM = CategoryTheory.CategoryStruct.comp (RS.modMultiLegM A s.pre s.fst s.snd s.post) (RS.modListCast A ⋯)
Instances For
The second relation leg of a slot, transported to the ambient list.
Equations
- s.legN = CategoryTheory.CategoryStruct.comp (RS.modMultiLegN A s.pre s.fst s.snd s.post) (RS.modListCast A ⋯)
Instances For
The source of the relation pair: the biproduct of the relation objects over all adjacent slots. An abbreviation, so that the biproduct API applies to the legs without unfolding.
Equations
- RS.modMultiSrc A Xs = ⨁ fun (i : Fin (RS.modSlots A Xs).length) => (RS.modSlots A Xs)[↑i].mid
Instances For
The first leg of the relation pair, assembled over all slots.
Equations
- RS.modMultiLegFst A Xs = CategoryTheory.Limits.biproduct.desc fun (i : Fin (RS.modSlots A Xs).length) => (RS.modSlots A Xs)[↑i].legM
Instances For
The second leg of the relation pair, assembled over all slots.
Equations
- RS.modMultiLegSnd A Xs = CategoryTheory.Limits.biproduct.desc fun (i : Fin (RS.modSlots A Xs).length) => (RS.modSlots A Xs)[↑i].legN
Instances For
The multi-tensor and its universal property #
The multi-tensor of a list of modules over A: the
coequalizer of the wide relation pair, identifying
(x·c) ⊗ y ~ x ⊗ (c·y) in every adjacent slot simultaneously. No
binary module tensor product and no associativity enter.
Equations
- RS.modMulti A Xs = CategoryTheory.Limits.coequalizer (RS.modMultiLegFst A Xs) (RS.modMultiLegSnd A Xs)
Instances For
The projection of the ambient fold onto the multi-tensor.
Equations
- RS.modMultiπ A Xs = CategoryTheory.Limits.coequalizer.π (RS.modMultiLegFst A Xs) (RS.modMultiLegSnd A Xs)
Instances For
The two assembled legs agree after the projection.
The two assembled legs agree after the projection.
The slot relation in the multi-tensor: at every
decomposition Xs = pre ++ M :: N :: post the two slot legs agree
after the projection.
The slot relation in the multi-tensor: at every
decomposition Xs = pre ++ M :: N :: post the two slot legs agree
after the projection.
Morphisms out of the multi-tensor are determined by their composite with the projection.
Descend a morphism that coequalizes every slot relation to the multi-tensor.
Equations
Instances For
The descent factors the given morphism through the projection.
The descent factors the given morphism through the projection.
The empty and singleton multi-tensors #
Below two factors there are no adjacent slots: the relation source is the empty biproduct, the legs agree, and the projection is an isomorphism.
On a slot-free list the projection is an isomorphism.
Equations
- RS.modMultiTriv A h = { hom := RS.modMultiDesc A (CategoryTheory.CategoryStruct.id (RS.modList A Xs)) ⋯, inv := RS.modMultiπ A Xs, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
The empty multi-tensor is the monoidal unit of the ambient
category. With this presentation the empty fold is 𝟙_ D, not the
regular module: consumers wanting A as the empty product — the
unit of the module category — should treat the empty list as a
separate case.
Equations
- RS.modMultiNil A = RS.modMultiTriv A ⋯
Instances For
The singleton multi-tensor is the module.
Equations
Instances For
Comparison with the binary module tensor product #
For a two-element list the wide relation pair has a single slot,
whose window legs are exactly the parallel pair of ModTensor.lean;
the two coequalizer presentations agree, up to the right unitor
absorbing the unit seed of the fold.
The only slot of a two-element list is the full decomposition.
The resolution of the two-element fold onto the plain tensor
product: absorb the unit seed. A bridge morphism with a
modList-typed source, so that statements through it stay
type-correct at low transparency.
Equations
Instances For
The inverse resolution: reinstate the unit seed.
Equations
Instances For
The window seed of the pair: the right unitor of the single
relation object, retyped at modMultiMid.
Equations
Instances For
The inverse window seed of the pair.
Equations
Instances For
The single relation leg of the pair against the resolution: the unit seed is absorbed and the window morphism remains.
The single relation leg of the pair against the resolution: the unit seed is absorbed and the window morphism remains.
A window morphism against the inverse resolution, in leg form.
A window morphism against the inverse resolution, in leg form.
Comparison with the binary tensor product: the forward direction, descending the binary projection.
Equations
- RS.modMultiPairHom A X Y = RS.modMultiDesc A (CategoryTheory.CategoryStruct.comp (RS.pairResolve A X Y) (RS.modTensorπ A X Y)) ⋯
Instances For
Defining equation of the forward comparison.
Defining equation of the forward comparison.
Comparison with the binary tensor product: the backward direction, descending the wide projection.
Equations
- RS.modMultiPairInv A X Y = RS.modTensorDesc A X Y (CategoryTheory.CategoryStruct.comp (RS.pairResolveInv A X Y) (RS.modMultiπ A [X, Y])) ⋯
Instances For
Defining equation of the backward comparison.
Defining equation of the backward comparison.
The two-element multi-tensor is the binary module tensor product: the one-slot wide presentation and the parallel-pair presentation coequalize the same relations.
Equations
- RS.modMultiPair A X Y = { hom := RS.modMultiPairHom A X Y, inv := RS.modMultiPairInv A X Y, hom_inv_id := ⋯, inv_hom_id := ⋯ }
Instances For
Concatenation of folds #
The fold of a concatenated list against the tensor product of the two folds, with the bridges that carry a relation slot of one block into the concatenated list. Casts are quantified, as in the slot relations, so consumers never meet a transported proof they cannot name.
Concatenation of tensor folds: the two-block fold reassociates onto the fold of the concatenated list.
Equations
- One or more equations did not get rendered due to their size.
- RS.modListConcat A [] x✝ = CategoryTheory.MonoidalCategoryStruct.leftUnitor (RS.modList A x✝)
Instances For
A morphism whiskered under a cons prefix passes the concatenation: the step case of every prefix induction below.
A morphism whiskered on the right of a cons prefix passes the concatenation.
A transport in the second block passes the concatenation.
A transport in the second block passes the concatenation.
The relation object of a slot, concatenated on the right: the suffix grows by the second block.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The base of the right leg-concatenation: the window against the concatenation, by the pentagon.
The right leg-concatenation: a slot leg of the first block, whiskered by the second block, is the slot leg of the concatenated list at the widened suffix.
The right leg-concatenation: a slot leg of the first block, whiskered by the second block, is the slot leg of the concatenated list at the widened suffix.
The relation object of a slot, concatenated on the left: the prefix grows by the first block.
Equations
- One or more equations did not get rendered due to their size.
- RS.modMultiMidConcatL A pre M N post [] = (CategoryTheory.MonoidalCategoryStruct.leftUnitor (RS.modMultiMid A pre M N post)).hom
Instances For
The left leg-concatenation: a slot leg of the second block, whiskered by the first block, is the slot leg of the concatenated list at the widened prefix.
The left leg-concatenation: a slot leg of the second block, whiskered by the first block, is the slot leg of the concatenated list at the widened prefix.
Whiskered descent #
Morphisms out of a whiskered multi-tensor, by descent along the whiskered projection. The relation source is a biproduct, so the whiskered relation condition reduces to the slots through the distributors of the monoidal preadditive structure.
Maps out of a right-whiskered biproduct are determined by the whiskered injections.
Maps out of a left-whiskered biproduct are determined by the whiskered injections.
Whiskering the multi-tensor coequalizer by tensorRight P
yields a colimit cofork.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Morphisms out of a right-whiskered multi-tensor are determined by their composite with the whiskered projection.
Descend a morphism coequalizing every right-whiskered slot relation along the right-whiskered projection.
Equations
- RS.modMultiWhiskerRDesc A Xs P k h = CategoryTheory.Limits.Cofork.IsColimit.desc (RS.modMultiWhiskerRIsColimit A Xs P) k ⋯
Instances For
The right-whiskered descent factors the given morphism through the whiskered projection.
The right-whiskered descent factors the given morphism through the whiskered projection.
Whiskering the multi-tensor coequalizer by tensorLeft P
yields a colimit cofork.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Morphisms out of a left-whiskered multi-tensor are determined by their composite with the whiskered projection.
Descend a morphism coequalizing every left-whiskered slot relation along the left-whiskered projection.
Equations
- RS.modMultiWhiskerLDesc A Xs P k h = CategoryTheory.Limits.Cofork.IsColimit.desc (RS.modMultiWhiskerLIsColimit A Xs P) k ⋯
Instances For
The left-whiskered descent factors the given morphism through the whiskered projection.
The left-whiskered descent factors the given morphism through the whiskered projection.
The concatenation map #
The projection of the concatenated list descends through the tensor product of the two multi-tensors, one block at a time: first the relations of the first block through the right-whiskered coequalizer, then those of the second block through the left-whiskered coequalizer.
First stage of the concatenation: the relations of the first block descend, the second block still at the fold.
Equations
- RS.modMultiConcatFst A Xs Ys = RS.modMultiWhiskerRDesc A Xs (RS.modList A Ys) (CategoryTheory.CategoryStruct.comp (RS.modListConcat A Xs Ys).hom (RS.modMultiπ A (Xs ++ Ys))) ⋯
Instances For
Defining equation of the first stage.
Defining equation of the first stage.
The concatenation map: the multi-tensor of a concatenated list receives the tensor product of the two multi-tensors.
Equations
- RS.modMultiConcat A Xs Ys = RS.modMultiWhiskerLDesc A Ys (RS.modMulti A Xs) (RS.modMultiConcatFst A Xs Ys) ⋯
Instances For
Defining equation of the concatenation against the projection of the second block.
Defining equation of the concatenation against the projection of the second block.
Defining equation of the concatenation: on the two projections it is the fold concatenation followed by the projection of the concatenated list.
Defining equation of the concatenation: on the two projections it is the fold concatenation followed by the projection of the concatenated list.
The head action #
On a non-empty list the monoid acts through the head factor; the
action descends to the multi-tensor, making it a module. The slot
compatibilities are the two cases: the slot at the head, through
the binary window compatibilities of ModTensor.lean, and a slot
in the tail, disjoint from the action.
The head action on the fold of a non-empty list: act on the head factor.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Unitality of the head action.
Associativity of the head action.
The shuffle of the head slot: the monoid moves inside the window and acts on the left module factor there.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The head-slot compatibility: a window morphism compatible with the binary action commutes the head action past the head slot's leg.
The head-slot compatibility: a window morphism compatible with the binary action commutes the head action past the head slot's leg.
The tail-slot compatibility: the head action is disjoint from any morphism whiskered under the head factor.
The tail-slot compatibility: the head action is disjoint from any morphism whiskered under the head factor.
Descent of the head action #
The head action carries every slot relation into the kernel of the projection.
The head action on the multi-tensor, by descent.
Equations
- RS.modMultiHeadAct A X l = RS.modMultiWhiskerLDesc A (X :: l) A (CategoryTheory.CategoryStruct.comp (RS.modListHeadAct A X l) (RS.modMultiπ A (X :: l))) ⋯
Instances For
Defining equation of the descended head action.
Defining equation of the descended head action.
Unitality of the descended head action.
Associativity of the descended head action.
The multi-tensor of a non-empty list is a module over A.
Equations
- RS.modMultiModObj A X l = { smul := RS.modMultiHeadAct A X l, one_smul := ⋯, mul_smul := ⋯ }
Instances For
The multi-tensor of a non-empty list, bundled as a module.
Equations
- RS.modMultiMod A X l = { X := RS.modMulti A (X :: l), mod := RS.modMultiModObj A X l }