> The algorithm in question is described in “Ideals, Varieties, and > Algorithms” by David Cox, John Little and Donal O’Shea in Section "§3 A > Division Algorithm in k[x_1 , … , x_n]".
It is not: sage: A.<x,y> = PolynomialRing(QQ, order="lex") sage: (x*y^2 + 1).reduce([x*y + 1, y+1]) x + 1 sage: (x*y^2 + 1).reduce([y+1, x*y + 1]) x + 1 whereas Example 1 in §3 gives remainder 2; sage: A.<x,y> = PolynomialRing(QQ, order="lex") sage: (x^2*y + x*y^2 + y^2).reduce([x*y - 1, y^2 - 1]) 2*x + 1 sage: (x^2*y + x*y^2 + y^2).reduce([y^2 - 1, x*y - 1]) 2*x + 1 whereas Example 2 gives remainder x + y + 1. > My understanding is it does the (naïve?) reduction algorithm: > > reducing = True > while reducing: > reducing = False > for expr in I: > if expr.leading_monomial().divides(cur.leading_monomial()): > cur -= cur.leading_term() / expr.leading_term() * expr > reducing = True It does not: sage: def travis_red(f, I): ....: cur = f ....: reducing = True ....: while reducing: ....: reducing = False ....: for expr in I: ....: if expr.lm().divides(cur.lm()): ....: cur -= cur.lt() // expr.lt() * expr ....: reducing = True ....: return cur ....: sage: travis_red(x^2*y + x*y^2 + y^2, [y^2 - 1, x*y - 1]) 2*x + y^2 > Singular itself does this (see pp. 51-52 of "A Singular Introduction > to Commutative Algebra") and the text even speaks of a non-unique "NF > [normal form] w.r.t. a non-standard basis", illustrating how the > results are different when the basis is not standard (aka Gröbner) > and how there is a unique canonical result when the basis is > standard. Singular seems to have changed algorithm since. The example 1.6.13 you're referring to computes slightly different: sage: A.<x,y,z> = PolynomialRing(QQ, order="degrevlex") sage: f = x^2*y*z + x*y^2*z + y^2*z + z^3 + x*y sage: f1 = x*y + y^2 - 1 sage: f2 = x*y sage: f.reduce([f1, f2]) # same as in the example y^2*z + z^3 sage: f.reduce([f2, f1]) # missing a xz monomial y^2*z + z^3 - y^2 + 1 Luca -- You received this message because you are subscribed to the Google Groups "sage-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-devel+unsubscr...@googlegroups.com. To post to this group, send email to sage-devel@googlegroups.com. Visit this group at https://groups.google.com/group/sage-devel. For more options, visit https://groups.google.com/d/optout.