On 25 January 2015 at 20:48, Bruno Grenet <bruno.gre...@gmail.com> wrote: > Le 25/01/2015 21:26, Vincent Delecroix a écrit : >> >> Hello Bruno, >> >> Thanks for your answer. >> >>>> PS: On a related note, the following looks very wrong to me >>>> {{{ >>>> sage: x = polygen(ZZ) >>>> sage: (x+2).gcd(x+4) >>>> 1 >>>> }}} >>> >>> Why does it look wrong to you? In ZZ[x], (x+2) and (x+4) are two >>> irreducible monic polynomials, so their GCD is 1. Or I am missing >>> something... >> >> I forgot >> {{{ >> sage: (x+2).xgcd(x+4) >> (2, -1, 1) >> }}} >> The thing is that they have no common factor but (x+2, x+4) is not >> ZZ[x]. Subtlety between PID and UFD, isn't it? What should we do in >> that case? > > > I am quite reluctant for (x+2).gcd(x+4) to return 2 since to my mind (I > haven't checked references yet), the GCD of two elements should divide both > of them. So in this case, I think I prefer gcd and xgcd not the return the > same result. Yet it is not a strong opinion... >
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 acknowledge the fact that Z[x] is a UFD so that there is a definition of gcd which makes sense here, but it not the ideal generator of the other definition and hence there is no extended gcd, i.e. no Bezout identity. I seem to have argued the case that in a UFD which is no a PID, it makes sense to define gcd(a,b) but not xgcd(a,b). John > I'll try to have a look to some references to see how they usually define > the GCD and the Bézout coefficients for non-PIDs. > > Bonne soirée, > Bruno > > >> Vincent >> > > -- > 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. -- 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.