[Haskell-cafe] Re: Numeric type classes
Bryan Burgers
bryan.burgers at gmail.com
Tue Sep 12 11:52:24 EDT 2006
> It seems we are at a point, where we have to define what is a 'number'.
> More precisely: Can you tell me the difference between numbers and "more
> complex mathematical objects"? Is a complex number a number? Is a
> quaternion a number? Is a residue class a number? We can calculate with
> integers modulo some other integer like with integers - is that considered
> computation with numbers? Shall we distinguish between matrices of numbers
> and matrices of more complex mathematical objects? In signal theory
> matrices of polynomials are very common.
My question would be why is it so important to determine what is or
isn't a number? Whether something is a number or not does not
determine what operations and properties it has. Rather, we should try
to determine what is a field, a ring, a group, etc. If we know that
matrices of polynomials form a group, then we can perform the
operations of the group on those objects.
That being said, I'll have to play the other side of the coin: it
would probably be a little bit of a pain to have to define instances
of each data declaration (Integer, Int, Float, Matrix, Complex, etc.)
on each of these seperate classes--especially when being in a certain
class usually implies being in another (ie, the definition of a set
being a field requires that that set is a group, right?) And another
problem I can see is that, for example, the Integers are a group over
addition, and also a group over multiplication; and in my small bit of
thinking about this, it seems that having to keep track of all of this
might get a bit unruly.
Bryan Burgers
More information about the Haskell-Cafe
mailing list