sagemath / sage

Main repository of SageMath
https://www.sagemath.org
Other
1.37k stars 462 forks source link

Fix printing of Dirichlet characters #17338

Closed pjbruin closed 9 years ago

pjbruin commented 9 years ago

Dirichlet characters modulo 2 are printed in a strange way:

sage: DirichletGroup(2)[0]
Dirichlet character modulo 2 of conductor 1 mapping 

After #17337, this also happens for Dirichlet characters modulo 1.

This ticket makes Dirichlet characters modulo 1 and 2 print as

sage: DirichletGroup(1)[0]
Dirichlet character modulo 1 of conductor 1
sage: DirichletGroup(2)[0]
Dirichlet character modulo 2 of conductor 1

and uses the mapping ... only for conductors >= 3:

sage: DirichletGroup(3)[1]
Dirichlet character modulo 3 of conductor 1 mapping 2 |--> -1

Depends on #17337

CC: @jdemeyer

Component: number theory

Keywords: Dirichlet characters

Author: Peter Bruin

Branch/Commit: f431aad

Reviewer: Volker Braun

Issue created by migration from https://trac.sagemath.org/ticket/17338

pjbruin commented 9 years ago

Branch: u/pbruin/17338-DirichletCharacter_printing

pjbruin commented 9 years ago

Commit: f431aad

vbraun commented 9 years ago

Reviewer: Volker Braun

vbraun commented 9 years ago

Changed branch from u/pbruin/17338-DirichletCharacter_printing to f431aad