[issue37893] pow() should disallow inverse when modulus is +-1

Mark Dickinson report at bugs.python.org
Tue Aug 20 14:26:03 EDT 2019


Mark Dickinson <dickinsm at gmail.com> added the comment:

> I guess I'm just not used to 0 being a multiplicative identity.

Yes, there's a whole generation of mathematicians who believe (wrongly) that "0 != 1" is one of the ring axioms. But it turns out that excluding the zero ring from the category of (commutative, unital) rings isn't helpful, and causes all sorts of otherwise universal constructs (quotients, localizations, categorical limits in general) to have only conditional existence. So nowadays most (but not all) people accept that the zero ring has the same right to exist as any other commutative ring.

Integral domains are another matter, of course: there you really _do_ want to insist that 1 != 0, though what you're really insisting is that any finite product of nonzero elements should be nonzero, and 1 != 0 is just the special case of that rule for the empty product, while x*y !=0 for x != 0 and y != 0 is the special case for two arguments.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37893>
_______________________________________


More information about the Python-bugs-list mailing list