#4837: [with patch, needs review] implement random_element for number fields
-----------------------------------------+----------------------------------
Reporter: AlexGhitza | Owner: AlexGhitza
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.4
Component: number theory | Resolution:
Keywords: random element number field |
-----------------------------------------+----------------------------------
Comment (by cremona):
The patch applies fine (over 3.2.2 + #4218). Just one thing: for an
absolute extension we can create an element from a polynomial over the
base field, but not for a relative extension:
{{{
sage: K.<z>=CyclotomicField(7)
sage: Ky.<y>=PolynomialRing(K)
sage: L.<a>=K.extension(y^2+1)
sage: K(K.polynomial_ring().random_element())
z + 1
sage: L(L.polynomial_ring().random_element())
---------------------------------------------------------------------------
TypeError
...
TypeError: Unable to coerce 7/2*z^5 + 1/2*z^4 + z^3 - 37/2*z to a rational
}}}
I'm sure this will cause complaints before long, so can we make the new
constructor slightly more flexible? Of course if your replace
{{{polynomial_ring()}}} with {{{polynomial_quotient_ring()}}} it works
fine thanks to the new code.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4837#comment:9>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---