Zulip Chat Archive
Stream: maths
Topic: Why does an `ordered_semiring` need to be add cancellative?
FR (Mar 22 2022 at 06:06):
Why does an ordered_semiring
need to be an add_cancel_comm_monoid
?
Damiano Testa (Mar 22 2022 at 06:31):
This has been a subject of long discussions. A partial fix comes from using co(ntra)variant_class
es, but the refactor is taking me a long time!
FR (Mar 22 2022 at 06:50):
In many cases, there is no add_left_cancel
. Also, many lemmas do not need it. Would it become more appropriate if we rename the structure and def a new ordered_semiring
?
Damiano Testa (Mar 22 2022 at 07:24):
My understanding is that norm_num
, linarith
and likely ring
, abel
, field_simp
use ordered_semiring
with its assumptions to work.
Changing the definition of ordered_semiring
would break a lot of what is currently in mathlib. This is the ain reason for not having already done what you suggest.
At least, this is how I internalised the issue!
FR (Mar 22 2022 at 16:00):
I have written a version of algebra/order/ring.lean
which ordered_semiring
does not need to be an add_cancel_comm_monoid
. The previous class is ordered_add_cancel_semiring
now. But I'm still confused with canonically_ordered_comm_semiring
. I even suspect it is a misspelling of conically_ordered
.
Yaël Dillies (Mar 22 2022 at 16:16):
By canonically ordered we mean that a ≤ b ↔ ∃ c, a + c = b
. Never heard of a conical order before.
FR (Mar 22 2022 at 16:39):
I've seen a similar expression (Conical) in the agda stdlib, although it doesn't refer to exactly the same thing. It doesn't matter. What confuses me is whether a canonically_ordered_comm_semiring
is also an ordered_semiring
.
Yaël Dillies (Mar 22 2022 at 16:40):
It currently is not, for the precise reason you started this thread.
Trebor Huang (Mar 23 2022 at 05:26):
I wonder if there's a counterexample...
Trebor Huang (Mar 23 2022 at 06:02):
Either I missed some assumptions, or is ...?
Last updated: Dec 20 2023 at 11:08 UTC