-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nicer syntax for entering permutations #1189
Comments
If not following the exact math notation is acceptable, you could also steal the |
@rfourquet I am not sure I follow, what is the proposal in terms for the way one enters the permutations (ignoring completely how this is implemented for the moment?) Would it just replace |
Just for the record: julia> using AbstractAlgebra
julia> perm"(1,2)(3,4)"
(1,2)(3,4) |
Yes. But this syntax can be used only through a macro, so it would look like |
Right now, you may see something like this in a REPL or notebook:
But how can you enter this group again, given just this output?
One idea would be to write a macro which can take a single permutation or a list and turn them into OSCAR permutation (we already had a similar idea for GAP.jl, see See also oscar-system/GAP.jl#420)
So then you could perhaps write
and it would produce the list of permutations as elements of
sym(14)
. Alternatively the first argument14
could be omitted (then just take the maximum of all occurring moved points), or could be an existing permutation group.(Of course instead of returning a list of permutations, it could also directly return a permutation group. I just figured being able to deal with a list of permutations is more general).
In principle it is clear to me how to implement this, but I figured it would be good to first get some feedback, perhaps people have better ideas for the syntax of this, which I'd like to hear before working on that macro :-)
The text was updated successfully, but these errors were encountered: