[step:Complement alternating quantifiers to identify $\Pi_k^P$ with $co\Sigma_k^P$]Fix an integer $k \geq 1$. Let $L \subseteq \{0,1\}^*$ be a language in $\Sigma_k^P$. By the alternating-quantifier definition, there exist a polynomial $p:\mathbb{N}\to\mathbb{N}$, a polynomial-time decidable predicate
\begin{align*}
R:\{0,1\}^* \times (\{0,1\}^*)^k \to \{0,1\},
\end{align*}
and quantifiers $Q_1,\dots,Q_k$, with $Q_1=\exists$ and alternating thereafter, such that for every input $x \in \{0,1\}^*$,
\begin{align*}
x \in L \iff Q_1 y_1 \in \{0,1\}^{p(|x|)} \, Q_2 y_2 \in \{0,1\}^{p(|x|)} \cdots Q_k y_k \in \{0,1\}^{p(|x|)} \, R(x,y_1,\dots,y_k)=1.
\end{align*}
Taking complements gives
\begin{align*}
x \notin L \iff \overline{Q}_1 y_1 \in \{0,1\}^{p(|x|)} \, \overline{Q}_2 y_2 \in \{0,1\}^{p(|x|)} \cdots \overline{Q}_k y_k \in \{0,1\}^{p(|x|)} \, R'(x,y_1,\dots,y_k)=1,
\end{align*}
where $\overline{\exists}=\forall$, $\overline{\forall}=\exists$, and
\begin{align*}
R':\{0,1\}^* \times (\{0,1\}^*)^k \to \{0,1\}
\end{align*}
is the polynomial-time predicate defined by
\begin{align*}
R'(x,y_1,\dots,y_k)=1 \iff R(x,y_1,\dots,y_k)=0.
\end{align*}
The quantifier string now begins with $\forall$ and alternates, so $\overline{L}\in \Pi_k^P$. Hence $co\Sigma_k^P \subseteq \Pi_k^P$.
The same argument with the roles of $\exists$ and $\forall$ reversed shows that if $L \in \Pi_k^P$, then $\overline{L}\in \Sigma_k^P$, so $L \in co\Sigma_k^P$. Therefore
\begin{align*}
\Pi_k^P = co\Sigma_k^P.
\end{align*}[/step]