# Revision history [back]

I don't think solve does what you hope it does. It seems from your code that you want to select elements from a groebner basis of bounded degree (I guess n is the length of G?) and want to find the solutions to those equations.

If the equations you select still define a 0-dimensional variety and you're interested in solutions that take values in the ground field, you might be able to do something like

J=ideal([f for f in I.groebner_basis() if f.degree() lt num])
J.variety()


Putting your selected polynomials in a dictionary is probably not a good idea. You'd be better off putting them in a list, i.e.

P=[]
...
P.append(G[i])
...