On 2015-01-25 22:07, John Cremona wrote:
I would say that this is undefined since the ideal generated by x+2
and x+4 is (2,x) which is not principal.  I think that the most useful
definition of gcd is a generator of the ideal generated by the two
objects *if* that ideal is principal.
I disagree. There are rings where a gcd can be defined(*) even if the ideal is not principal. Multi-variate polynomial rings are a very natural example. I see no reason to disallow gcd() there.

xgcd() is a different story, there you really need a stronger condition on the ring, namely you need a Bézout domain (every finitely generated ideal is principal, which is slightly weaker than PID).

So I think that gcd() should stay as it is and xgcd() should raise ArithmeticError if the ideal is not principal.

(*) literally as greatest common divisor, where "greatest" is taken using the partial order defined by division.

--
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 http://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to