This is an internal implementation file of the hash map. Users of the hash map should not rely on the contents of this file.

File contents: verification of operations on `Raw₀`

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.buckets_emptyWithCapacity {α : Type u} {β : α → Type v} {c i : Nat} {h : i < (emptyWithCapacity c).val.buckets.size} :
(emptyWithCapacity c).val.buckets[i] = AssocList.nil
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.buckets_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.buckets_empty {α : Type u_1} {β : α → Type u_2} {c i : Nat} {h : i < (emptyWithCapacity c).val.buckets.size} :
(emptyWithCapacity c).val.buckets[i] = AssocList.nil
Equations

- @Std.DHashMap.Internal.Raw₀.buckets_empty = @Std.DHashMap.Internal.Raw₀.buckets_emptyWithCapacity

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw.buckets_emptyWithCapacity {α : Type u} {β : α → Type v} {c i : Nat} {h : i < (Raw.emptyWithCapacity c).buckets.size} :
(Raw.emptyWithCapacity c).buckets[i] = AssocList.nil
source
@[simp]
theorem Std.DHashMap.Internal.Raw.buckets_empty {α : Type u} {β : α → Type v} {i : Nat} {h : i < ∅.buckets.size} :
∅.buckets[i] = AssocList.nil
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw.buckets_empty (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw.buckets_emptyc {α : Type u_1} {β : α → Type u_2} {i : Nat} {h : i < ∅.buckets.size} :
∅.buckets[i] = AssocList.nil
Equations

- @Std.DHashMap.Internal.Raw.buckets_emptyc = @Std.DHashMap.Internal.Raw.buckets_empty

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.buckets_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {c i : Nat} {h : i < (emptyWithCapacity c).inner.buckets.size} :
(emptyWithCapacity c).inner.buckets[i] = AssocList.nil
source
@[simp]
theorem Std.DHashMap.Internal.buckets_empty {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {i : Nat} {h : i < ∅.inner.buckets.size} :
∅.inner.buckets[i] = AssocList.nil
source
@[reducible, inline, deprecated Std.DHashMap.Internal.buckets_empty (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.buckets_emptyc {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {i : Nat} {h : i < ∅.inner.buckets.size} :
∅.inner.buckets[i] = AssocList.nil
Equations

- @Std.DHashMap.Internal.buckets_emptyc = @Std.DHashMap.Internal.buckets_empty

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.size_emptyWithCapacity {α : Type u} {β : α → Type v} {c : Nat} :
(emptyWithCapacity c).val.size = 0
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.size_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.size_empty {α : Type u_1} {β : α → Type u_2} {c : Nat} :
(emptyWithCapacity c).val.size = 0
Equations

- @Std.DHashMap.Internal.Raw₀.size_empty = @Std.DHashMap.Internal.Raw₀.size_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_eq_size_eq_zero {α : Type u} {β : α → Type v} (m : Raw₀ α β) :
m.val.isEmpty = (m.val.size == 0)
source
def Std.DHashMap.Internal.Raw₀.tacticWf_trivial :
Lean.ParserDescr

Internal implementation detail of the hash map

Equations

- Std.DHashMap.Internal.Raw₀.tacticWf_trivial = Lean.ParserDescr.node `Std.DHashMap.Internal.Raw₀.tacticWf_trivial 1024 (Lean.ParserDescr.nonReservedSymbol "wf_trivial" false)

Instances For

source
def Std.DHashMap.Internal.Raw₀.tacticEmpty :
Lean.ParserDescr

Internal implementation detail of the hash map

Equations

- Std.DHashMap.Internal.Raw₀.tacticEmpty = Lean.ParserDescr.node `Std.DHashMap.Internal.Raw₀.tacticEmpty 1024 (Lean.ParserDescr.nonReservedSymbol "empty" false)

Instances For

source
def Std.DHashMap.Internal.Raw₀.«tacticSimp_to_model[_]Using_» :
Lean.ParserDescr

Internal implementation detail of the hash map

Equations

- One or more equations did not get rendered due to their size.

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {c : Nat} :
(emptyWithCapacity c).val.isEmpty = true
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.isEmpty_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.isEmpty_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {c : Nat} :
(emptyWithCapacity c).val.isEmpty = true
Equations

- @Std.DHashMap.Internal.Raw₀.isEmpty_empty = @Std.DHashMap.Internal.Raw₀.isEmpty_emptyWithCapacity

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).val.isEmpty = false
source
theorem Std.DHashMap.Internal.Raw₀.contains_congr {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a b : α} (hab : (a == b) = true) :
m.contains a = m.contains b
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.contains_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {a : α} {c : Nat} :
(emptyWithCapacity c).contains a = false
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.contains_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.contains_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {a : α} {c : Nat} :
(emptyWithCapacity c).contains a = false
Equations

- @Std.DHashMap.Internal.Raw₀.contains_empty = @Std.DHashMap.Internal.Raw₀.contains_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.contains_of_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
m.val.isEmpty = true → m.contains a = false
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_eq_false_iff_exists_contains_eq_true {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.isEmpty = false ↔ ∃ (a : α), m.contains a = true
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_iff_forall_contains {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.isEmpty = true ↔ ∀ (a : α), m.contains a = false
source
theorem Std.DHashMap.Internal.Raw₀.contains_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insert k v).contains a = (k == a || m.contains a)
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insert k v).contains a = true → (k == a) = false → m.contains a = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.size_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).val.size = if m.contains k = true then m.val.size else m.val.size + 1
source
theorem Std.DHashMap.Internal.Raw₀.size_le_size_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
m.val.size ≤ (m.insert k v).val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_insert_le {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).val.size ≤ m.val.size + 1
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.erase_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {k : α} {c : Nat} :
(emptyWithCapacity c).erase k = emptyWithCapacity c
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.erase_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.erase_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {k : α} {c : Nat} :
(emptyWithCapacity c).erase k = emptyWithCapacity c
Equations

- @Std.DHashMap.Internal.Raw₀.erase_empty = @Std.DHashMap.Internal.Raw₀.erase_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
(m.erase k).val.isEmpty = (m.val.isEmpty || m.val.size == 1 && m.contains k)
source
theorem Std.DHashMap.Internal.Raw₀.contains_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} :
(m.erase k).contains a = (!k == a && m.contains a)
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} :
(m.erase k).contains a = true → m.contains a = true
source
theorem Std.DHashMap.Internal.Raw₀.size_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
(m.erase k).val.size = if m.contains k = true then m.val.size - 1 else m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_erase_le {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
(m.erase k).val.size ≤ m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_le_size_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
m.val.size ≤ (m.erase k).val.size + 1
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.containsThenInsert_fst {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {k : α} {v : β k} :
(m.containsThenInsert k v).fst = m.contains k
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.containsThenInsert_snd {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {k : α} {v : β k} :
(m.containsThenInsert k v).snd = m.insert k v
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.containsThenInsertIfNew_fst {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {k : α} {v : β k} :
(m.containsThenInsertIfNew k v).fst = m.contains k
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.containsThenInsertIfNew_snd {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {k : α} {v : β k} :
(m.containsThenInsertIfNew k v).snd = m.insertIfNew k v
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.get?_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {a : α} {c : Nat} :
(emptyWithCapacity c).get? a = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.get?_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.get?_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {a : α} {c : Nat} :
(emptyWithCapacity c).get? a = none
Equations

- @Std.DHashMap.Internal.Raw₀.get?_empty = @Std.DHashMap.Internal.Raw₀.get?_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.get?_of_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} :
m.val.isEmpty = true → m.get? a = none
source
theorem Std.DHashMap.Internal.Raw₀.get?_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a k : α} {v : β k} :
(m.insert k v).get? a = if h : (k == a) = true then some (cast ⋯ v) else m.get? a
source
theorem Std.DHashMap.Internal.Raw₀.get?_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).get? k = some v
source
theorem Std.DHashMap.Internal.Raw₀.contains_eq_isSome_get? {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} :
m.contains a = (m.get? a).isSome
source
theorem Std.DHashMap.Internal.Raw₀.get?_eq_some_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {v : β k} :
m.get? k = some v ↔ ∃ (h : m.contains k = true), m.get k h = v
source
theorem Std.DHashMap.Internal.Raw₀.get?_eq_none {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} :
m.contains a = false → m.get? a = none
source
theorem Std.DHashMap.Internal.Raw₀.get?_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} :
(m.erase k).get? a = if (k == a) = true then none else m.get? a
source
theorem Std.DHashMap.Internal.Raw₀.get?_erase_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} :
(m.erase k).get? k = none
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.get?_emptyWithCapacity {α : Type u} [BEq α] [Hashable α] {β : Type v} {a : α} {c : Nat} :
get? (emptyWithCapacity c) a = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get?_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get?_empty {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} {a : α} {c : Nat} :
get? (emptyWithCapacity c) a = none
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get?_empty = @Std.DHashMap.Internal.Raw₀.Const.get?_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_of_isEmpty {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
m.val.isEmpty = true → get? m a = none
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insert {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β} :
get? (m.insert k v) a = if (k == a) = true then some v else get? m a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insert_self {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β} :
get? (m.insert k v) k = some v
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_eq_isSome_get? {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
m.contains a = (get? m a).isSome
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_some_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β} :
get? m k = some v ↔ ∃ (h : m.contains k = true), get m k h = v
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_none {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
m.contains a = false → get? m a = none
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_erase {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} :
get? (m.erase k) a = if (k == a) = true then none else get? m a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_erase_self {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
get? (m.erase k) k = none
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_get? {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] (h : m.val.WF) {a : α} :
get? m a = m.get? a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_congr {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a b : α} (hab : (a == b) = true) :
get? m a = get? m b
source
theorem Std.DHashMap.Internal.Raw₀.get_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} {v : β k} {h₁ : (m.insert k v).contains a = true} :
(m.insert k v).get a h₁ = if h₂ : (k == a) = true then cast ⋯ v else m.get a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).get k ⋯ = v
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.get_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} {h' : (m.erase k).contains a = true} :
(m.erase k).get a h' = m.get a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get?_eq_some_get {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} {h' : m.contains a = true} :
m.get? a = some (m.get a h')
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insert {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β} {h₁ : (m.insert k v).contains a = true} :
get (m.insert k v) a h₁ = if h₂ : (k == a) = true then v else get m a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insert_self {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β} :
get (m.insert k v) k ⋯ = v
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.get_erase {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {h' : (m.erase k).contains a = true} :
get (m.erase k) a h' = get m a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_some_get {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} {h✝ : m.contains a = true} :
get? m a = some (get m a h✝)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_eq_get {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] (h : m.val.WF) {a : α} {h✝ : m.contains a = true} :
get m a h✝ = m.get a h✝
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_congr {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a b : α} (hab : (a == b) = true) {h' : m.contains a = true} :
get m a h' = get m b ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get!_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {a : α} [Inhabited (β a)] {c : Nat} :
(emptyWithCapacity c).get! a = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.get!_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.get!_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {a : α} [Inhabited (β a)] {c : Nat} :
(emptyWithCapacity c).get! a = default
Equations

- @Std.DHashMap.Internal.Raw₀.get!_empty = @Std.DHashMap.Internal.Raw₀.get!_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.get!_of_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} [Inhabited (β a)] :
m.val.isEmpty = true → m.get! a = default
source
theorem Std.DHashMap.Internal.Raw₀.get!_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} [Inhabited (β a)] {v : β k} :
(m.insert k v).get! a = if h : (k == a) = true then cast ⋯ v else m.get! a
source
theorem Std.DHashMap.Internal.Raw₀.get!_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} [Inhabited (β a)] {b : β a} :
(m.insert a b).get! a = b
source
theorem Std.DHashMap.Internal.Raw₀.get!_eq_default {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} [Inhabited (β a)] :
m.contains a = false → m.get! a = default
source
theorem Std.DHashMap.Internal.Raw₀.get!_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} [Inhabited (β a)] :
(m.erase k).get! a = if (k == a) = true then default else m.get! a
source
theorem Std.DHashMap.Internal.Raw₀.get!_erase_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} [Inhabited (β k)] :
(m.erase k).get! k = default
source
theorem Std.DHashMap.Internal.Raw₀.get?_eq_some_get! {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} [Inhabited (β a)] :
m.contains a = true → m.get? a = some (m.get! a)
source
theorem Std.DHashMap.Internal.Raw₀.get!_eq_get!_get? {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} [Inhabited (β a)] :
m.get! a = (m.get? a).get!
source
theorem Std.DHashMap.Internal.Raw₀.get_eq_get! {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} [Inhabited (β a)] {h✝ : m.contains a = true} :
m.get a h✝ = m.get! a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_emptyWithCapacity {α : Type u} [BEq α] [Hashable α] {β : Type v} [Inhabited β] {a : α} {c : Nat} :
get! (emptyWithCapacity c) a = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get!_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get!_empty {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [Inhabited β] {a : α} {c : Nat} :
get! (emptyWithCapacity c) a = default
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get!_empty = @Std.DHashMap.Internal.Raw₀.Const.get!_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_of_isEmpty {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {a : α} :
m.val.isEmpty = true → get! m a = default
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insert {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {k a : α} {v : β} :
get! (m.insert k v) a = if (k == a) = true then v else get! m a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insert_self {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {k : α} {v : β} :
get! (m.insert k v) k = v
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_eq_default {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {a : α} :
m.contains a = false → get! m a = default
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_erase {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {k a : α} :
get! (m.erase k) a = if (k == a) = true then default else get! m a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_erase_self {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {k : α} :
get! (m.erase k) k = default
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_some_get! {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {a : α} :
m.contains a = true → get? m a = some (get! m a)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_eq_get!_get? {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {a : α} :
get! m a = (get? m a).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_eq_get! {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {a : α} {h✝ : m.contains a = true} :
get m a h✝ = get! m a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_eq_get! {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] [Inhabited β] (h : m.val.WF) {a : α} :
get! m a = m.get! a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_congr {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {a b : α} (hab : (a == b) = true) :
get! m a = get! m b
source
theorem Std.DHashMap.Internal.Raw₀.getD_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {a : α} {fallback : β a} {c : Nat} :
(emptyWithCapacity c).getD a fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getD_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getD_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {a : α} {fallback : β a} {c : Nat} :
(emptyWithCapacity c).getD a fallback = fallback
Equations

- @Std.DHashMap.Internal.Raw₀.getD_empty = @Std.DHashMap.Internal.Raw₀.getD_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getD_of_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} {fallback : β a} :
m.val.isEmpty = true → m.getD a fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.getD_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} {fallback : β a} {v : β k} :
(m.insert k v).getD a fallback = if h : (k == a) = true then cast ⋯ v else m.getD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.getD_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} {fallback b : β a} :
(m.insert a b).getD a fallback = b
source
theorem Std.DHashMap.Internal.Raw₀.getD_eq_fallback {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} {fallback : β a} :
m.contains a = false → m.getD a fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.getD_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} {fallback : β a} :
(m.erase k).getD a fallback = if (k == a) = true then fallback else m.getD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.getD_erase_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {fallback : β k} :
(m.erase k).getD k fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.get?_eq_some_getD {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} {fallback : β a} :
m.contains a = true → m.get? a = some (m.getD a fallback)
source
theorem Std.DHashMap.Internal.Raw₀.getD_eq_getD_get? {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} {fallback : β a} :
m.getD a fallback = (m.get? a).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.get_eq_getD {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} {fallback : β a} {h✝ : m.contains a = true} :
m.get a h✝ = m.getD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.get!_eq_getD_default {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} [Inhabited (β a)] :
m.get! a = m.getD a default
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_emptyWithCapacity {α : Type u} [BEq α] [Hashable α] {β : Type v} {a : α} {fallback : β} {c : Nat} :
getD (emptyWithCapacity c) a fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getD_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getD_empty {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} {a : α} {fallback : β} {c : Nat} :
getD (emptyWithCapacity c) a fallback = fallback
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getD_empty = @Std.DHashMap.Internal.Raw₀.Const.getD_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_of_isEmpty {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} {fallback : β} :
m.val.isEmpty = true → getD m a fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insert {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {fallback v : β} :
getD (m.insert k v) a fallback = if (k == a) = true then v else getD m a fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insert_self {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {fallback v : β} :
getD (m.insert k v) k fallback = v
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_eq_fallback {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} {fallback : β} :
m.contains a = false → getD m a fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_erase {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {fallback : β} :
getD (m.erase k) a fallback = if (k == a) = true then fallback else getD m a fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_erase_self {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {fallback : β} :
getD (m.erase k) k fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_some_getD {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} {fallback : β} :
m.contains a = true → get? m a = some (getD m a fallback)
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_eq_getD_get? {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} {fallback : β} :
getD m a fallback = (get? m a).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_eq_getD {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} {fallback : β} {h✝ : m.contains a = true} :
get m a h✝ = getD m a fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_eq_getD_default {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {a : α} :
get! m a = getD m a default
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_eq_getD {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] (h : m.val.WF) {a : α} {fallback : β} :
getD m a fallback = m.getD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_congr {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a b : α} {fallback : β} (hab : (a == b) = true) :
getD m a fallback = getD m b fallback
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.getKey?_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {a : α} {c : Nat} :
(emptyWithCapacity c).getKey? a = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKey?_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKey?_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {a : α} {c : Nat} :
(emptyWithCapacity c).getKey? a = none
Equations

- @Std.DHashMap.Internal.Raw₀.getKey?_empty = @Std.DHashMap.Internal.Raw₀.getKey?_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKey?_of_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
m.val.isEmpty = true → m.getKey? a = none
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a k : α} {v : β k} :
(m.insert k v).getKey? a = if (k == a) = true then some k else m.getKey? a
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).getKey? k = some k
source
theorem Std.DHashMap.Internal.Raw₀.contains_eq_isSome_getKey? {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
m.contains a = (m.getKey? a).isSome
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_getKey?_eq_some {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {a a' : α} (h : m.val.WF) :
m.getKey? a = some a' → m.contains a' = true
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_eq_none {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
m.contains a = false → m.getKey? a = none
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_beq {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} :
Option.all (fun (x : α) => x == a) (m.getKey? a) = true
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_eq_some {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} :
m.contains a = true → m.getKey? a = some a
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_eq_some_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k k' : α} :
m.getKey? k = some k' ↔ ∃ (h : m.contains k = true), m.getKey k h = k'
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_congr {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k k' : α} :
(k == k') = true → m.getKey? k = m.getKey? k'
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} :
(m.erase k).getKey? a = if (k == a) = true then none else m.getKey? a
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_erase_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
(m.erase k).getKey? k = none
source
theorem Std.DHashMap.Internal.Raw₀.getKey_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} {h₁ : (m.insert k v).contains a = true} :
(m.insert k v).getKey a h₁ = if h₂ : (k == a) = true then k else m.getKey a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insert k v).getKey k ⋯ = k
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.getKey_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {h' : (m.erase k).contains a = true} :
(m.erase k).getKey a h' = m.getKey a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey_beq {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} (h' : m.contains a = true) :
(m.getKey a h' == a) = true
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.getKey_eq {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {a : α} (h' : m.contains a = true) :
m.getKey a h' = a
source
theorem Std.DHashMap.Internal.Raw₀.getKey_congr {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k k' : α} (h' : (k == k') = true) (h'' : m.contains k = true) :
m.getKey k h'' = m.getKey k' ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_eq_some_getKey {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a : α} {h' : m.contains a = true} :
m.getKey? a = some (m.getKey a h')
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {a : α} [Inhabited α] {c : Nat} :
(emptyWithCapacity c).getKey! a = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKey!_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKey!_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {a : α} [Inhabited α] {c : Nat} :
(emptyWithCapacity c).getKey! a = default
Equations

- @Std.DHashMap.Internal.Raw₀.getKey!_empty = @Std.DHashMap.Internal.Raw₀.getKey!_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKey!_of_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {a : α} :
m.val.isEmpty = true → m.getKey! a = default
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insert k v).getKey! a = if (k == a) = true then k else m.getKey! a
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {a : α} {b : β a} :
(m.insert a b).getKey! a = a
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_eq_default {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {a : α} :
m.contains a = false → m.getKey! a = default
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {k a : α} :
(m.erase k).getKey! a = if (k == a) = true then default else m.getKey! a
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_erase_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {k : α} :
(m.erase k).getKey! k = default
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_eq_some_getKey! {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {a : α} :
m.contains a = true → m.getKey? a = some (m.getKey! a)
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_eq_get!_getKey? {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {a : α} :
m.getKey! a = (m.getKey? a).get!
source
theorem Std.DHashMap.Internal.Raw₀.getKey_eq_getKey! {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {a : α} {h✝ : m.contains a = true} :
m.getKey a h✝ = m.getKey! a
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_congr {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {k k' : α} :
(k == k') = true → m.getKey! k = m.getKey! k'
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_eq_of_contains {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] [Inhabited α] (h : m.val.WF) {k : α} :
m.contains k = true → m.getKey! k = k
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_emptyWithCapacity {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {a fallback : α} {c : Nat} :
(emptyWithCapacity c).getKeyD a fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKeyD_emptyWithCapacity (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKeyD_empty {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {a fallback : α} {c : Nat} :
(emptyWithCapacity c).getKeyD a fallback = fallback
Equations

- @Std.DHashMap.Internal.Raw₀.getKeyD_empty = @Std.DHashMap.Internal.Raw₀.getKeyD_emptyWithCapacity

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_of_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a fallback : α} :
m.val.isEmpty = true → m.getKeyD a fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_insert {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a fallback : α} {v : β k} :
(m.insert k v).getKeyD a fallback = if (k == a) = true then k else m.getKeyD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_insert_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a fallback : α} {b : β a} :
(m.insert a b).getKeyD a fallback = a
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_eq_fallback {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a fallback : α} :
m.contains a = false → m.getKeyD a fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a fallback : α} :
(m.erase k).getKeyD a fallback = if (k == a) = true then fallback else m.getKeyD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_erase_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k fallback : α} :
(m.erase k).getKeyD k fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_eq_some_getKeyD {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a fallback : α} :
m.contains a = true → m.getKey? a = some (m.getKeyD a fallback)
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_eq_getD_getKey? {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a fallback : α} :
m.getKeyD a fallback = (m.getKey? a).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey_eq_getKeyD {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {a fallback : α} {h✝ : m.contains a = true} :
m.getKey a h✝ = m.getKeyD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_eq_getKeyD_default {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {a : α} :
m.getKey! a = m.getKeyD a default
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_congr {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k k' fallback : α} :
(k == k') = true → m.getKeyD k fallback = m.getKeyD k' fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_eq_of_contains {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k fallback : α} :
m.contains k = true → m.getKeyD k fallback = k
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insertIfNew k v).val.isEmpty = false
source
theorem Std.DHashMap.Internal.Raw₀.contains_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insertIfNew k v).contains a = (k == a || m.contains a)
source
theorem Std.DHashMap.Internal.Raw₀.contains_insertIfNew_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insertIfNew k v).contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insertIfNew k v).contains a = true → (k == a) = false → m.contains a = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_insertIfNew' {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insertIfNew k v).contains a = true → ¬((k == a) = true ∧ m.contains k = false) → m.contains a = true

This is a restatement of `contains_of_contains_insertIfNew` that is written to exactly match the proof obligation in the statement of `get_insertIfNew`.

source
theorem Std.DHashMap.Internal.Raw₀.size_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insertIfNew k v).val.size = if m.contains k = true then m.val.size else m.val.size + 1
source
theorem Std.DHashMap.Internal.Raw₀.size_le_size_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
m.val.size ≤ (m.insertIfNew k v).val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_insertIfNew_le {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β k} :
(m.insertIfNew k v).val.size ≤ m.val.size + 1
source
theorem Std.DHashMap.Internal.Raw₀.get?_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insertIfNew k v).get? a = if h : (k == a) = true ∧ m.contains k = false then some (cast ⋯ v) else m.get? a
source
theorem Std.DHashMap.Internal.Raw₀.get_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} {v : β k} {h₁ : (m.insertIfNew k v).contains a = true} :
(m.insertIfNew k v).get a h₁ = if h₂ : (k == a) = true ∧ m.contains k = false then cast ⋯ v else m.get a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get!_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} [Inhabited (β a)] {v : β k} :
(m.insertIfNew k v).get! a = if h : (k == a) = true ∧ m.contains k = false then cast ⋯ v else m.get! a
source
theorem Std.DHashMap.Internal.Raw₀.getD_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k a : α} {fallback : β a} {v : β k} :
(m.insertIfNew k v).getD a fallback = if h : (k == a) = true ∧ m.contains k = false then cast ⋯ v else m.getD a fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insertIfNew {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β} :
get? (m.insertIfNew k v) a = if (k == a) = true ∧ m.contains k = false then some v else get? m a
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insertIfNew {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β} {h₁ : (m.insertIfNew k v).contains a = true} :
get (m.insertIfNew k v) a h₁ = if h₂ : (k == a) = true ∧ m.contains k = false then v else get m a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insertIfNew {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {k a : α} {v : β} :
get! (m.insertIfNew k v) a = if (k == a) = true ∧ m.contains k = false then v else get! m a
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insertIfNew {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {fallback v : β} :
getD (m.insertIfNew k v) a fallback = if (k == a) = true ∧ m.contains k = false then v else getD m a fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insertIfNew k v).getKey? a = if (k == a) = true ∧ m.contains k = false then some k else m.getKey? a
source
theorem Std.DHashMap.Internal.Raw₀.getKey_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a : α} {v : β k} {h₁ : (m.insertIfNew k v).contains a = true} :
(m.insertIfNew k v).getKey a h₁ = if h₂ : (k == a) = true ∧ m.contains k = false then k else m.getKey a ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {k a : α} {v : β k} :
(m.insertIfNew k v).getKey! a = if (k == a) = true ∧ m.contains k = false then k else m.getKey! a
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_insertIfNew {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k a fallback : α} {v : β k} :
(m.insertIfNew k v).getKeyD a fallback = if (k == a) = true ∧ m.contains k = false then k else m.getKeyD a fallback
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.getThenInsertIfNew?_fst {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {k : α} {v : β k} :
(m.getThenInsertIfNew? k v).fst = m.get? k
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.getThenInsertIfNew?_snd {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {k : α} {v : β k} :
(m.getThenInsertIfNew? k v).snd = m.insertIfNew k v
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.getThenInsertIfNew?_fst {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) {k : α} {v : β} :
(getThenInsertIfNew? m k v).fst = get? m k
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.getThenInsertIfNew?_snd {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) {k : α} {v : β} :
(getThenInsertIfNew? m k v).snd = m.insertIfNew k v
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.length_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.keys.length = m.val.size
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.keys.isEmpty = m.val.isEmpty
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.contains_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
m.val.keys.contains k = m.contains k
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.mem_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} :
k ∈ m.val.keys ↔ m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.forall_mem_keys_iff_forall_contains_getKey {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {p : α → Prop} :
(∀ (k : α), k ∈ m.val.keys → p k) ↔ ∀ (k : α) (h : m.contains k = true), p (m.getKey k h)
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_mem_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} (h' : k ∈ m.val.keys) :
m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.distinct_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
List.Pairwise (fun (a b : α) => (a == b) = false) m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.map_fst_toList_eq_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] :
List.map Sigma.fst m.val.toList = m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.length_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.toList.length = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.toList.isEmpty = m.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.mem_toList_iff_get?_eq_some {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {v : β k} :
⟨k, v⟩ ∈ m.val.toList ↔ m.get? k = some v
source
theorem Std.DHashMap.Internal.Raw₀.find?_toList_eq_some_iff_get?_eq_some {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {v : β k} :
List.find? (fun (x : (a : α) × β a) => x.fst == k) m.val.toList = some ⟨k, v⟩ ↔ m.get? k = some v
source
theorem Std.DHashMap.Internal.Raw₀.find?_toList_eq_none_iff_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
List.find? (fun (x : (a : α) × β a) => x.fst == k) m.val.toList = none ↔ m.contains k = false
source
theorem Std.DHashMap.Internal.Raw₀.distinct_keys_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) m.val.toList
source
theorem Std.DHashMap.Internal.Raw₀.Const.map_fst_toList_eq_keys {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] :
List.map Prod.fst (Raw.Const.toList m.val) = m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.Const.length_toList {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
(Raw.Const.toList m.val).length = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_toList {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
(Raw.Const.toList m.val).isEmpty = m.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.Const.mem_toList_iff_get?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] (h : m.val.WF) {k : α} {v : β} :
(k, v) ∈ Raw.Const.toList m.val ↔ get? m k = some v
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_some_iff_exists_beq_and_mem_toList {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β} :
get? m k = some v ↔ ∃ (k' : α), (k == k') = true ∧ (k', v) ∈ Raw.Const.toList m.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.find?_toList_eq_some_iff_getKey?_eq_some_and_get?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k k' : α} {v : β} :
List.find? (fun (a : α × β) => a.fst == k) (Raw.Const.toList m.val) = some (k', v) ↔ m.getKey? k = some k' ∧ get? m k = some v
source
theorem Std.DHashMap.Internal.Raw₀.Const.find?_toList_eq_none_iff_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
List.find? (fun (x : α × β) => x.fst == k) (Raw.Const.toList m.val) = none ↔ m.contains k = false
source
theorem Std.DHashMap.Internal.Raw₀.Const.mem_toList_iff_getKey?_eq_some_and_get?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β} :
(k, v) ∈ Raw.Const.toList m.val ↔ m.getKey? k = some k ∧ get? m k = some v
source
theorem Std.DHashMap.Internal.Raw₀.Const.distinct_keys_toList {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) (Raw.Const.toList m.val)
source
theorem Std.DHashMap.Internal.Raw₀.toArray_keys_eq_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) :
m.val.keys.toArray = m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.toList_keysArray_eq_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) :
m.val.keysArray.toList = m.val.keys
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.size_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.keysArray.size = m.val.size
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.keysArray.isEmpty = m.val.isEmpty
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.contains_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
m.val.keysArray.contains k = m.contains k
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.mem_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} :
k ∈ m.val.keysArray ↔ m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.forall_mem_keysArray_iff_forall_contains_getKey {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {p : α → Prop} :
(∀ (k : α), k ∈ m.val.keysArray → p k) ↔ ∀ (k : α) (h : m.contains k = true), p (m.getKey k h)
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_mem_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} (h' : k ∈ m.val.keysArray) :
m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.toArray_toList_eq_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) :
m.val.toList.toArray = m.val.toArray
source
theorem Std.DHashMap.Internal.Raw₀.toList_toArray_eq_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) :
m.val.toArray.toList = m.val.toList
source
theorem Std.DHashMap.Internal.Raw₀.map_fst_toArray_eq_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] :
Array.map Sigma.fst m.val.toArray = m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.size_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.toArray.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
m.val.toArray.isEmpty = m.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.mem_toArray_iff_get?_eq_some {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {v : β k} :
⟨k, v⟩ ∈ m.val.toArray ↔ m.get? k = some v
source
theorem Std.DHashMap.Internal.Raw₀.find?_toArray_eq_some_iff_get?_eq_some {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {v : β k} :
Array.find? (fun (x : (a : α) × β a) => x.fst == k) m.val.toArray = some ⟨k, v⟩ ↔ m.get? k = some v
source
theorem Std.DHashMap.Internal.Raw₀.find?_toArray_eq_none_iff_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
Array.find? (fun (x : (a : α) × β a) => x.fst == k) m.val.toArray = none ↔ m.contains k = false
source
theorem Std.DHashMap.Internal.Raw₀.Const.toArray_toList_eq_toArray {α : Type u} {β : Type v} (m : Raw₀ α fun (x : α) => β) :
(Raw.Const.toList m.val).toArray = Raw.Const.toArray m.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.toList_toArray_eq_toList {α : Type u} {β : Type v} (m : Raw₀ α fun (x : α) => β) :
(Raw.Const.toArray m.val).toList = Raw.Const.toList m.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.map_fst_toArray_eq_keysArray {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] :
Array.map Prod.fst (Raw.Const.toArray m.val) = m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_toArray {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
(Raw.Const.toArray m.val).size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_toArray {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) :
(Raw.Const.toArray m.val).isEmpty = m.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.Const.mem_toArray_iff_get?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] (h : m.val.WF) {k : α} {v : β} :
(k, v) ∈ Raw.Const.toArray m.val ↔ get? m k = some v
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_some_iff_exists_beq_and_mem_toArray {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β} :
get? m k = some v ↔ ∃ (k' : α), (k == k') = true ∧ (k', v) ∈ Raw.Const.toArray m.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.find?_toArray_eq_some_iff_getKey?_eq_some_and_get?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k k' : α} {v : β} :
Array.find? (fun (a : α × β) => a.fst == k) (Raw.Const.toArray m.val) = some (k', v) ↔ m.getKey? k = some k' ∧ get? m k = some v
source
theorem Std.DHashMap.Internal.Raw₀.Const.find?_toArray_eq_none_iff_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} :
Array.find? (fun (x : α × β) => x.fst == k) (Raw.Const.toArray m.val) = none ↔ m.contains k = false
source
theorem Std.DHashMap.Internal.Raw₀.Const.mem_toArray_iff_getKey?_eq_some_and_get?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {k : α} {v : β} :
(k, v) ∈ Raw.Const.toArray m.val ↔ m.getKey? k = some k ∧ get? m k = some v
source
theorem Std.DHashMap.Internal.Raw₀.foldM_eq_foldlM_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → (a : α) → β a → m' δ} {init : δ} :
Raw.foldM f init m.val = List.foldlM (fun (a : δ) (b : (a : α) × β a) => f a b.fst b.snd) init m.val.toList
source
theorem Std.DHashMap.Internal.Raw₀.fold_eq_foldl_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → (a : α) → β a → δ} {init : δ} :
Raw.fold f init m.val = List.foldl (fun (a : δ) (b : (a : α) × β a) => f a b.fst b.snd) init m.val.toList
source
theorem Std.DHashMap.Internal.Raw₀.foldRevM_eq_foldrM_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → (a : α) → β a → m' δ} {init : δ} :
Raw.Internal.foldRevM f init m.val = List.foldrM (fun (a : (a : α) × β a) (b : δ) => f b a.fst a.snd) init m.val.toList
source
theorem Std.DHashMap.Internal.Raw₀.foldRev_eq_foldr_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → (a : α) → β a → δ} {init : δ} :
Raw.Internal.foldRev f init m.val = List.foldr (fun (a : (a : α) × β a) (b : δ) => f b a.fst a.snd) init m.val.toList
source
theorem Std.DHashMap.Internal.Raw₀.forM_eq_forM_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : (a : α) → β a → m' PUnit} :
Raw.forM f m.val = m.val.toList.forM fun (a : (a : α) × β a) => f a.fst a.snd
source
theorem Std.DHashMap.Internal.Raw₀.forIn_eq_forIn_toList {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : (a : α) → β a → δ → m' (ForInStep δ)} {init : δ} :
Raw.forIn f init m.val = ForIn.forIn m.val.toList init fun (a : (a : α) × β a) (b : δ) => f a.fst a.snd b
source
theorem Std.DHashMap.Internal.Raw₀.foldM_eq_foldlM_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → α → m' δ} {init : δ} :
Raw.foldM (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = List.foldlM f init m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.fold_eq_foldl_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → α → δ} {init : δ} :
Raw.fold (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = List.foldl f init m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.foldRevM_eq_foldrM_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → α → m' δ} {init : δ} :
Raw.Internal.foldRevM (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = List.foldrM (fun (a : α) (b : δ) => f b a) init m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.foldRev_eq_foldr_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → α → δ} {init : δ} :
Raw.Internal.foldRev (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = List.foldr (fun (a : α) (b : δ) => f b a) init m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.forM_eq_forM_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : α → m' PUnit} :
Raw.forM (fun (a : α) (x : β a) => f a) m.val = m.val.keys.forM f
source
theorem Std.DHashMap.Internal.Raw₀.forIn_eq_forIn_keys {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : α → δ → m' (ForInStep δ)} {init : δ} :
Raw.forIn (fun (a : α) (x : β a) (d : δ) => f a d) init m.val = ForIn.forIn m.val.keys init f
source
theorem Std.DHashMap.Internal.Raw₀.Const.foldM_eq_foldlM_toList {α : Type u} {δ : Type w} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : δ → α → β → m' δ} {init : δ} :
Raw.foldM f init m.val = List.foldlM (fun (a : δ) (b : α × β) => f a b.fst b.snd) init (Raw.Const.toList m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.fold_eq_foldl_toList {α : Type u} {δ : Type w} {β : Type v} (m : Raw₀ α fun (x : α) => β) {f : δ → α → β → δ} {init : δ} :
Raw.fold f init m.val = List.foldl (fun (a : δ) (b : α × β) => f a b.fst b.snd) init (Raw.Const.toList m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.foldRevM_eq_foldrM_toList {α : Type u} {δ : Type w} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : δ → α → β → m' δ} {init : δ} :
Raw.Internal.foldRevM f init m.val = List.foldrM (fun (a : α × β) (b : δ) => f b a.fst a.snd) init (Raw.Const.toList m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.foldRev_eq_foldr_toList {α : Type u} {δ : Type w} {β : Type v} (m : Raw₀ α fun (x : α) => β) {f : δ → α → β → δ} {init : δ} :
Raw.Internal.foldRev f init m.val = List.foldr (fun (a : α × β) (b : δ) => f b a.fst a.snd) init (Raw.Const.toList m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.forM_eq_forM_toList {α : Type u} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : α → β → m' PUnit} :
Raw.forM f m.val = (Raw.Const.toList m.val).forM fun (a : α × β) => f a.fst a.snd
source
theorem Std.DHashMap.Internal.Raw₀.Const.forIn_eq_forIn_toList {α : Type u} {δ : Type w} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : α → β → δ → m' (ForInStep δ)} {init : δ} :
Raw.forIn f init m.val = ForIn.forIn (Raw.Const.toList m.val) init fun (a : α × β) (b : δ) => f a.fst a.snd b
source
theorem Std.DHashMap.Internal.Raw₀.foldM_eq_foldlM_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → (a : α) → β a → m' δ} {init : δ} :
Raw.foldM f init m.val = Array.foldlM (fun (a : δ) (b : (a : α) × β a) => f a b.fst b.snd) init m.val.toArray
source
theorem Std.DHashMap.Internal.Raw₀.fold_eq_foldl_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → (a : α) → β a → δ} {init : δ} :
Raw.fold f init m.val = Array.foldl (fun (a : δ) (b : (a : α) × β a) => f a b.fst b.snd) init m.val.toArray
source
theorem Std.DHashMap.Internal.Raw₀.foldRevM_eq_foldrM_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → (a : α) → β a → m' δ} {init : δ} :
Raw.Internal.foldRevM f init m.val = Array.foldrM (fun (a : (a : α) × β a) (b : δ) => f b a.fst a.snd) init m.val.toArray
source
theorem Std.DHashMap.Internal.Raw₀.foldRev_eq_foldr_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → (a : α) → β a → δ} {init : δ} :
Raw.Internal.foldRev f init m.val = Array.foldr (fun (a : (a : α) × β a) (b : δ) => f b a.fst a.snd) init m.val.toArray
source
theorem Std.DHashMap.Internal.Raw₀.forM_eq_forM_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : (a : α) → β a → m' PUnit} :
Raw.forM f m.val = Array.forM (fun (a : (a : α) × β a) => f a.fst a.snd) m.val.toArray
source
theorem Std.DHashMap.Internal.Raw₀.forIn_eq_forIn_toArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : (a : α) → β a → δ → m' (ForInStep δ)} {init : δ} :
Raw.forIn f init m.val = ForIn.forIn m.val.toArray init fun (a : (a : α) × β a) (b : δ) => f a.fst a.snd b
source
theorem Std.DHashMap.Internal.Raw₀.foldM_eq_foldlM_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → α → m' δ} {init : δ} :
Raw.foldM (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = Array.foldlM f init m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.fold_eq_foldl_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → α → δ} {init : δ} :
Raw.fold (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = Array.foldl f init m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.foldRevM_eq_foldrM_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : δ → α → m' δ} {init : δ} :
Raw.Internal.foldRevM (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = Array.foldrM (fun (a : α) (b : δ) => f b a) init m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.foldRev_eq_foldr_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {f : δ → α → δ} {init : δ} :
Raw.Internal.foldRev (fun (d : δ) (a : α) (x : β a) => f d a) init m.val = Array.foldr (fun (a : α) (b : δ) => f b a) init m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.forM_eq_forM_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : α → m' PUnit} :
Raw.forM (fun (a : α) (x : β a) => f a) m.val = Array.forM f m.val.keysArray
source
theorem Std.DHashMap.Internal.Raw₀.forIn_eq_forIn_keysArray {α : Type u} {β : α → Type v} (m : Raw₀ α β) {δ : Type w} {m' : Type w → Type w'} [Monad m'] [LawfulMonad m'] {f : α → δ → m' (ForInStep δ)} {init : δ} :
Raw.forIn (fun (a : α) (x : β a) (d : δ) => f a d) init m.val = ForIn.forIn m.val.keysArray init f
source
theorem Std.DHashMap.Internal.Raw₀.Const.foldM_eq_foldlM_toArray {α : Type u} {δ : Type w} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : δ → α → β → m' δ} {init : δ} :
Raw.foldM f init m.val = Array.foldlM (fun (a : δ) (b : α × β) => f a b.fst b.snd) init (Raw.Const.toArray m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.fold_eq_foldl_toArray {α : Type u} {δ : Type w} {β : Type v} (m : Raw₀ α fun (x : α) => β) {f : δ → α → β → δ} {init : δ} :
Raw.fold f init m.val = Array.foldl (fun (a : δ) (b : α × β) => f a b.fst b.snd) init (Raw.Const.toArray m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.foldRevM_eq_foldrM_toArray {α : Type u} {δ : Type w} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : δ → α → β → m' δ} {init : δ} :
Raw.Internal.foldRevM f init m.val = Array.foldrM (fun (a : α × β) (b : δ) => f b a.fst a.snd) init (Raw.Const.toArray m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.foldRev_eq_foldr_toArray {α : Type u} {δ : Type w} {β : Type v} (m : Raw₀ α fun (x : α) => β) {f : δ → α → β → δ} {init : δ} :
Raw.Internal.foldRev f init m.val = Array.foldr (fun (a : α × β) (b : δ) => f b a.fst a.snd) init (Raw.Const.toArray m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.forM_eq_forM_toArray {α : Type u} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : α → β → m' PUnit} :
Raw.forM f m.val = Array.forM (fun (a : α × β) => f a.fst a.snd) (Raw.Const.toArray m.val)
source
theorem Std.DHashMap.Internal.Raw₀.Const.forIn_eq_forIn_toArray {α : Type u} {δ : Type w} {m' : Type w → Type w'} {β : Type v} (m : Raw₀ α fun (x : α) => β) [Monad m'] [LawfulMonad m'] {f : α → β → δ → m' (ForInStep δ)} {init : δ} :
Raw.forIn f init m.val = ForIn.forIn (Raw.Const.toArray m.val) init fun (a : α × β) (b : δ) => f a.fst a.snd b
source
theorem Std.DHashMap.Internal.Raw₀.insertMany_ind {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {ρ : Type w} [ForIn Id ρ ((a : α) × β a)] {motive : Raw₀ α β → Prop} (m : Raw₀ α β) (l : ρ) (init : motive m) (insert : ∀ (m : Raw₀ α β) (a : α) (b : β a), motive m → motive (m.insert a b)) :
motive (m.insertMany l).val
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.insertMany_nil {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] :
(m.insertMany []).val = m
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.insertMany_list_singleton {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {k : α} {v : β k} :
(m.insertMany [⟨k, v⟩]).val = m.insert k v
source
theorem Std.DHashMap.Internal.Raw₀.insertMany_cons {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {l : List ((a : α) × β a)} {k : α} {v : β k} :
(m.insertMany (⟨k, v⟩ :: l)).val = ((m.insert k v).insertMany l).val
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.contains_insertMany_list {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} :
(m.insertMany l).val.contains k = (m.contains k || (List.map Sigma.fst l).contains k)
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_insertMany_list {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} :
(m.insertMany l).val.contains k = true → (List.map Sigma.fst l).contains k = false → m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_insertMany_of_contains {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {ρ : Type w} [ForIn Id ρ ((a : α) × β a)] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} {k : α} (h' : m.contains k = true) :
(m.insertMany l).val.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.get?_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} (h' : (List.map Sigma.fst l).contains k = false) :
(m.insertMany l).val.get? k = m.get? k
source
theorem Std.DHashMap.Internal.Raw₀.get?_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(m.insertMany l).val.get? k' = some (cast ⋯ v)
source
theorem Std.DHashMap.Internal.Raw₀.get_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} (contains : (List.map Sigma.fst l).contains k = false) {h' : (m.insertMany l).val.contains k = true} :
(m.insertMany l).val.get k h' = m.get k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) {h' : (m.insertMany l).val.contains k' = true} :
(m.insertMany l).val.get k' h' = cast ⋯ v
source
theorem Std.DHashMap.Internal.Raw₀.get!_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} [Inhabited (β k)] (h' : (List.map Sigma.fst l).contains k = false) :
(m.insertMany l).val.get! k = m.get! k
source
theorem Std.DHashMap.Internal.Raw₀.get!_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} [Inhabited (β k')] (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(m.insertMany l).val.get! k' = cast ⋯ v
source
theorem Std.DHashMap.Internal.Raw₀.getD_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} {fallback : β k} (contains_eq_false : (List.map Sigma.fst l).contains k = false) :
(m.insertMany l).val.getD k fallback = m.getD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.getD_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} {fallback : β k'} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(m.insertMany l).val.getD k' fallback = cast ⋯ v
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} (h' : (List.map Sigma.fst l).contains k = false) :
(m.insertMany l).val.getKey? k = m.getKey? k
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(m.insertMany l).val.getKey? k' = some k
source
theorem Std.DHashMap.Internal.Raw₀.getKey_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} (h₁ : (List.map Sigma.fst l).contains k = false) {h' : (m.insertMany l).val.contains k = true} :
(m.insertMany l).val.getKey k h' = m.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) {h' : (m.insertMany l).val.contains k' = true} :
(m.insertMany l).val.getKey k' h' = k
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {l : List ((a : α) × β a)} {k : α} (h' : (List.map Sigma.fst l).contains k = false) :
(m.insertMany l).val.getKey! k = m.getKey! k
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(m.insertMany l).val.getKey! k' = k
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_list_of_contains_eq_false {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k fallback : α} (h' : (List.map Sigma.fst l).contains k = false) :
(m.insertMany l).val.getKeyD k fallback = m.getKeyD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_list_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(m.insertMany l).val.getKeyD k' fallback = k
source
theorem Std.DHashMap.Internal.Raw₀.size_insertMany_list {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) :
(∀ (a : α), m.contains a = true → (List.map Sigma.fst l).contains a = false) → (m.insertMany l).val.val.size = m.val.size + l.length
source
theorem Std.DHashMap.Internal.Raw₀.size_le_size_insertMany_list {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} :
m.val.size ≤ (m.insertMany l).val.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_le_size_insertMany {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {ρ : Type w} [ForIn Id ρ ((a : α) × β a)] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} :
m.val.size ≤ (m.insertMany l).val.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_insertMany_list_le {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} :
(m.insertMany l).val.val.size ≤ m.val.size + l.length
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_insertMany_list {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List ((a : α) × β a)} :
(m.insertMany l).val.val.isEmpty = (m.val.isEmpty && l.isEmpty)
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_of_isEmpty_insertMany {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {ρ : Type w} [ForIn Id ρ ((a : α) × β a)] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} :
(m.insertMany l).val.val.isEmpty = true → m.val.isEmpty = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_ind {α : Type u} [BEq α] [Hashable α] {β : Type v} {ρ : Type w} [ForIn Id ρ (α × β)] {motive : (Raw₀ α fun (x : α) => β) → Prop} (m : Raw₀ α fun (x : α) => β) (l : ρ) (init : motive m) (insert : ∀ (m : Raw₀ α fun (x : α) => β) (a : α) (b : β), motive m → motive (m.insert a b)) :
motive (insertMany m l).val
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_nil {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) :
(insertMany m []).val = m
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_list_singleton {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) {k : α} {v : β} :
(insertMany m [(k, v)]).val = m.insert k v
source
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_cons {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) {l : List (α × β)} {k : α} {v : β} :
(insertMany m ((k, v) :: l)).val = (insertMany (m.insert k v) l).val
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_list {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k : α} :
(insertMany m l).val.contains k = (m.contains k || (List.map Prod.fst l).contains k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_of_contains_insertMany_list {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k : α} :
(insertMany m l).val.contains k = true → (List.map Prod.fst l).contains k = false → m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_of_contains {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) {ρ : Type w} [ForIn Id ρ (α × β)] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} {k : α} (h' : m.contains k = true) :
(insertMany m l).val.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k : α} (h' : (List.map Prod.fst l).contains k = false) :
(insertMany m l).val.getKey? k = m.getKey? k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany m l).val.getKey? k' = some k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k : α} (h₁ : (List.map Prod.fst l).contains k = false) {h' : (insertMany m l).val.contains k = true} :
(insertMany m l).val.getKey k h' = m.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) {h' : (insertMany m l).val.contains k' = true} :
(insertMany m l).val.getKey k' h' = k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {l : List (α × β)} {k : α} (h' : (List.map Prod.fst l).contains k = false) :
(insertMany m l).val.getKey! k = m.getKey! k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany m l).val.getKey! k' = k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k fallback : α} (h' : (List.map Prod.fst l).contains k = false) :
(insertMany m l).val.getKeyD k fallback = m.getKeyD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany m l).val.getKeyD k' fallback = k
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertMany_list {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) :
(∀ (a : α), m.contains a = true → (List.map Prod.fst l).contains a = false) → (insertMany m l).val.val.size = m.val.size + l.length
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_le_size_insertMany_list {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} :
m.val.size ≤ (insertMany m l).val.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_le_size_insertMany {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) {ρ : Type w} [ForIn Id ρ (α × β)] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} :
m.val.size ≤ (insertMany m l).val.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertMany_list_le {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} :
(insertMany m l).val.val.size ≤ m.val.size + l.length
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertMany_list {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} :
(insertMany m l).val.val.isEmpty = (m.val.isEmpty && l.isEmpty)
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_of_isEmpty_insertMany {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) {ρ : Type w} [ForIn Id ρ (α × β)] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} :
(insertMany m l).val.val.isEmpty = true → m.val.isEmpty = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k : α} (h' : (List.map Prod.fst l).contains k = false) :
get? (insertMany m l).val k = get? m k
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
get? (insertMany m l).val k' = some v
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k : α} (h₁ : (List.map Prod.fst l).contains k = false) {h' : (insertMany m l).val.contains k = true} :
get (insertMany m l).val k h' = get m k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) {h' : (insertMany m l).val.contains k' = true} :
get (insertMany m l).val k' h' = v
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {l : List (α × β)} {k : α} (h' : (List.map Prod.fst l).contains k = false) :
get! (insertMany m l).val k = get! m k
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.val.WF) {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
get! (insertMany m l).val k' = v
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k : α} {fallback : β} (h' : (List.map Prod.fst l).contains k = false) :
getD (insertMany m l).val k fallback = getD m k fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v fallback : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
getD (insertMany m l).val k' fallback = v
source
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_ind {α : Type u} [BEq α] [Hashable α] {ρ : Type w} [ForIn Id ρ α] {motive : (Raw₀ α fun (x : α) => Unit) → Prop} (m : Raw₀ α fun (x : α) => Unit) (l : ρ) (init : motive m) (insert : ∀ (m : Raw₀ α fun (x : α) => Unit) (a : α), motive m → motive (m.insertIfNew a ())) :
motive (insertManyIfNewUnit m l).val
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_nil {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) :
(insertManyIfNewUnit m []).val = m
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_list_singleton {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {k : α} :
(insertManyIfNewUnit m [k]).val = m.insertIfNew k ()
source
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_cons {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {l : List α} {k : α} :
(insertManyIfNewUnit m (k :: l)).val = (insertManyIfNewUnit (m.insertIfNew k ()) l).val
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.contains_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k : α} :
(insertManyIfNewUnit m l).val.contains k = (m.contains k || l.contains k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_of_contains_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k : α} (h₂ : l.contains k = false) :
(insertManyIfNewUnit m l).val.contains k = true → m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_insertManyIfNewUnit_of_contains {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {ρ : Type w} [ForIn Id ρ α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} {k : α} (h' : m.contains k = true) :
(insertManyIfNewUnit m l).val.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_list_of_contains_eq_false_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k : α} :
m.contains k = false → l.contains k = false → (insertManyIfNewUnit m l).val.getKey? k = none
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_list_of_contains_eq_false_of_mem {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k k' : α} (k_beq : (k == k') = true) :
m.contains k = false → List.Pairwise (fun (a b : α) => (a == b) = false) l → k ∈ l → (insertManyIfNewUnit m l).val.getKey? k' = some k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_list_of_contains {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k : α} :
m.contains k = true → (insertManyIfNewUnit m l).val.getKey? k = m.getKey? k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_list_of_contains {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k : α} {h' : (insertManyIfNewUnit m l).val.contains k = true} (contains : m.contains k = true) :
(insertManyIfNewUnit m l).val.getKey k h' = m.getKey k contains
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_list_of_contains_eq_false_of_mem {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k k' : α} (k_beq : (k == k') = true) {h' : (insertManyIfNewUnit m l).val.contains k' = true} :
m.contains k = false → List.Pairwise (fun (a b : α) => (a == b) = false) l → k ∈ l → (insertManyIfNewUnit m l).val.getKey k' h' = k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_list_mem_of_contains {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k : α} (contains : m.contains k = true) {h' : (insertManyIfNewUnit m l).val.contains k = true} :
(insertManyIfNewUnit m l).val.getKey k h' = m.getKey k contains
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_list_of_contains_eq_false_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {l : List α} {k : α} :
m.contains k = false → l.contains k = false → (insertManyIfNewUnit m l).val.getKey! k = default
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_list_of_contains_eq_false_of_mem {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {l : List α} {k k' : α} (k_beq : (k == k') = true) :
m.contains k = false → List.Pairwise (fun (a b : α) => (a == b) = false) l → k ∈ l → (insertManyIfNewUnit m l).val.getKey! k' = k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_list_of_contains {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.val.WF) {l : List α} {k : α} :
m.contains k = true → (insertManyIfNewUnit m l).val.getKey! k = m.getKey! k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_list_of_contains_eq_false_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k fallback : α} :
m.contains k = false → l.contains k = false → (insertManyIfNewUnit m l).val.getKeyD k fallback = fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_list_of_contains_eq_false_of_mem {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k k' fallback : α} (k_beq : (k == k') = true) :
m.contains k = false → List.Pairwise (fun (a b : α) => (a == b) = false) l → k ∈ l → (insertManyIfNewUnit m l).val.getKeyD k' fallback = k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_list_of_contains {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k fallback : α} :
m.contains k = true → (insertManyIfNewUnit m l).val.getKeyD k fallback = m.getKeyD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) :
(∀ (a : α), m.contains a = true → l.contains a = false) → (insertManyIfNewUnit m l).val.val.size = m.val.size + l.length
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_le_size_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} :
m.val.size ≤ (insertManyIfNewUnit m l).val.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_le_size_insertManyIfNewUnit {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {ρ : Type w} [ForIn Id ρ α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} :
m.val.size ≤ (insertManyIfNewUnit m l).val.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_list_le {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} :
(insertManyIfNewUnit m l).val.val.size ≤ m.val.size + l.length
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} :
(insertManyIfNewUnit m l).val.val.isEmpty = (m.val.isEmpty && l.isEmpty)
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_of_isEmpty_insertManyIfNewUnit {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {ρ : Type w} [ForIn Id ρ α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : ρ} :
(insertManyIfNewUnit m l).val.val.isEmpty = true → m.val.isEmpty = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {l : List α} {k : α} :
get? (insertManyIfNewUnit m l).val k = if m.contains k = true ∨ l.contains k = true then some () else none
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {l : List α} {k : α} {h : (insertManyIfNewUnit m l).val.contains k = true} :
get (insertManyIfNewUnit m l).val k h = ()
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {l : List α} {k : α} :
get! (insertManyIfNewUnit m l).val k = ()
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insertManyIfNewUnit_list {α : Type u} [BEq α] [Hashable α] (m : Raw₀ α fun (x : α) => Unit) {l : List α} {k : α} {fallback : Unit} :
getD (insertManyIfNewUnit m l).val k fallback = ()
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_nil {α : Type u} {β : α → Type v} [BEq α] [Hashable α] :
(emptyWithCapacity.insertMany []).val = emptyWithCapacity
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_nil (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.insertMany_empty_list_nil {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] :
(emptyWithCapacity.insertMany []).val = emptyWithCapacity
Equations

- @Std.DHashMap.Internal.Raw₀.insertMany_empty_list_nil = @Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_nil

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_singleton {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {k : α} {v : β k} :
(emptyWithCapacity.insertMany [⟨k, v⟩]).val = emptyWithCapacity.insert k v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_singleton (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.insertMany_empty_list_singleton {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {k : α} {v : β k} :
(emptyWithCapacity.insertMany [⟨k, v⟩]).val = emptyWithCapacity.insert k v
Equations

- @Std.DHashMap.Internal.Raw₀.insertMany_empty_list_singleton = @Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_singleton

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_cons {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {k : α} {v : β k} {tl : List ((a : α) × β a)} :
(emptyWithCapacity.insertMany (⟨k, v⟩ :: tl)).val = ((emptyWithCapacity.insert k v).insertMany tl).val
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_cons (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.insertMany_empty_list_cons {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] {k : α} {v : β k} {tl : List ((a : α) × β a)} :
(emptyWithCapacity.insertMany (⟨k, v⟩ :: tl)).val = ((emptyWithCapacity.insert k v).insertMany tl).val
Equations

- @Std.DHashMap.Internal.Raw₀.insertMany_empty_list_cons = @Std.DHashMap.Internal.Raw₀.insertMany_emptyWithCapacity_list_cons

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.contains_insertMany_emptyWithCapacity_list {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k : α} :
(emptyWithCapacity.insertMany l).val.contains k = (List.map Sigma.fst l).contains k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.contains_insertMany_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.contains_insertMany_empty_list {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k : α} :
(emptyWithCapacity.insertMany l).val.contains k = (List.map Sigma.fst l).contains k
Equations

- @Std.DHashMap.Internal.Raw₀.contains_insertMany_empty_list = @Std.DHashMap.Internal.Raw₀.contains_insertMany_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.get?_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.get? k = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.get?_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.get?_insertMany_empty_list_of_contains_eq_false {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.get? k = none
Equations

- @Std.DHashMap.Internal.Raw₀.get?_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.get?_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.get?_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(emptyWithCapacity.insertMany l).val.get? k' = some (cast ⋯ v)
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.get?_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.get?_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(emptyWithCapacity.insertMany l).val.get? k' = some (cast ⋯ v)
Equations

- @Std.DHashMap.Internal.Raw₀.get?_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.get?_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.get_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) {h : (emptyWithCapacity.insertMany l).val.contains k' = true} :
(emptyWithCapacity.insertMany l).val.get k' h = cast ⋯ v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.get_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.get_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) {h : (emptyWithCapacity.insertMany l).val.contains k' = true} :
(emptyWithCapacity.insertMany l).val.get k' h = cast ⋯ v
Equations

- @Std.DHashMap.Internal.Raw₀.get_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.get_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.get!_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k : α} [Inhabited (β k)] (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.get! k = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.get!_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.get!_insertMany_empty_list_of_contains_eq_false {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k : α} [Inhabited (β k)] (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.get! k = default
Equations

- @Std.DHashMap.Internal.Raw₀.get!_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.get!_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.get!_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} [Inhabited (β k')] (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(emptyWithCapacity.insertMany l).val.get! k' = cast ⋯ v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.get!_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.get!_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} [Inhabited (β k')] (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(emptyWithCapacity.insertMany l).val.get! k' = cast ⋯ v
Equations

- @Std.DHashMap.Internal.Raw₀.get!_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.get!_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getD_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k : α} {fallback : β k} (contains_eq_false : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getD k fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getD_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getD_insertMany_empty_list_of_contains_eq_false {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k : α} {fallback : β k} (contains_eq_false : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getD k fallback = fallback
Equations

- @Std.DHashMap.Internal.Raw₀.getD_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.getD_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getD_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} {fallback : β k'} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(emptyWithCapacity.insertMany l).val.getD k' fallback = cast ⋯ v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getD_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getD_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [LawfulBEq α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) {v : β k} {fallback : β k'} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : ⟨k, v⟩ ∈ l) :
(emptyWithCapacity.insertMany l).val.getD k' fallback = cast ⋯ v
Equations

- @Std.DHashMap.Internal.Raw₀.getD_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.getD_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKey?_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getKey? k = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKey?_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKey?_insertMany_empty_list_of_contains_eq_false {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getKey? k = none
Equations

- @Std.DHashMap.Internal.Raw₀.getKey?_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.getKey?_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKey?_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(emptyWithCapacity.insertMany l).val.getKey? k' = some k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKey?_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKey?_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(emptyWithCapacity.insertMany l).val.getKey? k' = some k
Equations

- @Std.DHashMap.Internal.Raw₀.getKey?_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.getKey?_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKey_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) {h' : (emptyWithCapacity.insertMany l).val.contains k' = true} :
(emptyWithCapacity.insertMany l).val.getKey k' h' = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKey_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKey_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) {h' : (emptyWithCapacity.insertMany l).val.contains k' = true} :
(emptyWithCapacity.insertMany l).val.getKey k' h' = k
Equations

- @Std.DHashMap.Internal.Raw₀.getKey_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.getKey_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKey!_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List ((a : α) × β a)} {k : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getKey! k = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKey!_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKey!_insertMany_empty_list_of_contains_eq_false {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List ((a : α) × β a)} {k : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getKey! k = default
Equations

- @Std.DHashMap.Internal.Raw₀.getKey!_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.getKey!_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKey!_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(emptyWithCapacity.insertMany l).val.getKey! k' = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKey!_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKey!_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(emptyWithCapacity.insertMany l).val.getKey! k' = k
Equations

- @Std.DHashMap.Internal.Raw₀.getKey!_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.getKey!_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k fallback : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getKeyD k fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_empty_list_of_contains_eq_false {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k fallback : α} (h : (List.map Sigma.fst l).contains k = false) :
(emptyWithCapacity.insertMany l).val.getKeyD k fallback = fallback
Equations

- @Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_emptyWithCapacity_list_of_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(emptyWithCapacity.insertMany l).val.getKeyD k' fallback = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_empty_list_of_mem {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Sigma.fst l) :
(emptyWithCapacity.insertMany l).val.getKeyD k' fallback = k
Equations

- @Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.size_insertMany_emptyWithCapacity_list {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) :
(emptyWithCapacity.insertMany l).val.val.size = l.length
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.size_insertMany_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.size_insertMany_empty_list {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} (distinct : List.Pairwise (fun (a b : (a : α) × β a) => (a.fst == b.fst) = false) l) :
(emptyWithCapacity.insertMany l).val.val.size = l.length
Equations

- @Std.DHashMap.Internal.Raw₀.size_insertMany_empty_list = @Std.DHashMap.Internal.Raw₀.size_insertMany_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.size_insertMany_emptyWithCapacity_list_le {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} :
(emptyWithCapacity.insertMany l).val.val.size ≤ l.length
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.size_insertMany_emptyWithCapacity_list_le (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.size_insertMany_empty_list_le {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} :
(emptyWithCapacity.insertMany l).val.val.size ≤ l.length
Equations

- @Std.DHashMap.Internal.Raw₀.size_insertMany_empty_list_le = @Std.DHashMap.Internal.Raw₀.size_insertMany_emptyWithCapacity_list_le

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_insertMany_emptyWithCapacity_list {α : Type u} {β : α → Type v} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} :
(emptyWithCapacity.insertMany l).val.val.isEmpty = l.isEmpty
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.isEmpty_insertMany_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.isEmpty_insertMany_empty_list {α : Type u_1} {β : α → Type u_2} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} :
(emptyWithCapacity.insertMany l).val.val.isEmpty = l.isEmpty
Equations

- @Std.DHashMap.Internal.Raw₀.isEmpty_insertMany_empty_list = @Std.DHashMap.Internal.Raw₀.isEmpty_insertMany_emptyWithCapacity_list

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_nil {α : Type u} [BEq α] [Hashable α] {β : Type v} :
(insertMany emptyWithCapacity []).val = emptyWithCapacity
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_nil (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.insertMany_empty_list_nil {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} :
(insertMany emptyWithCapacity []).val = emptyWithCapacity
Equations

- @Std.DHashMap.Internal.Raw₀.Const.insertMany_empty_list_nil = @Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_nil

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_singleton {α : Type u} [BEq α] [Hashable α] {β : Type v} {k : α} {v : β} :
(insertMany emptyWithCapacity [(k, v)]).val = emptyWithCapacity.insert k v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_singleton (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.insertMany_empty_list_singleton {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} {k : α} {v : β} :
(insertMany emptyWithCapacity [(k, v)]).val = emptyWithCapacity.insert k v
Equations

- @Std.DHashMap.Internal.Raw₀.Const.insertMany_empty_list_singleton = @Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_singleton

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_cons {α : Type u} [BEq α] [Hashable α] {β : Type v} {k : α} {v : β} {tl : List (α × β)} :
(insertMany emptyWithCapacity ((k, v) :: tl)).val = (insertMany (emptyWithCapacity.insert k v) tl).val
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_cons (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.insertMany_empty_list_cons {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} {k : α} {v : β} {tl : List (α × β)} :
(insertMany emptyWithCapacity ((k, v) :: tl)).val = (insertMany (emptyWithCapacity.insert k v) tl).val
Equations

- @Std.DHashMap.Internal.Raw₀.Const.insertMany_empty_list_cons = @Std.DHashMap.Internal.Raw₀.Const.insertMany_emptyWithCapacity_list_cons

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} :
(insertMany emptyWithCapacity l).val.contains k = (List.map Prod.fst l).contains k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_empty_list {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} :
(insertMany emptyWithCapacity l).val.contains k = (List.map Prod.fst l).contains k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_empty_list = @Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} (h : (List.map Prod.fst l).contains k = false) :
get? (insertMany emptyWithCapacity l).val k = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} (h : (List.map Prod.fst l).contains k = false) :
get? (insertMany emptyWithCapacity l).val k = none
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
get? (insertMany emptyWithCapacity l).val k' = some v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
get? (insertMany emptyWithCapacity l).val k' = some v
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.get?_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) {h : (insertMany emptyWithCapacity l).val.contains k' = true} :
get (insertMany emptyWithCapacity l).val k' h = v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) {h : (insertMany emptyWithCapacity l).val.contains k' = true} :
get (insertMany emptyWithCapacity l).val k' h = v
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.get_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} [Inhabited β] (h : (List.map Prod.fst l).contains k = false) :
get! (insertMany emptyWithCapacity l).val k = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} [Inhabited β] (h : (List.map Prod.fst l).contains k = false) :
get! (insertMany emptyWithCapacity l).val k = default
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} [Inhabited β] (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
get! (insertMany emptyWithCapacity l).val k' = v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v : β} [Inhabited β] (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
get! (insertMany emptyWithCapacity l).val k' = v
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} {fallback : β} (contains_eq_false : (List.map Prod.fst l).contains k = false) :
getD (insertMany emptyWithCapacity l).val k fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} {fallback : β} (contains_eq_false : (List.map Prod.fst l).contains k = false) :
getD (insertMany emptyWithCapacity l).val k fallback = fallback
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v fallback : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
getD (insertMany emptyWithCapacity l).val k' fallback = v
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_empty_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v fallback : β} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : (k, v) ∈ l) :
getD (insertMany emptyWithCapacity l).val k' fallback = v
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} (h : (List.map Prod.fst l).contains k = false) :
(insertMany emptyWithCapacity l).val.getKey? k = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} (h : (List.map Prod.fst l).contains k = false) :
(insertMany emptyWithCapacity l).val.getKey? k = none
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany emptyWithCapacity l).val.getKey? k' = some k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany emptyWithCapacity l).val.getKey? k' = some k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) {h' : (insertMany emptyWithCapacity l).val.contains k' = true} :
(insertMany emptyWithCapacity l).val.getKey k' h' = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) {h' : (insertMany emptyWithCapacity l).val.contains k' = true} :
(insertMany emptyWithCapacity l).val.getKey k' h' = k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List (α × β)} {k : α} (h : (List.map Prod.fst l).contains k = false) :
(insertMany emptyWithCapacity l).val.getKey! k = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List (α × β)} {k : α} (h : (List.map Prod.fst l).contains k = false) :
(insertMany emptyWithCapacity l).val.getKey! k = default
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany emptyWithCapacity l).val.getKey! k' = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany emptyWithCapacity l).val.getKey! k' = k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k fallback : α} (h : (List.map Prod.fst l).contains k = false) :
(insertMany emptyWithCapacity l).val.getKeyD k fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k fallback : α} (h : (List.map Prod.fst l).contains k = false) :
(insertMany emptyWithCapacity l).val.getKeyD k fallback = fallback
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_empty_list_of_contains_eq_false = @Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_emptyWithCapacity_list_of_contains_eq_false

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany emptyWithCapacity l).val.getKeyD k' fallback = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) (mem : k ∈ List.map Prod.fst l) :
(insertMany emptyWithCapacity l).val.getKeyD k' fallback = k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertMany_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) :
(insertMany emptyWithCapacity l).val.val.size = l.length
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.size_insertMany_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.size_insertMany_empty_list {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} (distinct : List.Pairwise (fun (a b : α × β) => (a.fst == b.fst) = false) l) :
(insertMany emptyWithCapacity l).val.val.size = l.length
Equations

- @Std.DHashMap.Internal.Raw₀.Const.size_insertMany_empty_list = @Std.DHashMap.Internal.Raw₀.Const.size_insertMany_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertMany_emptyWithCapacity_list_le {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} :
(insertMany emptyWithCapacity l).val.val.size ≤ l.length
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.size_insertMany_emptyWithCapacity_list_le (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.size_insertMany_empty_list_le {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} :
(insertMany emptyWithCapacity l).val.val.size ≤ l.length
Equations

- @Std.DHashMap.Internal.Raw₀.Const.size_insertMany_empty_list_le = @Std.DHashMap.Internal.Raw₀.Const.size_insertMany_emptyWithCapacity_list_le

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertMany_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} :
(insertMany emptyWithCapacity l).val.val.isEmpty = l.isEmpty
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertMany_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertMany_empty_list {α : Type u_1} [BEq α] [Hashable α] {β : Type u_2} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} :
(insertMany emptyWithCapacity l).val.val.isEmpty = l.isEmpty
Equations

- @Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertMany_empty_list = @Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertMany_emptyWithCapacity_list

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_nil {α : Type u} [BEq α] [Hashable α] :
(insertManyIfNewUnit emptyWithCapacity []).val = emptyWithCapacity
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_nil (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_empty_list_nil {α : Type u_1} [BEq α] [Hashable α] :
(insertManyIfNewUnit emptyWithCapacity []).val = emptyWithCapacity
Equations

- @Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_empty_list_nil = @Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_nil

Instances For

source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_singleton {α : Type u} [BEq α] [Hashable α] {k : α} :
(insertManyIfNewUnit emptyWithCapacity [k]).val = emptyWithCapacity.insertIfNew k ()
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_singleton (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_empty_list_singleton {α : Type u_1} [BEq α] [Hashable α] {k : α} :
(insertManyIfNewUnit emptyWithCapacity [k]).val = emptyWithCapacity.insertIfNew k ()
Equations

- @Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_empty_list_singleton = @Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_singleton

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_cons {α : Type u} [BEq α] [Hashable α] {hd : α} {tl : List α} :
(insertManyIfNewUnit emptyWithCapacity (hd :: tl)).val = (insertManyIfNewUnit (emptyWithCapacity.insertIfNew hd ()) tl).val
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_cons (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_empty_list_cons {α : Type u_1} [BEq α] [Hashable α] {hd : α} {tl : List α} :
(insertManyIfNewUnit emptyWithCapacity (hd :: tl)).val = (insertManyIfNewUnit (emptyWithCapacity.insertIfNew hd ()) tl).val
Equations

- @Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_empty_list_cons = @Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_emptyWithCapacity_list_cons

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_insertManyIfNewUnit_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} :
(insertManyIfNewUnit emptyWithCapacity l).val.contains k = l.contains k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.contains_insertManyIfNewUnit_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.contains_insertManyIfNewUnit_empty_list {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} :
(insertManyIfNewUnit emptyWithCapacity l).val.contains k = l.contains k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.contains_insertManyIfNewUnit_empty_list = @Std.DHashMap.Internal.Raw₀.Const.contains_insertManyIfNewUnit_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} (h' : l.contains k = false) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey? k = none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} (h' : l.contains k = false) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey? k = none
Equations

- One or more equations did not get rendered due to their size.

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey? k' = some k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey? k' = some k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKey?_insertManyIfNewUnit_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) {h' : (insertManyIfNewUnit emptyWithCapacity l).val.contains k' = true} :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey k' h' = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) {h' : (insertManyIfNewUnit emptyWithCapacity l).val.contains k' = true} :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey k' h' = k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List α} {k : α} (h' : l.contains k = false) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey! k = default
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List α} {k : α} (h' : l.contains k = false) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey! k = default
Equations

- One or more equations did not get rendered due to their size.

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List α} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey! k' = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List α} {k k' : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKey! k' = k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKey!_insertManyIfNewUnit_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_emptyWithCapacity_list_of_contains_eq_false {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k fallback : α} (h' : l.contains k = false) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKeyD k fallback = fallback
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_emptyWithCapacity_list_of_contains_eq_false (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_empty_list_of_contains_eq_false {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k fallback : α} (h' : l.contains k = false) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKeyD k fallback = fallback
Equations

- One or more equations did not get rendered due to their size.

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_emptyWithCapacity_list_of_mem {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKeyD k' fallback = k
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_emptyWithCapacity_list_of_mem (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_empty_list_of_mem {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) (mem : k ∈ l) :
(insertManyIfNewUnit emptyWithCapacity l).val.getKeyD k' fallback = k
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_empty_list_of_mem = @Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertManyIfNewUnit_emptyWithCapacity_list_of_mem

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) :
(insertManyIfNewUnit emptyWithCapacity l).val.val.size = l.length
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_empty_list {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} (distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l) :
(insertManyIfNewUnit emptyWithCapacity l).val.val.size = l.length
Equations

- @Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_empty_list = @Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_emptyWithCapacity_list_le {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} :
(insertManyIfNewUnit emptyWithCapacity l).val.val.size ≤ l.length
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_emptyWithCapacity_list_le (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_empty_list_le {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} :
(insertManyIfNewUnit emptyWithCapacity l).val.val.size ≤ l.length
Equations

- @Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_empty_list_le = @Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_emptyWithCapacity_list_le

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertManyIfNewUnit_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} :
(insertManyIfNewUnit emptyWithCapacity l).val.val.isEmpty = l.isEmpty
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertManyIfNewUnit_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertManyIfNewUnit_empty_list {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} :
(insertManyIfNewUnit emptyWithCapacity l).val.val.isEmpty = l.isEmpty
Equations

- @Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertManyIfNewUnit_empty_list = @Std.DHashMap.Internal.Raw₀.Const.isEmpty_insertManyIfNewUnit_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_insertManyIfNewUnit_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} :
get? (insertManyIfNewUnit emptyWithCapacity l).val k = if l.contains k = true then some () else none
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get?_insertManyIfNewUnit_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get?_insertManyIfNewUnit_empty_list {α : Type u_1} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} :
get? (insertManyIfNewUnit emptyWithCapacity l).val k = if l.contains k = true then some () else none
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get?_insertManyIfNewUnit_empty_list = @Std.DHashMap.Internal.Raw₀.Const.get?_insertManyIfNewUnit_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get_insertManyIfNewUnit_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] {l : List α} {k : α} {h : (insertManyIfNewUnit emptyWithCapacity l).val.contains k = true} :
get (insertManyIfNewUnit emptyWithCapacity l).val k h = ()
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get_insertManyIfNewUnit_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get_insertManyIfNewUnit_empty_list {α : Type u_1} [BEq α] [Hashable α] {l : List α} {k : α} {h : (insertManyIfNewUnit emptyWithCapacity l).val.contains k = true} :
get (insertManyIfNewUnit emptyWithCapacity l).val k h = ()
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get_insertManyIfNewUnit_empty_list = @Std.DHashMap.Internal.Raw₀.Const.get_insertManyIfNewUnit_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_insertManyIfNewUnit_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] {l : List α} {k : α} :
get! (insertManyIfNewUnit emptyWithCapacity l).val k = ()
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.get!_insertManyIfNewUnit_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.get!_insertManyIfNewUnit_empty_list {α : Type u_1} [BEq α] [Hashable α] {l : List α} {k : α} :
get! (insertManyIfNewUnit emptyWithCapacity l).val k = ()
Equations

- @Std.DHashMap.Internal.Raw₀.Const.get!_insertManyIfNewUnit_empty_list = @Std.DHashMap.Internal.Raw₀.Const.get!_insertManyIfNewUnit_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_insertManyIfNewUnit_emptyWithCapacity_list {α : Type u} [BEq α] [Hashable α] {l : List α} {k : α} {fallback : Unit} :
getD (insertManyIfNewUnit emptyWithCapacity l).val k fallback = ()
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.Const.getD_insertManyIfNewUnit_emptyWithCapacity_list (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.Const.getD_insertManyIfNewUnit_empty_list {α : Type u_1} [BEq α] [Hashable α] {l : List α} {k : α} {fallback : Unit} :
getD (insertManyIfNewUnit emptyWithCapacity l).val k fallback = ()
Equations

- @Std.DHashMap.Internal.Raw₀.Const.getD_insertManyIfNewUnit_empty_list = @Std.DHashMap.Internal.Raw₀.Const.getD_insertManyIfNewUnit_emptyWithCapacity_list

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.contains_union_of_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
m₁.contains k = true → (m₁.union m₂).contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_union_of_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
m₂.contains k = true → (m₁.union m₂).contains k = true
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.contains_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
(m₁.union m₂).contains k = (m₁.contains k || m₂.contains k)
source
theorem Std.DHashMap.Internal.Raw₀.contains_union_iff {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
(m₁.union m₂).contains k = true ↔ m₁.contains k = true ∨ m₂.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
(m₁.union m₂).contains k = true → m₂.contains k = false → m₁.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
(m₁.union m₂).contains k = true → m₁.contains k = false → m₂.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.union_insert_right_equiv_insert_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] {p : (a : α) × β a} (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(m₁.union (m₂.insert p.fst p.snd)).val.Equiv ((m₁.union m₂).insert p.fst p.snd).val
source
theorem Std.DHashMap.Internal.Raw₀.get?_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
(m₁.union m₂).get? k = (m₂.get? k).or (m₁.get? k)
source
theorem Std.DHashMap.Internal.Raw₀.get?_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₁.contains k = false) :
(m₁.union m₂).get? k = m₂.get? k
source
theorem Std.DHashMap.Internal.Raw₀.get?_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₂.contains k = false) :
(m₁.union m₂).get? k = m₁.get? k
source
theorem Std.DHashMap.Internal.Raw₀.get_union_of_contains_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_right : m₂.contains k = true) :
(m₁.union m₂).get k ⋯ = m₂.get k contains_right
source
theorem Std.DHashMap.Internal.Raw₀.get_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₁.contains k = false) {h' : (m₁.union m₂).contains k = true} :
(m₁.union m₂).get k h' = m₂.get k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₂.contains k = false) {h' : (m₁.union m₂).contains k = true} :
(m₁.union m₂).get k h' = m₁.get k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getD_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} {fallback : β k} :
(m₁.union m₂).getD k fallback = m₂.getD k (m₁.getD k fallback)
source
theorem Std.DHashMap.Internal.Raw₀.getD_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} {fallback : β k} (contains_eq_false : m₁.contains k = false) :
(m₁.union m₂).getD k fallback = m₂.getD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.getD_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} {fallback : β k} (contains_eq_false : m₂.contains k = false) :
(m₁.union m₂).getD k fallback = m₁.getD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.get!_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} [Inhabited (β k)] :
(m₁.union m₂).get! k = m₂.getD k (m₁.get! k)
source
theorem Std.DHashMap.Internal.Raw₀.get!_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} [Inhabited (β k)] (contains_eq_false : m₁.contains k = false) :
(m₁.union m₂).get! k = m₂.get! k
source
theorem Std.DHashMap.Internal.Raw₀.get!_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} [Inhabited (β k)] (contains_eq_false : m₂.contains k = false) :
(m₁.union m₂).get! k = m₁.get! k
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
(m₁.union m₂).getKey? k = (m₂.getKey? k).or (m₁.getKey? k)
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (not_mem : m₁.contains k = false) :
(m₁.union m₂).getKey? k = m₂.getKey? k
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (not_mem : m₂.contains k = false) :
(m₁.union m₂).getKey? k = m₁.getKey? k
source
theorem Std.DHashMap.Internal.Raw₀.getKey_union_of_contains_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (mem : m₂.contains k = true) :
(m₁.union m₂).getKey k ⋯ = m₂.getKey k mem
source
theorem Std.DHashMap.Internal.Raw₀.getKey_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₁.contains k = false) {h' : (m₁.union m₂).contains k = true} :
(m₁.union m₂).getKey k h' = m₂.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₂.contains k = false) {h' : (m₁.union m₂).contains k = true} :
(m₁.union m₂).getKey k h' = m₁.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k fallback : α} :
(m₁.union m₂).getKeyD k fallback = m₂.getKeyD k (m₁.getKeyD k fallback)
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k fallback : α} (h' : m₁.contains k = false) :
(m₁.union m₂).getKeyD k fallback = m₂.getKeyD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k fallback : α} (h' : m₂.contains k = false) :
(m₁.union m₂).getKeyD k fallback = m₁.getKeyD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] [Inhabited α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
(m₁.union m₂).getKey! k = m₂.getKeyD k (m₁.getKey! k)
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_union_of_contains_eq_false_left {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [Inhabited α] [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (h' : m₁.contains k = false) :
(m₁.union m₂).getKey! k = m₂.getKey! k
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_union_of_contains_eq_false_right {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [Inhabited α] [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (h' : m₂.contains k = false) :
(m₁.union m₂).getKey! k = m₁.getKey! k
source
theorem Std.DHashMap.Internal.Raw₀.size_union_of_not_mem {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(∀ (a : α), m₁.contains a = true → m₂.contains a = false) → (m₁.union m₂).val.size = m₁.val.size + m₂.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_left_le_size_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
m₁.val.size ≤ (m₁.union m₂).val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_right_le_size_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
m₂.val.size ≤ (m₁.union m₂).val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_union_le_size_add_size {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(m₁.union m₂).val.size ≤ m₁.val.size + m₂.val.size
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_union {α : Type u} {β : α → Type v} [BEq α] [Hashable α] {m₁ m₂ : Raw₀ α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(m₁.union m₂).val.isEmpty = (m₁.val.isEmpty && m₂.val.isEmpty)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_union {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
get? (m₁.union m₂) k = (get? m₂ k).or (get? m₁ k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_union_of_contains_eq_false_left {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₁.contains k = false) :
get? (m₁.union m₂) k = get? m₂ k
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_union_of_contains_eq_false_right {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₂.contains k = false) :
get? (m₁.union m₂) k = get? m₁ k
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_union_of_contains_right {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (h : m₂.contains k = true) :
get (m₁.union m₂) k ⋯ = get m₂ k h
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_union_of_contains_eq_false_left {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₁.contains k = false) {h' : (m₁.union m₂).contains k = true} :
get (m₁.union m₂) k h' = get m₂ k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_union_of_contains_eq_false_right {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₂.contains k = false) {h' : (m₁.union m₂).contains k = true} :
get (m₁.union m₂) k h' = get m₁ k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_union {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} {fallback : β} :
getD (m₁.union m₂) k fallback = getD m₂ k (getD m₁ k fallback)
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_union_of_contains_eq_false_left {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} {fallback : β} (contains_eq_false : m₁.contains k = false) :
getD (m₁.union m₂) k fallback = getD m₂ k fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_union_of_contains_eq_false_right {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} {fallback : β} (contains_eq_false : m₂.contains k = false) :
getD (m₁.union m₂) k fallback = getD m₁ k fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_union {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] [Inhabited β] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} :
get! (m₁.union m₂) k = getD m₂ k (get! m₁ k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_union_of_contains_eq_false_left {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] [Inhabited β] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₁.contains k = false) :
get! (m₁.union m₂) k = get! m₂ k
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_union_of_contains_eq_false_right {α : Type u} [BEq α] [Hashable α] {β : Type v} {m₁ m₂ : Raw₀ α fun (x : α) => β} [EquivBEq α] [LawfulHashable α] [Inhabited β] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) {k : α} (contains_eq_false : m₂.contains k = false) :
get! (m₁.union m₂) k = get! m₁ k
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_alter_eq_isEmpty_erase {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} :
(m.alter k f).val.isEmpty = ((m.erase k).val.isEmpty && (f (m.get? k)).isNone)
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} :
(m.alter k f).val.isEmpty = ((m.val.isEmpty || m.val.size == 1 && m.contains k) && (f (m.get? k)).isNone)
source
theorem Std.DHashMap.Internal.Raw₀.contains_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : Option (β k) → Option (β k)} :
(m.alter k f).contains k' = if (k == k') = true then (f (m.get? k)).isSome else m.contains k'
source
theorem Std.DHashMap.Internal.Raw₀.size_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} :
(m.alter k f).val.size = if m.contains k = true ∧ (f (m.get? k)).isNone = true then m.val.size - 1 else if ¬m.contains k = true ∧ (f (m.get? k)).isSome = true then m.val.size + 1 else m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_alter_eq_add_one {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} (h₁ : m.contains k = false) (h₂ : (f (m.get? k)).isSome = true) :
(m.alter k f).val.size = m.val.size + 1
source
theorem Std.DHashMap.Internal.Raw₀.size_alter_eq_sub_one {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} (h₁ : m.contains k = true) (h₂ : (f (m.get? k)).isNone = true) :
(m.alter k f).val.size = m.val.size - 1
source
theorem Std.DHashMap.Internal.Raw₀.size_alter_eq_self_of_not_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} (h₁ : m.contains k = false) (h₂ : (f (m.get? k)).isNone = true) :
(m.alter k f).val.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_alter_eq_self_of_mem {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} (h₁ : m.contains k = true) (h₂ : (f (m.get? k)).isSome = true) :
(m.alter k f).val.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_alter_le_size {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} :
(m.alter k f).val.size ≤ m.val.size + 1
source
theorem Std.DHashMap.Internal.Raw₀.size_le_size_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} :
m.val.size - 1 ≤ (m.alter k f).val.size
source
theorem Std.DHashMap.Internal.Raw₀.get?_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : Option (β k) → Option (β k)} :
(m.alter k f).get? k' = if h : (k == k') = true then cast ⋯ (f (m.get? k)) else m.get? k'
source
theorem Std.DHashMap.Internal.Raw₀.get_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : Option (β k) → Option (β k)} (hc : (m.alter k f).contains k' = true) :
(m.alter k f).get k' hc = if heq : (k == k') = true then cast ⋯ ((f (m.get? k)).get ⋯) else m.get k' ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get_alter_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : Option (β k) → Option (β k)} {hc : (m.alter k f).contains k = true} :
(m.alter k f).get k hc = (f (m.get? k)).get ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get!_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {k k' : α} (h : m.val.WF) [Inhabited (β k')] {f : Option (β k) → Option (β k)} :
(m.alter k f).get! k' = if heq : (k == k') = true then (Option.map (cast ⋯) (f (m.get? k))).get! else m.get! k'
source
theorem Std.DHashMap.Internal.Raw₀.getD_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {k k' : α} {fallback : β k'} (h : m.val.WF) {f : Option (β k) → Option (β k)} :
(m.alter k f).getD k' fallback = if heq : (k == k') = true then (Option.map (cast ⋯) (f (m.get? k))).getD fallback else m.getD k' fallback
source
theorem Std.DHashMap.Internal.Raw₀.getD_alter_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {k : α} {fallback : β k} (h : m.val.WF) {f : Option (β k) → Option (β k)} :
(m.alter k f).getD k fallback = (f (m.get? k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : Option (β k) → Option (β k)} :
(m.alter k f).getKey? k' = if (k == k') = true then if (f (m.get? k)).isSome = true then some k else none else m.getKey? k'
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] [Inhabited α] {k k' : α} (h : m.val.WF) {f : Option (β k) → Option (β k)} :
(m.alter k f).getKey! k' = if (k == k') = true then if (f (m.get? k)).isSome = true then k else default else m.getKey! k'
source
theorem Std.DHashMap.Internal.Raw₀.getKey_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] [Inhabited α] {k k' : α} (h : m.val.WF) {f : Option (β k) → Option (β k)} (hc : (m.alter k f).contains k' = true) :
(m.alter k f).getKey k' hc = if heq : (k == k') = true then k else m.getKey k' ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_alter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {k k' fallback : α} (h : m.val.WF) {f : Option (β k) → Option (β k)} :
(m.alter k f).getKeyD k' fallback = if (k == k') = true then if (f (m.get? k)).isSome = true then k else fallback else m.getKeyD k' fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_alter_eq_isEmpty_erase {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} :
(alter m k f).val.isEmpty = ((m.erase k).val.isEmpty && (f (get? m k)).isNone)
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} :
(alter m k f).val.isEmpty = ((m.val.isEmpty || m.val.size == 1 && m.contains k) && (f (get? m k)).isNone)
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : Option β → Option β} :
(alter m k f).contains k' = if (k == k') = true then (f (get? m k)).isSome else m.contains k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} :
(alter m k f).val.size = if m.contains k = true ∧ (f (get? m k)).isNone = true then m.val.size - 1 else if ¬m.contains k = true ∧ (f (get? m k)).isSome = true then m.val.size + 1 else m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_alter_eq_add_one {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} (h₁ : m.contains k = false) (h₂ : (f (get? m k)).isSome = true) :
(alter m k f).val.size = m.val.size + 1
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_alter_eq_sub_one {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} (h₁ : m.contains k = true) (h₂ : (f (get? m k)).isNone = true) :
(alter m k f).val.size = m.val.size - 1
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_alter_eq_self_of_not_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} (h₁ : m.contains k = false) (h₂ : (f (get? m k)).isNone = true) :
(alter m k f).val.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_alter_eq_self_of_mem {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} (h₁ : m.contains k = true) (h₂ : (f (get? m k)).isSome = true) :
(alter m k f).val.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_alter_le_size {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} :
(alter m k f).val.size ≤ m.val.size + 1
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_le_size_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} :
m.val.size - 1 ≤ (alter m k f).val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : Option β → Option β} :
get? (alter m k f) k' = if (k == k') = true then f (get? m k) else get? m k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : Option β → Option β} (hc : (alter m k f).contains k' = true) :
get (alter m k f) k' hc = if heq : (k == k') = true then (f (get? m k)).get ⋯ else get m k' ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_alter_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : Option β → Option β} {hc : (alter m k f).contains k = true} :
get (alter m k f) k hc = (f (get? m k)).get ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) {k k' : α} (h : m.val.WF) [Inhabited β] {f : Option β → Option β} :
get! (alter m k f) k' = if (k == k') = true then (f (get? m k)).get! else get! m k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) {k k' : α} {fallback : β} (h : m.val.WF) {f : Option β → Option β} :
getD (alter m k f) k' fallback = if (k == k') = true then (f (get? m k)).getD fallback else getD m k' fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_alter_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) {k : α} {fallback : β} (h : m.val.WF) {f : Option β → Option β} :
getD (alter m k f) k fallback = (f (get? m k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : Option β → Option β} :
(alter m k f).getKey? k' = if (k == k') = true then if (f (get? m k)).isSome = true then some k else none else m.getKey? k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) [Inhabited α] {k k' : α} (h : m.val.WF) {f : Option β → Option β} :
(alter m k f).getKey! k' = if (k == k') = true then if (f (get? m k)).isSome = true then k else default else m.getKey! k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) [Inhabited α] {k k' : α} (h : m.val.WF) {f : Option β → Option β} (hc : (alter m k f).contains k' = true) :
(alter m k f).getKey k' hc = if heq : (k == k') = true then k else m.getKey k' ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_alter {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) {k k' fallback : α} (h : m.val.WF) {f : Option β → Option β} :
(alter m k f).getKeyD k' fallback = if (k == k') = true then if (f (get? m k)).isSome = true then k else fallback else m.getKeyD k' fallback
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.isEmpty_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : β k → β k} :
(m.modify k f).val.isEmpty = m.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.contains_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : β k → β k} :
(m.modify k f).contains k' = m.contains k'
source
theorem Std.DHashMap.Internal.Raw₀.size_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : β k → β k} :
(m.modify k f).val.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.get?_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : β k → β k} :
(m.modify k f).get? k' = if h : (k == k') = true then cast ⋯ (Option.map f (m.get? k)) else m.get? k'
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.get?_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : β k → β k} :
(m.modify k f).get? k = Option.map f (m.get? k)
source
theorem Std.DHashMap.Internal.Raw₀.get_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : β k → β k} (hc : (m.modify k f).contains k' = true) :
(m.modify k f).get k' hc = if heq : (k == k') = true then cast ⋯ (f (m.get k ⋯)) else m.get k' ⋯
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.get_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : β k → β k} {hc : (m.modify k f).contains k = true} :
(m.modify k f).get k hc = f (m.get k ⋯)
source
theorem Std.DHashMap.Internal.Raw₀.get!_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} [hi : Inhabited (β k')] {f : β k → β k} :
(m.modify k f).get! k' = if heq : (k == k') = true then (Option.map (cast ⋯) (Option.map f (m.get? k))).get! else m.get! k'
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.get!_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} [Inhabited (β k)] {f : β k → β k} :
(m.modify k f).get! k = (Option.map f (m.get? k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.getD_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {fallback : β k'} {f : β k → β k} :
(m.modify k f).getD k' fallback = if heq : (k == k') = true then (Option.map (cast ⋯) (Option.map f (m.get? k))).getD fallback else m.getD k' fallback
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.getD_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {fallback : β k} {f : β k → β k} :
(m.modify k f).getD k fallback = (Option.map f (m.get? k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' : α} {f : β k → β k} :
(m.modify k f).getKey? k' = if (k == k') = true then if m.contains k = true then some k else none else m.getKey? k'
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k : α} {f : β k → β k} :
(m.modify k f).getKey? k = if m.contains k = true then some k else none
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) [Inhabited α] {k k' : α} {f : β k → β k} :
(m.modify k f).getKey! k' = if (k == k') = true then if m.contains k = true then k else default else m.getKey! k'
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) [Inhabited α] {k : α} {f : β k → β k} :
(m.modify k f).getKey! k = if m.contains k = true then k else default
source
theorem Std.DHashMap.Internal.Raw₀.getKey_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) [Inhabited α] {k k' : α} {f : β k → β k} (hc : (m.modify k f).contains k' = true) :
(m.modify k f).getKey k' hc = if (k == k') = true then k else m.getKey k' ⋯
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.getKey_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) [Inhabited α] {k : α} {f : β k → β k} (hc : (m.modify k f).contains k = true) :
(m.modify k f).getKey k hc = k
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_modify {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) {k k' fallback : α} {f : β k → β k} :
(m.modify k f).getKeyD k' fallback = if (k == k') = true then if m.contains k = true then k else fallback else m.getKeyD k' fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_modify_self {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] (h : m.val.WF) [Inhabited α] {k fallback : α} {f : β k → β k} :
(m.modify k f).getKeyD k fallback = if m.contains k = true then k else fallback
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : β → β} :
(modify m k f).val.isEmpty = m.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : β → β} :
(modify m k f).contains k' = m.contains k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : β → β} :
(modify m k f).val.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : β → β} :
get? (modify m k f) k' = if (k == k') = true then Option.map f (get? m k) else get? m k'
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.get?_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : β → β} :
get? (modify m k f) k = Option.map f (get? m k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : β → β} (hc : (modify m k f).contains k' = true) :
get (modify m k f) k' hc = if heq : (k == k') = true then f (get m k ⋯) else get m k' ⋯
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.get_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : β → β} {hc : (modify m k f).contains k = true} :
get (modify m k f) k hc = f (get m k ⋯)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} [hi : Inhabited β] {f : β → β} :
get! (modify m k f) k' = if (k == k') = true then (Option.map f (get? m k)).get! else get! m k'
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.get!_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} [Inhabited β] {f : β → β} :
get! (modify m k f) k = (Option.map f (get? m k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {fallback : β} {f : β → β} :
getD (modify m k f) k' fallback = if (k == k') = true then (Option.map f (get? m k)).getD fallback else getD m k' fallback
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.getD_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {fallback : β} {f : β → β} :
getD (modify m k f) k fallback = (Option.map f (get? m k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' : α} {f : β → β} :
(modify m k f).getKey? k' = if (k == k') = true then if m.contains k = true then some k else none else m.getKey? k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k : α} {f : β → β} :
(modify m k f).getKey? k = if m.contains k = true then some k else none
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) [Inhabited α] {k k' : α} {f : β → β} :
(modify m k f).getKey! k' = if (k == k') = true then if m.contains k = true then k else default else m.getKey! k'
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) [Inhabited α] {k : α} {f : β → β} :
(modify m k f).getKey! k = if m.contains k = true then k else default
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) [Inhabited α] {k k' : α} {f : β → β} (hc : (modify m k f).contains k' = true) :
(modify m k f).getKey k' hc = if (k == k') = true then k else m.getKey k' ⋯
source
@[simp]
theorem Std.DHashMap.Internal.Raw₀.Const.getKey_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) [Inhabited α] {k : α} {f : β → β} (hc : (modify m k f).contains k = true) :
(modify m k f).getKey k hc = k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_modify {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) {k k' fallback : α} {f : β → β} :
(modify m k f).getKeyD k' fallback = if (k == k') = true then if m.contains k = true then k else fallback else m.getKeyD k' fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_modify_self {α : Type u} [BEq α] [Hashable α] {β : Type v} [EquivBEq α] [LawfulHashable α] (m : Raw₀ α fun (x : α) => β) (h : m.val.WF) [Inhabited α] {k fallback : α} {f : β → β} :
(modify m k f).getKeyD k fallback = if m.contains k = true then k else fallback
source
theorem Std.DHashMap.Internal.Raw₀.equiv_iff_toList_perm_toList {α : Type u} {β : α → Type v} (m₁ m₂ : Raw α β) :
m₁.Equiv m₂ ↔ m₁.toList.Perm m₂.toList
source
theorem Std.DHashMap.Internal.Raw₀.keys_perm_keys_of_equiv {α : Type u} {β : α → Type v} (m₁ m₂ : Raw α β) (h : m₁.Equiv m₂) :
m₁.keys.Perm m₂.keys
source
theorem Std.DHashMap.Internal.Raw₀.filter_equiv_congr {α : Type u} {β : α → Type v} (m₁ m₂ : Raw₀ α β) (h : m₁.val.Equiv m₂.val) {f : (a : α) → β a → Bool} :
(filter f m₁).val.Equiv (filter f m₂).val
source
theorem Std.DHashMap.Internal.Raw₀.map_equiv_congr {α : Type u} {β : α → Type v} {γ : α → Type w} (m₁ m₂ : Raw₀ α β) (h : m₁.val.Equiv m₂.val) {f : (a : α) → β a → γ a} :
(map f m₁).val.Equiv (map f m₂).val
source
theorem Std.DHashMap.Internal.Raw₀.filterMap_equiv_congr {α : Type u} {β : α → Type v} (m₁ m₂ : Raw₀ α β) {γ : α → Type w} (h : m₁.val.Equiv m₂.val) {f : (a : α) → β a → Option (γ a)} :
(filterMap f m₁).val.Equiv (filterMap f m₂).val
source
theorem Std.DHashMap.Internal.Raw₀.Const.equiv_iff_toList_perm_toList {α : Type u} {β : Type v} (m₁ m₂ : Raw α fun (x : α) => β) :
m₁.Equiv m₂ ↔ (Raw.Const.toList m₁).Perm (Raw.Const.toList m₂)
source
theorem Std.DHashMap.Internal.Raw₀.Const.equiv_iff_keys_perm_keys {α : Type u} (m₁ m₂ : Raw α fun (x : α) => Unit) :
m₁.Equiv m₂ ↔ m₁.keys.Perm m₂.keys
source
theorem Std.DHashMap.Internal.Raw₀.equiv_emptyWithCapacity_iff_isEmpty {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {c : Nat} :
m.val.Equiv (emptyWithCapacity c).val ↔ m.val.isEmpty = true
source
@[reducible, inline, deprecated Std.DHashMap.Internal.Raw₀.equiv_emptyWithCapacity_iff_isEmpty (since := "2025-03-12")]
abbrev Std.DHashMap.Internal.Raw₀.equiv_empty_iff_isEmpty {α : Type u_1} {β : α → Type u_2} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.val.WF) {c : Nat} :
m.val.Equiv (emptyWithCapacity c).val ↔ m.val.isEmpty = true
Equations

- @Std.DHashMap.Internal.Raw₀.equiv_empty_iff_isEmpty = @Std.DHashMap.Internal.Raw₀.equiv_emptyWithCapacity_iff_isEmpty

Instances For

source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) :
m₁.val.isEmpty = m₂.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.contains_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} :
m₁.contains k = m₂.contains k
source
theorem Std.DHashMap.Internal.Raw₀.size_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) :
m₁.val.size = m₂.val.size
source
theorem Std.DHashMap.Internal.Raw₀.get?_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} :
m₁.get? k = m₂.get? k
source
theorem Std.DHashMap.Internal.Raw₀.get_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} (h' : m₁.contains k = true) :
m₁.get k h' = m₂.get k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get!_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} [Inhabited (β k)] :
m₁.get! k = m₂.get! k
source
theorem Std.DHashMap.Internal.Raw₀.getD_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} {fallback : β k} :
m₁.getD k fallback = m₂.getD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} :
m₁.getKey? k = m₂.getKey? k
source
theorem Std.DHashMap.Internal.Raw₀.getKey_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} (h' : m₁.contains k = true) :
m₁.getKey k h' = m₂.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] [Inhabited α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} :
m₁.getKey! k = m₂.getKey! k
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_eq_of_equiv {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k fallback : α} :
m₁.getKeyD k fallback = m₂.getKeyD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.insert_equiv_congr {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} {v : β k} :
(m₁.insert k v).val.Equiv (m₂.insert k v).val
source
theorem Std.DHashMap.Internal.Raw₀.erase_equiv_congr {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} :
(m₁.erase k).val.Equiv (m₂.erase k).val
source
theorem Std.DHashMap.Internal.Raw₀.insertIfNew_equiv_congr {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} {v : β k} :
(m₁.insertIfNew k v).val.Equiv (m₂.insertIfNew k v).val
source
theorem Std.DHashMap.Internal.Raw₀.insertMany_list_equiv_congr {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {l : List ((a : α) × β a)} :
(m₁.insertMany l).val.val.Equiv (m₂.insertMany l).val.val
source
theorem Std.DHashMap.Internal.Raw₀.alter_equiv_congr {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} (f : Option (β k) → Option (β k)) :
(m₁.alter k f).val.Equiv (m₂.alter k f).val
source
theorem Std.DHashMap.Internal.Raw₀.modify_equiv_congr {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} (f : β k → β k) :
(m₁.modify k f).val.Equiv (m₂.modify k f).val
source
theorem Std.DHashMap.Internal.Raw₀.equiv_of_forall_get?_eq {α : Type u} {β : α → Type v} [BEq α] [Hashable α] (m₁ m₂ : Raw₀ α β) [LawfulBEq α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(∀ (k : α), m₁.get? k = m₂.get? k) → m₁.val.Equiv m₂.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_eq_of_equiv {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} :
get? m₁ k = get? m₂ k
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_eq_of_equiv {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} (h' : m₁.contains k = true) :
get m₁ k h' = get m₂ k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_eq_of_equiv {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} [Inhabited β] :
get! m₁ k = get! m₂ k
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_eq_of_equiv {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} {fallback : β} :
getD m₁ k fallback = getD m₂ k fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.insertMany_list_equiv_congr {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {l : List (α × β)} :
(insertMany m₁ l).val.val.Equiv (insertMany m₂ l).val.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.insertManyIfNewUnit_list_equiv_congr {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {m₁ m₂ : Raw₀ α fun (x : α) => Unit} (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {l : List α} :
(insertManyIfNewUnit m₁ l).val.val.Equiv (insertManyIfNewUnit m₂ l).val.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.alter_equiv_congr {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} (f : Option β → Option β) :
(alter m₁ k f).val.Equiv (alter m₂ k f).val
source
theorem Std.DHashMap.Internal.Raw₀.Const.modify_equiv_congr {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) (h : m₁.val.Equiv m₂.val) {k : α} (f : β → β) :
(modify m₁ k f).val.Equiv (modify m₂ k f).val
source
theorem Std.DHashMap.Internal.Raw₀.Const.equiv_of_forall_getKey_eq_of_forall_get?_eq {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(∀ (k : α) (hk : m₁.contains k = true) (hk' : m₂.contains k = true), m₁.getKey k hk = m₂.getKey k hk') → (∀ (k : α), get? m₁ k = get? m₂ k) → m₁.val.Equiv m₂.val
source
@[deprecated Std.DHashMap.Internal.Raw₀.Const.equiv_of_forall_getKey_eq_of_forall_get?_eq (since := "2025-04-25")]
theorem Std.DHashMap.Internal.Raw₀.Const.equiv_of_forall_getKey?_eq_of_forall_get?_eq {α : Type u} [BEq α] [Hashable α] {β : Type v} (m₁ m₂ : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(∀ (k : α), m₁.getKey? k = m₂.getKey? k) → (∀ (k : α), get? m₁ k = get? m₂ k) → m₁.val.Equiv m₂.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.equiv_of_forall_get?_eq {β : Type v} {α : Type u} [BEq α] [Hashable α] [LawfulBEq α] {m₁ m₂ : Raw₀ α fun (x : α) => β} (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(∀ (k : α), get? m₁ k = get? m₂ k) → m₁.val.Equiv m₂.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.equiv_of_forall_getKey?_unit_eq {α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {m₁ m₂ : Raw₀ α fun (x : α) => Unit} (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(∀ (k : α), m₁.getKey? k = m₂.getKey? k) → m₁.val.Equiv m₂.val
source
theorem Std.DHashMap.Internal.Raw₀.Const.equiv_of_forall_contains_unit_eq {α : Type u} [BEq α] [Hashable α] [LawfulBEq α] {m₁ m₂ : Raw₀ α fun (x : α) => Unit} (h₁ : m₁.val.WF) (h₂ : m₂.val.WF) :
(∀ (k : α), m₁.contains k = m₂.contains k) → m₁.val.Equiv m₂.val
source
theorem Std.DHashMap.Internal.Raw₀.toList_filterMap {α : Type u} {β : α → Type v} {γ : α → Type w} (m : Raw₀ α β) {f : (a : α) → β a → Option (γ a)} :
(filterMap f m).val.toList.Perm (List.filterMap (fun (p : (a : α) × β a) => Option.map (fun (x : γ p.fst) => ⟨p.fst, x⟩) (f p.fst p.snd)) m.val.toList)
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_filterMap_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} (h : m.val.WF) :
(filterMap f m).val.isEmpty = true ↔ ∀ (k : α) (h : m.contains k = true), f k (m.get k h) = none
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_filterMap_eq_false_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} (h : m.val.WF) :
(filterMap f m).val.isEmpty = false ↔ ∃ (k : α), ∃ (h : m.contains k = true), (f k (m.get k h)).isSome = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) :
(filterMap f m).contains k = Option.any (fun (x : β k) => (f k x).isSome) (m.get? k)
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) :
(filterMap f m).contains k = true → m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.size_filterMap_le_size {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → Option (γ a)} (h : m.val.WF) :
(filterMap f m).val.size ≤ m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_filterMap_eq_size_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} (h : m.val.WF) :
(filterMap f m).val.size = m.val.size ↔ ∀ (a : α) (h : m.contains a = true), (f a (m.get a h)).isSome = true
source
theorem Std.DHashMap.Internal.Raw₀.get?_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) :
(filterMap f m).get? k = (m.get? k).bind (f k)
source
theorem Std.DHashMap.Internal.Raw₀.isSome_apply_of_contains_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) (h' : (filterMap f m).contains k = true) :
(f k (m.get k ⋯)).isSome = true
source
theorem Std.DHashMap.Internal.Raw₀.get_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) {h' : (filterMap f m).contains k = true} :
(filterMap f m).get k h' = (f k (m.get k ⋯)).get ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get!_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k : α} [Inhabited (γ k)] (h : m.val.WF) :
(filterMap f m).get! k = ((m.get? k).bind (f k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.getD_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k : α} {fallback : γ k} (h : m.val.WF) :
(filterMap f m).getD k fallback = ((m.get? k).bind (f k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) :
(filterMap f m).getKey? k = (m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => (f x (m.get x ⋯)).isSome
source
theorem Std.DHashMap.Internal.Raw₀.getKey_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) {h' : (filterMap f m).contains k = true} :
(filterMap f m).getKey k h' = m.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] [Inhabited α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.val.WF) :
(filterMap f m).getKey! k = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => (f x (m.get x ⋯)).isSome).get!
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_filterMap {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → Option (γ a)} {k fallback : α} (h : m.val.WF) :
(filterMap f m).getKeyD k fallback = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => (f x (m.get x ⋯)).isSome).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_filterMap_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} (h : m.val.WF) :
(filterMap f m).val.isEmpty = true ↔ ∀ (k : α) (h : m.contains k = true), f (m.getKey k h) (get m k h) = none
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_filterMap_eq_false_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} (h : m.val.WF) :
(filterMap f m).val.isEmpty = false ↔ ∃ (k : α), ∃ (h : m.contains k = true), (f (m.getKey k h) (get m k h)).isSome = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_filterMap_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} (h : m.val.WF) :
(filterMap f m).contains k = true ↔ ∃ (h' : m.contains k = true), (f (m.getKey k h') (get m k h')).isSome = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_filterMap_eq_size_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} (h : m.val.WF) :
(filterMap f m).val.size = m.val.size ↔ ∀ (a : α) (h : m.contains a = true), (f (m.getKey a h) (get m a h)).isSome = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} (h : m.val.WF) :
get? (filterMap f m) k = (get? m k).pbind fun (x : β) (h' : get? m k = some x) => f (m.getKey k ⋯) x
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_filterMap_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k k' : α} (h : m.val.WF) :
m.getKey? k = some k' → get? (filterMap f m) k = (get? m k).bind fun (x : β) => f k' x
source
theorem Std.DHashMap.Internal.Raw₀.Const.isSome_apply_of_contains_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} (h : m.val.WF) (h' : (filterMap f m).contains k = true) :
(f (m.getKey k ⋯) (get m k ⋯)).isSome = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} (h : m.val.WF) {h' : (filterMap f m).contains k = true} :
get (filterMap f m) k h' = (f (m.getKey k ⋯) (get m k ⋯)).get ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited γ] {f : α → β → Option γ} {k : α} (h : m.val.WF) :
get! (filterMap f m) k = ((get? m k).pbind fun (x : β) (h' : get? m k = some x) => f (m.getKey k ⋯) x).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_filterMap_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited γ] {f : α → β → Option γ} {k k' : α} (h : m.val.WF) :
m.getKey? k = some k' → get! (filterMap f m) k = ((get? m k).bind fun (x : β) => f k' x).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} {fallback : γ} (h : m.val.WF) :
getD (filterMap f m) k fallback = ((get? m k).pbind fun (x : β) (h' : get? m k = some x) => f (m.getKey k ⋯) x).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_filterMap_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k k' : α} {fallback : γ} (h : m.val.WF) :
m.getKey? k = some k' → getD (filterMap f m) k fallback = ((get? m k).bind fun (x : β) => f k' x).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.toList_filterMap {β : Type v} {γ : Type w} {α : Type u} (m : Raw₀ α fun (x : α) => β) {f : α → β → Option γ} :
(Raw.Const.toList (filterMap f m).val).Perm (List.filterMap (fun (p : α × β) => Option.map (fun (x : γ) => (p.fst, x)) (f p.fst p.snd)) (Raw.Const.toList m.val))
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} (h : m.val.WF) :
(filterMap f m).getKey? k = (m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => (f x (get m x ⋯)).isSome
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited α] {f : α → β → Option γ} {k : α} (h : m.val.WF) :
(filterMap f m).getKey! k = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => (f x (get m x ⋯)).isSome).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_filterMap {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k fallback : α} (h : m.val.WF) :
(filterMap f m).getKeyD k fallback = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => (f x (get m x ⋯)).isSome).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.filterMap_equiv_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) {f : (a : α) → β a → Bool} :
(filterMap (fun (k : α) => Option.guard fun (v : β k) => f k v) m).val.Equiv (filter f m).val
source
theorem Std.DHashMap.Internal.Raw₀.toList_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) {f : (a : α) → β a → Bool} :
(filter f m).val.toList.Perm (List.filter (fun (p : (a : α) × β a) => f p.fst p.snd) m.val.toList)
source
theorem Std.DHashMap.Internal.Raw₀.keys_filter_key {α : Type u} {β : α → Type v} (m : Raw₀ α β) {f : α → Bool} :
(filter (fun (k : α) (x : β k) => f k) m).val.keys.Perm (List.filter f m.val.keys)
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_filter_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} (h : m.val.WF) :
(filter f m).val.isEmpty = true ↔ ∀ (k : α) (h : m.contains k = true), f k (m.get k h) = false
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_filter_eq_false_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} (h : m.val.WF) :
(filter f m).val.isEmpty = false ↔ ∃ (k : α), ∃ (h : m.contains k = true), f k (m.get k h) = true
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_filter_key_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} (h : m.val.WF) :
(filter (fun (a : α) (x : β a) => f a) m).val.isEmpty = true ↔ ∀ (k : α) (h : m.contains k = true), f (m.getKey k h) = false
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_filter_key_eq_false_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} (h : m.val.WF) :
(filter (fun (a : α) (x : β a) => f a) m).val.isEmpty = false ↔ ∃ (k : α), ∃ (h : m.contains k = true), f (m.getKey k h) = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} {k : α} (h : m.val.WF) :
(filter f m).contains k = Option.any (f k) (m.get? k)
source
theorem Std.DHashMap.Internal.Raw₀.contains_filter_key_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} {k : α} (h : m.val.WF) :
(filter (fun (a : α) (x : β a) => f a) m).contains k = true ↔ ∃ (h : m.contains k = true), f (m.getKey k h) = true
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → Bool} {k : α} (h : m.val.WF) :
(filter f m).contains k = true → m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.size_filter_le_size {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → Bool} (h : m.val.WF) :
(filter f m).val.size ≤ m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.size_filter_eq_size_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} (h : m.val.WF) :
(filter f m).val.size = m.val.size ↔ ∀ (a : α) (h : m.contains a = true), f a (m.get a h) = true
source
theorem Std.DHashMap.Internal.Raw₀.filter_equiv_self_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} (h : m.val.WF) :
(filter f m).val.Equiv m.val ↔ ∀ (a : α) (h : m.contains a = true), f a (m.get a h) = true
source
theorem Std.DHashMap.Internal.Raw₀.filter_key_equiv_self_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} (h : m.val.WF) :
(filter (fun (k : α) (x : β k) => f k) m).val.Equiv m.val ↔ ∀ (a : α) (h : m.contains a = true), f (m.getKey a h) = true
source
theorem Std.DHashMap.Internal.Raw₀.size_filter_key_eq_size_iff {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} (h : m.val.WF) :
(filter (fun (k : α) (x : β k) => f k) m).val.size = m.val.size ↔ ∀ (k : α) (h : m.contains k = true), f (m.getKey k h) = true
source
theorem Std.DHashMap.Internal.Raw₀.get?_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} {k : α} (h : m.val.WF) :
(filter f m).get? k = Option.filter (f k) (m.get? k)
source
theorem Std.DHashMap.Internal.Raw₀.get_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} {k : α} (h : m.val.WF) {h' : (filter f m).contains k = true} :
(filter f m).get k h' = m.get k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.get!_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} {k : α} [Inhabited (β k)] (h : m.val.WF) :
(filter f m).get! k = (Option.filter (f k) (m.get? k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.getD_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} {k : α} {fallback : β k} (h : m.val.WF) :
(filter f m).getD k fallback = (Option.filter (f k) (m.get? k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.keys_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} (h : m.val.WF) :
(filter f m).val.keys.Perm (List.filter (fun (x : { x : α // x ∈ m.val.keys }) => match x with | ⟨x, h'⟩ => f x (m.get x ⋯)) m.val.keys.attach).unattach
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} {k : α} (h : m.val.WF) :
(filter f m).getKey? k = (m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => f x (m.get x ⋯)
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_filter_key {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} {k : α} (h : m.val.WF) :
(filter (fun (k : α) (x : β k) => f k) m).getKey? k = Option.filter f (m.getKey? k)
source
theorem Std.DHashMap.Internal.Raw₀.getKey_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → Bool} {k : α} (h : m.val.WF) {h' : (filter f m).contains k = true} :
(filter f m).getKey k h' = m.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] [Inhabited α] {f : (a : α) → β a → Bool} {k : α} (h : m.val.WF) :
(filter f m).getKey! k = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => f x (m.get x ⋯)).get!
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_filter_key {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] {f : α → Bool} {k : α} (h : m.val.WF) :
(filter (fun (k : α) (x : β k) => f k) m).getKey! k = (Option.filter f (m.getKey? k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_filter {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [LawfulBEq α] {f : (a : α) → β a → Bool} {k fallback : α} (h : m.val.WF) :
(filter f m).getKeyD k fallback = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => f x (m.get x ⋯)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_filter_key {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} {k fallback : α} (h : m.val.WF) :
(filter (fun (k : α) (x : β k) => f k) m).getKeyD k fallback = (Option.filter f (m.getKey? k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_filter_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} (h : m.val.WF) :
(filter f m).val.isEmpty = true ↔ ∀ (k : α) (h : m.contains k = true), f (m.getKey k h) (get m k h) = false
source
theorem Std.DHashMap.Internal.Raw₀.Const.isEmpty_filter_eq_false_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} (h : m.val.WF) :
(filter f m).val.isEmpty = false ↔ ∃ (k : α), ∃ (h : m.contains k = true), f (m.getKey k h) (get m k h) = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.contains_filter_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k : α} (h : m.val.WF) :
(filter f m).contains k = true ↔ ∃ (h' : m.contains k = true), f (m.getKey k h') (get m k h') = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_filter_le_size {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} (h : m.val.WF) :
(filter f m).val.size ≤ m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.Const.size_filter_eq_size_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} (h : m.val.WF) :
(filter f m).val.size = m.val.size ↔ ∀ (a : α) (h : m.contains a = true), f (m.getKey a h) (get m a h) = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.filter_equiv_self_iff {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} (h : m.val.WF) :
(filter f m).val.Equiv m.val ↔ ∀ (a : α) (h : m.contains a = true), f (m.getKey a h) (get m a h) = true
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k : α} (h : m.val.WF) :
get? (filter f m) k = (get? m k).pfilter fun (x : β) (h' : get? m k = some x) => f (m.getKey k ⋯) x
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_filter_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k k' : α} (h : m.val.WF) :
m.getKey? k = some k' → get? (filter f m) k = Option.filter (fun (x : β) => f k' x) (get? m k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k : α} (h : m.val.WF) {h' : (filter f m).contains k = true} :
get (filter f m) k h' = get m k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] {f : α → β → Bool} {k : α} (h : m.val.WF) :
get! (filter f m) k = ((get? m k).pfilter fun (x : β) (h' : get? m k = some x) => f (m.getKey k ⋯) x).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_filter_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited β] {f : α → β → Bool} {k k' : α} (h : m.val.WF) :
m.getKey? k = some k' → get! (filter f m) k = (Option.filter (fun (x : β) => f k' x) (get? m k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k : α} {fallback : β} (h : m.val.WF) :
getD (filter f m) k fallback = ((get? m k).pfilter fun (x : β) (h' : get? m k = some x) => f (m.getKey k ⋯) x).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_filter_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k k' : α} {fallback : β} (h : m.val.WF) :
m.getKey? k = some k' → getD (filter f m) k fallback = (Option.filter (fun (x : β) => f k' x) (get? m k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.toList_filter {β : Type v} {α : Type u} (m : Raw₀ α fun (x : α) => β) {f : α → β → Bool} :
(Raw.Const.toList (filter f m).val).Perm (List.filter (fun (p : α × β) => f p.fst p.snd) (Raw.Const.toList m.val))
source
theorem Std.DHashMap.Internal.Raw₀.Const.keys_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} (h : m.val.WF) :
(filter f m).val.keys.Perm (List.filter (fun (x : { x : α // x ∈ m.val.keys }) => match x with | ⟨x, h'⟩ => f x (get m x ⋯)) m.val.keys.attach).unattach
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey?_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k : α} (h : m.val.WF) :
(filter f m).getKey? k = (m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => f x (get m x ⋯)
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKey!_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited α] {f : α → β → Bool} {k : α} (h : m.val.WF) :
(filter f m).getKey! k = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => f x (get m x ⋯)).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.getKeyD_filter {α : Type u} [BEq α] [Hashable α] {β : Type v} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k fallback : α} (h : m.val.WF) :
(filter f m).getKeyD k fallback = ((m.getKey? k).pfilter fun (x : α) (h' : m.getKey? k = some x) => f x (get m x ⋯)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.map_id_equiv {α : Type u} {β : α → Type v} (m : Raw₀ α β) :
(map (fun (x : α) (v : β x) => v) m).val.Equiv m.val
source
theorem Std.DHashMap.Internal.Raw₀.map_map_equiv {α : Type u} {β : α → Type v} {γ : α → Type w} {δ : α → Type w'} (m : Raw₀ α β) {f : (a : α) → β a → γ a} {g : (a : α) → γ a → δ a} :
(map g (map f m)).val.Equiv (map (fun (k : α) (v : β k) => g k (f k v)) m).val
source
theorem Std.DHashMap.Internal.Raw₀.toList_map {α : Type u} {β : α → Type v} {γ : α → Type w} (m : Raw₀ α β) {f : (a : α) → β a → γ a} :
(map f m).val.toList.Perm (List.map (fun (p : (a : α) × β a) => ⟨p.fst, f p.fst p.snd⟩) m.val.toList)
source
theorem Std.DHashMap.Internal.Raw₀.keys_map {α : Type u} {β : α → Type v} {γ : α → Type w} (m : Raw₀ α β) {f : (a : α) → β a → γ a} :
(map f m).val.keys.Perm m.val.keys
source
theorem Std.DHashMap.Internal.Raw₀.filterMap_equiv_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} (h : m.val.WF) :
(filterMap (fun (k : α) (v : β k) => some (f k v)) m).val.Equiv (map f m).val
source
theorem Std.DHashMap.Internal.Raw₀.isEmpty_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} (h : m.val.WF) :
(map f m).val.isEmpty = m.val.isEmpty
source
theorem Std.DHashMap.Internal.Raw₀.contains_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} {k : α} (h : m.val.WF) :
(map f m).contains k = m.contains k
source
theorem Std.DHashMap.Internal.Raw₀.contains_of_contains_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} {k : α} (h : m.val.WF) :
(map f m).contains k = true → m.contains k = true
source
theorem Std.DHashMap.Internal.Raw₀.size_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} (h : m.val.WF) :
(map f m).val.size = m.val.size
source
theorem Std.DHashMap.Internal.Raw₀.get?_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → γ a} {k : α} (h : m.val.WF) :
(map f m).get? k = Option.map (f k) (m.get? k)
source
theorem Std.DHashMap.Internal.Raw₀.get_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → γ a} {k : α} (h : m.val.WF) {h' : (map f m).contains k = true} :
(map f m).get k h' = f k (m.get k ⋯)
source
theorem Std.DHashMap.Internal.Raw₀.get!_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → γ a} {k : α} [Inhabited (γ k)] (h : m.val.WF) :
(map f m).get! k = (Option.map (f k) (m.get? k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.getD_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [LawfulBEq α] {f : (a : α) → β a → γ a} {k : α} {fallback : γ k} (h : m.val.WF) :
(map f m).getD k fallback = (Option.map (f k) (m.get? k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.getKey?_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} {k : α} (h : m.val.WF) :
(map f m).getKey? k = m.getKey? k
source
theorem Std.DHashMap.Internal.Raw₀.getKey_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} {k : α} (h : m.val.WF) {h' : (map f m).contains k = true} :
(map f m).getKey k h' = m.getKey k ⋯
source
theorem Std.DHashMap.Internal.Raw₀.getKey!_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] [Inhabited α] {f : (a : α) → β a → γ a} {k : α} (h : m.val.WF) :
(map f m).getKey! k = m.getKey! k
source
theorem Std.DHashMap.Internal.Raw₀.getKeyD_map {α : Type u} {β : α → Type v} (m : Raw₀ α β) [BEq α] [Hashable α] {γ : α → Type w} [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} {k fallback : α} (h : m.val.WF) :
(map f m).getKeyD k fallback = m.getKeyD k fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_map' {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → γ} {k : α} (h : m.val.WF) :
get? (map f m) k = Option.pmap (fun (v : β) (h' : m.contains k = true) => f (m.getKey k h') v) (get? m k) ⋯

Variant of `get?_map` that holds with `EquivBEq` (i.e. without `LawfulBEq`).

source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_map {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] {f : α → β → γ} {k : α} (h : m.val.WF) :
get? (map f m) k = Option.map (f k) (get? m k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get?_map_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → γ} {k k' : α} (h : m.val.WF) :
m.getKey? k = some k' → get? (map f m) k = Option.map (f k') (get? m k)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get_map' {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → γ} {k : α} (h : m.val.WF) {h' : (map f m).contains k = true} :
get (map f m) k h' = f (m.getKey k ⋯) (get m k ⋯)

Variant of `get_map` that holds with `EquivBEq` (i.e. without `LawfulBEq`).

source
theorem Std.DHashMap.Internal.Raw₀.Const.get_map {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] {f : α → β → γ} {k : α} (h : m.val.WF) {h' : (map f m).contains k = true} :
get (map f m) k h' = f k (get m k ⋯)
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_map' {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited γ] {f : α → β → γ} {k : α} (h : m.val.WF) :
get! (map f m) k = (Option.pmap (fun (v : β) (h : m.contains k = true) => f (m.getKey k h) v) (get? m k) ⋯).get!

Variant of `get!_map` that holds with `EquivBEq` (i.e. without `LawfulBEq`).

source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_map {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] [Inhabited γ] {f : α → β → γ} {k : α} (h : m.val.WF) :
get! (map f m) k = (Option.map (f k) (get? m k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.get!_map_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] [Inhabited γ] {f : α → β → γ} {k k' : α} (h : m.val.WF) :
m.getKey? k = some k' → get! (map f m) k = (Option.map (f k') (get? m k)).get!
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_map' {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → γ} {k : α} {fallback : γ} (h : m.val.WF) :
getD (map f m) k fallback = (Option.pmap (fun (v : β) (h : m.contains k = true) => f (m.getKey k h) v) (get? m k) ⋯).getD fallback

Variant of `getD_map` that holds with `EquivBEq` (i.e. without `LawfulBEq`).

source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_map {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [LawfulBEq α] {f : α → β → γ} {k : α} {fallback : γ} (h : m.val.WF) :
getD (map f m) k fallback = (Option.map (f k) (get? m k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.getD_map_of_getKey?_eq_some {α : Type u} [BEq α] [Hashable α] {β : Type v} {γ : Type w} (m : Raw₀ α fun (x : α) => β) [EquivBEq α] [LawfulHashable α] {f : α → β → γ} {k k' : α} {fallback : γ} (h : m.val.WF) :
m.getKey? k = some k' → getD (map f m) k fallback = (Option.map (f k') (get? m k)).getD fallback
source
theorem Std.DHashMap.Internal.Raw₀.Const.toList_map {β : Type v} {γ : Type w} {α : Type u} (m : Raw₀ α fun (x : α) => β) {f : α → β → γ} :
(Raw.Const.toList (map f m).val).Perm (List.map (fun (p : α × β) => (p.fst, f p.fst p.snd)) (Raw.Const.toList m.val))