# What does 'unique up to isomorphism' really mean?

*Many thanks to Jens Seeber for comments and corrections!*

Phrases like “*Terminal objects are unique up to isomorphism*” are everywhere
in category theory.
In this post, I’ll explain the concept of “uniqueness up to isomorphism”, and
its best buddy, “uniqueness up to *unique* isomorphism”.

I’ll also talk about the philosophy behind these concepts, and how they allow
category theorists to define objects in terms of their **relationship to other
objects** rather than by some internal properties. In other words, how can we
avoid asking “what *is* this object?”, but instead ask “how does this object
*behave*?”.

I will assume only a minimal background in category theory, but you should at least know what a category is, and what is meant by “objects” and “morphisms”.

We’ll begin with some intuition for how isomorphism
mathematically means “same shape”.
Next, we’ll make that intuition precise, before examining the
example of terminal objects, which are both unique up to
isomorphism, and up to *unique* isomorphism.

Finally, I’ll talk briefly about how Universal Properties are related.

## 1 Intuition

What made the concept click for me was when someone explained the meaning of
the sentence “*terminal objects are unique up to isomorphism*”. They said:

A category might contain multiple terminal objects, but if it does, then there must exist an isomorphism between those objects.

Take the category of sets for example, where “the” terminal object is the singleton set. Just believe me for now; we’ll prove it later. Clearly there are many singleton sets - \(\{foo\}\), \(\{\pi\}\) and \(\{💅\}\) to name a few - but we talk about “the” terminal object of a category - why?

### 1.1 Isomorphic means “same shape” - literally and formally

The reason is that all singleton sets are isomorphic in the category of sets,
and the existence of an isomorphism between two objects literally and formally
means they have the **same shape**, in the sense that they have the
**same relationship to other objects**.

