Opened 9 years ago

Closed 8 years ago

# Cannot create point on an elliptic curve over a polynomial ring

Reported by: Owned by: pbruin cremona major sage-5.12 elliptic curves scheme morphism sage-5.12.beta1 Volker Braun Peter Bruin N/A

### 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
```

Initial patch

### comment:1 Changed 9 years ago by vbraun

• Authors set to Volker Braun
• 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 9 years ago by cremona

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 9 years ago by pbruin

• 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 9 years ago by pbruin

An easy workaround is to define your E as over R.fraction_field(). Elliptic curves over rings have little support in Sage now.

That is how I encountered the bug #14902 (reformulated without mentioned E, but it is still visible)!

### comment:5 Changed 8 years ago by jdemeyer

• Reviewers set to Peter Bruin

### comment:6 Changed 8 years ago by jdemeyer

• Merged in set to sage-5.12.beta1
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.