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
nonZeroDivisorsLeftandnonZeroDivisorsRight(possibly rename tononLeft/RightZeroDivisors) -
Make
nonZeroDivisorsan abbreviation ofnonZeroDivisorsLeft -
(?) Define
nonZeroDivisorsLeftusingnonZeroSMulDivisors
Regular elements
-
Define the submonoids
leftRegulars,rightRegularsandsmulRegularsin terms ofIsLeftRegular,IsRightRegularandIsSMulRegular(and additivize) -
Show that they agree with
non(SMul)ZeroDivisorsLeft/Rightin a ring (≤holds in general) -
Redefine
Is(Left,Right)CancelMulandIsCancelSMulin terms ofIs(Left,Right)RegularandIsSMulRegular
Localization (of commutative monoids/semirings)
- Replace
nonZeroDivisorsbyregularsin localization API, especially in IsFractionRing, FractionRing, and IsLocalizedModule.rank_eq: IsLocalization.injective continue to hold, and it's also true that the localization mapfin IsLocalizedModule is injective iff the submonoid S is contained insmulRegulars R M.
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