[Haskell-cafe] Num instances for 2-dimensional types

Joe Fredette jfredett at gmail.com
Mon Oct 5 11:07:30 EDT 2009


Shouldn't the question not be "Is this a number?" but rather "What is  
a number?" -- I mean, from an abstract point of view, there's really  
no such thing, right? We have sets of things which we define an  
operation that has certain properties, and suddenly we start calling  
them numbers. Are the Symmetric groups -- which you can multiply and  
divide, but not add -- numbers? If they aren't, why should Z_n be  
numbers?

What _is_ true, is that you can define a notion of addition and  
multiplication for both complexes and 'double' "numbers", that doesn't  
mean they are "numbers", rather, it means they are both Rings. Nor  
does it imply that they must be "the same" They are both rings over  
the same set of elements (Lets say, RxR), but with different operations.

Furthermore, can't you construct the Rational's from the Integers in a  
similar way as you construct the complexes from the reals (by modding  
out an ideal/polynomial (resp)) -- I actually don't know for certain,  
we haven't gotten that far in my Alg. Class yet. :), but my intuition  
says that it's likely possible.

Point is -- there are lots of classes for which you can implement a  
useful notion of addition in more than one way -- or a useful notion  
of some other class function (monad stuff for Lists and Ziplists, for  
example), but that doesn't necessarily mean that the two things are  
the same structure, right?

/Joe

On Oct 5, 2009, at 10:55 AM, Miguel Mitrofanov wrote:

> No, they aren't. They are polynomials in one variable "i" modulo  
> i^2+1.
>
> Seriously, if you say complex numbers are just pairs of real numbers  
> - you have to agree that double numbers (sorry, don't know the exact  
> English term), defined by
>
> (a,b)+(c,d) = (a+c,b+d)
> (a,b)(c,d) = (ac, ad+bc)
>
> are just pairs of real numbers too. After that, you have two  
> choices: a) admit that complex numbers and double numbers are the  
> same - and most mathematicians would agree they aren't - or b) admit  
> that the relation "be the same" is not transitive - which is simply  
> bizarre.
>
>
> Lennart Augustsson wrote:
>> But complex numbers are just pairs of numbers.  So pairs of numbers
>> can obviously be numbers then.
>> On Mon, Oct 5, 2009 at 4:40 PM, Miguel Mitrofanov <miguelimo38 at yandex.ru 
>> > wrote:
>>> Lennart Augustsson wrote:
>>>> And what is a number?
>>> Can't say. You know, it's kinda funny to ask a biologist what it  
>>> means to be
>>> alive.
>>>
>>>> Are complex numbers numbers?
>>> Beyond any reasonable doubt. Just like you and me are most  
>>> certainly alive.
>>>
>> _______________________________________________
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list