Dear all,
I am very sorry for something like misprinting tragically in the
classic gcd definition. I had written
" gcd(a,b) is the *greatest* by inclusion ideal (d) among the
ones with the property of
(d) = {x*d | x <- R} to be *contained inside*
(a)+(b) = {x*a + y*b | x,y <- R}
"
while the right definition is
---------------------------------------------------------------------
(D)
... least by inclusion ideal (d) among the ones that contain (a)+(b)
----- -------
---------------------------------------------------------------------
This all concerns to the little discussion on whether it is good to
put gcd(0,0) = 0 in Haskell.
Again, gcd(0,0) = 0 does agree with this classic definition.
However, in the task where appear the expressions like gcd(a,b),
they usually consider the case a=b=0 separately.
Again, (D) shows that for Rationals and the like domains gcd is
trivial: a /= 0 => gcd(a,b) = 1.
So it looks strange speaking of gcd for rationals.
Sergey Mechveliani
[EMAIL PROTECTED]