Your example has several problems :
1) You don’t define your polynomial indeterminates ; you should Rx.inject_variables()
.
2) The syntax you use to substitute values in f
is questionable…
3) f(v)
is a polynomial in x0
..x9
over GF(7), not a symbolic expression. Therefore f(v)==1
is not a symbolic equation ; it just tests if f(v) is equal to 1, which is
False`. Hence the “error” you get.
4) solve_mod
is a function working on symbolic equations systems. Passing a (list of) polynomial(s) as its first argument will fail. If you want to use this function, us it on symbolic equation systems.
5) “Solving” polynomial systems use other methods. Perusing the documentation and the source the latter points to is highly recommended.
HTH,
sage: R.<x,y,z> = PolynomialRing(GF(7),3)
sage: I = R.ideal(x*y+z+1-1, x-1, y-5)
sage: I
Ideal (x*y + z, x - 1, y + 2) of Multivariate Polynomial Ring in x, y, z over Finite Field of size 7
sage: I.variety()
[{z: 2, y: 5, x: 1}]