Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Trac 6018: improve repr() of Dirichlet groups
Browse files Browse the repository at this point in the history
  • Loading branch information
pjbruin committed Jul 20, 2015
1 parent d0bb0e4 commit 1431319
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 90 deletions.
11 changes: 4 additions & 7 deletions src/doc/de/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,8 @@ Faktorisierung des Moduls entsprechen.

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
Group of Dirichlet characters modulo 3 with values in Cyclotomic Field of order 6 and degree 2,
Group of Dirichlet characters modulo 7 with values in Cyclotomic Field of order 6 and degree 2
]

Als nächstes konstruieren wir die Gruppe der Dirichlet-Charaktere
Expand All @@ -348,7 +346,7 @@ mod 20, jedoch mit Werten in :math:`\QQ(i)`:
sage: K.<i> = NumberField(x^2+1)
sage: G = DirichletGroup(20,K)
sage: G
Group of Dirichlet characters of modulus 20 over Number Field in i with defining polynomial x^2 + 1
Group of Dirichlet characters modulo 20 with values in Number Field in i with defining polynomial x^2 + 1


Nun berechnen wir mehrere Invarianten von ``G``:
Expand Down Expand Up @@ -381,8 +379,7 @@ Argument von ``DirichletGroup`` an.
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 with values in the group of order 8 generated by a
Group of Dirichlet characters modulo 5 with values in the group of order 8 generated by a in Number Field in a with defining polynomial x^4 + 1
sage: chi = G.0; chi
Dirichlet character modulo 5 of conductor 5 mapping 2 |--> a^2
sage: [(chi^i)(2) for i in range(4)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,7 @@ cyclotomic field.
::

sage: G = DirichletGroup(8); G
Group of Dirichlet characters of modulus 8 over Cyclotomic
Field of order 2 and degree 1
Group of Dirichlet characters modulo 8 with values in Cyclotomic Field of order 2 and degree 1
sage: v = G.list(); v
[Dirichlet character modulo 8 of conductor 1 mapping 7 |--> 1, 5 |--> 1,
Dirichlet character modulo 8 of conductor 4 mapping 7 |--> -1, 5 |--> 1,
Expand All @@ -230,7 +229,7 @@ cyclotomic field.

Sage both represents Dirichlet characters by giving a "matrix",
i.e., the list of images of canonical generators of
:math:`(\ZZ/N\ZZ)^*`, and as vectors modulo and
:math:`(\ZZ/N\ZZ)^*`, and as vectors modulo an
integer :math:`n`. For years, I was torn between these two
representations, until J. Quer and I realized that the best
approach is to use both and make it easy to convert between them.
Expand Down
11 changes: 4 additions & 7 deletions src/doc/en/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,8 @@ factorization of the modulus.

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
Group of Dirichlet characters modulo 3 with values in Cyclotomic Field of order 6 and degree 2,
Group of Dirichlet characters modulo 7 with values in Cyclotomic Field of order 6 and degree 2
]

Next, we construct the group of Dirichlet characters mod 20, but
Expand All @@ -346,7 +344,7 @@ with values in :math:`\QQ(i)`:
sage: K.<i> = NumberField(x^2+1)
sage: G = DirichletGroup(20,K)
sage: G
Group of Dirichlet characters of modulus 20 over Number Field in i with defining polynomial x^2 + 1
Group of Dirichlet characters modulo 20 with values in Number Field in i with defining polynomial x^2 + 1


We next compute several invariants of ``G``:
Expand Down Expand Up @@ -379,8 +377,7 @@ the third argument to ``DirichletGroup`` below.
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 with values in the group of order 8 generated by a
Group of Dirichlet characters modulo 5 with values in the group of order 8 generated by a in Number Field in a with defining polynomial x^4 + 1
sage: chi = G.0; chi
Dirichlet character modulo 5 of conductor 5 mapping 2 |--> a^2
sage: [(chi^i)(2) for i in range(4)]
Expand Down
11 changes: 4 additions & 7 deletions src/doc/fr/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,8 @@ caractères, de même qu'une décomposition en produit direct correspondant

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
Group of Dirichlet characters modulo 3 with values in Cyclotomic Field of order 6 and degree 2,
Group of Dirichlet characters modulo 7 with values in Cyclotomic Field of order 6 and degree 2
]

