I recently read a lemma on a course in Commutative Algebra that states,
If $G$ is a Gröbner Basis for an Ideal $I$ in $k[x_{1},...,x_{n}]$, then a polynomial $f$ belongs to $I$ if and only if $f$ on division by $G$ (we can do this using the division algorithm for polynomials) has a remainder $0$.
My question is why would we need to go through all the trouble of calculating Gröbner basis, when we can instead say that every ideal in $k[x_{1},x_{2}...x_{n}]$ is finitely generated by $f_{1},f_{2},f_{3},...f_{s}$ (By Hilbert's Basis Theorem) and therefore divide $f$ by these $f_{i}$'s and check whether the remainder is $0$?
The reason is first that the remainder of division is not unique if we don't have a Gröbner basis, and second, the remainder can be nonzero, even if $f$ lies in $I$.
Example:
Take $I=(y^2-x,yx-y)$ (in that order) and use deglex with $y>x$ in $\mathbf Q[x,y]$ Then $f=y^2x-x= (y^2-x) +y(yx-y)\in I$, but you can check the remainder of the division is $x^2-x$.