Proposition 5: sequential graphical testing controls FWER
ProvedLearnThenTest.sgt_controls_fwerLet . Let be initial error budgets with . Let be edge weights with and for every . Then sequential graphical testing (Algorithm 2, Bretz et al. 2009) with this graph is an FWER-controlling algorithm at level in the sense of Definition 2. This holds for every rule that chooses which eligible hypothesis to reject at each step.
At each step the procedure rejects some unrejected with . It then passes 's budget to its neighbours, , and updates the graph, .
Formalization Note "Choose any " is modelled by an arbitrary choice rule. The rule sees the current state and the set of eligible hypotheses, and it must return an eligible hypothesis. The loop condition is restricted to unrejected hypotheses. Read literally, the printed condition never terminates when a rejected hypothesis has (its level has been set to ), but such a step changes nothing. A in the weight update is read as . The nonnegativity is implicit in the paper. The printed constraint has in place of .
import Mathlib import Definitions.Def_LearnThenTest_Basic open MeasureTheory ProbabilityTheory Filter
namespace LearnThenTest
theorem sgt_controls_fwer (N : ℕ) (δ : ℝ) (hδ : 0 < δ ∧ δ < 1) (δ0 : Fin N → ℝ)
(hδ0 : ∀ i, 0 ≤ δ0 i) (hsum : ∑ i, δ0 i = δ) (g : Fin N → Fin N → ℝ)
(hg : ∀ i j, g i j ∈ Set.Icc (0 : ℝ) 1) (hgii : ∀ i, g i i = 0)
(hgsum : ∀ i, ∑ j, g i j ≤ 1) (pick : SGTState N → Finset (Fin N) → Fin N)
(hpick : ∀ s S, S.Nonempty → pick s S ∈ S) :
IsFWERControlling N δ (sgt N pick δ0 g) := by sorry
end LearnThenTestRead-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix:
- a natural number and the index set ;
- a real number with ;
- initial levels with every and ;
- a real matrix satisfying, for all :
- a choice rule . It takes a state (described below) and a finite set , and returns an index in . The only requirement is that whenever is nonempty. Its value on is unconstrained.
When the sum is empty and equals , so cannot hold. For the theorem is therefore vacuous. For the hypotheses can be satisfied, for example with and .
The procedure. The procedure acts on a vector .
A state is a triple . Here is the set rejected so far, the are real levels, and the are real weights. The initial state is .
One step works as follows:
- Form the eligible set .
- If , the state is left unchanged.
- Otherwise, let . The new state is defined by:
- ;
- for , and otherwise. In particular .
- For with :
and otherwise. A zero denominator, which happens when , is interpreted as giving the value .
The step is applied exactly times, and is the final rejected set .
Assertion. The theorem states that is FWER-controlling at level . This means two things.
-
Measurability. For every , the set is measurable with respect to the product Borel -algebra on .
-
Error control. Take any probability measure on and any subset . Suppose that:
- -almost every has all coordinates in ;
- for every , the coordinate is a valid p-value under , meaning for every .
Then
Equivalently, the probability that contains no index of is at least .
Scope of the quantifiers.
- No condition is placed on the dependence between coordinates.
- No condition is placed on the coordinates outside , other than lying almost surely in .
- The case is included; there the conclusion is trivial.
- The choice rule may depend on the whole current state and on the eligible set, but not otherwise on .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.