Category Theory
Zulip Server
Archive

You're reading the public-facing archive of the Category Theory Zulip server.
To join the server you need an invite. Anybody can get an invite by contacting Matteo Capucci at name dot surname at gmail dot com.
For all things related to this archive refer to the same person.


Stream: theory: category theory

Topic: On the identity X** = (X+1)*


view this post on Zulip Vincent Moreau (Mar 20 2026 at 12:05):

Hi everyone, let me share a cute observation. I write ()(-)^* for the monad of (set-theoretic) monoids, i.e. XX^* is the set of finite lists/words over the set XX seen as an alphabet. Writing ()()(-) \cdot (-) for the concatenation, I noticed that the function

(X)(X+{})[[w1,,wn]w1[][]wn\begin{matrix} (X^*)^* & \longrightarrow & (X + \{\bullet\})* \\ [[w_1, \dots, w_n] & \longmapsto & w_1 \cdot [\bullet] \dots [\bullet] \cdot w_n \end{matrix}

is a bijection natural in the set XX. Moreover, the multiplication (X)X(X^*)^* \to X^* corresponds to the unique monoid homomorphism (X+{})X(X + \{\bullet\})^* \to X^* which is the identity on XX and sends \bullet to the empty word. (Notice however that the natural bijection above is NOT a natural isomorphism for the free monoid structures!)

view this post on Zulip Vincent Moreau (Mar 20 2026 at 12:13):

For those interested, I came across this on my work on higher-order regular languages. Indeed, any finite set Σ\Sigma induces the type

Church(Σ):=(oo)Σoo\operatorname{Church}(\Sigma) \quad:=\quad (o \Rightarrow o)^{|\Sigma|} \Rightarrow o \Rightarrow o

whose closed simply typed λ\lambda-terms correspond exactly to words wΣw \in \Sigma^* on the alphabet Σ\Sigma, through the Church encoding. This assignment goes from finite sets to simple types so cannot be composed with itself, but following the natural bijection above the inhabitants of the type

Church(Σ+1)\operatorname{Church}(\Sigma + 1)

correspond exactly to words of words W(Σ)W \in (\Sigma^*)^*.

view this post on Zulip Vincent Moreau (Mar 20 2026 at 12:20):

This led me to consider which endofunctors FF on the category of sets can be equipped with a natural bijection

FFF(()+1)F \circ F \quad\cong\quad F \circ ((-) + 1)

For the moment, my only examples of such FF are the functors ()(-)^*, ()+1(-) + 1, and any constant functor. It is easy to take FF a polynomial functor induced by some family EBE \to B and to compute what such an isomorphism amounts to on that family, but I want concrete examples.

Also, moving from the category of sets to the category of graphs/quivers, we can see that the free category monad, which I write Path\operatorname{Path}, verifies an analog property:

Path(Path(G))Path(G+G)\operatorname{Path}(\operatorname{Path}(G)) \quad\cong\quad \operatorname{Path}(G + ||G||)

where G||G|| is the graph with same vertices as GG and with just one "endo"-edge for every vertex.

view this post on Zulip Nathanael Arkor (Mar 20 2026 at 12:27):

Fiore and Leinster showed that any arithmetic statement that can be proven using complex numbers establishes a corresponding isomorphism between objects of a rig category (Objects of Categories as Complex Numbers). Can you prove X=(X+1)X^{**} = (X + 1)^* arithmetically and then deduce your isomorphism using the results of Fiore and Leinster?

view this post on Zulip Vincent Moreau (Mar 20 2026 at 12:27):

view this post on Zulip Vincent Moreau (Mar 20 2026 at 12:29):

Nathanael Arkor said:

Fiore and Leinster showed that any arithmetic statement that can be proven using complex numbers establishes a corresponding isomorphism between objects of a rig category (Objects of Categories as Complex Numbers).

I did not know that paper, thanks! I'm going to check that.

view this post on Zulip Vincent Moreau (Mar 20 2026 at 12:51):

Well I just skimmed through the paper, but from what I understand the equation X=1+X×XX^* = 1 + X \times X^* would correspond on complex numbers to the function

xx := 11xx \quad\longmapsto\quad x^*\ :=\ \frac{1}{1-x}

on appropriate xx, and we then compute that

(x)=1111x=1x1x1=1xx(x^*)^* = \frac{1}{1 - \frac{1}{1 - x}} = \frac{1 - x}{1 - x - 1} = - \frac{1 - x}{x}

and that

(x+1)=1x(x + 1)^* = - \frac{1}{x}

Unless I am missing something, it therefore seems that the bijection above is not captured by the arithmetic of complex numbers?

view this post on Zulip David Corfield (Mar 20 2026 at 17:12):

Only have a moment now, but don't the empty list of lists and the singleton list of the empty list both get sent to the empty list? If so, it would explain why you have an extra one in the calculation of (x)(x^*)^* in the last message.

view this post on Zulip Morgan Rogers (he/him) (Mar 20 2026 at 17:13):

I don't think I've noticed this before. What did you mean when you said that "the natural bijection is not a natural isomorphism for the free monoid structures", does that mean it is not well-behaved with respect to the monad structure?

I ask because at first glance it seems like an isomorphism STSSST \cong SS provides a different way to extract a monad structure on a composite of a monad with an endofunctor compared with the usual way (distributive law). Namely, we get STSTSSSTSTSTST \to SSST \to ST, where the latter is the multiplication of SS twice. Maybe someone has thought about this example in such a context?

view this post on Zulip Oscar Cunningham (Mar 20 2026 at 18:23):

David Corfield said:

Only have a moment now, but don't the empty list of lists and the singleton list of the empty list both get sent to the empty list? If so, it would explain why you have an extra one in the calculation of (x)(x^*)^* in the last message.

Right, it should be X** = (X+1)*+1

view this post on Zulip Nathanael Arkor (Mar 20 2026 at 18:26):

In which case, the isomorphism would arise from the Fiore–Leinster result, though this doesn't seem to explain the connection to the monad structure.

view this post on Zulip Vincent Moreau (Mar 20 2026 at 20:15):

Oops looks like I messed up my analysis, thanks for pointing out that corner case! Hopefully no future employer of mine will see this thread :)

view this post on Zulip Vincent Moreau (Mar 20 2026 at 20:27):

More generally, the correct formula for graphs is Path(Path(G))Path(G+G)+G\operatorname{Path}(\operatorname{Path}(G)) \cong \operatorname{Path}(G + ||G||) + ||G||.

view this post on Zulip Vincent Moreau (Mar 20 2026 at 20:34):

Morgan Rogers (he/him) said:

I don't think I've noticed this before. What did you mean when you said that "the natural bijection is not a natural isomorphism for the free monoid structures", does that mean it is not well-behaved with respect to the monad structure?

Well, now I don't know how to answer as the formula was incorrect :( What I meant was that the function (X)(X+1)(X^*)^* \to (X+1)^* defined in the first message does not preserve concatenation, i.e. is not a monoid morphism.

However, if we take the restriction to (X)+(X+1)(X^*)^+ \to (X + 1)^*, where ()+(-)^+ is the monad of semigroups given by non-empty lists, then we have a bijection which is a morphism of semigroups if the codomain set is endowed with the semigroup operation defined as ww:=w[]ww \cdot_{\bullet} w' := w \cdot [\bullet] \cdot w', which adds a bullet in the middle of the concatenation. This is quite satisfying actually :)

view this post on Zulip John Baez (Mar 20 2026 at 20:41):

Oscar Cunningham said:

Right, it should be X** = (X+1)*+1

So if we make the interpretation

x:=11x \displaystyle{ x^* := \frac{1}{1-x}}

then we get

(x)=11x=1111x \displaystyle{ (x^*)^* = \frac{1}{1 - x^*} = \frac{1}{1 - \frac{1}{1-x}} }

=1x1x1=1xx \displaystyle{ = \frac{1 - x}{1 - x - 1}= - \frac{1 - x}{x} }

=11x=1+11(1+x)=1+(1+x) \displaystyle{ = 1 - \frac{1}{x} = 1 + \frac{1}{1 - (1+x)} = 1 + (1+x)^* }

so the desired relation holds! :tada: :tada: