65
Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation 2006 January 30 - Feburary 3 = figures by Aaron D. Lauda available online at http://math.ucr.edu/home/baez/universal/ 1

Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

  • Upload
    others

  • View
    18

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Universal Algebraand

Diagrammatic Reasoning

John Baez

Geometry of Computation 2006January 30 - Feburary 3

=

figures by Aaron D. Lauda

available online athttp://math.ucr.edu/home/baez/universal/

1

Page 2: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Universal Algebra

Modern universal algebra is the studyof general mathematical structures,especially those with an ‘algebraic’flavor. For example:

•Monads describe ‘extra algebraicstructure on objects of one fixedcategory’.

•PROs describe ‘extra algebraicstructure on objects of any monoidalcategory’.

•PROPs describe ‘extra algebraicstructure on objects of any sym-metric monoidal category’.

•Algebraic Theories describe ‘ex-tra algebraic structure on objectsof any category with finite prod-ucts’.

2

Page 3: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

For example:

•There’s a monad on Set whosealgebras are groups.

•There’s an algebraic theory whosealgebras in any category withfinite products C are ‘groups inC’.

•There’s no PROP whose algebrasare groups, but there’s a PROPfor monoids.

PROPs describe fewer structures,but apply to more contexts: e.g.,the category of Hilbert spaces withits tensor product. In this quantum-mechanical context we cannot ‘du-plicate or delete information’, so thegroup axiom

g · g−1 = 1

cannot be expressed.

3

Page 4: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In modern universal algebra we de-scribe operations using diagrams withinputs and outputs. Physicists dothe same with Feynman diagrams:

'''''''

��

�K�K�K�K

��

+-----��

III

��

�Z�U�OI

�D

+ ''''''''

��

JJJJJ

��

#c�_

�V�Q MJ

�G�C

+ · · · +-----���� I

II

��

��

�Y�T�OJ

�E�^

�^�^

�G�G

�Y�Y + · · ·

For example, all the diagrams abovestand for operators between Hilbertspaces:

He ⊗Hγ → He

Similar diagrams show up in othercontexts:

• electrical circuits

• logic circuits

• flow charts

and part of our job is to unify these.

4

Page 5: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Monads

Using monads, we can see:

•Almost any algebraic structurehas a canonical presentation interms of generators and relations.

• But, there are ‘relations betweenrelations’, or ‘syzygies’.

•Also relations between relationsbetween relations, etc.

•We can build a space that keepstrack of these: the ‘bar construc-tion’.

•The topology of this space shedslight on the structure!

5

Page 6: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Adjunctions

We define mathematical gadgets bystarting with some category A andputting extra structure on the ob-jects of A to get objects of somefancier category B. For example:

A = Set B = MonA = Set B = GrpA = AbGrp B = RingA = Top B = TopGrp

In every case we have a ‘forgetful’functor

R:B → A

but also a ‘free’ functor

L:A→ B.

We call these left and right ad-joints if there is a natural isomor-phism

hom(La, b) ∼= hom(a,Rb).

6

Page 7: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

The Canonical Presentation

Given an adjunction

AL //BRoo

let’s try to get a ‘presentation’ ofb ∈ B. First note:

hom(LRb, b) ∼= hom(Rb,Rb)eb 7→ 1Rb

for some morphism

eb:LRb→ b

called the counit.In the example

A = Set B = Mon

the monoid LRb consists of wordsof elements of the monoid b. Thecounit maps ‘formal products’ inLRb to actual products in b.

7

Page 8: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

So, we have the raw material for apresentation! To see the relations,form:

LRLRbeLRb //

LR(eb)//LRb

eb //b

This diagram always commutes. It’senlightening to check this when

A = Set B = Mon.

Then LRLRb consists of ‘words ofwords’, and the commuting diagamabove says these give relations inthe presentation of b where all ele-ments of b are generators.

In this example the diagram is a‘coequalizer’, so we really have apresentation. This is not alwaystrue — but it is when the adjunc-tion is ‘monadic’.

8

Page 9: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Relations BetweenRelations

The canonical presentation is highlyredundant, so there will be rela-tions between relations. We can seethese by forming a resolution ofb:

· · ·//

//

//

//

(LR)3b//

//

//(LR)2b

//

//LRb // b

When objects of B are sets withextra structure, this gives a ‘simpli-cial set’ with:• LRb as vertices,• (LR)2b as edges,• (LR)3b as triangles....

In general we get a ‘simplicial ob-ject in B’. This is called the barconstruction.

