definition theorem proof

Theorem 4.23. For any skeletal Quantale there is a category whose objects are -categories, whose morphisms are -profunctors, with composition

(Definition 4.21 — Matrix Multiplication in a Quantale) and identities the unit profunctors (Eq. 4.25). is the category of preorders and feasibility relations (Definition 4.24).

Sources: 7 Sketches §4.3 (Definitions 4.21, 4.24, Theorem 4.23, Eq. 4.25, Lemmas 4.27, 4.31, Remark 4.33, Exercises 4.22, 4.26, 4.30, 4.32), §4.5.2 (Theorem 4.63); DaoFP §17.2, §17.8 (“The Bicategory of Profunctors”).

Composition as navigation (Eq. 4.19–4.20)

Given bridges and between three cities, the composite feasibility matrix is found by a navigator: for each , search for a way-point reachable from AND from which is reachable — “a big OR over all possible ”: . In the example, you cannot get from to but you can from to . For Cost: min-plus products of distance matrices (7S Exercise 4.22).

Unitality (Lemma 4.27)

. Proof. Skeletality lets us prove equality by two inequalities. (i) — unit law, with monotonicity of , the join bound, and the definition (Eq. 4.28). (ii) For each , by the profunctor inequality of 7S Exercise 4.9 (Eq. 4.29); hence the join is . (7S Exercise 4.30; in all four steps are equalities.) Associativity (Lemma 4.31, 7S Exercise 4.32) uses distributivity of over joins and skeletality.

Why skeletal? Without skeletality the unit laws hold only up to ; one can either take isomorphism classes of profunctors (as for cospans) or accept composition “up to isomorphism” — a bicategory (Remark 4.33; DaoFP §17.8: monads in are prearrows).

Structure

  • Every -functor embeds via its companion or conjoint; the identity functor’s companion is (Example 4.35, 7S Exercise 4.36).
  • Compact closed (Theorem 4.63): monoidal product is the product of -categories with (“stacking wires with no new interaction”; for feasibility: provide both given both, 7S Exercise 4.64); the unit is the one-object -category with (7S Exercise 4.65: the unitors are the profunctors given by ); the dual of is with unit , , and counit , — “the unit and counit look like identities” (7S Exercise 4.66 checks the snake equations). See Compact Closed Category.
  • In wiring-diagram terms, boxes are feasibility relations with one input and one output wire (a plain category) — but ‘s monoidal and compact structure allows the rich Co-design diagrams with many ports and feedback.

Docs: plain Julia — Catlab has no dedicated API for this; related: Catlab v0.16 docs · GATlab standard library

Builds on: Bool (Monoidal Preorder) (BoolPre), Enriched Category (VCategory), Profunctor (VProfunctor) — run those notes’ Julia code first.

# Feas: compose Bool-profunctors (feasibility matrices) by Bool matrix multiplication (Eq. 4.20)
Φ = Bool[1 0 1 0 0; 1 0 1 0 1; 1 1 1 1 0; 1 1 1 1 1]      # N, E, W, S × a..e
Ψ = Bool[0 1; 1 1; 0 1; 1 1; 0 0]                        # a..e × x, y
qmul(BoolPre(), Φ, Ψ)      # [0 1; 0 1; 1 1; 1 1]: you can't get from N to x but you can to y
unit_profunctor(X::VCategory) = VProfunctor(X, X, X.hom)   # U_X(x, y) = X(x, y)
-- Mathlib has no bundled Prof_V; for V = Bool on preorders one can model composition as
-- relational composition of monotone relations (see `Rel.comp`)
#check @Rel.comp
-- Feas: objects are preorders, morphisms feasibility relations, composition by "search for a way-point"
composeFeas :: [q] -> Feas p q -> Feas q r -> Feas p r
composeFeas qs (Feas phi) (Feas psi) = Feas (\p r -> or [ phi p q && psi q r | q <- qs ])
 
unitFeas :: Preorder x => Feas x x
unitFeas = Feas leq                      -- U_X(x, y) = X(x, y)