Find a finite Gröbner basis in lexicographic ordering $x \prec y \prec z$ for ideal $I \subseteq \mathbb{R}[x, y, z]$, where $$ I = \{ f \in \mathbb{R}[x, y, z] \space | \space f(a, -a, 2) = 0 \space \forall \space a \in \mathbb{R} \} $$
I only know how to apply Buchberger's algorithm to determined ideals, for example such as $(xy + 2yz, x-y, yz-y)$. But how to find the basis in my case?
You have to find the generators $f_i$ of $I = (f_1, \ldots, f_n)$.
Wlog $f_1=z-2 \in I$, so you can remove all the occurrences of $z$ in the other generators. So you can consider all the $f_i, i > 1$ as polynomials in $x,y$.
Wlog $f_2=x+y \in I$. Are there other "useful" generators or $I = (f_1, f_2)$? Consider $f \in I$ and the monomial order $z>y>x$: the remainder of the division algorithm is a $g(x)$ such that $g(a) = 0 \ \forall a \in \mathbb{R}$. So $g=0$ and $f \in (f_1,f_2)$.