A symmetric monoidal structure on a Preorder consists of
(i) an element , the monoidal unit, and (ii) a function , the monoidal product, written ,
satisfying, for all :
(a) monotonicity: if and then ; (b) unitality: ; (c) associativity: ; (d) symmetry: .
A preorder with such a structure, , is a symmetric monoidal preorder. Replacing by throughout gives a weak monoidal structure (Remark 2.3). Notation varies: units ; products .
Sources: 7 Sketches Definition 2.2, Remark 2.3, Examples 2.4, 2.6, 2.9, 2.27, 2.30, 2.32, 2.37, Proposition 2.38; DaoFP §5.3 (“Monoidal Category”), §20.1; 7 Sketches §4.4.3 (the categorification: Monoidal Category).
Anyone can propose ; it is a symmetric monoidal preorder iff (a)–(d) hold. Chapter 2 of 7 Sketches reads as “resource can be converted into resource ” and as “having both and ” (Resource Theory); wiring diagrams are the graphical language.
Examples
| preorder | unit | product | note |
|---|---|---|---|
| Example 2.4; fails monotonicity (7S Exercise 2.5) | |||
| for a commutative Monoid | Example 2.6, 7S Exercise 2.8 | ||
| Example 2.27; also (7S Exercise 2.29) | |||
| and | resp. | resp. | Example 2.30, 7S Exercise 2.31, 7S Exercise 2.45 |
| Example 2.32 (Divisibility Order); fails (7S Exercise 2.33) | |||
| 7S Exercise 2.34 | |||
| 7S Exercise 2.35; a Quantale | |||
| , statements about ordered by implication | 7S Exercise 2.36 | ||
| Cost | Example 2.37 (Lawvere) | ||
| , chemical materials and reactions | Resource Theory | ||
| 7S Exercise 2.63 |
Non-example (Example 2.9): poker hands ordered by strength, with = “best hand from the ten cards”, fails monotonicity: , but can be a royal flush beating .
Constructions and uses
- The Opposite Monoidal Preorder is again symmetric monoidal (Proposition 2.38).
- Structure-preserving maps are monoidal monotones.
- A symmetric monoidal preorder is a base of enrichment: -categories (Enriched Category) let “structure the question of getting from to “. Symmetry is needed for products (7S Exercise 2.75).
- Extra axioms give different wiring-diagram styles: the discard axiom (manufacturing) and copy axiom (informatics).
- A symmetric monoidal preorder is exactly a thin Symmetric Monoidal Category; a closed one is a Monoidal Closed Preorder, and one with all joins is a Quantale. Ordered commutative monoids in the algebra literature are the skeletal case.
Docs: Theories & presentations · Vignette: SMCs
Builds on: Preorder (Preorder) — run that note’s Julia code first.
# a concrete instance as a Kittenlab-style preorder with unit and product
struct RealPlus <: Preorder{Float64} end
leq(::RealPlus, a, b) = a <= b
otimes(::RealPlus, a, b) = a + b
munit(::RealPlus) = 0.0
leq(RealPlus(), otimes(RealPlus(), 1.0, 2.0), otimes(RealPlus(), 1.5, 2.0)) # true: ⊗ is monotoneCatlab version (run in a fresh Julia session — Catlab exports its own compose, id, FinFunction, …):
# Catlab: thin symmetric monoidal categories = symmetric monoidal preorders
using Catlab
x, y, z = Ob(FreeThinSymmetricMonoidalCategory, :x, :y, :z)
f, g = Hom(:f, x, y), Hom(:g, y, z) # f witnesses x ≤ y
f ⊗ g # x ⊗ y ≤ y ⊗ z (monotonicity)
dom(f ⊗ g) == x ⊗ y # true
munit(FreeThinSymmetricMonoidalCategory.Ob) # the unit I-- Mathlib: an ordered (additive) commutative monoid is a skeletal symmetric monoidal preorder
example : OrderedAddCommMonoid ℝ := inferInstance -- (ℝ, ≤, 0, +)
example : OrderedCommMonoid ℕ := inferInstance -- (ℕ, ≤, 1, *)
#check @add_le_add -- monotonicity: a ≤ b → c ≤ d → a + c ≤ b + d
-- as a thin symmetric monoidal category: a preorder is a category, and Mathlib's
-- `CategoryTheory.MonoidalCategory` can be instantiated on it (see Monoidal Category)-- a symmetric monoidal preorder: a Preorder with a commutative Monoid such that (<>) is monotone
class (Preorder a, Monoid a) => MonoidalPreorder a
-- laws: leq x1 y1 && leq x2 y2 ==> leq (x1 <> x2) (y1 <> y2); x <> y == y <> x
import Data.Monoid (Sum(..))
instance Preorder (Sum Double) where leq (Sum a) (Sum b) = a <= b
instance MonoidalPreorder (Sum Double) -- (ℝ, ≤, 0, +)