7.2.1.2 DirichletGroup Objects

class DirichletGroup
The DirichletGroup class represents the group of all Dirichlet characters modulo $ N$ over a given base ring $ R$ .
DirichletGroup( modulus, [base_ring=None], [zeta=None], [zeta_order=None])

One can create the group of Dirichlet characters modulo $ N$ with values in the subgroup $ \langle \zeta_n\rangle$ of the multiplicative group of the base_ring. If the base_ring is omitted then we use $ \mathbf{Q}(\zeta_n)$ , where $ n$ is the exponent of $ (\mathbf{Z}/N\mathbf{Z})^*$ . If $ \zeta$ is omitted then we compute and use a maximal-order zeta in base_ring, if possible.

INPUT:
    modulus -- int
    base_ring -- Ring (optional), where characters take their
values
                 (should be an integral domain).
    zeta -- Element (optional), element of base_ring; zeta is a
root of unity
    zeta_order -- int (optional), the order of zeta

OUTPUT:
    DirichletGroup -- a group of Dirichlet characters.

NOTES: Uniqueness - If a group is created with the same parameters as another DirichletGroup still in memory, then the same group is returned instead of a new group defined by the same parameters.

The default base ring is a cyclotomic field of order the exponent of $ (\mathbf{Z}/N\mathbf{Z})^*$ .

sage: DirichletGroup(20)
Group of Dirichlet characters of modulus 20 over Cyclotomic
Field of order 4 and degree 2

We create the group of Dirichlet character mod 20 with values in the rational numbers:

sage: G = DirichletGroup(20, rings.RationalField()); G
Group of Dirichlet characters of modulus 20 over Rational Field
sage: G.order()
4
sage: G.base_ring()
Rational Field

The elements of G print as lists giving the values of the character on the generators of $ (Z/NZ)^*$ :

sage: list(G)
[[1,1], [-1,1], [1,-1], [-1,-1]]

Next we construct the group of Dirichlet character mod 20, but with values in Q(zeta_n):

sage: G = DirichletGroup(20)
sage: G.list()
[[1,1], [-1,1], [1,zeta_4], [-1,zeta_4], [1,-1], [-1,-1],
[1,-zeta_4], [-1,-zeta_4]]

We next compute several invariants of G:

sage: G.gens()
[[-1,1], [1,zeta_4]]
sage: G.unit_gens()
[11, 17]
sage: G.zeta()
zeta_4
sage: G.zeta_order()
4

In this example we create a Dirichlet character with values in a number field. We have to give zeta, but not its order.

sage: R = rings.PolynomialRing(rings.RationalField()); x = R.gen()
sage: K = rings.NumberField(x**4 + 1); a = K.gen(0)
sage: G = DirichletGroup(5, K, a); G
Group of Dirichlet characters of modulus 5 over Number Field in
a with defining polynomial x^4 + 1
sage: G.list()
[[1], [a^2], [-1], [-a^2]]

Instances of class DirichletGroup have the following functions (in addition to inherited functions and special functions):

base_ring,$  $ change_base,$  $ decomposition,$  $ galois_orbits,$  $ gen,$  $ gens,$  $ integers_mod,$  $ modulus,$  $ ngens,$  $ order,$  $ primitive_character,$  $ random_element,$  $ unit_gens,$  $ zeta,$  $ zeta_order

Further documentation:

base_ring( )

Returns the base ring of self.

change_base( R)

Returns the Dirichlet group over R with the same modulus as self.

decomposition( )

Returns the Dirichlet groups of prime power modulus corresponding to primes dividing modulus.

galois_orbits( )

Return a list of the Galois orbits of Dirichlet characters in self.

The Galois group is the absolute Galois group of the prime subfield of Frac(R).

gens( )

Returns generators of self.

integers_mod( )

Returns the group of integers $ \mathbf{Z}/N\mathbf{Z}$ where $ N$ is the modulus of self.

modulus( )

Returns the modulus of self.

ngens( )

Returns the number of generators of self.

primitive_character( )

Returns the primitive character associated to self.

unit_gens( )

Returns the minimal generators for the units of $ (\mathbf{Z}/N\mathbf{Z})^*$ , where $ N$ is the modulus of self.

zeta( )

Returns the chosen root zeta of unity in the base ring $ R$ .

zeta_order( )

Returns the order of the chosen root zeta of unity in the base ring $ R$ .

Instances of class DirichletGroup also have the following special functions:

__call__,$  $ __cmp__,$  $ __len__

See About this document... for information on suggesting changes.