Loogle!
Result
Found 47 declarations mentioning List.getD.
- List.getD π Init.Data.List.BasicAux
{Ξ± : Type u_1} (as : List Ξ±) (i : β) (fallback : Ξ±) : Ξ± - List.getD_nil π Init.Data.List.BasicAux
{n : β} {Ξ±β : Type u_1} {d : Ξ±β} : [].getD n d = d - List.getD_cons_zero π Init.Data.List.Lemmas
{Ξ±β : Type u_1} {x : Ξ±β} {xs : List Ξ±β} {d : Ξ±β} : (x :: xs).getD 0 d = x - List.getD_cons_succ π Init.Data.List.Lemmas
{Ξ±β : Type u_1} {x : Ξ±β} {xs : List Ξ±β} {n : β} {d : Ξ±β} : (x :: xs).getD (n + 1) d = xs.getD n d - List.getD_eq_getElem?_getD π Init.Data.List.Lemmas
{Ξ± : Type u_1} {l : List Ξ±} {i : β} {a : Ξ±} : l.getD i a = l[i]?.getD a - List.getD.eq_1 π Init.Data.List.Lemmas
{Ξ± : Type u_1} (as : List Ξ±) (i : β) (fallback : Ξ±) : as.getD i fallback = as[i]?.getD fallback - BitVec.getLsbD_ofBoolListLE π Init.Data.BitVec.Lemmas
{bs : List Bool} {i : β} : (BitVec.ofBoolListLE bs).getLsbD i = bs.getD i false - BitVec.getLsb_ofBoolListLE π Init.Data.BitVec.Lemmas
{bs : List Bool} {i : β} : (BitVec.ofBoolListLE bs).getLsbD i = bs.getD i false - BitVec.getMsbD_ofBoolListBE π Init.Data.BitVec.Lemmas
{bs : List Bool} {i : β} : (BitVec.ofBoolListBE bs).getMsbD i = bs.getD i false - BitVec.getLsbD_ofBoolListBE π Init.Data.BitVec.Lemmas
{bs : List Bool} {i : β} : (BitVec.ofBoolListBE bs).getLsbD i = (decide (i < bs.length) && bs.getD (bs.length - 1 - i) false) - BitVec.getMsbD_ofBoolListLE π Init.Data.BitVec.Lemmas
{bs : List Bool} {i : β} : (BitVec.ofBoolListLE bs).getMsbD i = (decide (i < bs.length) && bs.getD (bs.length - 1 - i) false) - Std.DTreeMap.Internal.Impl.entryAtIdxD_eq_getD π Std.Data.DTreeMap.Internal.WF.Lemmas
{Ξ± : Type u} {Ξ² : Ξ± β Type v} {t : Std.DTreeMap.Internal.Impl Ξ± Ξ²} (htb : t.Balanced) {i : β} {fallback : (a : Ξ±) Γ Ξ² a} : t.entryAtIdxD i fallback = t.toListModel.getD i fallback - List.decidableGetDNilNe π Mathlib.Data.List.GetD
{Ξ± : Type u} (a : Ξ±) : DecidablePred fun i => [].getD i a β a - List.getD_default_eq_getI π Mathlib.Data.List.GetD
{Ξ± : Type u} (l : List Ξ±) [Inhabited Ξ±] {n : β} : l.getD n default = l.getI n - List.getD_eq_default π Mathlib.Data.List.GetD
{Ξ± : Type u} (l : List Ξ±) (d : Ξ±) {n : β} (hn : l.length β€ n) : l.getD n d = d - List.getD_replicate π Mathlib.Data.List.GetD
{Ξ± : Type u} (x : Ξ±) {y : Ξ±} {i n : β} (h : i < n) : (List.replicate n x).getD i y = x - List.getD_map π Mathlib.Data.List.GetD
{Ξ± : Type u} {Ξ² : Type v} (l : List Ξ±) (d : Ξ±) {n : β} (f : Ξ± β Ξ²) : (List.map f l).getD n (f d) = f (l.getD n d) - List.getD_eq_getD_getElem? π Mathlib.Data.List.GetD
{Ξ± : Type u} (l : List Ξ±) (d : Ξ±) (n : β) : l.getD n d = l[n]?.getD d - List.getD_append π Mathlib.Data.List.GetD
{Ξ± : Type u} (l l' : List Ξ±) (d : Ξ±) (n : β) (h : n < l.length) : (l ++ l').getD n d = l.getD n d - List.getD_eq_getElem π Mathlib.Data.List.GetD
{Ξ± : Type u} (l : List Ξ±) (d : Ξ±) {n : β} (hn : n < l.length) : l.getD n d = l[n] - List.getD_reverse π Mathlib.Data.List.GetD
{Ξ± : Type u} {l : List Ξ±} (i : β) (h : i < l.length) : l.reverse.getD i = l.getD (l.length - 1 - i) - List.getD_append_right π Mathlib.Data.List.GetD
{Ξ± : Type u} (l l' : List Ξ±) (d : Ξ±) (n : β) (h : l.length β€ n) : (l ++ l').getD n d = l'.getD (n - l.length) d - List.toFinsupp π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 β 0] : β ββ M - List.toFinsupp_nil π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] [DecidablePred fun i => [].getD i 0 β 0] : [].toFinsupp = 0 - List.toFinsupp_singleton π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (x : M) [DecidablePred fun x_1 => [x].getD x_1 0 β 0] : [x].toFinsupp = funβ | 0 => x - List.coe_toFinsupp π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 β 0] : βl.toFinsupp = fun x => l.getD x 0 - List.toFinsupp_apply π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 β 0] (i : β) : l.toFinsupp i = l.getD i 0 - List.toFinsupp_apply_le π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 β 0] (n : β) (hn : l.length β€ n) : l.toFinsupp n = 0 - List.toFinsupp_support π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 β 0] : l.toFinsupp.support = {i β Finset.range l.length | l.getD i 0 β 0} - List.toFinsupp.congr_simp π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l lβ : List M) (e_l : l = lβ) {instβ : DecidablePred fun x => l.getD x 0 β 0} [DecidablePred fun x => lβ.getD x 0 β 0] : l.toFinsupp = lβ.toFinsupp - List.toFinsupp_apply_lt π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 β 0] (n : β) (hn : n < l.length) : l.toFinsupp n = l[n] - List.toFinsupp_eq_sum_mapIdx_single π Mathlib.Data.List.ToFinsupp
{R : Type u_2} [AddMonoid R] (l : List R) [DecidablePred fun x => l.getD x 0 β 0] : l.toFinsupp = (List.mapIdx (fun n r => funβ | n => r) l).sum - List.toFinsupp_apply_fin π Mathlib.Data.List.ToFinsupp
{M : Type u_1} [Zero M] (l : List M) [DecidablePred fun x => l.getD x 0 β 0] (n : Fin l.length) : l.toFinsupp βn = l[n] - List.toFinsupp_cons_eq_single_add_embDomain π Mathlib.Data.List.ToFinsupp
{R : Type u_2} [AddZeroClass R] (x : R) (xs : List R) [DecidablePred fun x_1 => (x :: xs).getD x_1 0 β 0] [DecidablePred fun x => xs.getD x 0 β 0] : (x :: xs).toFinsupp = (funβ | 0 => x) + Finsupp.embDomain { toFun := Nat.succ, inj' := Nat.succ_injective } xs.toFinsupp - List.toFinsupp_concat_eq_toFinsupp_add_single π Mathlib.Data.List.ToFinsupp
{R : Type u_2} [AddZeroClass R] (x : R) (xs : List R) [DecidablePred fun i => (xs ++ [x]).getD i 0 β 0] [DecidablePred fun i => xs.getD i 0 β 0] : (xs ++ [x]).toFinsupp = xs.toFinsupp + funβ | xs.length => x - List.toFinsupp_append π Mathlib.Data.List.ToFinsupp
{R : Type u_2} [AddZeroClass R] (lβ lβ : List R) [DecidablePred fun x => (lβ ++ lβ).getD x 0 β 0] [DecidablePred fun x => lβ.getD x 0 β 0] [DecidablePred fun x => lβ.getD x 0 β 0] : (lβ ++ lβ).toFinsupp = lβ.toFinsupp + Finsupp.embDomain (addLeftEmbedding lβ.length) lβ.toFinsupp - Polynomial.ofFn.eq_1 π Mathlib.Algebra.Polynomial.OfFn
{R : Type u_1} [Semiring R] [DecidableEq R] (n : β) : Polynomial.ofFn n = { toFun := fun v => { toFinsupp := (List.ofFn v).toFinsupp }, map_add' := β―, map_smul' := β― } - SimpleGraph.Walk.getVert_eq_getD_support π Mathlib.Combinatorics.SimpleGraph.Walk
{V : Type u} {G : SimpleGraph V} {u v : V} (p : G.Walk u v) (n : β) : p.getVert n = p.support.getD n v - Primrec.list_getD π Mathlib.Computability.Primrec
{Ξ± : Type u_1} [Primcodable Ξ±] (d : Ξ±) : Primrecβ fun l n => l.getD n d - Nat.nth_eq_getD_sort π Mathlib.Data.Nat.Nth
{p : β β Prop} (h : (setOf p).Finite) (n : β) : Nat.nth p n = (h.toFinset.sort fun a b => a β€ b).getD n 0 - Nat.nth.eq_1 π Mathlib.Data.Nat.Nth
(p : β β Prop) (n : β) : Nat.nth p n = if h : (setOf p).Finite then (h.toFinset.sort fun a b => a β€ b).getD n 0 else β((Nat.Subtype.orderIsoOfNat (setOf p)) n) - CoxeterSystem.getD_leftInvSeq_mul_wordProd π Mathlib.GroupTheory.Coxeter.Inversion
{B : Type u_1} {W : Type u_2} [Group W] {M : CoxeterMatrix B} (cs : CoxeterSystem M W) (Ο : List B) (j : β) : (cs.leftInvSeq Ο).getD j 1 * cs.wordProd Ο = cs.wordProd (Ο.eraseIdx j) - CoxeterSystem.wordProd_mul_getD_rightInvSeq π Mathlib.GroupTheory.Coxeter.Inversion
{B : Type u_1} {W : Type u_2} [Group W] {M : CoxeterMatrix B} (cs : CoxeterSystem M W) (Ο : List B) (j : β) : cs.wordProd Ο * (cs.rightInvSeq Ο).getD j 1 = cs.wordProd (Ο.eraseIdx j) - CoxeterSystem.getD_leftInvSeq_mul_self π Mathlib.GroupTheory.Coxeter.Inversion
{B : Type u_1} {W : Type u_2} [Group W] {M : CoxeterMatrix B} (cs : CoxeterSystem M W) (Ο : List B) (j : β) : (cs.leftInvSeq Ο).getD j 1 * (cs.leftInvSeq Ο).getD j 1 = 1 - CoxeterSystem.getD_rightInvSeq_mul_self π Mathlib.GroupTheory.Coxeter.Inversion
{B : Type u_1} {W : Type u_2} [Group W] {M : CoxeterMatrix B} (cs : CoxeterSystem M W) (Ο : List B) (j : β) : (cs.rightInvSeq Ο).getD j 1 * (cs.rightInvSeq Ο).getD j 1 = 1 - CoxeterSystem.getD_leftInvSeq π Mathlib.GroupTheory.Coxeter.Inversion
{B : Type u_1} {W : Type u_2} [Group W] {M : CoxeterMatrix B} (cs : CoxeterSystem M W) (Ο : List B) (j : β) : (cs.leftInvSeq Ο).getD j 1 = cs.wordProd (List.take j Ο) * (Option.map cs.simple Ο[j]?).getD 1 * (cs.wordProd (List.take j Ο))β»ΒΉ - CoxeterSystem.getD_rightInvSeq π Mathlib.GroupTheory.Coxeter.Inversion
{B : Type u_1} {W : Type u_2} [Group W] {M : CoxeterMatrix B} (cs : CoxeterSystem M W) (Ο : List B) (j : β) : (cs.rightInvSeq Ο).getD j 1 = (cs.wordProd (List.drop (j + 1) Ο))β»ΒΉ * (Option.map cs.simple Ο[j]?).getD 1 * cs.wordProd (List.drop (j + 1) Ο)
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 ?aIf 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 ?bBy 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_tsumeven though the hypothesisf i < g iis 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 187ba29 serving mathlib revision 6c19380