1 | initial version |
There really should be a version of reduce somewhere that gives you which combination of the generators allowed for the reduction, and if someone can find where then that really should be the preferred solution, but at the expense of some extra variables, you can fake it:
Given two polynomials f and g in variables [z1,...,zn], embed the ring into a larger one with variables [z1,...,zn,F,G], with an elimination order for z1,...zn (i.e., those variables should be larger than F and G). Then reduce f-F with respect to the principal ideal generated by g-G. The result should be a polynomial that is free of z1,...,zn, and expresses F as a polynomial in G.