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.
Some initial algebras for endofunctors depend on a parameter object: for example, is the initial algebra for the endofunctor , and (binary trees) is the initial algebra for . In such cases, with just the universal property that defines them in terms of algebras, one can show that the assignments or are functors and in fact more is true, they are monads; my question is: why?
Is there a way to prove, using only the universal property that defines , that is a monad?
And what about a more general question? Let be a functor: is there any known assumption on it so that (where is the initial algebra of ) is a monad on ?
(Evidently the first question is motivated by the second: knowing nothing about the family of endofunctors , I was looking for a formal way to see what in the shape of the functor makes a monad.)
Certainly, you can construct with the recipe that computes initial algebras, but this is not what I want, and I am clueless even when it comes to define the unit , because the initiality property of conflicts with the fact that must map into ...
You may find some answers in Fiore–Saville's List Objects with Algebraic Structure. They mostly consider list-like structures, but the techniques they use are rather general.
I see that this is certainly relevant to my question, but skimming very rapidly it seems that the proof that is a monad is omitted...
...is it so obvious?
I doubt there's going to be any general answer to this. In a way it's sort of an accident that the free-monoid monad (for instance) can be presented as the initial algebra of an endofunctor -- you can think of it as a simple form of cut-elimination. Most monads involve some quotienting as well, to impose the axioms of the theory.
I realize you're asking the dual question, of when an initial algebra for a parametrized endofunctor happens to be a monad, but it seems to me like sort of the same thing.
This question puts into words nicely why I'm not feeling quite comfortable with (parametrized) inductive types!
To me it smells like the transfinite construction of free algebras/monads should play a role here: the way the free monoid monad is generated from the endofunctors is given by a special case of it (Adamek's theorem), and the construction of free algebras is also mentioned in the Fiore-Saville paper above (Example 3.5.). I can't connect the dots either though.
Btw: can someone explain how in Example 3.5. the list object on induces a monad structure on ? The unit is directly given, but I don't see how induces a multiplication.
Mike Shulman said:
In a way it's sort of an accident that the free-monoid monad (for instance) can be presented as the initial algebra of an endofunctor -- you can think of it as a simple form of cut-elimination.
The accident being that the free monoid on a set can be obtained by iterating a (polynomial) endofunctor, in this case , right? What's the connection to cut-elimination?
What's the monad structure you have in mind on ?
is the free Magma Monad.
If you write down a unary type theory for presenting the free category on a graph, whose derivations are therefore lists of composable arrows, then the cut-elimination algorithm is essentially the same as the definition of multiplication that makes into a free monoid. I wrote at length about this in section 1.2 of my categorical logic notes.
The underlying phenomenon seems to arise when the axioms of a theory are affine and don't permute (i.e. each variable is used at most once and in the same order as they are given in the context, on both sides of ). I've seen a paper study this in depth, but lost the reference sadly, and have been looking for it again the last 2 years!
Basically, the forgetful functors from such theories have a right adjoint that's given by a polynomial functor because the induced term algebra has normal forms. There's more to it than that, but that's the intuition.
This explains why, for example, the commutative monoid monad doesn't arise as an inductive type. Axioms like commutativity and idempotence give rise to quotients that can't be normalized so easily, unlike unitality and associativity.
Jacques Carette said:
is the free Magma Monad.
I think this is for a different "binary tree" (fixed point of ).
Ah, you're right, it's for a slightly different notion of tree.
I'd love to see that paper! Let me know if you find it.
@Jacques Carette I think that paper is an answer to my question, at least as much as it can be answered...
(also: whoops, did I get the tree example wrong?)
There are different flavours of trees. Many of them end up isomorphic, but some 'fit' better than others. Same with Species.
fosco said:
(also: whoops, did I get the tree example wrong?)
I may be wrong but I don't see how trees with decorated nodes (here "decorated" = "what you are annotating with stuff of type ") can form a monad.
How do you define multiplication? are trees whose nodes are decorated with trees. The shape of the tree in the decoration may not match the "shape" of the node it is decorating. How do you flatten that?
Reid Barton said:
Jacques Carette said:
is the free Magma Monad.
I think this is for a different "binary tree" (fixed point of ).
This clearly works instead, because you are decorating only the leaves. :smile:
Aha, I think I've found (some of) the papers & a presentation:
I think affine (not just linear-regular) and rigid are the key terms here. But it appears no one has yet considered the affine case (it just came up in examples that I was doing of explicit adjoints).
There are also related things in term rewriting, called left-linear and right-linear terms - they show up in a categorical setting in for example Guiraud's Termination orders for three-dimensional rewriting.
@Jacques Carette several of those links don't work :octopus:
@Morgan Rogers (he/him) Very strange. I had posted proper links. Anyways, they should be fixed now.
Thanks :)