Break `abs` into two aspects

Carter Schonwald carter.schonwald at gmail.com
Tue Jan 28 14:59:04 UTC 2020


Well said Andrew!

There’s a second twist : last I checked our abs for complex numbers isn’t
the Euclidean norm or any Lp norm ..

We could define the Pth power of the lpNorm for any complex a I think.
Though that’s a weaker operation.

On Tue, Jan 28, 2020 at 7:11 AM Andrew Lelechenko <
andrew.lelechenko at gmail.com> wrote:

> On Tue, 28 Jan 2020, Dannyu NDos wrote:
>
> > `abs` represents a norm, but its type is wrong
>
> There are two useful meanings of `abs`, which coincide for integers. One
> is a norm. Another one is to define `abs` as a mapping from a ring R to a
> factor ring R / U(R), where U(R) is a ring of units, and `signum` as a
> mapping from R to U(R) such that `abs a * signum a = a`.
>
> > This enables us to implement rings (Num) and fields (Fractional) without
> > concerning about norms. For example, Gaussian integers.
>
> For Gaussian integers I find convenient to define `signum z` with a
> codomain {1, i, -1, -I} (basically, to which quadrant does z belong?) and
> `abs z` with the first quadrant as a codomain.
>
> Best regards,
> Andrew
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20200128/c99b3490/attachment.html>


More information about the Libraries mailing list