Skip to content

[Merged by Bors] - feat(Probability/Moments): add mgf_smul_left#19798

Closed
Vilin97 wants to merge 2 commits into
masterfrom
vilin97-mgf
Closed

[Merged by Bors] - feat(Probability/Moments): add mgf_smul_left#19798
Vilin97 wants to merge 2 commits into
masterfrom
vilin97-mgf

Conversation

@Vilin97

@Vilin97 Vilin97 commented Dec 8, 2024

Copy link
Copy Markdown
Collaborator

Add mgf_smul_left.

While there is a lemma IndepFun.mgf_add that describes the additive behavior of the moment generating function, there is currently no lemma describing the (scalar-)multiplicative behavior.

This lemma is one of the ~4 supporting lemmas we have proved on our way to formalizing the central limit theorem. We will make PRs for other lemmas as well.

Co-authored-by: Siyuan Ge [email protected]


Open in Gitpod

@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 Dec 8, 2024
@github-actions

github-actions Bot commented Dec 8, 2024

Copy link
Copy Markdown

PR summary 2e46ac1b16

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ mgf_smul_left

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

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

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/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).

@github-actions github-actions Bot added the t-measure-probability Measure theory / Probability theory label Dec 8, 2024
@Vilin97 Vilin97 changed the title Add mgf_smul_left. feat(Probability/Moments): add mgf_smul_left Dec 9, 2024
@Vilin97 Vilin97 added the easy < 20s of review time. See the lifecycle page for guidelines. label Dec 9, 2024
Comment thread Mathlib/Probability/Moments.lean Outdated
theorem cgf_neg : cgf (-X) μ t = cgf X μ (-t) := by simp_rw [cgf, mgf_neg]

theorem mgf_smul_left (α : ℝ) : mgf (α • X) μ t = mgf X μ (t * α) := by
simp_rw [mgf, Pi.smul_apply, smul_eq_mul, mul_assoc]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
simp_rw [mgf, Pi.smul_apply, smul_eq_mul, mul_assoc]
simp_rw [mgf, Pi.smul_apply, smul_eq_mul, mul_assoc]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there a good reason for reordering the variables? We have alpha to the left of t on one side, and t to the left of alpha on the other side.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The reordering is an illusion. After an application of mgf, the goal is ∫ (x : Ω), rexp (t * (α • X) x) ∂μ = ∫ (x : Ω), rexp (t * α * X x) ∂μ. Having said that, I have now switched the statement to α * t with an extra application of mul_comm

@Ruben-VandeVelde Ruben-VandeVelde left a comment

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.

This seems fine.

maintainer merge

@github-actions

github-actions Bot commented Dec 9, 2024

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by Ruben-VandeVelde.

@github-actions github-actions Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Dec 9, 2024
@kim-em

kim-em commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

bors merge

@ghost ghost added the ready-to-merge This PR has been sent to bors. label Dec 10, 2024
mathlib-bors Bot pushed a commit that referenced this pull request Dec 10, 2024
Add `mgf_smul_left`.

While there is a lemma [IndepFun.mgf_add](https://leanprover-community.github.io/mathlib4_docs/Mathlib/Probability/Moments.html#ProbabilityTheory.IndepFun.mgf_add) that describes the additive behavior of the moment generating function, there is currently no lemma describing the (scalar-)multiplicative behavior. 

This lemma is one of the ~4 supporting lemmas we have proved on our way to formalizing the central limit theorem. We will make PRs for other lemmas as well.

Co-authored-by: Siyuan Ge <[email protected]>
@mathlib-bors

mathlib-bors Bot commented Dec 10, 2024

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(Probability/Moments): add mgf_smul_left [Merged by Bors] - feat(Probability/Moments): add mgf_smul_left Dec 10, 2024
@mathlib-bors mathlib-bors Bot closed this Dec 10, 2024
@mathlib-bors mathlib-bors Bot deleted the vilin97-mgf branch December 10, 2024 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

easy < 20s of review time. See the lifecycle page for guidelines. maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. 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-measure-probability Measure theory / Probability theory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants