Clean up printing
jvoight opened this issue · 4 comments
If you run (from the demo):
F:=QuadraticField(13);
prec:=4;
M:=GradedRingOfHMFs(F, prec);
M2 := HMFSpace(M, [2,2]);
Basis(M2);
you get:
> Basis(M2);
[
Hilbert modular form expansion: Parent: Space of Hilbert modular forms over Quadratic Field with defining polynomial x^2 - 13 over the Rational Field
Precision: 4
Weight: [ 2, 2 ]
Character: 1
Level: 1
UnitCharacters: [ 1 ]
Component of Hilbert modular form expansion with precision 4.
Parent: Space of Hilbert modular forms over Quadratic Field with defining polynomial x^2 - 13 over the Rational Field
Precision: 4
Weight: [ 2, 2 ]
Character: 1
Level: 1
UnitCharacters: [ 1 ]
Coefficients for component ideal class bb = Principal Ideal
Generator:
1
(Trace, nu) |---> a_nu
(0, 0) |---> 1
(1, 5/13*$.1 + 3/13*$.2) |---> 24
(1, 6/13*$.1 + 1/13*$.2) |---> 96
(1, 7/13*$.1 - 1/13*$.2) |---> 96
(2, 10/13*$.1 + 6/13*$.2) |---> 120
(2, 11/13*$.1 + 4/13*$.2) |---> 312
(2, 12/13*$.1 + 2/13*$.2) |---> 480
(2, $.1) |---> 336
(2, 14/13*$.1 - 2/13*$.2) |---> 480
(2, 15/13*$.1 - 4/13*$.2) |---> 312
...
]
I propose that we find a way to get rid of the $'s and make the text appearing before it less repetitive.
A simple thing would be
- don't repeat the parent when you're listing elements (so have a shorter print for them), and
- Coerce things like 14/13*$.1 - 2/13*$.2 back into the base field. I think the
$.1 and $ .2 must be from the field of fractions of the ring of integers, which in Magma is a different thing than the number field (linear algebra reasons: they have different bases).
Another thought: do we really care what the elements nu are? Maybe we just want to know the norm?
Thoughts:
- In the sense that a LaurentSeriesRing or a PolynomialRing don't print their parents, does this make sense for HMFs as well?
- Can we align the "|---> " symbols?
- Personally, I like the nu. I feel like it is a clear representation of the data being represented.
- Can we support a horizontal printing mode? Something like
Hilbert Modular form with lattice q-expansion coefficients
| Trace | 0 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 |
| nu | 0 | 5/13*$.1 + 3/13*$.2 | 6/13*$.1 + 1/13*$.2 | 7/13*$.1 - 1/13*$.2 | 10/13*$.1 + 6/13*$.2 | 11/13*$.1 + 4/13*$.2 | 12/13*$.1 + 2/13*$.2 | $.1 | 14/13*$.1 - 2/13*$.2 | 15/13*$.1 - 4/13*$.2 |
| a_nu | 1 | 24 | 96 | 96 | 120 | 312 | 480 | 336 | 480 | 312 |
Alternatively, because the denominator of the nu are always the same,
Hilbert Modular form with lattice q-expansion coefficients
| Trace | 0 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 |
| 13 * nu | 0 | 5*$.1 + 3*$.2 | 6*$.1 + 1*$.2 | 7*$.1 - 1*$.2 | 10*$.1 + 6*$.2 | 11*$.1 + 4*$.2 | 12*$.1 + 2*$.2 | $.1 | 14*$.1 - 2*$.2 | 15*$.1 - 4*$.2 |
| a_nu | 1 | 24 | 96 | 96 | 120 | 312 | 480 | 336 | 480 | 312 |
Or even
Hilbert Modular form with lattice q-expansion coefficients
| Trace | 0 | 1 | 1 | 1 | 2 | 2 | 2 | 2 | 2 | 2 |
| 13 * nu | 0 | 5*x + 3*y | 6*x + 1*y | 7*x - 1*y | 10*x + 6*y | 11*x + 4*y | 12*x + 2*y | x | 14*x - 2*y | 15*x - 4*y |
| a_nu | 1 | 24 | 96 | 96 | 120 | 312 | 480 | 336 | 480 | 312 |
where (x,y) := ($.1, $.2).
I have some thoughts about how to deal with when it overflows the number of set columns.
Here are my thoughts on number of set columns
SetColumns(0);
SetAutoColumns(false);
Not sure if it will look better to write things in terms of a ZZ-basis for the fractional ideal bb^# (where the coefficients live) and print that basis, or to just force things into the base field, multiply through by a common denominator, and write like 6 + sqrt(5) with denominator 13.
Maybe folks also want to see the norm?