Zulip Chat Archive

Stream: Is there code for X?

Topic: a < b ∧ a = b → false


Bernd Losert (Apr 04 2022 at 16:39):

Is there a lemma like this somewhere for a partial order? I can't seem to find one. library_search didn't find one either.

Anne Baanen (Apr 04 2022 at 16:40):

You can do this using docs#has_lt.lt.ne:

import order.basic

example {α : Type*} {a b : α} [preorder α] (hlt : a < b) (heq : a = b) : false :=
hlt.ne heq

Yaël Dillies (Apr 04 2022 at 16:42):

or docs#eq.not_lt, for the flipped way

Bernd Losert (Apr 04 2022 at 16:46):

Cool. Thanks.


Last updated: Dec 20 2023 at 11:08 UTC