<html><head></head><body><div><div><div><div>Hi Marcin,<br/></div><div><br/></div><blockquote><div><span style="text-decoration-color:initial;text-decoration-style:initial;">Nice work; I also implemented free groups in the free-algebra package</span><br/></div></blockquote><div><div><br/>Wonderful - I'll take a look. Those were a bit rough, and it'd be good to see how you encoded them in `free-algebra`. Maybe we can collaborate on expanding the knowledgebase and utility of free group calculations in our respective packages :)</div><div><br/></div></div><blockquote><div><span style="text-decoration-color:initial;text-decoration-style:initial;">However 'FG' is the free group in the class of all groups.</span><br/></div></blockquote><div><div><br/></div><div>I'm glad you noted this as well! The `DList` encoding is interesting - I'll need to study that a bit :)<br/></div><div><div>Someone has also linked me to Sjoerd's `free-functors` library, which seems is also very interesting: <br/></div><a href="https://github.com/sjoerdvisscher/free-functors/blob/master/src/Data/Functor/Free.hs#L70">https://github.com/sjoerdvisscher/free-functors/blob/master/src/Data/Functor/Free.hs#L70</a><div> <br/></div></div></div><blockquote><div><span style="text-decoration-color:initial;text-decoration-style:initial;">There's an interesting difference between 'FreeGroup' (using notation of your package) and 'FG'.  First one is not a free group in the class of all groups, but only free in the class of groups for which multiplication is strict in the left argument</span><br/></div></blockquote><div><br/></div><div><div><div>Correct. Regarding motivation, I provided both because I know some people do like to operate in the fast-and-loose strict subset of Haskell. It's no skin off my back. But I was very unsatisfied with strict (vis. "moral") Free constructions with respect to bottoms, and, inspired by Dan Doel's article (<a href="http://comonad.com/reader/2015/free-monoids-in-haskell/">http://comonad.com/reader/2015/free-monoids-in-haskell/</a>), attempted to find a free construction for groups that was more in line with Haskell's domain-like types. I note this article in the documentation for FG.<br/></div><div><br/></div><div>Maybe this deserves a broader blog post? <br/></div><div><br/></div></div></div><blockquote><div><span style="text-decoration-color:initial;text-decoration-style:initial;">I identified that `Foldable` can only be defined for algebraic structures for which `Endo b` has the same algebra type; this fails for groups: only automorphisms form a group.  Having a seprate `GroupFoldable` class makes sense.</span><br/></div></blockquote><div><div><br/></div><div>That class ended up being good for two things: <br/></div><ol><li>Great puns.<br/></li><li>Very convenient word evaluation<br/></li></ol><div>If you'd like to add to it, I'd be stoked.<br/></div><div><br/></div><div>Cheers,<br/></div><div>Emily</div><div><br/></div></div><div><br/></div></div><div><div style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;"><img src="https://r.superhuman.com/P6Yyi6oUBVX5sbg2VS6QyG0AqpyS-H1pS1EiEzLbXxQRAzDsH2Lz2qZ9DnkyrjvpQOIMdamKKZxARgqeV-bvQJb5WfQ_Rg4f-pYmXkuO2C9L1J-WC3CvU3B44IWfx0kQJ8ol1Dt_qud7ZCWQfxwN2yB2k04AT8L_17bN_UGOErv2smFPAxMBMRQSveE.gif" alt=" " width="1" height="0" style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;"/><!--                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                --></div><br/><div class="gmail_signature"></div></div><br/><div><div class="gmail_quote">On Sat, Dec 05, 2020 at 2:53 PM,  <span dir="ltr"><<a href="mailto:coot@coot.me" target="_blank">coot@coot.me</a>></span> wrote:<br/><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="gmail_extra"><div class="gmail_quote sh-color-black sh-color" style="null" id="null"><div class="sh-color-black sh-color"><div class="sh-color-black sh-color"><div class="sh-color-black sh-color">Hi Emily,<br/><br/>Nice work; I also implemented free groups in the free-algebra package.<br/><br/></div></div><div class="sh-color-black sh-color"><div class="sh-color-black sh-color"><div class="sh-color-black sh-color">There's an interesting difference between 'FreeGroup' (using notation of your package) and 'FG'.  First one is not a free group in the class of all groups, but only free in the class of groups for which multiplication is strict in the left argument, i.e. ones that satisfy the equation `⊥ <> a == ⊥`.   That's because `++` is strict in the left argument. For the same reason `[]` is free monoid in the class of left strict monoids.<br/></div><div class="sh-color-black sh-color"><br/></div><div class="sh-color-black sh-color"><div class="sh-color-black sh-color">However 'FG' is the free group in the class of all groups.  Another isomorphic construction of a free group  (in the class of all groups) can be based on `DList` - the free monoid.  You might want to check out <a href="https://hackage.haskell.org/package/free-algebras-0.1.0.0/docs/Data-Algebra-Free.html" target="_blank" rel="noopener noreferrer">https:/<wbr/>/<wbr/>hackage.<wbr/>haskell.<wbr/>org/<wbr/>package/<wbr/>free-algebras-0.<wbr/>1.<wbr/>0.<wbr/>0/<wbr/>docs/<wbr/>Data-Algebra-Free.<wbr/>html</a> which gives a uniform interface for all free algebras (not just groups).  You'll recover there `Monad` instance of `FG` (and `FreeGroup`), and a bit more.<br/><br/></div></div><div class="sh-color-black sh-color">I identified that `Foldable` can only be defined for algebraic structures for which `Endo b` has the same algebra type; this fails for groups: only automorphisms form a group.  Having a seprate `GroupFoldable` class makes sense. <br/></div><div class="sh-color-black sh-color"><br/></div></div><div class="sh-color-black sh-color">Cheers,<br/></div></div><div class="sh-color-black sh-color">Marcin Szamotulski<br/></div></div><div class="protonmail_signature_block protonmail_signature_block-empty sh-color-black sh-color"><div class="protonmail_signature_block-user protonmail_signature_block-empty sh-color-black sh-color"><br/></div><div class="protonmail_signature_block-proton protonmail_signature_block-empty sh-color-black sh-color"><br/></div></div><div class="sh-color-black sh-color"><br/></div><div class="protonmail_quote sh-color-black sh-color"><div class="sh-color-black sh-color">‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br/></div><div class="sh-color-black sh-color">On Saturday, December 5th, 2020 at 19:52, Emily Pillmore <<a target="_blank" rel="noopener noreferrer" href="mailto:emilypi@cohomolo.gy">emilypi@<wbr/>cohomolo.<wbr/>gy</a>> wrote:<br/></div></div><div class="sh-color-black sh-color"><br/></div><blockquote type="cite" class="protonmail_quote sh-color-black sh-color">
            <div class="sh-color-black sh-color"><div class="sh-color-black sh-color"><div class="sh-color-black sh-color">Hello all,<br/></div><div class="sh-color-black sh-color"><br/></div><div class="sh-color-black sh-color">I am pleased to announce the release of the <a rel="noopener noreferrer" href="https://hackage.haskell.org/package/group-theory" target="_blank"> group-theory</a> package: a package aimed at implementing the theory of finite groups in a reasonably ergonomic, well-documented, and featureful way. It's hardly finished, but my co-maintainer, Reed Mullanix (@totbwf) and I thought this was a good mvp with which we could announce.  <br/></div><div class="sh-color-black sh-color"><br/></div><div class="sh-color-black sh-color">Contributions are very welcome, and I hope everyone enjoys.<br/></div><div class="sh-color-black sh-color"><br/></div><div class="sh-color-black sh-color">Cheers,<br/></div><div class="sh-color-black sh-color">Emily Pillmore</div></div><div class="sh-color-black sh-color"><div style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;" class="sh-color-black sh-color"><img height="0" width="1" class="proton-embedded sh-color-black sh-color" style="display: none; border: 0px; width: 0px; height: 0px; overflow: hidden; visibility: hidden;" alt=""/></div></div></div></blockquote></div></div></blockquote></div></div><br/></div></div></body></html>