Is this what you are looking for?
Import RelativeFiniteFieldExtension
and define the fields and the relative finite field extension.
sage: from sage.coding.relative_finite_field_extension import RelativeFiniteFieldExtension
sage: f4 = GF(4, 'x')
sage: f16 = GF(16, 'y')
sage: ff = RelativeFiniteFieldExtension(f16, f4)
sage: ff.embedding()
Ring morphism:
From: Finite Field in x of size 2^2
To: Finite Field in y of size 2^4
Defn: x |--> y^2 + y
Apply to a vector.
sage: V = VectorSpace(f4, 2)
sage: v = V.random_element(); v
(x, x + 1)
sage: v.apply_map(ff.embedding())
(y^2 + y, y^2 + y + 1)
Edit: the absolute_field_representation
and relative_field_reprensentation
methods may be what you are looking for.
They are documented here:
Following and expanding the examples from the documentation and adapting to your notation.
sage: from sage.coding.relative_finite_field_extension import RelativeFiniteFieldExtension
sage: f4.<x> = GF(4)
sage: f16.<y> = GF(16)
sage: ff = RelativeFiniteFieldExtension(f16, f4)
sage: b = y^3 + y^2 + y + 1
sage: bb = ff.relative_field_representation(b)
sage: bb
(1, x + 1)
sage: bb.parent()
Vector space of dimension 2 over Finite Field in x of size 2^2
sage: ff.absolute_field_representation(bb)
y^3 + y^2 + y + 1
sage: V = VectorSpace(f4, 2)
sage: cc = V((x, x+1))
sage: cc
(x, x + 1)
sage: c = ff.absolute_field_representation(cc)
sage: c
y^3
sage: c.parent()
Finite Field in y of size 2^4
sage: ff.relative_field_representation(c)
sage: ff.relative_field_representation(c)
(x, x + 1)
This shows the isomorphism you want, going both ways.
Where does
RelativeFiniteFieldExtension
comes from ?Probably from coding theory.
@ slelievre, Yes