Zulip Chat Archive
Stream: mathlib4
Topic: CanonicallyOrderedMul.toOrderBot
Violeta Hernández (Jan 28 2025 at 21:12):
Currently, any type with a canonically ordered multiplication/addition will automatically get an OrderBot
instance, with bottom 1/0 respectively. Is this desirable?
Violeta Hernández (Jan 28 2025 at 21:14):
On the one hand, a type whose bottom element is either 1 or 0 will almost surely have an OrderBot
instance which sets ⊥ = 1
or ⊥ = 0
as a def-eq. But also, it seems like somewhat of an antipattern to have a more complicated instance setting a def-eq on a simpler instance.
Violeta Hernández (Jan 28 2025 at 21:15):
I imagine this must've been discussed during @Yuyang Zhao's refactor. Is this behavior intentional?
Ruben Van de Velde (Jan 28 2025 at 21:55):
Sounds odd to me as well
Violeta Hernández (Jan 28 2025 at 23:00):
I mostly want to know if this is an intentional decision. If it is, there's a few proofs in the Algebra.Order.Canonical.Monoid.Defs file that can be golfed by def-eqs to theorems on bot.
Violeta Hernández (Jan 28 2025 at 23:00):
If it's not, then maybe it should be addressed?
Eric Wieser (Jan 28 2025 at 23:52):
This sounds safe enough as is to me
Eric Wieser (Jan 28 2025 at 23:53):
I don't think the "deriving data from data" concern applies when the process is the identity function.
Violeta Hernández (Jan 29 2025 at 00:59):
If this def-eq is intentional, I've made a PR golfing some proofs by using it: #21203
Yaël Dillies (Jan 29 2025 at 08:48):
Possibly relevant: In #19193, I made docs#CanonicallyOrderedCommMonoidWithZero extend docs#OrderBot
Yaël Dillies (Jan 29 2025 at 08:48):
Oh wait, did my refactor get undone immediately?
Violeta Hernández (Jan 29 2025 at 08:49):
Seems intact: docs#LinearOrderedCommMonoidWithZero
Yaël Dillies (Jan 29 2025 at 11:13):
Ah sorry, brain was clearly off
Last updated: May 02 2025 at 03:31 UTC