Hi all!

On 9 Feb., 15:57, luisfe <lftab...@yahoo.es> wrote:
> On Feb 9, 9:46 am, "D. S. McNeil" <dsm...@gmail.com> wrote:
>
> > >> (1) gcd is broken.    http://trac.sagemath.org/sage_trac/ticket/10459
> > [..]
> > > I'm personally OK either way with this.
>
> > IMO a*b = gcd(a,b)*lcm(a,b) should be maintained wherever possible.

What does "Wherever possible" mean in an ordered ring, R? In
particular, is it possible for R=QQ? Or even for R=ZZ?

If I am not mistaken, lcm(x,y) could be defined as
  inf {x*m | m in R, x*m>0, there is n in R with x*m==y*n}    (1)
At least, that definition matches the situation in ZZ (note that
lcm(-2,-2) = 2).
Or is there any reason to have a minimum rather than an infimum?

On the other hand, what is the notion of a "multiple" of x? Is it
simply x*m for any m in R? Or is it rather x*m for any abs(m)>=1 in R?
In that case, definition (1) above became
  inf {x*m | m in R, abs(m)>=1, x*m>0, there is n in R with abs(n)>=1
and x*m==y*n}  (2)
Again, it's one definition that matches the situation in ZZ.

Now, consider R=QQ.
According to definition (1), the least common multiple of 1/1 and 1/1
is: Zero! 'Cause any positive rational is a multiple of 1/1, and the
infimum is zero.
But according to definition (2), the least common multiple of 1/1 and
1/1 is: 1/1.

Perhaps there are other possible ways to extend the notion of lcm from
ZZ to any ordered ring. I could imagine that different textbooks use
slightly different ways of defining lcm and gcd in ZZ, extending to QQ
differently.

So, is QQ reasonably covered by "Wherever possible"?? I doubt.
Note that currently we have
  sage: gcd(-2,1)
  1
  sage: lcm(-2,1)
  2
So, gcd(x,y)*lcm(x,y) == x*y doesn't even hold in ZZ. Why should it
hold in QQ?

Cheers,
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

Reply via email to