I am interested in computing the "top-degree homogenization of an ideal", the ideal generated by the top-degree homogeneous components of every element in a polynomial ideal $I$.
I had previously been (mistakenly) doing:
ideal([f(list(R.gens()) + [0]) for f in I.homogenize().gens()])
which gives the ideal generated by the top-degree homogeneous components of the given generators of $I$.
This is not the same: consider $I = (x^2 + x, x^2 + y)$. The above code would produce $(x^2)$, but the top-degree homogenization should contain $x-y$ (as the top-degree component of $(x^2+x) - (x^2 + y)$).
Are there known techniques for doing this?