chars
int64
40
24k
content_type
stringclasses
9 values
id
stringlengths
13
64
source
stringclasses
5 values
subset
stringclasses
31 values
text
stringlengths
40
24k
18,131
lean_file_chunk
4b02b92bcb3d6f0d9cd49f19284af5c05699e85c94e8dd224dd080bdea8710df
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez -/ module prelude public import Std.Data.DHashMap.Lemmas import all Std.Data.DHashMap.Lemmas public section /-! # Extensional dependent hash maps This file develops the ty...
23,975
lean_file_chunk
01be1fb17c0abd37cad71bd87219a16dba0ab0b92e64c189c3d2496d1e67f06c
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.ExtHashMap.Lemmas public import Std.Data.ExtHashSet.Basic @[expose] public section /-! # Extensional hash set lemmas This modu...
17,369
lean_file_chunk
2976bd9283a1c5b8491bda4d22483511d089e6131734d8d25c194e6ee8aa8415
lean_source_file
lean_toolchain_source_file_chunks
ExtHashMap.getKey_unitOfList_of_mem k_beq distinct mem theorem get!_ofList_of_contains_eq_false [EquivBEq α] [LawfulHashable α] [Inhabited α] {l : List α} {k : α} (contains_eq_false : l.contains k = false) : get! (ofList l) k = default := ExtHashMap.getKey!_unitOfList_of_contains_eq_false contains_eq_fal...
9,938
lean_file_chunk
e7fc56c77426c4ace54ab00c70b5d284746c89a28bacc21ebec82820e916e981
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez -/ module prelude public import Std.Data.ExtHashMap.Basic @[expose] public section /-! # Extensional hash sets This module develops the type `Std.ExtHashSet` of extensiona...
510
lean_file_chunk
ff1d7eeff0d14feecdb6535bf6af48fe41ec1c267d9013cc86d713fa181eb94c
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.HashMap.DecidableEquiv public import Std.Data.HashSet.Basic public section /-! # Decidable equivalence for `HashSet` -/ na...
23,956
lean_file_chunk
d4bae6e2f2cb254008866420f22806c1da281f47ae466ad5d2b64c002caed5a1
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.HashMap.Lemmas public import Std.Data.HashSet.Basic @[expose] public section /-! # Hash set lemmas This module contains lemmas...
23,989
lean_file_chunk
0108b4629f77a4dfbe67fab187b4c58378bc3af8f5248ac4a6dddd3aea9c8036
lean_source_file
lean_toolchain_source_file_chunks
k ∈ insertMany m l ↔ k ∈ m ∨ l.contains k := HashMap.mem_insertManyIfNewUnit_list theorem mem_of_mem_insertMany_list [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} (contains_eq_false : l.contains k = false) : k ∈ insertMany m l → k ∈ m := HashMap.mem_of_mem_insertManyIfNewUnit_list contains_eq_false ...
8,850
lean_file_chunk
60fa256d8e8090c2ef3f3fe012e17c39c9b5ab68848a4d18a85691660861efbe
lean_source_file
lean_toolchain_source_file_chunks
HashMap.getKey?_unitOfList_of_mem k_beq distinct mem theorem get_ofList_of_mem [EquivBEq α] [LawfulHashable α] {l : List α} {k k' : α} (k_beq : k == k') (distinct : l.Pairwise (fun a b => (a == b) = false)) (mem : k ∈ l) {h} : get (ofList l) k' h = k := HashMap.getKey_unitOfList_of_mem k_beq dist...
11,811
lean_file_chunk
57804b8e7764e70b988bd355c5057b35c47552db66924a475b4c4885cf701bef
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.HashMap.Basic @[expose] public section /-! # Hash sets This module develops the type `Std.HashSet` of hash sets. Lemmas about...
23,976
lean_file_chunk
53efec44981e5629a3565b7dab1a7fdd460fbe00bd90829412b6292c813a75cf
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.HashMap.RawLemmas public import Std.Data.HashSet.Raw @[expose] public section /-! # Hash set lemmas This module contains lemma...
23,949
lean_file_chunk
7f74f25efe4e294d95ef10c68325f3e9f7ab08bf17b2eb29da870a8129f9eace
lean_source_file
lean_toolchain_source_file_chunks
theorem any_eq_false_iff_forall_mem [LawfulBEq α] {p : α → Bool} (h : m.WF) : m.any p = false ↔ ∀ (a : α), a ∈ m → p a = false := by simpa using @HashMap.Raw.any_eq_false_iff_forall_mem_getElem _ _ _ _ _ _ (fun a b => p a) h.out @[simp] theorem all_toList [LawfulHashable α] [EquivBEq α] {p : α → Bool} (h :...
17,207
lean_file_chunk
63d72811850d0b02687d3c7f0b4b2f2231178f712e356caae8bcb03932de898d
lean_source_file
lean_toolchain_source_file_chunks
theorem mem_diff_iff [EquivBEq α] [LawfulHashable α] (h₁ : m₁.WF) (h₂ : m₂.WF) {k : α} : k ∈ m₁ \ m₂ ↔ k ∈ m₁ ∧ k ∉ m₂ := @HashMap.Raw.mem_diff_iff _ _ _ _ m₁.inner m₂.inner _ _ h₁.out h₂.out k theorem not_mem_diff_of_not_mem_left [EquivBEq α] [LawfulHashable α] (h₁ : m₁.WF) (h₂ : m₂.WF) {k : α} (not...
13,777
lean_file_chunk
2c183a46ed1c2b717acd7c060838dafba4eeba5f87b5f218f8bddc50383ab485
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.HashMap.Raw @[expose] public section /-! # Hash sets with unbundled well-formedness invariant This module develops the type `S...
1,808
lean_file_chunk
2d3cd8ecd1321cc9abb617d666b336d531f94d567f3e8b7d9a2c01a92e538234
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude import Std.Data.DHashMap.IteratorLemmas import all Std.Data.HashMap.IteratorLemmas public import Std.Data.HashSet.Iterator import all Std.Data.HashSet....
668
lean_file_chunk
d5064e07035040f73dd6cb0a7552476f7b9079c82eac987a783c7653939a748e
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.HashMap.RawDecidableEquiv public import Std.Data.HashSet.Raw public section /-! # Decidable equivalence for `HashSet.Raw` -...
952
lean_file_chunk
01732e53ffd44212d72eabe4ede6366f0e4dfedd58ae9dcb653354c5c382cdb3
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude public import Std.Data.HashMap.Iterator public import Std.Data.HashSet.Basic public import Std.Data.HashSet.Raw import Init.Data.Iterators.Combinators.F...
1,518
lean_file_chunk
733ffb75a8e0f99078d2bca75b5715d5861a42c88da62ad43c83590edda062ee
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.Internal.Raw public import Std.Data.DHashMap.Internal.WF public section /-! # Additional dependent hash map operations...
699
lean_file_chunk
0cab538a0152d64e67c078ccaa13757eeb0efcdabcf68999577191a05c943db4
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.DHashMap.Internal.RawLemmas public section /-! # Decidable equivalence for `DHashMap` -/ open Std.DHashMap.Internal names...
23,979
lean_file_chunk
27bf27845dd57dbd9a36d0f2add6ea872e627e7d9cfafd871d6065f5d936ed95
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.Internal.RawLemmas import all Std.Data.DHashMap.Basic public import Std.Data.DHashMap.AdditionalOperations import all St...
23,974
lean_file_chunk
6389fc14d681593695b4026b67e9178dc38a2612739dc845b35e9ad112d4154a
lean_source_file
lean_toolchain_source_file_chunks
m.getD a fallback = (m.get? a).getD fallback := Raw₀.getD_eq_getD_get? ⟨m.1, _⟩ m.2 theorem get_eq_getD [LawfulBEq α] {a : α} {fallback : β a} {h} : m.get a h = m.getD a fallback := Raw₀.get_eq_getD ⟨m.1, _⟩ m.2 theorem get!_eq_getD_default [LawfulBEq α] {a : α} [Inhabited (β a)] : m.get! a = m.getD a def...
23,973
lean_file_chunk
0c2c662670c9f45c5218d90d1447a8e42d5aefaa912cd409f7dfe251b4d78c4d
lean_source_file
lean_toolchain_source_file_chunks
m.toList.length = m.size := Raw₀.length_toList ⟨m.1, m.2.size_buckets_pos⟩ m.2 @[simp, grind =] theorem isEmpty_toList [EquivBEq α] [LawfulHashable α] : m.toList.isEmpty = m.isEmpty := Raw₀.isEmpty_toList ⟨m.1, m.2.size_buckets_pos⟩ m.2 @[simp, grind =] theorem mem_toList_iff_get?_eq_some [LawfulBEq α] {k...
23,997
lean_file_chunk
b8317acb26b92533eba2448d6355f53078fd7c61def0c7c26ef18645ad2cacd9
lean_source_file
lean_toolchain_source_file_chunks
theorem getKey_insertMany_list_of_mem [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k k' : α} (k_beq : k == k') (distinct : l.Pairwise (fun a b => (a.1 == b.1) = false)) (mem : k ∈ l.map Sigma.fst) {h} : (m.insertMany l).getKey k' h = k := Raw₀.getKey_insertMany_list_of_mem ⟨m.1,...
23,910
lean_file_chunk
4e9b2648af35c7215d233a249dde095c3899b2931431de4cde3cb502ceb06fae
lean_source_file
lean_toolchain_source_file_chunks
exact @Raw₀.get_inter _ _ _ _ ⟨m₁.1, _⟩ ⟨m₂.1, _⟩ _ m₁.2 m₂.2 k h_mem /- getD -/ theorem getD_inter [LawfulBEq α] {k : α} {fallback : β k} : (m₁ ∩ m₂).getD k fallback = if k ∈ m₂ then m₁.getD k fallback else fallback := @Raw₀.getD_inter _ _ _ _ ⟨m₁.1, m₁.2.size_buckets_pos⟩ ⟨m₂.1, m₂.2.size_buckets_pos⟩ _ m₁...
23,938
lean_file_chunk
7876e5985ab426ede1337eb9a24cfbb90d62f84a25f608cd3e9a8b1aeae8fe7a
lean_source_file
lean_toolchain_source_file_chunks
@Raw₀.size_diff_add_size_inter_eq_size_left _ _ _ _ ⟨m₁.1, m₁.2.size_buckets_pos⟩ ⟨m₂.1, m₂.2.size_buckets_pos⟩ _ _ m₁.2 m₂.2 /- isEmpty -/ @[simp] theorem isEmpty_diff_left [EquivBEq α] [LawfulHashable α] (h : m₁.isEmpty) : (m₁ \ m₂).isEmpty = true := @Raw₀.isEmpty_diff_left _ _ _ _ ⟨m₁.1, m₁.2.size_buckets_pos...
23,965
lean_file_chunk
25da41598798bd7c2af63e272c979f63d5c49b950ebfc660cd92468de2adfce4
lean_source_file
lean_toolchain_source_file_chunks
theorem ofList_eq_insertMany_empty {l : List ((a : α) × β a)} : ofList l = insertMany (∅ : DHashMap α β) l := (rfl) @[simp, grind =] theorem contains_ofList [EquivBEq α] [LawfulHashable α] {l : List ((a : α) × β a)} {k : α} : (ofList l).contains k = (l.map Sigma.fst).contains k := Raw₀.contains_insertMan...
23,941
lean_file_chunk
36b662da21698e1db4917267c308d994550bcae1a03015468c1a701564d82b88
lean_source_file
lean_toolchain_source_file_chunks
simp only [getKey?_alter, beq_self_eq_true, ↓reduceIte] @[grind =] theorem getKey!_alter [LawfulBEq α] [Inhabited α] {k k' : α} {f : Option (β k) → Option (β k)} : (m.alter k f).getKey! k' = if k == k' then if (f (m.get? k)).isSome then k else default else m.getKey! k' := by simp only...
23,995
lean_file_chunk
ac3ca50373c0d86096b3e175e261977cda85a6c53e390ba6ce49620e8b50fe56
lean_source_file
lean_toolchain_source_file_chunks
⟨Raw₀.filterMap_equiv_congr ⟨m₁.1, m₁.2.size_buckets_pos⟩ ⟨m₂.1, m₂.2.size_buckets_pos⟩ h.1⟩ theorem of_forall_get?_eq [LawfulBEq α] (h : ∀ k, m₁.get? k = m₂.get? k) : m₁ ~m m₂ := ⟨Raw₀.equiv_of_forall_get?_eq ⟨m₁.1, _⟩ ⟨m₂.1, _⟩ m₁.2 m₂.2 h⟩ section Const variable {β : Type v} {m₁ m₂ : DHashMap α fun _ => β} the...
12,596
lean_file_chunk
a195374cbbd4be337831ded72b6a367a83328194456969e264bf0caf33327753
lean_source_file
lean_toolchain_source_file_chunks
{f : α → β → Bool} : (m.filter f).isEmpty = true ↔ ∀ (k : α) (h : k ∈ m), f (m.getKey k h) (Const.get m k h) = false := Raw₀.Const.isEmpty_filter_iff ⟨m.1, _⟩ m.2 theorem isEmpty_filter_eq_false_iff [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} : (m.filter f).isEmpty = false ↔ ∃ (k : α) ...
16,976
lean_file_chunk
27a446110426813b38ddf7388177061b47232557f97ac46b3db87357a5c82529
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.Raw import all Std.Data.DHashMap.Raw public section /-! # Dependent hash maps This file develops the type `Std.DHashM...
23,954
lean_file_chunk
c3be9a7df009f84c1fc13f917f4dc821cc886ba2bfecc75f7cad33fc7ef82679
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.Internal.Raw public import Std.Data.DHashMap.Internal.RawLemmas import all Std.Data.DHashMap.Raw import Init.ByCases imp...
23,921
lean_file_chunk
dc9844a5c5c3526569eabf237704d58961a2dc5f8d2363bb40f00eba55401fb1
lean_source_file
lean_toolchain_source_file_chunks
simpa [← contains_iff_mem] using get!_eq_default_of_contains_eq_false h @[grind =] theorem get!_erase [EquivBEq α] [LawfulHashable α] [Inhabited β] (h : m.WF) {k a : α} : get! (m.erase k) a = if k == a then default else get! m a := by simp_to_raw using Raw₀.Const.get!_erase @[simp] theorem get!_erase_self [Equi...
23,935
lean_file_chunk
4f9367e5160899bdd1ef4deda7e93ad57811e80de47932c8cd3c199beb6689e5
lean_source_file
lean_toolchain_source_file_chunks
get? (m.insertIfNew k v) a = if k == a ∧ ¬k ∈ m then some v else get? m a := by simp only [mem_iff_contains, Bool.not_eq_true] simp_to_raw using Raw₀.Const.get?_insertIfNew @[grind =] theorem get_insertIfNew [EquivBEq α] [LawfulHashable α] (h : m.WF) {k a : α} {v : β} {h₁} : get (m.insertIfNew k v) a h₁ = ...
23,951
lean_file_chunk
7a5ae3600ad8ced3388e9bd0feebe0695baae25754db7ed44ecb4f384eac4496
lean_source_file
lean_toolchain_source_file_chunks
m.any p = true ↔ ∃ (a : α) (h : m.contains a), p (m.getKey a h) (Const.get m a h) := by simp_to_raw using Raw₀.Const.any_eq_true ⟨m, h.size_buckets_pos⟩ theorem any_eq_true_iff_exists_mem_getKey_get [LawfulHashable α] [EquivBEq α] {p : (_ : α) → β → Bool} (h : m.WF) : m.any p = true ↔ ∃ (a : α) (h : a ∈ m), ...
23,962
lean_file_chunk
4f94c506286fd1db3f491f907a45c07a37332a7ae287050fee9c99f2c92be881
lean_source_file
lean_toolchain_source_file_chunks
theorem getKeyD_union_of_not_mem_right [EquivBEq α] [LawfulHashable α] (h₁ : m₁.WF) (h₂ : m₂.WF) {k fallback : α} (mem : ¬k ∈ m₂) : (m₁ ∪ m₂).getKeyD k fallback = m₁.getKeyD k fallback := by rw [← contains_eq_false_iff_not_mem] at mem revert mem simp only [Union.union] simp_to_raw intro mem apply Ra...
23,973
lean_file_chunk
3181cb3693ba367c1238934a3726775f4d2643e2006c04f41d5000025dde0101
lean_source_file
lean_toolchain_source_file_chunks
simp_to_raw using Raw₀.contains_diff /- mem -/ @[simp] theorem mem_diff_iff [EquivBEq α] [LawfulHashable α] (h₁ : m₁.WF) (h₂ : m₂.WF) {k : α} : k ∈ m₁ \ m₂ ↔ k ∈ m₁ ∧ k ∉ m₂ := by simp only [SDiff.sdiff, Membership.mem] simp_to_raw using @Raw₀.contains_diff_iff _ _ _ _ ⟨m₁, _⟩ ⟨m₂, _⟩ _ _ theorem not_mem_diff...
23,966
lean_file_chunk
66712f0155faf8db0c9394386e3740de936dd74ec561f2cb67199071ac7a95eb
lean_source_file
lean_toolchain_source_file_chunks
[Inhabited β] (h : m.WF) {l : List (α × β)} {k : α} (contains_eq_false : (l.map Prod.fst).contains k = false) : get! (insertMany m l) k = get! m k := by simp_to_raw using Raw₀.Const.get!_insertMany_list_of_contains_eq_false theorem get!_insertMany_list_of_mem [EquivBEq α] [LawfulHashable α] [Inhabited β] (h ...
23,947
lean_file_chunk
593cddea04d6ade6b3f4488b3a0080935e83e36ed7b72faa3b02a0343682eb9e
lean_source_file
lean_toolchain_source_file_chunks
simp_to_raw using Raw₀.Const.getKeyD_insertMany_emptyWithCapacity_list_of_mem theorem size_ofList [EquivBEq α] [LawfulHashable α] {l : List (α × β)} (distinct : l.Pairwise (fun a b => (a.1 == b.1) = false)) : (ofList l).size = l.length := by simp_to_raw using Raw₀.Const.size_insertMany_emptyWithCapacity_list...
23,993
lean_file_chunk
2c7b093c1b10c53c100aeeb6bba6640c3a15aa0f16f74d8d6a4f246f4d64e6b9
lean_source_file
lean_toolchain_source_file_chunks
theorem isEmpty_modify [LawfulBEq α] {k : α} {f : β k → β k} (h : m.WF) : (m.modify k f).isEmpty = m.isEmpty := by simp_to_raw using Raw₀.isEmpty_modify @[simp, grind =] theorem contains_modify [LawfulBEq α] {k k': α} {f : β k → β k} (h : m.WF) : (m.modify k f).contains k' = m.contains k' := by simp_to_raw...
23,968
lean_file_chunk
59534e171c255b7c7b9c0b4fe71560cc0045fdf25a66b40f79a94ec1991b1f2a
lean_source_file
lean_toolchain_source_file_chunks
← contains_eq_isSome_get?, get_get?, h] theorem contains_of_contains_filterMap [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → Option (γ a)} {k : α} (h : m.WF) : (m.filterMap f).contains k = true → m.contains k = true := by simp_to_raw using Raw₀.contains_of_contains_filterMap theorem mem_of_mem_filter...
6,619
lean_file_chunk
50a764e679111686a62af0e666e29c6deb60f7c65db57cfbefdc2fe7d26b39f1
lean_source_file
lean_toolchain_source_file_chunks
theorem isEmpty_map [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} (h : m.WF) : (m.map f).isEmpty = m.isEmpty := by simp_to_raw using Raw₀.isEmpty_map @[grind =] theorem contains_map [EquivBEq α] [LawfulHashable α] {f : (a : α) → β a → γ a} {k : α} (h : m.WF) : (m.map f).contains k = m.con...
3,831
lean_file_chunk
a4852fefce75393874cb0ad16654488f1b88e9460f21a25d06aed0fa07541517
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2018 Microsoft Corporation. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Leonardo de Moura, Mario Carneiro, Markus Himmel -/ module prelude public import Std.Data.DHashMap.Internal.AssocList.Basic public import Init.Data.Array.Basic public section ...
23,999
lean_file_chunk
1b7c11ce03459a163029ffa8eae80ed5c00fea014b82f63f417724eac74e41ff
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Init.Data.LawfulHashable public import Std.Data.DHashMap.Internal.Defs import all Std.Data.DHashMap.Internal.Defs public section /-! # D...
11,554
lean_file_chunk
50f91879126f9122d19c10103589117215edb4be8fa917db7b9fa3ef5b098479
lean_source_file
lean_toolchain_source_file_chunks
@[inline, inherit_doc Raw.toList] def Const.toList {β : Type v} (m : Raw α (fun _ => β)) : List (α × β) := Internal.foldRev (fun acc k v => ⟨k, v⟩ :: acc) [] m instance [Repr α] [(a : α) → Repr (β a)] : Repr (Raw α β) where reprPrec m prec := Repr.addAppParen ("Std.DHashMap.Raw.ofList " ++ reprArg m.toList) pr...
5,132
lean_file_chunk
707019b068783df74043166fc6554cd17adf6af0e46a4484127d959a4469506e
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude public import Std.Data.Iterators public import Std.Data.DHashMap.Iterator import all Std.Data.DHashMap.Basic import all Std.Data.DHashMap.Raw import all...
651
lean_file_chunk
fcaba177403d5f69a7c423e85f38cd8e57d19ca77887b37f80ec9579bedba1d7
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.DHashMap.Internal.RawLemmas public section /-! # Decidable equivalence for `DHashMap.Raw` -/ open Std.DHashMap.Internal n...
2,226
lean_file_chunk
213606e6330a1f7e4b41215f0eaec0c8de87093790c15273f14e2cc01c99f2f7
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude public import Std.Data.Iterators.Producers.Array public import Init.Data.Iterators.Combinators.FlatMap public import Std.Data.DHashMap.Basic public impo...
2,097
lean_file_chunk
b7ab90ba0407cdd69ea95a4aed43b01312828945e24f8f3d3ae48b2af513e97a
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Init.Data.Order.Ord import Init.RCases @[expose] public section set_option autoImplicit false universe u namespace Std.Internal class...
23,960
lean_file_chunk
d28ae12e23090bc66d5301850c481dcb8b26d6d1c6bdd2e706000350e2df6490
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez -/ module prelude public import Std.Data.ExtHashMap.Basic import all Std.Data.ExtDHashMap.Basic public import Std.Data.ExtDHashMap.Lemmas @[expose] public section /-! ...
23,969
lean_file_chunk
2bd5fadb1b3a02b3b7b302b193afff387ec5b46009dcb55f824020b760bcfea6
lean_source_file
lean_toolchain_source_file_chunks
(h : k == k') : m.getKeyD k fallback = m.getKeyD k' fallback := ExtDHashMap.getKeyD_congr h theorem getKeyD_eq_of_contains [LawfulBEq α] {k fallback : α} (h : m.contains k) : m.getKeyD k fallback = k := ExtDHashMap.getKeyD_eq_of_contains h theorem getKeyD_eq_of_mem [LawfulBEq α] {k fallback : α} (h : k ∈ m) :...
23,993
lean_file_chunk
ebc1212d0a5941bc5448e56396c095924d3cf33194d35af4cc1988c642a97154
lean_source_file
lean_toolchain_source_file_chunks
ExtDHashMap.Const.contains_ofList @[simp, grind =] theorem mem_ofList [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} : k ∈ ofList l ↔ (l.map Prod.fst).contains k := ExtDHashMap.Const.mem_ofList theorem getElem?_ofList_of_contains_eq_false [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k...
23,956
lean_file_chunk
a3e2b00c3559a1939525c0bb3a750fa6ff55b9141f71f4d47c60f95e596ee6dd
lean_source_file
lean_toolchain_source_file_chunks
theorem get!_inter_of_not_mem_right [EquivBEq α] [LawfulHashable α] {k : α} [Inhabited β] (not_mem : k ∉ m₂) : (m₁ ∩ m₂).get! k = default := ExtDHashMap.Const.get!_inter_of_not_mem_right not_mem @[deprecated getElem!_inter_of_not_mem_left (since := "2025-12-10")] theorem get!_inter_of_not_mem_left [EquivBEq ...
16,964
lean_file_chunk
af5fbb5bf5d88d5f9ae6b8c843d8c76e1f91374607d14cd24ec0ff0f88160f20
lean_source_file
lean_toolchain_source_file_chunks
(h : ∀ k : α, m₁[k]? = m₂[k]?) : m₁ = m₂ := ext (ExtDHashMap.Const.ext_get? h) theorem ext_getKey?_unit [EquivBEq α] [LawfulHashable α] {m₁ m₂ : ExtHashMap α Unit} (h : ∀ k, m₁.getKey? k = m₂.getKey? k) : m₁ = m₂ := ext (ExtDHashMap.Const.ext_getKey?_unit h) theorem ext_contains_unit [LawfulBEq α] {m₁ m₂ ...
10,860
lean_file_chunk
8f157ab533ead11e7b6eb06cea30928791f008c78d4468d831adfbf65dd8be1f
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez -/ module prelude public import Std.Data.ExtDHashMap.Basic @[expose] public section set_option linter.missingDocs true set_option autoImplicit false /-! # Extensional hash...
1,324
lean_file_chunk
fcc19a13fc5dbe1bd10f1e16f60daa807aa37ce48f1e614dacba5ae3eca189c4
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.AdditionalOperations public import Std.Data.HashMap.Basic public import Std.Data.HashMap.Raw @[expose] public section ...
548
lean_file_chunk
1adbde939a1f30b3e1d955c3387afbf78a3e123eb416a8031f459d2a793bd06a
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.DHashMap.DecidableEquiv public import Std.Data.HashMap.Basic public section /-! # Decidable equivalence for `HashMap` -/ n...
23,963
lean_file_chunk
eb032e6b637abd732e8dfcc9176b8350d0d94006ff9ba56b5ea5966999f60723
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.Lemmas public import Std.Data.HashMap.AdditionalOperations import all Std.Data.DHashMap.Basic import Init.Data.List.Pair...
23,993
lean_file_chunk
93e78d67cf9f41cf739f158a344d3a7ae495671437cdb1c965777ca9545d41fe
lean_source_file
lean_toolchain_source_file_chunks
{a : α} : m.contains a = false → m.getKey! a = default := DHashMap.getKey!_eq_default_of_contains_eq_false theorem getKey!_eq_default [EquivBEq α] [LawfulHashable α] [Inhabited α] {a : α} : ¬a ∈ m → m.getKey! a = default := DHashMap.getKey!_eq_default @[grind =] theorem getKey!_erase [EquivBEq α] [LawfulHasha...
23,972
lean_file_chunk
4b55d5b949b6548f182c21b1ce4492b0daf41e1016a9af6f84317a44cec8cfff
lean_source_file
lean_toolchain_source_file_chunks
{l : List (α × β)} {k : α} (contains_eq_false : (l.map Prod.fst).contains k = false) : (insertMany m l)[k]? = m[k]? := DHashMap.Const.get?_insertMany_list_of_contains_eq_false contains_eq_false theorem getElem?_insertMany_list_of_mem [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : ...
23,995
lean_file_chunk
e55bb53d18da6fed274420d7cb5ae7412c848521ef142ff97635ffef55dcda48
lean_source_file
lean_toolchain_source_file_chunks
theorem getD_inter_of_not_mem_left [EquivBEq α] [LawfulHashable α] {k : α} {fallback : β} (not_mem : k ∉ m₁) : (m₁ ∩ m₂).getD k fallback = fallback := @DHashMap.Const.getD_inter_of_not_mem_left _ _ _ _ m₁.inner m₂.inner _ _ k fallback not_mem /- getElem! -/ theorem getElem!_inter [EquivBEq α] [LawfulHashable...
23,932
lean_file_chunk
4a873ad58715ed3d06242477194998e0fa220851f8b9f881097a21a7ba773ef3
lean_source_file
lean_toolchain_source_file_chunks
theorem getKeyD_insertManyIfNewUnit_list_of_mem [EquivBEq α] [LawfulHashable α] {l : List α} {k fallback : α} (mem : k ∈ m) : getKeyD (insertManyIfNewUnit m l) k fallback = getKeyD m k fallback := DHashMap.Const.getKeyD_insertManyIfNewUnit_list_of_mem mem theorem size_insertManyIfNewUnit_list [EquivBEq α] [L...
23,980
lean_file_chunk
484e21017cede120f0251863b1cdccfc3d10524dc623c6dc02c35ebd1154e177
lean_source_file
lean_toolchain_source_file_chunks
{f : β → β} : (modify m k f).getKeyD k fallback = if k ∈ m then k else fallback := DHashMap.Const.getKeyD_modify_self end Modify namespace Equiv variable {m m₁ m₂ m₃ : HashMap α β} @[refl, simp] theorem refl (m : HashMap α β) : m ~m m := ⟨.rfl⟩ theorem rfl : m ~m m := ⟨.rfl⟩ @[symm] theorem symm : m₁ ~m m₂ → m₂ ~...
1,507
lean_file_chunk
7860dd70570937134a9f71e273bbaf258ec66ece03246aa154073d4dcfaf93af
lean_source_file
lean_toolchain_source_file_chunks
DHashMap.Const.getD_map /-- Variant of `getD_map` that holds with `EquivBEq` (i.e. without `LawfulBEq`). -/ theorem getD_map' [EquivBEq α] [LawfulHashable α] {f : α → β → γ} {k : α} {fallback : γ} : (m.map f).getD k fallback = (m[k]?.pmap (fun v h => f (m.getKey k h) v) (fun _ h' => mem_iff_isSom...
12,950
lean_file_chunk
f760af98a44c280d64d94233e8d58cb039098c21cad59adc70628bc8da4b25ae
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.Basic public import Init.Data.List.Impl @[expose] public section set_option linter.missingDocs true set_option autoImp...
23,998
lean_file_chunk
5713c248d84a46adac21482d6aed7c6d3c2c9fb49f1ca0c0adffa8d199535f92
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.RawLemmas public import Std.Data.HashMap.Raw import all Std.Data.DHashMap.Raw import Init.Data.List.Pairwise @[expose] ...
23,988
lean_file_chunk
84266466b6247b94341bdf83a6e692eea00603d5d0b6aca3c612b067e44a900b
lean_source_file
lean_toolchain_source_file_chunks
theorem getKey!_emptyWithCapacity [Inhabited α] {a : α} {c} : (emptyWithCapacity c : Raw α β).getKey! a = default := DHashMap.Raw.getKey!_emptyWithCapacity @[simp, grind =] theorem getKey!_empty [Inhabited α] {a : α} : (∅ : Raw α β).getKey! a = default := DHashMap.Raw.getKey!_empty theorem getKey!_of_isEmpty [Equ...
23,911
lean_file_chunk
875b5c4d14b8af43b38940594d8c34216bc12d9817e540df73465005245ee270
lean_source_file
lean_toolchain_source_file_chunks
m.all p = true ↔ ∀ (a : α) (h : a ∈ m), p a (m[a]'h) := DHashMap.Raw.Const.all_eq_true_iff_forall_contains_get h.out theorem all_eq_false_iff_exists_mem_getKey_getElem [EquivBEq α] [LawfulHashable α] {p : α → β → Bool} (h : m.WF) : m.all p = false ↔ ∃ (a : α) (h : a ∈ m), p (m.getKey a h) (m[a]'h) = false :=...
23,987
lean_file_chunk
615f31cf8f269f774eb9515615d0d6c1c84a9b8b138a183c88e1b01948f703ef
lean_source_file
lean_toolchain_source_file_chunks
⟨@DHashMap.Raw.Equiv.inter_left _ _ _ _ m₁.inner m₂.inner m₃.inner _ _ h₁.out h₂.out h₃.out equiv.1⟩ theorem Equiv.inter_right {m₃ : Raw α β} [EquivBEq α] [LawfulHashable α] (h₁ : m₁.WF) (h₂ : m₂.WF) (h₃ : m₃.WF) (equiv : m₂ ~m m₃) : (m₁ ∩ m₂) ~m (m₁ ∩ m₃) := ⟨@DHashMap.Raw.Equiv.inter_right _ _ _ _ m₁.inner...
23,976
lean_file_chunk
bbd4f9ab22182a9a137ebaee02e5728f557a003353907f1f3fa00e45dc646081
lean_source_file
lean_toolchain_source_file_chunks
@DHashMap.Raw.getKey!_diff _ _ _ _ m₁.inner m₂.inner _ _ _ h₁.out h₂.out k theorem getKey!_diff_of_not_mem_right [EquivBEq α] [LawfulHashable α] [Inhabited α] (h₁ : m₁.WF) (h₂ : m₂.WF) {k : α} (not_mem : k ∉ m₂) : (m₁ \ m₂).getKey! k = m₁.getKey! k := @DHashMap.Raw.getKey!_diff_of_not_mem_right _ _ _ _ m₁.in...
23,983
lean_file_chunk
de791bbccf0db68d32c7df63fc5ba7ca5c6ef740427d76d93dbf01c26cc1edb3
lean_source_file
lean_toolchain_source_file_chunks
DHashMap.Raw.Const.isEmpty_alter_eq_isEmpty_erase h.out @[simp, grind =] theorem isEmpty_alter [EquivBEq α] [LawfulHashable α] {k : α} {f : Option β → Option β} (h : m.WF) : (alter m k f).isEmpty = ((m.isEmpty || (m.size == 1 && m.contains k)) && (f m[k]?).isNone) := DHashMap.Raw.Const.isEmpty_alter h.out @[gri...
16,762
lean_file_chunk
5079a4fb5fc0ee80726a50a6b3ffa76b772fd259cc23624d730aad2d0a9d6279
lean_source_file
lean_toolchain_source_file_chunks
(m[k]'(mem_of_mem_filterMap h h'))).isSome := DHashMap.Raw.Const.isSome_apply_of_mem_filterMap h.out @[simp] theorem getElem_filterMap [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} {g} (h : m.WF) : (m.filterMap f)[k]'g = (f (m.getKey k (mem_of_mem_filterMap h g)) (m[k]'(mem_of_...
15,097
lean_file_chunk
85b0f4abbd7b0980d4ed82db60d1414d3bbc97b268b533eb63bc10d52499a0f4
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel -/ module prelude public import Std.Data.DHashMap.Raw @[expose] public section set_option linter.missingDocs true set_option autoImplicit false /-! # Hash maps with un...
5,122
lean_file_chunk
7e5bfb36613c8b79096fbd87bdf3d9d274490945c422d7b1008cc8a26a059fac
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude import Init.Data.Iterators.Lemmas.Combinators import Std.Data.DHashMap.IteratorLemmas public import Std.Data.HashMap.Iterator import all Std.Data.HashM...
708
lean_file_chunk
140da1e603befa6c1b56abe122a082691a4af4721902d70cb8761e62029af6fb
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.DHashMap.RawDecidableEquiv public import Std.Data.HashMap.Raw public section /-! # Decidable equivalence for `HashMap.Raw` ...
2,050
lean_file_chunk
372a779a9bd81906f856d94f44cde7f318113a9b312ab4291a7ffa7bbfff3712
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude public import Std.Data.DHashMap.Iterator public import Std.Data.HashMap.Basic public import Std.Data.HashMap.Raw import Init.Data.Iterators.Combinators....
23,999
lean_file_chunk
7efd2007b5a8733f753b1b135ef800300d55be1e1aba0b2ef8ce6defc2225871
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez, Markus Himmel, Paul Reichert -/ module prelude public import Std.Data.ExtTreeMap.Lemmas public import Std.Data.ExtTreeSet.Basic @[expose] public section /-! # Tree set lem...
23,966
lean_file_chunk
23777dc9e81d3c8a9dd6e2902ea2d51dc7e4663e093b47d87d95786e40fa3335
lean_source_file
lean_toolchain_source_file_chunks
theorem get?_diff_of_not_mem_right [TransCmp cmp] {k : α} (not_mem : k ∉ t₂) : (t₁ \ t₂).get? k = t₁.get? k := ExtTreeMap.getKey?_diff_of_not_mem_right not_mem theorem get?_diff_of_not_mem_left [TransCmp cmp] {k : α} (not_mem : k ∉ t₁) : (t₁ \ t₂).get? k = none := ExtTreeMap.getKey?_diff_of_not_mem...
22,998
lean_file_chunk
7cca5947357ecf566193bc3e395070448765c9802658baa8e45aa9cbdbef21ab
lean_source_file
lean_toolchain_source_file_chunks
ExtTreeMap.minKey!_insertIfNew_le_self @[grind =] theorem contains_min! [TransCmp cmp] [Inhabited α] (he : t ≠ ∅) : t.contains t.min! := ExtTreeMap.contains_minKey! (mt ext he) theorem min!_mem [TransCmp cmp] [Inhabited α] (he : t ≠ ∅) : t.min! ∈ t := ExtTreeMap.minKey!_mem (mt ext he) grind_pattern min!...
20,106
lean_file_chunk
4a24161ea0441cd9556520c201d4acae20654d2e85a17bb95c357ae79d84d2c0
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez, Markus Himmel, Paul Reichert -/ module prelude public import Std.Data.ExtTreeMap.Basic @[expose] public section /-! # Extensional tree sets This file develops the type `S...
1,743
lean_file_chunk
deedf095fec0417479f7f5c886205ae464fab74e8017ad439abbed140add27c4
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude public import Std.Data.TreeSet.Raw.Basic public import Std.Data.TreeMap.AdditionalOperations @[expose] public section /-! # Additional tree set operat...
579
lean_file_chunk
5cbd6c669489e9c822330368de5bd15f77e7185ed419ce94ad3e3014f7397309
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.TreeMap.DecidableEquiv public import Std.Data.TreeSet.Basic public section /-! # Decidable equivalence for `TreeSet` -/ op...
23,946
lean_file_chunk
8dfc0f4b1fffae3a1a5e775302c34f598e3249ed1f84b5cccf3403fb70debf3d
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel, Paul Reichert -/ module prelude import Std.Data.TreeMap.Lemmas import Std.Data.DTreeMap.Lemmas public import Init.Data.Array.Perm public import Std.Data.TreeSet.Addition...
23,987
lean_file_chunk
d7d72cb24ba8d4d31acabc6f0ee45307447825145462ee3e5bfc07bec0ddcd0a
lean_source_file
lean_toolchain_source_file_chunks
theorem get!_inter_of_mem_right [TransCmp cmp] [Inhabited α] {k : α} (mem : k ∈ t₂) : (t₁ ∩ t₂).get! k = t₁.get! k := TreeMap.getKey!_inter_of_mem_right mem theorem get!_inter_of_not_mem_right [TransCmp cmp] [Inhabited α] {k : α} (not_mem : k ∉ t₂) : (t₁ ∩ t₂).get! k = default := TreeMap.getKey!_in...
23,977
lean_file_chunk
c29c2ed7112e5eafa8c0d7b11708d5ed35b9c068502ffdd73a04b30184ad9f05
lean_source_file
lean_toolchain_source_file_chunks
TreeMap.minKey_insertIfNew_le_minKey theorem min_insert_le_self [TransCmp cmp] {k} : cmp (t.insert k |>.min <| isEmpty_insert) k |>.isLE := TreeMap.minKey_insertIfNew_le_self @[grind =] theorem contains_min [TransCmp cmp] {he} : t.contains (t.min he) := TreeMap.contains_minKey theorem min_mem [TransCmp c...
12,820
lean_file_chunk
e19f378f0d170cd709a3fcb0786dfc27a0f043ab658d36b32f5c7be3a5d05b96
lean_source_file
lean_toolchain_source_file_chunks
t.get! (t.maxD fallback) = t.maxD fallback := TreeMap.getKey!_maxKeyD he theorem getD_maxD [TransCmp cmp] (he : t.isEmpty = false) {fallback fallback'} : t.getD (t.maxD fallback) fallback' = t.maxD fallback := TreeMap.getKeyD_maxKeyD he theorem maxD_erase_eq_of_not_compare_maxD_eq [TransCmp cmp] {k fallback} ...
17,496
lean_file_chunk
43dae47abbc28c834d8653850d3badde39878d31545f5d607ccb1a262fab9ff3
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2024 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Markus Himmel, Paul Reichert -/ module prelude public import Std.Data.TreeMap.Basic @[expose] public section /-! # Tree sets This file develops the type `Std.TreeSet` of tree sets. ...
423
lean_file_chunk
da6d61b9ba06016594c6e4a54153577e3666cc62e56604ddb45da406f9939f59
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Paul Reichert -/ module prelude public import Std.Data.TreeSet.Raw.Basic public import Std.Data.TreeSet.Raw.Lemmas public import Std.Data.TreeSet.Raw.WF public import Std.Data.TreeSet....
1,049
lean_file_chunk
6d02214443e361d4b233aa95032db38d8da2c95ca0d909cec1be612686bb0d80
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.TreeSet.Basic public import Std.Data.TreeMap.Iterator public import Std.Data.DTreeMap.Lemmas import Init.Data.Iterators.Lemma...
5,897
lean_file_chunk
4430f4b3db79696f09729be7d22b7c945beae48a164dd9090f0a5e1381d19206
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Lean FRO, LLC. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Wojciech Różowski -/ module prelude public import Std.Data.TreeSet.Raw.Slice /-! This module provides slice notation for `TreeSet` slices and implements an iterator for those slices. ...
23,969
lean_file_chunk
5e05f4eedfa15b208916f21aee0ad3bb4a4c29d15cd122c7ed85f1dee057b08e
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez -/ module prelude public import Std.Data.ExtDTreeMap.Basic import Init.Data.List.Pairwise @[expose] public section /-! # Extensional dependent tree map lemmas This file co...
23,964
lean_file_chunk
191abda5e9304a35e91903e067cc8886cdba20e504a0e4e07f50e49e42df63c6
lean_source_file
lean_toolchain_source_file_chunks
getD t a fallback = getD t b fallback := t.inductionOn (fun _ hab => DTreeMap.Const.getD_congr hab) hab end Const @[simp, grind =] theorem getKey?_empty [TransCmp cmp] {a : α} : (∅ : ExtDTreeMap α β cmp).getKey? a = none := DTreeMap.getKey?_emptyc @[grind =] theorem getKey?_insert [TransCmp cmp] {a k : α} {v : β...
23,995
lean_file_chunk
2e728ae8f0ad6a2f19d132fb99edf98d8f7e1455899629a46f3a28a51454b0fc
lean_source_file
lean_toolchain_source_file_chunks
{f : (a : α) × β a → δ → m (ForInStep δ)} {init : δ} : ForIn.forIn t init f = ForIn.forIn t.toList init f := t.inductionOn fun _ => DTreeMap.forIn_eq_forIn_toList theorem foldlM_eq_foldlM_keys [TransCmp cmp] [Monad m] [LawfulMonad m] {f : δ → α → m δ} {init : δ} : t.foldlM (fun d a _ => f d a) init = t.keys....
23,967
lean_file_chunk
4003132725d5c31f9e73c8660e4f4a6e5afcb207c2e265120a87b51a1030c406
lean_source_file
lean_toolchain_source_file_chunks
get (insertMany t l) k h' = get t k (mem_of_mem_insertMany_list h' contains_eq_false) := by refine t.inductionOn (fun _ contains_eq_false _ => ?_) contains_eq_false h' simp only [insertMany_list_mk] exact DTreeMap.Const.get_insertMany_list_of_contains_eq_false contains_eq_false theorem get_insertMany_list_of_mem...
23,965
lean_file_chunk
0665c8aa37a40c53e5adf08b67535c96683d07db29c0e51d6bcb1b99b6acf969
lean_source_file
lean_toolchain_source_file_chunks
(ofList l cmp).size = l.length := DTreeMap.Const.size_ofList distinct theorem size_ofList_le [TransCmp cmp] {l : List (α × β)} : (ofList l cmp).size ≤ l.length := DTreeMap.Const.size_ofList_le grind_pattern size_ofList_le => (ofList l cmp).size @[simp] theorem ofList_eq_empty_iff [TransCmp cmp] {l : List (α ...
23,970
lean_file_chunk
99794a6698dcb53bdc0bf7033f95a52454023a152acf3f31e56643481c0d72f2
lean_source_file
lean_toolchain_source_file_chunks
(t₁ ∩ t₂).isEmpty = true := by revert h exact t₁.inductionOn₂ t₂ fun _ _ h => DTreeMap.isEmpty_inter_left h @[simp] theorem isEmpty_inter_right [TransCmp cmp] (h : t₂.isEmpty) : (t₁ ∩ t₂).isEmpty = true := by revert h exact t₁.inductionOn₂ t₂ fun _ _ h => DTreeMap.isEmpty_inter_right h theorem isEmpty_int...
23,996
lean_file_chunk
d18a5004783a767abe4673dc309ad98ae7fa472ceb82c4d2e1bd3dab38ea208a
lean_source_file
lean_toolchain_source_file_chunks
t.inductionOn fun _ => DTreeMap.Const.contains_alter @[grind =] theorem mem_alter [TransCmp cmp] {k k' : α} {f : Option β → Option β} : k' ∈ alter t k f ↔ if cmp k k' = .eq then (f (get? t k)).isSome = true else k' ∈ t := t.inductionOn fun _ => DTreeMap.Const.mem_alter theorem mem_alter_of_compare_eq [Tra...
23,997
lean_file_chunk
be1c8b6fd52c18235b9bda5a764d2f94f5bda5faa69a9720a6dda415f5a48e4f
lean_source_file
lean_toolchain_source_file_chunks
t.inductionOn fun _ => DTreeMap.minKey?_le_minKey?_erase @[grind =] theorem minKey?_insertIfNew [TransCmp cmp] {k v} : (t.insertIfNew k v).minKey? = some (t.minKey?.elim k fun k' => if cmp k k' = .lt then k else k') := t.inductionOn fun _ => DTreeMap.minKey?_insertIfNew @[grind =] theorem isSome_minKey?_i...
23,979
lean_file_chunk
18537906be008533a18bef36a3ff822a4fbaec0b31417dafa3b6d9ee2d573cde
lean_source_file
lean_toolchain_source_file_chunks
theorem isSome_maxKey?_eq_not_isEmpty [TransCmp cmp] : t.maxKey?.isSome = !t.isEmpty := t.inductionOn fun _ => DTreeMap.isSome_maxKey?_eq_not_isEmpty theorem isSome_maxKey?_iff_ne_empty [TransCmp cmp] : t.maxKey?.isSome ↔ t ≠ ∅ := by simp @[grind =] theorem maxKey?_insert [TransCmp cmp] {k v} : (t.ins...
23,983
lean_file_chunk
bee888a021dc680fb19e676f3468a95460800a0a76f629c2bdc8be1765cb111a
lean_source_file
lean_toolchain_source_file_chunks
t.inductionOn (fun _ he heq => DTreeMap.maxKeyD_erase_eq_of_not_compare_maxKeyD_eq (isEmpty_eq_false_iff.mpr he) heq) he heq theorem maxKeyD_erase_le_maxKeyD [TransCmp cmp] {k} (he : t.erase k ≠ ∅) {fallback} : cmp (t.erase k |>.maxKeyD fallback) (t.maxKeyD fallback) |>.isLE := t.inductionOn (fun _ he => DTr...
10,405
lean_file_chunk
903a7b4a3a3b7fec2a3f4c548ee2e60acad9b3c6281612e61093a137bcf8b569
lean_source_file
lean_toolchain_source_file_chunks
@[simp, grind =] theorem get_filter [TransCmp cmp] {f : α → β → Bool} {k : α} {h'} : Const.get (t.filter f) k h' = Const.get t k (mem_of_mem_filter h') := t.inductionOn (fun _ _ => DTreeMap.Const.get_filter) h' theorem get!_filter [TransCmp cmp] [Inhabited β] {f : α → β → Bool} {k : α} : Const.get! (...
23,977
lean_file_chunk
267045fec3072a21577862c1678583250827efb80ac1280439412a3cfff9d3c1
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2025 Robin Arnez. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Robin Arnez, Markus Himmel, Paul Reichert -/ module prelude public import Std.Data.DTreeMap.Lemmas @[expose] public section /-! # Extensional dependent tree maps This file develops th...