Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Action of Permutations on Points, maybe with GAP?

I cannot seem to figure out how to make Sage act on a point with a permutation. For example, if I act on the integer 17 with the permutation (5,17), the result is 17. This works fine in vanilla GAP:

gap> 17^(17,5); 5 gap> OnPoints(17,(17,5)); 5

But I can't seem to determine the Sage command - does Sage only have the ability to multiply permutations with p1.action(p2), or can it do what I'm getting at here?

I tried accessing the GAP interface directly with gap.console(), but the resulted in the kernel hanging. Actually, even SageMathCell can't seem to figure out what gap.console() is supposed to do.

Anyone have any thoughts?

Action of Permutations on Points, maybe with GAP?

I cannot seem to figure out how to make Sage act on a point with a permutation. For example, if I act on the integer 17 with the permutation (5,17), the result is 17. This works fine in vanilla GAP:

gap> 17^(17,5);
5
gap> OnPoints(17,(17,5));
5

5

But I can't seem to determine the Sage command - does Sage only have the ability to multiply permutations with p1.action(p2), or can it do what I'm getting at here?

I tried accessing the GAP interface directly with gap.console(), but the resulted in the kernel hanging. Actually, even SageMathCell can't seem to figure out what gap.console() is supposed to do.

Anyone have any thoughts?

Action of Permutations on Points, maybe with GAP?

I cannot seem to figure out how to make Sage act on a point with a permutation. For example, if I act on the integer 17 with the permutation (5,17), the result is 17. This works fine in vanilla GAP:

gap> 17^(17,5);
5
gap> OnPoints(17,(17,5));
5

But I can't seem to determine the Sage command - does Sage only have the ability to multiply permutations with p1.action(p2), or can it do what I'm getting at here?

I tried accessing the GAP interface directly with gap.console(), but the resulted in the kernel hanging. Actually, even SageMathCell can't seem to figure out what gap.console() is supposed to do.

Anyone have any thoughts?

EDIT: Learning more about how Sage calls GAP is not helping....

sage: libgap.eval(G:=FreeGroup(3))
<free group on the generators [ x0, x1, x2 ]>
sage: libgap.eval(OnPoints(3,(1,2,3)))
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-3-0f49a104e96c> in <module>
----> 1 libgap.eval(OnPoints(Integer(3),(Integer(1),Integer(2),Integer(3))))

NameError: name 'OnPoints' is not defined