Gröbner basis of subideals

Let $I$ be an ideal with a Gröbner basis $B_1:=\{ g_1, \dots, g_n\}$. Let $J$ be an ideal containing $I$ with the basis $B_2:=\{ g_1, \dots, g_n, \dots, g_{n+m}\}$, which is not necessarily a Gröbner basis of $J$.

If we apply Buchberger's algorithm on $B_2$, then does the obtained Gröbner basis contain $B_1$?

• Sorry, I asked a stupid question. It should be reformulated. I should have assumed that $J$ is a ideal containing $I$. – Dino Mar 17 '18 at 9:28

No, not neccesarily. Take $I = (x^2)$ and $J = (x^2,x) = (x)$.
There are some circumstances in which the Gröbner of $J$ does contain a Gröbner basis of $I$, although that's not the actual question.
Look at the polynomial ring $R = k[x_1, \dots, x_m, y_1, \dots, y_n]$ and let $J$ be an ideal of $R$. Take $I = J \cap k[x_1, \dots, x_m]$. Now take a Gröbner basis $G$ of $J$ with respect to an elimination order, i.e., an order in which every $x_i$ is smaller than every $y_j$. Then $G \cap k[x_1, \dots, x_m]$ is a Gröbner basis of $I$.