Loogle!
Result
Found 189 declarations mentioning Nat.Prime and Iff. Of these, 12 match your pattern(s).
- Nat.prime_iff ð Mathlib.Data.Nat.Prime.Defs
{p : â} : Nat.Prime p â Prime p - Nat.prime_def_minFac ð Mathlib.Data.Nat.Prime.Defs
{p : â} : Nat.Prime p â 2 âĪ p â§ p.minFac = p - Nat.prime_def ð Mathlib.Data.Nat.Prime.Defs
{p : â} : Nat.Prime p â 2 âĪ p â§ â (m : â), m âĢ p â m = 1 âĻ m = p - Nat.prime_def_lt ð Mathlib.Data.Nat.Prime.Defs
{p : â} : Nat.Prime p â 2 âĪ p â§ â m < p, m âĢ p â m = 1 - Nat.prime_def_lt'' ð Mathlib.Data.Nat.Prime.Defs
{p : â} : Nat.Prime p â 2 âĪ p â§ â (m : â), m âĢ p â m = 1 âĻ m = p - Nat.prime_def_lt' ð Mathlib.Data.Nat.Prime.Defs
{p : â} : Nat.Prime p â 2 âĪ p â§ â (m : â), 2 âĪ m â m < p â ÂŽm âĢ p - Nat.prime_def_le_sqrt ð Mathlib.Data.Nat.Prime.Defs
{p : â} : Nat.Prime p â 2 âĪ p â§ â (m : â), 2 âĪ m â m âĪ p.sqrt â ÂŽm âĢ p - Nat.prime_mul_iff ð Mathlib.Data.Nat.Prime.Basic
{a b : â} : Nat.Prime (a * b) â Nat.Prime a â§ b = 1 âĻ Nat.Prime b â§ a = 1 - Nat.prime_iff_card_units ð Mathlib.Data.Nat.Totient
(p : â) [Fintype (ZMod p)ËĢ] : Nat.Prime p â Fintype.card (ZMod p)ËĢ = p - 1 - Nat.prime_iff_prime_int ð Mathlib.Data.Nat.Prime.Int
{p : â} : Nat.Prime p â Prime âp - lucas_primality_iff ð Mathlib.NumberTheory.LucasPrimality
(p : â) : Nat.Prime p â â a, a ^ (p - 1) = 1 â§ â (q : â), Nat.Prime q â q âĢ p - 1 â a ^ ((p - 1) / q) â 1 - Nat.prime_iff_fac_equiv_neg_one ð Mathlib.NumberTheory.Wilson
{n : â} (h : n â 1) : Nat.Prime n â â(n - 1).factorial = -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 ?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