r/purescript • • Nov 30 '17

purescript-symmetric-groups: a library for permutations

I tweeted about a month ago about a little purescript library for dealing with permutations. Over the last few days I've tidied it up a bit, documented it, and published it, so I thought it might be time to announce it properly here. The Pursuit link is:

I went all out on the docs; it's almost more of an article than a software library, in fact.

I'm not really aware of any use cases for it apart from checking group theory homework (this is what prompted me to make it in the first place), although I expect some do exist, and I'd be thrilled to hear about it if any of you do manage to find a use for it.

7 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/hdgarrood Dec 01 '17

Oh yes, of course, I will use the group action class!

On orbits: my understanding of the word "orbit" is that if a group G acts on a set X, then the orbit of an element x of X is the set { g . x : g in G }. If we are considering G to be the entire group Sym, then the orbit of any element is going to be the entire set of natural numbers, surely?

I think it would be correct to say that cycleOf g x gives you the orbit of x if we restrict our attention to the subgroup generated by g, instead of all of Sym, though.