Exercise: work out the details when

A = Set B = Mon.

9

Page 10: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Unit and Counit

Just as

hom(LRb, b) ∼= hom(Rb,Rb)eb 7→ 1Rb

gives the counit

eb:LRb→ b

which ‘evaluates formal expressions’,so

hom(La,La) ∼= hom(a,RLa)1La 7→ ia

gives the unit

ia: a→ RLa

which ‘maps generators into the freealgebra’. The unit and counit sat-isfy certain identities, best writtenas diagrams....

10

Page 11: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

2-Categories

We’ve been talking about categories:

•A

functors:

A • F //• B

and natural transformations:

A • • BF

""

G

<<

�

These are the objects, morphismsand 2-morphisms of the 2-categoryCat. The definition of ‘2-category’summarizes what we can do withthem in a purely diagrammatic way!

11

Page 12: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In a 2-category:

• we can compose morphisms:

• F //• G //•

with associativity and identities 1A

• we can compose 2-morphismsvertically:

•F

��G //

�

H

AAβ

��

with associativity and identities 1F

• we can compose 2-morphismshorizontally:

• •F

��

G

CCα

�� • •F ′

��

G′CC

�

with associativity and identities 11A

12

Page 13: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

• and finally, the two ways of pars-ing this agree:

• ��//

�

AA

α′��

• ��//

�

AA

β′��

In other words:

(β′β) ◦ (α′α) = (β′ ◦ α′)(β ◦ α)

In this notation, an adjunction

consists of AL //

BRoo with

i: 1A ⇒ RL, e:LR⇒ 1Bsatisfying the zig-zag identities:

• L //��• R //

EE

i�� • L //

e��

• = •L

��

L

AA•1L��

• R //EE• L //

��

e��

• R //

i�� • = •

R

��

R

AA•1��

13

Page 14: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

String Diagrams

It’s fun to convert the above ‘globu-lar’ diagrams into string diagrams:

A •F

""

G

<<• Bα��

A B

F

G

α

in which objects of a 2-categorybecome 2d regions:

A B

morphisms become 1d edges, and2-morphisms become 0d verticesthickened to discs. For example,

L:A→ B, R:B → A

are drawn as:

A B

L

L

B A

R

R

14

Page 15: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

RL:A→ A is drawn as:

A B

L

L

◦ B A

R

R

= A B A

R

R

L

L

The unit and counit

i: 1⇒ RL, e:LR⇒ 1

look like this:

A A

B

1A

L R

iB B

A

1B

R L

e

or for short:

The zig-zag identities become:

= =

15

Page 16: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

From the definition of adjunctionwe can derive properties of

M = RL:A→ A

andC = LR:B → B

and these become the definitions ofa monad and comonad.

For M we get a multiplication

m:M2⇒M

defined by:

We also have the unit

i: 1⇒M

16

Page 17: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

These satisfy associativity:

=

and the left and right unit laws:

= =

These are ‘topologically true’: thezig-zag identity and 2-category ax-ioms let us prove them by warpingthe pictures as if drawn on rubber!

Similarly, a comonad has a co-multiplication and counit sat-isfying coassociativity and theleft and right counit laws. Todraw all these, just turn the abovepictures upside down and switchwhite and shaded regions.

17

Page 18: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

The Bar Construction

Suppose M :A → A is a monad.Let ∆ be the category of finite or-dinals and order-preserving maps.For any order-preserving map

f : [i]→ [j],

our pictures give us a 2-morphism

F (f ):M i⇒M j

built from the multiplication andunit:

1 + 1

��

1

0

��

1

So, we get a functor

F : ∆→ hom(A,A).

18

Page 19: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

If C:B → B is a comonad, thesame pictures upside-down with col-ors switched give a functor

F : ∆op → hom(B,B).

A functor from ∆op is called anaugmented simplicial object.In particular, if C is a comonad inCat and b ∈ B is an object, we get

F (b): ∆op → B,

an augmented simplicial object inB:

· · ·//

//

//

//

C3boo

oo

oo //

//

//C2boo

oo //

//Cboo // b

This portion is called the bar con-struction:

b̄ ={· · ·

//

//

//

//

C3boo

oo

oo //

//

//C2boo

oo //

//Cboo

}

b̄ is a simplicial object: a func-tor from the opposite of the cate-gory of nonempty finite ordinals.

19

Page 20: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

The Moral: whenever we have acomonad C:B → B, the bar con-struction lets us ‘puff up’ any ob-ject b ∈ B to a simplicial object b̄in which:

