
16 Dec
2020
16 Dec
'20
5:26 p.m.
On Wed, 16 Dec 2020, Tom Smeding wrote:
@Douglas: What about the ring of polynomials over the integers, i.e. Z[X]? We can certainly define a Num instance for that if we set 'signum _ = 1' and 'abs = id'. 'fromInteger' then injects constant polynomials.
I also thought about polynomials, but Num is a Ring plus 'signum' and 'abs'. Are your definitions ob 'signum' and 'abs' sound? Are there other sound definitions that may allow the n*(n+1)/2 magic?