$\mathbf{Theorem}$ Let $\forall \alpha \in (0,1) \space \exists \space k$, such that for $W_0 = \{ x: p_1(x) \ge k p_0(x) \}$, $$\int_{W_0} p_0(x) d\mu(x)=\alpha$$
where $p_i(x)$ is the likelihood function under the hypothesis $i=0,1$. Then $\forall W$, such that $$\int_{W_0} p_0(x) d\mu(x) = \int_W p_0(x) d\mu(x) = \alpha$$ the following inequality is true: $$\int_{W_0} p_1(x) d\mu(x) \ge \int_W p_1(x) d\mu(x)$$ That is: an $H_0$ test based on the set $W_0$ is the most powerful test.
$\mathbf{Proof}$
This is taken directly from my textbook: \begin{align} \int_{W_0} p_1(x) d\mu(x) - \int_{W} p_1(x) d\mu(x) &= \int_{W_0-W} p_1(x) d\mu(x)- \int_{W-W_0} p_1(x) d\mu(x)\\ & \ge \int_{W_0-W} k p_0(x) d\mu(x)- \int_{W-W_0} k p_0(x) d\mu(x)\\ &= \int_{W_0} k p_0(x) d\mu(x) - \int_{W} k p_0(x) d\mu(x) \\ &= k \alpha - k \alpha\\ &=0 \end{align}
I don't understand the magic in the first line.
$$\int_{W_0-W} p_1(x) d\mu(x)- \int_{W-W_0} p_1(x) d\mu(x)$$
What is the meaning of $W_0 - W$? These are sets, so shouldn't we have $W_0 \setminus W$ instead?
I know we can't directly say that $$\int_{W_0} p_1(x) d\mu(x) - \int_{W} p_1(x) d\mu(x) \ge \int_{W_0} k p_0(x) d\mu(x) - \int_{W} k p_0(x) d\mu(x) $$ because we only know that $\forall x \in W_0$
$$\int_{W_0} p_1(x) d\mu(x) \ge \int_{W_0} k p_0(x) d\mu(x)$$ and the same is not necessarily true for $x \in W$.
But how is the intermediate step helping us? (i.e. what's going on there?)
First of all, $A-B$ is often used instead of $A\setminus B$, see e.g. the book of Durrett on probability. Second, we know that if $x\in W_0$ then $p_1(x)\geq k p_0(x)$ and if $x\notin W_0$ then $p_1(x)\leq kp_0(x)$ which implies $$ -p_1(x)\geq-kp_0(x)\quad\forall x\notin W_0. $$ I think, now it shall be clear how can we get the magic inequality.