How to clear stored LSeries coefficients in Magma

148 Views Asked by At

If I run the following code in MAGMA:

_<x>:=PolynomialRing(Rationals());
C:=HyperellipticCurve(2*x^5+x^4-12*x^3+17*x-9,x^3+x);
K:=Subfields(CyclotomicField(31),5)[1,1];
rho:=ArtinRepresentations(K)[2];
Evaluate(LSeries(C,rho:Precision:=10),1);

where does MAGMA store the L-series coefficients (because if I run the last line again, it completes the computation much faster)?

And, moreover, how do I clear this cache (so that it doesn't run out of memory when executing a "for loop")?

Many thanks!

1

There are 1 best solutions below

2
On BEST ANSWER

There is some data generated that gets attached to the object C itself using an attribute. Attributes are storage containers associated with an object.

Often a function or procedure will need to calculate some auxilliary data, you certainly don't want to recalculate this data every time Magma needs it, but you also don't want to calculate it when creating the object in case you never end up needing it.

For example, if I list the assigned attributes of C before running your last line of code, the following have values assigned to them:

[* GeometricallyIrreducible, Irreducible, Nonsingular, Reduced, SingularSubscheme *]

But after I run your last line of code, the attributes with values assigned:

[* Conductor, Discriminant, GeometricallyIrreducible, Irreducible, LocalData, Nonsingular, Reduced, SingularSubscheme *]

You can view what information is stored here by calling C`fieldname. Quite possible it is not actually saving all of the coefficients of the L-Series, but is saving some other information about this curve that speeds the process up considerably.

Anyway you don't really have to worry about memory problems too much, since this data is actually associated with C, so in your loop, every time C gets reassigned to a new object, these attributes will reset. If it becomes a concern, you can clear them out by calling delete C``fieldname and then Magma will just recompute this data if it needs it again.