The Unapologetic Mathematician

Mathematics for the interested outsider


So I’m up at 03:00 because of an unexpected nap this evening. When I got back from dinner, there was a blackout that included my building. So I slept a bit, then woke up completely a few hours later. Having little else to do, I finally hunkered down on some tweaks to the site.

I moved the tagline a bit and dropped the “rant” phrase. I wanted to change “outraged” to “outspoken”, but even then it wouldn’t really look nice where it now goes. Actually, not only have I not been that outraged, I haven’t been as ranty as I expected I’d be.

Over the last seven months this place has gone in directions I didn’t really expect, and it’s really taken on a life of its own. As for myself — the nominal author — I find myself taken along for the ride. I’m reminded of the apocryphal story about the university that planted grass everywhere, waited to see where it got trampled from people walking across it, then put the sidewalks where people naturally walked. Making predictions is difficult, especially about the future. Unless you’re an anti-blogger, in which case I suppose it’s difficult to predict the past, but that’s a whole ‘nother story.

In the place of the old tagline, I’ve got a more robust (and appropriate) “about” panel. It should give a better explanation of what the hell is going on here, and how to read the page for newcomers.

I haven’t started tearing through and restructuring the “categories” panel in the sidebar, but I’ll hold off on that until I get the cable modem set up here rather than the slow and buggy “Mu-Fi“.

I’m also going to see what I can do about getting a search panel set up, but without paying for the capability to edit my CSS directly (in both money to WordPress and time invested in learning how), I’m not sure what I’ll be able to cobble together.

Finally, inspired by the adventures this evening, I’m starting a more “bloggy” weblog about my life as a Connecticut Yankee in the Lower Garden District. I’m using a phrase I picked up from Nick Maggio (a grad student here) for the title: Yankee Freak-Out. There’s not much there yet, but I’ll start posting tomorrow afternoon.

Assuming, of course, that I’ve got the power.


August 14, 2007 Posted by | Uncategorized | 2 Comments

Enriched Categories

I’d like to move on now to another way of blending various structures. We’ve seen that in certain situations the set of morphisms between two objects in a category naturally has deeper structure itself. For example, the set of homomorphisms between two abelian groups is itself an abelian group, because abelian groups are modules over the commutative ring \mathbb{Z}. More generally, the set of homomorphisms between two R-modules naturally has the structure of a \mathbb{Z}-module, and sometimes more.

We need a good way of talking about this sort of thing, where we replace hom sets by “hom objects” in some other category \mathcal{V}. When this happens we say that our category is “enriched” over \mathcal{V}. So to rephrase what I said above, the category of R-modules is enriched over \mathbf{Ab}. Similarly, locally small categories are enriched over \mathbf{Set}.

When we talk about categories — which usually for us means locally small categories — we are implicitly using a number of properties of \mathbf{Set}. In particular, to set up compositions we need to be able to take pairs of morphisms, which the cartesian product handles for us nicely: \hom_\mathcal{C}(B,C)\times\hom_\mathcal{C}(A,B). We also need to be able to pick out a special morphism in each set of endomorphisms to be the identity, which we can take to be the image of a function from a one-point set to the set of endomorphisms \hom_\mathcal{C}(C,C) sort of like we did for monoid objects.

For setting up the relations a category must satisfy we need to be able to build triples from pairs in two ways:
We also need to pair a morphism with a (unique) identity morphism:

What are the important properties of the category of sets that make it useful for these purposes? It’s just the fact that \mathbf{Set} equipped with finite products (including a singleton set as terminal object) is a monoidal category! So let’s take a monoidal category \mathcal{V} — a useful example to have always at hand is \mathbf{Ab} — and try to use it for enrichment. As we proceed, we’ll write \mathcal{V}_0 for the underlying regular category (that is, forget that \mathcal{V} is monoidal).

So, given such a monoidal category \mathcal{V} we’ll define a \mathcal{V}-category \mathcal{C} to consist of a class of objects \mathrm{Ob}(\mathcal{C}), and for each pair (A,B) of objects a “hom-object” \hom_\mathcal{C}(A,B)\in\mathcal{V}_0. For each triple of objects (A,B,C) there is a composition \circ:\hom_\mathcal{C}(B,C)\otimes\hom_\mathcal{C}(A,B)\rightarrow\hom_\mathcal{C}(A,C). For each object A there is an “identity”, described by an arrow i:\mathbf{1}\rightarrow\hom_\mathcal{C}(A,A).

