[proofplan]
We show that the hypothesis $\Sigma_k^P = \Pi_k^P$ forces the next existential level $\Sigma_{k+1}^P$ to be contained in $\Sigma_k^P$. The main point is that an $NP^{\Sigma_k^P}$ computation can be verified by guessing an accepting computation transcript and checking every positive and negative oracle answer by $\Sigma_k^P$ predicates, because the hypothesis turns complements of $\Sigma_k^P$ languages back into $\Sigma_k^P$ languages. Polynomially many such checks can be merged into one $\Sigma_k^P$ predicate by grouping matching quantifier blocks. Once $\Sigma_{k+1}^P \subset \Sigma_k^P$, induction gives $\Sigma_j^P \subset \Sigma_k^P$ and $\Pi_j^P \subset \Pi_k^P = \Sigma_k^P$ for every $j \geq k$, so the whole hierarchy is equal to level $k$.
[/proofplan]
[step:Put $\Sigma_k^P$ predicates into alternating certificate form]
Fix an alphabet $\Gamma$ containing the input alphabet and work with languages over finite strings. We use the standard alternating certificate normal form for $\Sigma_k^P$: a language $A$ belongs to $\Sigma_k^P$ precisely when there are a polynomial $p:\mathbb N \to \mathbb N$ and a deterministic polynomial-time predicate
\begin{align*}
R_A: \Gamma^* \times (\Gamma^*)^k \to \{0,1\}
\end{align*}
such that, for every string $z \in \Gamma^*$,
\begin{align*}
z \in A
\iff
\exists y_1 \in \Gamma^{p(|z|)}
\forall y_2 \in \Gamma^{p(|z|)}
\exists y_3 \in \Gamma^{p(|z|)}
\cdots
Q_k y_k \in \Gamma^{p(|z|)}
\; R_A(z,y_1,\dots,y_k)=1,
\end{align*}
where $Q_i=\exists$ for odd $i$ and $Q_i=\forall$ for even $i$.
Since $\Sigma_k^P=\Pi_k^P$ and $\Pi_k^P$ is the complement class $co\Sigma_k^P$, the complement $\overline{A}$ also has such a $\Sigma_k^P$ description. Thus there are a polynomial $q:\mathbb N \to \mathbb N$ and a deterministic polynomial-time predicate
\begin{align*}
S_A: \Gamma^* \times (\Gamma^*)^k \to \{0,1\}
\end{align*}
such that, for every string $z \in \Gamma^*$,
\begin{align*}
z \notin A
\iff
\exists u_1 \in \Gamma^{q(|z|)}
\forall u_2 \in \Gamma^{q(|z|)}
\exists u_3 \in \Gamma^{q(|z|)}
\cdots
Q_k u_k \in \Gamma^{q(|z|)}
\; S_A(z,u_1,\dots,u_k)=1.
\end{align*}
[/step]
[step:Show that polynomially many $\Sigma_k^P$ conditions remain in $\Sigma_k^P$]
We record the closure property needed for transcript verification.
[claim:Polynomial conjunction closure at level $k$]
Let $m:\mathbb N \to \mathbb N$ be a polynomial. Suppose that, for each input $x$, we have predicates $P_i(x)$ for $1 \leq i \leq m(|x|)$, and each predicate has a $\Sigma_k^P$ certificate form with the same alternating prefix type:
\begin{align*}
P_i(x)
\iff
\exists y_{i,1}
\forall y_{i,2}
\exists y_{i,3}
\cdots
Q_k y_{i,k}
\; R_i(x,y_{i,1},\dots,y_{i,k})=1,
\end{align*}
where each witness block has polynomial length and each predicate $R_i$ is decidable in deterministic polynomial time uniformly in $i$ and $x$. Then the conjunction
\begin{align*}
\bigwedge_{i=1}^{m(|x|)} P_i(x)
\end{align*}
is also a $\Sigma_k^P$ predicate.
[/claim]
[proof]
Choose a polynomial $r:\mathbb N \to \mathbb N$ bounding all witness lengths appearing in the predicates $P_i$ on inputs of length $n$. For each quantifier level $j \in \{1,\dots,k\}$, define a block variable
\begin{align*}
Y_j=(y_{1,j},y_{2,j},\dots,y_{m(|x|),j})
\end{align*}
ranging over tuples of strings in $\Gamma^{r(|x|)}$. Because $m$ and $r$ are polynomially bounded, each tuple $Y_j$ has polynomial length in $|x|$.
The conjunction is equivalent to
\begin{align*}
\exists Y_1
\forall Y_2
\exists Y_3
\cdots
Q_k Y_k
\; \bigwedge_{i=1}^{m(|x|)}
R_i(x,y_{i,1},\dots,y_{i,k})=1.
\end{align*}
The final predicate computes every $R_i$ and conjoins the resulting Boolean values. Since there are polynomially many indices $i$ and each $R_i$ is decidable in deterministic polynomial time, this final predicate is decidable in deterministic polynomial time. The quantifier prefix still has exactly the $\Sigma_k^P$ pattern, so the conjunction belongs to $\Sigma_k^P$.
[/proof]
[guided]
We prove the closure statement directly. Let $m:\mathbb N \to \mathbb N$ be the polynomial bounding the number of predicates, and suppose that for each input $x \in \Gamma^*$ and each index $i \in \{1,\dots,m(|x|)\}$ the predicate $P_i(x)$ has the form
\begin{align*}
P_i(x)
\iff
\exists y_{i,1}
\forall y_{i,2}
\exists y_{i,3}
\cdots
Q_k y_{i,k}
\; R_i(x,y_{i,1},\dots,y_{i,k})=1.
\end{align*}
Here $Q_j$ is $\exists$ for odd $j$ and $\forall$ for even $j$, each block $y_{i,j}$ ranges over strings of polynomial length, and the relation $R_i$ is decidable in deterministic polynomial time uniformly in the pair $(i,x)$. The point of the argument is that the quantifier prefixes all have the same order, so we may combine equal-level blocks without changing the alternation pattern.
Choose a polynomial $r:\mathbb N \to \mathbb N$ such that every witness block $y_{i,j}$ appearing in these formulas on inputs of length $n$ has length at most $r(n)$. For each quantifier level $j \in \{1,\dots,k\}$, define the grouped block variable
\begin{align*}
Y_j=(y_{1,j},y_{2,j},\dots,y_{m(|x|),j}).
\end{align*}
We let $Y_j$ range over tuples of strings in $\Gamma^{r(|x|)}$. Since $m$ and $r$ are polynomially bounded, the total length of $Y_j$ is at most $m(|x|)r(|x|)$ up to the fixed encoding overhead for tuples, hence is polynomial in $|x|$.
The conjunction of all the predicates $P_i(x)$ is equivalent to the single alternating formula
\begin{align*}
\exists Y_1
\forall Y_2
\exists Y_3
\cdots
Q_k Y_k
\; \bigwedge_{i=1}^{m(|x|)}
R_i(x,y_{i,1},\dots,y_{i,k})=1.
\end{align*}
To justify this equivalence, first assume every $P_i(x)$ holds. For each existential level $j$, collect the existential witnesses for all indices $i$ into the tuple $Y_j$. At each universal level, an arbitrary tuple $Y_j$ is exactly the same data as arbitrary universal challenges $y_{i,j}$ for all indices $i$. Therefore the original formulas for all $P_i(x)$ force every conjunct $R_i(x,y_{i,1},\dots,y_{i,k})=1$, so the grouped formula holds.
Conversely, if the grouped formula holds, then for any fixed index $i$ we obtain the original certificate for $P_i(x)$ by projecting each grouped block $Y_j$ onto its $i$th coordinate $y_{i,j}$. The truth of the conjunction implies
\begin{align*}
R_i(x,y_{i,1},\dots,y_{i,k})=1,
\end{align*}
with the same alternating quantifier order, so $P_i(x)$ holds. Since this works for every $i \in \{1,\dots,m(|x|)\}$, the conjunction $\bigwedge_{i=1}^{m(|x|)}P_i(x)$ holds.
It remains to check the computational part of the certificate form. Define the final deterministic verifier as the map
\begin{align*}
R: \Gamma^* \times (\Gamma^*)^k \to \{0,1\}
\end{align*}
by setting $R(x,Y_1,\dots,Y_k)=1$ precisely when
\begin{align*}
\bigwedge_{i=1}^{m(|x|)} R_i(x,y_{i,1},\dots,y_{i,k})=1.
\end{align*}
This verifier runs in deterministic polynomial time because there are polynomially many indices $i$, each predicate $R_i$ is uniformly decidable in deterministic polynomial time, and extracting the coordinates $y_{i,j}$ from the tuple encoding has polynomial overhead. The grouped formula therefore has polynomial-size blocks, a deterministic polynomial-time final predicate, and exactly the $\Sigma_k^P$ quantifier prefix. Hence the conjunction is a $\Sigma_k^P$ predicate.
[/guided]
[/step]
[step:Verify an $NP^{\Sigma_k^P}$ computation by one $\Sigma_k^P$ predicate]
Let $L \in \Sigma_{k+1}^P$. We use the oracle characterization in the definition of the polynomial hierarchy, namely that for $k \geq 1$ one has $\Sigma_{k+1}^P = NP^{\Sigma_k^P}$, where $NP^{\Sigma_k^P}$ denotes languages accepted by nondeterministic polynomial-time machines with oracle access to some language in $\Sigma_k^P$. Hence there is a language $A \in \Sigma_k^P$ and a nondeterministic polynomial-time oracle machine $M^A$ such that $L$ is accepted by $M^A$. Let $t:\mathbb N \to \mathbb N$ be a polynomial bounding the running time of $M^A$, the number of nondeterministic choices, the number of oracle queries, and the length of every oracle query on inputs of length $n$.
For an input $x \in \Gamma^*$, a proposed accepting transcript consists of a string $r \in \Gamma^{t(|x|)}$ encoding the nondeterministic choices of $M$, together with a Boolean vector
\begin{align*}
a=(a_1,\dots,a_{t(|x|)}) \in \{0,1\}^{t(|x|)}
\end{align*}
encoding the claimed oracle answers. If the simulated branch makes fewer than $t(|x|)$ oracle queries, we pad the transcript with unused dummy slots after the last actual query; for those slots we fix an arbitrary dummy query string $z_i \in \Gamma^*$ and impose no oracle-membership condition. Given $(x,r,a)$, the deterministic simulation of $M$ computes each actual oracle query
\begin{align*}
z_i(x,r,a_1,\dots,a_{i-1}) \in \Gamma^*
\end{align*}
that would be asked before the $i$th answer, and checks whether the simulated computation accepts using the answer vector $a$.
For each index $i$ corresponding to an actual oracle query, the transcript condition is the single conditional predicate
\begin{align*}
(a_i=1 \text{ and } z_i(x,r,a_1,\dots,a_{i-1}) \in A)
\text{ or }
(a_i=0 \text{ and } z_i(x,r,a_1,\dots,a_{i-1}) \notin A).
\end{align*}
To write this as one $\Sigma_k^P$ predicate, use the $\Sigma_k^P$ certificate for $A$ with variables $y_{i,1},\dots,y_{i,k}$ and the $\Sigma_k^P$ certificate for $\overline A$ with variables $u_{i,1},\dots,u_{i,k}$. Group same-level variables into blocks $W_{i,j}=(y_{i,j},u_{i,j})$ for $1 \leq j \leq k$. The final deterministic predicate branches on $a_i$: if $a_i=1$ it checks the verifier $R_A$ on $z_i$ and the $y$-variables, while if $a_i=0$ it checks the verifier $S_A$ on $z_i$ and the $u$-variables. Because branching on the already guessed bit $a_i$ is deterministic polynomial-time work and the grouped blocks keep the same alternating prefix, each oracle-answer condition is a $\Sigma_k^P$ predicate. The full transcript correctness condition is a polynomial-size conjunction of such $\Sigma_k^P$ conditions, together with the deterministic polynomial-time condition that the simulated computation accepts. By the polynomial conjunction closure proved above, transcript correctness is a $\Sigma_k^P$ predicate in the variables $(x,r,a)$.
Finally, the outer existential guess of $(r,a)$ can be merged into the first existential block of that $\Sigma_k^P$ predicate. Therefore $L \in \Sigma_k^P$. Since $L \in \Sigma_{k+1}^P$ was arbitrary,
\begin{align*}
\Sigma_{k+1}^P \subset \Sigma_k^P.
\end{align*}
[/step]
[step:Propagate the containment to every higher level]
The reverse containment $\Sigma_k^P \subset \Sigma_{k+1}^P$ holds by the definition of the hierarchy, so
\begin{align*}
\Sigma_{k+1}^P = \Sigma_k^P.
\end{align*}
We prove by induction on $j \geq k$ that $\Sigma_j^P=\Sigma_k^P$. The base case $j=k$ is immediate. If $\Sigma_j^P=\Sigma_k^P$, then the same oracle characterization of the polynomial hierarchy gives
\begin{align*}
\Sigma_{j+1}^P
=
NP^{\Sigma_j^P}
=
NP^{\Sigma_k^P}
=
\Sigma_{k+1}^P
=
\Sigma_k^P.
\end{align*}
Thus $\Sigma_j^P=\Sigma_k^P$ for every $j \geq k$.
Taking complements gives the corresponding collapse of the universal levels. Since $\Pi_j^P = co\Sigma_j^P$ by the definition of the polynomial hierarchy and $\Sigma_j^P=\Sigma_k^P$, we have
\begin{align*}
\Pi_j^P = co\Sigma_k^P = \Pi_k^P = \Sigma_k^P
\end{align*}
for every $j \geq k$, where the last equality is the hypothesis.
[/step]
[step:Conclude that the polynomial hierarchy equals level $k$]
By definition,
\begin{align*}
PH=\bigcup_{j \geq 0} \Sigma_j^P.
\end{align*}
The hierarchy is increasing, so every lower level $\Sigma_j^P$ with $j \leq k$ is contained in $\Sigma_k^P$. The previous step shows that every higher level $\Sigma_j^P$ with $j \geq k$ is equal to $\Sigma_k^P$. Hence
\begin{align*}
PH=\Sigma_k^P.
\end{align*}
Using the hypothesis once more gives $\Sigma_k^P=\Pi_k^P$, and therefore
\begin{align*}
PH=\Sigma_k^P=\Pi_k^P.
\end{align*}
This proves the claimed collapse.
[/step]