On Thu, Feb 10, 2011 at 9:49 AM, Simon King <simon.k...@uni-jena.de> wrote:
> Hi Luis,
>
> On 10 Feb., 17:48, luisfe <lftab...@yahoo.es> wrote:
>> ...
>> You could have both consistencies. That depends on how you define gcd
>> and lcm:
>>
>> - Quotient fields as described by Bruno.
>> - Fields:  zero if both elements are zero. A non-zero element
>> otherwise (most fields would choose 1 here).
>> - PID: a generator of the corresponding ideal.
>>
>> This is not trivial. For instance Fields do not have a default gcd/lcm
>> method. I asked in sage-devel about some time ago about sensible
>> approaches 
>> here.http://groups.google.com/group/sage-devel/browse_thread/thread/12524b...
>
> Yes, on my way home, I thought that perhaps "lcm(4/1,2)=1" is not so
> obvious as I first found. lcm(a,b) has to be a generator of the
> intersection of the ideals generated by a and b. Of course, 1 is a
> quite canonical generator for the only non-zero ideal in a field --
> simply because any field has a 1.
>
> But any other non-zero element is fine as well, in a field. So, after
> all, defining lcm(a/b,c/d)=lcm(a,c)/gcd(b,d) for fraction fields of
> principal ideal domains makes more sense than I originally thought.
> And with gcd(a/b,c/d)=gcd(a,c)/lcm(b,d), we would indeed have
> gcd(x,y)*lcm(x,y)=x*y.
>
> According to Richard Fateman, that definition seems to be be used in
> Maxima ("in maxima, gcd(1/4,1/6)  is 1/12,  lcm is 1/2"). But
> according to Tim Daly, Axiom returns 1 as lcm of any two rationals.
> So, should Sage stay on the side of Axiom or switch to the side of
> Maxima?

It should switch to the side of Maxima/Pari/Mathematica/etc. in this.

 -- William

-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

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