# Solving polynomial equations using Grobner basis technique

Given a list of 24 polynomials over $\mathbb{Z}[x,y,z]$ namely Lf, computed by sage using the code

```
R.<x,y,z>=QQ['x, y, z']
I=(x*y^3-z)*R
Q= R.quo(I)
N=15
p=3
q=5
L=[(0, 0, 0),(0, 0, 1),(0, 0, 2),(0, 0, 3),(0, 0, 4),(0, 0, 5),(0, 0, 6),(0, 0, 7),(0, 1, 0),(0, 1, 1),(0, 1, 2),(0, 2, 0),(0,2,1),
(0, 2, 2),(1, 0, 0),(1, 0, 1),(1, 0, 2),(1, 0, 3),(1, 0, 4),(1, 1, 0),(1, 1, 1),(1, 1, 2),(2, 0, 0),(2, 0, 1)]
X=floor(N^2)
Y=floor(N^2)
Z=X*Y^3
phi=((p^4-1)*(q^4-1))/((p-1)*(q-1))
e=79
d=79
f=x*(y^3+(N+1)*y^2+(N^2-2*N+1)*y+N^3-N^2-N+1)+1
M=Matrix(0,len(L))
for (k,i,j) in L:
g=Q(x^i*y^j*f^k*e^(2-k)).lift()
h=g(x*X,y*Y,z*Z)
L1=vector(h[x^i*y^j*z^k] for (k,i,j) in L)
M = M.stack(L1)
N=M.LLL()
L2=[x^i*y^j*z^k for (k,i,j) in L]
r=0
Lf=[]
Li=[]
for i in srange(24):
D=N[i,:]*transpose(matrix([L2]))
r=D[0,0]
Li=[r]
Lf.extend(Li)
print(Lf)
```

In the theory, I know that there are three polynomials from the list Lf say $p(x,y,z)$, $q(x,y,z)$, and $r(x,y,z)$ having the same root (x,y,z). To extract such root, it suffices to compute the grobner basis of the three polynomials which yields three polynomilas and solving them to obtain the common root. I have computed the grobner basis by sage, here it is denoted by $E$.

```
for i in srange(24):
for j in srange(i+1,24):
for k in srange(j+1,24):
J = R.ideal([Lf[i],Lf[j],Lf[k]])
E=J.groebner_basis()
if len(E)==3:
print(E)
```

So far, E consists of the three polynomials we want. My probelm is what is the command to solve them.?

What do you want to do if

`J.dimension() > 0`

(i.e. there are not only common points but there is a common curve or surface)? And where do you seek the point? Over the complex numbers`CC`

?