Changes between Initial Version and Version 1 of Ticket #10771


Ignore:
Timestamp:
02/11/11 10:22:56 (9 years ago)
Author:
SimonKing
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #10771 – Description

    initial v1  
    77The aim is to implement gcd and lcm as `ElementMethods` of the category `QuotientFields()`.
    88
    9 It seems that defining `gcd(a/b,c/d) = gcd(a,c)/lcm(b,d)` and `lcm(a/b,c/d) = lcm(a,c)/gcd(b,d)` works, ''under the assumption that `a/b` and `c/d` are reduced fractions''. Note: Since we need `gcd` for `a,b,c,d` anyway, it is no problem to reduce the fractions.
     9'''__Approach__'''
    1010
    11 But I am not 100% sure whether that approach is mathematically sober.
     11Let R be an integral domain, assume that it provides gcd and lcm, and let F be its fraction field. Since R has gcd, we can assume that `x.numerator()` and `x.denominator()` are relatively prime for any element x of F.
     12
     13Then, define
     14{{{
     15gcd(x,y) = gcd(x.numerator(),y.numerator())/lcm(x.denominator(),y.denominator())
     16lcm(x,y) = lcm(x.numerator(),y.numerator())/gcd(x.denominator(),y.denominator())
     17}}}
     18
     19'''__Benefits__'''
     20
     21If that approach is mathematically sober, we obtain the following equalities up to units in R:
     22
     23 * `gcd(x,y)*lcm(x,y)==x*y`, for any x,y in F, provided that the equality holds for any x,y in R.
     24 * `gcd(F(x),F(y))==gcd(x,y)` and `lcm(F(x),F(y))==lcm(x,y)` for any x,y in R.
     25