# Revision history [back]

In finite cardinal, formal polynomials and polynomials as functions are not the same. You can use that by artificially reducing the dimension of the ideal by adding polynomials that wanish on the finite field you are considering:

sage: J = R.ideal(F7+[x0^(2^7)-x0,x1^(2^7)-x1,x2^(2^7)-x2,x3^(2^7)-x3])
sage: J.dimension()
0


However, it is likely that looking for J.variety() will not be faster than testing all the elements of GF(2^7)^4) by hand, please tell us which method is faster.

In finite cardinal, formal polynomials and polynomials as functions are not the same. You can use that by artificially reducing the dimension of the ideal by adding polynomials that wanish on the finite field you are considering:

sage: J = R.ideal(F7+[x0^(2^7)-x0,x1^(2^7)-x1,x2^(2^7)-x2,x3^(2^7)-x3])
sage: J.dimension()
0


However, it is likely that looking for J.variety() will not be faster than testing all the elements of GF(2^7)^4) by hand, please which you can do as follows (not tested):

sage: from itertools import product
sage: V = []
sage: for v in product(GF(2**7,name="a"), repeat=4):
....:     if all(p(v) == 0 for p in F7):
....:         V.append(v)


Please tell us which method is faster.faster. Note that this last code is easily parallelizable.

In Over finite cardinal, fields, formal polynomials and polynomials as functions are not the same. same (two different formal polynonials can lead to the same function). You can use that by artificially reducing the dimension of the ideal by adding polynomials that wanish on the finite field you are considering:

sage: J = R.ideal(F7+[x0^(2^7)-x0,x1^(2^7)-x1,x2^(2^7)-x2,x3^(2^7)-x3])
R.ideal(F7 + [x0^(2^7) - x0, x1^(2^7) - x1, x2^(2^7) - x2, x3^(2^7) - x3])
sage: J.dimension()
0


However, it is likely that looking for J.variety() will not be faster than testing all the elements of GF(2^7)^4) by hand, which you can do as follows (not tested):

sage: from itertools import product
sage: V = []
sage: for v in product(GF(2**7,name="a"), repeat=4):
....:     if all(p(v) == 0 for p in F7):
....:         V.append(v)


Please tell us which method is faster. Note that this last code is easily parallelizable.