Theorem 1: Learn then Test — FWER control yields risk control
ProvedLearnThenTest.learn_then_testLet be a finite parameter grid with risks , let , and let . Let be p-values with values in , defined on one probability space and arbitrarily dependent. Suppose that whenever holds, stochastically dominates the uniform distribution: for all . Let be an FWER-controlling algorithm at level , and let . Then
where the supremum over the empty set is .
Consequently, if a selection rule picks an element of whenever , then with probability at least , either (and the procedure abstains) or . In particular, if is never empty, then is an -RCP.
This is the main result of the paper. It reduces risk control for an arbitrary, possibly non-monotone, risk to computing valid p-values and running an FWER-controlling procedure.
Formalization Note The supremum is taken in . The paper's "selecting any , is an -RCP" is stated for a selection rule that may abstain when , which is the paper's convention in Section 1.1. Requiring on every outcome would make the hypothesis unsatisfiable in typical cases. The p-values are measurable and take values in , the domain of in Definition 2.
import Mathlib import Definitions.Def_LearnThenTest_Basic open MeasureTheory ProbabilityTheory Filter
namespace LearnThenTest
theorem learn_then_test {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω)
[IsProbabilityMeasure P] {N : ℕ} (R : Fin N → ℝ) (α δ : ℝ) (p : Fin N → Ω → ℝ)
(hp : ∀ j, Measurable (p j)) (hp01 : ∀ j ω, p j ω ∈ Set.Icc (0 : ℝ) 1)
(hvalid : ∀ j, α < R j → IsValidPValue P (p j))
(A : (Fin N → ℝ) → Finset (Fin N)) (hA : IsFWERControlling N δ A) :
ENNReal.ofReal (1 - δ) ≤
P {ω | (A (fun j => p j ω)).sup (fun j => (R j : WithBot ℝ)) ≤ (α : WithBot ℝ)} ∧
∀ lhat : Ω → Fin N,
(∀ ω, (A (fun j => p j ω)).Nonempty → lhat ω ∈ A (fun j => p j ω)) →
ENNReal.ofReal (1 - δ) ≤
P {ω | (A (fun j => p j ω)).Nonempty → R (lhat ω) ≤ α} := by sorry
end LearnThenTestRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Let be a probability space. Fix the following data, none of which carries further constraints unless listed:
- a natural number (including ), with index set ;
- real numbers , called "risks". These are arbitrary reals attached to indices and are not connected to any predictor or loss.
- real numbers and , with no sign or range restrictions;
- functions , each measurable, and each satisfying for every (pointwise, not just almost surely);
- a rule that assigns to each vector a subset .
Validity hypothesis. For every index with (strict inequality), is a valid p-value under :
Indices with , including , get no assumption.
FWER hypothesis on . is "FWER-controlling at level ", which means both of the following.
-
For every , the set is Borel measurable.
-
Consider any probability measure on and any subset such that:
- -almost every has all coordinates in , and
- for each , the coordinate is a valid p-value under , i.e. for all .
Then
Throughout, the bound is truncated at . So if , every lower bound below is trivially true. Write for the rejected set at outcome .
Conclusion. Both of the following hold.
- Every index in has risk at most , with high probability:
This is phrased in the code as a supremum of over being at most . The supremum of an empty set is , so outcomes where count as satisfying the event.
- Take any function , with no measurability required, such that whenever . Then
Two points about this claim:
- Outcomes with belong to the event automatically.
- Because need not be measurable, this event need not be measurable, and is then applied as an outer measure.
Degenerate cases.
- If , then is always empty, so claim 1 holds with probability .
- Also when , no function exists, because is nonempty (it carries a probability measure). Claim 2 is therefore vacuous.
The statement does not mention any joint law of explicitly. The FWER hypothesis is a condition quantified over all probability measures on .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.