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.
in programming contexts, i usually see the "free monad" formulated as the initial algebra of the endofunctor on the category of endofunctors on typed functions (where and denote functor coproduct and composition respectively).
is there somewhere i can see a proof of this construction producing the "free monad monad" on the category of endofunctors? the reason i'm a bit confused is that it seems elsewhere online, the use of the "formula" to calculate the free monoid seems to rely on a distributive relationship between and , and in general we can't witness this for arbitrary endofunctors in a programming context. for example, there's no way to purely reveal the result of a side-effectful computation, as would be implied by distribute :: IO (F a + G a) -> IO (F a) + IO (G a)
to give an example of sources that refer to distributivity between monoidal structures: https://ncatlab.org/nlab/show/free+monoid (which doesn't include a proof) says: image.png
and Bartosz Milewski's excellent blog post:
In the absence of distributivity, you need a different construction of the free monad on an endofunctor, but the free monad still exists (assuming niceness hypotheses). See for instance https://ncatlab.org/nlab/show/transfinite+construction+of+free+algebras.
@Mike Shulman i see. does the solution still take roughly the same form (perhaps we still use , but restrict ourselves in ?) or do we need something totally different?
I don't know what you mean by .
To me, in this context denotes a least fixed point, which is a characterization of something by a property, not a construction of it.
And what is ?
I'm guessing that by you mean the identity endofunctor, and means the tensor product in the monoidal category of endofunctors, so that denotes the left -module freely generated by the unit object in that monoidal category.
So maybe your question is whether, in the general case, the free monad generated by an endofunctor is also the free left -module generated by the unit?
I don't have time to work out the details right now, but I think that should probably follow from the fact that the free monad is in fact algebraically-free.
@Mike Shulman ah, sorry for being unclear. you've inferred most of what i was trying to say from my confused writing, but i'll try to spell it out anyway:
i am indeed assuming the existence of an (equivalence class of) object characterized by a property. specifically, by i'm referring to an endofunctor on a category of endofunctors. and by , i'm referring to an object that i assume exists: the carrier of the initial object in the category of F-algebras of .
and yes, is the identity functor, is functor coproduct (we assume that is suitable so that this exists), and is the functor composition monoidal structure on the endofunctor-category .
i'll look through the resources you gave me and hopefully try to muddle through, thank you
I think the paper List Objects with Algebraic Structure of Fiore and Saville might also be a helpful place to look, as it has related discussion.