Let E be a finite set of polynomial equations with variables x1,…,xr over the finite ring of integers modulo n (for some n). We can compute the Groebner basis as follows:
ZN=Integers(n)
R=PolynomialRing(ZN,r,"x")
R.inject_variables()
Id=R.ideal(E)
G=Id.groebner_basis()
Usually, over a field and if Id.dimension()=0
then we can get all the solutions by Id.variety()
. But here the dimension is not necessarily 0 and moreover it is not over a field but a ring, the finite ring of integers modulo n. By finiteness of the ring, there still have finitely many solutions. How to get them all?