Grobner basis and subsets Let $A$ be a subset and $I$ an ideal of polynomial ring $R=k[x_1,x_2,...,x_n]$. Is there any algorithm for deciding when $A\subseteq I$?

Without striving for efficiency:
Use Buchberger's algorithm to produce a Groebner basis $g_1,g_2,...,g_n$ of $I$. 
Let $f_1,f_2,...,f_m$ be generators of $A$. For each $f_i$ run Buchberger with $g_1,g_2,...,g_n,f_i$. If the output is again $g_1,g_2,...,g_n$ for all $i=1,2,...,m$ (as opposed to $g_1,g_2,...,g_n,h_i$ with $h_i\neq0$) then $A\subset I$. Otherwise, $A\not\subset I$.
