feat(Algebra/Order/Chebyshev): the Abel inequality - #43058
Open
teorth wants to merge 10 commits into
Open
Conversation
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>
PR summary 28af7f245d
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Algebra.Order.Chebyshev | 1039 | 1058 | +19 (+1.83%) |
Import changes for all files
| Files | Import difference |
|---|---|
6 filesMathlib.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_toEnumFinsetNo 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
relativevalue is the weighted sum of the differences with weight given by the inverse of the current value of the statistic. - The
absolutevalue is therelativevalue divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).
|
This PR/issue depends on: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
Finset.sum_mul_le_sum_mul_of_sum_range_le, a form of Abel's inequality: ifthe partial sums of
fare dominated by those ofcup ton, andgis nonnegativeand antitone, then the
g-weighted sums satisfy∑ f i * g i ≤ ∑ c i * g i. Proved bysummation 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.