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₀
@[simp]
theorem
Std.DHashMap.Internal.Raw₀.isEmpty_eq_size_eq_zero
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
:
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
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
Internal implementation detail of the hash map
Equations
- One or more equations did not get rendered due to their size.
Instances For
theorem
Std.DHashMap.Internal.Raw₀.contains_of_isEmpty
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{a : α}
:
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}
:
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 : α}
:
theorem
Std.DHashMap.Internal.Raw₀.size_le_size_erase
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{k : α}
:
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}
:
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 : β}
:
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}
:
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 : β}
:
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 : β}
:
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 : β}
:
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 : β}
:
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}
:
theorem
Std.DHashMap.Internal.Raw₀.getKey?_of_isEmpty
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{a : α}
:
theorem
Std.DHashMap.Internal.Raw₀.getKey?_eq_none
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{a : α}
:
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}
:
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}
:
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}
:
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}
:
theorem
Std.DHashMap.Internal.Raw₀.getKeyD_of_isEmpty
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{a fallback : α}
:
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}
:
theorem
Std.DHashMap.Internal.Raw₀.getKeyD_eq_fallback
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{a fallback : α}
:
theorem
Std.DHashMap.Internal.Raw₀.getKeyD_erase_self
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{k fallback : α}
:
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 : α}
:
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}
:
theorem
Std.DHashMap.Internal.Raw₀.isEmpty_insertIfNew
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{k : α}
{v : β k}
:
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}
:
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}
:
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}
:
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}
:
This is a restatement of contains_insertIfNew
that is written to exactly match the proof
obligation in the statement of get_insertIfNew
.
theorem
Std.DHashMap.Internal.Raw₀.size_insertIfNew
{α : Type u}
{β : α → Type v}
(m : Raw₀ α β)
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
(h : m.val.WF)
{k : α}
{v : β k}
:
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}
:
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}
:
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}
:
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
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}
:
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 : β}
:
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}
:
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}
:
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)
:
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}
:
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}
:
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)
:
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)
:
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)
:
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}
:
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}
:
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)
:
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)
:
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)
:
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}
:
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}
:
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)
:
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)
:
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)
:
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)
:
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}
:
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}
:
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)
:
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)
:
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)
:
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)
:
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}
:
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}
:
@[simp]
@[simp]
theorem
Std.DHashMap.Internal.Raw₀.insertMany_empty_list_singleton
{α : Type u}
{β : α → Type v}
[BEq α]
[Hashable α]
{k : α}
{v : β k}
:
theorem
Std.DHashMap.Internal.Raw₀.contains_insertMany_empty_list
{α : Type u}
{β : α → Type v}
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
{l : List ((a : α) × β a)}
{k : α}
:
theorem
Std.DHashMap.Internal.Raw₀.get?_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.get_insertMany_empty_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 : (empty.insertMany l).val.contains k' = true}
:
theorem
Std.DHashMap.Internal.Raw₀.get!_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.getD_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.getKey?_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.getKey_insertMany_empty_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' : (empty.insertMany l).val.contains k' = true}
:
theorem
Std.DHashMap.Internal.Raw₀.getKey!_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.getKey!_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.getKeyD_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.size_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.size_insertMany_empty_list_le
{α : Type u}
{β : α → Type v}
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
{l : List ((a : α) × β a)}
:
theorem
Std.DHashMap.Internal.Raw₀.isEmpty_insertMany_empty_list
{α : Type u}
{β : α → Type v}
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
{l : List ((a : α) × β a)}
:
@[simp]
theorem
Std.DHashMap.Internal.Raw₀.Const.contains_insertMany_empty_list
{α : Type u}
[BEq α]
[Hashable α]
{β : Type v}
[EquivBEq α]
[LawfulHashable α]
{l : List (α × β)}
{k : α}
:
theorem
Std.DHashMap.Internal.Raw₀.Const.get_insertMany_empty_list_of_mem
{α : Type u}
[BEq α]
[Hashable α]
{β : Type v}
[LawfulBEq α]
{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 empty l).val.contains k' = true}
:
theorem
Std.DHashMap.Internal.Raw₀.Const.get!_insertMany_empty_list_of_mem
{α : Type u}
[BEq α]
[Hashable α]
{β : Type v}
[LawfulBEq α]
{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)
:
theorem
Std.DHashMap.Internal.Raw₀.Const.getD_insertMany_empty_list_of_mem
{α : Type u}
[BEq α]
[Hashable α]
{β : Type v}
[LawfulBEq α]
{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)
:
theorem
Std.DHashMap.Internal.Raw₀.Const.getKey?_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.Const.getKey_insertMany_empty_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 empty l).val.contains k' = true}
:
theorem
Std.DHashMap.Internal.Raw₀.Const.getKey!_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.Const.getKeyD_insertMany_empty_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)
:
theorem
Std.DHashMap.Internal.Raw₀.Const.getKey_insertManyIfNewUnit_empty_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 empty l).val.contains k' = true}
:
theorem
Std.DHashMap.Internal.Raw₀.Const.size_insertManyIfNewUnit_empty_list
{α : Type u}
[BEq α]
[Hashable α]
[EquivBEq α]
[LawfulHashable α]
{l : List α}
(distinct : List.Pairwise (fun (a b : α) => (a == b) = false) l)
:
@[simp]
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'
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
@[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 : β → β}
:
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)
:
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 : β → β}
:
@[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 : β → β}
:
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 : β → β}
:
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 : β → β}
: