I've recently started to use Magma, and I'm stuck with the following problem.
Let $\mathbb{F}_q$ be a quadratic extension of $\mathbb{F}_p$, $p$ prime and let $t$ be the generator of the extension. Let $R := \mathbb{F}_q[X,Y]$ and $f \in R$, then I can write $f = g(X,Y) + h(X,Y)t$ where $g,h \in A := \mathbb{F}_p[X,Y]$, so I have an isomorphism between $A^2$ and $R$ as $\mathbb{F}_p-$vector spaces. I would like to write this isomorphism in Magma, but I'm not even able to write $A^2$ as a $\mathbb{F}_p-$vector space.
Thank you in advance!
Edit: what I really need is from the polynomial $f \in R$, have the two polynomials $g,h \in A$. Any other advice that does not involve homomorphisms is welcome!