Ask Your Question

Revision history [back]

There can't be a coercion from GF(q) to GF(q^k) if q is not prime since there will be several embeddings, none of which has any reason to be preferred. But it is simple to list the embeddings:

sage: F.<a> = GF(5^2); K.<b> = GF(5^6)
sage: Hom(F, K).list()
[
Ring morphism:
  From: Finite Field in a of size 5^2
  To:   Finite Field in b of size 5^6
  Defn: a |--> 4*b^5 + 2*b^4 + 4*b^2 + b,
Ring morphism:
  From: Finite Field in a of size 5^2
  To:   Finite Field in b of size 5^6
  Defn: a |--> b^5 + 3*b^4 + b^2 + 4*b + 1
]

It is possible to construct a field of order 5^6 which GF(25) coerces into:

sage: PF.<t> = F[]
sage: f, g = prime_factors(PF(b.minpoly())); f, g
(t^3 + (2*a + 2)*t + 4*a, t^3 + (3*a + 4)*t + a + 4)
sage: L.<c> = F.extension(f)
sage: L.is_field()
True
sage: L.order().factor()
5^6
sage: a + c in L
True

But at present there are limits to what can be done with this field:

sage: K.list()[:7]
[0, b, b^2, b^3, b^4, b^5, 4*b^4 + b^3 + 4*b^2 + 3]
sage: L.list()[:7]
Traceback (most recent call last)
...
NotImplementedError: object does not support iteration