Say, I have a polynomial p(x) over GF(2) and a polynomial g(x) over GF(4). For example,
gf2 = gf(2, 1);
gf4 = gf(2, 2);
p2 = Polrev(vector(5, i, random(gf2)));
p4 = Polrev(vector(7, i, random(gf4)));
p2 * p4
>> *** at top-level: p2*p4
>> *** ^---
>> *** _*_: inconsistent multiplication t_FFELT * t_FFELT.
Does pari-gp provide any stuff to proceed in this case? If no, how can I do the desired embedding?
Unfortunately, the solution is at your own. PARI/GP provides no stuff for finite field embedding. For my purposes I develop the following function for finite field embedding:
For algorithmic details, please see http://johnkerl.org/doc/ffcomp.pdf (section 5.11). Using the code above you must rewrite your code as follows: