Loogle!
Result
Found 9 declarations mentioning Even and Finset.sum.
- Finset.even_sum 📋 Mathlib.Algebra.BigOperators.Group.Finset.Lemmas
{ι : Type u_1} {α : Type u_2} {s : Finset ι} [AddCommMonoid α] (f : ι → α) (h : ∀ c ∈ s, Even (f c)) : Even (∑ i ∈ s, f i) - Fin.sum_neg_one_pow 📋 Mathlib.Algebra.BigOperators.Fin
(R : Type u_3) [Ring R] (m : ℕ) : ∑ n, (-1) ^ ↑n = if Even m then 0 else 1 - neg_one_geom_sum 📋 Mathlib.Algebra.GeomSum
{R : Type u_1} [Ring R] {n : ℕ} : ∑ i ∈ Finset.range n, (-1) ^ i = if Even n then 0 else 1 - geom_sum_eq_zero_iff_neg_one 📋 Mathlib.Algebra.GeomSum
{R : Type u_1} {n : ℕ} {x : R} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] (hn : n ≠ 0) : ∑ i ∈ Finset.range n, x ^ i = 0 ↔ x = -1 ∧ Even n - geom_sum_neg_iff 📋 Mathlib.Algebra.GeomSum
{R : Type u_1} {n : ℕ} {x : R} [Ring R] [LinearOrder R] [IsStrictOrderedRing R] (hn : n ≠ 0) : ∑ i ∈ Finset.range n, x ^ i < 0 ↔ Even n ∧ x + 1 < 0 - geom_sum_alternating_of_le_neg_one 📋 Mathlib.Algebra.GeomSum
{R : Type u_1} {x : R} [Ring R] [PartialOrder R] [IsOrderedRing R] (hx : x + 1 ≤ 0) (n : ℕ) : if Even n then ∑ i ∈ Finset.range n, x ^ i ≤ 0 else 1 ≤ ∑ i ∈ Finset.range n, x ^ i - geom_sum_alternating_of_lt_neg_one 📋 Mathlib.Algebra.GeomSum
{R : Type u_1} {n : ℕ} {x : R} [Ring R] [PartialOrder R] [IsStrictOrderedRing R] (hx : x + 1 < 0) (hn : 1 < n) : if Even n then ∑ i ∈ Finset.range n, x ^ i < 0 else 1 < ∑ i ∈ Finset.range n, x ^ i - Finset.even_sum_iff_even_card_odd 📋 Mathlib.Algebra.BigOperators.Ring.Nat
{ι : Type u_1} {s : Finset ι} (f : ι → ℕ) : Even (∑ i ∈ s, f i) ↔ Even {x ∈ s | Odd (f x)}.card - Real.pow_arith_mean_le_arith_mean_pow_of_even 📋 Mathlib.Analysis.MeanInequalitiesPow
{ι : Type u} (s : Finset ι) (w z : ι → ℝ) (hw : ∀ i ∈ s, 0 ≤ w i) (hw' : ∑ i ∈ s, w i = 1) {n : ℕ} (hn : Even n) : (∑ i ∈ s, w i * z i) ^ n ≤ ∑ i ∈ s, w i * z i ^ n
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 b340a5b
serving mathlib revision 846a90c