Timeline for Transformation from the Bag monad to the List monad
Current License: CC BY-SA 4.0
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 18, 2018 at 21:16 | history | edited | Ben Sprott | CC BY-SA 4.0 |
refreshing this question to focus on any kind of map from Bag to List.
|
Jul 15, 2018 at 16:59 | comment | added | Andreas Blass | I second @FrançoisG.Dorais's question. A map $M$ from the bag monad to the list monad would consist of, for each set $X$, a function $M_X$ from the (underlying set of) the free commutative monoid on $X$ to the (underlying set of) the free monoid on $X$. You want this function to send a bag not to one list but to many, and functions don't do that. | |
Jul 15, 2018 at 8:17 | comment | added | Andrej Bauer | It may be worth noting that there's a map going in the opposite direction, and that can be quite useful too. We may be able to help better if you explained why you need the transformation from bags to lists. | |
Jul 15, 2018 at 3:19 | comment | added | François G. Dorais | "The map $M:Bag \to List$ would take $x$ to every permutation of the elements of $b$" Is this a multivalued map? | |
Jul 14, 2018 at 20:36 | comment | added | darij grinberg | Pretty sure it does not exist. If it existed, then we could compose it with the projection that sends each nonempty list of nonempty lists to the first element of its first element; thus we would get a natural transformation from the "nonempty bags" monad to the identity monad. This natural transformation would have to commute with endomorphisms of the original type, such as permutations; thus, if it takes a bag $ab = ba$ to $a$, then it must also take it to $b$, and vice versa, which is absurd. | |
Jul 14, 2018 at 19:33 | history | asked | Ben Sprott | CC BY-SA 4.0 |