Skip to content

feat(Algebra/Order/Chebyshev): the Abel inequality - #43058

Open
teorth wants to merge 10 commits into
leanprover-community:masterfrom
teorth:chebyshev-abel-sum-inequality
Open

feat(Algebra/Order/Chebyshev): the Abel inequality#43058
teorth wants to merge 10 commits into
leanprover-community:masterfrom
teorth:chebyshev-abel-sum-inequality

Conversation

@teorth

@teorth teorth commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Adds Finset.sum_mul_le_sum_mul_of_sum_range_le, a form of Abel's inequality: if
the partial sums of f are dominated by those of c up to n, and g is nonnegative
and antitone, then the g-weighted sums satisfy ∑ f i * g i ≤ ∑ c i * g i. Proved by
summation by parts (Finset.sum_range_by_parts), over any ordered commutative ring. Other common variants of Abel's inequality are also deduced as a corollary.


I chose to place this inequality in Mathlib.Algebra.Order.Chebyshev,although technically the Chebyshev inequality and Abel inequality have no logical dependency and one could place them instead in a separate file such as, `Mathlib.Algebra.Order.Abel'. Happy to do this instead of the reviewers request it; but the two inequalities are thematically related even if they are logically independent.

This PR is stacked upon a unrelated previous PR to the same file, but if reviewers prefer to move these inequalities to a separate file then the dependency disappears. Both PRs will be used in a forthcoming PR on the prime number theorem.

AI was used to generate initial proofs of these lemmas, which were then heavily rewritten and golfed by the author.

Open in Gitpod

teorth and others added 8 commits August 17, 2026 09:34
Add `Multiset.sq_sum_le_card_mul_sum_sq`, the multiset analogue of the
existing `sq_sum_le_card_mul_sum_sq`:
`m.sum ^ 2 ≤ m.card * (m.map (· ^ 2)).sum`.
It is derived from the `Finset` version via `Multiset.toEnumFinset`.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Felix Pernegger <s59fpern@uni-bonn.de>
Co-authored-by: Felix Pernegger <s59fpern@uni-bonn.de>
Add `Finset.sum_mul_le_sum_mul_of_sum_range_le` (comparison form) together with
the one-sided upper/lower forms (`sum_mul_le_mul_of_sum_range_le`,
`mul_le_sum_mul_of_le_sum_range`) and the absolute-value form
(`abs_sum_mul_le_mul_of_abs_sum_range_le`), all via summation by parts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the t-algebra Algebra (groups, rings, fields, etc) label Aug 23, 2026
@github-actions

github-actions Bot commented Aug 23, 2026

Copy link
Copy Markdown

PR summary 28af7f245d

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.Algebra.Order.Chebyshev 1039 1058 +19 (+1.83%)
Import changes for all files
Files Import difference
6 files Mathlib.Combinatorics.Additive.Corner.Roth Mathlib.Combinatorics.SimpleGraph.Regularity.Bound Mathlib.Combinatorics.SimpleGraph.Regularity.Chunk Mathlib.Combinatorics.SimpleGraph.Regularity.Increment Mathlib.Combinatorics.SimpleGraph.Regularity.Lemma Mathlib.Combinatorics.SimpleGraph.Triangle.Removal
1
Mathlib.Algebra.Order.Chebyshev 19

Declarations diff (regex)

+ Multiset.sq_sum_le_card_mul_sum_sq
+ abs_sum_mul_le_mul_of_abs_sum_range_le
+ mul_le_sum_mul_of_le_sum_range
+ prod_map_eq_prod_toEnumFinset
+ sum_mul_le_mul_of_sum_range_le
+ sum_mul_le_sum_mul_of_sum_range_le

You can run this locally as follows
## from your `mathlib4` directory:
git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci

## summary with just the declaration names:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh <optional_commit>

## more verbose report:
../mathlib-ci/scripts/pr_summary/declarations_diff.sh long <optional_commit>

The doc-module for scripts/pr_summary/declarations_diff.sh in the mathlib-ci repository contains some details about this script.

Declarations diff (Lean)

Lean-aware diff — post-build, computed from the Lean environment (commit 28af7f2).

  • +7 new declarations
  • −0 removed declarations
+Finset.abs_sum_mul_le_mul_of_abs_sum_range_le
+Finset.mul_le_sum_mul_of_le_sum_range
+Finset.sum_mul_le_mul_of_sum_range_le
+Finset.sum_mul_le_sum_mul_of_sum_range_le
+Multiset.prod_map_eq_prod_toEnumFinset
+Multiset.sq_sum_le_card_mul_sum_sq
+Multiset.sum_map_eq_sum_toEnumFinset

No changes to strong technical debt.

No changes to weak technical debt.

Current commit 28af7f245d
Reference commit 1ce330756f

This script lives in the mathlib-ci repository. To run it locally, from your mathlib4 directory:

git clone https://github.com/leanprover-community/mathlib-ci.git ../mathlib-ci
../mathlib-ci/scripts/reporting/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@mathlib-dependent-issues mathlib-dependent-issues Bot added the blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) label Aug 23, 2026
@mathlib-dependent-issues

Copy link
Copy Markdown

This PR/issue depends on:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-by-other-PR This PR depends on another PR (this label is automatically managed by a bot) t-algebra Algebra (groups, rings, fields, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant