ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sat, 11 Jan 2014 15:36:15 +0100Representing finite field elements in terms of subfield elementshttps://ask.sagemath.org/question/10904/representing-finite-field-elements-in-terms-of-subfield-elements/I am trying to do something along the lines of magma's Eltseq function between two finite fields of the same characteristic. I'm hoping that this will be easier now that the conway polynomial work has been included in sage.
Given an element of a finite field, I would like to be able to get that element as a polynomial in the generator of the finite field, but with coefficients in a non-prime subfield.
K.<w2> = FiniteField(2^2, conway=True, prefix="w")
L.<w4> = FiniteField(2^4, conway=True, prefix="w")
a = (w2+1)*w4 + 1 # a = w4^3 + w4^2 + w4 + 1
# Currently we can do this to get a polynomial with coefficients in the prime subfield:
a.polynomial().list() # returns [1, 1, 1, 1]
# I would like this same, but for any subfield:
a.polynomial(K).list() # would return [1, w2+1]
Does anything like this exist? I've been wracking my brain trying to work out how to do this in an efficient manner, but I can't come up with anything.
Any help in this, even just pointing me in the right direction, would be very much appreciated.hdsSat, 11 Jan 2014 15:36:15 +0100https://ask.sagemath.org/question/10904/Extension/coercion of finite rings & fieldshttps://ask.sagemath.org/question/9864/extensioncoercion-of-finite-rings-fields/Hi ...
again harping on my theme of p-adics: here is a characteristic-p toy model of the problem I had [here](http://ask.sagemath.org/question/2309/solving-polynomial-equations-over-p-adic-fields). Will someone please tell me how to do what this code is trying to do?!!
sage: K.<X> = GF(3^2,name='X'); # creates (residue) field which is GF(3)[X]
sage: R = IntegerModRing(3^2)[X]; # extends Z/p^2 by that same X to form quadratic extn - seemingly successfully
sage: print R(X+5); # I try to use X but it still treats it like an "alien" quantity in R ....
thanks!!GaryMakThu, 28 Feb 2013 16:18:17 +0100https://ask.sagemath.org/question/9864/