Opened 8 years ago
Closed 8 years ago
#14903 closed defect (fixed)
Cannot create point on an elliptic curve over a polynomial ring
Reported by: | pbruin | Owned by: | cremona |
---|---|---|---|
Priority: | major | Milestone: | sage-5.12 |
Component: | elliptic curves | Keywords: | scheme morphism |
Cc: | Merged in: | sage-5.12.beta1 | |
Authors: | Volker Braun | Reviewers: | Peter Bruin |
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
When one tries to create a point with given coordinates on an elliptic curve over a polynomial ring, a strange error is produced ("parent must be a Homspace"):
sage: R.<t> = PolynomialRing(QQ) sage: E = EllipticCurve([t + 1, t, t, 0, 0]) sage: P = E.point([0, 0]) --------------------------------------------------------------------------- TypeError Traceback (most recent call last) <ipython-input-46-c1a5b6d522a7> in <module>() ----> 1 P = E.point([Integer(0), Integer(0)]) /home/staff/pbruin/src/sage-5.11.beta3/local/lib/python2.7/site-packages/sage/schemes/generic/scheme.pyc in point(self, v, check) 358 from sage.schemes.elliptic_curves.ell_generic import is_EllipticCurve 359 if is_EllipticCurve(self): --> 360 return self._point(self, v, check=check) 361 362 return self.point_homset() (v, check=check) /home/staff/pbruin/src/sage-5.11.beta3/local/lib/python2.7/site-packages/sage/schemes/projective/projective_point.pyc in __init__(self, X, v, check) 120 (2 : 2 : 2) 121 """ --> 122 SchemeMorphism.__init__(self, X) 123 if check: 124 from sage.schemes.elliptic_curves.ell_point import EllipticCurvePoint_field /home/staff/pbruin/src/sage-5.11.beta3/local/lib/python2.7/site-packages/sage/schemes/generic/morphism.pyc in __init__(self, parent) 149 """ 150 if not isinstance(parent, Homset): --> 151 raise TypeError, "parent (=%s) must be a Homspace"%parent 152 Element.__init__(self, parent) 153 self._domain = parent.domain() TypeError: parent (=Elliptic Curve defined by y^2 + (t+1)*x*y + t*y = x^3 + t*x^2 over Univariate Polynomial Ring in t over Rational Field) must be a Homspace
Attachments (1)
Change History (7)
Changed 8 years ago by
comment:1 Changed 8 years ago by
- Status changed from new to needs_review
The elliptic curve's point homsets need to be harmonized with the rest of the schemes code in Sage. Though perhaps not right now, so in that sprit here is a fix until that rewrite happens.
comment:2 follow-up: ↓ 4 Changed 8 years ago by
An easy workaround is to define your E as over R.fraction_field(). Elliptic curves over rings have little support in Sage now.
comment:3 Changed 8 years ago by
- Status changed from needs_review to positive_review
The patch looks good as a fix until the elliptic curve code is reworked, it is a step towards solving the problem I needed this for (I just ran into difficulties elsewhere in Sage), and doctests pass.
comment:4 in reply to: ↑ 2 Changed 8 years ago by
comment:5 Changed 8 years ago by
- Reviewers set to Peter Bruin
comment:6 Changed 8 years ago by
- Merged in set to sage-5.12.beta1
- Resolution set to fixed
- Status changed from positive_review to closed
Initial patch