TITLE: Where can I learn more about the "else" operation / "else monoid"?
QUESTION [7 upvotes]: (The set of natural numbers $\mathbb{N}$ starts at $0$ for me.)
Let $X$ denote a set, and define $X_\bot = X \uplus \{\bot\}.$ Let $\mathbf{else}$ denote the binary operation on $X_\bot$ defined as follows.

If $x \in X$, then $x \mathop{\mathbf{else}} y = x$.
If $x = \bot$, then $x \mathop{\mathbf{else}} y = y$.

It follows that $\mathbf{else}$ is a (usually non-commutative) associative operation with identity $\bot$. Hence, $\mathbf{else}$ makes $X_\bot$ into a monoid, that could reasonably be called the "else-monoid over $X$."

Question. Where can I learn more about the operation $\mathbf{else}$ and/or the "else-monoid"?

Here's some stuff we can do with it. If $f,g : X \rightarrow Y$ are partial functions that agree on their intersection, then there is a corresponding partial function $f \cup g : X \rightarrow Y$ by asserting that $(f \cup g)(x) = f(x)$ whenever $f(x)$ is well-defined, and that $(f \cup g)(x) = g(x)$ whenever $g(x)$ is well-defined. However, $f$ and $g$ may not agree on their intersection! Not to worry, $\mathbf{else}$ comes to the rescue. Recall that partial functions are the "same as" basepoint preserving homomorphisms. Hence it makes sense to define that $(f \mathbin{\mathbf{else}} g)(x) = f(x) \mathbin{\mathbf{else}} g(x),$ where we imagine that $f$ and $g$ return $\bot$ at points in their domain where they fail to be defined. Hence $f \mathbin{\mathbf{else}} g$ agrees with $f \cup g$ whenever the latter is well-defined; however, the advantage of the former is that it is always defined.
Here's an extremely simple application. If $a : \mathbb{N} \rightarrow \mathbb{R}$ is a sequence of real numbers, then we may wish to define the shift of $a$ as the sequence $\mathrm{Sh}(a) : \mathbb{N} \rightarrow \mathbb{R}$ defined as follows.

$\mathrm{Sh}(a)_0 = 0$
$\mathrm{Sh}(a)_{i+1} = a_i$

This is a linear transformation; $\mathrm{Sh}$ shows up as an important counterexample in functional analysis. In fact, thinking in terms of formal power series, $\mathrm{Sh}$ is basically multiplication by $x$. Explicitly:
$$x \cdot \sum_{i:\mathbb{N}} a_i x^i = \sum_{i:\mathbb{N}} \mathrm{Sh}(a)_i x^i$$
Okay, here's a cool observation: we can give a simpler description of $\mathrm{Sh}$ using the $\mathbf{else}$ operation. Namely:
$$\mathrm{Sh}(a)_i = a_{i - 1} \mathop{\mathbf{else}} 0$$ 
Essentially, this works because $\mathbf{else}$ gives an action of partial functions on total functions. That is, given a partial function $p : X \rightarrow Y$ and a total function $f : X \rightarrow Y$, we get a new total function $p \mathbin{\mathbf{else}} f$, computed pointwise. This gives an action of the monoid $(\mathbf{PartialFunctions}(X,Y),\mathbf{else},\bot)$ on the set $\mathbf{TotalFunctions}(X,Y)$. The above definition of $\mathrm{Sh}(a)$ is obtained by having the partial function $i \in \mathbb{N} \mapsto a_{i-1}$ act on the total function $i \in \mathbb{N} \mapsto 0$, thereby yielding a new total function. I wonder if there are messy arguments involving hybrid functions that can be simplified using $\mathbf{else}$.

REPLY [2 votes]: An else monoid is a left zero semigroup with an identity adjoined.
For each $n > 0$, the monoid $U_n$ is defined on the set $\{1, a_1, \ldots, a_n\}$ by the operation $a_ia_j = a_j$ for each $i, j \in \{1, \ldots, n\}$ and $1a_i = a_i1 = a_i$ for $1 \leqslant i \leqslant n$.
The monoid $\tilde{U}_n$ has the same underlying set as $U_n$, but the multiplication is defined in the opposite way: these monoids are exactly the finite "else monoids".
The monoids $U_n$, and in particular $U_2$, play an important role in the study of the wreath product of finite monoids. In particular, every finite aperiodic monoid divides a wreath product of copies of $U_2$ and every finite monoid divides a wreath product of copies of $U_2$ and of simple group: this is the famous Krohn-Rhodes theorem.
References:
[1] S. Eilenberg, Automata, languages, and machines Vol. B, Pure and Applied Mathematics, Vol. 58. Academic Press [A subsidiary of Harcourt Brace Jovanovich, Publishers], New York, 1974. {\rm xvi}+451 pp. 
[2] J. Rhodes and B. Steinberg,The $q$-theory of finite semigroups. Springer Monographs in Mathematics. Springer, New York, 2009. xxii+666 pp.