Zulip Chat Archive
Stream: mathlib4
Topic: Difficulty synthesizing `LE (α ×ₗ β)`
Scott Carnahan (May 08 2025 at 15:59):
I see an explicit instance in docs#Prod.Lex.instLE but I am unable to make it fire. (I don't mind assuming [Preorder α] for my work but this seems strange to me)
import Mathlib.Data.Prod.Lex
variable {α β : Type*} [LE α] [LE β] -- change [LE α] to [Preorder α] to succeed.
#synth LE (α ×ₗ β)
Yakov Pechersky (May 08 2025 at 16:01):
Note that the first type needs an LT
Yakov Pechersky (May 08 2025 at 16:02):
That's why Preorder works, because you get a LT as well.
Scott Carnahan (May 08 2025 at 16:02):
Oh, I see it now! Thank you!
Yakov Pechersky (May 08 2025 at 16:03):
BTW if you're working with Lex, you might like #22420
Yakov Pechersky (May 08 2025 at 16:04):
It has
def Prod.Lex.orderHom {α β : Type*} [PartialOrder α] [Preorder β] :
α × β →o α ×ₗ β where
Last updated: Dec 20 2025 at 21:32 UTC