blob: 03d2d2293da5e05d9e2071b8149b45a85271bf9b [file]
/-
Copyright (c) 2025 Lean FRO, LLC. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Wojciech Różowski
-/
module
prelude
public import Std.Data.DTreeMap.DecidableEquiv
public import Std.Data.TreeMap.Raw.Basic
public section
/-!
# Decidable equivalence for `TreeMap.Raw`
-/
open Std.DTreeMap.Raw
namespace Std.TreeMap.Raw
instance instDecidableEquiv {α : Type u} {β : Type v} {cmp : α → α → Ordering} [TransCmp cmp] [LawfulEqCmp cmp] [BEq β] [LawfulBEq β] {t₁ t₂ : Raw α β cmp} (h₁ : t₁.WF) (h₂ : t₂.WF) : Decidable (t₁ ~m t₂) :=
let : Ord α := ⟨cmp⟩;
let : Decidable (t₁.inner ~m t₂.inner) := DTreeMap.Raw.instDecidableEquiv h₁ h₂;
decidable_of_iff _ ⟨fun h => ⟨h⟩, fun h => h.1⟩
end Std.TreeMap.Raw