It looks like you're new here. If you want to get involved, click one of these buttons!

- All Categories 2.3K
- Chat 501
- Study Groups 21
- Petri Nets 9
- Epidemiology 4
- Leaf Modeling 2
- Review Sections 9
- MIT 2020: Programming with Categories 51
- MIT 2020: Lectures 20
- MIT 2020: Exercises 25
- Baez ACT 2019: Online Course 339
- Baez ACT 2019: Lectures 79
- Baez ACT 2019: Exercises 149
- Baez ACT 2019: Chat 50
- UCR ACT Seminar 4
- General 70
- Azimuth Code Project 110
- Statistical methods 4
- Drafts 9
- Math Syntax Demos 15
- Wiki - Latest Changes 3
- Strategy 113
- Azimuth Project 1.1K
- - Spam 1
- News and Information 148
- Azimuth Blog 149
- - Conventions and Policies 21
- - Questions 43
- Azimuth Wiki 715

Options

I spent a lot of time in this course explaining two big ideas:

**Adjoint functors**. We've focused a lot on the simplest of categories: preorders. Pairs of adjoint functors between these are also called Galois connections, and we first met them in Lecture 4. In Lecture 6 we saw that a*left*adjoint is a 'best approximation from above' to the possibly nonexistent inverse of a monotone function between preorders, while a*right*adjoint is a 'best approximation from below'. Much later, starting in Lecture 47, we looked at adjoint functors between categories in general. We saw that the pattern persists: left adjoints are 'liberal' while right adjoints are 'conservative'.**Compact closed categories.**In Lecture 67, in our study of feasibility relations, we began looking at caps and cups. We saw these allow us to describe feedback, or, more generally, the process of 'bending back' an input to some process and turning it into an output - or vice versa. In Lecture 71 we saw that caps and cups exist - and obey the all-important snake equations - in any category of enriched profunctors. And in Lecture 74, we saw this works in any 'compact closed' category. Morphisms in a compact closed category can be drawn as string diagrams, which we can manipulate just like boxes with wires coming in and out! In particular, we can 'bend back' the wires.

These are both great ideas... but amazingly, they are *two aspects of the same idea!*

To see this, start with a pair of adjoint functors:

$$ F \colon \mathcal{A} \to \mathcal{B}, \quad G \colon \mathcal{B} \to \mathcal{A} $$ By definition, there's a bijection between these sets:

$$ \alpha_{a,b} \colon \mathcal{B}(F(a),b) \to \mathcal{A}(a,G(b)) $$ for any objects \(a\) in \(\mathcal{A}\) and \(b\) in \(\mathcal{B}\). Moreover this is a natural isomorphism.

What can we do with this? Not much until we know some elements of these sets! So let's take \(b = F(a)\):

$$ \alpha_{a,F(a)} : \mathcal{B}(F(a),F(a)) \to \mathcal{A}(a,G(F(a))) $$ There's an obvious element of \(\mathcal{B}(F(a),F(a))\), namely the identity \(1_{F(a)}\). Our bijection maps this to some morphism from \(a\) to \(G(F(a))\), which we write as

$$ \eta_a \colon a \to G(F(a)) .$$
You get such a morphism for any \(a\). And using the fact that \(\alpha\) is *natural*, you can prove these morphisms define a natural transformation