I’ll be spending some time on this, so let’s leave it at the definition for now. Go through and unpack it for the case of an \mathbf{Ab}-category, and see what the definition says such a thing should look like.

August 13, 2007 Posted by | Category theory | 11 Comments


Todd Trimble pointed out to me a mistake I made in saying that internalizations commute. I glossed over a number of important subtleties and he set me straight.

Now I’m just getting back from a visit to Bourbon Street, since the real intarwobs and television won’t be reaching my apartment until Wednesday morning. I’ve skimmed his points and they check out, but I invite him to post them here as a comment so I don’t mangle them. Basically, I think I’m “morally” right (and I’m sure I’ve read John Baez saying somthing along these lines), but I’ve messed something up in my presentation as I attempt to get back in the saddle. I’d be glad of any clarification that can be made to see where I’ve gone Pete Tong.

These last two posts are sort of the tail end of internalization anyhow, and I was planning on moving on to something new on Monday. If they’re a little messy, so be it.

August 12, 2007 Posted by | Category theory | 1 Comment

Internal Categories

Just like we have monid objects, we can actually define something we could sensibly call a “category object”. In this case, however, it will be a little more accurate to use the term “internal category”.

This is because a (small) category isn’t just a set with extra structure. It’s two sets with extra structure. We have a set O of objects, a set M of morphisms, a function i:O\rightarrow M assigning the identity morphism to each object, functions s:M\rightarrow O and t:M\rightarrow O assigning the source and target objects to each morphism, and an arrow \gamma:M{}_s\times_tM\rightarrow M telling us how to compose certain pairs of morphisms. This involves a “fibered product”, which is just the pullback in \mathbf{Set}. We take the arrows s and t from M to O and pull back the square to get the set of all pairs of morphisms so that the source object of one is the target of the other.

Then there are a bunch of relations which hold:

  • The source of the identity arrow on an object is the object itself.
  • The target of the identity arrow on an object is the object itself.
  • The identity arrow on an object acts as a left and right identity for the composition.
  • The source of a composition is the source of the second member of the pair.
  • The target of a composition is the target of the first member of the pair.
  • The composition is associative.

I’ll leave you to write these out purely in terms of the functions m, i, s, and t.

Now we can take this whole setup and drop it into any other category, as long as that category has pairwise pullbacks. If \mathcal{C} does have these pullbacks, then a category internal to \mathcal{C} (or a “category object”) consists of a pair of objects and four morphisms of \mathcal{C}, which must satisfy the above relations. Then a category internal to \mathbf{Set} is a small category.

When we’re talking about categorifying something like a group, we want to replace the underlying set of a group with a small category. That is, we want to have a group object in \mathbf{Cal}. But we know that internalizations commute, so this is the same thing as a “category object” in groups! That is, instead of looking for a category with a multiplication functor and so on, we can instead look for a pair of groups with source, target, composition, and identity homomorphisms between them.

August 11, 2007 Posted by | Category theory | Leave a comment

Internalizations commute

Okay, back in the saddle. We know about monoid objects and group objects, and also the slight variant of abelian group objects. These are functors (preserving some sort of product structure) from the toy categories \mathrm{Th}(\mathbf{Mon}), \mathrm{Th}(\mathbf{Grp}), and \mathrm{Th}(\mathbf{Ab}) to our target category \mathcal{C}, respectively. We could also write out all the properties of (unital) rings in terms of a category \mathrm{Th}(\mathbf{Ring}) — the “theory of rings” — and then use this to define “ring objects

We know, though, that a ring is a monoid object in the category \mathbf{Ab} of abelian groups. And the category of abelian groups is the category of abelian group objects in \mathbf{Set}. That is, \mathbf{Ab}\cong\mathbf{Set}^{\mathrm{Th}(\mathbf{Ab})}. And then we get monoid objects (rings) by considering (\mathbf{Set}^{\mathrm{Th}(\mathbf{Ab})})^{\mathrm{Th}(\mathbf{Mon})}.

