#6574: Type issue in is_quadratic_twist
-----------------------------+----------------------------------------------
Reporter: wuthrich | Owner: davidloeffler
Type: defect | Status: new
Priority: trivial | Milestone: sage-4.1.1
Component: elliptic curves | Keywords: elliptic curve, quadratic twist
Reviewer: | Author:
Merged: |
-----------------------------+----------------------------------------------
{{{
E = EllipticCurve('32a1')
D = E.is_quadratic_twist(E)
D, type(D)
}}}
yields
{{{
(1, <type 'sage.rings.rational.Rational'>)
}}}
but
{{{
D = E.is_quadratic_twist(E.quadratic_twist(5))
D, type(D)
}}}
gives back
{{{
(5, <type 'sage.rings.integer.Integer'>)
}}}
I think in the first case, we should also give back the integer 1. The
cause of this is in ell_field.py. In the first case we exit
is_quadratic_twist at line 353 with
{{{
return K.one_element()
}}}
In the second case we exit at the end after
line 394 has changed the type by
{{{
if K is rings.QQ:
D = D.squarefree_part()
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/6574>
Sage <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---