Skip to content

[Merged by Bors] - feat(MeasureTheory/Measure/Tight): portmanteau condition for compact sets#39543

Closed
jvanwinden wants to merge 20 commits into
leanprover-community:masterfrom
jvanwinden:portmanteau_compact
Closed

[Merged by Bors] - feat(MeasureTheory/Measure/Tight): portmanteau condition for compact sets#39543
jvanwinden wants to merge 20 commits into
leanprover-community:masterfrom
jvanwinden:portmanteau_compact

Conversation

@jvanwinden

Copy link
Copy Markdown
Contributor

One part of the portmanteau theorem states that a limsup condition for closed sets implies weak convergence of probability measures. In the situation where the measures are tight however, one only needs to check the limsup condition for compact sets.

This PR thus introduces tendsto_of_forall_isCompact_of_isTightMeasureSet, which is a version of tendsto_of_forall_isClosed_limsup_le but replaces IsClosed with IsCompact, under the additional hypothesis that the measures are tight.

I would have liked to put this lemma in MeasureTheory/Portmeanteau, but this created an import cycle. I am open to suggestions for where it could otherwise be moved.


Open in Gitpod

@github-actions

github-actions Bot commented May 18, 2026

Copy link
Copy Markdown

PR summary 118eff1b25

Import changes for modified files

Dependency changes

File Base Count Head Count Change
Mathlib.MeasureTheory.Measure.Tight 2375 1635 -740 (-31.16%)
Mathlib.MeasureTheory.Measure.TightNormed 2377 2247 -130 (-5.47%)
Mathlib.MeasureTheory.Measure.LevyConvergence 2693 2686 -7 (-0.26%)
Mathlib.MeasureTheory.Measure.Prokhorov 2395 2389 -6 (-0.25%)
Mathlib.MeasureTheory.Measure.Portmanteau 2369 2371 +2 (+0.08%)
Import changes for all files
Files Import difference
Mathlib.MeasureTheory.Measure.Tight -740
Mathlib.MeasureTheory.Measure.TightNormed -130
Mathlib.MeasureTheory.Measure.LevyConvergence -7
Mathlib.MeasureTheory.Measure.Prokhorov -6
Mathlib.Probability.CentralLimitTheorem -3
5 files Mathlib.MeasureTheory.Function.ConvergenceInDistribution Mathlib.MeasureTheory.Measure.FiniteMeasurePi Mathlib.MeasureTheory.Measure.FiniteMeasureProd Mathlib.MeasureTheory.Measure.LevyProkhorovMetric Mathlib.MeasureTheory.Measure.Portmanteau
2

Declarations diff

+ tendsto_of_forall_isCompact_of_isTightMeasureSet

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.

Current commit 118eff1b25
Reference commit 8d88d2ffc4

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

@github-actions github-actions Bot added the t-measure-probability Measure theory / Probability theory label May 18, 2026
Comment thread Mathlib/MeasureTheory/Measure/Tight.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Tight.lean Outdated
@RemyDegenne RemyDegenne added the awaiting-author A reviewer has asked the author a question or requested changes. label May 28, 2026
@jvanwinden

jvanwinden commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

By analogy with comments of @EtienneC30 in #39501 I also removed the T2Space assumption.

@jvanwinden

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label May 28, 2026

@EtienneC30 EtienneC30 left a comment

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.

Looks like the portmanteau theorem is used to prove metrizability of the space of probability measures, which in turn is used to prove one direction of the Prokhorov theorem. I'd say you can move this (i.e. exists_measure_iUnion_gt_of_isCompact_closure and isTightMeasureSet_of_isCompact_closure) in a new file which would go in a new folder Tight. This folder would contain a Basic file and a ProkhorovTheorem file with the results I mentioned above. Then you should be able to not import Portmanteau in Basic, so that you can put your result in Portmanteau.

