I need to convert a polynomial $P \in \overline{\mathbb F}_p[x, y]$ to a polynomial in $\overline{\mathbb F}_p[x][y]$. The following code works when the first line is replaced by F = GF(3), but at present it returns "ValueError: finite field modulus must be irreducible but it is not".
F = GF(3).algebraic_closure()
Rxy.<x, y> = PolynomialRing(F, 2)
g = x*y
Rx.<x> = PolynomialRing(F)
Fx = FractionField(Rx)
FxRy.<y> = PolynomialRing(Fx)
h = FxRy(g)
print(h)
Is there an easy fix? What is the reason?