i mod 0

JacquesC's picture

So what should i mod 0 really be equal to? There has been a very interesting discussion over in the Mizar mailing list, starting with John Harrison's original post, followed by his superb summary of different choices, and Robert Boyer's response.  The discussion has continued since, but since the archive is only updated daily, you'll have to check back tomorrow to see the rest!

However, I thought that people here too might be interested in this discussion.  I am not sure which definition I prefer, but the ring-theoretical argument that Z/<0> is isomorphic to Z, makes it compelling to define it so that i mod 0 = i (rather than an error).

Axel Vogt's picture

algebra

For me x modulo n is a kind of abuse anyway, as it means to
choose something from a set, the equivalence class. 

But since one does it for rationals as well and there seems
to be no good way to work with sets - why not ...

However it leads to the confusing discussion what to do with
rational functions as the thread about 'eval' shows.

For the ring or group definition Z ---> Z / nZ my view of x mod n is 
to choose *the* representant in the integer interval 0 ... abs(n)-1,
while for n=0 there is nothing to choose.

Why is it a problem to define it that way? It can only be some,
if one insists in viewing at it as 'division with reminder', but
in Algebra you work beyond that (just use it, if it applies).


PS: especially I dislike negative representants.
alec's picture

frac

A related question is what should -0.3 mod 1 be equal to? In mathematics, it is fractional part, and equal to 0.7, but in Maple frac is different, and gives -0.3 in this example.

Alec

Axel Vogt's picture

R / Z

here I also prefer to have the representants with positive sign ... as usual in Math

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}