#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 |
-----------------------------------------+----------------------------------
Changes (by cremona):
* summary: [with patch, needs review] implement random_element for
number fields => [with patch, with positive
review and some comments] implement
random_element for number fields
Comment:
There are two obvious ways to implement this: the one in the patch
(random polynomial), or a random QQ_vector applied to the QQ_basis for the
field. I think I prefer the latter, though I am not sure why. It would
almost certainly be useful to have a random_integer() function too,
implemented via a random ZZ-linear combination of the ZZ-basis. The
current patch could also be adapted, but with more difficulty (especially
if the ring of integers is not of the form ZZ[a]).
I don't know how easy the alternative approach would be to apply to
relative extensions. The current patch does fine, as long as computing a
primitive element is not too time-consuming.
This patch applies cleanly to 3.2.2 and all tests in
sage/rings/number_field pass, so I am happy to give it a positive review,
while inviting comments on my comments!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4837#comment:3>
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
-~----------~----~----~----~------~----~------~--~---