Bug in finding generators of elliptic curves over a quadratic domain

已查看 36 次
跳至第一个未读帖子

William Paulsen

未读,
2024年2月26日 12:41:522月26日
收件人 sage-devel
I ran the following code in SageMath 10.2:

sage: K.<a> = QuadraticField(2)
sage: E = EllipticCurve([0, 60/49*a - 135/49, 0, -576/343*a + 904/343, 0]); E
Elliptic Curve defined by y^2 = x^3 + (60/49*a-135/49)*x^2 + (-576/343*a+904/343)*x over Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
sage: E.rank()
1

So I know that the elliptic curve is properly defined, and there should be a generator. But when I try to find the generator:

sage: E.gens_quadratic()

I get the following error:
--------------------------------------------------------------------------- TypeError Traceback (most recent call last) Cell In [5], line 1 ----> 1 E.gens_quadratic() File /ext/sage/10.2/src/sage/schemes/elliptic_curves/ell_number_field.py:4123, in EllipticCurve_number_field.gens_quadratic(self, **kwds) 4121 gens1 = [iso1(P) for P in EQ1.gens(**kwds)] 4122 gens2 = [iso2(P) for P in EQ2.gens(**kwds)] -> 4123 gens = self.saturation(gens1 + gens2, max_prime=2)[0] 4124 self.__gens = gens 4125 return gens File /ext/sage/10.2/src/sage/schemes/elliptic_curves/ell_number_field.py:4042, in EllipticCurve_number_field.saturation(self, points, verbose, max_prime, one_prime, odd_primes_only, lower_ht_bound, reg, debug) 4040 if verbose: 4041 print("Saturating at p=%s" % p) -> 4042 newPlist, expo = saturator.full_p_saturation(Plist, p) 4043 if expo: 4044 if verbose: File /ext/sage/10.2/src/sage/schemes/elliptic_curves/saturation.py:281, in EllipticCurveSaturator.full_p_saturation(self, Plist, p) 278 if verbose: 279 print("Adding {} torsion generators before {}-saturation".format(extra_torsion,p)) --> 281 res = self.p_saturation(Plist, p) 282 while res: # res is either False or (i, newP) 283 exponent += 1 File /ext/sage/10.2/src/sage/schemes/elliptic_curves/saturation.py:497, in EllipticCurveSaturator.p_saturation(self, Plist, p, sieve) 495 cm_test = E.has_rational_cm() and kro(E.cm_discriminant(), p) == -1 496 for q in Primes(): --> 497 if any(q.divides(m) for m in avoid): 498 continue 499 if cm_test and not p.divides(q-1): File /ext/sage/10.2/src/sage/schemes/elliptic_curves/saturation.py:497, in <genexpr>(.0) 495 cm_test = E.has_rational_cm() and kro(E.cm_discriminant(), p) == -1 496 for q in Primes(): --> 497 if any(q.divides(m) for m in avoid): 498 continue 499 if cm_test and not p.divides(q-1): File /ext/sage/10.2/src/sage/rings/integer.pyx:4171, in sage.rings.integer.Integer.divides() 4169 cdef bint t 4170 cdef Integer _n -> 4171 _n = Integer(n) 4172 if mpz_sgn(self.value) == 0: 4173 return mpz_sgn(_n.value) == 0 File /ext/sage/10.2/src/sage/rings/integer.pyx:653, in sage.rings.integer.Integer.__init__() 651 otmp = getattr(x, "_integer_", None) 652 if otmp is not None: --> 653 set_from_Integer(self, otmp(the_integer_ring)) 654 return 655 File /ext/sage/10.2/src/sage/rings/rational.pyx:2969, in sage.rings.rational.Rational._integer_() 2967 """ 2968 if not mpz_cmp_si(mpq_denref(self.value), 1) == 0: -> 2969 raise TypeError("no conversion of this rational to integer") 2970 cdef Integer n = Integer.__new__(Integer) 2971 n.set_from_mpz(mpq_numref(self.value)) TypeError: no conversion of this rational to integer One thing I noticed is that this error is referring to Primes().
This field happens to have class number 1, but there are many quadratic domains that have a larger class number, where Primes would be meaningless.

David Roe

未读,
2024年2月26日 12:56:002月26日
收件人 sage-...@googlegroups.com
The problem is in the definition of avoid.  There was an assumption made that the discriminant would be integral, so
any(q.divides(m) for m in avoid)
has avoid = [1048576/5764801, 8, 28, 49, 7]
If you change the definition of avoid from
avoid = [self._N, self._D] + [P[0].denominator_ideal().norm() for P in Plist]
to
avoid = [self._N.numerator(), self._N.denominator(), self._D.numerator(), self._D.denominator()] + [P[0].denominator_ideal().norm() for P in Plist]
I'm guessing that it will fix the problem.

If you're looking for a short-term solution, you could find an integral model of E:
sage: EE = E.integral_model(); EE
Elliptic Curve defined by y^2 = x^3 + (30*a-45)*x^2 + (-672*a+952)*x over Number Field in a with defining polynomial x^2 - 2 with a = 1.414213562373095?
sage: EE.gens_quadratic()
[(-18*a + 26 : 18*a - 26 : 1)]

You'll need to find the morphism from E to EE though in order to get the generators in terms of coordinates for your original curve.
David

--
You received this message because you are subscribed to the Google Groups "sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sage-devel/e85cf0d6-b27c-44ed-9e1c-3bbcd6735a6an%40googlegroups.com.
回复全部
回复作者
转发
0 个新帖子