PS: On 11 Feb., 09:56, Simon King <simon.k...@uni-jena.de> wrote: > Hi Tim, > > On 11 Feb., 08:06, daly <d...@axiom-developer.org> wrote: > > > ... > > Can you suggest an algorithm to implement this? > > Is there an agreed-upon answer (i.e., not 42?) > > Well, I had the impression that a couple of people are in favour of > the following:
Or was your question: *How* to implement it? I supposed that the functions gcd(a,b) and lcd(a,b) should first coerce a and b into a common parent, P. So, suppose by now that a and b both belong to P. Currently, gcd(a,b,c...) (a,b,c,... not in ZZ or long or int) uses sage.arith.__GCD_sequence, which then relies on the gcd-methods of the elements. Fraction fields can be easily detected: They belong to the category QuotientFields(). Hence, it would be reasonable to implement gcd- and lcm-methods for fraction field elements as ElementMethods of QuotientFields(). Of course, the custom gcd/lcm-methods that we currently have for the rationals (and maybe for some other fraction fields) should be removed. If one implements gcd/lcm as ElementMethods of QuotientFields(), then gcd/lcm for elements of Frac(QQ[x]) would work out of the box. Best regards, Simon -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org