The Dual Concept of Injection
Posted by Tom Leinster
We’re brought up to say that the dual concept of injection is surjection, and of course there’s a perfectly good reason for this. The monics in the category of sets are the injections, the epics are the surjections, and monics and epics are dual concepts in the usual categorical sense.
But there’s another way of looking at things, which gives a different answer to the question “what is the dual concept of injection?”
This different viewpoint comes from the observation that in the category of sets, the injections are precisely the coproduct inclusions (coprojections)
Certainly every coproduct inclusion in the category of sets is injective. And conversely, any injection is a coproduct inclusion, because every subset of a set has a complement.
So, the injections between sets are the specialization to of the general categorical concept of coproduct coprojection. The dual of that general categorical concept is product projection. Hence one can reasonably say that the dual concept of injection is that of product projection
where and are sets.
Which maps of sets are product projections? It’s not hard to show that they’re exactly the functions whose fibres are all isomorphic:
for all . You could reasonably call these “uniform” maps, or “even coverings”, or maybe there’s some other good name, but in this post I’ll just call them projections (with the slightly guilty feeling that this is already an overworked term).
Projections are always surjections, except in the trivial case where the fibres are all empty, which means that our map is of the form . On the other hand, most surjections aren’t projections. A surjection is a function whose fibres are nonempty, but there’s no guarantee that all the fibres will be isomorphic, and usually they’re not.
A projection appears in a little puzzle I heard somewhere. Suppose someone hands you a tangle of string, a great knotted mass with who knows how many bits of string all jumbled together. How do you count the number of pieces of string?
The slow way is to untangle everything, separate the strands, then count them. But the fast way is to simply count the ends of the pieces of string, then divide by two. The point is that there’s a projection — specifically, a two-to-one map — from the set of ends to the set of pieces of string.
String theory aside, does this alternative viewpoint on the dual concept of injection have any importance? I think it does, at least a little. Let me give two illustrations.
Factorization, graphs and cographs
It’s a standard fact that any function between sets can be factorized as a surjection followed by an injection, and the same is true in many other familiar categories. But here are two other methods of factorization, dual to one another, that also work in many familiar categories. One involves injections, and the other projections.
In any category with finite coproducts, any map factors as
where the first map is the coproduct coprojection. This is a canonical factorization of as a coproduct coprojection followed by a (canonically) split epic. In , it’s a canonical factorization of a function as an injection followed by a surjection (or “split surjection”, if you don’t want to assume the axiom of choice).
Unlike the usual factorization involving a surjection followed by an injection, this one isn’t unique: there are many ways to factor as an injection followed a surjection. But it is canonical.
In any category with finite products, any map factors as
where the second map is the product projection. This is a canonical factorization of as a split monic followed by a projection. In , “split monic” just means a function with a retraction, or concretely, an injection with the property that if the domain is empty then so is the codomain.
(I understand that in some circles, this or a similar statement is called the “fundamental theorem of reversible computing”. This seems like quite a grand name, but I don’t know the context.)
Again, even in , this factorization is not unique: most functions can be factored as a split monic followed by a projection in multiple ways. But again, it is canonical.
These factorizations have a role in basic set theory. Let’s consider the second one first.
Take a function . The resulting function
is injective, which means it represents a subset of , called the graph of . A subset of is also called a relation between and ; so the graph of is a relation between and .
The second factorization shows that can be recovered from its graph, by composing with the projection . Thus, the set of functions from to embeds into the set of relations between and . Which relations between and correspond to functions? The answer is well-known: it’s the set of relations that are “functional”, meaning that each element of is related to exactly one element of .
This correspondence between functions and their graphs is very important for many reasons, which I won’t go into here. But it has a much less well known dual, which involves the first factorization.
Here I have to take a bit of a run-up. The injections into a set , taken up to isomorphism over , correspond to the subsets of . Dually, the surjections out of , taken up to isomorphism under , correspond to the equivalence relations on . (This is more or less the first isomorphism theorem for sets.) And just as we define a relation between sets and to be a subset of , it’s good to define a corelation between and to be an equivalence relation on .
Now, given a function , the resulting function
is surjective, and so represents an equivalence relation on . This equivalence relation on is called the cograph of , and is a corelation between and .
The first of the two factorizations above shows that can be recovered from its cograph, by composing with the injection . Thus, the set of functions from to embeds into the set of corelations between and . Which corelations between and correspond to functions? This isn’t so well known, but — recalling that a corelation between and is an equivalence relation on — you can show that it’s the corelations with the property that every equivalence class contains exactly one element of .
I’ve digressed enough already, but I can’t resist adding that the dual graph/cograph approaches correspond to the two standard types of picture that we draw when talking about functions: graphs on the left, and cographs on the right.
For example, cographs are discussed in Lawvere and Rosebrugh’s book Sets for Mathematics.
Back to the injection-projection duality! I said I’d give two illustrations of the role it plays. That was the first one: the canonical factorization of a map as an injection followed by a split epic or a split monic followed by a projection. Here’s the second.
Free and cofree presheaves
Let be a small category. If you’re given a set for each object of then this does not, by itself, constitute a functor . A functor has to be defined on maps too. But does generate a functor . In fact, it generates two of them, in two dual universal ways.
More exactly, we’re starting with a family of sets, which is in object of the category . There’s a forgetful functor
and the general lore of Kan extensions tells us that it has both a left adjoint and a right adjoint . Better still, it provides explicit formulas: the functors are given by
(where means coproduct or disjoint union), and
I’ll call the free functor on , and the cofree functor on .
Example Let be a group, seen as a one-object category. Then we’re looking at the forgetful functor from -sets to sets, which has both adjoints.
The left adjoint sends a set to with the obvious -action, which is indeed usually called the free -set on .
The right adjoint sends a set to the set with its canonical action: acting on a family by an element produces the family . This is a cofree -set.
Cofree group actions are important in some parts of the theory of dynamical systems, where is often the additive group . A -set is a set equipped with an automorphism. The cofree -set on a set is the set of double sequences of elements of the “alphabet” , where the automorphism shifts a sequence along by one. This is called the full shift on , and it’s a fundamental object in symbolic dynamics.
What’s this got to do with the injection-projection duality? The next example gives a strong clue.
Example Let be the category consisting of a single nontrivial map. Then an object of is a pair of sets, and an object of is a function between a pair of sets.
The free functor on is the injection
The cofree functor on is the projection
More generally, it’s a pleasant exercise to prove:
Any free functor preserves monics. In other words, if is a monic in then is an injection.
Any cofree functor sends epics to projections. In other words, if is an epic in then is a projection.
These necessary conditions for being a free or cofree functor aren’t sufficient. (If you want a counterexample, think about group actions.) But they give you some feel for what free and cofree functors are like.
For instance, if is the free category on a directed graph, then every map in is both monic and epic. So when is free, the functions are all injections, for every map in . When is cofree, they’re all projections. This imposes a severe restriction on which functors can be free or cofree.
(Question: do quiver representation people ever look at cofree representations? Here we’d replace by .)
In another post, I’ll explain why I’ve been thinking about this.
Re: The Dual Concept of Injection
Of course, a constructive mathematician might dispute your claim that every injection of sets is a coproduct inclusion. (-:
However, complemented injections (= coproduct inclusions) do still play an important role in constructive mathematics. One reason for that is your first factorization: they form a weak factorization system with the split surjections. For instance, this is relevant for the constructive model structure on simplicial sets.
Another possible name for product projections is “trivial bundles”.