#11327: isogeny code uses deprecated(?) multi-variate gcd
-------------------------------------+-------------------------------------
       Reporter:  cjh                |        Owner:  cremona
           Type:  defect             |       Status:  needs_review
       Priority:  major              |    Milestone:  sage-6.3
      Component:  elliptic curves    |   Resolution:
       Keywords:  isogeny            |    Merged in:
  multivariate dual                  |    Reviewers:
        Authors:  John Cremona       |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  e043ae8eeb0ed3b12f748131904d5e0e0476a83e
  u/cremona/ticket/11327             |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by cremona):

 * dependencies:  #16779 =>


Old description:

> In sage.schemes.elliptic_curves.ell_curve_isogeny (of sage 4.6.2) the
> routine two_torsion_part() invokes a gcd on two polynomials.  When the
> polynomials belong to a multivariate ring, an error occurs.  Perhaps this
> is because the gcd routine in
> sage.rings.polynomial.multi_polynomial_element has been commented out
> (because it uses Singular?!).
>
> Converting psi (and perhaps psi2) to univariate polynomials within
> two_torsion_part() before taking the gcd seems to work, but there seems
> to be other code in the module which uses a multivariate ring when a
> univariate ring would suffice (e.g. in __init_from_kernel_polynomial).
>
> I discovered this error when trying to create a dual isogeny (for an
> elliptic curve over Q(t)).  The original isogeny was a cyclic 2-isogeny
> and thus the dual should also be a cyclic 2-isogeny.  Without giving more
> details on how I created the curve, let me simply report the error
> message which results when I call isogeny.dual():
>
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "_sage_input_5.py", line 10, in <module>
>     exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
> -*-\\n" +
> _support_.preparse_worksheet_cell(base64.b64decode("cHNpID0gcGhpLmR1YWwoKQ=="),globals())+"\\n");
> execfile(os.path.abspath("___code___.py"))
>   File "", line 1, in <module>
>
>   File
> "/private/var/folders/4V/4VAOdForFpanThca5kJ5xE+++TI/-Tmp-/tmp8DXIBC/___code___.py",
> line 2, in <module>
>     exec compile(u'psi = phi.dual()
>   File "", line 1, in <module>
>
>   File "/Applications/sage/local/lib/python2.6/site-
> packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 3248,
> in dual
>     phi_hat = EllipticCurveIsogeny(E1, None, E2, d)
>   File "/Applications/sage/local/lib/python2.6/site-
> packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 914, in
> __init__
>     self.__init_from_kernel_polynomial(kernel, degree)
>   File "/Applications/sage/local/lib/python2.6/site-
> packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 2038,
> in __init_from_kernel_polynomial
>     psi_G = two_torsion_part(E, poly_ring, psi, degree);
>   File "/Applications/sage/local/lib/python2.6/site-
> packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 453, in
> two_torsion_part
>     psi_G = poly_ring(psi.gcd(psi_2))
>   File "element.pyx", line 327, in
> sage.structure.element.Element.__getattr__
> (sage/structure/element.c:2715)
>   File "parent.pyx", line 277, in
> sage.structure.parent.getattr_from_other_class
> (sage/structure/parent.c:2841)
>   File "parent.pyx", line 177, in
> sage.structure.parent.raise_attribute_error
> (sage/structure/parent.c:2663)
> AttributeError: 'MPolynomial_polydict' object has no attribute 'gcd'

New description:

 New branch sorts out the use of uni- versus multi-variate polynomials
 systematically, and makes a lot of minor improvements and simplifications
 and improves many docstrings.  The specific errors originally reported
 here (see below) and at #16779 are fixed.


 In sage.schemes.elliptic_curves.ell_curve_isogeny (of sage 4.6.2) the
 routine two_torsion_part() invokes a gcd on two polynomials.  When the
 polynomials belong to a multivariate ring, an error occurs.  Perhaps this
 is because the gcd routine in
 sage.rings.polynomial.multi_polynomial_element has been commented out
 (because it uses Singular?!).

 Converting psi (and perhaps psi2) to univariate polynomials within
 two_torsion_part() before taking the gcd seems to work, but there seems to
 be other code in the module which uses a multivariate ring when a
 univariate ring would suffice (e.g. in __init_from_kernel_polynomial).

 I discovered this error when trying to create a dual isogeny (for an
 elliptic curve over Q(t)).  The original isogeny was a cyclic 2-isogeny
 and thus the dual should also be a cyclic 2-isogeny.  Without giving more
 details on how I created the curve, let me simply report the error message
 which results when I call isogeny.dual():

 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "_sage_input_5.py", line 10, in <module>
     exec compile(u'open("___code___.py","w").write("# -*- coding: utf-8
 -*-\\n" +
 
_support_.preparse_worksheet_cell(base64.b64decode("cHNpID0gcGhpLmR1YWwoKQ=="),globals())+"\\n");
 execfile(os.path.abspath("___code___.py"))
   File "", line 1, in <module>

   File
 
"/private/var/folders/4V/4VAOdForFpanThca5kJ5xE+++TI/-Tmp-/tmp8DXIBC/___code___.py",
 line 2, in <module>
     exec compile(u'psi = phi.dual()
   File "", line 1, in <module>

   File "/Applications/sage/local/lib/python2.6/site-
 packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 3248, in
 dual
     phi_hat = EllipticCurveIsogeny(E1, None, E2, d)
   File "/Applications/sage/local/lib/python2.6/site-
 packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 914, in
 __init__
     self.__init_from_kernel_polynomial(kernel, degree)
   File "/Applications/sage/local/lib/python2.6/site-
 packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 2038, in
 __init_from_kernel_polynomial
     psi_G = two_torsion_part(E, poly_ring, psi, degree);
   File "/Applications/sage/local/lib/python2.6/site-
 packages/sage/schemes/elliptic_curves/ell_curve_isogeny.py", line 453, in
 two_torsion_part
     psi_G = poly_ring(psi.gcd(psi_2))
   File "element.pyx", line 327, in
 sage.structure.element.Element.__getattr__ (sage/structure/element.c:2715)
   File "parent.pyx", line 277, in
 sage.structure.parent.getattr_from_other_class
 (sage/structure/parent.c:2841)
   File "parent.pyx", line 177, in
 sage.structure.parent.raise_attribute_error (sage/structure/parent.c:2663)
 AttributeError: 'MPolynomial_polydict' object has no attribute 'gcd'

--

--
Ticket URL: <http://trac.sagemath.org/ticket/11327#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to