8 ms·
I see monoids more and more everyday. A bit outside the topic but does anyone have a good introduction-level resource to learning monoids?
by s5ma6n 6y ago
I see monoids more and more everyday. A bit outside the topic but does anyone have a good introduction-level resource to learning monoids?
- colonwqbang 6y agoIt depends on what you mean by introduction. I think the Typeclassopedia entry on Semigroups and Monoids is pretty good, if you are familiar with basic Haskell syntax. https://wiki.haskell.org/Typeclassopedia#Semigroup https://wiki.haskell.org/Typeclassopedia#Semigroup
- s5ma6n 6y agoThanks for the link. I am not good with Haskell but I meant in general mathematical / algebraic introduction, explanation or a lecture.
- mgradowski 6y agoIn abstract algebra there really is a hierarchy of group-like-structures with different levels of symmetry (see the table in [1]), and a monoid is one of such structures. I've had some luck with the first chapter of this (free) [2] book, although they explain groups and not monoids but for me it was then rather quick to gain intuition about monoids. [1] https://en.wikipedia.org/wiki/Monoid#Relation_to_category_theory https://en.wikipedia.org/wiki/Monoid#Relation_to_category_th... [2] https://web.evanchen.cc/napkin.html https://web.evanchen.cc/napkin.html
- JCoder58 6y agoTry this online book by Bartosz Milewski: https://bartoszmilewski.com/2014/10/28/category-theory-for-programmers-the-preface/ https://bartoszmilewski.com/2014/10/28/category-theory-for-p...
- colonwqbang 6y agoHe also has lectures on YouTube which are great.
- irchans 6y agoMaybe "A first course in Abstract Algebra" by Fraleigh available on Kindle for less than $10. https://www.amazon.com/dp/0201763907 https://www.amazon.com/dp/0201763907 (It's not focused on Monoids. It also covers groups, rings, and fields from a mathematical point of view. It's written for an undergraduate math major with no prior experience in these areas.)
- Vosporos 6y agoA monoid is an algebraic data structure that has a binary operation (+, *, ++, etc), and an empty element (0, 1, [], etc). In terms of relationship to other algebraic data structure, it "inherits" the binary operation from its Semigroup buddy, which is a very nice data structure to represent non-empty containers (and statically enforce that property). Julie Moronuki's blog has helped me greatly to understand it all: https://argumatronic.com/posts/2019-06-21-algebra-cheatsheet.html https://argumatronic.com/posts/2019-06-21-algebra-cheatsheet...
- tantalor 6y agoNo introduction necessary, monads are just monoids in the category of endofunctors.
- OscarCunningham 6y agoWrong way around. They want to know what monoids are. So you have to tell them that monoids are just modules of the list monad. ;-)
- shigeo 6y agoOr that a monoid is merely a category with exactly one object.
- shigeo 6y agoSide note: the study of monoids isn't a very big field in mathematics, because they're too simple to say too much about them. But if you modify them just a bit, either in the direction of groups or in the direction of categories, you get massive fields of study.
- OscarCunningham 6y agoI'm reminded of John Baez writing recently (https://twitter.com/johncarlosbaez/status/1246470112321953792 https://twitter.com/johncarlosbaez/status/124647011232195379...) about commutative semigroups. Even simpler, but still lots to say!
- shigeo 6y agoI probably still stand corrected, but commutativity is a much stronger condition than the existence of an identity!
- OscarCunningham 6y agoI think the existence of an identity isn't very important. You can adjoin an identity to any semigroup to turn it into a monoid. In any case, doesn't adding more properties make a theory simpler? For example the classification of finite simple groups is much harder than the classification of finite simple commutative groups.
- rbonvall 6y agoThere is not much to learn, a monoid is a very simple abstraction. Think for example about learning about the "iterator" abstraction. It's just something with "hasNext" and "next" operations, nothing more to understand. But when you know it you start seeing iterators everywhere, and you get frustrated when something that should be an iterator isn't so you cannot write a simple foreach loop. And you'll start implementing iterators in your own code, because you know that provides a lot of convenience for free to consumers. Same thing for monoids. They're everywhere, they offer some convenience for free, and you'll be wondering why things that should have monoid instances don't.
- s5ma6n 6y agoThank you everyone for all the links. This is very helpful!