Mathematically, we capture this idea by talking about the **morphisms** of an
object.
In particular, the **existence of an isomorphism** between two objects \(A\) and
\(B\) implies that there is a **bijection between their morphisms**.
That is, if objects \(A\) and \(B\) are isomorphic, and \(A\) has a
morphism \(f : A \to C\), then \(B\) must have a “twin” morphism \(f' : B \to C\).

We’ll state this formally and prove it in the
next section, but the intuition you should have is that when two objects \(A\)
and \(B\) are **isomorphic** they have the **same relationship** with other
objects in the category.
This is the sense in which they **behave the same way**.

### 1.2 “*Unique up to isomorphism*” is with respect to a property

Before we get formal, I want to clarify something that really tripped me up.

When we say “*unique up to isomorphism*”, we mean crucially **with respect to
some property**.
What kind of property?
Well for example, the property of “being a terminal object”.

I’m going to repeat this using a definition from stackoverflow,

Unique up to isomorphism means that all the objects

satisfying a given definitionare isomorphic

Emphasis mine. Again, examples of “a given definition” might be the definition of “terminal object”, or the definition of “initial object”.

## 2 Isomorphisms

Let’s make our intuition precise. First, we’ll define isomorphisms, and then we’ll see that this implies that isomorphic objects have the same relationship with other objects.

### 2.1 Definition: Isomorphism

An isomorphism is defined as a morphism with an inverse. That is, if you compose an isomorphism \(\alpha : A \to B\) with its inverse \(\alpha^{-1} : B \to A\), they cancel each other out and become the identity morphism \(id_A\).

Graphically^{1}, we can follow the arrow \(\alpha\) from \(A\) to \(B\), then follow the
inverse \(\alpha^{-1}\) back, and it’s the same as just following the identity
morphism \(id_A\).

The reverse is also true - we can follow \(\alpha^{-1}\), then \(\alpha\), and it’s the same as just following \(id_B\).

Formally, if \(\alpha : A \to B\) is an isomorphism
then it has an inverse \(\alpha^{-1}\) such that
\(\alpha^{-1} \circ \alpha = id_A\), and also \(\alpha \circ \alpha^{-1} = id_B\).
We also say that \(A\) and \(B\) are *isomorphic*, and write \(A \cong B\).

Note that there can be more than one isomorphism, so \(A\) and \(B\) can be isomorphic in more than one way! We will come back to this when we talk about universal properties.

### 2.2 Isomorphic means “same shape”

So what do isomorphisms have to do with how objects relate to each other?

Precisely, if \(A \cong B\), then given an arbitrary object \(Y\), there is a bijection mapping “outgoing” morphisms \(f : A \to Y\) to outgoing morphisms \(f' : B \to Y\).

This also works for “incoming” morphisms- given an arbitrary object \(X\), there is a bijection from morphisms \(g : X \to A\) to morphisms \(g' : X \to B\).

Graphically:

We’ll focus on proving this correspondence for the lower half of the diagram- i.e., that the bijection exists for the “output” morphisms. The proof for the “input” morphisms is almost identical, so I’ll omit it.

Without further ado, let’s formally state and prove this proposition.

#### 2.2.1 Proposition: There is a bijection between sets of morphisms of isomorphic objects

Suppose \(A \cong B\) with isomorphism \(\alpha\). Then for all objects \(Y\), there is a function \(\phi : \mathscr{C}(A,Y) \to \mathscr{C}(B,Y)\). Furthermore, \(\phi\) is a bijection, and therefore has an inverse, \(\phi^{-1}\).

The notation^{2} \(\mathscr{C}(A,Y)\) means the set of morphisms from \(A\) to \(Y\), and
is indeed a set^{3}.
Therefore \(\phi\) is a function and takes a morphism \(A \to Y\) as input, and
produces a morphism \(B \to Y\) as an output.

Now let’s prove the proposition.

#### 2.2.2 Proof of Proposition 2.2.1

First we need to construct \(\phi\) and its inverse, \(\phi^{-1}\). Then, we’ll show that \(\phi^{-1} \circ \phi\) is the identity function, i.e. that \(\phi^{-1}\) is indeed the inverse of \(\phi\). Showing the existence of an inverse is the same as showing \(\phi\) is bijective, so once we’ve done this, we’ll be finished!

Let’s start by constructing \(\phi\). Our job is to take a morphism \(f : A \to Y\) and turn it into a morphism \(f' : B \to Y\). Thinking graphically, we need a way to start at \(B\), and eventually follow \(f\) to reach \(Y\).

The obvious choice is to just use \(\alpha^{-1}\), and indeed that is what we do:

\[ \phi : \mathscr{C}(A,Y) \to \mathscr{C}(B, Y) \] \[ \phi(f) = f \circ \alpha^{-1} \]

Similarly, the inverse function does the same thing, but starting from \(A\):

\[ \phi^{-1} : \mathscr{C}(B,Y) \to \mathscr{C}(A, Y) \] \[ \phi^{-1}(f') = f' \circ \alpha \]

So we’ve constructed \(\phi\), now we have to prove that it has an inverse. Equivalently, we show that \(\phi^{-1} \circ \phi : \mathscr{C}(A,Y) \to \mathscr{C}(A,Y)\) is the identity function:

\[ \begin{align} (\phi^{-1} \circ \phi) (f) &= \phi^{-1} ( \phi (f) ) \\ &= \phi^{-1} ( f \circ \alpha^{-1} ) \\ &= f \circ \alpha^{-1} \circ \alpha \\ &= f \circ id_B \\ &= f \end{align} \]

Here we simply apply the definitions of \(\phi\) and \(\phi^{-1}\), and then rely on the fact that \(\alpha^{-1} \circ \alpha = id_B\) by the definition of isomorphism.

Strictly speaking we should also show that \(\phi \circ \phi^{-1}\) is also the identity function, but the proof is almost identical so we’ll omit it.

So we have shown that there is a bijection between sets of morphisms of isomorphic objects,
and therefore they are **formally of the same shape** \(\blacksquare\).

### 2.3 Recap

I’ll pause now and recap what we’ve covered so far.

We’ve defined what an isomorphism is, and shown how its existence means that
two objects are **formally of the same shape**, by which we mean there is a bijection
between their morphisms.

In the next section, we’ll look at the example of **terminal objects**.
Objects satisfying this definition are unique up to isomorphism, which we will
prove after going through an example in the category of sets.

## 3 Terminal Objects

We’ll first examine the category of sets, and discover that there is a unique function mapping any set to the singleton set. We’ll see how that also implies all singleton sets are isomorphic.

Next, we’ll see how these properties are a consequence of the singleton set being the terminal object of \(\textbf{Set}\). In particular, we’ll define terminal objects, and show that \(\textbf{Set}\) has them.

Finally, we’ll show that terminal objects are
unique up to isomorphism
in **any** category, and in fact
unique up to *unique* isomorphism.

### 3.1 The Category of Sets

The category of sets is called \(\textbf{Set}\). Its objects are sets, and its morphisms are functions.

By way of example, here is a diagram of a tiny fragment of \(\textbf{Set}\). Obviously not all objects and morphisms are pictured, because there are an infinite number of sets and functions!

This diagram shows some of the objects and morphisms of \(\textbf{Set}\). For example, the morphism \(f : \mathbb{N} \to \{0,1,4,9,..\}\) maps natural numbers to their squares.

Also shown are two suggestively-named morphisms \(\alpha\) and \(\alpha^{-1}\), which denote an isomorphism. We’ll come back to these shortly!

Finally, notice that all the functions whose codomain is a singleton set have the same form. In particular, they all look like \(f(x) = t\), where \(t\) is the single element of the codomain set.

### 3.2 Unique function from any set to the singleton set

The functions/morphisms to singleton sets in the diagram above all look “the
same” because there is *only one possible function* with a given domain whose
codomain is the singleton set.

To convince you, think of a function from some set \(A\) to \(\{\bullet\}\) as the set of input/output pairs:

input | output |
---|---|

\(a_0\) | \(\bullet\) |

\(a_1\) | \(\bullet\) |

\(a_2\) | \(\bullet\) |

\(\vdots\) | \(\vdots\) |

Clearly there is only one choice of output for each input, and so there is only one possible function- it’s like we’re just tagging each element of \(A\) with \(\bullet\).

There’s also a special case of this unique function: when both domain and codomain of the function are singleton sets.

For example, the unique function between \(\{pi\}\) and \(\{\bullet\}\) is the function \(\alpha = \pi \mapsto \bullet\).

In this case, the function is also a *bijection*, and its inverse is obviously
\(\alpha^{-1} = \bullet \mapsto \pi\).

### 3.3 All singleton sets are isomorphic

Recall that in \(\textbf{Set}\), morphisms are functions.
Isomorphisms, then, are functions with an inverse, which means that in
\(\textbf{Set}\), isomorphisms are **bijective functions**.

We just found bijection between \(\{\bullet\}\) and \(\{\pi\}\), and so we’ve shown that those two objects (sets) are isomorphic.

This isomorphism is clearly a consequence of the property of singleton sets that there is a unique function from every set, but the isomorphism itself is quite boring: it merely amounts to a renaming of the singleton set’s only element.

The idea of isomorphism is that of a “weaker equality”, where we can ignore this tedious renaming of elements, and instead look at objects in terms of their relationships to other objects.

That is really the idea behind “unique up to isomorphism”- ignoring irrelevant
internal details, and instead **focusing on relationships**.

The particular property we saw here - that each singleton set has a unique function mapping to it - is generalised by the definition of “terminal object”, which we’ll look at next.

### 3.4 Definition: Terminal Objects

Given a category \(\mathscr{C}\),
we say an object \(T\) is **terminal**^{4} if, for all objects
\(A \in ob(\mathscr{C})\),
there exists a unique morphism
\(!_A : A \to T_{}\)
(pronounced “bang A”).

We usually draw this as the following diagram, where the dotted line denotes a unique morphism.

Note that this implies that \(!_T {}_{} = id_T\), by uniqueness. By the definition of terminal object, there can be only one morphism \(T \to T\), and by the definition of a category, there must be an identity morphism of that type, so they are equal.

Now let’s show that \(\textbf{Set}\) has terminal objects.

### 3.5 Terminal objects in \(\textbf{Set}\)

To show that \(\textbf{Set}\) has terminal objects, we must show there is a set \(T\) with a unique function \(!_A {}_{} : A \to T\) for every set \(A\).

Of course, we’ve already done this: \(T\) is any singleton set, and the unique morphism \(!_A {}_{}\) is the function \(f(a) = t\) where \(t\) denotes the single element of \(T\).

So therefore, \(\textbf{Set}\) has terminal objects. \(\blacksquare\).

### 3.6 Terminal objects are unique up to isomorphism

Now we’ll step up a level of generality.
Earlier, we proved that singleton sets are all isomorphic.
Now we’ll prove that terminal objects in **any** category are unique up to
isomorphism: a much more general result.

The proof goes as follows:

Suppose we have two arbitary terminal objects, \(T\) and \(T'\). Then by the definition of terminal object, there must exist unique morphisms \(!_{T'} {}_{} : T' \to T\) and \(!'_T {}_{} : T \to T'\).

Proving \(T \cong T'\) means constructing an isomorphism. Taking \(!_{T'}\) and \(!'_T\) as the isomorphism and its inverse, we must show both that \(!_{T'} \circ !'_T = id_T\), and that \(!'_T \circ !_{T'} = id_{T'} {}_{}\)

This is fairly straightforward, and we use the same reasoning as before. Because \(!_{T'} \circ !'_T\) goes from \(T \to T\), it must equal \(id_T\) by uniqueness- there must be exactly one function of this type by the definitions of terminal object and category.

The same reasoning applies to the second case, so \(T\) and \(T'\) are isomorphic. Because \(T\) and \(T'\) were arbitrary, we have shown that any two terminal objects are isomorphic, and we are done. \(\blacksquare\).

### 3.7 Terminal Objects are unique up to *unique* isomorphism

Not only this, but the isomorphism \(!_{T'} {}_{}\) is unique (again, by the
definition of terminal object).
Therefore, terminal objects are also *unique up to unique isomorphism*!

This is because the property of “terminality” is a **universal property**.

## 4 Universal Properties

One of the triumphs of category theory is its ability to **define objects by
their relationships**, rather than their internal properties.
For example, the definition of terminal object allows us to define the
singleton set without even mentioning elements!

This idea is captured by the notion of *Universal Properties*, of which the
definition of “terminal object” is an example.

While universal properties can be defined and studied formally in category
theory, we’ll only talk informally about them here;
in particular, to say that if a property is universal, one consequence is that
the objects it defines are *unique up to unique isomorphism*.

While “uniqueness up to isomorphism” says that objects satisfying a given definition
are isomorphic, they may be isomorphic in **more than one way**.

In contrast, *uniqueness up to unique isomorphism* means that any two objects
satisfying the definition have a *unique* isomorphism between them, and are
therefore isomorphic in **exactly one way**.

This captures more closely the idea of objects being **indistinguishable by
their relationships**, so we can view objects satisfying a universal property
as “*equal, if we ignore irrelevant and boring details*”.

## 5 Summary

I’ll finish by summarising what we’ve covered:

- “unique up to isomorphism” is
**with respect to some property**, e.g. “terminal objects are unique up to isomorphism” - Category theory talks about objects
**in terms of their relationship to other objects**, not by the internal properties of objects. **unique up to (unique) isomorphism**gives us a way to talk formally about how a certain property makes a collection of objects**indistinguishable in terms of their relationship to other objects.**

So to wrap it up with an example, when we say “terminal objects are unique up to isomorphism”, what we mean is:

- There might be multiple terminal objects, but…
- … if there are, they have an isomorphism, and that means …
- … all those terminal objects have the exact same relationship to all other objects, and so …
- … they are interchangeable, or in a sense “indistinguishable”

Cheers!

If you haven’t seen this kind of diagram before, the nodes are objects and the arrows morphisms. A path around the graph corresponds to a composition of morphisms.↩︎

The letter \(\mathscr{C}\) is a calligraphic \(C\) - \(C\) for “Category”. You can type it in latex as

`\mathscr{C}`

.↩︎In general, the collection of morphisms between two objects \(A\) and \(B\) is not required to be a set. In fact, by requiring this, we are restricting ourselves to working with locally small categories, but I hope this restriction makes this blog post more clear!↩︎

Usually authors will denote terminal objects as \(1\), but we’ll use \(T\) to avoid confusion.↩︎