Loogle!
Result
Found 31 declarations mentioning Std.ExtHashMap.getD.
- Std.ExtHashMap.getD 📋 Std.Data.ExtHashMap.Basic
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} [EquivBEq α] [LawfulHashable α] (m : Std.ExtHashMap α β) (a : α) (fallback : β) : β - Std.ExtHashMap.getD_unitOfList 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {x✝ : BEq α} {x✝¹ : Hashable α} [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} {fallback : Unit} : (Std.ExtHashMap.unitOfList l).getD k fallback = () - Std.ExtHashMap.getD_empty 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} [EquivBEq α] [LawfulHashable α] {a : α} {fallback : β} : ∅.getD a fallback = fallback - Std.ExtHashMap.getD_erase_self 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k : α} {fallback : β} : (m.erase k).getD k fallback = fallback - Std.ExtHashMap.getD_insert_self 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k : α} {fallback v : β} : (m.insert k v).getD k fallback = v - Std.ExtHashMap.getD_eq_fallback_of_contains_eq_false 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {a : α} {fallback : β} : m.contains a = false → m.getD a fallback = fallback - Std.ExtHashMap.getD_eq_fallback 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {a : α} {fallback : β} : a ∉ m → m.getD a fallback = fallback - Std.ExtHashMap.getD_congr 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {a b : α} {fallback : β} (hab : (a == b) = true) : m.getD a fallback = m.getD b fallback - Std.ExtHashMap.getD_ofList_of_contains_eq_false 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} {fallback : β} (contains_eq_false : (List.map Prod.fst l).contains k = false) : (Std.ExtHashMap.ofList l).getD k fallback = fallback - Std.ExtHashMap.getD_insertManyIfNewUnit_list 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α Unit} [EquivBEq α] [LawfulHashable α] {l : List α} {k : α} {fallback : Unit} : (m.insertManyIfNewUnit l).getD k fallback = () - Std.ExtHashMap.getD_erase 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k a : α} {fallback : β} : (m.erase k).getD a fallback = if (k == a) = true then fallback else m.getD a fallback - Std.ExtHashMap.getD_insert 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k a : α} {fallback v : β} : (m.insert k v).getD a fallback = if (k == a) = true then v else m.getD a fallback - Std.ExtHashMap.getD_eq_getD_getElem? 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {a : α} {fallback : β} : m.getD a fallback = m[a]?.getD fallback - Std.ExtHashMap.getElem!_eq_getD_default 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] [Inhabited β] {a : α} : m[a]! = m.getD a default - Std.ExtHashMap.getElem?_eq_some_getD_of_contains 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {a : α} {fallback : β} : m.contains a = true → m[a]? = some (m.getD a fallback) - Std.ExtHashMap.getD_alter_self 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k : α} {fallback : β} {f : Option β → Option β} : (m.alter k f).getD k fallback = (f m[k]?).getD fallback - Std.ExtHashMap.getD_modify_self 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k : α} {fallback : β} {f : β → β} : (m.modify k f).getD k fallback = (Option.map f m[k]?).getD fallback - Std.ExtHashMap.getD_ofList_of_mem 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v fallback : β} (distinct : List.Pairwise (fun a b => (a.1 == b.1) = false) l) (mem : (k, v) ∈ l) : (Std.ExtHashMap.ofList l).getD k' fallback = v - Std.ExtHashMap.getElem?_eq_some_getD 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {a : α} {fallback : β} : a ∈ m → m[a]? = some (m.getD a fallback) - Std.ExtHashMap.getD_insertMany_list_of_contains_eq_false 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k : α} {fallback : β} (contains_eq_false : (List.map Prod.fst l).contains k = false) : (m.insertMany l).getD k fallback = m.getD k fallback - Std.ExtHashMap.getD_filter_of_getKey?_eq_some 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k k' : α} {fallback : β} : m.getKey? k = some k' → (Std.ExtHashMap.filter f m).getD k fallback = (Option.filter (fun x => f k' x) m[k]?).getD fallback - Std.ExtHashMap.getD_filterMap_of_getKey?_eq_some 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {γ : Type w} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k k' : α} {fallback : γ} (h : m.getKey? k = some k') : (Std.ExtHashMap.filterMap f m).getD k fallback = (m[k]?.bind (f k')).getD fallback - Std.ExtHashMap.getD_map_of_getKey?_eq_some 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {γ : Type w} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] [Inhabited γ] {f : α → β → γ} {k k' : α} {fallback : γ} (h : m.getKey? k = some k') : (Std.ExtHashMap.map f m).getD k fallback = (Option.map (f k') m[k]?).getD fallback - Std.ExtHashMap.getD_alter 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k k' : α} {fallback : β} {f : Option β → Option β} : (m.alter k f).getD k' fallback = if (k == k') = true then (f m[k]?).getD fallback else m.getD k' fallback - Std.ExtHashMap.getD_modify 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k k' : α} {fallback : β} {f : β → β} : (m.modify k f).getD k' fallback = if (k == k') = true then (Option.map f m[k]?).getD fallback else m.getD k' fallback - Std.ExtHashMap.getElem_eq_getD 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {a : α} {fallback : β} {h' : a ∈ m} : m[a] = m.getD a fallback - Std.ExtHashMap.getD_insertMany_list_of_mem 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {l : List (α × β)} {k k' : α} (k_beq : (k == k') = true) {v fallback : β} (distinct : List.Pairwise (fun a b => (a.1 == b.1) = false) l) (mem : (k, v) ∈ l) : (m.insertMany l).getD k' fallback = v - Std.ExtHashMap.getD_insertIfNew 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {k a : α} {fallback v : β} : (m.insertIfNew k v).getD a fallback = if (k == a) = true ∧ k ∉ m then v else m.getD a fallback - Std.ExtHashMap.getD_filter 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {f : α → β → Bool} {k : α} {fallback : β} : (Std.ExtHashMap.filter f m).getD k fallback = (m[k]?.pfilter fun x h' => f (m.getKey k ⋯) x).getD fallback - Std.ExtHashMap.getD_filterMap 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {γ : Type w} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {f : α → β → Option γ} {k : α} {fallback : γ} : (Std.ExtHashMap.filterMap f m).getD k fallback = (m[k]?.pbind fun x h' => f (m.getKey k ⋯) x).getD fallback - Std.ExtHashMap.getD_map 📋 Std.Data.ExtHashMap.Lemmas
{α : Type u} {β : Type v} {γ : Type w} {x✝ : BEq α} {x✝¹ : Hashable α} {m : Std.ExtHashMap α β} [EquivBEq α] [LawfulHashable α] {f : α → β → γ} {k : α} {fallback : γ} : (Std.ExtHashMap.map f m).getD k fallback = (Option.pmap (fun v h => f (m.getKey k h) v) m[k]? ⋯).getD fallback
About
Loogle searches Lean and Mathlib definitions and theorems.
You can use Loogle from within the Lean4 VSCode language extension
using (by default) Ctrl-K Ctrl-S. You can also try the
#loogle
command from LeanSearchClient,
the CLI version, the Loogle
VS Code extension, the lean.nvim
integration or the Zulip bot.
Usage
Loogle finds definitions and lemmas in various ways:
By constant:
🔍Real.sin
finds all lemmas whose statement somehow mentions the sine function.By lemma name substring:
🔍"differ"
finds all lemmas that have"differ"
somewhere in their lemma name.By subexpression:
🔍_ * (_ ^ _)
finds all lemmas whose statements somewhere include a product where the second argument is raised to some power.The pattern can also be non-linear, as in
🔍Real.sqrt ?a * Real.sqrt ?a
If the pattern has parameters, they are matched in any order. Both of these will find
List.map
:
🔍(?a -> ?b) -> List ?a -> List ?b
🔍List ?a -> (?a -> ?b) -> List ?b
By main conclusion:
🔍|- tsum _ = _ * tsum _
finds all lemmas where the conclusion (the subexpression to the right of all→
and∀
) has the given shape.As before, if the pattern has parameters, they are matched against the hypotheses of the lemma in any order; for example,
🔍|- _ < _ → tsum _ < tsum _
will findtsum_lt_tsum
even though the hypothesisf i < g i
is not the last.
If you pass more than one such search filter, separated by commas
Loogle will return lemmas which match all of them. The
search
🔍 Real.sin, "two", tsum, _ * _, _ ^ _, |- _ < _ → _
would find all lemmas which mention the constants Real.sin
and tsum
, have "two"
as a substring of the
lemma name, include a product and a power somewhere in the type,
and have a hypothesis of the form _ < _
(if
there were any such lemmas). Metavariables (?a
) are
assigned independently in each filter.
The #lucky
button will directly send you to the
documentation of the first hit.
Source code
You can find the source code for this service at https://github.com/nomeata/loogle. The https://loogle.lean-lang.org/ service is provided by the Lean FRO.
This is Loogle revision 19971e9
serving mathlib revision bce1d65