• formal products of generatorsbecome vertices

• relations become edges

• relations between relations becometriangles, etc....

Paths in b̄ are ‘rewrites’, ‘proofs’or ‘computations’ using relations inthe canonical presentation of b —and we can define homotopiesbetween paths, etc!

So, we can study rewriting processesof rewriting processes of rewriting...to our heart’s content.

20

Page 21: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Algebras of Monads

To state good theorems about thebar construction, we must restrictto ‘monadic’ adjunctions.

We know every adjunction givesa monad. Next we’ll show everymonad

M :A→ A

gives an adjunction

AL //

AMRoo

where AM is the ‘category ofalgebras of M ’. An adjunction ismonadic if it arises this way.

21

Page 22: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Consider the ‘monad for monoids’

M : Set→ Set

sending every set a to the set Maof words in a. To make a set a intoa monoid, we should choose

α:Ma→ a

mapping formal products to actualproducts in a. This should beassociative:

MMaM(α)

&&MMMMMMMMMM

maxxqqqqqqqqqq

Maα

&&NNNNNNNNNNNN Maα

xxpppppppppppp

a

and obey the left unit law:

a ia //

1!!CCCCCCCCCCCCCCCCCC Ma

�

a

22

Page 23: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In general, given any monad

M :A→ A,

we call a α:Ma → a an algebraof M if it obeys associativity andthe left unit law.

There’s a category of algebrasof M , the Eilenberg–Moorecategory AM . And, there’s anadjunction

AL //

AMRoo

All these adjunctions:

A = Set AM = Mon

A = Set AM = Grp

A = AbGrp AM = Ring

A = Top AM = TopGrp

arise from monads this way, so wecall them monadic.

23

Page 24: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

The Big Theorem

Suppose

AL //

BR

oo

is a monadic adjunction and C =LR the resulting comonad. Thenany object b is a coequalizer of itscanonical presentation:

C2beCb //

C(eb)//Cb

eb //b

Moreover,

b̄ ={· · ·

//

//

//

//

C3boo

oo

oo //

//

//C2boo

oo //

//Cboo

}

is the initial b-acyclic simplicialobject in B — namely, the initialone for which Rb̄ is equipped witha deformation retraction to Rb.

First part: see Beck’s monadicitytheorem. Second part: see ToddTrimble’s notes (in the references).

24

Page 25: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Some Remarks

1. We can get subobjects of b̄using more efficient choices of gen-erators, or relations, or relations be-tween relations.... This is whereSquier’s work on confluent termi-nating presentations comes in!

2. A b-acyclic simplicial object inB is sometimes called a resolu-tion of b. This terminology is mostwidespread in ‘homological algebra’,which studies simplicial abeliangroups, otherwise known as chaincomplexes of abelian groups.

25

Page 26: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Strict Monoidal Categories

A 2-category with one object is calleda strict monoidal category:

Monoidal Category 2-Category

• objectsobjects morphisms

morphisms 2-morphismstensor product composite

of objects of morphismscomposite vertical composite

of morphisms of 2-morphismstensor product horizontal compositeof morphisms of 2-morphisms

For example: Set with its Carte-sian product ×, or Vect with itstensor product ⊗, cleverly made tobe strictly associative and unital.

26

Page 27: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Feynman Diagrams andTensors

Physicists draw morphisms in monoidalcategories:

F : a⊗ b⊗ c⊗ d→ e⊗ feither as Feynman diagrams:

F@GAFBECD???????????

��a

********��b

�������� c

�����������

�� d

��������e

********�� f

which are just string diagrams withno shading on regions, or astensors:

F abcdef

with indices standing for inputs andoutputs. Penrose called the latterapproach abstract index nota-tion.

27

Page 28: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In a monoidal category, we can com-pose/tensor morphisms like this:

G@GAFBECD???????��a �� b

���������c

H@GAFBECD?????��g

�����������

�� d

��e

��f

= F@GAFBECD???????????

��a

********��b

�������� c

�����������

�� d

��������e

********�� f

or equivalently, like this:

Gabceg Hgdf = F abcdef

where the Einstein summationconvention says that any indexappearing once as a superscript andonce as a subscript — g in this ex-ample — labels an ‘internal edge’.

In particle physics, edges of Feyn-man diagrams are called particles.Vertices are called interactions.Internal edges are called virtualparticles.

28

Page 29: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Monads in Vect

