using GAP: Group Theory
I'm trying this code base on the book "Adventures in Group Theory" from D.Joyner
MS=MatrixSpace(GF(2),3,3)
A=MS([0,1,0,1,0,0,0,0,1])
B=MS([1,0,0,0,0,1,0,1,0])
G=MatrixGroup([A,B]) G1=SymmetricGroup(3)
imG=G._gap_().IsomorphismPermGroup().Image(G._gap_())
imG
Sym( [ 2 .. 4 ] )
gens=imG.GeneratorsOfGroup()
gens
[ (3,4), (2,3) ]
G2=PermutationGroup([(3,4),(2,3)])
G2.is_isomorphic(G1)
True
However, there seems to be a signature problem the following commands don't work: (the first one was from the book, I tried myself the second one)
G2=PermutationGroup(gens)
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_92.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("RzI9UGVybXV0YXRpb25Hcm91cChnZW5zKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>
File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpHRYMWK/___code___.py", line 2, in <module> exec compile(u'G2=PermutationGroup(gens) File "", line 1, in <module>
File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 343, in PermutationGroup raise TypeError("gens must be a tuple, list, or GapElement") TypeError: gens must be a tuple, list, or GapElement
G2=PermutationGroup(list(gens))
Traceback (most recent call last): File "<stdin>", line 1, in <module> File "_sage_input_79.py", line 10, in <module> exec compile(u'open("___code___.py","w").write("# -- coding: utf-8 --\n" + _support_.preparse_worksheet_cell(base64.b64decode("RzI9UGVybXV0YXRpb25Hcm91cChsaXN0KGdlbnMpKQ=="),globals())+"\n"); execfile(os.path.abspath("___code___.py")) File "", line 1, in <module>
File "/private/var/folders/gm/z065gk616xg6g0xgn4c7_bvc0000gn/T/tmpOxJAnr/___code___.py", line 2, in <module> exec compile(u'G2=PermutationGroup(list(gens)) File "", line 1, in <module>
File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 345, in PermutationGroup canonicalize=canonicalize, category=category) File "/Applications/SageMath/local/lib/python2.7/site-packages/sage/groups/perm_gps/permgroup.py", line 419, in __init__ for cycle in x: TypeError: 'sage.libs.gap.element.GapElement_Permutation' object is not iterable
I cannot make much of the documentation. Thanks.