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
andnonZeroDivisorsRight
(possibly rename tononLeft/RightZeroDivisors
) -
Make
nonZeroDivisors
an abbreviation ofnonZeroDivisorsLeft
-
(?) Define
nonZeroDivisorsLeft
usingnonZeroSMulDivisors
Regular elements
-
Define the submonoids
leftRegulars
,rightRegulars
andsmulRegulars
in terms ofIsLeftRegular
,IsRightRegular
andIsSMulRegular
(and additivize) -
Show that they agree with
non(SMul)ZeroDivisorsLeft/Right
in a ring (≤
holds in general) -
Redefine
Is(Left,Right)CancelMul
andIsCancelSMul
in terms ofIs(Left,Right)Regular
andIsSMulRegular
Localization (of commutative monoids/semirings)
- Replace
nonZeroDivisors
byregulars
in localization API, especially in IsFractionRing, FractionRing, and IsLocalizedModule.rank_eq: IsLocalization.injective continue to hold, and it's also true that the localization mapf
in 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