But what is a functor from one category into the category of functors from a second category into a third? What is (\mathcal{A}^\mathcal{B})^\mathcal{C}? This is just a functor from the product category \mathcal{C}\times\mathcal{B} to \mathcal{A}! Thus (\mathcal{A}^\mathcal{B})^\mathcal{C}\cong\mathcal{A}^{\mathcal{C}^\mathcal{B}}. This should look familiar — it says that (to whatever extent it’s well-defined) the category of categories is a closed category!

Now we also know that the product of two categories is “weakly symmetric” — \mathcal{B}\times\mathcal{C} is equivalent to \mathcal{C}\times\mathcal{B}. And thus the categories of functors from either one of these to a third category are equivalent — \mathcal{A}^{\mathcal{C}\times\mathcal{B}}\cong\mathcal{A}^{\mathcal{B}\times\mathcal{C}}. Putting this together with the “currying” above we find that (\mathcal{A}^\mathcal{B})^\mathcal{C}\cong(\mathcal{A}^\mathcal{C})^\mathcal{B}.

So let’s bring this back to internalizations. We find that (\mathbf{Set}^{\mathrm{Th}(\mathbf{Ab})})^{\mathrm{Th}(\mathbf{Mon})} and (\mathbf{Set}^{\mathrm{Th}(\mathbf{Mon})})^{\mathrm{Th}(\mathbf{Ab})} are equivalent. A monoid object in \mathbf{Ab} is equivalent to an abelian group object in \mathbf{Mon}.

And we saw evidence of this before. We’ve taken abelian groups and built free monoid objects on them, and we’ve taken monoids and built free abelian group objects on them. And the rings we get from each case are isomorphic to each other.

This whole setup generalizes. For any two algebraic structures we can describe by “theory of” categories, we can add both structures to an object of a category \mathcal{C} in either order. the processes of “internalizing” the two structures into the category \mathcal{C} commute with each other.

Now, for an exercise you can work out the naïve approach mentioned above. Write down the definition of \mathrm{Th}(\mathbf{Ring}) from first principles, just like we did for monoids and groups and such. Then show that the resulting category is equivalent to \mathrm{Th}(\mathbf{Mon})\times\mathrm{Th}(\mathbf{Ab}).

August 10, 2007 Posted by | Category theory | 2 Comments

Still busy

I’ve now determined that the distance from here to the department is not as walkable as the same distance would be in New Haven.

As I recover, here is a paper on solving the Travelling Salesman Problem. The authors do so with “white light interferometry”, which sort of makes it a quantum computation algorithm.

The thing they’re overstating is this: this is far from the first reduction of an NP-complete problem to a polynomial-time solution. What they miss out on is that their algorithm is exponential in space — the amount of computational space required goes up exponentially with the size of the problem. Specifically, it takes N^N photons to solve the N-city problem. Thus it’s not really that new as far as computational complexity goes. Still.

August 9, 2007 Posted by | Uncategorized | 6 Comments


I’ll put the main line of the blog on hiatus for a little bit while I travel, especially since it’s so hard to make links or to type $latex over and over again without a copy/paste function.

I do want to make one note/puzzle in connection with my trip from Washington, D.C. to New Orleans, LA. Earlier today I was driving north, south, and west all at the same time. Where was I?

August 7, 2007 Posted by | Uncategorized | 3 Comments

Group objects

Just like we have monoid objects, we can construct a category called \mathrm{Th}(\mathbf{Grp}), which encodes the notion of a “group object”.

Groups are a lot like monoids, but we’ll need to be able to do a few more things to describe groups than we needed for monoids. So let’s start with all the same setup as for monoid objects, but let’s make the monoidal structure in our toy category be an actual cartesian structure. That is, we start with an object G and we build up all the “powers”, but now we insist that they be built from categorical products rather than just some arbitrary monoidal structure. Then G^{\times n} is the categorical product of n copies of G. Not only does this work like a monoidal structure, but it come equipped with a bunch of extra arrows. For example, there are arrows to “project out” a copy of G from a product, and every object X has a unique arrow t_X from X to the terminal object — the product of zero copies of G.

More importantly it has an arrow \Delta:G\rightarrow G\times G called the “diagonal” that is defined as the unique arrow satisfying \pi_1\circ\Delta=1_G=\pi_2\circ\Delta. That is, it makes an “identical copy” of G. For instance, in the context of sets this is the function \Delta:S\rightarrow S\times S defined by \Delta(s)=(s,s).

