Universal property of the disjoint union

Written by Patrick Stevens, et al. last updated

Summaries

Where could we start if we were looking for a nice "easy" universal property describing the union of sets?

The first thing to notice is that universal properties only identify objects up to isomorphism, but there's a sense in which the union is not well-defined up to isomorphism: it is possible to find sets and , and sets and , with isomorphic to and isomorphic to , but where is not isomorphic to . [1]

The union is not well-defined up to isomorphism in this sense

Consider and . Then the union is equal to .

On the other hand, consider and . Then the union .

So by replacing with the isomorphic , and with the isomorphic , we have obtained which is not isomorphic to .

So it's not obvious whether the union could even in principle be defined by a universal property.[2]

But we can make our job easier by taking the next best thing: the disjoint union , which is well-defined up to isomorphism in the above sense: the definition of is constructed so that even if and overlap, the intersection still doesn't get treated any differently.

Before reading this, you should make sure you grasp the disjoint union of sets well enough to know the difference between the two sets and .

Brief recap of the definition

Given sets and , we define their disjoint union to be , where and . That is, "tag each element of with the label , and tag each element of with the label ; then take the union of the tagged sets".

The important fact about the disjoint union here is that if and , then . This is the fact that makes the disjoint union a fairly accessible idea to bring under the umbrella of category theory, and it also means we are justified in using a convention that simplifies a lot of the notation: we will assume from now on that and are disjoint. (Since we only care about them up to isomorphism, this is fine to do: we can replace and with some disjoint pair of sets of the same size if necessary, to ensure that they are disjoint.)

Universal property of disjoint union

How can we look at the disjoint union solely in terms of the maps to and from it? First of all, how can we look at the disjoint union at all in terms of those maps?

There are certainly two maps and : namely, the inclusions and . But that's not enough to pin down the disjoint union precisely, because those maps exist not just to but also to any superset of . [3] So we need to find some way to limit ourselves to .

The key limiting fact about the disjoint union is that any map from the disjoint union can be expressed in terms of two other maps (one from and one from ), and vice versa. The following discussion shows us how.

  • If we know , then we know the restriction maps [4] and .
  • If we know two maps and , then we can uniquely construct a map which is " and glued together". Formally, the map is defined as if , and if .

The reason this pins down the disjoint union exactly (up to isomorphism) is because the disjoint union is the only set which leaves us with no choice about how we construct from and :

  • We rule out strict subsets of because we use the fact that every element of is in and every element of is in , to ensure that the restriction maps make sense.
  • We rule out strict supersets of because we use the fact that any element in is either in or it is in [5], to ensure that is defined everywhere on its domain. Moreover, we use the fact that every element of is in exactly one of or , because if is in both and , then we can't generally decide whether we should define by or .

The property

One who is well-versed in category theory and universal properties would be able to take the above discussion and condense it into the following statement, which is the universal property of the disjoint union:

Given sets and , we define the disjoint union to be the following collection of three objects: with the requirement that for every set and every pair of maps and , there is a unique map such that and .

Disjoint union universal property

Aside: relation to the product

Recall the universal property of the product:

Given objects and , we define the product to be the following collection of three objects, if it exists: with the requirement that for every object and every pair of maps , there is a unique map such that and .

Notice that this is just the same as the universal property of the disjoint union, but we have reversed the domain and codomain of every function, and we have correspondingly reversed any function compositions. This shows us that the product and the disjoint union are, in some sense, "two sides of the same coin". If you remember the universal property of the empty set, we saw that the empty set's universal property also had a "flip side", and this flipped property characterises the one-element sets. So in the same sense, the empty set and the one-point sets are "two sides of the same coin". This is an instance of the concept of duality, and it turns up all over the place.

Examples

{1} {2}

Let's think about the very first example that came from the top of the page: the disjoint union of and . (This is, of course, , but we'll try and tie the universal property point of view in with the elements point of view.)

The definition becomes:

The disjoint union of and is the following collection of three objects: with the requirement that for every set and every pair of maps and , there is a unique map such that and .

This is still long and complicated, but remember from when we discussed the product that a map is precisely picking out a single element of : namely . To every element of , there is exactly one such map; and for every map , there is exactly one element of it picks out. (Of course, the same reasoning goes through with as well: is just picking out an element of , too.)

