alexjbest / cluster-pictures

This package implements the machinery of cluster pictures of Maistret, Morgan, Dokchitser and Dokchitser in Sage.
https://alexjbest.github.io/cluster-pictures/
GNU General Public License v2.0
3 stars 4 forks source link

Conductor cannot be computed for genus 2 curve '249.a.249.1' at prime 3 #34

Closed rbommel closed 4 years ago

rbommel commented 4 years ago

I got the following error:

/scratch/home/bommel/lmfdb/sage_cluster_pictures/cluster_pictures.py in conductor_exponent(self)
   2604         Compute the conductor exponent of the Jacobian of the curve associated to ``self``.
   2605         """
-> 2606         return self.n_wild() + self.n_tame()
   2607 
   2608     def __hash__(self):

/scratch/home/bommel/lmfdb/sage_cluster_pictures/cluster_pictures.py in n_wild(self)
   2584         if self.leading_coefficient().parent().prime() > 2*self.curve_genus() + 1:
   2585             return 0
-> 2586         rs = DisjointSet(self.roots())
   2587         for r in self.roots():
   2588             rs.union(r, self.field_frobenius()(r))

/scratch/sage/sage-9.1/local/lib/python3.7/site-packages/sage/sets/disjoint_set.pyx in sage.sets.disjoint_set.DisjointSet (build/cythonized/sage/sets/disjoint_set.c:3654)()
    140         return DisjointSet_of_integers(arg)
    141     else:
--> 142         return DisjointSet_of_hashables(arg)
    143 
    144 cdef class DisjointSet_class(SageObject):

/scratch/sage/sage-9.1/local/lib/python3.7/site-packages/sage/sets/disjoint_set.pyx in sage.sets.disjoint_set.DisjointSet_of_hashables.__init__ (build/cythonized/sage/sets/disjoint_set.c:6239)()
    657         for (i,e) in enumerate(iterable):
    658             self._int_to_el.append(e)
--> 659             self._el_to_int[e] = i
    660         self._d = DisjointSet_of_integers(len(self._int_to_el))
    661         self._nodes = self._d._nodes

/scratch/sage/sage-9.1/local/lib/python3.7/site-packages/sage/rings/padics/CR_template.pxi in sage.rings.padics.relative_ramified_CR.CRElement.__hash__ (build/cythonized/sage/rings/padics/relative_ramified_CR.c:29526)()
   1520         if exactzero(self.ordp):
   1521             return 0
-> 1522         return chash(self.unit, self.ordp, self.relprec, self.prime_pow) ^ self.ordp
   1523 
   1524 cdef class pAdicCoercion_ZZ_CR(RingHomomorphism):

/scratch/sage/sage-9.1/local/lib/python3.7/site-packages/sage/libs/linkages/padics/Polynomial_shared.pxi in sage.rings.padics.relative_ramified_CR.chash (build/cythonized/sage/rings/padics/relative_ramified_CR.c:7016)()
    378         return 0
    379 
--> 380     return hash((a._cache_key(), ordp, prec))
    381 
    382 cdef int cconv(celement out, x, long prec, long valshift, PowComputer_ prime_pow) except -2:

/scratch/sage/sage-9.1/local/lib/python3.7/site-packages/sage/rings/padics/qadic_flint_FP.pyx in sage.rings.padics.qadic_flint_FP.qAdicFloatingPointElement.__hash__ (build/cythonized/sage/rings/padics/qadic_flint_FP.c:36905)()
    161         # elements (#11895), until then, we only to this for types which did
    162         # not support hashing before we switched some elements to FLINT
--> 163         raise TypeError("unhashable type: 'sage.rings.padics.qadic_flint_FP.qAdicFloatingPointElement'")

TypeError: unhashable type: 'sage.rings.padics.qadic_flint_FP.qAdicFloatingPointElement'
alexjbest commented 4 years ago

I had a look at this, and tried to improve n_wild a bit, it should now do approximately the right thing, but there are a lot of problems. The main one is that we need to take the smallest field generated by a root, and I try this with minimal_polynomial, which doesn't work for composite extensions of local fields in Sage yet it seems. The other one is that I take galois of roots, but this has precision issues as you saw before, it would be better to take the galois action on size 1 clusters to make use of what you already did, but seeing as there are such obvious problems still I didn't bother yet. It would be good to write down some tests that we know are "easy" i.e. there is only a degree 2 or 3 or 4 extension involved or something, yet n_wild > 0.

For now skipping p = 3 for genus 2 curves whenever this fails seems like all we can do.

rbommel commented 4 years ago

Yeah, I think it is better to wait for Sage to improve its p-adic machinery, allowing for factorisation over these extensions, and then also extensions of extensions, hopefully.

alexjbest commented 4 years ago

John Jones' webpage which looks to be based on pari/gp scripts has some pretty useful looking functionality, https://math.la.asu.edu/~jj/localfields/ . It can decompose any algebra into a product of local fields, and gives many relevant bits of info, maybe we can use these scripts somehow from within sage.

rbommel commented 4 years ago

Yeah, another option is to look up the field in the LMFDB. But I feel that the problem should be easier. We already have defining polynomials.

alexjbest commented 4 years ago

Well we have defining polys for the full field of all roots, but even they are relative extensions in many cases. For this we really need to get the fields for the separate roots. And Sage won't take minpolys over these stacked extensions yet. But yes LMFDB lookup is also an option. John's page seems more powerful though as you can type any equation.

rbommel commented 4 years ago

I don't think you can type in anything. It seems to be based on a finite database. But maybe you are right that the interface is nicer, could be.

alexjbest commented 4 years ago

Of course I don't mean any equation. But you can type in a p and an equation defining an algebra, not just a field, and get its decomposition as a product of local fields. As far as I know the lmfdb doesnt have any lookup by polynomial functionality for local fields at all.

rbommel commented 4 years ago

Yeah, I think that's true. The best you can get is listing all fields with certain parameters, and then testing in which one your polynomial has a root.