Now we do everything like we did for monoid objects. There’s a morphism m:G\times G\rightarrow G, and one e:G^{\otimes0}\rightarrow G, and these satisfy the identity and associativity relations. Now we also throw in an arrow i:G\rightarrow G satisfying m\circ(i\times1_G)\circ\Delta=e\circ t_G=m\circ(1_G\times i)\circ\Delta. That is, we can start with an “element” of G and split it into two copies. Then we can either copy with i and leave the other alone. Then we can multiply together the copies. Either choice of which one to hit with i will give us the exact same result as if we’d just “forgotten” the original element of G by passing to the terminal object, and then created a copy of the identity element with e.

Wow, that looks complicated. Well, let’s take a functor from this category to \mathbf{Set} that preserves products. Then what does the equation say in terms of elements of sets? We read off m(x,i(x))=e=m(i(x),x). That is, the product of x and i(x) on either side is just the single element in the image of the arrow described by e — the identity element of the monoid. But this is the condition that i(x) be the inverse of x. So we’re just saying that (when we read the condition in sets) every element of our monoid has an inverse, which makes it into a group! Now a group object in any other category \mathcal{C} is a product-preserving functor from \mathrm{Th}(\mathbf{Grp}) to \mathcal{C}.

We can do even better. Since the monoidal structure in \mathrm{Th}(\mathbf{Grp}) is cartesian, it comes with a symmetry. The twist \tau_{A,B}:A\times B\rightarrow B\times A is defined as the unique arrow satisfying \pi_1\circ\tau_{A,B}=\pi_2 and \pi_2\circ\tau_{A,B}=\pi_1. In sets, this means \tau_{A,B}(a,b)=(b,a). Now we can add the relation m\circ\tau_{G,G}=m to our category. In sets this reads that m(x,y)=m(y,x), which says that the multiplication is commutative. The resulting category is \mathrm{Th}(\mathbf{Ab}) — the “theory of abelian groups” — and an “abelian group object” in a category \mathcal{C} is a product-preserving functor in \mathcal{C}^{\mathrm{Th}(\mathbf{Ab})}.

August 4, 2007 Posted by | Category theory | 13 Comments

Free Algebras

Let’s work an explicit example from start to finish to illustrate these free monoid objects a little further. Consider the category K\mathbf{-mod} of modules over the commutative ring K, with tensor product over K as its monoidal structure. We know that monoid objects here are K-algebras with units.

Before we can invoke our theorem to cook up free K-algebras, we need to verify the hypotheses. First of all, K\mathbf{-mod} is symmetric. Well, remember that the tensor product is defined so that K-bilinear functions from A\times B to C are in bijection with K-linear functions from A\otimes B to C. So we’ll define the function T(a,b)=b\otimes a. Now there is a unique function \tau:A\otimes B\rightarrow B\otimes A which sends a\otimes b to b\otimes a. Naturality and symmetry are straightforward from here.

Now we need to know that K\mathbf{-mod} is closed. Again, this goes back to the definition of tensor products. The set \hom_K(A\otimes B,C) consists of K-linear functions from A\otimes B to C, which correspond to K-bilinear functions from A\times B to C. Now we can use th same argument we did for sets to see such a function as a K-linear function from A to the K-module \hom_K(B,C). Remember here that every modyle over K is both a left and a right module because K is commutative. That is, we have a bijection \hom_K(A\otimes B)\cong\hom_K(A,\hom_K(B,C)). Naturality is easy to check, so we conclude that K\mathbf{-mod} is indeed closed.

Finally, we need to see that K\mathbf{-mod} has countable coproducts. But the direct sum of modules gives us our coproducts (but not products, since our index set is infinite). Then since K\mathbf{-mod} is closed the tensor product preserves all of these coproducts.

At last, the machinery of our free monoid object theorem creaks to life and says that the free K-algebra on a K-module A is \bigoplus\limits_n(A^{\otimes n}). And we see that this is exactly how we constructed the free ring on an abelian group! In fact, that’s a special case of this construction because abelian groups are \mathbb{Z}-modules and rings are \mathbb{Z}-algebras.

