ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 01 Oct 2015 14:34:21 -0500Error when computing Automorphism Grouphttps://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/ I am new to Sage. Recently, I tried to compute the Automorphism Group of $\mathbb{Z}_4\times\mathbb{Z}_2$ in the following way:
G = CyclicPermutationGroup(4)
H = CyclicPermutationGroup(2)
D=G.direct_product(H)
D.automorphism_group()
However, there was an error message:
Error in lines 4-4
Traceback (most recent call last):
File "/projects/0aeca2d0-1a41-47c7-b462-f4a4432bfbf3/.sagemathcloud/sage_server.py", line 881, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
AttributeError: 'tuple' object has no attribute 'automorphism_group'
May I know where does the error in the code lie? Thanks!Thu, 01 Oct 2015 10:00:48 -0500https://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/Answer by kcrisman for <p>I am new to Sage. Recently, I tried to compute the Automorphism Group of $\mathbb{Z}_4\times\mathbb{Z}_2$ in the following way:</p>
<pre><code>G = CyclicPermutationGroup(4)
H = CyclicPermutationGroup(2)
D=G.direct_product(H)
D.automorphism_group()
</code></pre>
<p>However, there was an error message:</p>
<pre><code>Error in lines 4-4
Traceback (most recent call last):
File "/projects/0aeca2d0-1a41-47c7-b462-f4a4432bfbf3/.sagemathcloud/sage_server.py", line 881, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
AttributeError: 'tuple' object has no attribute 'automorphism_group'
</code></pre>
<p>May I know where does the error in the code lie? Thanks!</p>
https://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/?answer=29662#post-id-29662Nathann is correct. However, you also used the (slightly) wrong command for what you wanted, and it isn't quite available the way it should be.
sage: d = D[0]
sage: d1 = d._gap_()
sage: d1.AutomorphismGroup()
Group( [ GroupHomomorphismByImages( Group( [ (5,6), (1,2,3,4) ] ), Group(
[ (5,6), (1,2,3,4) ] ), [ (1,2,3,4), (5,6) ], [ (1,2,3,4), (5,6) ] ),
GroupHomomorphismByImages( Group( [ (5,6), (1,2,3,4) ] ), Group(
[ (5,6), (1,2,3,4) ] ), [ (5,6), (1,2,3,4) ], [ (5,6), (1,4,3,2) ] ),
GroupHomomorphismByImages( Group( [ (5,6), (1,2,3,4) ] ), Group(
[ (5,6), (1,2,3,4) ] ), [ (5,6), (1,2,3,4) ],
[ (1,3)(2,4)(5,6), (1,2,3,4) ] ), GroupHomomorphismByImages( Group(
[ (5,6), (1,2,3,4) ] ), Group( [ (5,6), (1,2,3,4) ] ), [ (1,2,3,4), (5,6)
], [ (1,2,3,4)(5,6), (5,6) ] ) ] )
See [Trac 19328](http://trac.sagemath.org/ticket/19328).Thu, 01 Oct 2015 13:51:54 -0500https://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/?answer=29662#post-id-29662Comment by tmonteil for <p>Nathann is correct. However, you also used the (slightly) wrong command for what you wanted, and it isn't quite available the way it should be.</p>
<pre><code>sage: d = D[0]
sage: d1 = d._gap_()
sage: d1.AutomorphismGroup()
Group( [ GroupHomomorphismByImages( Group( [ (5,6), (1,2,3,4) ] ), Group(
[ (5,6), (1,2,3,4) ] ), [ (1,2,3,4), (5,6) ], [ (1,2,3,4), (5,6) ] ),
GroupHomomorphismByImages( Group( [ (5,6), (1,2,3,4) ] ), Group(
[ (5,6), (1,2,3,4) ] ), [ (5,6), (1,2,3,4) ], [ (5,6), (1,4,3,2) ] ),
GroupHomomorphismByImages( Group( [ (5,6), (1,2,3,4) ] ), Group(
[ (5,6), (1,2,3,4) ] ), [ (5,6), (1,2,3,4) ],
[ (1,3)(2,4)(5,6), (1,2,3,4) ] ), GroupHomomorphismByImages( Group(
[ (5,6), (1,2,3,4) ] ), Group( [ (5,6), (1,2,3,4) ] ), [ (1,2,3,4), (5,6)
], [ (1,2,3,4)(5,6), (5,6) ] ) ] )
</code></pre>
<p>See <a href="http://trac.sagemath.org/ticket/19328">Trac 19328</a>.</p>
https://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/?comment=29667#post-id-29667Great ! I was looking how to find the automorphoism of `D[0]` by changing its representation, and didn not thought to `_gap_`. Thanks for this hint.Thu, 01 Oct 2015 14:34:21 -0500https://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/?comment=29667#post-id-29667Answer by Nathann for <p>I am new to Sage. Recently, I tried to compute the Automorphism Group of $\mathbb{Z}_4\times\mathbb{Z}_2$ in the following way:</p>
<pre><code>G = CyclicPermutationGroup(4)
H = CyclicPermutationGroup(2)
D=G.direct_product(H)
D.automorphism_group()
</code></pre>
<p>However, there was an error message:</p>
<pre><code>Error in lines 4-4
Traceback (most recent call last):
File "/projects/0aeca2d0-1a41-47c7-b462-f4a4432bfbf3/.sagemathcloud/sage_server.py", line 881, in execute
exec compile(block+'\n', '', 'single') in namespace, locals
File "", line 1, in <module>
AttributeError: 'tuple' object has no attribute 'automorphism_group'
</code></pre>
<p>May I know where does the error in the code lie? Thanks!</p>
https://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/?answer=29659#post-id-29659The error is that D is a tuple, and not a group. Read the documentation of direct_product, by typing
sage: G.direct_product? Thu, 01 Oct 2015 11:43:26 -0500https://ask.sagemath.org/question/29658/error-when-computing-automorphism-group/?answer=29659#post-id-29659