blob: a4a9ca99a635ac9be1a982f0483f99b03d220350 [file]
import Std.Data.ExtTreeSet
open Std
instance : TransOrd Nat := inferInstance
@[ext]
structure A where
a : Nat
b : Nat
deriving Ord
instance : BEq A where
beq x y := x.b == y.b && x.a == y.a
instance : TransOrd A := sorry
instance : LawfulEqOrd A := sorry
@[simp]
theorem A.beq_eq {x y : A} : (x == y) = (x.b == y.b && x.a == y.a) := rfl
instance : LawfulBEq A where
rfl {x} := by simp
eq_of_beq {x y} := by grind [A.beq_eq, A.ext]
example : Decidable (ExtTreeSet.ofList [A.mk 1 2] = ExtTreeSet.ofList [A.mk 1 2]) := by
infer_instance