On 17 mar, 10:13, John Cremona <john.crem...@gmail.com> wrote: > For an example of how polynomials over number fields are converted > into pari polynomials, see > sage/rings/polynomial/polynomial_element.pyx, in the factor function. > This is the code already used to factor polynomials over number fields > by converting to pari. It is more complicated than one would like for > a couple of reasons: getting round bugs in pari's factorization of > non-monic polynomials, and variable names. > > One has to be rather careful because of the variable names, here both > the name of the number field generator and the name of the polynomial > generator, since pari will only work if these are suitable. > > John
This is now #8558, for the gcd, it seems that a simple: sage: f = SomeField.random_element() sage: f1 = pari([i._pari_('y') for i in f.list()]).Pol() is a valid pari representation of f. This, or something similar, should be implemented for absolute number fields. I will look form problems this weekend and submit a patch. -- 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 URL: http://www.sagemath.org