OK, that makes sense now. It boils down to this: given an element of
F12=GF(p^12) which happens to lie in F2 = GF(p^2), how to express it
in terms of a generator of F2. This is not quite as easy as it should
be but this works (assuming that you have defined F12 with generator a
and F2 with generator b):
sage: bb = b.minpoly().roots(F12)[0][0]
sage: i = F2.hom([bb],F12)
sage: j = i.section()
Here we have defined an embedding i of F2 into F12 by find a place to
map b (called bb) and set j to be an inverse to i. (I think we should
be use i.inverse_image() but that gave me a NotImplementedError, which
is a pity since I have used sort of construction easily in extensions
of number fields).
Now if f is your polynomial in F12[x] whose coefficients lie in F2 you can say
sage: PolynomialRing(F2,'X')([j(c) for c in f.coeffs()])
to get what you want, I hope!
John