Zulip Chat Archive

Stream: mathlib4

Topic: CanonicallyOrderedCancelAddCommMonoid


Martin Dvořák (Dec 27 2023 at 18:21):

Is there a good reason not to define CanonicallyOrderedCancelAddCommMonoid that would combine OrderedCancelAddCommMonoid and CanonicallyOrderedAddCommMonoid together?
For example NNReal × NNRat × Nat would be a model.

Martin Dvořák (Dec 27 2023 at 18:37):

Wait. Isn't every CanonicallyOrderedAddCommMonoid cancellative? Lean doesn't show me such a thing but seems reasonable...

Yaël Dillies (Dec 27 2023 at 18:37):

No, consider Fin n with saturating addition.

Martin Dvořák (Dec 27 2023 at 18:38):

Ah yes.

Yaël Dillies (Dec 27 2023 at 18:38):

Honestly, we don't really care about these non-cancellative examples, so you could try adding the axiom to CanonicallyOrderedAddCommMonoid

Yaël Dillies (Dec 27 2023 at 18:39):

Wait no sorry we do. ℝ≥0∞ and ℕ∞ are not cancellative. But they are basically the only relevant counterexamples.

Martin Dvořák (Dec 27 2023 at 18:46):

If most examples of CanonicallyOrderedAddCommMonoid are OrderedCancelAddCommMonoid but not all that are relevant for us are, it is a case for defining a CanonicallyOrderedCancelAddCommMonoid. It seems to be a really neat algebra.

Yaël Dillies (Dec 27 2023 at 18:46):

Yeah sure

Martin Dvořák (Dec 27 2023 at 18:47):

Have I just gotten ((Yaël Dillies)™)'s preäpproval?

Martin Dvořák (Dec 27 2023 at 18:49):

Would CanonicallyOrderedCancelCommMonoid (i.e., the multiplicative version) be useful?

Yaël Dillies (Dec 27 2023 at 18:50):

I think it's fine having if only for symmetry of the API

Martin Dvořák (Dec 27 2023 at 19:55):

You've heard of the lovely small old round red Italian wooden decorative box?
Now get ready for canonically ordered additive cancellative commutative monoid!
#9307

Martin Dvořák (Dec 28 2023 at 22:21):

Why is it called CanonicallyOrderedAddCancelCommMonoid specifically? Why is "Add" in the middle of the identifier instead of "AddMonoid" at the end? I chose the name that @[to_additive] allowed.


Last updated: May 02 2025 at 03:31 UTC