Compute Automorphism Group using Computer Software Is there a computer software that can compute Automorphism Groups.
For instance $Aut(\mathbb{Z}_4\times\mathbb{Z}_2)$.
I tried Sage, but could not get it to work.
Output:
G = CyclicPermutationGroup(4)
3
H = CyclicPermutationGroup(2)
4
D=G.direct_product(H)
5
D.automorphism_group()
6
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'

Thanks for any help!
 A: It is quite straightforward with GAP:
gap> G:=DirectProduct(CyclicGroup(4),CyclicGroup(2));
<pc group of size 8 with 3 generators>
gap> A:=AutomorphismGroup(G);
<group with 4 generators>
gap> StructureDescription(A);
"D8"

Hopefully someone will also show how to do this in SageMath.
A: In this case, the error should have pointed you to the fact that the output is not a group, but a group plus the morphisms in question as a "tuple".
sage: D
(Permutation Group with generators [(5,6), (1,2,3,4)],
 Permutation group morphism:
   From: Cyclic group of order 4 as a permutation group
   To:   Permutation Group with generators [(5,6), (1,2,3,4)]
   Defn: Embedding( Group( [ (1,2,3,4), (5,6) ] ), 1 ),
 Permutation group morphism:
   From: Cyclic group of order 2 as a permutation group
   To:   Permutation Group with generators [(5,6), (1,2,3,4)]
   Defn: Embedding( Group( [ (1,2,3,4), (5,6) ] ), 2 ),
 Permutation group morphism:
   From: Permutation Group with generators [(5,6), (1,2,3,4)]
   To:   Cyclic group of order 4 as a permutation group
   Defn: Projection( Group( [ (1,2,3,4), (5,6) ] ), 1 ),
 Permutation group morphism:
   From: Permutation Group with generators [(5,6), (1,2,3,4)]
   To:   Cyclic group of order 2 as a permutation group
   Defn: Projection( Group( [ (1,2,3,4), (5,6) ] ), 2 ))

Fortunately, Sage uses GAP behind the scenes for most group functionality anyway.  Unfortunately, it's not well-wrapped in this case.
sage: d = D[0]
sage: d.order()
8
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) ] ) ] )

I've opened Ticket 19328 for this.
