On Sun, Jul 05, 2026 at 07:51:32AM +0800, Qian Yun wrote:
> On 7/4/26 11:08 PM, Waldek Hebisch wrote:
> > On Fri, Jul 03, 2026 at 04:59:01PM +0200, Waldek Hebisch wrote:
> >> On Fri, Jul 03, 2026 at 09:41:00PM +0800, Qian Yun wrote:
> >>> Well, I think OrderedRing should not have OrderedMonoid.
> >>>
> >>> (The quoted email says OrderedSemiGroup, but the attached patch
> >>> in quoted email and commit 7564b5d2 says OrderedMonoid.)
> >>>
> >>> Because OrderedMonoid says if x < y, then for all z we have z*x < z*y.
> >>> But for OrderedRing, if x < y, then z*x < z*y only if z > 0.
> >>
> >> Clearly there is a contradiction. But it is not clear to me
> >> how we should resolve it. One possibility is to change axioms
> >> of OrderedMonoid.
> >
> > Attaches is a patch with new axioms. If nobody finds problem
> > with then I am going to commit it.
> >
>
> I don't like it. It loses the "for all" property.
Well, we have "for all" propety. Simply it is split into
3 cases that cover everything.
> What does OrderedSemiGroup have 0 (addition identity) mean?
As explained in the patch 0 here means semigroup zero (no
assumption about existence of addition):
+++ we say that a semigroup has zero if there exists element z
+++ such that for all x we have z*x = x*z = z. Below we will
+++ write 0 instead of z.
>
> Counter example found by LLM:
>
> =======
> Consider the set of real numbers \mathbb{R} under a modified
> associative operation \star:
> x \star y = x \cdot y if y > 0
> x \star y = 0 if y \le 0
> This operation \star is associative and compatible with the standard
> total order of \mathbb{R}.
> The element 0 is indeed a semigroup zero since:
> 0 \star x = 0 (for both x > 0 and x \le 0)
> x \star 0 = 0 (for all x in \mathbb{R})
> Now, let x = 1, y = 2 (so x < y). Let the multiplier be z = -1 < 0.
> According to the proposed axioms, we should have:
> x \star z > y \star z => 1 \star (-1) > 2 \star (-1)
> But since z \le 0, by our operation definition:
> 1 \star (-1) = 0 and 2 \star (-1) = 0
> Thus, we would require 0 > 0, which is FALSE.
> ========
Note that \star fails our current axioms for the same reason:
our axioms require strict inequality (in fact, as I wrote _any_
semigroup with zero fails our axioms). And we want strict
inequality because it holds in popular structures and has
strong consequences.
You may also look at max + semiring. That is nonegative real
numbers with two operations. One, playing the role of additions
is x \oplus y = max(x, y), second, playing role of multiplication
is x \otimes y = x + y. This is a semiring, that is both
\oplus and \otimes are associative, and distributive law holds.
There is no zero and it is OrderedSemigroup according to our
axioms. OTOH it is not OrderedAbelianSemigroup, because
inequality is not strict.
If you want to handle semigroups as above, you need different
axioms. We could have condition like WeakMonotonicityOfAddition,
StrongMonotonicityOfMultiplication or SignedMonotonicityOfMultiplication.
The first two hopefully are clear, the last one means the
axiom I gave. But I am not eager to use such names.
Part of the problem is that our categories are named
and there is limited supply of good names. Unfortunately,
in mathematical practice names are reused and made to carry
different meanings in different areas (and sometimes within
a single area).
> My view is that: multiplication comes from two places:
> one is Group, another one is Ring.
Well, "typical" homogeneous '*' comes from Magma. There is a
bunch if inhomogeneous ones due to module-like structures.
And some in domains that do not fit well into our category
structure. Now, strict inequality for all elements implies
cancelation property, so if you have semigroup you can
embed it into a group. Semigrup with zero can not be embedded
into a group. Since the example above fails our axioms,
it can not be embedded into an ordered ring. So in view of
the example do you want to keep your view?
> I think we should simply remove OrderedMonoid from OrderedRing,
> and keep current axioms.
If you remove OrderedMonoid from OrderedRing, then build fails. So
you need to adjust conditions. ATM it seems that definition I gave
is the simplest possible adjustment.
--
Waldek Hebisch