Word maps of an arbitrary pair of morphisms #
BiprodPow folds the letterwise biproduct inclusions of X ⊞ Y
into the mixed inclusions mixedInto and sorts them under the
symmetric-group action. Its sorting arguments never use that the
letters are biproduct inclusions — only monoidal coherence and
naturality. This file replays that machinery at two arbitrary
morphisms with a common target, f : U ⟶ Z and g : V ⟶ Z, in a
monoidal category.
The letterwise fold of f and g over a word is the word map
wordMap. It is natural in the letters: composing with a
letterwise fold wordCongrMap of morphisms of the sources composes
the letters (wordMap_natural). On a sorted word the word map is
the concatenation of the pure powers of f and g
(wordMap_standard), and in a symmetric category every word map,
followed by the action of its sorting permutation, is that sorted
concatenation — up to the isomorphism wordSortIso of the source
and an arity transport at the target (wordMap_sorted).
The word powers wordPow, the letter counts popCount, the sorted
words standardWord, their structural isomorphism
standardMixedIso and the sorting permutations sortPerm are
reused from BiprodPow unchanged: they depend only on the two
source objects, never on the letter maps.
Letter maps and the word map #
The morphism selected by one letter: f on a true letter and
g on a false one.
Equations
- RS.letterMap f g true = f
- RS.letterMap f g false = g
Instances For
The word map: the fold of the letter maps of f and g
over a word, by the recursion of wordPow.
Equations
- RS.wordMap f g 0 x_2 = CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategoryStruct.tensorUnit A)
- RS.wordMap f g n.succ w = CategoryTheory.MonoidalCategoryStruct.tensorHom (RS.wordMap f g n (w ∘ Fin.castSucc)) (RS.letterMap f g (w (Fin.last n)))
Instances For
Naturality in the letters #
The source morphism selected by one letter: α on a true
letter and β on a false one.
Equations
- RS.letterCongr α β true = α
- RS.letterCongr α β false = β
Instances For
A letter's congruence map composed with its letter map is the letter map of the composites.
The letterwise congruence map between word powers on the
same word: the fold of α on the true letters and β on the
false ones, by the recursion of wordPow.
Equations
- RS.wordCongrMap α β 0 x_2 = CategoryTheory.CategoryStruct.id (CategoryTheory.MonoidalCategoryStruct.tensorUnit A)
- RS.wordCongrMap α β n.succ w = CategoryTheory.MonoidalCategoryStruct.tensorHom (RS.wordCongrMap α β n (w ∘ Fin.castSucc)) (RS.letterCongr α β (w (Fin.last n)))
Instances For
Naturality of the word map in the letters: the letterwise
congruence map composed with the word map of f and g is the
word map of the composed letters.
Transport and splitting #
Transport of wordMap along an equality of words.
Splitting wordMap at the last letter, with the recursion's
word and letter replaced by given values.
The last-letter split of wordMap at a false letter, with
the selected object and morphism spelled as V and g.
The last-letter split of wordMap at a true letter, with
the selected object and morphism spelled as U and f.
The base-point map #
On a sorted word, wordMap is the concatenation of the two pure
powers. The gluing helpers are stated at general objects and
applied by exact, so that no tensor-power arity enters the
rewriting.
On an all-true word the word map is the pure power of f.
The base-point map: on a sorted word, wordMap is the
concatenation of the pure powers of the two letter maps.
Sorting #
Every word map is the base-point map of its sorted form, up to the
symmetric-group action. The bubbling infrastructure —
permMor_ofSplit, putBelow, insertTop_full and
putBelow_concat — is reused from BiprodPow; the gluing helpers
below replicate its private steps at general letters.
The sorting lemma: every word map is a permuted base-point
map. For each word w there is an isomorphism of the word power
with U ^ ⊗ popCount w ⊗ V ^ ⊗ (n − popCount w) under which
wordMap f g, followed by the action of sortPerm w, is the
concatenation of the pure powers of f and g, transported along
popCount w + (n − popCount w) = n at the target.
The sorting isomorphism, chosen once and for all from the
sorting lemma: wordPow U V n w against the sorted concatenation
of pure powers.
Equations
- RS.wordSortIso f g n w = ⋯.choose
Instances For
The sorting square, for the chosen isomorphism
wordSortIso: the word map of f and g, followed by the action
of the sorting permutation, is the concatenation of the pure powers
of f and g, up to wordSortIso at the source and the arity
transport at the target.