Hi

I'm trying to write some code involving isogenies that will work over
different types of fields (at least rational and finite and hopefully
number fields too.) Part of the code includes the line:

fp.numerator()-j*fp.denominator() where fp is a polynomial in t over
Qt = FractionField(PolynomialRing(QQ,'t')

for the elliptic curve
E = EllipticCurve([1,0,1,4, -6]); E

we have
sage: E.j_invariant()
9938375/21952
sage: type(E.j_invariant())
<type 'sage.rings.rational.Rational'>
 and this works fine

but for
sage: E = EllipticCurve(GF(13^4, 'a'),[2,8])
sage: E.j_invariant()
4
sage: type(E.j_invariant())
<type 'sage.rings.finite_field_givaro.FiniteField_givaroElement'>

and so I get the error
TypeError: unsupported operand parent(s) for '-': 'Univariate
Polynomial Ring in t over Rational Field' and 'Univariate Polynomial
Ring in t over Finite Field in a of size 13^4'

I have tried replacing j with QQ(j), but I got the error
TypeError: Unable to coerce 4 (<type
'sage.rings.finite_field_givaro.FiniteField_givaroElement'>) to
Rational

Not quite sure how to proceed!

Thanks in advance,
Jenny
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send an email to sage-devel@googlegroups.com
To unsubscribe from this group, send an email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to