Also, and are just picking out single elements of , though we are currently pretending that we don't know what is yet.

So we can rewrite this talk of maps in terms of elements, to make it easier for us to understand this definition in the specific case that and have just one element each:

The disjoint union of and is the following collection of three objects: with the requirement that for every set and every pair of elements and , there is a unique map such that and .

From this, we can see that and can't be the same, because acts differently on them (if we take where , for instance). But also if there were any in other than and , then for any attempt at our unique , we would be able to make a different by just changing where is sent to.

So is precisely the set ; and this has determined it up to isomorphism as "the set with two elements".

Aside: cardinality

Notice that the disjoint union of "the set with one element" and "the set with one element" yields "the set with two elements". It's actually true for general finite sets that the disjoint union of "the set with elements" with "the set with elements" yields "the set with elements"; a few minutes' thought should be enough to convince you of this, but it is an excellent exercise for you to do this from the category-theoretic universal properties viewpoint as well as from the (much easier) elements viewpoint. We will touch on this connection between "disjoint union" and "addition" a bit more later.

The empty set

What is the disjoint union of the empty set with itself? (Of course, it's just the empty set, but let's pretend we don't know that.) The advantage of this example is that we already know a lot about the universal property of the empty set, so it's a good testing ground to see if we can do this without thinking about elements at all.

Recall that the empty set is defined as follows:

The empty set is the unique set such that for every set , there is precisely one function .

The disjoint union of with itself would be defined as follows (where I've stuck to using and in certain places, because otherwise the whole thing just fills up with the symbol):

The following collection of three objects: with the requirement that for every set and every pair of maps and , there is a unique map such that and .

Now, since we know that for every set there is a unique map [6], we can replace our talk of and by just the same :

The following collection of three objects: with the requirement that for every set , there is a unique map such that and .

Moreover, we know that and are also uniquely defined, because there is only one map (no matter what might end up being); so we can remove them from the definition because they're forced to exist anyway. They're both just .

The set with the requirement that for every set , there is a unique map such that .

A diagram is in order.

Universal property of the disjoint union of the empty set with itself

The universal property is precisely saying that for every set , there is a unique map such that is the map .

But since is the only map from , we have whatever is. Indeed, is a map from , and is the only such map. So we can drop that condition from the requirements, because it automatically holds!

Therefore the disjoint union is:

The set with the requirement that for every set , there is a unique map .

Do you recognise that definition? It's just the universal property of the empty set!

So is the empty set in this example.

More general concept

We saw earlier that the disjoint union is characterised by the "reverse" (or "dual") of the universal property of the product. In a more general category, we say that something which satisfies this property is a coproduct. [7]

In general, the coproduct of objects and is written not as (which is specific to the category of sets), but as . Among other things, the coproduct unifies the ideas of addition of integers, least upper bounds in posets, disjoint union of sets, least common multiple of naturals, direct sum of vector spaces, and free_product of groups; all of these are coproducts in their respective categories.

  1. ^︎

    In this case, when we're talking about sets, an isomorphism is just a bijection.

  2. ^︎

    Actually it is possible.

  3. ^︎

    If this is not obvious, stop and think for a couple of minutes about the case , , , and the superset of .

  4. ^︎

    This is defined by ; that is, it is the function we obtain by "restricting" so that its domain is rather than the larger .

  5. ^︎

    If we replaced by any strict superset, this stops being true: by passing to a superset, we introduce an element which is neither in nor in .

  6. ^︎

    In general, the exclamation mark is used for a uniquely-defined map.

  7. ^︎

    Prepending "co" to something means "reverse the maps".

1.
^︎

In this case, when we're talking about sets, an isomorphism is just a bijection.

2.
3.
^︎

If this is not obvious, stop and think for a couple of minutes about the case , , , and the superset of .

4.
^︎

This is defined by ; that is, it is the function we obtain by "restricting" so that its domain is rather than the larger .

5.
^︎

If we replaced by any strict superset, this stops being true: by passing to a superset, we introduce an element which is neither in nor in .

6.
^︎

In general, the exclamation mark is used for a uniquely-defined map.

7.
^︎

Prepending "co" to something means "reverse the maps".