#8133: changing the string representation of Dirichlet charachters
-----------------------------+----------------------------------------------
Reporter: wuthrich | Owner: craigcitro
Type: defect | Status: needs_work
Priority: major | Milestone: sage-4.3.2
Component: modular forms | Keywords: dirichlet characters
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-----------------------------+----------------------------------------------
Comment(by was):
Replying to [ticket:8133 wuthrich]:
> The current representation of Dirichlet characters as something like
{{{[1,zeta6,-1]}}} is not very helpful, especially because it is not even
clear what generator we are talking about in (Z/N)*.
>
I have concerns:
1. First, you can easily get the generators of the Dirichlet group. I do
not think they have to be given explicitly in the print representation
(just like the basis for a vector space doesn't have to be given in a
matrix). See below -- just use the {{{unit_gens()}}} method to find out
the gens that are being mapped.
{{{
sage: G.<a,b,c> = DirichletGroup(40)
sage: b
[1, -1, 1]
sage: a
[-1, 1, 1]
sage: c
[1, 1, zeta4]
sage: G.unit_gens()
[31, 21, 17]
}}}
2. There are potential issues with your suggested change:
{{{
Dirichlet character modulo 12 of conductor 4 mapping the generators to {5:
1, 7: -1}
}}}
The problem is that it literally makes no sense to read it. The
generators don't get mapped to a Python dictionary. It's like a mixed
metaphor. Moreover, if you use Python dictionary notation, maybe you
really have a dictionary there, so the keys can come in random order,
which is bad.
3. If we're going to make some big change, it would be better to make it
consistent with ring homomorphisms, which all do print in the same way:
{{{
sage: R.<x,y> = QQ[]}}}
sage: phi = R.hom([y^3,x-3]); phi
Ring endomorphism of Multivariate Polynomial Ring in x, y over Rational
Field
Defn: x |--> y^3
y |--> x - 3
}}}
However, this notation is definitely too heavy as is for Dirichlet
characters.
I'm not going to suggest a change, since I actually like how Dirichlet
characters are currently printed.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8133#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.