August 3, 2007 Posted by | Category theory | 1 Comment

Free Monoid Objects

When we have an algebraic concept described as a set with extra structure, the morphisms between such structured sets are usually structure-preserving functions between the underlying sets. This gives us a “forgetful” functor which returns the underlying sets and functions. Then as we saw, we often have a left adjoint to this forgetful functor giving the “free” structure generated by a set.

But now that we’re talking about monoid objects we’re trying not to think about sets. A monoid object in \mathcal{C} is a monoidal functor from \mathrm{Th}(\mathbf{Mon}) to \mathcal{C}, and a “homomorphism” of such monoid objects is a monoidal natural transformation. But the object part of such a functor is specified by one object of \mathcal{C} — the image of M\in\mathrm{Th}(\mathbf{Mon}) — which we can reasonably call the “underlying object” of the monoid object. Similarly, a natural transformation will be specified by a morphism between the underlying objects (subject to naturality conditions, of course). That is, we have a “forgetful functor” from monoid objects in \mathcal{C} to \mathcal{C} itself. And a reasonable notion of a “free” monoid object will be a left adjoint to this functor.

Now, if the monoidal category \mathcal{C} has coproducts indexed by the natural numbers, and if the functors C\otimes\underline{\hphantom{X}} and \underline{\hphantom{X}}\otimes C preserve these coproducts for all objects C\in\mathcal{C}, then the forgetful functor above will have a left adjoint. To say that the monoidal structure preserves these coproducts is to say that the following “distributive laws” hold:

\coprod\limits_n(A\otimes B_n)\cong A\otimes\biggl(\coprod\limits_nB_n\biggr)
\coprod\limits_n(A_n\otimes B)\cong\biggl(\coprod\limits_nA_n\biggr)\otimes B

For any object C\in\mathcal{C} we can define the “free monoid object on C” to be \coprod\limits_nC^{\otimes n}, equipped with certain multiplication and unit morphisms. For the unit, we will use the inclusion morphism C^{\otimes0}\rightarrow\coprod\limits_nC^{\otimes n} that comes for free with the coproduct. The multiplication will take a bit more work.

Given any natural numbers m and n, the object C^{\otimes m}\otimes C^{\otimes n} is canonically isomorphic to C^{\otimes m+n}, which then includes into \coprod\limits_kC^{\otimes k} using the coproduct morphisms. But this object also includes into \coprod\limits_{i,j}(C^{\otimes i}\otimes C^{\otimes j}), which is isomorphic to \biggl(\coprod\limits_iC^{\otimes i}\biggr)\otimes\biggl(\coprod\limits_jC^{\otimes j}\biggr). Thus by the universal property of coproducts there is a unique morphism \mu:\biggl(\coprod\limits_iC^{\otimes i}\biggr)\otimes\biggl(\coprod\limits_jC^{\otimes j}\biggr)\rightarrow\biggl(\coprod\limits_kC^{\otimes k}\biggr). This is our multiplication.

Proving that these two morphisms satisfy the associativity and identity relations is straightforward, though somewhat tedious. Thus we have a monoid object in \mathcal{C}. The inclusion C=C^{\otimes1}\rightarrow\coprod\limits_nC^{\otimes n} defines a universal arrow from C to the forgetful functor, and so we have an adjunction.

So what does this look like in \mathbf{Set}? The free monoid object on a set S will consist of the coproduct (disjoint union) of the sets of ordered n-tuples of elements of S. The unit will be the unique {0}-tuple (), and I’ll leave it to you to verify that the multiplication defined above becomes concatenation in this context. And thus we recover the usual notion of a free monoid.

One thing I slightly glossed over is showing that \mathbf{Set} satisfies the hypotheses of our construction. It works here for the same reason it will work in many other contexts: \mathbf{Set} is a closed category. Given any closed category with countable coproducts, the functor C\otimes\underline{\hphantom{X}} has a right adjoint by definition. And thus it preserves all colimits which might exist. In particular, it preserves the countable coproducts, which is what the construction requires. The other functor preserves these coproducts as well because the category is symmetric — tensoring by C on the left and tensoring by C on the right are naturally isomorphic. Thus we have free monoid objects in any closed category with countable coproducts.

August 2, 2007 Posted by | Category theory | 2 Comments