BanditRLlib
Lean gate passed before this site build; local proof declarations are shown as compiled.Lean-verified build · exact declarations linked.

Lean module · Foundations

BanditRLProof.LowerBounds.GaussianHypothesisTesting

This module formalizes the distribution-level threshold test used at the start of Lattimore--Szepesvári, Chapter 13.1. The source observes that a sample mean from n independent unit-variance Gaussian observations has variance 1 / n. We expose that Gaussian mean-observation law, identify the two error events, and prove the standard Chernoff upper bound exp (-n * gap^2 / 8) for both hypotheses and therefore for their maximum error probability.

Module map

Declarations
22
Placeholders
0

Imports

BanditRLProof.LowerBounds.BasicIdeas, BanditRLProof.LowerBounds.GaussianMillsRatio

Imported by

BanditRLProof, BanditRLProof.LowerBounds.SubgaussianMinimax

Declarations

Open an item to read its exact compact statement and source link. Detailed teaching notes are linked when registered.

def BanditRLProof.LowerBounds.gaussianSampleMeanVariance Compiled

Variance `1 / n` of the mean of `n` unit-variance observations.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanVariance

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

def gaussianSampleMeanVariance (sampleSize : Nat) : NNReal
theorem BanditRLProof.LowerBounds.gaussianSampleMeanVariance_pos Compiled

The source's sample-mean variance is nondegenerate for a positive sample size.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanVariance_pos

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianSampleMeanVariance_pos (sampleSize : Nat) (hsampleSize : 0 < sampleSize) : 0 < gaussianSampleMeanVariance sampleSize
def BanditRLProof.LowerBounds.gaussianSampleMeanLaw Compiled

The Gaussian law stated in Chapter 13.1 for the sample mean observation.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanLaw

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def gaussianSampleMeanLaw (sampleSize : Nat) (mean : Real) : Measure Real
def BanditRLProof.LowerBounds.gaussianIIDObservationLaw Compiled

Canonical joint law of `n` independent `N(mean, 1)` observations.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianIIDObservationLaw

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def gaussianIIDObservationLaw (sampleSize : Nat) (mean : Real) : Measure (Fin sampleSize → Real)
def BanditRLProof.LowerBounds.gaussianCoordinateAverage Compiled

Arithmetic mean of a finite coordinate family.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianCoordinateAverage

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

def gaussianCoordinateAverage (sampleSize : Nat) (observations : Fin sampleSize → Real) : Real
theorem BanditRLProof.LowerBounds.gaussianIIDSumLaw Compiled

The sum of the canonical iid observations has mean `n * mean` and variance `n`.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianIIDSumLaw

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianIIDSumLaw (sampleSize : Nat) (mean : Real) : (gaussianIIDObservationLaw sampleSize mean).map (fun observations => ∑ i, observations i) = gaussianReal ((sampleSize : Real) * mean) (sampleSize : NNReal)
theorem BanditRLProof.LowerBounds.gaussianIIDSampleMeanLaw Compiled

The arithmetic mean under the canonical product law of `n > 0` independent `N(mean, 1)` observations has exactly the source law `N(mean, 1 / n)`.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianIIDSampleMeanLaw

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianIIDSampleMeanLaw (sampleSize : Nat) (mean : Real) (hsampleSize : 0 < sampleSize) : (gaussianIIDObservationLaw sampleSize mean).map (gaussianCoordinateAverage sampleSize) = gaussianSampleMeanLaw sampleSize mean
def BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision Compiled

Threshold rule for the two hypotheses `mean = 0` and `mean = gap`. Ties are assigned to `gap`, matching the source's zero-mean error event `sampleMean >= gap / 2`; for a nondegenerate Gaussian law, the tie has mass zero.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

def twoPointGaussianThresholdDecision (gap observation : Real) : Real
theorem BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision_zero_error_event Compiled

Under the zero-mean hypothesis, the threshold rule errs exactly above the midpoint.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision_zero_error_event

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem twoPointGaussianThresholdDecision_zero_error_event {gap : Real} (hgap : 0 < gap) : {observation | twoPointGaussianThresholdDecision gap observation ≠ 0} = Set.Ici (gap / 2)
theorem BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision_gap_error_event Compiled

Under the positive-mean hypothesis, errors occur exactly below the midpoint.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.twoPointGaussianThresholdDecision_gap_error_event

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem twoPointGaussianThresholdDecision_gap_error_event {gap : Real} (hgap : 0 < gap) : {observation | twoPointGaussianThresholdDecision gap observation ≠ gap} = Set.Iio (gap / 2)
def BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability Compiled

Error probability of the threshold decision under the zero-mean sample-mean law.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def gaussianSampleMeanZeroErrorProbability (sampleSize : Nat) (gap : Real) : Real
def BanditRLProof.LowerBounds.gaussianSampleMeanGapErrorProbability Compiled

Error probability of the threshold decision under the positive-mean sample-mean law.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanGapErrorProbability

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def gaussianSampleMeanGapErrorProbability (sampleSize : Nat) (gap : Real) : Real
theorem BanditRLProof.LowerBounds.hasSubgaussianMGF_id_gaussianReal_zero Compiled

A centered real Gaussian has its variance as a sub-Gaussian proxy.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.hasSubgaussianMGF_id_gaussianReal_zero

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem hasSubgaussianMGF_id_gaussianReal_zero (variance : NNReal) : HasSubgaussianMGF id variance (gaussianReal 0 variance)
theorem BanditRLProof.LowerBounds.hasSubgaussianMGF_gap_sub_id_gaussianReal Compiled

