New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
changing the string representation of Dirichlet charachters #8133
Comments
comment:1
I put this in the component 'modular forms' since the relevant file dirichlet.py is there. But I think it is a bit odd that this file is there; it should be with number fields, I believe. The attached patch changes the string representation of a Dirichlet character to
I have also created a shorter representation that is used in other
|
This comment has been minimized.
This comment has been minimized.
comment:4
sorry, this is not ready for review ! I fail to see some tests. |
comment:5
Hmmm .... I should also modify book_stein_modform.py. I guess this requires the authorisation of the author. Of course, this patch would not change the answers or the useability of the code in the book, but it would make the output look somewhat prettier. William, what is the verdict on such a change ? |
Replying to @categorie:
I have concerns:
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.
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. |
comment:7
Thanks a lot for the valuable comments. Sorry to insist a bit more on this change. I have been using Dirichlet characters quite a lot recently for p-adic L-functions (of elliptic curves and for zeta functions) and I thought the current printing was not useful. Replying to @williamstein:
I almost agree with you, only with a few minor points :
Totally agree with you on this one. My English is bad and it should read "mapping 5 |--> 1, 7 |--> -1" instead. Yes I did put a dictionary there and I agree that it is not good, exactly because of what I said earlier.
Yes, I agree with both. So as a second attempt I would propose a long representation of the form
or maybe one could print the order, too.
or maybe with () around it. Or we could leave it there as values_on_gens().
... this is of course a valid poitn of taste about which I won't argue about at all. |
Attachment: trac_8133.patch.gz exported against 4.3.4 |
comment:8
So, here is a new version of the patch. This one is ready to be reviewed. It changes the string representation of a Dirichlet character to
but leaves the usual representation within modular form etc, like
If this change is not approved by some, I would propose to make a vote on sage-nt. |
Author: Chris Wuthrich |
comment:9
I like the new output format. But I can see that William might be attached to the old one, being used to (and also responsible for) it. Testing now... |
comment:10
...all tests pass, so I am giving this a positive review --but would not mind opening the discussion up, so will post on sage-nt also). |
Reviewer: John Cremona |
comment:12
After 4 days, there were two responses on sage-nt: a positive one from William, and a suggestion for a few further changes from Robert Bradshaw (see http://groups.google.co.uk/group/sage-nt/browse_thread/thread/be56e6f0e29b44e8).
|
comment:13
Latexing of Dirichlet characters is being tracked at #8584. I have uploaded a new patch there which implements Robert's suggestions (using For what it's worth, I'm also in favour of the change. |
comment:14
I was just about to submit an additional patch (equal to the new one in #8584), because I completely agree with changing the LaTeX representation as well. Thanks David, I will review yours. |
Merged: sage-4.4.alpha0 |
comment:15
Merged "trac_8133.patch" in 4.4.alpha0. |
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)*.CC: @williamstein
Component: modular forms
Keywords: dirichlet characters
Author: Chris Wuthrich
Reviewer: John Cremona
Merged: sage-4.4.alpha0
Issue created by migration from https://trac.sagemath.org/ticket/8133
The text was updated successfully, but these errors were encountered: