To get an irreducible polynomial of degree 2 in char 3,
generate a random poly of degree 2 and check with factorize
whether it is irreducible.
In fact it is irreducible if and only if none of 0,1,2 is a zero
of your chosen polynomial.
---
Your method with map does not work since displayed minpoly
is 0 in the given ring. You have convert it to string which you
execute then.
Code:
> ring s = (9,a) ,y, dp;
> minpoly ;
1*a^2+2*a^1+2*a^0
> poly f = _; // this algebriac relation is evalueted to 0
> f;
0
> string(minpoly);
1*a^2+2*a^1+2*a^0
> string S = " poly mipo = " + string(minpoly) + ";";
> ring r3a = 3,(a,x),dp;
> execute(S);
> mipo;
a2-a-1
> subst(_,a,x);
x2-x-1
---
The minpolys are listed in the file gftables in the LIB directory
See the similar question:
Method to list all possible minimal polynomials for GF(2^n)viewtopic.php?f=10&t=1912