In Vect, an adjunction turns outto be a pair of dual vector spacesV , V ∗ with the unit

TT�� k

i��

V ⊗ V ∗and counit

��RR V ∗ ⊗ Ve��

kbeing the obvious maps. A monadin Vect is an associative algebra.Since an adjunction gives a monad,a pair of dual vector spaces gives anassociative algebra: the matrix al-gebra M = V ⊗ V ∗.

[[ ��

11111111111

��

FF

M ⊗Mm��

M

29

Page 30: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

A Monad in ∆

The category of finite ordinals, ∆,is a strict monoidal category with+ as its tensor product. 1 ∈ ∆is a monad with multiplication andunit:

1 + 1m��

1

0i��

1

People usually call a monad in astrict monoidal category a monoidobject, so let’s do that! For exam-ple: a monoid object in Vect is anassociative algebra.

∆ is special because it’s the freemonoidal category on a monoidobject! In other words...

30

Page 31: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Theorem: Given a strict monoidalcategory C, there’s a 1-1 correspon-dence between monoid objects in Cand functors

F : ∆→ Cthat preserve tensor products. Eachsuch functor gives a monoid objectF (1) with multiplicationF (m) andunit F (i).

This explains the special role of ∆in our discussion of monads. A monadM :A→ A is just a monoid objectin hom(A,A), so it gives us

F : ∆→ hom(A,A).

Similarly: a comonad C:B → B isa monoid object in hom(B,B)op,so we get

F : ∆op → hom(B,B).

31

Page 32: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Monoidal Categories

Alas, strict monoidal categories arerare in nature. In general, a monoidalcategory is:

• a category C• a functor ⊗: C × C → C• a unit object I ∈ C• natural isomorphisms called the

associator:

ax,y,z: (x⊗y)⊗z → x⊗ (y⊗z)

left unitor:

`x: I ⊗ x→ x

and right unitor:

rx:x⊗ I → x

such that...

32

Page 33: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

the following diagrams commute:

• the pentagon equation:

(w ⊗ x)⊗ (y ⊗ z)

w ⊗ (x⊗ (y ⊗ z))

w ⊗ ((x⊗ y)⊗ z)(w ⊗ (x⊗ y))⊗ z

((w ⊗ x)⊗ y)⊗ z

aw,x,y⊗z

''OOOOOOOOOOOOOOOOO

1⊗ax,y,z

NN�������������aw,x⊗y,z//

aw,x,y⊗1

��!!!!!!!!!!!!!

aw⊗x,y,z77ooooooooooooooooo

• the triangle equation:

(x⊗ I)⊗ y ax,I,y//

rx⊗I$$IIIIIIIIIIIIIIIIIII

x⊗ (I ⊗ y)

1⊗`yzzuuuuuuuuuuuuuuuuuuu

x⊗ yMac Lane’s coherence theorem saysthese laws suffice to make alldiagrams built from ⊗, a, `, r com-mute.

33

Page 34: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

A functorF : C → D between monoidalcategories is monoidal if it is equippedwith:

• a natural isomorphismΦx,y:F (x)⊗ F (y)→ F (x⊗ y)

• an isomorphism φ: I → F (I)

such that these diagrams commute:

• compatibility with unitors:

I ⊗ F (x) F (x)

F (I)⊗ F (x) F (I ⊗ x)

-`F (x)

?

φ⊗1

-ΦI,x

6

F (`x)

F (x)⊗ I F (x)

F (x)⊗ F (I) F (x⊗ I)

-rF (x)

?

1⊗φ

-Φx,I

6

F (rx)

34

Page 35: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

• compatibility with theassociator:

(F (x)⊗ F (y))⊗ F (z) F (x)⊗ (F (y)⊗ F (z))

F (x⊗ y)⊗ F (z) F (x)⊗ F (y ⊗ z)

F ((x⊗ y)⊗ z) F (x⊗ (y ⊗ z))

?

Φx,y⊗1

-

aF (x),F (y),F (z)

?

1⊗Φy,z

?

Φx⊗y,z

?

Φx,y⊗z

-

F (ax,y,z)

Exercise: given a monoid objectM in C and a monoidal functor

F : C → D,check that F (M ) becomes a monoidobject in D.

35

Page 36: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

PROs

A PRO is a monoidal category Cfor which every object equals x⊗nfor some fixed object x ∈ C. Givenmonoidal categories C and D, analgebra of C in D is a monoidalfunctor

F : C → DIf C is a PRO, this picks out an ob-ject F (x) ∈ D and equips it withalgebraic structure.

For example, ∆ is a PRO since ev-ery object is of the form 1+ · · ·+1.∆ is called the PRO for monoids,since an algebra of ∆ in D

F : ∆→ Dpicks out F (1) ∈ D and equips itwith the structure of a monoid ob-ject.

36

Page 37: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

There’s a PRO for any untyped al-gebraic structure with operationsof arbitrary source and target ar-ity satisfying equational laws withno duplication, deletion or per-mutation of arguments. To elim-inate the last restriction, we need‘PROPs’. To eliminate all three,we need ‘algebraic theories’:

AlgTh� _

��

� � // FinProdCat� _

��

PROP� _

��

� � // SymmMonCat� _

��

PRO � � // MonCat

Gadgets of the right-hand sort de-scribe typed algebraic structures.

37

Page 38: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

PROPs

There’s no PRO for commutativemonoids; to say ab = ba we needto permute arguments. For this weneed PROPs, which are special sym-metric monoidal categories.

A braided monoidal categoryC is a monoidal category equippedwith a natural isomorphism calledthe braiding:

Bx,y:x⊗ y → y ⊗ xx y

making these diagrams commute...

38

Page 39: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

• the hexagon equations:

x⊗ (y ⊗ z) (x⊗ y)⊗ z (y ⊗ x)⊗ z

(y ⊗ z)⊗ x y ⊗ (z ⊗ x) y ⊗ (x⊗ z)?

Bx,y⊗z

-

a−1x,y,z

-Bx,y⊗z

?

ay,x,z

-

ay,z,x-

y⊗Bx,z

(x⊗ y)⊗ z x⊗ (y ⊗ z) x⊗ (z ⊗ y)

z ⊗ (x⊗ y) (z ⊗ x)⊗ y (x⊗ z)⊗ y?

Bx⊗y,z

-ax,y,z

-x⊗By,z

?

a−1x,z,y

-

a−1z,x,y

-

Bx,z⊗y

A symmetric monoidal categoryis a braided monoidal category withBx,y = B−1

y,x:

x y=

x y

For example: (Set,×), (Set,+), or(Vect,⊗), but not ∆.

39

Page 40: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

A functor F : C → D betweensymmetric monoidal categories issymmetric monoidal if it’smonoidal and satisfies:

• compatibility with thebraiding:

F (x)⊗ F (y) F (y)⊗ F (x)

F (x⊗ y) F (y ⊗ x)

-BF (x),F (y)

?

Φx,y

?

Φy,x

-F (Bx,y)

A PROP is a symmetric monoidalcategory C for which every objectequals x⊗n for some fixed objectx ∈ C. Given symmetric monoidalcategories C andD, an algebra ofC in D is a symmetric monoidalfunctor

F : C → D40

Page 41: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

String Diagrams Revisited

We can reason in monoidal cate-gories using 2-dimensional string di-agrams. Similarly, we can reason inbraided monoidal categories using3-dimensional string diagrams:

x y z

z y x%%%%%%

=

x y z

z y x

We can reason in symmetric monoidalcategories using 4-dimensional (orhigher-dimensional) string diagrams,since now:

x y=

x y

Exercise: describe the PROP forcommutative monoids using stringdiagrams.

41

Page 42: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Examples

The category FinSet of finite setsand functions is a PROP with +as its tensor product, since everyobject equals 1 + · · · + 1. Andthis is the PROP for commutativemonoids!

In other words, (FinSet,+) is thefree symmetric monoidal categoryon a commutative monoid object,just as ∆ is the free monoidal cat-egory on a monoid object.

∆op is the PRO for comonoids,since a monoidal functor F : ∆op →D is the same as a monoid object inDop — which we call a comonoidobject inD. Similarly, (FinSetop,+)is the PROP for cocommutativecomonoids.

42

Page 43: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In physics, it’s important that thecategory of 2d cobordisms is thePROP for commutative Frobeniusalgebras:

i: I → x m:x⊗ x→ x e:x→ I ∆:x→ x⊗ x

Monoid laws:

= = =

Comonoid laws:

= = =

Frobenius laws: Commutativity:

= = =

43

Page 44: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Any semisimple commutative alge-bra naturally gives rise to a com-mutative Frobenius algebra satisfy-ing this extra law:

=

Commutative Frobenius algebras ofthis sort are called strongly separa-ble. The PROP for these algebrasis the category of cospans of finitesets:

X

f AAAAAAAA Yg~~~~~~~~~

ASee Rosebrugh, Sabadini and Wal-ters for a proof. For Frobenius al-gebras in physics, see Lauda andPfeiffer. (Links on my webpage.)

44

Page 45: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Algebraic Theories

A category C has finite productsif it has:• a terminal object 1, mean-ing that for each x ∈ C there isa unique morphism

x ! //___ 1

• for each pair of objects x, y abinary product

x× yπx{{vvvvvvvvvv πy

##HHHHHHHHHH

x y

meaning that any pair of maps tox and y factors uniquely throughx× y:

a

f

��~~~~~~~~~~~~~~~~~~~~~~

g

��@@@@@@@@@@@@@@@@@@@@@@

!�����

x× yπx

wwoooooooooooooo

πy''OOOOOOOOOOOOOO

x y

45

Page 46: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

An algebraic theory is a cate-gory with finite products such thatevery object equals xn for some fixedobject x. Given categories withfinite products C and D, analgebra of C in D is a productpreserving functor

F : C → D

Algebraic theories can be seen asspecial PROPs, since any categorywith finite products becomes a sym-metric monoidal category if we take⊗ to be × and I to be 1.

(There’s usually a choice of binaryproducts and terminal object, sincethey’re only unique up to canoni-cal isomorphism. But this is harm-less.)

46

Page 47: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Theorem: A symmetric monoidalcategory gives a category withfinite products with × = ⊗, 1 = Iiff there are monoidal natural trans-formations

ex:x→ I

and∆x:x→ x⊗ x

such that these commute:

x1

��

∆x //x⊗ xex⊗1

��

x I ⊗ x`xoo

x1

��

∆x //x⊗ x1⊗ex��

x x⊗ Irxoo

So, a symmetric monoidal categorybecomes a category with finite prod-ucts when we can duplicate anddelete variables using

∆x:x→ x⊗ x, ex:x→ I

Exercise: Say this using stringdiagrams.

47

Page 48: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Examples

There’s an algebraic theory for anyuntyped algebraic structure withoperations of arbitrary (finite) ar-ity satisfying equational laws. Forexample:• groups• rings• not fields!• vector spaces over a given field k• associative algebras over k

Using categories with finite prod-ucts we can describe any typed al-gebraic structure with operationsof arbitrary arity satisfying equa-tional laws. For example:

• chain complexes of abelian groups• ring/module pairs

48

Page 49: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

New Versus Old

Lawvere invented algebraic theoriesto streamline Birkhoff’s approachto universal algebra where avariety is a set of operations, e.g.:

· (binary) −1 (unary) 1 (nullary)

together with a set of purelyequational axioms, e.g.:

(g·h)·k = g·(h·k), 1·g = 1, g·1 = g,

g · g−1 = 1, g−1 · g = 1.

More generally, categories withfinite products C do the same jobas ‘typed varieties’. Given C we geta typed variety with:

• one type per object of C• one operation per morphism

• one axiom per equation betweenmorphisms

49

Page 50: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

From this viewpoint, we can thinkof PROPs as special algebraic theo-ries where no variable appears twiceon the same side of any equation,and the same variables appear onboth sides. For example,

(g · h) · k = g · (h · k)

is okay, but not

g · g = g

org · h = g.

In short: no duplication or dele-tion of variables!

This is related to the fact that ‘wecannot clone a quantum’, nor canwe ‘delete a quantum’: (Hilb,⊗)is a symmetric monoidal categorywhere ⊗ is not the binary productand 1 is not terminal.

50

Page 51: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Q: Viewed as lists of axioms, PROPsare special algebraic theories. Viewedas categories, algebraic theories arespecial PROPs! What’s going on?

A: There’s a kind of ‘adjunction’:

PROPL // AlgThR

oo

or more generally

SymmMonCatL //

FinProdCatR

oo

since

hom(LC,D) ' hom(C, RD)

in a ‘natural’ way. For example:think of the PROP for monoids Cas a special algebraic theory LC,and look at algebras of LC in somecategory with finite products D.These are the same as algebras of Cin the underlying symmetric monoidalcategory RD of D!

51

Page 52: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In fact

L: SymmMonCat→ FinProdCat

and

R: FinProdCat→ SymmMonCat

are ‘2-functors’ between 2-categories,and the ‘adjunction’ between themis actually a ‘pseudo-adjunction’,since we only have an equivalenceof categories

hom(LC,D) ' hom(C, RD)

instead of an isomorphism.

Instead of studying these generalconcepts, let’s just study L and R.They’re interesting because they gobetween the ‘classical’ world of fi-nite product categories (e.g. alge-braic theories) and the ‘quantum’world of symmetric monoidal cate-gories (e.g. PROPs).

52

Page 53: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Q: What does

R: FinProdCat→ SymmMonCat

do when applied to an algebraic the-ory like the theory of groups? Whatsort of PROP do we get?

A: We get a PROP in which the di-agonal and map to the unit objecthave become explicit operations

∆:x→ x⊗ x, e:x→ I

For example, if D is the algebraictheory for groups,RD is the PROPfor cocommutative Hopf al-gebras. In here the axiom g·g−1 =1 becomes:

x⊗ x x⊗ x

x x

Ie

&&MMMMMMMMMMMMMMMMMMMM

∆EE���������

i

88qqqqqqqqqqqqqqqqqqqq

m��

222222222

1⊗inv//

53

Page 54: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Q: What does the ‘pseudo-monad’

SymmMonCat RL // SymmMonCat

do?

A: Given a symmetric monoidal cat-egory C, M = RL throws in newmorphisms

∆x:x→ x⊗ x, ex:x→ I

satisfying the conditions that makeMC into a category with finite prod-ucts. In other words, M gives Cthe ability to duplicate and deleteinformation!

We will describe M in a beautifulway using the ‘tensor product’ ofsymmetric monoidal categories.

54

Page 55: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

SymmMonCat is a 2-category with:

• symmetric monoidal categories asobjects

• symmetric monoidal functors asmorphisms

• ‘monoidal natural transformations’as 2-morphisms

where a natural transformation

C • • DF

""

G

<<

�

between monoidal functors is monoidalif it gets along with tensor productsin the following way...

55

Page 56: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

• compatibility with ⊗:

F (x)⊗ F (y) G(x)⊗G(y)

F (x⊗ y) G(x⊗ y)

-

αx⊗αy

?

Φx,y

?

Γx,y

-

αx⊗y

• compatibility with I :

I

F (I) G(I)

������

φ@@@@@@R

γ

-αI

Here the isomorphisms

Φx,y:F (x)⊗ F (y)→ F (x⊗ y)

andφ: I → F (I)

are part of the monoidal functor F ,and similarly Γ and γ are part ofG.

56

Page 57: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

So, given symmetric monoidal cat-egories C and D, we get a categoryhom(C,D) with:

• symmetric monoidal functorsF : C → D as objects

•monoidal natural transformationsα:F → G as morphisms

or in other words:

• algebras of C in D as objects

• algebra homomorphisms asmorphisms.

We call hom(C,D) the categoryof algebras of C in D. For ex-ample: if C is the PROP for monoids,hom(C, (Set,×)) is the category ofmonoids, while hom(C, (Vect,⊗))is the category of associative alge-bras.

57

Page 58: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Given symmetric monoidal categoriesC and D, hom(C,D) is always asymmetric monoidal category ina natural way! E.g. we can definethe tensor product of monoids, andalso of associative algebras.

Even better, given symmetric monoidalcategories C and D, there’s a sym-metric monoidal category C ⊗ Dsuch that:

hom(C⊗D, E) ' hom(C, hom(D, E))

For example, if C is the PROP formonoids, Cop is that for comonoids,and C⊗Cop is that for ‘bimonoids’.A bimonoid is both a monoid anda comonoid, with all the comonoidoperations being monoid homomor-phisms (and vice versa).

58

Page 59: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Now, back to our pseudo-monad

SymmMonCat M // SymmMonCat

which takes any symmetric monoidalcategory and endows it with finiteproducts. In a category with finiteproducts, every object is automat-ically a cocommutative comonoid,thanks to

∆x:x→ x× xand

ex:x→ 1

And indeed....

Theorem:

MC ' C ⊗ (FinSetop,+)

where (FinSetop,+) is the PROPfor cocommutative comonoids.

59

Page 60: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

Philosophical Postlude

Why do algebraic theories so nicelydescribe a structured object in aclassical world, and PROPs a struc-tured object in a quantum world?

In our world, physical objects actapproximately like point particles.As time passes, they trace out 1dpaths in 4d spacetime: precisely thestring diagrams we use to reasonin symmetric monoidal categories!So, it’s not surprising that symmet-ric monoidal categories seem likea comfortable context for mathe-matical objects.

But why are 1d paths in 4d space-time related to symmetric monoidalcategories? The full explanationinvolves n-categories....

60

Page 61: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

A symmetric monoidal category isthe same as a 4-category with onej-morphism for j < 3:

THE PERIODIC TABLEn = 0 n = 1 n = 2

k = 0 sets categories 2-categories

k = 1 monoids monoidal monoidal

categories 2-categories

k = 2 commutative braided braidedmonoids monoidal monoidal

categories 2-categories

k = 3 ‘’ symmetric sylleptic

monoidal monoidalcategories 2-categories

k = 4 ‘’ ‘’ symmetricmonoidal

2-categories

k = 5 ‘’ ‘’ ‘’

k = 6 ‘’ ‘’ ‘’

k-tuply monoidal n-categories:(n + k)-categories with only one

j-morphism for j < k

61

Page 62: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

1d tangles in codimension 1 are themorphisms of a monoidal category1Tang1:

•x •x∗ •x

•x

��LL

��

This is the free monoidal categorywith duals on one object.

1d tangles in codimension 2 form abraided monoidal category 1Tang2:

•x •x∗ •x

•x ������������

7777[[�������

�������

�������

This is the free braided monoidalcategory with duals on one object.

1d tangles in codimension 3 form1Tang3, the free symmetric monoidalcategory with duals on one object.

62

Page 63: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In general we expect nTangk to bethe free k-tuply monoidal n-categorywith duals on one object:

THE TANGLE HYPOTHESIS

k = 0

k = 1

k = 2

k = 3

k = 4

n = 0 n = 1 n = 2

•x•x∗ •

x

•x �����������

�� 7777

[[

�������

�������

�������

•x •x∗•x

•x

��LL

��

�������

�������

�������

4d

•x •x∗

•x

•x •x∗ •x

•x

��

�������

�������

�������

����OO

4d

•x •x∗ •x

•x

��

�������

�������

�������

����OO

5d

•x∗•x

•x

•x∗

•x •x∗

•x

�������

�������

�������

•x •x∗

•x

�������

�������

�������

4d

•x

•x

��

•x x

•x

•x

//

//

��

•x∗

•x

•x∗

•x

•x•x∗

••

zz

==

rrrr99

vvvvvvvvzz

�������

�������

�������

�����

�������

�������

�������

5d

�����

�������

�������

�������

6d

63

Page 64: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

In short: since we perceive a uni-verse of codimension 3 objects indimension 4, our ‘universal algebra’uses 3-tuply monoidal 4-categories.

An extra simplification in classical— i.e., non-quantum — logic is thatwe can duplicate and delete infor-mation. This is not really true inthe physical world, but our copy-ing machines and wastebaskets doa pretty good job of creating thisimpression, so mathematicians likesymmetric monoidal categories wherethis holds. These are categorieswith finite products, the archety-pal example being Set.

But, to get closer to reality we shouldclimb the n-categorical ladder, andlearn to love the quantum universe.

64

Page 65: Universal Algebra and Diagrammatic Reasoningmath.ucr.edu/home/baez/universal/universal_hyper.pdf · Universal Algebra and Diagrammatic Reasoning John Baez Geometry of Computation

References

For more details, try these online references:

John Baez, Quantum quandaries: a category-theoreticperspective,

http://math.ucr.edu/home/baez/quantum/

John Baez and James Dolan, Higher-dimensional algebraand topological quantum field theory, q-alg/9503002

John Baez and James Dolan, Categorification, math.QA/9802029

Michael Barr and Charles Wells, Toposes, Triples andTheories,

http://www.cwru.edu/artsci/math/wells/pub/ttt.html

Stanley Burris and H.P. Sankappanavar, A Course inUniversal Algebra,

http://www.math.uwaterloo.ca/ snburris/htdocs/ualg.html

Aaron Lauda, Frobenius algebras and ambidextrous ad-junctions, math.CT/0502550

Aaron Lauda and Hendryk Pfeiffer, Open-closed strings:

two-dimensional extended TQFTs and Frobenius alge-bras, math.AT/0510664

F. William Lawvere, Functorial Semantics of AlgebraicTheories,

http://www.tac.mta.ca/tac/reprints/articles/5/tr5abs.html

Robert Rosebrugh, Nicoletta Sabadini and Robert Wal-ters, Generic commutative separable algebras and cospans

of graphs,http://www.tac.mta.ca/tac/volumes/15/6/15-06abs.html

Todd Trimble, Bar constructions,

http://math.ucr.edu/home/baez/universal/bar.html

65