$$ \eta \colon 1_{\mathcal{A}} \to G F $$
This is called the **unit**. (I'm sorry; that word that is used for too many different things in mathematics.)

Amazingly, *the unit is a lot like a cap.* Why? Remember that when we have an object \(x\) in a compact closed category, the cap is a morphism

$$ \cap_x \colon I \to x \otimes x^\ast.$$ This resembles the unit, with \(x\) playing the role of \(G\), and \(x^\ast\) playing the role of \(F\). The surprise is that this resemblance is significant, not just superficial!

What about the cup? Well, we can take our bijection

$$ \alpha_{a,b} : \mathcal{B}(F(a),b) \to \mathcal{A}(a,G(b)) $$ and let \(a = G(b)\), getting

$$ \alpha_{G(b),b} : \mathcal{B}(F(G(b)),b) \to \mathcal{A}(G(b),G(b)) .$$ There's an obvious element of \( \mathcal{A}(G(b),G(b))\), namely the identity \(1_{G(b)}\). It must come from some morphism from \(F(G(b))\) to \(b\), which we write as

$$ \epsilon_b \colon F(G(b)) \to b, $$ and you can prove such morphisms define a natural transformation

$$ \epsilon \colon F G \Rightarrow 1_{\mathcal{B}} $$
called the **counit**. This should remind you of how any object \(x\) in a compact closed category has a cup:

$$ \cup_x \colon x^\ast \otimes x \to I .$$ So far our evidence for an analogy between the unit and counit and the cap and cup is pretty thin. The real test is the snake equation. If we can prove the unit and counit obey that, something real must be going on!

We can do it. Of course, first we need to *state* the snake equation for the unit and counit. I don't have room to do this here, so watch these short videos by my friends Eugenia Cheng and Simon Willerton:

- The Catsters, Adjunctions 1, Adjunctions 2, Adjunctions 3, Adjunctions 4.

where they call the snake equations the 'triangle equations' - you'll see why. They *start* by defining an 'adjunction' to be a pair of functors \( F \colon \mathcal{A} \to \mathcal{B}\), \( G \colon \mathcal{B} \to \mathcal{A} \) equipped with a unit and counit \(\eta \colon 1_{\mathcal{A}} \to GF \), \( \epsilon \colon FG \to 1_{\mathcal{B}}\) obeying the triangle equations. Then they show this definition is equivalent to the definition of adjoint functors we've been using!

The success of this analogy suggests that maybe we could use string diagrams to work with categories, functors and natural transformations. It's true! To learn how, watch these:

- The Catsters, String diagrams 1, String diagrams 2, String diagrams 3, String diagrams 4.

After setting up string diagrams for category theory, Simon describes adjunctions using string diagrams in part 3. You'll see exactly why the unit is like a cap and the counit like a cup - and you'll see the snake equations pop out at the end! In parts 4 and 5 he uses string diagrams to get *monads* from adjunctions. Monads are very popular in programming languages like Haskell, but this will give a completely different outlook on them.

I should warn you: all this is a *different* idea than using string diagrams to study enriched categories and enriched profunctors, as we'd been doing in Chapter 4. So don't get them mixed up. But everything fits together in the end - as you've probably seen, category theory keeps generalizing everything in order to unify it and eventually simplify it.

There's much more to say; you can see my own take on it by reading this:

- John Baez, The tale of
*n*-categories

You'll see how adjunctions and monads and compact closed categories all fit nicely into the framework of *2-categories*. Just as you need categories to work efficiently with set-based mathematics, you need 2-categories to work efficiently with category-based mathematics. These days my students and I have been using 2-categories (and related gadgets like double categories) to study Markov processes, Petri nets and other kinds of networks.

I'm tempted to go on, but this course was meant to give you just a tiny taste of the grand meal of category theory and its many applications, so I will restrain myself and stop here. I've been getting very abstract, but next time I'll give you some suggestions to read more about applications.

## Comments

"I'll give you some suggestions to read more about applications"..ok , very good..

`"I'll give you some suggestions to read more about applications"..ok , very good..`

Oh my, you made by-the-wayish reference to \(n\)-categories and the theater closes the curtain.

`Oh my, you made by-the-wayish reference to \\(n\\)-categories and the theater closes the curtain.`

Jesus: if you want more on (slightly) higher categories, try these papers by students of mine. That's what we're mainly working on these days! I have carefully edited all these papers:

Kenny Courser, A bicategory of decorated cospans,

Theory and Applications of Categories32(2017), 985–1027. (Blog article here.)Daniel Cicala, Spans of cospans.

Daniel Cicala and Kenny Courser, Spans and cospans in a topos.

John Baez and Kenny Courser, Coarse-graining open Markov processes. (Blog article here.)

John Baez and Jade Master, Open Petri nets. (Blog articles here.)

All these papers are related. We're coming out with a lot more in a while!

`Jesus: if you want more on (slightly) higher categories, try these papers by students of mine. That's what we're mainly working on these days! I have carefully edited all these papers: * Kenny Courser, <a href = "https://arxiv.org/abs/1605.08100">A bicategory of decorated cospans</a>, <i>Theory and Applications of Categories</i> <b>32</b> (2017), 985–1027. (Blog article <a href = "https://johncarlosbaez.wordpress.com/2017/07/08/a-bicategory-of-decorated-cospans/">here</a>.) * Daniel Cicala, <a href = "https://arxiv.org/abs/1611.07886">Spans of cospans</a>. * Daniel Cicala and Kenny Courser, <a href = "https://arxiv.org/abs/1707.02098">Spans and cospans in a topos</a>. * John Baez and Kenny Courser, <a href = "https://arxiv.org/abs/1710.11343">Coarse-graining open Markov processes</a>. (Blog article <a href = "https://johncarlosbaez.wordpress.com/2018/03/04/coarse-graining-open-markov-processes/">here</a>.) * John Baez and Jade Master, <a href = "https://arxiv.org/abs/1808.05415">Open Petri nets</a>. (Blog articles <a href = "https://johncarlosbaez.wordpress.com/2018/08/15/open-petri-nets-part-1/">here</a>.) All these papers are related. We're coming out with a lot more in a while!`