Commit 2026-01-08 11:26 4ca1c2ea
View on Github →refactor: make LinearOrderedCommMonoidWithZeros cancellative (#31749)
It appears that the only interesting LinearOrderedCommMonoidWithZeros are the ones for which every non-zero element is regular. This PR therefore strenghtens LinearOrderedCommMonoidWithZero, and similarly for LinearOrderedAddCommMonoidWithTop, its additive counterpart.
Here are the instances we lose:
ENNReal: multiplication by\topisn't injectiveERealᵒᵈ: multiplication by\topisn't injectiveCardinal: multiplication by anything but 1 isn't injectiveArchimedeanClass RwhereRis a non-strict ordered ring- the pathological counterexample of a
LinearOrderedCommMonoidWithZerowhere two positive numbers multiply to zero I believe these are all fine to lose since they had no mathematical motivation (we never use those as targets of valuations). There is an argument to be made that we could keep the existing typeclass as is and instead have the one I'm currently replacing it with under the nameLinearOrderedCancelCommMonoidWithZero. There are at least two reasons I do not want to do this:
- We have no evidence that the weaker typeclass is actually useful
LinearOrderedCommMonoidWithZero, weak or strong version, extends both the algebra and order hierarchy, which is something we want to move away from. Therefore, if anything, we should not be adding more of those typeclasses. This will be used in a later PR to replacepow_eq_one_iffwithIsMulTorsionFree.pow_eq_one_iff_left. Zulip