Groups are in particular sets equipped with two operations: a binary operation (the group operation) and a unary operation (inverse)
. Using these two operations, we can build up many other operations, such as the ternary operation
, and the axioms governing groups become rules for deciding when two expressions describe the same operation (see, for example, this previous post).
When we think of groups as objects of the category , where do these operations go? They’re certainly not morphisms in the corresponding categories: instead, the morphisms are supposed to preserve these operations. But can we recover the operations themselves?
It turns out that the answer is yes. The rest of this post will describe a general categorical definition of -ary operation and meander through some interesting examples. After discussing the general notion of a Lawvere theory, we will then prove a reconstruction theorem and then make a few additional comments.
The general definition
Since operations are functions involving underlying sets, the appropriate categorical setting here is not a bare category but a concrete category, namely a category equipped with a faithful functor
, which we will think of as the underlying set (forgetful) functor.
What should “operations on the objects in a concrete category” mean, then? Well, an -ary operation is in particular a family of functions
for all objects . Morphisms ought to preserve operations, hence if
is a morphism then we ought to have
.
But this is precisely the condition that defines a natural transformation between the functors
and
! Hence we have our definition: an
-ary operation on the objects of a concrete category
is a natural transformation
.
The following straightforward theorem will determine what the -ary operations are in many familiar concrete categories.
Theorem: Let be a concrete category with finite coproducts such that
is representable by an object
. Then the
-ary operations on objects of
can be naturally identified with morphisms
(the coproduct of
copies of
), or equivalently with elements of the underlying set
.
Corollary: In particular, the above conclusion holds if has a left adjoint.
Proof. Under the hypotheses, it follows that is represented by
, and then the conclusion follows from the Yoneda lemma.
Proof of corollary. If has a left adjoint
, then
, from which it follows that
represents
. Note that in this case
represents
, where
denotes an
-element set, so we get that
-ary operations can be identified with elements of the underlying set
.
Examples. Let . In each of these familiar algebraic examples the usual forgetful functor has a left adjoint, from which it follows that the
-ary operations can be identified with the underlying set of the free object on
elements in each case, namely
. In each case this recovers the
-ary operations in the usual sense (namely all of the operations one can write down starting from the operations given by the axioms). For example, associated to any element
is the operation
on abelian groups, and associated to any polynomial is the operation
on commutative rings.
Example. Let be the category of
-sets for
a monoid. Again the usual forgetful functor has a left adjoint, so the
-ary operations can be identified with the underlying set of the free object on
elements, namely
(where
appears
times). Unlike the above cases, in this case the only interesting operations are the unary operations given by multiplication by elements of
: all the
-ary operations are given by a projection map
followed by a unary operation.
Example. Let be the category of
-modules for
a ring. Again the usual forgetful functor has a left adjoint, so the
-ary operations can be identified with the underlying set of the free object on
elements, namely
. An element
gives rise to an operation
in a natural generalization of the case . There would not be much to learn from this case except that there are various ways to define a category equivalent to
for
a ring without directly specifying
. For example, the category of representations of a group
over a field
is equivalent to
, and similarly the category of representations of a Lie algebra
over a field
is equivalent to
. In both cases thinking about
-ary operations reveals the presence of a ring whose elements give us additional operations we may not otherwise have noticed: in a representation of
we can multiply by any sum of elements of
rather than just by elements of
, and similarly in a representation of
. In the case of finite groups this lets us define useful operations like multiplication by
, and in the case of Lie algebras this lets us define useful operations like multiplication by Casimir elements.
Reflecting on the above examples, they should strike you as unsurprising in hindsight: “free object on elements” should mean nothing other than “anything I can get by applying an
-ary operation to
elements.”
This answers a question which used to bug me, namely “in the standard commutative algebra description of how polynomials work, where did polynomial composition go?” The answer is that to recover composition of, say, polynomials in one variable it suffices to identify with natural transformations
where
is the forgetful functor. Similarly to recover composition of polynomials in more than one variable.
A quick remark
Studying arbitrary -ary operations is the basic starting point of universal algebra. When we look at
-ary operations on an arbitrary concrete category, we are asking in some sense how much of the structure of objects in that category is algebraic structure. In the above cases, where we started with algebraic objects, the answer is more or less “all of it.” In the examples below this will no longer be the case, but it may still be surprising how much algebraic structure we can find.
Less algebraic examples
Example. First, a boring example. Let be the category of topological spaces. The forgetful functor
has left adjoint given by the functor which equips a set with the discrete topology. Hence there are no interesting
-ary operations: all we get are projections
.
Even if we look for infinitary operations , where
is an infinite set, we only find projection operations. So the structure of topological spaces is not well captured by operations; in some sense,
is very far from being algebraic.
Example. Let be the category of compact Hausdorff spaces. The forgetful functor
has left adjoint given by the Stone-Čech compactification
on discrete spaces, which is just the functor which associates to a set the set of ultrafilters on it (see, for example, this previous post). It follows that the ultrafilters
on a set
give us the
-ary operations on compact Hausdorff spaces.
These operations are precisely given by taking limits with respect to the given ultrafilter. For finite they are uninteresting as in the case of topological spaces, since all ultrafilters on a finite set are principal. For infinite
we get an interesting operation for every non-principal ultrafilter on
. Taking limits with respect to ultrafilters in this manner completely recovers the topology on a compact Hausdorff space
, and in fact it is possible to define the category of compact Hausdorff spaces in this manner (it is precisely the category of algebras over the ultrafilter monad).
Example. Let be the category of complex Banach spaces and weak contractions (see, for example, this previous post). The representable functor
sends a Banach space to its unit ball; we will take this as the forgetful functor
. Then
has a left adjoint
, so the unit ball of
gives us the
-ary operations on unit balls of Banach spaces (we can consider natural transformations
for arbitrary
).
The finitary operations are given by combinations of addition and scalar multiplication (subject to the constraint that we stay in the unit ball), but we get interesting infinitary operations that invoke completeness: for example, for any sequence in the unit ball of
(so
), we get an infinitary operation
on elements of the unit ball of some Banach space.
Example. Let be the opposite of the category of smooth manifolds. Remembering the slogan that algebra is dual to geometry, this category ought to have something to do with algebras of some kind. Accordingly, for the forgetful functor we will choose the functor
sending a smooth manifold to the algebra of smooth real-valued functions on it. This functor is represented by
, and
has finite coproducts, so the
-ary operations on
are given by the underlying set of the coproduct of
copies of
(in the opposite category) or, in other words, the smooth functions
on
. If
is such a function, the corresponding operation is given by
.
Example. Let be the category of commutative Banach algebras. The holomorphic functional calculus guarantees that every holomorphic function
gives an
-ary operation
. These are precisely all of the
-ary operations; see this MO question for a sketch of an argument, although we will give a more general argument in a later post. Note that
is not representable; roughly speaking, there is no free commutative Banach algebra on an element because that element must have some fixed norm and hence cannot have arbitrarily large complex numbers in its spectrum.
Example. Similarly, let be the category of commutative C*-algebras. The continuous functional calculus guarantees that every continuous function
gives an
-ary operation
. These are precisely all of the
-ary operations by an argument similar to the above argument. Note again that
is not representable.
Lawvere theories
When is a concrete category as above, it’s natural to think of operations more generally as morphisms between the objects
in
(the category of functors
), where
denotes the functor which sends every object to
. By the universal property of products, a morphism
is precisely an
-tuple of morphisms
, so classifying such morphisms reduces to the
-ary case we’ve already considered, but allowing operations to have multiple outputs as well as inputs highlights the fact that we’re really looking at a certain full subcategory of
. If
is representable by an object
, this is the opposite category of the full subcategory of
on the objects
(where
denotes an initial object), and if
has a left adjoint, this is the opposite category of the full subcategory of
on the free objects
. This category is a Lawvere theory, namely a category with finite products together with a distinguished object (in this case
) such that each object is some power of it.
(This formalism doesn’t capture infinitary operations as in the case of compact Hausdorff spaces above; there we need to consider infinitary Lawvere theories. Here we consider only the finitary case for simplicity.)
Edit, 3/17/16: It’s been pointed out to me that there’s a size issue here: it could happen that the collection of natural transformations does not form a set, so that the Lawvere theory of a concrete category
as defined above might fail to be locally small, even if
is assumed to be locally small. An explicit example where this happens is when
is the category of ordinal-graded vector spaces with finite support: that is, the category of formal finite direct sums of objects of the form
, where
is an ordinal. Here we can take
to be the forgetful functor assigning such a formal direct sum the correponding actual direct sum of vector spaces. The natural endomorphisms
are given by multiplication by a scalar
on
for every ordinal
, and these don’t form a set.
I believe this is not an issue if is assumed to be a colimit of representables in the category of functors
, which is true in all of the examples we looked at and, I think, true in all cases of interest. (For me all colimits are over essentially small diagrams; the Yoneda lemma only tells you that every functor
is a possibly large colimit of representables.) /Edit
Thinking of a Lawvere theory as a specification of a collection of operations and rules for how to compose them, the natural thing to do with a Lawvere theory is to write down its category of models. What should this mean? If is a Lawvere theory with distinguished object
, a model of the theory
should be a set
such that we assign to each morphism
a function
in a way which is compatible with composition and products.
In short, a model of a Lawvere theory should be a product-preserving functor
. The category of models of
(in
) is therefore the category
of such functors. It naturally comes equipped with a faithful forgetful functor to
given by evaluating a functor on the object
, making it a concrete category.
Example. If is any of the algebraic examples
we encountered earlier, the categories of models of the corresponding Lawvere theories
are precisely the original categories
respectively.
Example. If with the unit ball forgetful functor, the category of models of the corresponding infinitary Lawvere theory (where we include the countable product
and require models to be functors preserving countable products) is the category of totally convex spaces. This is in some sense the closest algebraic theory approximating Banach spaces.
Example. If with the
forgetful functor, the category of models of the corresponding Lawvere theory is the category of smooth algebras. The algebras
are natural examples of smooth algebras, but smooth algebras can also contain nilpotents like
. The object
in the opposite of the category of smooth algebras, which behaves like a category of generalized smooth manifolds, represents the tangent bundle functor.
Lawvere theories give us a natural way to construct functors between categories of algebraic objects. First, note that Lawvere theories themselves form a category: a morphism between Lawvere theories should be a product-preserving functor sending the fixed object of
to the fixed object of
. Next observe that a morphism of Lawvere theories induces a functor between the categories of models
in the other direction.
Example. There is a natural inclusion of Lawvere theories given by mapping the addition operations on abelian groups to the addition operations on underlying groups of rings. It induces the underlying group forgetful functor
.
Example. There is a natural quotient of Lawvere theories given by abelianization (via the natural map
). It induces the forgetful functor
.
Remark. One reason to favor working with Lawvere theories is that we can consider models in categories other than : if
is any category with finite products, we can define a model of a Lawvere theory
to be a product-preserving functor
. For example, a topological group is a model
of the Lawvere theory of groups in the category of topological spaces; similarly, a Lie group is a model
.
With this generalized notion of model, every Lawvere theory has an initial model, namely the identity functor , which exhibits the distinguished object of
as the universal model of
. This generalizes the observation made in a previous post about the distinguished object in
being the universal group. Moreover, with this notion of model, a morphism of Lawvere theories is just a description of the distinguished object of one Lawvere theory as a model for another Lawvere theory. The two examples we gave above can be summarized by the slogans “the universal ring is an abelian group” and “the universal commutative ring is a ring.”
The category of Lawvere theories gives us a natural interpretation of the fact that the category of models of a Lawvere theory is concrete. Namely, there is an initial Lawvere theory: it has an object and finite products
and is the free category on this data. The only morphisms one can write down from this data are the unique morphism
, the projection maps
, and products and compositions of these. This gives a category equivalent to
. We encountered this Lawvere theory when considering
with the usual forgetful functor. The category of models of this Lawvere theory in
is naturally equivalent to
.
By the universal property, every Lawvere theory admits a unique morphism from the initial Lawvere theory, and this induces a functor on categories of models in the other direction which is precisely the usual forgetful functor.
A reconstruction theorem
(Below, “model” means “model in .”)
Above we saw that in some examples, starting from a concrete category , forming the corresponding Lawvere theory
, and considering its category of models
, we naturally reconstruct the original category. In fact the following general result holds.
Theorem: Let be a concrete category and let
be the Lawvere theory generated by
. Then there is a naturally defined functor from
to the category of models of
. This functor is a morphism of concrete categories, and it is initial among all morphisms of concrete categories from
to the category of models of a Lawvere theory.
The theorem tells us that the category of models of is in some sense the closest approximation to
by the category of models of a Lawvere theory.
Corollary: If is itself the category of models of a Lawvere theory, then the category of models of
is naturally equivalent to
as a concrete category.
Proof. The idea of the proof is that when we define we’ve already described all
-ary operations on the underlying sets
preserved by the morphisms of
. Any other morphism of concrete categories into the category of models of a Lawvere theory can only supply us with
-ary operations we already have.
First, we want to show that there is a natural functor from to the category of models of
. This should be clear by definition, but it is good to be explicit. In general, for any categories
satisfying mild size conditions, there is a natural evaluation functor
where as usual is the category of functors
. We can restrict this functor to various subcategories in either factor. In particular, if
is a concrete category, restricting the natural evaluation functor
to the Lawvere theory (regarded as a subcategory of
) generated by
gives a functor
and, since functor categories are exponential objects, a functor
.
Explicitly, this functor sends every object to the functor which assigns an object
the object
; in particular, it’s a functor to the category of models of
.
We want to prove that this functor is initial among functors to categories of models of Lawvere theories, so let be a morphism of concrete categories (a functor
such that
) such that
is the category of models of a Lawvere theory
. Then
defines a functor
which gives a functor
which in turn gives a functor
.
Letting be the distinguished object, this functor sends
to
and
to
(by the assumption that
) and sends morphisms
to natural transformations
, hence gives a morphism of Lawvere theories
inducing a functor
on categories of models in the other direction through which
factors by inspection. The conclusion follows.
Revisiting topological spaces
This post can be thought of as addressing the following natural question: concrete categories usually arise as categories of structured sets and morphisms preserving that structure. Given a concrete category, can we reconstruct the structure that its morphisms preserve in some appropriate sense? The post shows that the answer is yes for categories of models of a Lawvere theory, where the structure is
-ary operations, but it is emphatically no in general, since not all structure is captured by
-ary operations. Our worst failure was on the category
, where we only managed to get the initial Lawvere theory.
Following the general slogan that algebra is dual to topology, as well as taking a cue from the example of , we might decide to look at
instead. A natural forgetful functor to choose here is the functor
sending a topological space to its open subsets, which is represented by the Sierpinski space
(with the open sets
); here we identify an open subset with its indicator function as an element of
. (We will ignore the fact that this functor is not faithful, hence strictly speaking does not define a concretization.)
Now we have lots of operations, but on open subsets rather than points of topological spaces. The obvious guess is that the finitary operations should be generated by finite intersection and union, since these are all preserved by the action of continuous maps on open sets
. To verify this, since
is represented by
, the
-ary operations
are given by morphisms
, or equivalently the open subsets of
. Any such open subset is the union of sets of the form
where
is one of
. If any of the
are empty then so is the product, in which case the corresponding operation is the one sending any
-tuple of open subsets to the empty set. Otherwise, the corresponding operation is the one sending an
-tuple of open subsets to an intersection of some of them (the ones at every index
such that
). Taking unions of open subsets of
corresponds to taking the pointwise union of the corresponding operations, and we recover the desired result.
The Lawvere theory we obtain in this way is the Lawvere theory of (edit:) distributive lattices (posets with finite products and coproducts which distribute over each other). Since open subsets are closed under arbitrary unions but only finite intersection, we get an interesting infinitary Lawvere theory if we look at infinitary operations, namely the Lawvere theory of frames (posets with all coproducts and finite products such that the former distribute over the latter). The category
is therefore in some sense the closest approximation to
by the category of models of an infinitary Lawvere theory, and consequently its opposite category, the category of locales, approximates
itself. Substituting topological spaces with locales leads to pointless topology, which classically is nearly identical to ordinary point-set topology. However, pointless topology behave better with respect to weaker foundations, and in particular behaves better when internalized to, for example, a topos. It also captures precisely the part of topology which is captured by sheaves.