A Dirichlet character is the extension of a homomorphism (Z/NZ)* → R*, for some ring R, to the map Z → R obtained by sending those integers x with gcd(N,x) >1 to 0.
sage: G = DirichletGroup(21) sage: list(G) [[1, 1], [-1, 1], [1, zeta6], [-1, zeta6], [1, zeta6 - 1], [-1, zeta6 - 1], [1, -1], [-1, -1], [1, -zeta6], [-1, -zeta6], [1, -zeta6 + 1], [-1, -zeta6 + 1]] sage: G.gens() ([-1, 1], [1, zeta6]) sage: len(G) 12
Having created the group, we next create an element and compute with it.
sage: chi = G.1; chi [1, zeta6] sage: chi.values() [0, 1, zeta6 - 1, 0, -zeta6, -zeta6 + 1, 0, 0, 1, 0, zeta6, -zeta6, 0, -1, 0, 0, zeta6 - 1, zeta6, 0, -zeta6 + 1, -1] sage: chi.conductor() 7 sage: chi.modulus() 21 sage: chi.order() 6 sage: chi(19) -zeta6 + 1 sage: chi(40) -zeta6 + 1
It is also possible to compute the action of the Galois group Gal(Q(ζN)/Q) on these characters, as well as the direct product decomposition corresponding to the factorization of the modulus.
sage: G.galois_orbits() [ [[1, 1]], [[1, zeta6], [1, -zeta6 + 1]], [[1, zeta6 - 1], [1, -zeta6]], [[1, -1]], [[-1, 1]], [[-1, zeta6], [-1, -zeta6 + 1]], [[-1, zeta6 - 1], [-1, -zeta6]], [[-1, -1]] ] sage: G.decomposition() [ Group of Dirichlet characters of modulus 3 over Cyclotomic Field of order 6 and degree 2, Group of Dirichlet characters of modulus 7 over Cyclotomic Field of order 6 and degree 2 ]
Next, we construct the group of Dirichlet characters mod 20, but with values in Q(i):
sage: G = DirichletGroup(20) sage: G.list() [[1, 1], [-1, 1], [1, zeta4], [-1, zeta4], [1, -1], [-1, -1], [1, -zeta4], [-1, -zeta4]]
We next compute several invariants of G
:
sage: G.gens() ([-1, 1], [1, zeta4]) sage: G.unit_gens() [11, 17] sage: G.zeta() zeta4 sage: G.zeta_order() 4
In this example we create a Dirichlet character with values in a
number field. We explicitly specify the choice
of root of unity by the third argument to DirichletGroup
below.
sage: x = polygen(QQ, 'x') sage: K = NumberField(x^4 + 1, 'a'); a = K.0 sage: b = K.gen(); a == b True sage: K Number Field in a with defining polynomial x^4 + 1 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]]
Here NumberField(x^4 + 1, 'a')
tells Sage
to use the symbol ``a'' in printing what K
is
(a ``Number Field in a with defining polynomial x4 + 1'').
The name ``a'' is undeclared at this point.
Once a = K.0
(or equivalently a = K.gen()
)
is evaluated, the symbol ``a'' represents a root
of the generating polynomial x4 + 1.
See About this document... for information on suggesting changes.