Comment thread Mathlib/MeasureTheory/Measure/Tight.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Tight.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Tight.lean Outdated
@EtienneC30 EtienneC30 added the awaiting-author A reviewer has asked the author a question or requested changes. label May 29, 2026
@jvanwinden

jvanwinden commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

Looks like the portmanteau theorem is used to prove metrizability of the space of probability measures, which in turn is used to prove one direction of the Prokhorov theorem. I'd say you can move this (i.e. exists_measure_iUnion_gt_of_isCompact_closure and isTightMeasureSet_of_isCompact_closure) in a new file which would go in a new folder Tight. This folder would contain a Basic file and a ProkhorovTheorem file with the results I mentioned above. Then you should be able to not import Portmanteau in Basic, so that you can put your result in Portmanteau.

I think it might be confusing to have two separate files related to the Prokhorov theorem. I think that both directions of Prokhorov should live in the Tight folder.

Maybe the following could work:

  • create Tight/Basic which does not import Portmanteau
  • put both directions of Prokhorov's theorem into Tight/Prokhorov
  • put the new result in Portmanteau (which then imports Tight/Basic)

Do you think this would be good (if it can be made to work)?

@EtienneC30

Copy link
Copy Markdown
Member

I think it might be confusing to have two separate files related to the Prokhorov theorem.

This is already the case as the other direction is in Mathlib.MeasureTheory.Measure.Prokhorov. So you can put exists_measure_iUnion_gt_of_isCompact_closure and isTightMeasureSet_of_isCompact_closure there.

@jvanwinden

Copy link
Copy Markdown
Contributor Author

I have reorganized Prokhorov, Tight, and Portmanteau in the following way:

  • the backward direction of Prokhorov (compact closure implies tight) has been moved from Tight to Prokhorov
  • Prokhorov now has two sections: one for the forward direction and one for the backward direction
  • the new result is moved to Portmanteau, directly below MeasureTheory.tendsto_of_forall_isClosed_limsup_le. This way it can reuse the variables.

