Loogle!
Result
Found 25 declarations mentioning Std.HashSet.Raw.getD.
- Std.HashSet.Raw.getD 📋 Std.Data.HashSet.Raw
{α : Type u} [BEq α] [Hashable α] (m : Std.HashSet.Raw α) (a fallback : α) : α - Std.HashSet.Raw.getD_emptyWithCapacity 📋 Std.Data.HashSet.RawLemmas
{α : Type u} [BEq α] [Hashable α] {a fallback : α} {c : ℕ} : (Std.HashSet.Raw.emptyWithCapacity c).getD a fallback = fallback - Std.HashSet.Raw.getD_empty 📋 Std.Data.HashSet.RawLemmas
{α : Type u} [BEq α] [Hashable α] {a fallback : α} : ∅.getD a fallback = fallback - Std.HashSet.Raw.getD_emptyc 📋 Std.Data.HashSet.RawLemmas
{α : Type u_1} [BEq α] [Hashable α] {a fallback : α} : ∅.getD a fallback = fallback - Std.HashSet.Raw.getD_eq_of_contains 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [LawfulBEq α] (h : m.WF) {k fallback : α} (h' : m.contains k = true) : m.getD k fallback = k - Std.HashSet.Raw.getD_erase_self 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {k fallback : α} : (m.erase k).getD k fallback = fallback - Std.HashSet.Raw.getD_eq_of_mem 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [LawfulBEq α] (h : m.WF) {k fallback : α} (h' : k ∈ m) : m.getD k fallback = k - Std.HashSet.Raw.getD_of_isEmpty 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {a fallback : α} : m.isEmpty = true → m.getD a fallback = fallback - Std.HashSet.Raw.getD_ofList_of_contains_eq_false 📋 Std.Data.HashSet.RawLemmas
{α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k fallback : α} (contains_eq_false : l.contains k = false) : (Std.HashSet.Raw.ofList l).getD k fallback = fallback - Std.HashSet.Raw.getD_eq_getD_get? 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {a fallback : α} : m.getD a fallback = (m.get? a).getD fallback - Std.HashSet.Raw.get!_eq_getD_default 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] [Inhabited α] (h : m.WF) {a : α} : m.get! a = m.getD a default - Std.HashSet.Raw.getD_eq_fallback_of_contains_eq_false 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {a fallback : α} : m.contains a = false → m.getD a fallback = fallback - Std.HashSet.Raw.getD_eq_fallback 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {a fallback : α} : a ∉ m → m.getD a fallback = fallback - Std.HashSet.Raw.getD_congr 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {k k' fallback : α} (h' : (k == k') = true) : m.getD k fallback = m.getD k' fallback - Std.HashSet.Raw.get_eq_getD 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {a fallback : α} {h' : a ∈ m} : m.get a h' = m.getD a fallback - Std.HashSet.Raw.get?_eq_some_getD_of_contains 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {a fallback : α} : m.contains a = true → m.get? a = some (m.getD a fallback) - Std.HashSet.Raw.Equiv.getD_eq 📋 Std.Data.HashSet.RawLemmas
{α : Type u} [BEq α] [Hashable α] {m₁ m₂ : Std.HashSet.Raw α} [EquivBEq α] [LawfulHashable α] {k fallback : α} (h₁ : m₁.WF) (h₂ : m₂.WF) (h : m₁.Equiv m₂) : m₁.getD k fallback = m₂.getD k fallback - Std.HashSet.Raw.get?_eq_some_getD 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {a fallback : α} : a ∈ m → m.get? a = some (m.getD a fallback) - Std.HashSet.Raw.getD_filter 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {f : α → Bool} {k fallback : α} (h : m.WF) : (Std.HashSet.Raw.filter f m).getD k fallback = (Option.filter f (m.get? k)).getD fallback - Std.HashSet.Raw.getD_ofList_of_mem 📋 Std.Data.HashSet.RawLemmas
{α : Type u} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] {l : List α} {k k' fallback : α} (k_beq : (k == k') = true) (distinct : List.Pairwise (fun a b => (a == b) = false) l) (mem : k ∈ l) : (Std.HashSet.Raw.ofList l).getD k' fallback = k - Std.HashSet.Raw.getD_erase 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {k a fallback : α} : (m.erase k).getD a fallback = if (k == a) = true then fallback else m.getD a fallback - Std.HashSet.Raw.getD_insertMany_list_of_mem 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {l : List α} {k fallback : α} (mem : k ∈ m) : (m.insertMany l).getD k fallback = m.getD k fallback - Std.HashSet.Raw.getD_insertMany_list_of_not_mem_of_contains_eq_false 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {l : List α} {k fallback : α} (not_mem : k ∉ m) (contains_eq_false : l.contains k = false) : (m.insertMany l).getD k fallback = fallback - Std.HashSet.Raw.getD_insertMany_list_of_not_mem_of_mem 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {l : List α} {k k' fallback : α} (k_beq : (k == k') = true) (not_mem : k ∉ m) (distinct : List.Pairwise (fun a b => (a == b) = false) l) (mem : k ∈ l) : (m.insertMany l).getD k' fallback = k - Std.HashSet.Raw.getD_insert 📋 Std.Data.HashSet.RawLemmas
{α : Type u} {m : Std.HashSet.Raw α} [BEq α] [Hashable α] [EquivBEq α] [LawfulHashable α] (h : m.WF) {k a fallback : α} : (m.insert k).getD a fallback = if (k == a) = true ∧ k ∉ m then k else m.getD a 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