RE: gcd 0 0 = 0

2001-12-19 Thread Kent Karlsson
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

Re: gcd 0 0 = 0

2001-12-18 Thread Marc van Dongen
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

Re: gcd 0 0 = 0

2001-12-18 Thread Marc van Dongen
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

RE: gcd 0 0 = 0

2001-12-18 Thread Ch. A. Herrmann
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

Re: gcd 0 0 = 0

2001-12-18 Thread Lars Henrik Mathiesen
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

Re: gcd 0 0 = 0

2001-12-18 Thread Marc van Dongen
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

RE: gcd 0 0 = 0

2001-12-18 Thread Kent Karlsson
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

Re: gcd 0 0 = 0

2001-12-18 Thread Dylan Thurston
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

Re: gcd 0 0 = 0

2001-12-18 Thread Michael Ackerman
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

Re: gcd 0 0 = 0

2001-12-18 Thread Jan de Wit
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

Re: gcd 0 0 = 0

2001-12-17 Thread Lars Henrik Mathiesen
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

Re: gcd 0 0 = 0

2001-12-17 Thread George Russell
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

Re: gcd 0 0 = 0

2001-12-17 Thread Ch. A. Herrmann
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

Re: gcd 0 0 = 0

2001-12-17 Thread Alan Bawden
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,

Re: gcd 0 0 = 0

2001-12-16 Thread Marc van Dongen
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

Re: gcd 0 0 = 0

2001-12-15 Thread Alan Bawden
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

RE: gcd 0 0 = 0

2001-12-14 Thread Simon Peyton-Jones
|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

Re: gcd 0 0 = 0

2001-12-14 Thread Marc van Dongen
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

Re: gcd 0 0 = 0

2001-12-13 Thread Alan Bawden
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