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.
Hello, Friends.
So, I've been studying Category Theory for Programming, and I'm trying to understand how the concept of an F-Algebra relates (if it does) to the idea of a Free Algebra. For example, suppose that my functor is . If my understanding is correct, I can use this functor to define a category of algebras, where an object would be a tuple containing a set and an algebra (eval function) that takes . If the algebra function I choose satisfies the associative property and the identity property for my given set , then I have a monoid. Now, does the free monoid has any special property with regards to this -algebra? Do these concepts relate in some sense?
An -algebra is simply a set with a constant a binary operation on it (we could call them pointed magmas). I believe the free -algebra generated by a set is the set of finite rooted binary trees with leaves labelled in . The algebra map is with picking the empty tree and joining two trees by adding a root whose left. The emedding identifies with the tree with only a root labelled .
If you have an -algebra and a function , the unique homomorphism satisfying is defined inductively. It sends to , it sends to and to .
The free monoid on a set is the set of finite words over .
The category of monoids is a subcategory of the category of -algebras (i.e. pointed magmas), so while the free monoid is free as a monoid, it is not free as a pointed magma because it satisfies some equations (unitality and associativity) that it does not need to satisfy as a pointed magma.
I cannot really answer your two questions because they are really open-ended, but I would venture a (not very confident) guess that there is no strong interesting relation between the free monoids and the free pointed magmas.
If someone is really interested in describing monoids as algebras of something, they should use the concept of [[algebra over a monad]], not [[algebra for an endofunctor]].
Thanks, @John Baez . I'm still trying to wrap my head around the concepts of F-Algebras, Monad Algebras and so on...
Thanks, also, @Ralph Sarkis . I think I get your point.
After digging a bit, I think I understood the distinction.
What threw me off was the notino of initial F-Algebras, which serve as a way to represent recursive data types. This notion seemed related to how I would construct an equation in, for example, a Ring.
I think basically an [[algebra over a functor]] is a good idea for describing data types not involving equations, like lists or trees or binary trees, while an [[algebra for a monad]] is good for describing data types that do involve equations, like groups or rings.