definition theorem example

A presentation for a Prop consists of a signature and a set of equations (traditionally “relations”) between prop expressions of equal arity. The prop presented by it has morphisms quotiented by the equations in and the axioms of symmetric strict monoidal categories. Compared with presenting categories, the things equated are prop expressions rather than paths.

Sources: 7 Sketches §5.2.5 (Rough Definition 5.33, Remark 5.34, Exercise 5.35), §5.4.1 (Theorem 5.60), §5.4.2 (Remark 5.74), §6.3.1, §6.5.3; Catlab @present / @theory.

Universal property (Remark 5.34): prop functors correspond to functions respecting arities such that in for every , where applies to each generator and composes in .

Examples.

  • is presented by the signal-flow generators and the equations of Theorem 5.60 (Graphical Linear Algebra) — a sound and complete graphical calculus for matrices.
  • “The theory of monoids”: generators , with associativity and unit equations; its models in are monoid objects (Remark 5.74). Adding gives commutative monoids; the mirror images give comonoids; both with the Frobenius law give the theory of special commutative Frobenius monoids, presenting (7 Sketches Theorem 6.58); further equations give bialgebras and Hopf algebras.
  • Lawvere’s algebraic theories and Catlab’s generalized algebraic theories (@theory) generalize this “syntax + equations, semantics = functors” pattern (Functorial Semantics).

Docs: Theories & presentations

# Catlab: a presentation with equations — the theory of commutative monoids as a prop
using Catlab
@present CommMonoid(FreeSymmetricMonoidalCategory) begin
  X::Ob
  μ::Hom(X ⊗ X, X); η::Hom(munit(), X)
  (μ ⊗ id(X)) ⋅ μ == (id(X) ⊗ μ) ⋅ μ
  (η ⊗ id(X)) ⋅ μ == id(X)
  braid(X, X) ⋅ μ == μ
end
equations(CommMonoid)
-- a presentation: generators with arities plus pairs of equal expressions
data Presentation g = Presentation { arity :: g -> (Int, Int), eqs :: [(Expr g, Expr g)] }