I have also tried to minimize the imports (using #min_imports) and the open and open scoped statements in all three files.

I think all the lemmas should still have the same names and function signature, but I do not know how to easily verify this. Is there a tool which can show all the changed declarations in a PR?

@jvanwinden

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label May 30, 2026
Comment thread Mathlib/MeasureTheory/Measure/Prokhorov.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Prokhorov.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Tight.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Tight.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Portmanteau.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Portmanteau.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Portmanteau.lean Outdated
Comment thread Mathlib/MeasureTheory/Measure/Prokhorov.lean Outdated
@EtienneC30

Copy link
Copy Markdown
Member

I think all the lemmas should still have the same names and function signature, but I do not know how to easily verify this. Is there a tool which can show all the changed declarations in a PR?

Regarding the names, the message from the bot lists the declaration diff. I don't know a tool that checks changes in signatures though.

@EtienneC30 EtienneC30 added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 1, 2026
@jvanwinden

Copy link
Copy Markdown
Contributor Author

I think all the lemmas should still have the same names and function signature, but I do not know how to easily verify this. Is there a tool which can show all the changed declarations in a PR?

Regarding the names, the message from the bot lists the declaration diff. I don't know a tool that checks changes in signatures though.

But the bot only runs when opening the PR, right? Is there a way to re-trigger it?

@EtienneC30

Copy link
Copy Markdown
Member

The comment is edited after each commit.

@EtienneC30

Copy link
Copy Markdown
Member

Hmm looks like I did not do a very good job with imports here.

public import Mathlib.MeasureTheory.Measure.Prod
public import Mathlib.MeasureTheory.Measure.Regular
public import Mathlib.Topology.Metrizable.CompletelyMetrizable

import Mathlib.MeasureTheory.Measure.RegularityCompacts

should work for Tight.

@jvanwinden

Copy link
Copy Markdown
Contributor Author

After merging master I had to change the imports in Tight again (because my other PR about product measures has since been merged...)

@jvanwinden

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 1, 2026
Comment thread Mathlib/MeasureTheory/Measure/TightNormed.lean Outdated
@EtienneC30 EtienneC30 added the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 2, 2026
@jvanwinden

Copy link
Copy Markdown
Contributor Author

-awaiting-author

@github-actions github-actions Bot removed the awaiting-author A reviewer has asked the author a question or requested changes. label Jun 2, 2026
@EtienneC30

Copy link
Copy Markdown
Member

Thanks!
maintainer merge

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

🚀 Pull request has been placed on the maintainer queue by EtienneC30.

@mathlib-triage mathlib-triage Bot added the maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. label Jun 3, 2026

@RemyDegenne RemyDegenne 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.

Thanks!
bors r+

mathlib-bors Bot pushed a commit that referenced this pull request Jun 3, 2026
…sets (#39543)

One part of the portmanteau theorem states that a limsup condition for closed sets implies weak convergence of probability measures. In the situation where the measures are tight however, one only needs to check the limsup condition for compact sets. 

This PR thus introduces `tendsto_of_forall_isCompact_of_isTightMeasureSet`, which is a version of [tendsto_of_forall_isClosed_limsup_le](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/Portmanteau.html#MeasureTheory.tendsto_of_forall_isClosed_limsup_le) but replaces `IsClosed` with `IsCompact`, under the additional hypothesis that the measures are tight.

I would have liked to put this lemma in MeasureTheory/Portmeanteau, but this created an import cycle. I am open to suggestions for where it could otherwise be moved.
@mathlib-triage mathlib-triage Bot added ready-to-merge This PR has been sent to bors. and removed maintainer-merge A reviewer has approved the changed; awaiting maintainer approval. labels Jun 3, 2026
@mathlib-bors

mathlib-bors Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Pull request successfully merged into master.

Build succeeded:

@mathlib-bors mathlib-bors Bot changed the title feat(MeasureTheory/Measure/Tight): portmanteau condition for compact sets [Merged by Bors] - feat(MeasureTheory/Measure/Tight): portmanteau condition for compact sets Jun 3, 2026
@mathlib-bors mathlib-bors Bot closed this Jun 3, 2026
Bergschaf pushed a commit to Bergschaf/mathlib4 that referenced this pull request Jun 3, 2026
…sets (leanprover-community#39543)

One part of the portmanteau theorem states that a limsup condition for closed sets implies weak convergence of probability measures. In the situation where the measures are tight however, one only needs to check the limsup condition for compact sets. 

This PR thus introduces `tendsto_of_forall_isCompact_of_isTightMeasureSet`, which is a version of [tendsto_of_forall_isClosed_limsup_le](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/Portmanteau.html#MeasureTheory.tendsto_of_forall_isClosed_limsup_le) but replaces `IsClosed` with `IsCompact`, under the additional hypothesis that the measures are tight.

I would have liked to put this lemma in MeasureTheory/Portmeanteau, but this created an import cycle. I am open to suggestions for where it could otherwise be moved.
ReemMelamed pushed a commit to ReemMelamed/mathlib4 that referenced this pull request Jun 20, 2026
…sets (leanprover-community#39543)

One part of the portmanteau theorem states that a limsup condition for closed sets implies weak convergence of probability measures. In the situation where the measures are tight however, one only needs to check the limsup condition for compact sets. 

This PR thus introduces `tendsto_of_forall_isCompact_of_isTightMeasureSet`, which is a version of [tendsto_of_forall_isClosed_limsup_le](https://leanprover-community.github.io/mathlib4_docs/Mathlib/MeasureTheory/Measure/Portmanteau.html#MeasureTheory.tendsto_of_forall_isClosed_limsup_le) but replaces `IsClosed` with `IsCompact`, under the additional hypothesis that the measures are tight.

I would have liked to put this lemma in MeasureTheory/Portmeanteau, but this created an import cycle. I am open to suggestions for where it could otherwise be moved.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants