Doctrines
Posted by John Baez
Universal algebra began as an attempt to deal with lots of familiar algebraic gadgets simultaneously: groups, rings, lattices, vector spaces, Lie algebras, and so on. A bunch of the same theorems hold for all of these - so why not prove them all at once and be done with it? It turns out to be possible!
In his famous 1963 thesis, Bill Lawvere showed how universal algebra can be formulated using categories:
- F. William Lawvere, Functorial Semantics of Algebraic Theories.
He saw that universal algebra was all about algebraic gadgets that make sense in any category with finite products. Shockingly, every such category $C$ can be seen as the “theory” of some such gadget. If $D$ is some other category with finite products, a product-preserving functor $F: C \to D$ then gives such a gadget in $D$. We call this a model of $C$ in $D$.
However, besides categories with finite products, there are also other kinds of categories, which support other kinds of algebraic gadgets. So, around 1969, Lawvere massively generalized universal algebra - so much that he required a precise definition of “a kind of category”! He called such a thing a “doctrine”:
- F. William Lawvere, Ordinal sums and equational doctrines, Springer Lecture Notes in Mathematics No. 80, Springer-Verlag (1969), pp. 141-155.
This is a startling leap in abstraction, typical of Lawvere’s work.
Let’s talk about doctrines here. I’ll start by answering a question Urs Schreiber asked in another thread… and after I get some guesses, I’ll give the precise definition of a doctrine.
Urs writes:
Given any category $C$. Can anyone stop me from addressing it as a syntax?
I can’t stop you - I’m all the way over here in Shanghai!
Given any functor $C \to D$. Do I have the right to call it a semantics for $C$?
Of course you have the “right”. It’s a free country! (Germany, I mean.)
However, to be understood, it will be much better if you call $C$ a “theory”, and $F$ a “model” of that theory in $D$.
More importantly, you are missing the crucial notion of a doctrine. Mike Stay already tried to explain it to you, but let me try again.
Any category can be regarded as a theory of some kind, and any functor can be regarded as a model of some kind.
“Some kind”???
Yes: and a “doctrine” is what picks out a specific kind of category, and a specific kind of functor.
For example, when you mentioned the theory of groups, Th(Grp), you mentioned that this is a category with finite products - that’s a kind of category. But when you said that a model of this theory was a functor
$F: Th(Grp) \to D$
you forgot to note that $F$ must be a functor preserving finite products - that’s a kind of functor.
So, you weren’t clearly specifying the relevant “doctrine” in which Th(Grp) lives - namely, the his the doctrine of algebraic theories:
- categories with finite products,
- functors between these, preserving finite products,
- natural transformations between these.
This doctrine is also called FinProdCat for short. It was Lawvere who first realized that universal algebra was really all about this doctrine. (For an intro to universal algebra, try this.)
For comparison, over on the lambda calculus thread, we’ve been talking about the doctrine of lambda theories. This consists of:
- cartesian closed categories,
- functors between these, preserving finite products
- natural transformations between these
This doctrine is also called CCC for short. It was Lambek who first realized that the lambda calculus was really all about this doctrine. (For an intro to the lambda calculus, try this.)
And on the quantum computation thread, we are talking about various other doctrines, such as the doctrine of PROPs, consisting of
- symmetric monoidal categories,
- symmetric monoidal functors between these
- symmetric monoidal natural transformations between these
This doctrine is also called SymmMonCat. A theory in this doctrine is just a symmetric monoidal category, but Adams and MacLane called it PROP, and people still use that term. Certain special PROPs called “operads” are even more famous. (For an intro to PROPs and operads, try this.)
As an exercise, try to the general concept of “doctrine” more precise. I didn’t want to lay the precise definition on you before you saw these examples! I do want to state the definition, because it’s quite simple and beautiful, but it’s best if people make some guesses first. If people get stuck they can read this:
- A. Kock, G. Reyes, Doctrines in categorical logic, in Handbook of Mathematical Logic, ed. J. Barwise, North Holland 1977.
(Alas, I don’t know an online introduction to doctrines. Does anybody?)
Anyway, now we’re ready to tackle your next puzzle:
Urs writes:
But assume I feel like it and take any old group $G$, regard it as a category $\Sigma(G)$ with a single object – and then declare that I want to think of $\Sigma(G)$ as a syntax.
First, just to help you sound like an expert, I’d urge you to say theory instead of syntax here, and similarly model instead of semantics. I’ll make those changes below:
But assume I feel like it and take any old group $G$, regard it as a category $\Sigma(G)$ with a single object – and then declare that I want to think of $\Sigma(G)$ as a theory.
Then the first thing I’d ask is “a theory in what doctrine, Urs?”
Next, assume I want to pick any functor
(1)$\Sigma(G) \to \mathrm{Vect}_\mathbb{C}$and say that this is a model for my theory $\Sigma(G)$?
Then I’d ask “a model in what doctrine, Urs?”
Would you tell me that I am free to do so if I like, or would you point out that $\Sigma(G)$ violates some property that a category must have if we are going to admit that it is a kind of theory?
It all depends on the doctrine! If you want to let any functor count as a model, maybe you want to use the blandest doctrine possible. You can think of a doctrine as an “amount of structure we want our categories to have”, so Mike called this the doctrine of no structure at all. It consists of:
- categories,
- functors between these
- natural transformations between these
This is also called Cat, the 2-category of categories!
If we pick this doctrine, then yes: for any group $G$, the corresponding 1-object category $\Sigma(G)$ is a theory in this doctrine! And, any functor
$F : \Sigma(G) \to D$
is a model. In fact, this example is indeed very important. What do we normally call a model of this sort?
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 2.5 License.
Re: Doctrines
Thanks for this indoctrination!
So instead of admitting that I am talking about a linear representation of some group $G$, I could equivalently say that I am talking about a model in $\mathrm{Vect}$ of the theory $\Sigma(G)$ with respect to the doctrine $\mathrm{Cat}$ of no structure.
Oh dear. I will fail miserably.
Since $\mathrm{Cat}$ may be addressed as the doctrine of no structure, a first guess would be that a doctrine is a 2-category of categories with certain structure, structure preserving functors between them and natural transformations between these.
Instead of trying to make that more precise, I ask a counter question:
whatever the right answer is, it seems clear that “doctrine” is just the “n=1”-version of a general concept.
What is a 0-doctrine? By my above guess, it would just be any category of sets with structure and structure preserving functions between them.