Base class for abelian group elements#

This is the base class for both abelian_group_element and dual_abelian_group_element.

As always, elements are immutable once constructed.

class sage.groups.abelian_gps.element_base.AbelianGroupElementBase(parent, exponents)#

Bases: MultiplicativeGroupElement

Base class for abelian group elements

The group element is defined by a tuple whose i-th entry is an integer in the range from 0 (inclusively) to G.gen(i).order() (exclusively) if the \(i\)-th generator is of finite order, and an arbitrary integer if the \(i\)-th generator is of infinite order.

INPUT:

  • exponents1 or a list/tuple/iterable of integers. The exponent vector (with respect to the parent generators) defining the group element.

  • parent – Abelian group. The parent of the group element.

EXAMPLES:

sage: F = AbelianGroup(3,[7,8,9])
sage: Fd = F.dual_group(names="ABC")                                            # needs sage.rings.number_field
sage: A,B,C = Fd.gens()                                                         # needs sage.rings.number_field
sage: A*B^-1 in Fd                                                              # needs sage.rings.number_field
True
exponents()#

The exponents of the generators defining the group element.

OUTPUT:

A tuple of integers for an abelian group element. The integer can be arbitrary if the corresponding generator has infinite order. If the generator is of finite order, the integer is in the range from 0 (inclusive) to the order (exclusive).

EXAMPLES:

sage: F.<a,b,c,f> = AbelianGroup([7,8,9,0])
sage: (a^3*b^2*c).exponents()
(3, 2, 1, 0)
sage: F([3, 2, 1, 0])
a^3*b^2*c
sage: (c^42).exponents()
(0, 0, 6, 0)
sage: (f^42).exponents()
(0, 0, 0, 42)
is_trivial()#

Test whether self is the trivial group element 1.

OUTPUT:

Boolean.

EXAMPLES:

sage: G.<a,b> = AbelianGroup([0,5])
sage: (a^5).is_trivial()
False
sage: (b^5).is_trivial()
True
list()#

Return a copy of the exponent vector.

Use exponents() instead.

OUTPUT:

The underlying coordinates used to represent this element. If this is a word in an abelian group on \(n\) generators, then this is a list of nonnegative integers of length \(n\).

EXAMPLES:

sage: # needs sage.rings.number_field
sage: F = AbelianGroup(5,[2, 3, 5, 7, 8], names="abcde")
sage: a,b,c,d,e = F.gens()
sage: Ad = F.dual_group(names="ABCDE")
sage: A,B,C,D,E = Ad.gens()
sage: (A*B*C^2*D^20*E^65).exponents()
(1, 1, 2, 6, 1)
sage: X = A*B*C^2*D^2*E^-6
sage: X.exponents()
(1, 1, 2, 2, 2)
multiplicative_order()#

Return the order of this element.

OUTPUT:

An integer or infinity.

EXAMPLES:

sage: F = AbelianGroup(3,[7,8,9])
sage: Fd = F.dual_group()                                                   # needs sage.rings.number_field
sage: A,B,C = Fd.gens()                                                     # needs sage.rings.number_field
sage: (B*C).order()                                                         # needs sage.rings.number_field
72

sage: F = AbelianGroup(3,[7,8,9]); F
Multiplicative Abelian group isomorphic to C7 x C8 x C9
sage: F.gens()[2].order()
9
sage: a,b,c = F.gens()
sage: (b*c).order()
72
sage: G = AbelianGroup(3,[7,8,9])
sage: type((G.0 * G.1).order())==Integer
True
order()#

Return the order of this element.

OUTPUT:

An integer or infinity.

EXAMPLES:

sage: F = AbelianGroup(3,[7,8,9])
sage: Fd = F.dual_group()                                                   # needs sage.rings.number_field
sage: A,B,C = Fd.gens()                                                     # needs sage.rings.number_field
sage: (B*C).order()                                                         # needs sage.rings.number_field
72

sage: F = AbelianGroup(3,[7,8,9]); F
Multiplicative Abelian group isomorphic to C7 x C8 x C9
sage: F.gens()[2].order()
9
sage: a,b,c = F.gens()
sage: (b*c).order()
72
sage: G = AbelianGroup(3,[7,8,9])
sage: type((G.0 * G.1).order())==Integer
True