Skip to content

[Merged by Bors] - feat(Analysis/MeanInequalities): HM-GM inequality#13721

Closed
luigi-massacci wants to merge 4 commits intomasterfrom
HM-GM-inequality
Closed

[Merged by Bors] - feat(Analysis/MeanInequalities): HM-GM inequality#13721
luigi-massacci wants to merge 4 commits intomasterfrom
HM-GM-inequality

Conversation

@luigi-massacci
Copy link
Copy Markdown
Collaborator

@luigi-massacci luigi-massacci commented Jun 11, 2024

We derive the inequality between the harmonic and geometric mean as a consequence of AM-GM for positive real valued functions from a Finset. We state a weighted as well as the classical version.


Open in Gitpod

@luigi-massacci luigi-massacci added awaiting-review t-analysis Analysis (normed *, calculus) labels Jun 11, 2024
@luigi-massacci luigi-massacci requested a review from sgouezel June 11, 2024 12:18
@github-actions github-actions bot added the new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! label Jun 11, 2024
@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 11, 2024

PR summary 48b77b8d2f

Import changes

No significant changes to the import graph


Declarations diff

+ harm_mean_le_geom_mean
+ harm_mean_le_geom_mean_weighted

You can run this locally as follows
## summary with just the declaration names:
./scripts/no_lost_declarations.sh short <optional_commit>

## more verbose report:
./scripts/no_lost_declarations.sh <optional_commit>

Copy link
Copy Markdown
Contributor

@sgouezel sgouezel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very good, thanks!

theorem harm_mean_le_geom_mean {ι : Type*} (s : Finset ι) (hs : Finset.Nonempty s) (w : ι → ℝ)
(z : ι → ℝ) (hw : ∀ i ∈ s, 0 < w i) (hw' : 0 < ∑ i in s, w i) (hz : ∀ i ∈ s, 0 < z i) :
(∑ i in s, w i)/(∑ i in s, w i / z i) ≤ (∏ i in s, z i ^ w i) ^ (∑ i in s, w i)⁻¹ := by
have := harm_mean_le_geom_mean_weighted s (fun i => (w i) / ∑ i in s, w i) z hs ?_ ?_ hz
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The style with have := with metavariables on the right hand side (creating new goals) is not always the most readable. Often, it's more readable to use suffices. Although here the thing you would have to write is quite long, so it's not clear. Do as you prefer! (but keeping readability in mind :-)

@luigi-massacci luigi-massacci dismissed pitmonticone’s stale review June 23, 2024 09:27

All other theorems in the file require the arguments explicitly

@sgouezel
Copy link
Copy Markdown
Contributor

bors r+
Thanks!

@github-actions github-actions bot added ready-to-merge This PR has been sent to bors. and removed awaiting-review labels Jun 23, 2024
mathlib-bors bot pushed a commit that referenced this pull request Jun 23, 2024
We derive the inequality between the harmonic and geometric mean as a consequence of AM-GM for positive real valued functions from a `Finset`. We state a weighted as well as the classical version.
@mathlib-bors
Copy link
Copy Markdown
Contributor

mathlib-bors bot commented Jun 23, 2024

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors bot changed the title feat(Analysis/MeanInequalities): HM-GM inequality [Merged by Bors] - feat(Analysis/MeanInequalities): HM-GM inequality Jun 23, 2024
@mathlib-bors mathlib-bors bot closed this Jun 23, 2024
@mathlib-bors mathlib-bors bot deleted the HM-GM-inequality branch June 23, 2024 12:36
kbuzzard pushed a commit that referenced this pull request Jun 26, 2024
We derive the inequality between the harmonic and geometric mean as a consequence of AM-GM for positive real valued functions from a `Finset`. We state a weighted as well as the classical version.
dagurtomas pushed a commit that referenced this pull request Jul 2, 2024
We derive the inequality between the harmonic and geometric mean as a consequence of AM-GM for positive real valued functions from a `Finset`. We state a weighted as well as the classical version.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-contributor This PR was made by a contributor with at most 5 merged PRs. Welcome to the community! ready-to-merge This PR has been sent to bors. t-analysis Analysis (normed *, calculus)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants