YAP (was Re: Proposal: Remove Show and Eq superclasses of Num)

Paterson, Ross R.Paterson at city.ac.uk
Tue Oct 18 01:19:18 CEST 2011

Balazs Komuves writes:
> Rings with unity have a canonical map, actually a ring homomorphism (but not
> necessarily injection) from the integers, namely for the natural integer N, you
> add together the unit element with itself N times. For negative N, you take the
> additive inverse.

> For fields, you would try to extend this to rationals; however, it seems that because
> of the non-injectivity of the above, this won't always work. Example: finite fields.
> In a finite field of order P, we would have f(N/P) = f(N)/f(P) = f(N)/0 which is not defined.

Good point.  Mind you we already have this with Ratio Int and friends.

More information about the Libraries mailing list