Construisons à present le groupe de caractères de Dirichlet modulo 20,
Expand All @@ -347,7 +345,7 @@ mais à valeur dans :math:`\QQ(i)`:
sage: K.<i> = NumberField(x^2+1)
sage: G = DirichletGroup(20,K)
sage: G
Group of Dirichlet characters of modulus 20 over Number Field in i with defining polynomial x^2 + 1
Group of Dirichlet characters modulo 20 with values in Number Field in i with defining polynomial x^2 + 1

Nous calculons ensuite différents invariants de ``G``:

Expand Down Expand Up @@ -380,8 +378,7 @@ de la racine de l'unité par le troisième argument de la fonction
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 with values in the group of order 8 generated by a
Group of Dirichlet characters modulo 5 with values in the group of order 8 generated by a in Number Field in a with defining polynomial x^4 + 1
sage: chi = G.0; chi
Dirichlet character modulo 5 of conductor 5 mapping 2 |--> a^2
sage: [(chi^i)(2) for i in range(4)]
Expand Down
11 changes: 4 additions & 7 deletions src/doc/pt/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,8 @@ módulo.
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
Group of Dirichlet characters modulo 3 with values in Cyclotomic Field of order 6 and degree 2,
Group of Dirichlet characters modulo 7 with values in Cyclotomic Field of order 6 and degree 2
]

A seguir, construímos o grupo de caracteres de Dirichlet mod 20, mas
Expand All @@ -348,7 +346,7 @@ com valores em :math:`\QQ(i)`:
sage: K.<i> = NumberField(x^2+1)
sage: G = DirichletGroup(20,K)
sage: G
Group of Dirichlet characters of modulus 20 over Number Field in i with defining polynomial x^2 + 1
Group of Dirichlet characters modulo 20 with values in Number Field in i with defining polynomial x^2 + 1

Agora calculamos diversos invariantes de ``G``:

Expand Down Expand Up @@ -380,8 +378,7 @@ unidade no terceiro argumento do comando ``DirichletGroup`` abaixo.
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 with values in the group of order 8 generated by a
Group of Dirichlet characters modulo 5 with values in the group of order 8 generated by a in Number Field in a with defining polynomial x^4 + 1
sage: chi = G.0; chi
Dirichlet character modulo 5 of conductor 5 mapping 2 |--> a^2
sage: [(chi^i)(2) for i in range(4)]
Expand Down
11 changes: 4 additions & 7 deletions src/doc/ru/tutorial/tour_advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,8 @@ Sage может вычислить тороидальный идеал непл

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
Group of Dirichlet characters modulo 3 with values in Cyclotomic Field of order 6 and degree 2,
Group of Dirichlet characters modulo 7 with values in Cyclotomic Field of order 6 and degree 2
]

Далее надо построить группу символов Дирихле по модулю 20, но со значениями
Expand All @@ -311,7 +309,7 @@ Sage может вычислить тороидальный идеал непл
sage: K.<i> = NumberField(x^2+1)
sage: G = DirichletGroup(20,K)
sage: G
Group of Dirichlet characters of modulus 20 over Number Field in i with defining polynomial x^2 + 1
Group of Dirichlet characters modulo 20 with values in Number Field in i with defining polynomial x^2 + 1


Теперь посчитаем несколько инвариант ``G``:
Expand Down Expand Up @@ -343,8 +341,7 @@ Sage может вычислить тороидальный идеал непл
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 with values in the group of order 8 generated by a
Group of Dirichlet characters modulo 5 with values in the group of order 8 generated by a in Number Field in a with defining polynomial x^4 + 1
sage: chi = G.0; chi
Dirichlet character modulo 5 of conductor 5 mapping 2 |--> a^2
sage: [(chi^i)(2) for i in range(4)]
Expand Down
2 changes: 1 addition & 1 deletion src/sage/misc/functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def decomposition(x):
[Dirichlet character modulo 4 of conductor 4 mapping 3 |--> -1,
Dirichlet character modulo 5 of conductor 5 mapping 2 |--> zeta4]
sage: d[0].parent()
Group of Dirichlet characters of modulus 4 over Cyclotomic Field of order 4 and degree 2
Group of Dirichlet characters modulo 4 with values in Cyclotomic Field of order 4 and degree 2
"""
return x.decomposition()

Expand Down
Loading

0 comments on commit 1431319

Please sign in to comment.