Created
January 18, 2023 16:17
-
-
Save cppio/e265729e3cd415ec8ecff0759338b583 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def beq_of_eq {α : Type u} [BEq α] [LawfulBEq α] {a b : α} : a = b → a == b := (· ▸ LawfulBEq.rfl) | |
| instance [BEq α] [LawfulBEq α] : DecidableEq α | |
| | x, y => if h : x == y then isTrue (eq_of_beq h) else isFalse (h ∘ beq_of_eq) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment