A Long and Lasting Love File Format
Mathematicians absolutely love data! A common misconception by people who are not involved with the natural sciences is that mathematics is already "finished". That we already know everything we need and that no more active research is being done. It may therefore be hard to imagine that research data plays a fundamental role in today's mathematical research. But just like physicists perform experiments to analyze properties, mathematicians also gather data about the objects they study. But what does mathematical research data look like? What is it used for? And why is it important? What kind of challenges does one encounter when handling mathematical data?
The reason mathematics was originally developed was to try and understand our universe better. People observed real-life phenomena and developed abstract concepts like fractions, angles, coordinates, etc. in order to be able to formulate problems and think about them.
But as mathematics has grown, so has the complexity of the objects that are being studied. It is therefore quite common that mathematicians try to classify and list properties of the objects they're working with. Think of something like the periodic table in chemistry, but then for mathematical objects!
In the following, we're going to discuss a few mathematical objects (some simple, some more complicated) and discuss how these objects are stored as data.
Platonic Solids

Click Image for Interaction.
Link to open on an external website
Credits: Polyhedra interactive app by Jürgen Richter-Gebert (Science to Touch / TU Munich), part of the Math to Touch collection.
Elliptic Curves

Click Image for Interaction.
Link to open on an external website
Credits: Simple interactive prototype by IMAGINARY.
A database containing elliptic curves and file formats
As elliptic curves play an essential role in number theory (They were used in the proof of Fermat's Last Theorem for example.) and cryptography, mathematicians have created a database storing as much information about elliptic curves and related objects as possible.
This database is called the LMFDB:
A more general equation of an elliptic curve is one of the form:
y^2 +a1*y + a3*x*y = x^3 + a2* x^2 +a4*x + a6
which is the one that is also being used in the database. Take a look at the curve
https://www.lmfdb.org/EllipticCurve/Q/30/a/6
for example. One sees that a lot of additional data is being stored that keeps track of properties of the elliptic curve. Having this database allows researchers to find elliptic curves with very specific properties or study their behavior by looking at families of them. This can then, for example, successfully be used to find weaknesses in cryptographic protocols and patch those weaknesses to further increase the security of web based interactions!
The following link shows how the data is being stored in the database:
https://www.lmfdb.org/EllipticCurve/Q/data/30.a6
It's a lot more complicated than a simple list of numbers!
Algebraic Surfaces

Click Image for Interaction.
Link to open on an external website: love.imaginary.org
Credits: Raytracer by Aaron Montag, created using CindyJS by Jürgen Richter-Gebert.
What to do?
You can play with a polynomial equation in 3 variables and in real-time see the (real) algebraic surface defined by the zero set of the polynomial! The bars on the right are parameters a and b between 0 and 1, which you can use in the equation and the zoom level. Whenever you change the equation, click on "Redraw" to see the new surface.
The created images are used in research papers and also for math outreach to show the beauty of and the love for maths. The heart is given by its equation. You can change the last cube of the equation into a square and see how the "heart falls into your trousers". This is a German proverb "Das Herz rutscht in die Hose", in our case it is an "Unterhose" (slip).
More equations to play with
Here are some examples of other equations you can try:
x^6+y^6+z^6-1 y*z*(x^2+y-z) x^2+y^2-z^2+a-0.5 x^2+y^2+z^2+2*x*y*z-1 x^2-x^3+y^2+y^4+z^3-z^4 1.2*x^2+1.2*z^2-5*(y+0.5)^3*(0.5-y)^3 (x^2+y^2+z^2-1)*((x-3*a)^2+y^2+z^2-1) 4*((a*(1+sqrt(5))/2)^2*x^2-y^2)*((a*(1+sqrt(5))/2)^2*y^2-z^2)*((a*(1+sqrt(5))/2)^2*z^2-x^2)-1*(1+2*(a*(1+sqrt(5))/2))*(x^2+y^2+z^2-1)^2
Images and file formats
How would you save/archive/store the images? It could be a 2d image, or - better and smaller and more flexible- the equation that creates the image? But the equation alone does not define the whole image - you would need properties such as the rotation in space, the light model (colors?), the zoom level, etc. And maybe also the root finder and info on the parser of the equation?
File formats and software
To summarize, we would need a good file format, that works in the given software. Then we can recreate the image in our resolution and even change it and re-use it in a flexible way! Only, the software used here in the widget is an openly licensed raytracer written in CindyJS, where no file format for the equations exists so far. There is an older also openly licensed software called SURFER, that has become very difficult to further update, since a main user interface library is not maintained anymore. It is written in Java and has a .jsurf file format for its "surfaces", see here for an example. It uses the standard Java properties format, but has no proper documentation. Then, there is an even older, fully out-of-maintenance, software called Surf, written in C++. It has a non-standardized .pic file format, see here for an example. This one has a documentation and includes also more details as the used root finder.
Problems with data infrastructure and file formats
With the rise of computers, we have seen a large increase in the size and the complexity of the data mathematicians use. In the past, we only had books like the atlas of finite groups in which some data was written down, but nowadays a database like the LMFDB, for example, contains multiple Terabytes of data.
And more data gets produced every day! Papers with new results get published at a very high speed and we currently simply do not have the infrastructure available for supporting the huge influx of data that comes with it. There are several aspects to consider here:
If we make a database of objects of a certain type available, other researchers will use this data to produce new results. But we want to make sure that this classification is complete, i.e. that we have all of the objects in our database (like we hopefully convinced you there are only 5 platonic solids) and that the data is correct. But how can we ensure this? Sometimes computations can take months or years to complete. And it's very easy to make a small mistake in the code written to perform the computations. Especially if this code is very complicated.
And what if the data was produced using closed-source software? If I can look at the code I can convince myself that the way the data was produced makes sense mathematically. But if I can't... anything could have happened behind the scenes. The authors could've written the code in such a way that it outputs exactly the results they want to see as output in the cases they describe in their paper and simply spit out nonsense any other time.
We want other researchers to use (or reuse) the data that has been computed. But will they actually be able to find it? With the huge influx of papers, it is sometimes difficult to get an overview of everything that is out there. Additionally, authors of papers are not always aware of best practices concerning the publication of data. A common scenario is the following: An author puts the data on their own website. They move to a different university after a few years. The website gets deleted. The data is gone forever and other people will need to redo the computations.
Who is going to pay for storing computed data? If the data is just a couple of MB it's probably not too hard to find a place to put it, but what if it is several Gigabytes?
In other areas of sciences, most data will consist of lists of numbers. Mathematical objects however can get very complicated very quickly and one therefore has to think carefully about how to store it. Especially if you want other people to be able to load the objects again in their favorite software package (which might not be the one you used for your computations). Currently, there is no universally agreed-upon standard for this. Think about polynomials, for example. A polynomial in one variable x with rational coefficients is simple enough. But what if the polynomial was defined over a field extension L of QQ? Then we would also need to store the field L. But there is no canonical way to define the field L. We need to choose a specific polynomial defining the field extension L over QQ and store this with the data. But maybe L was defined as a field extension over a field that was not QQ. And then you need to deal with it differently again. And how do you store a polynomial with multiple variables? Do you consider x^2 +x*y to be a polynomial in y over the ring k[x]? Or is it an element of k[x,y]? There are many more questions like this that could be asked and it is not easy to find a file format that is universally accepted by everyone.
Within MaRDI we work on possible solutions for these problems with a special focus on mathematical research data. Please subscribe to our newsletter to keep up to date on our findings!
Our Newsletter "Math & Data Quarterly" is prepared by our partner IMAGINARY. Sign up to get it delivered straight to your inbox quaterly or check it out online.
