Let $I=\langle g_1,\dots, g_t\rangle$ be an ideal in $k[x_1,\dots,x_n]$ with $k$ a field. Let $G=\{g_1,\dots,g_t\}$. Show that if the remainder of $f$ on division by $G$ is $0$ for all $f\in I$, then $G$ is a Groebner basis.
My attempt:
We need to show that $\text{LT}(f)$ is divisible by $\text{LT}(g_i)$ for some $g_i\in G$, for all $f\in I$, where $\text{LT}(\cdot)$ means the leading term of the polynomial.
Since $f\in I$, and $G$ is a bases of $I$, we can write $$f=\sum_{i=0}^t h_i g_i$$ for some $h_i\in k[x_1,\dots, x_n]$. I don't know how to continue then, since I cannot write the leading term of $f$ in terms of a single $g_i$. It can be combination of $g_i$'s. So I cannot say it is divisible by one of them.
Thank you for any help!
Take ${\rm LT}$ in $$f=\sum_{i=0}^t h_i g_i.$$ Then ${\rm LT}(f)=\sum_j{\rm LT}(h_j){\rm LT}(g_j)\in\langle{\rm LT}(g_1),\dots,{\rm LT}(g_t)\rangle$.