[Haskell-cafe] Thoughts about redesigning "Num" type class
Alexey Muranov
alexey.muranov at gmail.com
Sat Sep 12 09:27:40 UTC 2015
On 12 sept. 2015, at 11:12, Jerzy Karczmarczuk <jerzy.karczmarczuk at unicaen.fr> wrote:
> Le 12/09/2015 10:15, Alexey Muranov a écrit :
>> the difference of two points in an affine space is a vector, the sum of a point of an affine space and a vector is another point.
>
> We can give several similar examples, but it might not be so useful for the implementation of whatever. In the affine space we can interpolate between points: p0 + 1/2*(p1-p0) is the middle point. Writing it just as
> 1/2*(p0+p1) might be considered as an abomination, since you should not add points... Who should allow the first and forbid the second?
I agree, it gets complicated. A more general type of "weighted sums of points" would probably be needed, but impractical...
> If you have an additive group, you have automatically a module over integers. Sorry, *positive* integers.
Well, over all integers as well.
> Please read the *easy* article of John Baez (2009) : http://math.ucr.edu/home/baez/torsors.html
> And then look upon torsors in general, and recognize that is is simply horrible.
I didn't get this (i do not know much about torsors).
Alexey.
More information about the Haskell-Cafe
mailing list