Loogle searches of Lean and Mathlib definitions and theorems.
Loogle finds definitions and lemmas in various ways:
By constant:
By lemma name substring:
"differ"
somewhere in their lemma name.
By subexpression:
The pattern can also be non-linear, as in
If the pattern has parameters, they are matched in any order. Both of these will find List.map
:
By main conclusion:
→
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_lt_tsum
even though the hypothesis f 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
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.
You can find the source code for this service at https://github.com/nomeata/loogle. The https://loogle.lean-lang.org/ service is currently provided by Joachim Breitner <mail@joachim-breitner.de>.