Zulip Chat Archive

Stream: mathlib4

Topic: Issue: nonZeroDivisors, regular elements, and localization


Junyan Xu (Mar 17 2025 at 03:48):

I opened issue #22997 and am now copying the content here for discussion.

Non-zero-divisors

We currently have the following defeqs:

import Mathlib.Algebra.GroupWithZero.NonZeroDivisors
variable (M : Type*) [MonoidWithZero M]
example : nonZeroDivisorsLeft M = nonZeroDivisors M := rfl
example : nonZeroDivisorsRight M = nonZeroSMulDivisors M M := rfl

Notice also that nonZeroDivisorsLeft coincides with non-left zero divisors according to Wikipedia, while nonZeroDivisorsRight coincides with non-right zero divisors. My suggestions are:

  • Switch the names nonZeroDivisorsLeft and nonZeroDivisorsRight (possibly rename to nonLeft/RightZeroDivisors)

  • Make nonZeroDivisors an abbreviation of nonZeroDivisorsLeft

  • (?) Define nonZeroDivisorsLeft using nonZeroSMulDivisors

Regular elements

  • Define the submonoids leftRegulars, rightRegulars and smulRegulars in terms of IsLeftRegular, IsRightRegular and IsSMulRegular (and additivize)

  • Show that they agree with non(SMul)ZeroDivisorsLeft/Right in a ring (holds in general)

  • Redefine Is(Left,Right)CancelMul and IsCancelSMul in terms of Is(Left,Right)Regular and IsSMulRegular

Localization (of commutative monoids/semirings)

Damiano Testa (Mar 17 2025 at 08:28):

I often find the left/right naming conventions confusing.

Damiano Testa (Mar 17 2025 at 08:28):

In this case, my initial instinct would be to define a "left zero-divisor" with the same convention that your Wikipedia link uses: a is a lzd if there is some non-zero x such that ax = 0.

Damiano Testa (Mar 17 2025 at 08:28):

So, assuming I did not get confused again about left and right, I am happy with your proposed changes!


Last updated: May 02 2025 at 03:31 UTC