PROTECTED]]On
Behalf Of Jan de Wit
Sent: den 19 december 2001 01:15
To: [EMAIL PROTECTED]
Subject: Re: gcd 0 0 = 0
Why not define gcd a b as the largest (in 'normal' order)
integer d such
that the set of sums of
multiples of a and b {na+mb | n - Z, m - Z} is equal to the set of
multiples of d
Ch. A. Herrmann ([EMAIL PROTECTED]) wrote:
: In contrast, 0*x=0, thus 0 divides 0 (somehow).
: But I have problems with gcd being the greatest positive integer ...
[snip]
: - 0 is not positive, it is non-negative or natural
: - 2 also divides 0 and 2 is a greater integer than 0
: (0 is the
Alan Bawden ([EMAIL PROTECTED]) wrote:
:In case it isn't clear already, these definitions make a lattice on
:the positive integers, with divides ~ leq, gcd ~ meet and lcm ~ join,
:using the report's definitions of gcd and lcm.
:
: Indeed, that's a nice way of putting it. How about
Simon == Simon Peyton-Jones [EMAIL PROTECTED] writes:
Simon Christoph does not like this
It's OK if the definition is clear; it wasn't using
the words positive or greatest integer.
Stating gcd 0 0 = 0 explicitly is a good thing,
even if it could be expressed verbatim;
people may think
From: Marc van Dongen [EMAIL PROTECTED]
Date: Tue, 18 Dec 2001 09:32:49 +
Alan Bawden ([EMAIL PROTECTED]) wrote:
: Indeed, that's a nice way of putting it. How about if the report just
: says:
:
:In order to make the non-negative integers into a lattice under `gcd'
:and
Lars Henrik Mathiesen ([EMAIL PROTECTED]) wrote:
: Alan Bawden ([EMAIL PROTECTED]) wrote:
: : Indeed, that's a nice way of putting it. How about if the report just
: : says:
: :
: :In order to make the non-negative integers into a lattice under `gcd'
: :and `lcm', we define `gcd
Simon == Simon Peyton-Jones [EMAIL PROTECTED] writes:
Simon Christoph does not like this
I still don't like this. 0 has never, and will never, divide anything,
in particular not 0. 0 may be a prime factor of 0 (see also below!),
but that is different. It is not the greatest (in the
On Tue, Dec 18, 2001 at 06:00:30PM +0100, Kent Karlsson wrote:
Why? If EVERY natural number is to have a prime factorisation, then BOTH
0 AND 1 have to be promoted to prime numbers;
1 has a perfectly fine prime factorization. It is the product of 0 primes,
the null product. (A null product
The general meaning of `having a prime factorization' is that every
non-zero element is uniquely a product of a unit and a product of
primes. The algebraic structures where unique factorizations live are
`unique factorization domains' (UFDs) of which a central class is formed
by the ring of
Why not define gcd a b as the largest (in 'normal' order) integer d such
that the set of sums of
multiples of a and b {na+mb | n - Z, m - Z} is equal to the set of
multiples of d
{nd | n - Z}? Easy to understand, no talk of division, lattices, rings,
ideals etcetera, and it covers the cases with
From: Marc van Dongen [EMAIL PROTECTED]
Date: Sun, 16 Dec 2001 13:35:59 +
Marc van Dongen ([EMAIL PROTECTED]) wrote:
: An integer $a$ divides integer $b$ if there exists an integer
: $c$ such that $a c= b$.
To make clear why $0$ (and not any other non-zero integer) is the
gcd
I've reconsidered my earlier position and think now that the Prelude is wrong to make
gcd 0 0 an error, and should return 0. It probably doesn't make much difference to
anyone, but it's like 1 not being a prime; it may be slightly harder to explain, but it
makes the maths come out nicer and is
George == George Russell [EMAIL PROTECTED] writes:
George I've reconsidered my earlier position and think now that the
George Prelude is wrong to make gcd 0 0 an error, and should return
George 0. It probably doesn't make much difference to anyone, but
George it's like 1 not
From: Lars Henrik Mathiesen [EMAIL PROTECTED]
Date: 17 Dec 2001 14:50:21 -
...
In case it isn't clear already, these definitions make a lattice on
the positive integers, with divides ~ leq, gcd ~ meet and lcm ~ join,
using the report's definitions of gcd and lcm.
Indeed,
Marc van Dongen ([EMAIL PROTECTED]) wrote:
: An integer $a$ divides integer $b$ if there exists an integer
: $c$ such that $a c= b$.
[snip]
: gcd 0 0 = 0; and
: gcd 0 0 /= error Blah
To make clear why $0$ (and not any other non-zero integer) is the
gcd of $0$ and $0$ I should have added
From: Simon Peyton-Jones [EMAIL PROTECTED]
Date: Fri, 14 Dec 2001 01:18:56 -0800
...
If someone could write a sentence or two to explain why gcd 0 0 = 0,
(ideally, brief ones I can put in the report by way of explanation),
I think that might help those of us who have not
|Probably, the best specification would be
|
| gcd n m :: Integer = if n == 0 m == 0 then 0
| else
| greatest integer that divides both n and m
Well, thank you all those that have contributed. My original point
was simply to say
Simon Peyton Jones ([EMAIL PROTECTED]) wrote:
: If someone could write a sentence or two to explain why gcd 0 0 = 0,
: (ideally, brief ones I can put in the report by way of explanation),
: I think that might help those of us who have not followed the details
: of the discussion.
Division in
From: S.D.Mechveliani [EMAIL PROTECTED]
Date: Thu, 13 Dec 2001 12:53:32 +0300
Further, the definintion
gcd(x, y) to be the smallest
z = 0 such that {m*x + n*y | m, n in Z} = {n*z | n in Z}
is not natural. In particular, how does it generalize to gcd X Y
for
19 matches
Mail list logo