(*cyclic_orders)
return G
Returns the direct product of cyclic groups with the given orders.

    According to the structure theorem for finite abelian groups ([1]),
    every finite abelian group can be written as the direct product of finitely
    many cyclic groups.
    [1] http://groupprops.subwiki.org/wiki/Structure_theorem_for_finitely_generated_abelian_groups

    Examples
    ========

    >>> from sympy.combinatorics import Permutation
    >>> Permutation.print_cyclic = True
    >>> from sympy.combinatorics.named_groups import AbelianGroup
    >>> AbelianGroup(3, 4)
    PermutationGroup([
            Permutation(6)(0, 1, 2),
            Permutation(3, 4, 5, 6)])
    >>> _.is_group()
    False

    See Also
    ========
    DirectProduct
Returns the direct product of cyclic groups with the given orders.
Returns the direct product of cyclic groups with the given orders .
def AbelianGroup(*cyclic_orders):
    """
    Returns the direct product of cyclic groups with the given orders.

    According to the structure theorem for finite abelian groups ([1]),
    every finite abelian group can be written as the direct product of finitely
    many cyclic groups.
    [1] http://groupprops.subwiki.org/wiki/Structure_theorem_for_finitely_generated_abelian_groups

    Examples
    ========

    >>> from sympy.combinatorics import Permutation
    >>> Permutation.print_cyclic = True
    >>> from sympy.combinatorics.named_groups import AbelianGroup
    >>> AbelianGroup(3, 4)
    PermutationGroup([
            Permutation(6)(0, 1, 2),
            Permutation(3, 4, 5, 6)])
    >>> _.is_group()
    False

    See Also
    ========
    DirectProduct
    """
    groups = []
    degree = 0
    order = 1
    for size in cyclic_orders:
        degree += size
        order *= size
        groups.append(CyclicGroup(size))
    G = DirectProduct(*groups)
    G._is_abelian = True
    G._degree = degree
    G._order = order

    return G
def AbelianGroup ( * cyclic_orders ) : groups = [ ] degree = 0 order = 1 for size in cyclic_orders : degree += size order *= size groups . append ( CyclicGroup ( size ) ) G = DirectProduct ( * groups ) G . _is_abelian = True G . _degree = degree G . _order = order return G