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
1,283
lean_file_chunk
54b9d4ce88888048dd10e2cda438d0c2ee114b058e4f5f7bac7cc0fe79074fd3
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.Basic public import Std.Data.TreeMap.Raw.Iterator public import Std.Data.DTreeMap.Raw.Lemmas import Init.Data.Ite...
5,633
lean_file_chunk
91689fa93ea35c235d0d206049f2355958d0da8af64dd7fdf32ee97ce9d484f7
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.Raw.Slice public import Std.Data.TreeSet.Raw.Basic /-! This module provides slice notation for `TreeSet` slices and ...
2,369
lean_file_chunk
5c6f9ff354ac0f45967dc416b4e2139bd2812a699036c6ed801dc11ed5fcdc0a
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.TreeMap.Raw.WF public import Std.Data.TreeSet.AdditionalOperations @[expose] public section /-! # Well-formedness proofs for ra...
23,928
lean_file_chunk
3f30a77ff79e1b781d5e8567b725e615472fe324d875f9c2f1f30f25cf17d208
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 public import Std.Data.HashMap.Basic public import Std.Data.DTreeMap.Internal.WF.Lemmas public import Init.Data.Array.Perm public meta im...
23,966
lean_file_chunk
b01e20971928ecc82510c7f666ad6bb66941825327bf55304fe7ab0e6bc6b42b
lean_source_file
lean_toolchain_source_file_chunks
theorem size_le_size_insertIfNew [TransOrd α] (h : t.WF) {k : α} {v : β k} : t.size ≤ (t.insertIfNew k v h.balanced).impl.size := by simp_to_model [insertIfNew, size] using List.length_le_length_insertEntryIfNew theorem size_le_size_insertIfNew! [TransOrd α] (h : t.WF) {k : α} {v : β k} : t.size ≤ (t.insertI...
23,969
lean_file_chunk
c70436fb1335a83cf9a1f772de83c552ecb6702eaa16e1d8fce9bc07fe1df7e0
lean_source_file
lean_toolchain_source_file_chunks
theorem getD_eq_fallback_of_contains_eq_false [TransOrd α] [LawfulEqOrd α] (h : t.WF) {a : α} {fallback : β a} : t.contains a = false → t.getD a fallback = fallback := by simp_to_model [contains, getD] using List.getValueCastD_eq_fallback theorem getD_eq_fallback [TransOrd α] [LawfulEqOrd α] (h : t.WF) {a : α} {...
23,932
lean_file_chunk
519630fb58196758b0785a949f2b19514b13c19cc1640cfd97eff8df18df0902
lean_source_file
lean_toolchain_source_file_chunks
theorem getD_insertIfNew! [TransOrd α] [LawfulEqOrd α] (h : t.WF) {k a : α} {fallback : β a} {v : β k} : (t.insertIfNew! k v).getD a fallback = if h : compare k a = .eq ∧ ¬ k ∈ t then cast (congrArg β (compare_eq_iff_eq.mp h.1)) v else t.getD a fallback := by simpa only [insertIfNew_eq...
23,980
lean_file_chunk
50afea8fdf1e4021dc9b1132a8e78d2fd1565f8f2ee6ffc94b37ca40af74e413
lean_source_file
lean_toolchain_source_file_chunks
t.foldl f init = (Const.toArray t).foldl (fun a b => f a b.1 b.2) init := by rw [foldl_eq_foldl_toList, ← toArray_toList, List.foldl_toArray] theorem foldrM_eq_foldrM_toList [Monad m] [LawfulMonad m] {f : (a : α) → β → δ → m δ} {init : δ} : t.foldrM f init = (Const.toList t).foldrM (fun a b => f a.1 a.2 b) i...
23,953
lean_file_chunk
6aeda9a6e1c3c243a5d6ed1d93fb269d694e434ade5642cd82005e16a4168f9c
lean_source_file
lean_toolchain_source_file_chunks
(insertMany t l h.balanced).1.getKey? k' = some k := by simp_to_model [Const.insertMany, getKey?] using List.getKey?_insertListConst_of_mem theorem getKey?_insertMany!_list_of_mem [TransOrd α] (h : t.WF) {l : List (α × β)} {k k' : α} : (k_beq : compare k k' = .eq) → (distinct : l.Pairwise (fun a b => ¬ c...
23,961
lean_file_chunk
d42e10da46b1a114014363e70be8e28443133cfd00731ea4920bef5c11737245
lean_source_file
lean_toolchain_source_file_chunks
simpa only [insertManyIfNewUnit_eq_insertManyIfNewUnit!] using getKey_insertManyIfNewUnit_list_of_not_mem_of_mem h theorem getKey!_insertManyIfNewUnit_list_of_not_mem_of_contains_eq_false [BEq α] [LawfulBEqOrd α] [TransOrd α] [Inhabited α] (h : t.WF) {l : List α} {k : α} : ¬ k ∈ t → l.contains k = false → ...
23,846
lean_file_chunk
6949d18ba71562a0b4e71ed46a3b2340ac3cd77100f4aafae06e66392b3325a8
lean_source_file
lean_toolchain_source_file_chunks
theorem insertManyIfNewUnit_empty_list_cons {hd : α} {tl : List α} : (insertManyIfNewUnit (empty : Impl α Unit) (hd :: tl) WF.empty.balanced).1 = (insertManyIfNewUnit (empty.insertIfNew hd () WF.empty.balanced).1 tl WF.empty.insertIfNew.balanced).1 := by rw [insertManyIfNewUnit_cons WF.empty] theor...
23,967
lean_file_chunk
64d854e6eb3e28df64f8d75aff9adc49cbb02c3873648c2b31ff0d3dbc647f0f
lean_source_file
lean_toolchain_source_file_chunks
(m₁.union m₂ h₁.balanced h₂.balanced).getKey k h' = m₂.getKey k (contains_of_contains_union_of_contains_eq_false_left h₁ h₂ h' contains_eq_false) := by revert contains_eq_false simp_to_model [union, contains, getKey] using List.getKey_insertList_of_contains_eq_false_left theorem getKey_union!_of_contains_eq_false_...
23,988
lean_file_chunk
3a50837096962014c5df1377d3db85478fdf5aac9ec068e6881cb16945d83201
lean_source_file
lean_toolchain_source_file_chunks
simp_to_model [inter, getD, contains] using getValueCastD_filter_containsKey_of_containsKey_right theorem getD_inter!_of_contains_right [TransOrd α] [LawfulEqOrd α] (h₁ : m₁.WF) (h₂ : m₂.WF) {k : α} {fallback : β k} (h : m₂.contains k) : (m₁.inter! m₂).getD k fallback = m₁.getD k fallback := by rw [← inter_e...
23,978
lean_file_chunk
7c28a69f33fa2bbe298eaf055331a30c78867eecb96c03e2944e8c1d9fcf36cb
lean_source_file
lean_toolchain_source_file_chunks
simp_to_model using List.perm_of_beqModel theorem beq_iff_equiv [∀ k, LawfulBEq (β k)] (h₁ : m₁.WF) (h₂ : m₂.WF) : beq m₁ m₂ = true ↔ m₁.Equiv m₂ := ⟨equiv_of_beq h₁ h₂, Equiv.beq h₁ h₂⟩ theorem Equiv.beq_congr {m₃ m₄ : Impl α β} (h₁ : m₁.WF) (h₂ : m₂.WF) (h₃ : m₃.WF) (h₄ : m₄.WF) : m₁.Equiv m₃ → m₂.Equiv m₄ → ...
23,983
lean_file_chunk
d1cc2077036eb2b50eda576987c4f52df92bf23d8ac92d3821d585bda737bb0c
lean_source_file
lean_toolchain_source_file_chunks
Const.get? (m₁.diff! m₂) k = if m₂.contains k then none else Const.get? m₁ k := by rw [← diff_eq_diff!] apply get?_diff h₁ h₂ all_goals wf_trivial theorem get?_diff_of_contains_eq_false_right [TransOrd α] (h₁ : m₁.WF) (h₂ : m₂.WF) {k : α} (h : m₂.contains k = false) : Const.get? (m₁.diff m₂ h₁.balanc...
23,957
lean_file_chunk
f668e314b32f7f68b9d5f14f7f286dd64ad37e6e8b3ba9071bb71a0a639c06f0
lean_source_file
lean_toolchain_source_file_chunks
simpa only [alter_eq_alter!] using getKey!_alter h theorem getKey!_alter_self [TransOrd α] [LawfulEqOrd α] [Inhabited α] (h : t.WF) {k : α} {f : Option (β k) → Option (β k)} : (t.alter k f h.balanced).1.getKey! k = if (f (t.get? k)).isSome then k else default := by simp [getKey!_alter h] theorem getKey!_alt...
23,935
lean_file_chunk
1c2108ecad683e1dd22845b53e726fceee5f991626642670e0edaa8561bca991
lean_source_file
lean_toolchain_source_file_chunks
theorem getD_modify_self (h : t.WF) {k : α} {fallback : β k} {f : β k → β k} : (t.modify k f).getD k fallback = ((t.get? k).map f).getD fallback := by simp_to_model [modify, getD, get?] using List.getValueCastD_modifyKey_self theorem getKey?_modify (h : t.WF) {k k' : α} {f : β k → β k} : (t.modify k f).getKe...
23,940
lean_file_chunk
be69ae44e8dbe30030537d4209a08f152d0be27ce186e5a9bb890ed869400c54
lean_source_file
lean_toolchain_source_file_chunks
simp_to_model [Const.modify, minKey?, isEmpty] using List.Const.isSome_minKey?_modifyKey theorem isSome_minKey?_modify_eq_isSome [TransOrd α] (h : t.WF) {k f} : (Const.modify k f t).minKey?.isSome = t.minKey?.isSome := by simp_to_model [Const.modify, minKey?] using List.Const.isSome_minKey?_modifyKey_eq_isSome ...
23,956
lean_file_chunk
cab6d2158fa075a6e51fab7b4e1313c728822f8542f64e1bf9af67d0667b3b3f
lean_source_file
lean_toolchain_source_file_chunks
theorem getKey!_minKeyD [TransOrd α] [Inhabited α] (h : t.WF) : (he : t.isEmpty = false) → ∀ {fallback}, t.getKey! (t.minKeyD fallback) = (t.minKeyD fallback) := by simp_to_model [minKeyD, isEmpty, getKey!] using List.getKey!_minKeyD theorem getKeyD_minKeyD [TransOrd α] (h : t.WF) : (he : t.isEmpty = fal...
23,948
lean_file_chunk
604baa5bcf35773d43173549c17f8a5d51a7f1c5e35a62a230c297794596850e
lean_source_file
lean_toolchain_source_file_chunks
compare (t.erase k h.balanced |>.impl.maxKey he) (t.maxKey <| isEmpty_eq_false_of_isEmpty_erase_eq_false h he) |>.isLE := by simp_to_model [maxKey, erase] using List.maxKey_eraseKey_le_maxKey theorem maxKey_insertIfNew [TransOrd α] (h : t.WF) {k v} : (t.insertIfNew k v h.balanced).impl.maxKey (isEmpty_in...
23,987
lean_file_chunk
f5587dd8d6ef9b358af9c312597038abed80b86a6fed7250462485dda5f80d26
lean_source_file
lean_toolchain_source_file_chunks
(f (t.get? k)).isSome ∧ ∀ k', k' ∈ t → (compare k' k).isLE := by simpa only [alter_eq_alter!] using maxKeyD_alter_eq_self h namespace Const variable {β : Type v} {t : Impl α β} theorem maxKeyD_modify [TransOrd α] (h : t.WF) : ∀ {k f}, (he : (modify k f t).isEmpty = false) → ∀ {fallback}, (modify k f t |>.m...
23,889
lean_file_chunk
72f359e83e6e06b22064da13c2e1bc2ce29ea55601510221620f07cf8dedf9d2
lean_source_file
lean_toolchain_source_file_chunks
simp only [eraseMany!, List.forIn_pure_yield_eq_foldl, bind_pure, Id.run_pure] refine (List.foldl_rel (r := fun (a : t₁.IteratedSlowErasureFrom) (b : t₂.IteratedSlowErasureFrom) => a.1.WF ∧ b.1.WF ∧ a.1 ~m b.1) ⟨h₁, h₂, h⟩ ?_).2.2 intro a ha c c' hc refine ⟨hc.1.erase!, hc.2.1.erase!, hc.2.2.erase! hc.1...
23,982
lean_file_chunk
4a44428a25ffe8fbb72ac0956d0498940c62c6032dd5f293d90e4e3d3e031e28
lean_source_file
lean_toolchain_source_file_chunks
(t.filterMap f h.balanced).1.size = t.size ↔ ∀ (a : α) (h : t.contains a), (f a (t.get a h)).isSome := by simp_to_model [filterMap, size, contains, get] using List.length_filterMap_eq_length_iff theorem size_filterMap!_eq_size_iff [TransOrd α] [LawfulEqOrd α] {f : (a : α) → β a → Option (γ a)} (h : t.WF) : (...
23,974
lean_file_chunk
25751e875c97330406a7ab90820ed0ed97af113ced9f9befb27a8b82540eb304
lean_source_file
lean_toolchain_source_file_chunks
simp_to_model [filter, size] using List.length_filter_le theorem size_filter!_le_size [TransOrd α] {f : (a : α) → β a → Bool} (h : t.WF) : (t.filter! f).size ≤ t.size := by simpa only [filter_eq_filter!] using size_filter_le_size h theorem size_filter_eq_size_iff [TransOrd α] [LawfulEqOrd α] {f : (a : α...
6,495
lean_file_chunk
494fa76c027a9a31251367c193717074e3834148521b8c12bf2220f5f587843f
lean_source_file
lean_toolchain_source_file_chunks
simpa only [filterMap_eq_filterMap!] using filterMap_equiv_map h theorem isEmpty_map {f : (a : α) → β a → γ a} : (t.map f).isEmpty = t.isEmpty := by simp_to_model [map, isEmpty] using List.isEmpty_map theorem contains_map [TransOrd α] {f : (a : α) → β a → γ a} {k : α} (h : t.WF) : (t.map f).contains k =...
3,625
lean_file_chunk
fa6b9f870d8534db8e5516a4c2c9cd77785b4cf44ea8e64f45e81014a3306690
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.AC public import Std.Data.DTreeMap.Internal.Def import Init.Omega import Init.RCases @[expose] public section /-! # `Balanced`...
23,991
lean_file_chunk
cf6f20735398ba69f9b9da409f3c368d35c66410884276308f782591d73f5835
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.Ord.Basic public import Std.Data.DTreeMap.Internal.Balanced import Init.ByCases import Init.Data.Nat.Lemmas import Init.Data.Nat...
12,277
lean_file_chunk
ba6fe6689fdf4ceb9349bbd399b2541f8bf9d9b2e168c267edcce50f7a22b4de
lean_source_file
lean_toolchain_source_file_chunks
rw [if_neg] · repeat simp_all only [rotateL, dite_true, Std.Internal.tree_tac, if_true] omega · simp only [Nat.not_le] at * omega · rw [rotateL] repeat simp_all only [Std.Internal.tree_tac, dite_true, Nat.not_lt] rw [if_neg (by omega), if_neg (by omega)] simp only [Std.Internal.tree_ta...
23,841
lean_file_chunk
66acc6ced0b594138c9624ec0d85c099c71199a8da1e421fd619ec7db36e5285
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.Iterators.Lemmas.Producers.Slice public import Init.Data.Slice public import Std.Data.DTreeMap.Internal.Lemmas public import ...
23,967
lean_file_chunk
d93fe2a4c839956786f0c553a3d8748189458fe757f84dd6dad00ee002c9f10d
lean_source_file
lean_toolchain_source_file_chunks
theorem RxoIterator.val_run_step_toIterM_iter [Ord α] {z : RxoIterator α β} : (⟨z⟩ : Iter (α := RxoIterator α β) ((a : α) × β a)).toIterM.step.run.inflate.val = z.step := by rw [IterM.step] simp only [Iterator.step, Id.run_pure, Shrink.inflate_deflate] rfl theorem RxoIterator.eq_toIterM_iter [Ord α] (it : Iter (...
23,784
lean_file_chunk
77d8c6a69d80815c5ea7350e50acbd0e50862bbd8031219a1fdbb2ac2aa6c83f
lean_source_file
lean_toolchain_source_file_chunks
mkSlice carrier range := ⟨carrier, range⟩ @[inline, expose, implicit_reducible] public def RooSlice.instToIterator {β : α → Type v} [Ord α] := ToIterator.of (γ := Slice (RooSliceData α β)) (β := (a : α) × β a) _ fun s => rooIterator s.1.treeMap s.1.range.lower s.1.range.upper attribute [instance] RooSlice.instTo...
2,517
lean_file_chunk
84c7ba5795da621769ddb49a9589ef7d600961958dd547f57b3b074795f44a2a
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.SInt.Basic @[expose] public section /-! # Low-level implementation of the size-bounded tree This file contains the basic defi...
23,997
lean_file_chunk
38b556fce8ba99d07d1efbb651348e428b75a0e75eb46abd4597eeb2e97a14ea
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.DTreeMap.Internal.Balancing public import Std.Data.DTreeMap.Internal.Queries public import Init.Data.List.Control ...
14,860
lean_file_chunk
0f4f27c1af0d7186f7c292e29a9e91603cc20e389aa464d38f73ddc0d6b97d45
lean_source_file
lean_toolchain_source_file_chunks
/-- The tree. -/ impl : Impl α β /-- The tree is balanced. -/ balanced_impl : impl.Balanced attribute [Std.Internal.tree_tac] BalancedTree.balanced_impl /-- Transforms an element of `SizedBalancedTree` into a `BalancedTree`. -/ def SizedBalancedTree.toBalancedTree {lb ub} (t : SizedBalancedTree α β lb ub) : Bal...
23,944
lean_file_chunk
2240dc8d2a1a88704f11fe548e7905e94eb9fb0244e1a74b7a3308d6b0562999
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.DTreeMap.Internal.WF.Defs public import Std.Data.DTreeMap.Internal.Cell import Init.Data.Nat.Linear import Init.Om...
23,955
lean_file_chunk
4b5b445d0d0e79bbdf85e89600c2afc1445c0420be58e56e40db54a4f4c5311b
lean_source_file
lean_toolchain_source_file_chunks
induction l using maxEntry?.induct_unfolding <;> simp only [maxEntry!] <;> trivial theorem maxEntryD_eq_getD_maxEntry? {l : Impl α β} {fallback : (a : α) × β a} : l.maxEntryD fallback = l.maxEntry?.getD fallback := by induction l using maxEntry?.induct_unfolding <;> simp only [maxEntryD] <;> trivial theorem som...
8,463
lean_file_chunk
91f8cbeb9a7d71fd815fa7ce01779823bd09f94788edc943e9f4545552b0ac2f
lean_source_file
lean_toolchain_source_file_chunks
theorem getKeyGE!_eq_get!_getKeyGE? [Ord α] {t : Impl α β} {k : α} [Inhabited α] : t.getKeyGE! k = (t.getKeyGE? k).get! := rfl theorem getKeyGT!_eq_get!_getKeyGT? [Ord α] {t : Impl α β} {k : α} [Inhabited α] : t.getKeyGT! k = (t.getKeyGT? k).get! := rfl theorem getKeyLE!_eq_get!_getKeyLE? [Ord α] {t : Impl α ...
2,635
lean_file_chunk
97becc95dcf330b379ccf652af0a8ee50855321eb93e663c16948a2c930477fc
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 -/ module prelude public import Std.Data.DTreeMap.Internal.Def public import Std.Data.Internal.Cut import Init.Data.List.Pairwise import Init.Data.List.Sublist @[expose]...
5,804
lean_file_chunk
59d8a72b88631b8ad60b983dac268ed1b1b7d1542fa890838392f9fa62410a2f
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.Internal.List.Associative import Init.Data.List.Find @[expose] public section /-! # The `Cell` type -/ set_option autoImplicit...
23,967
lean_file_chunk
17da384d48069704d997b374cfe3e5e784ea0e42f8337d11912a9972521ae7af
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.Nat.Compare public import Std.Data.DTreeMap.Internal.Balanced public import Std.Data.DTreeMap.Internal.Ordered public import Ini...
12,283
lean_file_chunk
fa9551a9d5f97284a816dca9ec7e6b6c3939ebf58a706c4ae97ac9e621b5fffb
lean_source_file
lean_toolchain_source_file_chunks
def getKeyLE? [Ord α] (k : α) : Impl α β → Option α := go none where go (best : Option α) : Impl α β → Option α | .leaf => best | .inner _ ky _ l r => match compare k ky with | .lt => go best l | .eq => some ky | .gt => go (some ky) r /-- Implementation detail of the tree map -/ @[inline]...
1,154
lean_file_chunk
c7f6b06a053f34a3963e4f4be4a362bba111cf3a6577213ad54e8feaffe661bd
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.DTreeMap.AdditionalOperations @[expose] public section /-! # Additional dependent raw tree map operations This file defines mo...
792
lean_file_chunk
2cd62251c109249696f1ace1e2824157c845fcfdf3edceef3afc194765627444
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.DTreeMap.Internal.Lemmas public import Std.Data.DTreeMap.Raw.Basic public section /-! # Decidable equivalence for `DTreeMap...
23,916
lean_file_chunk
041603446f827b7d52464c9d6c07f249541f19f2ec81a732f7927b125bd239a7
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.DTreeMap.Internal.Lemmas public import Std.Data.DTreeMap.Raw.AdditionalOperations public import Init.Data.Array.Perm impo...
23,935
lean_file_chunk
efb35cf086078f0549586f3eabff98dc62499e020ab84d3cbeac14145c4d465e
lean_source_file
lean_toolchain_source_file_chunks
getD (t.insert k v) a fallback = if cmp k a = .eq then v else getD t a fallback := Impl.Const.getD_insert! h @[simp] theorem getD_insert_self [TransCmp cmp] (h : t.WF) {k : α} {fallback v : β} : getD (t.insert k v) k fallback = v := Impl.Const.getD_insert!_self h theorem getD_eq_fallback_of_contains_eq_false ...
23,934
lean_file_chunk
cbe166df2e5eefaa6d8d5d52e77357511d2f5704ce1f903a2ed40f63b9227fd2
lean_source_file
lean_toolchain_source_file_chunks
Impl.Const.mem_toList_iff_getKey?_eq_some_and_get?_eq_some h @[simp] theorem mem_toArray_iff_getKey?_eq_some_and_get?_eq_some [TransCmp cmp] (h : t.WF) {k : α} {v : β} : (k, v) ∈ toArray t ↔ t.getKey? k = some k ∧ get? t k = some v := Impl.Const.mem_toArray_iff_getKey?_eq_some_and_get?_eq_some h theorem get?_eq...
23,960
lean_file_chunk
c599d6e0f2cd7589b45b11442e1a4f87e222b0096afbc862d4d585367d40153c
lean_source_file
lean_toolchain_source_file_chunks
Impl.Const.get?_insertMany!_list_of_contains_eq_false h contains_eq_false theorem get?_insertMany_list_of_mem [TransCmp cmp] (h : t.WF) {l : List (α × β)} {k k' : α} (k_eq : cmp k k' = .eq) {v : β} (distinct : l.Pairwise (fun a b => ¬ cmp a.1 b.1 = .eq)) (mem : ⟨k, v⟩ ∈ l) : get? (insertMany t l) k' = some...
23,987
lean_file_chunk
95ea02a335357a0d17cb7356279e8d7e958d6597e337a9fdaecc754a86446b0f
lean_source_file
lean_toolchain_source_file_chunks
theorem getKey?_unitOfList_of_contains_eq_false [TransCmp cmp] [BEq α] [LawfulBEqCmp cmp] {l : List α} {k : α} (contains_eq_false : l.contains k = false) : getKey? (unitOfList l cmp) k = none := Impl.Const.getKey?_insertManyIfNewUnit_empty_list_of_contains_eq_false contains_eq_false theorem getKey?_unitO...
23,910
lean_file_chunk
94f2737377ede1dd8ccf655eb66e9c39b07c4281130bf2814747ab324612dbfa
lean_source_file
lean_toolchain_source_file_chunks
Impl.getKey?_inter! h₁ h₂ theorem getKey?_inter_of_mem_right [TransCmp cmp] (h₁ : t₁.WF) (h₂ : t₂.WF) {k : α} (h : k ∈ t₂) : (t₁ ∩ t₂).getKey? k = t₁.getKey? k := Impl.getKey?_inter!_of_contains_right h₁ h₂ h theorem getKey?_inter_of_not_mem_right [TransCmp cmp] (h₁ : t₁.WF) (h₂ : t₂.WF) {k : α}...
23,982
lean_file_chunk
92822042677bd040035737dea72cd2d65cccb5a04df934a3476801fcd6d1ceca
lean_source_file
lean_toolchain_source_file_chunks
(t.alter k f).contains k' = if cmp k k' = .eq then (f (t.get? k)).isSome else t.contains k' := Impl.contains_alter! h @[grind =] theorem mem_alter [TransCmp cmp] [LawfulEqCmp cmp] (h : t.WF) {k k' : α} {f : Option (β k) → Option (β k)} : k' ∈ t.alter k f ↔ if cmp k k' = .eq then (f (t.get? k)).isSome = true ...
23,953
lean_file_chunk
53d20d1ef324efdaa0f8d1c315560675dcddb2af91a856eeac84aaf967590294
lean_source_file
lean_toolchain_source_file_chunks
Impl.Const.getKeyD_modify_self h end Const end Modify section Min @[simp, grind =] theorem minKey?_emptyc : (∅ : Raw α β cmp).minKey? = none := Impl.minKey?_empty theorem minKey?_of_isEmpty [TransCmp cmp] (h : t.WF) : (he : t.isEmpty) → t.minKey? = none := Impl.minKey?_of_isEmpty h (instOrd := ⟨cmp⟩) ...
23,979
lean_file_chunk
354ea7f6b009d7d137a6e50978a196d69104635da13cb2360b6a153953518e32
lean_source_file
lean_toolchain_source_file_chunks
(hkmi : (t.insert k v |>.maxKey? |>.get <| isSome_maxKey?_insert h) = kmi) → cmp km kmi |>.isLE := Impl.maxKey?_le_maxKey?_insert! h theorem self_le_maxKey?_insert [TransCmp cmp] (h : t.WF) {k v kmi} : (hkmi : (t.insert k v |>.maxKey?.get <| isSome_maxKey?_insert h) = kmi) → cmp k kmi |>.isLE := Impl.s...
23,982
lean_file_chunk
10a51c955f59188c7b89e91a6ddf8e106dfc498fbef1c42598512791a0eeac26
lean_source_file
lean_toolchain_source_file_chunks
t₁.maxKey? = t₂.maxKey? := h.1.maxKey?_eq h₁.1 h₂.1 theorem maxKey!_eq [TransCmp cmp] [Inhabited α] (h₁ : t₁.WF) (h₂ : t₂.WF) (h : t₁ ~m t₂) : t₁.maxKey! = t₂.maxKey! := h.1.maxKey!_eq h₁.1 h₂.1 theorem maxKeyD_eq [TransCmp cmp] {fallback : α} (h₁ : t₁.WF) (h₂ : t₂.WF) (h : t₁ ~m t₂) : t₁.maxKeyD fallback...
23,952
lean_file_chunk
43ca5fb424ea8aa7131ec486165444ae85833272cae1e847db6d495f1123ee00
lean_source_file
lean_toolchain_source_file_chunks
@[simp, grind =] theorem get?_filterMap [TransCmp cmp] [LawfulEqCmp cmp] {f : (a : α) → β a → Option (γ a)} {k : α} (h : t.WF) : (t.filterMap f).get? k = (t.get? k).bind (f k) := Impl.get?_filterMap! h theorem isSome_apply_of_mem_filterMap [TransCmp cmp] [LawfulEqCmp cmp] {f : (a : α) → β a → Option (γ a...
3,486
lean_file_chunk
0ac06c3693ccab6c40d931ed24b8c207533499a27c3347dfab346f24d963a9e5
lean_source_file
lean_toolchain_source_file_chunks
(t.map f).getKeyD k fallback = t.getKeyD k fallback := Impl.getKeyD_map h namespace Const variable {β : Type v} {γ : Type w} {t : Raw α (fun _ => β) cmp} /-- Variant of `get?_map` that holds without `LawfulEqCmp`. -/ @[simp (low)] theorem get?_map' [TransCmp cmp] {f : α → β → γ} {k : α} (h : t.WF) : Const....
23,956
lean_file_chunk
68562690a0656f9c0b413d25e6426e1b45e0f2b9ec8f5ad427dd031f3b9dac7b
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.DTreeMap.Basic @[expose] public section /- # Dependent tree maps with unbundled well-formedness invariant This ...
4,152
lean_file_chunk
a60b39fd1b07c43ad673f401f569fb0b0b1b8b82a9478bddbae9486b378d5e0e
lean_source_file
lean_toolchain_source_file_chunks
def mergeWith [LawfulEqCmp cmp] (mergeFn : (a : α) → β a → β a → β a) (t₁ t₂ : Raw α β cmp) : Raw α β cmp := letI : Ord α := ⟨cmp⟩; ⟨t₁.inner.mergeWith! mergeFn t₂.inner⟩ namespace Const open Internal (Impl) variable {β : Type v} @[inline, inherit_doc DTreeMap.Const.toList] def toList (t : Raw α β cmp) : List ...
2,420
lean_file_chunk
eceef7f59da7bdab44f052292018fbd03b61f3c32278947a3a33a28b5e5b6270
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.DTreeMap.Internal.Zipper public import Std.Data.DTreeMap.Raw.Basic import Init.Data.Iterators.Lemmas.Combinators.FilterMap /...
5,672
lean_file_chunk
4072b1cc5b4c9e75b79e4f3e3444a5d1637d06dca91600ca2e5cfb4fb0cbf8e6
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.DTreeMap.Internal.Zipper public import Std.Data.DTreeMap.Raw.Basic /-! This module provides slice notation for `TreeMap` sli...
5,425
lean_file_chunk
ba58916d302177953aec3bce5736b7950d8280e8f84a90fa7ca780e499dc07a4
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.DTreeMap.Raw.AdditionalOperations @[expose] public section /-! # Well-formedness proofs for raw dependent tree maps This file ...
23,959
lean_file_chunk
9966d487a6438395c5030e59bb6fd2306ba91bb639e0181d65a9dad8f30d6c97
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.DTreeMap.Internal.Model import all Std.Data.Internal.List.Associative import Init.Data.List.Impl import Init.Data....
23,972
lean_file_chunk
7ef114a6c2045c56e5972086bd1c56755b36b6c6a8ffe74d90bf6047743674e6
lean_source_file
lean_toolchain_source_file_chunks
applyPartition k l f = g l.toListModel := by rw [applyPartition_eq hlo, h] · congr; exact (toListModel_eq_append _ hlo).symm · rw [List.findCell_inner, ← toListModel_eq_append _ hlo] exact hlo · simp · simp theorem applyCell_eq_apply_toListModel [Ord α] [TransOrd α] [BEq α] [LawfulBEqOrd α] {k : α} {...
23,913
lean_file_chunk
13ceabb757c44cf6dd6e127aa26d232404cd9733742ed807ff1b1a69d7076785
lean_source_file
lean_toolchain_source_file_chunks
(ho : t.Ordered) : (t.filterMap f h).impl.Ordered := by simp only [Ordered, toListModel_filterMap] apply ho.filterMap intro e f hef e' he' f' hf' simp only [Option.map_eq_some_iff] at he' hf' obtain ⟨_, _, rfl⟩ := he' obtain ⟨_, _, rfl⟩ := hf' exact hef /-! ### filter -/ theorem filter_eq_filterMap [Ord...
23,941
lean_file_chunk
f459c559b4591fec8f1f86a87dcc01453e6259c53622f11f565bff39d67f724f
lean_source_file
lean_toolchain_source_file_chunks
(t₁.insertManyIfNew! t₂).val = t₂.foldl (init := t₁) fun acc k v => acc.insertIfNew! k v := by simp [foldl_eq_foldl] rw [← insertManyIfNew!_eq_foldl] simp only [insertManyIfNew!, ForIn.forIn, pure, Id.run_bind] rw [forIn_eq_forIn_toListModel] congr theorem insertMany_eq_insertMany! {_ : Ord α} {l : List ((a ...
4,487
lean_file_chunk
b2537e48d8d6603836bfe3d0bfa7e3d51b877da1e3ca928209ab4c26d110b30f
lean_source_file
lean_toolchain_source_file_chunks
theorem entryAtIdxD_eq_getD {t : Impl α β} (htb : t.Balanced) {i : Nat} {fallback : (a : α) × β a} : t.entryAtIdxD i fallback = t.toListModel.getD i fallback := by simp only [entryAtIdxD_eq_getD_entryAtIdx?, entryAtIdx?_eq_getElem? htb, List.getD_eq_getElem?_getD] theorem keyAtIdx?_eq_getElem? {t : Impl α β}...
6,022
lean_file_chunk
be4ab0ef24dbc0a686ebee8429f749cc7270b783e0b016a7827fcdca641775ca
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.DTreeMap.Internal.Operations @[expose] public section /-! # Well-formedness predicate on size-bounded trees Thi...
1,054
lean_file_chunk
1e09753cc815d70b4d7d10f7e488d75384245490fa79f0f766b7775f89d9059a
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.TreeMap.Basic public import Std.Data.TreeMap.Raw.Basic public import Std.Data.DTreeMap.Raw.AdditionalOperations @[expose] public...
763
lean_file_chunk
4cad8bdd45dbd83b5786eedaed9799631e51b6b1c9f4bb18a61b4f809a0d830e
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.DTreeMap.DecidableEquiv public import Std.Data.TreeMap.Raw.Basic public section /-! # Decidable equivalence for `TreeMap.R...
23,995
lean_file_chunk
c41b3fcb386606629c543f5893d5808ca7ad1289927789e30040964bb29fb361
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.DTreeMap.Raw.Lemmas public import Std.Data.TreeMap.Raw.AdditionalOperations public import Init.Data.Array.Perm import Ini...
23,920
lean_file_chunk
68b15258d3accd8f446cc9c02a976844451f29762d682f86e7999b1cae4b8f07
lean_source_file
lean_toolchain_source_file_chunks
DTreeMap.Raw.getKeyD_emptyc theorem getKeyD_of_isEmpty [TransCmp cmp] (h : t.WF) {a fallback : α} : t.isEmpty = true → t.getKeyD a fallback = fallback := DTreeMap.Raw.getKeyD_of_isEmpty h @[grind =] theorem getKeyD_insert [TransCmp cmp] (h : t.WF) {k a fallback : α} {v : β} : (t.insert k v).getKeyD a fallba...
23,949
lean_file_chunk
34b877ccd9061a2ba8e27220ff3d9109c1303a4a034cdc1671f35d25d6668a9d
lean_source_file
lean_toolchain_source_file_chunks
@[grind =] theorem getElem?_insertMany_list [TransCmp cmp] [BEq α] [LawfulBEqCmp cmp] (h : t.WF) {l : List (α × β)} {k : α} : (insertMany t l)[k]? = (l.findSomeRev? (fun ⟨a, b⟩ => if cmp a k = .eq then some b else none)).or t[k]? := DTreeMap.Raw.Const.get?_insertMany_list h theorem getElem_insertMany_l...
23,943
lean_file_chunk
3ddfa23dc83eaaa611c25258f007bf41e2f7a12e5621c8accd98f40aa1752194
lean_source_file
lean_toolchain_source_file_chunks
(t₁ ∪ t₂)[k]'h' = t₂[k]'(mem_of_mem_union_of_not_mem_left h₁ h₂ h' not_mem) := DTreeMap.Raw.Const.get_union_of_not_mem_left h₁ h₂ not_mem theorem getElem_union_of_not_mem_right [TransCmp cmp] (h₁ : t₁.WF) (h₂ : t₂.WF) {k : α} (not_mem : ¬k ∈ t₂) {h'} : (t₁ ∪ t₂)[k]'h' = t₁[k]'(mem_of_mem_union_of_not_mem_rig...
23,970
lean_file_chunk
3d25273b0a97c35ad08e0ca4a400f5f0b552187352bacc63dc9a54c47887e40a
lean_source_file
lean_toolchain_source_file_chunks
(t₁ \ t₂)[k]! = if k ∈ t₂ then default else t₁[k]! := DTreeMap.Raw.Const.get!_diff h₁ h₂ theorem getElem!_diff_of_not_mem_right [TransCmp cmp] [Inhabited β] (h₁ : t₁.WF) (h₂ : t₂.WF) {k : α} (not_mem : k ∉ t₂) : (t₁ \ t₂)[k]! = t₁[k]! := DTreeMap.Raw.Const.get!_diff_of_not_mem_right h₁ h₂ not_mem theorem ...
23,983
lean_file_chunk
96c8f40a320a85fac4c7ec42c0355bed0d09eed95b4c48f8c601eb2ba0cb6371
lean_source_file
lean_toolchain_source_file_chunks
DTreeMap.Raw.minKey?_le_minKey?_erase h @[grind =] theorem minKey?_insertIfNew [TransCmp cmp] (h : t.WF) {k v} : (t.insertIfNew k v).minKey? = some (t.minKey?.elim k fun k' => if cmp k k' = .lt then k else k') := DTreeMap.Raw.minKey?_insertIfNew h @[grind =] theorem isSome_minKey?_insertIfNew [TransCmp cm...
23,959
lean_file_chunk
5812e5c9bcaf3cccfd6f5be0bb7ec758fb887f06a5156063f5c712a8dc858d4d
lean_source_file
lean_toolchain_source_file_chunks
(cmp t.maxKey! k).isLE ↔ (∀ k', k' ∈ t → (cmp k' k).isLE) := DTreeMap.Raw.maxKey!_le h he theorem getKey?_maxKey! [TransCmp cmp] [Inhabited α] (h : t.WF) (he : t.isEmpty = false) : t.getKey? t.maxKey! = some t.maxKey! := DTreeMap.Raw.getKey?_maxKey! h he theorem getKey_maxKey! [TransCmp cmp] [Inhabited α] (h ...
23,651
lean_file_chunk
dff6654af29cd479de8e8e1fbe87514531b877b6f997647434ce18c070bae185
lean_source_file
lean_toolchain_source_file_chunks
(h₁ : t₁.WF) (h₂ : t₂.WF) (h : ∀ k, t₁.getKey? k = t₂.getKey? k) : t₁ ~m t₂ := ⟨.of_forall_getKey?_unit_eq h₁.1 h₂.1 h⟩ theorem of_forall_contains_unit_eq [TransCmp cmp] [LawfulEqCmp cmp] {t₁ t₂ : Raw α Unit cmp} (h₁ : t₁.WF) (h₂ : t₂.WF) (h : ∀ k, t₁.contains k = t₂.contains k) : t₁ ~m t₂ := ⟨.of_forall_c...
18,498
lean_file_chunk
d2b54f5b9143ac6d7aa0405e2453822ca7982305dd00555ea4b8d909939e17fc
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.DTreeMap.Raw.Basic @[expose] public section /- # Tree maps with unbundled well-formedness invariant This file d...
2,341
lean_file_chunk
5ac9c4ff49a8a5bd6c369a6983fe52ee175e52c42d423a2c371420e8f7a64961
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.DTreeMap.Raw.Iterator public import Std.Data.TreeMap.Raw.Basic import Init.Data.Iterators.Lemmas.Combinators.FilterMap /-! #...
5,918
lean_file_chunk
33047fe7c5538e59c1d98c60f0b47c93a952b34c90a68bc118c936b2bc53c272
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.DTreeMap.Raw.Slice public import Std.Data.TreeMap.Raw.Basic /-! This module provides slice notation for `TreeMap` slices and...
3,574
lean_file_chunk
1a3375b19016e3eed67c280d1bdf0ba0383d12bf375a5c97aaf0967adbcc6387
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.DTreeMap.Raw.WF public import Std.Data.TreeMap.Raw.AdditionalOperations @[expose] public section /-! # Well-formedness proofs f...
2,386
lean_file_chunk
f3975c8f0274f10c69497bf98d0220ae6fdd583716690cb8ce5fd15a35f9da9b
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 Init.Data.Iterators.Consumers.Monadic @[expose] public section /-! # Function-unfolding iterator This module provides an infinite itera...
339
lean_file_chunk
568a85ba3e359b94b740b89b8930883c196832a81e5b191488ea5dc14a18625a
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.Monadic.Array public import Std.Data.Iterators.Producers.Monadic.Vector public import Std.Data.Iterators.Prod...
1,478
lean_file_chunk
20e43af805aa43bfb2c6df3c42b0609645b04a469c9f2ffe13ab5735d308b134
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2026 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 Init.Data.Vector.Basic public import Std.Data.Iterators.Producers.Array set_option doc.verso true /-! # Vector iterator This module pro...
516
lean_file_chunk
3cbb91d031990e97dd4bc5b6197fd10201e7da528992c8df5a301603d694ff22
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.Monadic.Empty @[expose] public section namespace Std /-- Returns an iterator that terminates immediately. ...
2,814
lean_file_chunk
6915eb9f05d44ed962f9a151ca1c60ae42a6d152586037d50935b586f4dece92
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 Init.Data.Range.Polymorphic.Iterators set_option doc.verso true @[expose] public section /-! # Range iterator This module provides ite...
1,322
lean_file_chunk
171cfb0f4c11991b88c32c3f534eab0ec2099703ac7411c0643e1617716c633e
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.Monadic.Array @[expose] public section /-! # Array iterator This module provides an iterator for arrays th...
598
lean_file_chunk
96d33256dc04e82963747bca1122e8ef5ec1a4e8ff5b20af19108ac00a6af88a
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 Init.Data.Slice.Operations @[expose] public section /-! # Slice iterator This module provides iterators over slices from `Std.Slice` vi...
1,670
lean_file_chunk
c3f59dcf5bc938d981610b814fb087cb1244a97a979dfe9935d8701124a16beb
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.Combinators.Monadic.Zip @[expose] public section namespace Std /-- Given two iterators `left` and `right`, `left.zip...
634
lean_file_chunk
e854561f6122ae801c634b39bb8ffa701b68fbd7fad382ac076ef3a077d3f71a
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.Combinators.Monadic.StepSize @[expose] public section /-! This module provides a combinator that only yields every `n...
1,058
lean_file_chunk
87ccd73e31f8968a80c869510ecbf05c81c169c4035dfa28791c51397d23a483
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.Combinators.Monadic.Drop @[expose] public section namespace Std open Std.Iterators.Types /-- Given an iterator `it` ...
470
lean_file_chunk
4727aef4293968b317c2cae317078bb1b583af34508119ccdf0ad70ffeed5f6e
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.Combinators.Monadic.TakeWhile public import Std.Data.Iterators.Combinators.Monadic.Drop public import Std.Data.Iterator...
1,381
lean_file_chunk
9cdf01e8158e3624af2358dd9a0dafb4d0fa24876d97a77313c0f52a64c92962
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.Combinators.Monadic.TakeWhile @[expose] public section namespace Std /-- Given an iterator `it` and a predicate `P`,...
1,986
lean_file_chunk
33cd660ea8bd02619769046539bc328315bd78e28af6c43a5e2b116ce94cc6d3
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.Combinators.Monadic.DropWhile @[expose] public section namespace Std /-- Constructs intermediate states of an iterat...
222
lean_file_chunk
de9cb71cf2163c21e6114f5a8f628df8b4454745d20c3192544c6a090a46ce57
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2026 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.Iterators.Consumers.Monadic.Set
4,696
lean_file_chunk
26c3d2431de95e2935fc9e1498332815ef2ba99be5acf8e2588a8e37abed0247
lean_source_file
lean_toolchain_source_file_chunks
/- Copyright (c) 2026 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.Iterators.Consumers.Monadic.Set public import Init.Data.Iterators.Consumers.Total set_option doc.verso true namespace Std open ...
222
lean_file_chunk
fade2757451cd47bd4200d5169d909435c37a4577e116851029d34706e3396fb
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 Init.Data.Iterators.Lemmas.Monadic.Basic
443
lean_file_chunk
0d8200eaa67609529daebd8c8137485dfda95d1b58347a644ba581ccfebc9608
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 Init.Data.Iterators.Lemmas.Consumers public import Std.Data.Iterators.Lemmas.Consumers.Monadic public import Std.Data.Iterators.Lemmas.Con...
563
lean_file_chunk
0c02338d85020ed7ea1a6c929a16e9b9e901478841c4630ed4582ee83177e0d8
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.Lemmas.Producers.Monadic public import Std.Data.Iterators.Lemmas.Producers.Array public import Std.Data.Iterators.Lemma...
464
lean_file_chunk
e04f4a111755e8549845971003113b66bd6271a213ba684112d654c9803dc8b4
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.Lemmas.Combinators.Monadic public import Std.Data.Iterators.Lemmas.Combinators.TakeWhile public import Std.Data.Iterato...
344
lean_file_chunk
462fea254e8392dcf5b4c4f4ba7aad01dd5789120fe3e3a3212bb7ba5df7fd98
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.Lemmas.Equivalence.HetT public import Std.Data.Iterators.Lemmas.Equivalence.Basic public import Std.Data.Iterators.Lemm...