Let be a Symmetric Monoidal Preorder and be -categories. Their -product has
(i) ; (ii) .
Sources: 7 Sketches Definition 2.74, Example 2.76, Exercises 2.75, 2.78; DaoFP §20.1 (“tensor product of -categories”); ordinary case: Product Category, preorder case: Product Preorder.
It is a -category (7S Exercise 2.75): ; and
where symmetry is used exactly to swap the middle two factors — which is why must be symmetric (DaoFP makes the same point for the tensor product of -categories, whose identity is ).
Examples. For the AND in ” iff and ” is : the Product Preorder. For distances add: (Example 2.76: the product of the path with (weights ) is a grid; 7S Exercise 2.78: in , ). In matrix terms the product is the Kronecker product of hom-matrices with in place of multiplication — a block matrix with one -shaped block, shifted by an entry of , for every entry of .
Docs: Vignette: monoidal preorders & SMCs
Builds on: Enriched Category (VCategory) — run that note’s Julia code first.
function vproduct(X::VCategory, Y::VCategory)
V = X.base
objs = [Symbol(x, "_", y) for y in Y.objects for x in X.objects]
hom = [otimes(V, X.hom[i, i′], Y.hom[j, j′])
for (j, i) in Iterators.product(eachindex(Y.objects), eachindex(X.objects)) |> collect |> vec,
(j′, i′) in Iterators.product(eachindex(Y.objects), eachindex(X.objects)) |> collect |> vec]
VCategory(V, objs, hom)
end
# For Cost this is `kron`-like with + in place of *: kron(X, Y)[(i,j),(i′,j′)] = X[i,i′] + Y[j,j′]-- Mathlib has products of ordinary categories (`CategoryTheory.prod`) and of preorders;
-- the enriched tensor product of V-categories is the componentwise ⊗ on Hom (by hand).vproduct :: MonoidalPreorder v => VCat v o -> VCat v o' -> VCat v (o, o')
vproduct (VCat os h) (VCat os' h') =
VCat [ (x, y) | x <- os, y <- os' ] (\(x, y) (x', y') -> h x x' <> h' y y')