Ask Your Question
0

Conversion between Gap3 and Gap4 elements

asked 2012-08-13 14:42:11 +0100

schrod121 gravatar image

updated 2012-08-15 18:43:14 +0100

I am using Sage 4.7 with Gap4 (4.4.12) and Gap3 (3.4.4) -- Required for the Chevie package. The issue I am having is with what Sage declares a Gap element. I would like to create an instance of a group in gap3 then use it in sage as a gap element, however since it is a gap3 element not a gap4 element there seems to be some confusion in how sage handles the object (I assume this is due to how Gap4 has been rebuilt -- as noted in the documentation). The question I have, is there any function or method which will convert a gap3 element into a gap4 element which can then be used by Sage?

(I'm fairly new to Gap/Sage so I apologize if my understanding is incorrect)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-08-18 15:50:12 +0100

schrod121 gravatar image

For future use to others, I have found a fix that works for my purposes (it isn't a true conversion). I was trying to generate a complex reflection group using gap3/chevie then do sage commands on that said group. The issue was that gap3 objects are not recognized by sage as appropriate objects for function input (where gap4 objects are).

How I got around this:

from sage.groups.perm_gps.pergroup_element import string_to_tuples
complexReflectGroup = gap3.ComplexReflectionGroup(2,2,2);
groupGenerators = [];
for generator in gap3.Generators(complexReflectGroup):
     fullGenerators.append(string_to_tuples(str(generator)));
complexReflectGroup = PermutationGroup(groupGenerators);

With that code I can use my gap3 generated group with sage (through the conversion of the generators). I now can run sage commands on that group.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-08-13 14:42:11 +0100

Seen: 523 times

Last updated: Aug 18 '12