Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As pointed out in another answer, there is a naming issue: you first create an object representing $S_4$ and bind it to the name GGG in sage. The object itself doesn't know about that binding or name, so when you translate it to Magma, that information is not present there. Objects created via sage's magma interface will be stored in the list _sage_, so your group can probably be referred to via something like _sage_[2] or so. Figuring out which place it's stored in is a rather fragile operation, though. It would be better to let the interface do that lookup for you.

The subgroup you want to make could be created via something like

GGG.sub(sigma)

where sigma is the cycle $(1,2)$ represented in magma. This is difficult to obtain, because magma's syntax for creating permutation group elements is finicky: you need a "group context" to create it, and I don't think the standard interface tools allow you to do this. Ideally something like magma(gensGG[2]) would do the trick, but it doesn't.

This works, though:

sigma = magma('Sym(4)!(1,2)')

I think going forward, your chances of success would be a little better by using sage's own wrappers of Gap's permutation groups:

sage: GG=SymmetricGroup(4)
sage: sigma=GG( (1,2))

although that object sigma still doesn't know how to be translated to magma. Implementing that would be fairly straightforward, though (and it would end up doing the analogue of what is done above).

As pointed out in another answer, a comment, there is a naming issue: you first create an object representing $S_4$ and bind it to the name GGG in sage. The object itself doesn't know about that binding or name, so when you translate it to Magma, that information is not present there. Objects created via sage's magma interface will be stored in the list _sage_, so your group can probably be referred to via something like _sage_[2] or so. Figuring out which place it's stored in is a rather fragile operation, though. It would be better to let the interface do that lookup for you.

The subgroup you want to make could be created via something like

GGG.sub(sigma)

where sigma is the cycle $(1,2)$ represented in magma. This is difficult to obtain, because magma's syntax for creating permutation group elements is finicky: you need a "group context" to create it, and I don't think the standard interface tools allow you to do this. Ideally something like magma(gensGG[2]) would do the trick, but it doesn't.

This works, though:

sigma = magma('Sym(4)!(1,2)')

I think going forward, your chances of success would be a little better by using sage's own wrappers of Gap's permutation groups:

sage: GG=SymmetricGroup(4)
sage: sigma=GG( (1,2))

although that object sigma still doesn't know how to be translated to magma. Implementing that would be fairly straightforward, though (and it would end up doing the analogue of what is done above).