LMFDB / lmfdb

L-Functions and Modular Forms Database
Other
242 stars 198 forks source link

Pictures of spectra of ring of integers #5978

Open jvoight opened 3 months ago

jvoight commented 3 months ago

Havard Damm-Johnsen has SageMath code (https://github.com/havarddj/drawspec) to draw the spectrum of the ring of integers of a number field. This could be a nice thing to display on our number field pages?

jwj61 commented 3 months ago

Finally, a picture for number fields!

roed314 commented 3 months ago

I do think his pictures look nice (better than the picture I had in my head along these lines). I have some concerns, though not necessarily fatal ones.

I wonder if we could use a spiral to fit better with the normal LMFDB aspect ratio. I like using colors for different elements of the class group a lot. Rather than having a distinct color for each element of the class group, perhaps it would scale better to have colors correspond to the order in the class group (we could use the schema currently used in finite group pictures to encode orders into colors). I also think using larger points for ramification makes sense, though I kind of wish we could see more detail about what that p-adic extension is, especially when it's wild (different shapes for different local fields maybe?).

Also, we should mention him so he can comment. Hi @havarddj!

roed314 commented 3 months ago

We probably want to be able to generate these pictures on the fly, so we should think about what additional data might need to be stored in order to create them. We already have Frobenius cycle types, but would need orders/elements of the class group for each prime above p for small p in order to support different coloring schemes.

havarddj commented 3 months ago

Hey David! I agree it doesn't work well with the aspect ratio. On the other hand, I would imagine that a scrollable picture somewhere on the page could be useful to some. If you pull the repo and run the jupyter notebook locally you should be able to scroll in the picture at the bottom, which is quite long. This shouldn't be too hard to set up, the only issue perhaps being that the data should be generated on the fly.

I also like the idea of folding it like a spiral around the centre. My concern is that it might be hard to read off information if not done in a minimalist way. Maybe it's useful to start with what $\mathrm{Spec}\ \mathbb Z$ should look like: one could either place the rational primes $p$ at fixed angles, or try to include more information by snapping it to a suitable $p$-th root of unity.

Here's another idea: Instead of ordering the primes linearly, one could sort it "radially", by which I mean in concentric shells around the origin, where the radius is proportional to the norm of the prime, or perhaps the log of it. Then one could highlight the "shell" containing ramified primes. Perhaps showing all the primes is a bit wasteful; one could for example just show primes which represent all possible cycle types $\cup$ generators of the class group. But I'm worried that for quadratic fields, this picture will be boring/ambiguous.

Another idea: we might not really want to display all the primes up to a fixed bound. We definitely want to say something about ramification, and perhaps something about the class group. It would also be nice to show pictorially if it's not Galois, which happens if a rational prime splits into $g$ primes where $g$ does not divide the degree. So perhaps one can draw a single circle around the origin corresponding to $\mathbb{Q}$, and for each prime which ramifies draw the primes in a neighbourhood upstairs, making sure the neighbourhood is big enough to contain the information we want.

Here's a basic mockup which doesn't include colours or ramification info, but should capture the general idea:

spec

edgarcosta commented 3 months ago

I would vote for only dots around a spiral.

My concern is that it might be hard to read off information if not done in a minimalist way.

Usually, our pictures have some information, but I would not say that is their main purpose.

AndrewVSutherland commented 3 months ago

Just to expand on Edgar's comment, the main purpose of the portraits is to provide a visual avatar of the object that can help users to quickly recognize pages they visit frequently, and to distinguish pages for different types of objects (for example, it is very easy to tell at a glance whether you are looking at an elliptic curve portrait or a modular form portrait, even when they have the same L-function). Portraits are not required to be unique, or to completely capture any particular mathematical invariant.

Having said that, it is of course nice to incorporate mathematically meaningful data when this can be done efficiently and in a visually appealing way. They do need to either be precomputed or able to be computed quickly (less than 100ms). For number fields the latter would be preferable, althought the former might be feasible if they can be stored compactly, or if the number of unique portraits is substantially less then the number of disctinct number fields.

jvoight commented 3 months ago

I just want to give a +1 to the idea of displaying a picture at the bottom of the page, perhaps after clicking a button to render it.

jwj61 commented 3 months ago

Also, we would want the properties box picture to be something we can compute for every number field. This rules out anything involving the class group.

roed314 commented 3 months ago

I agree that we shouldn't require information about the class group. But it could be reasonable to have two versions of the picture, one incorporating class group information (if available) using color and/or shape, and the other omitting it (used when we don't have the class group).