Solution (source code)

= Solution

The <familywise error rate> is the probability of rejecting at least one true null:
$$
\boxed{\operatorname{FWER}=\mathbb P\left(\bigcup_{i\in I_0}\{H_i\text{ is rejected}\}\right).}
$$
A valid <p-value> is <super-uniform> under its null: $\mathbb P(p_i\leq t)\leq t$ for $0\leq t\leq1$. The <Bonferroni correction> rejects $H_i$ if $p_i\leq\alpha/m$. The <union bound> gives
$$
\operatorname{FWER}\leq\sum_{i\in I_0}\mathbb P(p_i\leq\alpha/m)\leq\frac{|I_0|}{m}\alpha\leq\alpha.
$$
This controls the <familywise error rate> for every configuration of true and false nulls, without any independence assumption on the <p-values>.

For a nonempty index set $I\subseteq\{1,\ldots,m\}$, the <intersection hypothesis> $H_I=\bigcap_{i\in I}H_i$ asserts that every null indexed by $I$ holds. The <closure of a family of statistical hypotheses> consists of all these nonempty intersections, including the original hypotheses. For each intersection choose a local test $\phi_I$ of size at most $\alpha$ under $H_I$. Such tests always exist: for example, within $I$ use the <Bonferroni correction>, rejecting $H_I$ if $\min_{i\in I}p_i\leq\alpha/|I|$. More powerful local intersection tests can be substituted whenever valid.

The <closed testing procedure> rejects an elementary hypothesis $H_i$ only when every local test $\phi_I$ with $i\in I$ rejects its intersection hypothesis. If $I_0\ne\varnothing$, the intersection $H_{I_0}$ is true. Rejecting any true $H_i$ requires rejection by its local test $\phi_{I_0}$, so
$$
\boxed{\operatorname{FWER}\leq\mathbb P(\phi_{I_0}=1)\leq\alpha.}
$$
If $I_0=\varnothing$, there is no possible false rejection. This proves <closed-testing control of the familywise error rate>. The same argument applies if <intersection hypotheses> themselves are reported as rejected: requiring all their supersets to reject includes $I_0$ whenever the reported intersection is true.

Finally, consider the given hierarchical family as a <laminar family of sets>. Call a set $I\in\mathcal I$ true when $I\subseteq I_0$, so its entire <intersection hypothesis> is true. Let $\mathcal M$ be the inclusion-maximal true sets in $\mathcal I$. Distinct members of $\mathcal M$ are disjoint: if they met, laminarity would make one contain the other, contradicting maximality. Consequently,
$$
\sum_{J\in\mathcal M}|J|\leq|I_0|\leq m.
$$
Every true set $I$ lies in a maximal true $J$. If $H_I$ is rejected by the prescribed adjusted <p-value> rule, the maximum over its ancestors includes $J$, hence
$$
p_J\leq\frac{\alpha|J|}{m}.
$$
Thus the event of any false rejection is contained in the union of these events over the disjoint maximal true sets. Using validity of each $p_J$ under its true intersection and the <union bound>,
$$
\boxed{\mathbb P(\text{at least one false rejection})
\leq\sum_{J\in\mathcal M}\frac{\alpha|J|}{m}\leq\alpha.}
$$
Equivalently, with probability at least $1-\alpha$ every rejection is correct. This proves <familywise error control for a laminar hypothesis family>. It requires neither independence nor the presence of all possible intersections or singletons in $\mathcal I$. Empty index sets are excluded, as required by the denominator $|J|$; if there are no true sets the result is immediate. Adjusted values exceeding one can be truncated at one without changing decisions for $\alpha<1$.