Content deleted Content added
→Permutation?: Reply |
→Permutation?: Reply |
||
Line 191:
::@[[User:Zar2gar1|Zar2gar1]] That constraint on List should suffice to give "permutations". I wouldn't even call them "partial", as in the other rows not explicitly alluding to the relation to the underlying set or basis (like saying "subsets" for sets). I guess a permutation here should have implied an arrangement, not a mapping.
::Coming back to this, I wonder whether permutations have well-defined associative join from the first place. How do I define [a] ++ [b] ++ [a]? I might be missing something. [[User:J824h|Junghyeon Park]] ([[User talk:J824h|talk]]) 14:37, 27 November 2024 (UTC)
:::Right, I think what makes it tricky to describe these container monads is also why they're interesting. A monoid is typically described in algebraic or formal language terms, but when you apply the monad structure, you get these containers that feel more combinatoric.
:::I could be wrong, but my gut feeling is the original editor intended the idea of "without replacement" by listing "permutations". Definitely double-check me, but viewed as selections, ''ordered'' selections ''with'' replacement would yield a full permutation (which is effectively the free monoid), ''unordered'' selections ''with'' replacement would yield multisets, and ''unordered'' selections ''without'' replacement would yield sets?
:::The obvious 4th piece would be ''ordered'' selections ''without'' replacement, which I guess would technically be partial permutations? The symmetry is really easy to see combinatorically, but our current table lists the property of the monoid, which isn't nearly as elegant.
:::Per your specific question about a well-defined join, if I'm thinking through this right, both full and partial permutations would have a well-defined join ''on their respective domains''. In a full permutation, there's no restriction on the ___domain so the join yields [a,b,a] without any issues. For a partial permutation though, listing 'a' twice is prohibited at the monoid level so in your example, the ++ would yield a type error at the 2nd 'a' prior to any join. As long as nothing is repeated though, there's no reason the naive join wouldn't work just like with the full permutation / free monoid. -- [[User:Zar2gar1|Zar2gar1]] ([[User talk:Zar2gar1|talk]]) 19:11, 28 November 2024 (UTC)
== Rust example ==
|