We're looking for an arrow $\tau : T \to T+\bot$ and some object T, s.t. for any other
$X\to X+\bot$, there is a unique $h$ making the diagram
$$\require{AMScd}
\begin{CD}
T @>{\tau}>> T+\bot\\
@A{\exists!\,h}AA @AA{h+\bot}A \\
X @>>> X+\bot
\end{CD}$$
commutative.
The way I found the most natural is to probe this commutativity statement with various choices of
$X\to X+\bot$ and try to deduce as much as possible from the existence and uniqueness of $h$.
Probing with $X=1$
The simplest one could go is to put $X=1$ ($1$ a singleton set) and probe with the two possible
$1\to 1 + \bot$ arrows: $\textrm{id}$ and the constant $\bot$. Even this early on we start getting some
insights about $T$:
- For $\textrm{id}:1\mapsto 1$, the existence of $h:1\to T$ tells us that $T$ contains some $h(1)$, and the commutativity statement is $\tau(h(1))=h(\textrm{id}(1))=h(1)$.
That is, we know there's an element of $T$ on which $\tau$ is constant! Uniqueness of $h$ means
no other element of $T$ is stable under $\tau$.
- For $\bot:1\mapsto \bot$, the story is analogous and we get a unique element in $T$ on which
$\tau$ is undefined (commutativity here is $\tau(h(1))=(h+\bot)(\bot(1))=\bot$).
Both of these points we found -- the undefined and the fixed point -- are quite
important and their existence and uniqueness will be exploited in the next paragraph in 1. and 2.
Probing with finite $X$
Now that we're done with $1$, it is most natural to put $X=2,3,\ldots$ and see where that goes.
Fix a finite non-empty $X$. A priori it is hard to pick a particular $X\to X+\bot$, so let
us focus on the $\bot$ part first.
- We already discovered there is a unique point
in $T$ at which $\tau$ is undefined, so by commutativity, all inputs at which our
$X\to X+\bot$ is undefined will be sent there (by $h$). This simple observation is
quite useful, because it restricts the $X\to X+\bot$ arrows with which it makes
sense to probe $\tau$ to only those that are undefined at at most one point of $X$.
An $X\to X+\bot$ undefined at multiple points will reveal no further information
about $T$ and $\tau$ than the same one with all points of undefinedness identified
as a single one.
- Now that our arrow shall be undefined at at most one point, can it be undefined
at none? That is, do we need to probe with arrows of the form $X\to X$? We already discovered a
fixpoint of $\tau$, so any choice of $X\to X+\bot$ can be smashed into it. This
uniquely determines a $h:X\to T$ (a constant one). We know such a $h$ is unique,
so this is the $h$ from our $X\to X+\bot$ to $T\to T+\bot$. That is, the existence
of $h$ will not reveal anything further about $T$ if we probe with $X\to X$.
- The reasoning in 2. can be strenghtened a bit more: $f$ can be assumed free of invariant subsets
$Y\subseteq X$ (s.t. $f(Y)=Y$, read as equality of sets), because $h$ will send all of $Y$
to the fixoint of $\tau$ and will not point (as an arrow :P) us to any new
elements of $T$, which are what we're after!
Therefore it only makes sense to choose an $X\to X+\bot$ that is undefined at exactly one point of
$X$.
Let us label the elements of $X=\{0,\ldots,n\}$ of our finite $X$ and put $f(0)=\bot$ (we want the
same construction to work for all sizes of $X$, so it makes sense to choose for $f^{-1}(\bot)$
a label that won't change when resizing $X$).
It remains to define $f$ on $\{1\ldots n\}$ with outputs in $\{0 \ldots n\}$.
One output label will be left unused.
If we let that be $0$, $f$ will get an invariant set $\{1\ldots n\}$, so we won't choose it.
Call the unused output label $n$.
Now $f(n)$ can take either $0$ or another unused label. If we choose $f(n)=0$,
the rest ($X\setminus\{0,n\}$) will become invariant, so we choose another one
$f(n) = n-1$. Likewise, the only fruitful choice for $f$ requires $f(i)=i-1$ for all $i$, all up to
$f(1)=0$ (which justifies the label $n$ and the (-1) notation - $f^{n}(\textrm{unused output label})=0$).
Thus we have defined $f=(-1):X\to X+\bot$ and it is time we reap what the corresponding unique $h$
gives us. We get
- some elements $h_0,\ldots,h_n\in T$;
- of these $h_0$ is the undefined point (preimage of $\bot$) for $\tau$ we discovered earlier;
- $\tau(h_{i+1})=h_i$ for all $i=0\ldots n$
We hope the $h_i$ are all distinct, and $(k+1)$-fold
application on the equality $h_k=h_l$ (for $k\le l\le n$) shows this is indeed the case.
Varying $X$, we get arbitrarily long sequences $h_0,h_1,\ldots,h_n,\ldots\in T$, where $\tau(h_0)=\bot$ and
$\tau(h_{i+1})=h_i$. Uniqueness of $h$ means that for each $i$, $h_i\in T$ is uniquely
determined regardless of $f$, which justifies dropping the $h$ label and writing just
$0,1,2,\ldots,n,\ldots\in T$, rendering $\tau=(-1)$ on these. Is now also sensible
that the fixpoint of $\tau$ is called $\infty$ and denote the discovered subset of $T$ as
$\bar{\mathbb N}$.
Minimality
It is not yet clear if $T$ coincides with $\bar{\mathbb N}$ completely. An element $a\in T$
is either a fixpoint, sent to $\bot$, or something else. The first two cases were uniquely
determined to be $\infty$ and $0$. In the third case we get a set $2=\{a, \tau(a)\}$.
Taking the arrow $X\to X+\bot$ as $$\tau(a)\mapsto a\mapsto\bot,$$
we get a unique $h:X\to T$ which forces $2=\{a, \tau(a)\}$ to coincide with the subset $\{0,1\}\subseteq\bar{\mathbb N}$.
Moral
After playing quite some time with this exercise, I can outline some interesting takeaways (may be
obvious to category people, but I hope useful for newbies).
Namely, the particular instance of $\mathbb N \cup \{\infty\}$ is remarkably unremarkable. What I
mean is nothing new, just that $T$ is unique up to isomorphism, but I think it's worth a second
thought. I always thought of $\bar{\mathbb N}$ as just the naturals with an attached external element
interpreted as $\infty$, but the important bits here are in the structure of $\bar{\mathbb N}$,
captured by the $\tau$ arrow. Even that $\tau=(-1)$ is unimportant. The only important features are
the unique fixpoint, the unique pre-immage of $\bot$, and the lack of invariant subsets of $T$ other than $\{\infty\}$.
In fact, we could even relabel $\infty$ as $0$, use $1$ for $0$ and left-shift the roles of the $1,2,\ldots$.
Then $\tau(0)=0,\tau(1)=\bot,\tau(1+n)=n$ defines the same structure without ever mentioning
infinities, burying $\infty$ behind 0. So the category information is in the way $\tau$ works on (rearranges) a countable
set; the rest is just common labels we put to comunicate and think more easily. I suspect this is
quite obvious to the more experienced, but I still wanted to share it out.