Zulip Chat Archive
Stream: mathlib4
Topic: Spelling of well-ordered type
Sky Wilshaw (Dec 12 2023 at 12:39):
What's the canonical spelling of a well-ordered type α? I can think of
αr : α → α → Prop
withIsWellOrder α αr
, but this doesn't come with decidable<
LinearOrder α
andWellFoundedLT α
, but then we don't get anIsWellOrder
instance
I think option 2 looks nicer, but I'm not aware if there's a mathlib convention.
Yaël Dillies (Dec 12 2023 at 12:43):
I doubt there is a convention indeed. But you can use [LinearOrder α] [IsWellOrder α (· < ·)]
.
Yaël Dillies (Dec 12 2023 at 12:44):
Probably we should have abbrev IsWellOrdered (α) [LT α] := IsWellOrder α (· < ·)
.
Pedro Sánchez Terraf (Dec 13 2023 at 11:43):
By the way (and out of curiosity, not an urgent business), are there "reflexive wellorders" in Mathlib?
Sky Wilshaw (Dec 13 2023 at 11:44):
I don't think there are, but you can achieve the effect with Preorder α
and IsWellOrder α (· < ·)
.
Yaël Dillies (Dec 13 2023 at 11:45):
or {r : α → α → Prop} [IsRefl α r] [IsWellOrder α (fun a b, r a b ∧ ¬ r b a]
Yaël Dillies (Dec 13 2023 at 11:46):
Don't know exactly what kind of relations you care about, but I suspect everything can be smoothly done with what we already have.
Last updated: Dec 20 2023 at 11:08 UTC