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)[source]

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
>>> from sage.all import *
>>> F = AbelianGroup(Integer(3),[Integer(7),Integer(8),Integer(9)])
>>> Fd = F.dual_group(names='ABC')                                            # needs sage.rings.number_field
>>> A,B,C = Fd.gens()                                                         # needs sage.rings.number_field
>>> A*B**-Integer(1) in Fd                                                              # needs sage.rings.number_field
True
F = AbelianGroup(3,[7,8,9])
Fd = F.dual_group(names='ABC')                                            # needs sage.rings.number_field
A,B,C = Fd.gens()                                                         # needs sage.rings.number_field
A*B^-1 in Fd                                                              # needs sage.rings.number_field
exponents()[source]

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)
>>> from sage.all import *
>>> F = AbelianGroup([Integer(7),Integer(8),Integer(9),Integer(0)], names=('a', 'b', 'c', 'f',)); (a, b, c, f,) = F._first_ngens(4)
>>> (a**Integer(3)*b**Integer(2)*c).exponents()
(3, 2, 1, 0)
>>> F([Integer(3), Integer(2), Integer(1), Integer(0)])
a^3*b^2*c
>>> (c**Integer(42)).exponents()
(0, 0, 6, 0)
>>> (f**Integer(42)).exponents()
(0, 0, 0, 42)
F.<a,b,c,f> = AbelianGroup([7,8,9,0])
(a^3*b^2*c).exponents()
F([3, 2, 1, 0])
(c^42).exponents()
(f^42).exponents()
is_trivial()[source]

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
>>> from sage.all import *
>>> G = AbelianGroup([Integer(0),Integer(5)], names=('a', 'b',)); (a, b,) = G._first_ngens(2)
>>> (a**Integer(5)).is_trivial()
False
>>> (b**Integer(5)).is_trivial()
True
G.<a,b> = AbelianGroup([0,5])
(a^5).is_trivial()
(b^5).is_trivial()
list()[source]

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)
>>> from sage.all import *
>>> # needs sage.rings.number_field
>>> F = AbelianGroup(Integer(5),[Integer(2), Integer(3), Integer(5), Integer(7), Integer(8)], names='abcde')
>>> a,b,c,d,e = F.gens()
>>> Ad = F.dual_group(names='ABCDE')
>>> A,B,C,D,E = Ad.gens()
>>> (A*B*C**Integer(2)*D**Integer(20)*E**Integer(65)).exponents()
(1, 1, 2, 6, 1)
>>> X = A*B*C**Integer(2)*D**Integer(2)*E**-Integer(6)
>>> X.exponents()
(1, 1, 2, 2, 2)
# needs sage.rings.number_field
F = AbelianGroup(5,[2, 3, 5, 7, 8], names='abcde')
a,b,c,d,e = F.gens()
Ad = F.dual_group(names='ABCDE')
A,B,C,D,E = Ad.gens()
(A*B*C^2*D^20*E^65).exponents()
X = A*B*C^2*D^2*E^-6
X.exponents()
multiplicative_order()[source]

Return the order of this element.

OUTPUT: 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
>>> from sage.all import *
>>> F = AbelianGroup(Integer(3),[Integer(7),Integer(8),Integer(9)])
>>> Fd = F.dual_group()                                                   # needs sage.rings.number_field
>>> A,B,C = Fd.gens()                                                     # needs sage.rings.number_field
>>> (B*C).order()                                                         # needs sage.rings.number_field
72

>>> F = AbelianGroup(Integer(3),[Integer(7),Integer(8),Integer(9)]); F
Multiplicative Abelian group isomorphic to C7 x C8 x C9
>>> F.gens()[Integer(2)].order()
9
>>> a,b,c = F.gens()
>>> (b*c).order()
72
>>> G = AbelianGroup(Integer(3),[Integer(7),Integer(8),Integer(9)])
>>> type((G.gen(0) * G.gen(1)).order())==Integer
True
F = AbelianGroup(3,[7,8,9])
Fd = F.dual_group()                                                   # needs sage.rings.number_field
A,B,C = Fd.gens()                                                     # needs sage.rings.number_field
(B*C).order()                                                         # needs sage.rings.number_field
F = AbelianGroup(3,[7,8,9]); F
F.gens()[2].order()
a,b,c = F.gens()
(b*c).order()
G = AbelianGroup(3,[7,8,9])
type((G.0 * G.1).order())==Integer
order()[source]

Return the order of this element.

OUTPUT: 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
>>> from sage.all import *
>>> F = AbelianGroup(Integer(3),[Integer(7),Integer(8),Integer(9)])
>>> Fd = F.dual_group()                                                   # needs sage.rings.number_field
>>> A,B,C = Fd.gens()                                                     # needs sage.rings.number_field
>>> (B*C).order()                                                         # needs sage.rings.number_field
72

>>> F = AbelianGroup(Integer(3),[Integer(7),Integer(8),Integer(9)]); F
Multiplicative Abelian group isomorphic to C7 x C8 x C9
>>> F.gens()[Integer(2)].order()
9
>>> a,b,c = F.gens()
>>> (b*c).order()
72
>>> G = AbelianGroup(Integer(3),[Integer(7),Integer(8),Integer(9)])
>>> type((G.gen(0) * G.gen(1)).order())==Integer
True
F = AbelianGroup(3,[7,8,9])
Fd = F.dual_group()                                                   # needs sage.rings.number_field
A,B,C = Fd.gens()                                                     # needs sage.rings.number_field
(B*C).order()                                                         # needs sage.rings.number_field
F = AbelianGroup(3,[7,8,9]); F
F.gens()[2].order()
a,b,c = F.gens()
(b*c).order()
G = AbelianGroup(3,[7,8,9])
type((G.0 * G.1).order())==Integer