-
Notifications
You must be signed in to change notification settings - Fork 58
Bernoulli sampling theorem #1645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hoheinzollern
wants to merge
27
commits into
math-comp:master
Choose a base branch
from
hoheinzollern:sampling_20250619
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,611
−52
Conversation
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
bda9c53
to
e04452c
Compare
e04452c
to
48017bb
Compare
replaces the sampling PR#1240
a consequence and integral_sum can be generalized from eqType to Type.
bf35f13
to
65a0eff
Compare
CI green |
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 contains the Bernoulli sampling theorem as described in the paper:
Formalizing concentration inequalities in Rocq: infrastructure and automation
by Reynald Affeldt, Alessandro Bruni, Cyril Cohen, Pierre Roux, Takafumi Saikawa
Much of the code leading up to this formalization has already been integrated through various PRs in MathComp and MathComp-Analysis where appropriate. See Figure 2 of the paper for a detailed explanation of the formalized theories developed for this PR, and the list below for references to the merged PRs.
Structure of the proof
The proof is inspired by Rajani's pen and paper proof.
One key lemma is
mmt_gen_fun_expectation
, which establishes the expectation of the moment generating function of a Bernoulli trial using the product probability measure.Then follows the proof
bernoulli_trial_mmt_gen_fun
, which establishes that the moment generating function of a Bernoulli trial is the product of each moment generating function.One key step in the above proofs is to show:
i.e. that the expectation of the product of random variables on the power measure of P is the product of the expectations of each variable with probability measure P.
To prove our final results, we need to establish a sequence of key analytical lemmas, namely:
exp2_le8
:xlnx_lbound_i01
: lower bound forxlnx_ubound_i1y
: upper bound forThe proof itself is split into a sequence of intermediate (concentration) inequalities:
sampling_ineq1
: Concentration inequality on a Bernoulli trialsampling_ineq2
: Specialization ofsampling_ineq1
usingxlnx_lbound_i12
sampling_ineq3
: Concentration inequality on a Bernoulli trialsampling_ineq4
: Combines the previous two inequalities to obtain a bound on the probability ofFinally,
sampling
is the main sampling theorem combining the above inequalities.Notes on the current state of this PR
Much of this formalization has already been integrated in MathComp and MathComp-Analysis, and the goal of the current PR is to serve as a compendium to the paper. A few integration tasks currently remain:
power_measure
), is not yet integrated into MathComp-Analysis as of version 1.12. The plan is to merge it into the next release.As these elements get integrated into the main branches, this PR will shrink to contain only the Bernoulli sampling theorem.
PRs leading up to this one
This is a (somewhat complete) list of PRs to Analysis that have been branched out of this sampling theorem:
measurable_ln
#1602exp.v
#939In additions to these PRs, this development contributed the following commits and PRs to MathComp:
subset_itv
math-comp#1380