Constant Quantities And Constant Domains
When explaining category theory to my friends (which happens more than you might think), I often find myself summing the theory up as “the abstract study of variable quantities”. We analyse the notion of a variable quantity into two components: what the quantity is, and with what the quantities varies. To say that a quantity is an number that varies with the time (say, if is the position of a beetle as it walks along the edge of a ruler, or the angle in degrees that the sun makes with the horizon), we write where is our notion of time and our notion of number.
The question comes: how do represent constant quantities? The usual answer: they are quantities , whose domain is a “single point” characterized as the terminal object. But why do these quantities deserve the name “constant”? What is so special about the domain ?
When answering these questions, I have for a while now fallen back onto another interpretation of the arrow . We can see the arrow as a “figure of shape in ”. The, I equivocate by saying, “Well, the quantity is constant because is, as a shape, a single point, and therefore varies over a point, which is to say it doesn’t vary at all”. This approach is overly complicated because it introduces a whole new metaphor for the arrow. But even more, it leads to problematic intuitions later on.
Euclid begins his Elements with the definition: “A point is that which has no part”. This proclamation has colored our intuitions of points ever since. So, if we primarily conceptualize the terminal object as a point, and use that conception as our reason for using it as the domain of constant quantities, then we are conceptually ill-equipped to handle the existence of nontrivial subterminal objects. I remember the idea of nontrivial subterminal objects being difficult to grasp.
We can resolve both of these issues at the same time by directly defining what it means for a quantity to be constant, and what it then means for a domain to be a domain of constant quantities. This post will be a very elementary theory of constant quantities.
Definitions and Relationship to the Terminal Object
Let’s begin by defining what it means for a quantity to be constant. Intuitively, a quantity which depends on a variable is constant if no matter how is specified, the resulting quantity is the same. We can formalize this as follows:
Definition: A quantity is constant if for any , .
We can piggy back off of this definition to define a constant domain.
Definition: A domain is constant if every quantity varying over it is constant. (That is, is constant if all are constant.)
We can immediately give a less grand and more categorical-feeling characterization of constant domains.
Claim: A domain is constant if and only if its identity map is constant.
Proof: If is constant, then every map out of it is constant, including the identity. On the other hand, if the identity is constant, then for any map and we have
We can follow this up by expanding what it means for the identity map to be constant.
Claim: A domain is constant if and only if there is at most one quantity for each domain .
Proof: This is exactly what it means for the identity of to be constant. If the identity of is constant, then for any we have that . On the other hand, if for any two , , then .
Furthermore, any quantity varying within a constant domain is in fact constant. Intuitively, this is because “there isn’t enough space in a constant domain to vary”.
Claim: A domain is constant if and only if every quantity is constant.
Proof: If is constant and , then since they are both maps . On the other hand, if every quantity is constant, then in particular the identity of is constant.
Now we can begin to see the relationship to the terminal object.
Corollary: The terminal object , if it exists, is constant.
Proof: The uniqueness portion of the universal property gaurentees that there is at most one map for any .
In fact, if there is a terminal object, we can give another characterization of the constant domains. Let’s prove a few basic lemmas relating constant maps to monic maps. Intuitively, monic maps are “one-to-one”. If there is “at most one” element of the domain (that is, the domain is constant), then every map out of it should be one-to-one.
Lemma: Every quantity varying over a constant domain is monic.
Proof: If is a quanity varying over a constant domain, then for any two maps such that (which happens to be any ), we have that (since is constant).
We have a converse to this lemma as well, which we might as well prove now.
Lemma: Suppose that is constant and monic. Then is constant.
Proof: Let . Since is constant, . But then since is monic, .
Intuitively, if a map is both one-to-one and constant, then there must be “at most one” element of the domain. Furthermore, any part of a constant domain is itself constant.
Corollary: If is a monic, and is constant, then is consant.
Proof: Maps into a constant domain are constant, and the domain of a constant monic map is constant.
Now, we can show that if there is a terminal object, then the constant domains are precisely the subterminal objects.
Claim: If there is a terminal object , then a domain is constant if and only if it is subterminal.
Proof: If is constant, then the terminal map is monic since it varies over a constant domain. If is subterminal, then is a monic constant, so is constant.
I think this demystifies the subterminal objects somewhat: they are just the possible domains for constant quantities. In fact, I think it also helps demystify the terminal object as a constant domain: in a precise sense, the terminal object is the largest constant domain. We will come to this idea later.
Relationship of Constants to Pullbacks and Products
With our definition of constant quantity and constant domain in hand, we can formalize the intuition that a monic map is one-to-one. Intuitively, a map is one-to-one if it cannot send two distinct things to the same place. In more positive terms, this means that the inverse image of a constant should be itself constant.
Claim: The pullback of a constant along a monic is constant.
Proof: Let be constant and be monic. We need to show that is constant. Let . These correspond respectively to and for which and . Since is constant, we have that . From this and the previous equations, we see that . Since is monic, we conclude that . But then , so is constant.
If we say that a map is “one-to-one” if the pullback of any constant along it is constant, then we have just shown that monic maps are one-to-one. It will not in general be possible to prove a converse, since the monicness of a map must be checked on non-constant quantities (figures of more complicated shape than a point) as well. This also gives a slick way to prove that parts of constant domains are constant; just pull back the identity.
There is a nice relationship between constant domains and products.
Claim: is a constant domain if and only if the diagonal map is an isomorphism.
Proof: Suppose that is constant. Then the two projections are equal. Call this single map . Since , . On the other hand, , so is the inverse of .
If is an isomorphism with inverse , then for any , we have that , so .
It’s also straightforward to show that if the diagonal map is constant, then the domain is constant. In total, we can sum up our various definitions of a constant domain as follows.
Claim: The following are equivalent when they can hold
- is a constant domain.
- Every quantity varying over is constant.
- Every quantity varying in is constant.
- The identity of is constant.
- is subterminal.
- The diagonal of is an isomorphism .
- The diagonal of is constant.
- There is a monic constant with domain .
Constant domains play nicely with products in another sense.
Claim: The product of two constant domains is constant.
Proof: A map into the product is a pair of maps into each constant domain, but since those domains are constant there is at most one such pair.
By a similar proof, any limit of a diagram of constant domains is constant.
Constant Domains and Supports
Why are there (potentially) so many different constant domains? If I define a quantity , and you define one , what makes them different? Here, I would like to make an analogy between constant domains and “namespaces” as they arise in programming languages.
It is fairly common to call an arrow a “global element” of . Since we are focusing on the arrows-as-quantities view (rather than the arrows-as-figures view), we could call this a “global constant” of . This suggests, if only by contraposition, that we could call for constant domains other than “local constants”.
We can think of the constant domains then as “namespaces” in which a constant is defined. A global constant is defined in the global namespace (say, in the “main” file of your project), while the local constants are defined in smaller namespaces (say, within particular class definitions, or whatever). A map is a containment of namespaces (since is constant, there can be at most one such map). In this case, any constant defined over in the namespace can be used in by precomposing.
I’m not sure how well this analogy really plays out. But it is a good idea to think of the different constant domains as different “local domains of definition for constants”. The category of constant domains is then seen to be the category of these possible local domains.
Definition: An object is defined over a constant domain if there is a map .
Being defined over a constant domain is a property of an object, not a structure on that object, because there is at most one map into a constant domain. being defined over constrains the possible kinds of constants in ; If is a constant, then the composite shows us that is contained in . Intuitively, is defined over if the constants in are at most defined over .
This leads us to the natural question: is there a smallest over which is defined?
Claim: Suppose that for every object , there is a constant domain which is the smallest constant domain over which is defined. Then is a left adjoint to the inclusion of the constant domains.
Proof: The adjoint bijection is
which precisely states that is the smallest constant domain over which is defined. The unit shows that is defined over . We see that is functorial as well; given , we take the composite and therefore find that .
The smallest constant domain over which is defined is usually called its support. To see why, let’s consider an (abstract) example of a category with interesting constant domains.
Suppose we are in a category of spaces, where are domains have some sort of continuity or cohesion between their points, and the variables vary continuously. We can think of a map then as a bundle of spaces varying over a variable of ; namely, is the fiber of over , in the sense as being the pullback of along . We call the category of bundles over and maps which preserve fibers (in the sense that the apparent triangle commutes) the “slice” over .
What are the constant domains in the slice? Well, we can note first that the trivial bundle given by the identity of is the terminal object, since for any bundle , the map is a map to the trivial bundle in the slice. Then the constant domains must be precisely the subterminal objects, which is to say they must be bundles for which the terminal morphisms (the bundle map itself) is mono. In other words, they are just the parts of .
A local section of a bundle , defined over some part , is then a constant of defined over . The support of a bundle, as the smallest constant domain over which it is defined, is precisely the image of the bundle map; this is the smallest part of which has non-empty fibers sitting over it. This is the origin of the term “support”.
It is often very fruitful to think of maps as variable quantities, and then to work unabashedly within this intuition. Some of the features which then make categories feel alien, at least when compared with the traditional set theoretic home of most mathematicians, are given a more familiar language.