Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

elliptic curve constructor in funny case -- coercion issues #248

Closed
williamstein opened this issue Feb 7, 2007 · 0 comments
Closed

elliptic curve constructor in funny case -- coercion issues #248

williamstein opened this issue Feb 7, 2007 · 0 comments

Comments

@williamstein
Copy link
Contributor

 
We still have problems coercing constants into polynomial rings, when
the constants are themselves in interesting rings...
 
sage: R = ZZ['u', 'v']
 
sage: EllipticCurve(R, [1,1])
---------------------------------------------------------------------------
<type 'exceptions.TypeError'>             Traceback (most recent call
last)
 
/Users/nalexand/<ipython console> in <module>()
 
/Users/nalexand/Devel/sage/local/lib/python2.5/site-packages/sage/
schemes/elliptic_curves/constructor.py in EllipticCurve(x, y)
     97             return
ell_finite_field.EllipticCurve_finite_field(x, y)
     98         else:
---> 99             return ell_generic.EllipticCurve_generic(x, y)
    100
    101     if isinstance(x, str):
 
/Users/nalexand/Devel/sage/local/lib/python2.5/site-packages/sage/
schemes/elliptic_curves/ell_generic.py in __init__(self, ainvs, extra)
     95         a1, a2, a3, a4, a6 = ainvs
     96         f = y**2*z + (a1*x + a3*z)*y*z \
---> 97             - (x**3 + a2*x**2*z + a4*x*z**2 + a6*z**3)
     98         plane_curve.ProjectiveCurve_generic.__init__(self, PP,
f)
     99         if K.is_field():
 
/Users/nalexand/element.pyx in element.RingElement.__mul__()
 
/Users/nalexand/element.pyx in element.bin_op_c()
 
<type 'exceptions.TypeError'>: unsupported operand parent(s) for '*':
'Polynomial Ring in u, v over Integer Ring' and 'Polynomial Ring in x,
y, z over Polynomial Ring in u, v over Integer Ring'
 
Nick
 
 
----

 
Hmm, I thought this was a bug, but the following works:
 
sage: R = ZZ['u', 'v'].fraction_field()
 
sage: EllipticCurve(R, [1,1])
 Elliptic Curve defined by y^2  = x^3 + x +1 over Fraction Field of
Polynomial Ring in u, v over Integer Ring
 
Maybe the previous post shouldn't work, because it's a ring, not a
field?  There are some algorithms that use the discrepancy, so
whatever happens the situation should be clarified.
 
Nick

----

 
On Tue, 6 Feb 2007, Nick Alexander wrote:
> sage: R = ZZ['u', 'v']
>  
> sage: EllipticCurve(R, [1,1])
> ---------------------------------------------------------------------------
> <type 'exceptions.TypeError'>             Traceback (most recent call
> last)
 
But the one variable version works ...
 
Regards,
Ifti
====
sage: R = ZZ['u']
sage: EllipticCurve(R, [1,1])
Elliptic Curve defined by y^2 + (0)*x*y + (0)*y = x^3 + (0)*x^2 + x +1
over Univariate Polynomial Ring in u over Integer Ring
 
 

Component: algebraic geometry

Issue created by migration from https://trac.sagemath.org/ticket/248

@williamstein williamstein self-assigned this Feb 7, 2007
@williamstein williamstein added this to the sage-2.8.2 milestone Aug 18, 2007
tobiasdiez pushed a commit to tobiasdiez/sage that referenced this issue Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant