LMFDB / lmfdb

L-Functions and Modular Forms Database
Other
252 stars 200 forks source link

modifying display of q-expansion to always have 100 coefficients #6269

Closed assaferan closed 1 hour ago

assaferan commented 3 days ago

Resolving issue #5040

roed314 commented 3 days ago

I think there are more places that need to be changed:

assaferan commented 2 days ago

Oops, thanks for catching this! Should be fixed now.

roed314 commented 1 day ago

I like this change, but I want to hear other opinions about whether the default $$q$$-expansion shown for something like 3.14.a.b (localhost) is too much. If we think there's too much shown by default there, then we might need to tweak the parameters to raw_typeset_qexp which has compress_threshold=100 as a default, and then that variable does not seem to be used....

roed314 commented 1 day ago

@AndrewVSutherland, what do you think?

AndrewVSutherland commented 1 day ago

I'm slightly puzzled as to why it is not compressing the 3.14.a.b q-expansion at all, e.g. as on http://127.0.0.1:37777/ModularForm/GL2/Q/holomorphic/882/4/g/z/

My assumption was that large q-expansions were going to be compressed (indeed, the original objection was that we say "show 100 coefficients" but often don't show 100 coefficients due to compression).

assaferan commented 1 day ago

It seems that until now the q-expansion would only be compressed if there was some compression in the coefficients. I modified it to instead use the compression threshold that was never used, as David suggested, and it seems better now, I think.

roed314 commented 1 day ago

Looks good to me. There are still a few modular forms that aren't compressed (e.g. 3600.1.e.a (localhost)) but most of them are now compressed, which was the intention of #5040.

I'm happy to merge this, but will give @AndrewVSutherland a chance to weigh in.

AndrewVSutherland commented 20 hours ago

Certainly 3600.1.e.a doesn't need any compression!

This looks pretty good, but I think we are being slightly too agresseive on the compression of the number of terms, for example compare

https://beta.lmfdb.org/ModularForm/GL2/Q/holomorphic/680/6/a/f/ (click to see 100 coefficients) http://127.0.0.1:37777/ModularForm/GL2/Q/holomorphic/680/6/a/f/

I think we should be aiming to have compressed q-expansion extend roughly as far as the line above, and it's not the end of the world if it wraps to two lines.

assaferan commented 9 hours ago

Just to be clear, if one looks at https://beta.lmfdb.org/ModularForm/GL2/Q/holomorphic/680/6/a/f/, the compression does not work well (at least not as intended) - there is no compression for the trace, and the form itself is being compressed starting with the first compressed term (which happens to be $$q^{19}$$).

If we are being too aggressive, and would like the threshold to have more characters (e.g. as above), it's easy to do (see this commit, which also continues even if the coefficients are compressed, see e.g. the original http://127.0.0.1:37778/ModularForm/GL2/Q/holomorphic/1/118/a/a/), but line / two lines is display dependent. Do we want the string to depend on the display parameters?

AndrewVSutherland commented 1 hour ago

I thinks this looks good! (and no I don't think we should do anything display dependent)