Magma Instability

I had occasion to return to some magma scripts I wrote in 2012. I the script used a number of pre-computed auxiliary files with computations, and was a little complicated, but didn’t use anything particularly complicated. So I was really surprised to run them in 2023 and find that they no longer worked. That is, they compiled, but the results they gave were different (and also incompatible with the truth). It was quite confusing to understand what has gone wrong, but eventually I traced it to the following. Early on in the file one has (having defined \(t\) as a variable using code that’s easy to write but which is somehow causing issues with wordpress):

F := NumberField(t^2 – 5);
ZF:=Integers(F);

So far, so good. But later on, the script called upon elements of \(F\) of the form \(\texttt{ZF![a,b]}\). But it turns out that if \(\texttt{x:=ZF[0,1]}\) that

\(x^2 + x = 1\)

in 2012, but

\(x^2 – x = 1\)

in 2023; that is, \(x\) was replaced by \(-x\), which is not an automorphism. I have no idea how or why that changed, but it certainly broke everything and took several days to fix. Annoying!

This entry was posted in Mathematics and tagged , . Bookmark the permalink.

3 Responses to Magma Instability

  1. Nathan Dunfield says:

    I get x^2 – x = 1 in an old copy of Magma 2.21-8. As the first version of Magma 2.21 came out in 2014, your scripts might have broken not long after you wrote them.

    My guess is the cause is a change in the algorithm that computes an integral basis for a number field, which has the side-effect of giving a different answer for this one.

    • Persiflage says:

      Interestingly this was run on your computer! Here’s the first line of the output file:

      Magma V2.18-7 Thu Jul 12 2012 20:44:42 on dehn [Seed = 1156871683]

      Also, I guess I should be 100% precise about the code, it starts out:

      Q := PolynomialRing(Rationals());
      F := NumberField(x^2 – 5);
      ZF:=Integers(F);

      (and then one should consider ZF![0,1], etc… just in case that makes any difference).

      • Nathan Dunfield says:

        I suspect the change was introduced in 2.21, where the release notes include:

        “There is a new implementation of size reduction of an element by multiplication by units of the maximal order. This size reduction is now done in all situations where one would expect it to be done, for example in choosing a generator for a principal ideal and so on.”

        given that the two answers do differ by -1.

Leave a Reply

Your email address will not be published. Required fields are marked *