Given a set $G$, how do we show that it is a Gröbner basis of an ideal $I$? I am using the sage-notation so it might be a bit untidy.

I have been given a set $G$ and I want to show that it is a Gröbner basis of the ideal $I= \langle y_1+y_2x_1+y_3x_1^2 , y_1+y_2x_2+y_3x_2^2,y_1+y_2x_3+y_3x_3^2 \rangle$.

The set $G= \{ y_1+ y_2x_3 + y_3x_3^2 ,  y_2x_3 - y_2x_1 + y_3x_3^2 - y_3x_1^2 , y_2x_3 - y_2x_2 + y_3x_3^2 - y_3x_2^2 , y_3x_1^2x_2 - y_3x_1^2x_3 - y_3x_1x_2^2 + y_3x_1x_3^2 + y_3x_2^2x_3 - y_3x_2x_3^2 \}$
The lexicographic ordering used is: $y_1 > y_2 > y_3 > x_1 > x_2 > x_3$.
My progress has been in the following way :

*

*I have shown that each of the polynomials in the ideal $I$ are present in $G$ (using multivariate long-division).


*I have shown that $S(g_i,g_j)$ gives a remainder $0$ when I divide it by the polynomials in $G$.

However, I was suggested by a friend of mine to show that the polynomials in $G$ are present in the polynomials in $I$ (to show that ideal generated by $G$ equals $I$). I tried doing it, but I got the polynomial in $G$ as the remainder every time I tried to divide by the polynomials in $I$.Is this step a necessity ? If yes, then where am I going wrong ?

 A: To show $G$ is a Groebner basis of $I$ you indeed need to show that $G$ is a generating set of $I$ and that $S(g_i,g_j) \xrightarrow{G} 0$ for all $i<j$ (Buchberger's criterion).
Usually $G$ is created using an algorithm like Buchberger's algorithm, which starts with $G$ being the set of generators of $I$ and only adds elements which belong to the same ideal. In this case it's obvious that $G$ is a generating set of $I$. Also, steps like reduction make sure that $G$ remains a generating set of $I$.
When $G$ is given out of the blue, your friend is right that you need to check both inclusions in $I = \langle G \rangle$. By reducing the generators of $I$ with respect to $G$ and finding zero, you show that $I \subset \langle G \rangle$. Now it remains to show that $\langle G \rangle$ is not bigger than $I$. For this you can first use the extra information that you found during the reduction step. If we say $I = \langle f_1, f_2, f_3 \rangle$ and $G = \{g_1,g_2,g_3,g_4\}$, then by reducing $f_1$ with respect to $G$ you actually find $f_1 = g_1 - g_2$, and similarly $f_2 = g_1 - g_3$, $f_3 = g_1$. Now it is clear, by solving the linear system, that $g_1 = f_3, g_2 = f_3 - f_1, g_3 = f_3 - f_2$ so $\langle g_1,g_2,g_3 \rangle \subset I$.
It remains to show $g_4 \in I$. For this you can put $G' = \{f_1,f_2,f_3\}$ and start running Buchberger's algorithm (calculate an S-polynomial and reduce it with respect to $G'$, and if the reduction is nonzero then add it to $G'$, and repeat with the new $G'$, until all S-polynomials reduce to zero). All elements found in this way will be in $I$ (it follows from the defintion of S-polynomial and reduction). During this process you can also reduce the elements with respect to $G$ to express them in terms of $g_1,g_2,g_3,g_4$. You want to find an element that is expressed using an invertible coefficient times $g_4$, plus possibly any other terms (so the equation can be solved for $g_4$). In your case we get $S(f_1,f_2) \xrightarrow{G'} f_4 = g_3 - g_2$ and we put $G' := G' \cup \{f_4\}$, then $S(f_1,f_3) \xrightarrow{G'} f_5 = -g_3$ and we put $G' := G' \cup \{f_5\}$, and finally we can find $S(f_4,f_5) \xrightarrow{G'} f_6 = g_4$, so $g_4$ belongs to $I$.
Note that by doing this we have almost re-calculated a Groebner basis, so it is pretty inefficient. Usually Groebner bases do not come falling out of the sky; rather by their construction you will know that they are a generating set for the ideal.
Regarding your attempt: Reducing the elements of $G$ with respect to the generators of $I$ is generally not very useful, since the generators of $I$ usually don't form a Groebner basis, so the result of reduction is not uniquely determined (can depend on the order in which you reduce), and you are not guaranteed to get zero when the input belongs to $I$.