Reflection around the mean turns `N(gap, variance)` into a centered sub-Gaussian.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.hasSubgaussianMGF_gap_sub_id_gaussianReal

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem hasSubgaussianMGF_gap_sub_id_gaussianReal (gap : Real) (variance : NNReal) : HasSubgaussianMGF (fun observation => gap - observation) variance (gaussianReal gap variance)
theorem BanditRLProof.LowerBounds.gaussianReal_zero_Ici_le_exp_neg_sq_div_two_variance Compiled

Chernoff upper bound for a centered Gaussian right tail.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianReal_zero_Ici_le_exp_neg_sq_div_two_variance

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianReal_zero_Ici_le_exp_neg_sq_div_two_variance (variance : NNReal) (threshold : Real) (hthreshold : 0 ≤ threshold) : (gaussianReal 0 variance).real (Set.Ici threshold) ≤ Real.exp (-threshold ^ 2 / (2 * (variance : Real)))
theorem BanditRLProof.LowerBounds.gaussianReal_gap_Iio_half_le_exp_neg_sq_div_two_variance Compiled

The positive-mean midpoint error has the same Chernoff exponent by reflection.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianReal_gap_Iio_half_le_exp_neg_sq_div_two_variance

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianReal_gap_Iio_half_le_exp_neg_sq_div_two_variance (gap : Real) (variance : NNReal) (hgap : 0 < gap) : (gaussianReal gap variance).real (Set.Iio (gap / 2)) ≤ Real.exp (-(gap / 2) ^ 2 / (2 * (variance : Real)))
theorem BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability_le_exp Compiled

For the Chapter 13.1 zero-mean branch, the midpoint threshold has error at most `exp (-n * gap^2 / 8)` under the stated `N(0, 1/n)` sample-mean law.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability_le_exp

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianSampleMeanZeroErrorProbability_le_exp (sampleSize : Nat) (gap : Real) (hgap : 0 < gap) : gaussianSampleMeanZeroErrorProbability sampleSize gap ≤ Real.exp (-(sampleSize : Real) * gap ^ 2 / 8)
theorem BanditRLProof.LowerBounds.gaussianSampleMeanGapErrorProbability_le_exp Compiled

For the positive-mean branch, the same midpoint rule has the identical `exp (-n * gap^2 / 8)` Chernoff upper bound.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanGapErrorProbability_le_exp

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianSampleMeanGapErrorProbability_le_exp (sampleSize : Nat) (gap : Real) (hgap : 0 < gap) : gaussianSampleMeanGapErrorProbability sampleSize gap ≤ Real.exp (-(sampleSize : Real) * gap ^ 2 / 8)
def BanditRLProof.LowerBounds.gaussianSampleMeanThresholdRisk Compiled

Worst of the two midpoint-decision error probabilities.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanThresholdRisk

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

noncomputable def gaussianSampleMeanThresholdRisk (sampleSize : Nat) (gap : Real) : Real
theorem BanditRLProof.LowerBounds.gaussianSampleMeanThresholdRisk_le_exp Compiled

Both Gaussian hypotheses obey the same source-shaped Chernoff exponent.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanThresholdRisk_le_exp

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianSampleMeanThresholdRisk_le_exp (sampleSize : Nat) (gap : Real) (hgap : 0 < gap) : gaussianSampleMeanThresholdRisk sampleSize gap ≤ Real.exp (-(sampleSize : Real) * gap ^ 2 / 8)
theorem BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability_mills_bounds Compiled

Exact Mills bounds for the source error probability, in standardized coordinates.

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability_mills_bounds

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianSampleMeanZeroErrorProbability_mills_bounds (sampleSize : Nat) (hsampleSize : 0 < sampleSize) (gap : Real) (hgap : 0 < gap) : let z := (gap / 2) / Real.sqrt (2 * (gaussianSampleMeanVariance sampleSize : Real)) Real.exp (-z ^ 2) / (z + Real.sqrt (z ^ 2 + 2)) / Real.sqrt Real.pi ≤ gaussianSampleMeanZeroErrorProbability sampleSize gap ∧ gaussianSampleMeanZeroErrorProbability sampleSize gap ≤ Real.exp (-z ^ 2) / (z + Real.sqrt (z ^ 2 + 4 / Real.pi)) / Real.sqrt Real.pi
theorem BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability_source_bounds Compiled

The exact printed two-sided Gaussian testing inequality, Eq. (13.1).

Used in these reading views: Bandit Book

1. Finite bandits, traces, and regret · Chapter 13: Lower Bounds: Basic Ideas

Canonical node identitydeclaration:BanditRLProof.LowerBounds.gaussianSampleMeanZeroErrorProbability_source_bounds

Reading membership is not a proof dependency. Exact assumptions remain in the Lean statement.

theorem gaussianSampleMeanZeroErrorProbability_source_bounds (sampleSize : Nat) (hsampleSize : 0 < sampleSize) (gap : Real) (hgap : 0 < gap) : let q := (sampleSize : Real) * gap ^ 2 Real.sqrt (8 / Real.pi) * Real.exp (-q / 8) / (Real.sqrt q + Real.sqrt (q + 16)) ≤ gaussianSampleMeanZeroErrorProbability sampleSize gap ∧ gaussianSampleMeanZeroErrorProbability sampleSize gap ≤ Real.sqrt (8 / Real.pi) * Real.exp (-q / 8) / (Real.sqrt q + Real.sqrt (q + 32 / Real.pi))