![]() | 1 | initial version |
Yes, this can be done algorithmically. First you compute a Groebner basis ⟨g1,…,gr⟩ of I, and remember the expressions gi=aif+big. Then you do multivariate polynomial division of h by ⟨g1,…,gr⟩. This yields h=c1g1+…+crgr=(c1a1+…crar)f+(c1b1+…crbr)g.
In your example one Groebner basis of I is ⟨f,g,f1,f2,f3⟩ where f1=S(f,g)=f−zg, f2=S(f1,f)−zg=(y−z)f−z(y+1)g, f3=S(f1,f2)=(x−z(y−z))f+z(z(y+1)−x)g. Multivariate polynomial division of h by ⟨f,g,f1,f2,f3⟩ yields h=f+f2=(y−z+1)f−z(y+1)g.
This can all easily be automated in Sage (but I don't have time to do it now).