#16068: Use base_ring in chord_and_tangent
-------------------------------+------------------------------
   Reporter:  jkeitel          |            Owner:
       Type:  PLEASE CHANGE    |           Status:  new
   Priority:  minor            |        Milestone:  sage-6.2
  Component:  elliptic curves  |         Keywords:
  Merged in:                   |          Authors:  Jan Keitel
  Reviewers:                   |  Report Upstream:  N/A
Work issues:                   |           Branch:
     Commit:                   |     Dependencies:
   Stopgaps:                   |
-------------------------------+------------------------------
 Right now, the following fails:

 {{{
 sage: from sage.schemes.elliptic_curves.constructor import
 chord_and_tangent
 sage: R = PolynomialRing(QQ, 'x,y,z')
 sage: x,y,z = R.gens()
 sage: cubic = x**3 - 4*x**2*y - 65*x*y**2 + 3*x*y*z - 76*y*z**2
 sage: f0 = (0, 1, 0)
 sage: chord_and_tangent(cubic, f0)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-9-05d9ab02db04> in <module>()
 ----> 1 chord_and_tangent(cubic, f0)

 /home/pcl337b/jkeitel/sage/sage/local/lib/python2.7/site-
 packages/sage/schemes/elliptic_curves/constructor.pyc in
 chord_and_tangent(F, P)
     898             g = F.substitute({x:y, y:x})
     899             Q = [P[1], P[0], P[2]]
 --> 900             R = chord_and_tangent(g, Q)
     901             return [R[1], R[0], R[2]]
     902         elif dz != 0:

 /home/pcl337b/jkeitel/sage/sage/local/lib/python2.7/site-
 packages/sage/schemes/elliptic_curves/constructor.pyc in
 chord_and_tangent(F, P)
     917         g = F.substitute({x:z, z:x})
     918         Q = [P[2], P[1], P[0]]
 --> 919         R = chord_and_tangent(g, Q)
     920         return [R[2], R[1], R[0]]
     921     # Ft has a double zero at t=0 by construction, which we now
 remove

 /home/pcl337b/jkeitel/sage/sage/local/lib/python2.7/site-
 packages/sage/schemes/elliptic_curves/constructor.pyc in
 chord_and_tangent(F, P)
     924     # first case: the third point is at t=infinity
     925     if Ft.is_constant():
 --> 926         return projective_point([dy, -dx, 0])
     927     # second case: the third point is at finite t
     928     else:

 /home/pcl337b/jkeitel/sage/sage/local/lib/python2.7/site-
 packages/sage/schemes/elliptic_curves/constructor.pyc in
 projective_point(p)
     955     from sage.rings.integer import GCD_list, LCM_list
     956     try:
 --> 957         p_gcd = GCD_list([x.numerator() for x in p])
     958         p_lcm = LCM_list([x.denominator() for x in p])
     959     except AttributeError:

 TypeError: 'int' object is not callable
 }}}

 This is very simple to fix - convert a 0 into an element of the base ring
 of the curve and I've attached a branch that does that.

--
Ticket URL: <http://trac.sagemath.org/ticket/16068>
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