Neyman-Pearson Lemma says that the most powerful test, $\phi(x)$, of size $\alpha$ (probability of false alarm), for testing $H_0:\theta=\theta_0$ versus $H_1:\theta=\theta_1$ is the likelihood ratio test of the form:
$$ \phi(x)=\begin{cases} 1 & l(x)>k \\ \color{#C00}{p} & l(x)=k \\ 0 & l(x)<k \\ \end{cases} $$
where, $p$ is the probability of accepting $H_1$ at $k.$
$k$ is threshold.
$l(x)$ is the likelihood ratio, $l(x)=\frac{f_{\theta_1}(x)}{f_{\theta_0}(x)}.$
Probability of false alarm, $P_f=\color{#C00}{p} \cdot P[l(x)=k \hspace{2 mm}| \hspace{2 mm} H_0 ]\hspace{2 mm}+\hspace{2 mm} P[l(x)>k \hspace{2 mm}| \hspace{2 mm} H_0 ].$
Probability of detection, $P_d=p \cdot P[l(x)=k \hspace{2 mm}| \hspace{2 mm} H_1 ]\hspace{2 mm}+\hspace{2 mm} P[l(x)>k \hspace{2 mm}| \hspace{2 mm} H_1 ].$
Question Why Probability of false alarm, $P_f$, is $\mathbf{not}$ defined as:
$P_f=\color{#C00}{(1-p)} \cdot P[l(x)=k \hspace{2 mm}| \hspace{2 mm} H_0 ]\hspace{2 mm}+\hspace{2 mm} P[l(x)>k \hspace{2 mm}| \hspace{2 mm} H_0 ].$
My understanding for saying above equation is that: if the probability of occurring $H_1$ is $p$, then the probability of occurring $H_0$ is $(1-p).$ And therefore, the probability of selecting $H_0$ at $k$ is $(1-p).P[l(x)=k \hspace{2 mm}| \hspace{2 mm} H_0].$
Where my understanding is wrong? Any comments please.