On Tue, Nov 18, 2008 at 4:30 PM, John H Palmieri <[EMAIL PROTECTED]> wrote: > > Does Sage know how to compute pth roots in any finite field of > characteristic p?
There exists a finite field of char p such that Sage can compute the p-th roots of a number: sage: a = GF(7)(2) sage: a.nth_root(7) 2 Same for a non-prime field: sage: a = GF(49,'b').0 sage: a.nth_root(7) 6*b + 1 So I guess the answer to your question is probably "yes". Incidentally, on a finite field p-th powering is an automorphism, so there is always exactly one p-th root. The nth_root command works by finding the roots of the poly x^n - a. > That is, if I have a prime number p, a finite field > F of characteristic p, and an element b of F, will > > sage: b.nth_root(p) > > always return a value, or will it sometimes return a ValueError? It should *always* return a value. If it doesn't, that's a bug. > Does > it depend on the field, and if so, is there a way to test whether any > given field has an algorithm for computing pth roots? (If I want to > implement something which depends on such an algorithm, I want to be > able to ignore the bad fields from the start.) All fields should have such an algorithm. However, one could write a better algorithm than what is in Sage now. E.g., if your field F has cardinality p^n, than an algorithm to compute the unique p-th root b of a is to just to use that for all x in the field x^(p^n) = x, so since b^p = a we have b = (b^p)^(p^(n-1)) = a^(p^(n-1)) I.e., compute p-th roots by raising to the power of p^(n-1). sage: a = GF(49,'b').0 sage: a.nth_root(7) 6*b + 1 sage: a^7 6*b + 1 > I don't know what infinite fields of characteristic p Sage knows > about, but one could ask similar questions for those: is there > something like an 'is_perfect' method, and for which perfect fields > does Sage know how to compute pth roots? Infinite fields of characteristic p aren't perfect, because the definition of perfect is that "every finite extension is separable". In any case, Sage is I think very limited regarding non-finite characteristic p fields, unfortunately (e.g., function fields of curves over finite fields). This is one of those things that Magma is unusually good at. William --~--~---------~--~----~------------~-------~--~----~ 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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
