On Feb 11, 10:49 am, Simon King <simon.k...@uni-jena.de> wrote: > Hi, > > On 11 Feb., 09:56, Simon King <simon.k...@uni-jena.de> wrote: > > > Well, I had the impression that a couple of people are in favour of > > the following: > > gcd(a/b,c/d) := gcd(a,c)/lcm(b,d) > > lcm(a/b,c/d) := lcm(a,c)/gcd(b,d) > > It just occurs to me that I am incredibly stupid. > > The definition above wouldn't work at all, it isn't even well-defined. > Just replace gcd(1/4,1/6) by gcd(3/12,9/54). You obtain gcd(1,1)/ > lcm(4,6) = 1/12, but gcd(3,9)/lcm(12,54) = 1/36. > > Does anyone have a better idea? Would it be a correct definition if > one insisted on reduced fractions?
Mathematically, if K is the fraction field of a PID R, then you should first reduce both fractions to a common denominator r1/d and r2/d. Then: gcd(r1/d, r2/d) = gcd(r1,r2)/d lcm(r1/d, r2/d) = lcm(r1, r2)/d This approach will be independent on the representation of the fractions (up to units in R). Although a direct translation of this idea seems inefficient. -- 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