#4837: [with patch, with positive review and some comments] 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 AlexGhitza):
Hi John,
Here's a third possibility: any field extension L/K is really a quotient
K[x]/(f(x)), so we can start with a random element of K[x] and reduce it
mod f(x). Getting a random element of K[x] is easy if we can get random
elements of K itself. If L is an absolute number field, then K=QQ and
we're in business; if L/K is a relative number field, then this will
"descend" to K and so on until it hits QQ.
The advantage of this approach is that it is very transparent and easy to
code. Also in the relative situation there is no need to compute a
primitive element, all we need are the splitting polynomials for each step
in the tower, and those are just part of the given data.
I agree with the suggestion that we should be able to produce random
algebraic integers as well. But I think this should be implemented as a
method random_element() of an order in a number field, rather than as a
method of the number field itself. And then your idea of using the ZZ-
basis is really the only option I can think of.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4837#comment:4>
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
-~----------~----~----~----~------~----~------~--~---