gap&gt; F:=GF(9);
GF(3^2)
gap&gt; r:=PolynomialRing(F,4);
GF(3^2)[x_1,x_2,x_3,x_4]
gap&gt; pg:=PG(3,9);
ProjectiveSpace(3, 9)
gap&gt; f1:=r.1*r.3-r.2^2;
x_1*x_3-x_2^2
gap&gt; f2:=r.4*r.1^2-r.4^3;
x_1^2*x_4-x_4^3
gap&gt; var:=AlgebraicVariety(pg,[f1,f2]);
Projective Variety in ProjectiveSpace(3, 9)
gap&gt; DefiningListOfPolynomials(var);
[ x_1*x_3-x_2^2, x_1^2*x_4-x_4^3 ]
gap&gt; AmbientSpace(var);
ProjectiveSpace(3, 9)
