Loogle!
Result
Found 30 declarations mentioning Std.TreeSet.getD.
- Std.TreeSet.getD 📋 Std.Data.TreeSet.Basic
{α : Type u} {cmp : α → α → Ordering} (t : Std.TreeSet α cmp) (a fallback : α) : α - Std.TreeSet.getD_emptyc 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {a fallback : α} : ∅.getD a fallback = fallback - Std.TreeSet.getD_erase_self 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {k fallback : α} : (t.erase k).getD k fallback = fallback - Std.TreeSet.getD_eq_getD_get? 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {a fallback : α} : t.getD a fallback = (t.get? a).getD fallback - Std.TreeSet.getD_of_isEmpty 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {a fallback : α} : t.isEmpty = true → t.getD a fallback = fallback - Std.TreeSet.get!_eq_getD_default 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] [Inhabited α] {a : α} : t.get! a = t.getD a default - Std.TreeSet.getD_eq_fallback_of_contains_eq_false 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {a fallback : α} : t.contains a = false → t.getD a fallback = fallback - Std.TreeSet.getD_max? 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {km fallback : α} (hkm : t.max? = some km) : t.getD km fallback = km - Std.TreeSet.getD_min? 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {km fallback : α} (hkm : t.min? = some km) : t.getD km fallback = km - Std.TreeSet.getD_eq_fallback 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {a fallback : α} : a ∉ t → t.getD a fallback = fallback - Std.TreeSet.getD_eq_of_contains 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] {k fallback : α} (h' : t.contains k = true) : t.getD k fallback = k - Std.TreeSet.getD_congr 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {k k' fallback : α} (h' : cmp k k' = Ordering.eq) : t.getD k fallback = t.getD k' fallback - Std.TreeSet.getD_eq_of_mem 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] {k fallback : α} (h' : k ∈ t) : t.getD k fallback = k - Std.TreeSet.getD_max 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {he : t.isEmpty = false} {fallback : α} : t.getD (t.max he) fallback = t.max he - Std.TreeSet.getD_min 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {he : t.isEmpty = false} {fallback : α} : t.getD (t.min he) fallback = t.min he - Std.TreeSet.get?_eq_some_getD_of_contains 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {a fallback : α} : t.contains a = true → t.get? a = some (t.getD a fallback) - Std.TreeSet.getD_maxD 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] (he : t.isEmpty = false) {fallback fallback' : α} : t.getD (t.maxD fallback) fallback' = t.maxD fallback - Std.TreeSet.getD_minD 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] (he : t.isEmpty = false) {fallback fallback' : α} : t.getD (t.minD fallback) fallback' = t.minD fallback - Std.TreeSet.get_eq_getD 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {a fallback : α} {h : a ∈ t} : t.get a h = t.getD a fallback - Std.TreeSet.getD_max! 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] [Inhabited α] (he : t.isEmpty = false) {fallback : α} : t.getD t.max! fallback = t.max! - Std.TreeSet.getD_min! 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] [Inhabited α] (he : t.isEmpty = false) {fallback : α} : t.getD t.min! fallback = t.min! - Std.TreeSet.getD_ofList_of_contains_eq_false 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} [Std.TransCmp cmp] [BEq α] [Std.LawfulBEqCmp cmp] {l : List α} {k fallback : α} (contains_eq_false : l.contains k = false) : (Std.TreeSet.ofList l cmp).getD k fallback = fallback - Std.TreeSet.get?_eq_some_getD 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {a fallback : α} : a ∈ t → t.get? a = some (t.getD a fallback) - Std.TreeSet.getD_erase 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {k a fallback : α} : (t.erase k).getD a fallback = if cmp k a = Ordering.eq then fallback else t.getD a fallback - Std.TreeSet.getD_ofList_of_mem 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} [Std.TransCmp cmp] {l : List α} {k k' fallback : α} (k_eq : cmp k k' = Ordering.eq) (distinct : List.Pairwise (fun a b => ¬cmp a b = Ordering.eq) l) (mem : k ∈ l) : (Std.TreeSet.ofList l cmp).getD k' fallback = k - Std.TreeSet.getD_insertMany_list_of_mem 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {l : List α} {k fallback : α} (mem : k ∈ t) : (t.insertMany l).getD k fallback = t.getD k fallback - Std.TreeSet.getD_insertMany_list_of_not_mem_of_contains_eq_false 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] [BEq α] [Std.LawfulBEqCmp cmp] {l : List α} {k fallback : α} (not_mem : k ∉ t) (contains_eq_false : l.contains k = false) : (t.insertMany l).getD k fallback = fallback - Std.TreeSet.getD_insertMany_list_of_not_mem_of_mem 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {l : List α} {k k' fallback : α} (k_eq : cmp k k' = Ordering.eq) (not_mem : k ∉ t) (distinct : List.Pairwise (fun a b => ¬cmp a b = Ordering.eq) l) (mem : k ∈ l) : (t.insertMany l).getD k' fallback = k - Std.TreeSet.getD_insert 📋 Std.Data.TreeSet.Lemmas
{α : Type u} {cmp : α → α → Ordering} {t : Std.TreeSet α cmp} [Std.TransCmp cmp] {k a fallback : α} : (t.insert k).getD a fallback = if cmp k a = Ordering.eq ∧ k ∉ t then k else t.getD a fallback - Std.TreeSet.Raw.getD_emptyc 📋 Std.Data.TreeSet.Raw.Lemmas
{α : Type u} {cmp : α → α → Ordering} {a fallback : α} : ∅.getD a fallback = 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