feat(Probability): add API for infinite product measures#39503
Open
jvanwinden wants to merge 2 commits into
Open
feat(Probability): add API for infinite product measures#39503jvanwinden wants to merge 2 commits into
jvanwinden wants to merge 2 commits into
Conversation
PR summary 2b6e69e442
|
| File | Base Count | Head Count | Change |
|---|---|---|---|
| Mathlib.Probability.ProductMeasure | 2441 | 2453 | +12 (+0.49%) |
Import changes for all files
| Files | Import difference |
|---|---|
Mathlib.Probability.ProductMeasure |
12 |
Declarations diff
+ Measure.map_infinitePi_infinitePi_of_inj
+ hasLaw_infinitePi_eval
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.
No changes to strong technical debt.
No changes to weak technical debt.
CoolRmal
reviewed
May 17, 2026
Contributor
CoolRmal
left a comment
There was a problem hiding this comment.
I think you should move the first lemmas into other places. No theorems in Mathlib start with ProbabilityTheory.Measure (so maybe you should also change your description of this PR).
Maybe you can move map_infinitePi_infinitePi_of_inj into Mathlib.Probability.ProductMeasure, and use it to golf (or prove analogues of) infinitePi_map_piCongrLeft
| rw [← infinitePi_map_eval P i, map_map (mX i) (by fun_prop), Function.comp_def] | ||
|
|
||
| lemma Measure.map_infinitePi_infinitePi_of_inj {Ω : ι → Type*} {mΩ : ∀ i, MeasurableSpace (Ω i)} | ||
| {P : (i : ι) → Measure (Ω i)} [∀ i, IsProbabilityMeasure (P i)] {f : ι → ι} |
Contributor
There was a problem hiding this comment.
Suggested change
| {P : (i : ι) → Measure (Ω i)} [∀ i, IsProbabilityMeasure (P i)] {f : ι → ι} | |
| {P : (i : ι) → Measure (Ω i)} [∀ i, IsProbabilityMeasure (P i)] {f : α → ι} |
This domain of f can be an arbitrary type.
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.
This PR introduces two lemmas which serve as API for infinite product measures:
ProbabilityTheory.Measure.hasLaw_infinitePi_eval: thei-th coordinate on an infinite product measure has lawμ iProbabilityTheory.Measure.map_infinitePi_infinitePi_of_inj: whenf : ι → ιis injective, then the pushforward of the coordinates rearranged according tof(i.e., the law offun ω i ↦ ω (f i)is the same as the infinite product of the rearranged laws.The second lemma bears some resemblance to
infinitePi_map_piCongrLeft, but does not requirefto be a bijection and probably is easier to work with in practice.