gap&gt; f := GF(25);
GF(5^2)
gap&gt; r := PolynomialRing(f,4);
GF(5^2)[x_1,x_2,x_3,x_4]
gap&gt; ind := IndeterminatesOfPolynomialRing(r);
[ x_1, x_2, x_3, x_4 ]
gap&gt; eq1 := Sum(List(ind,t-&gt;t^2));
x_1^2+x_2^2+x_3^2+x_4^2
gap&gt; var := ProjectiveVariety(PG(3,f),[eq1]);   
Projective Variety in ProjectiveSpace(3, 25)
gap&gt; PolarSpace(var);
&lt;polar space in ProjectiveSpace(3,GF(5^2)): x_1^2+x_2^2+x_3^2+x_4^2=0 &gt;
gap&gt; eq2 := Sum(List(ind,t-&gt;t^4));
x_1^4+x_2^4+x_3^4+x_4^4
gap&gt; var := ProjectiveVariety(PG(3,f),[eq2]);
Projective Variety in ProjectiveSpace(3, 25)
gap&gt; PolarSpace(var);
Error, &lt;poly&gt; does not generate a Hermitian matrix called from
GramMatrixByPolynomialForHermitianForm( pol, gf, n, vars ) called from
HermitianFormByPolynomial( pol, pring, n ) called from
HermitianFormByPolynomial( eq, r ) called from
&lt;function "unknown"&gt;( &lt;arguments&gt; )
 called from read-eval loop at line 16 of *stdin*
you can 'quit;' to quit to outer loop, or
you can 'return;' to continue
brk&gt; quit;
gap&gt; eq3 := Sum(List(ind,t-&gt;t^6));
x_1^6+x_2^6+x_3^6+x_4^6
gap&gt; var := ProjectiveVariety(PG(3,f),[eq3]);
Projective Variety in ProjectiveSpace(3, 25)
gap&gt; PolarSpace(var);
&lt;polar space in ProjectiveSpace(3,GF(5^2)): x_1^6+x_2^6+x_3^6+x_4^6=0 &gt;
