[proofplan]
We use the compact self-adjoint spectral theorem to choose an orthonormal eigenvector list $(e_j)$ corresponding to the positive eigenvalues $(\lambda_j)$, with multiplicity. The quadratic form of $T$ is diagonal in this list, and vectors orthogonal to the first $n-1$ eigenvectors have Rayleigh quotient at most $\lambda_n$. The max-min formula follows by comparing the leading span $\operatorname{span}\{e_1,\dots,e_n\}$ with an arbitrary $n$-dimensional subspace. The min-max formula is dual: compare the orthogonal complement of the first $n-1$ eigenvectors with an arbitrary closed subspace of codimension $n-1$.
[/proofplan]
[step:Choose eigenvectors and write the diagonal quadratic form]
For every index $j$ for which $\lambda_j$ exists, choose an eigenvector $e_j\in H$ such that
\begin{align*}
\|e_j\|_H=1
\end{align*}
and
\begin{align*}
Te_j=\lambda_j e_j.
\end{align*}
The list is chosen orthonormally inside each eigenspace, so repeated eigenvalues are represented according to their multiplicity.
By the compact self-adjoint spectral theorem for non-negative compact operators (citing a result not yet in the wiki: [Spectral theorem for compact self-adjoint operators](/theorems/538)), the positive spectral subspace of $T$ is the closed linear span of these eigenvectors, and $T$ vanishes on its orthogonal complement. Thus every $x\in H$ admits an [orthogonal decomposition](/theorems/436)
\begin{align*}
x=\sum_j (x,e_j)_H e_j + z,
\end{align*}
where $z\in \ker T$, with convergence in $H$. Moreover,
\begin{align*}
(Tx,x)_H=\sum_j \lambda_j |(x,e_j)_H|^2.
\end{align*}
The series is absolutely convergent because $\lambda_j\le \lambda_1$ and [Bessel's inequality](/theorems/540) gives
\begin{align*}
\sum_j |(x,e_j)_H|^2\le \|x\|_H^2.
\end{align*}
Define the quadratic form
\begin{align*}
Q:H&\to \mathbb R
\end{align*}
by
\begin{align*}
Q(x)=(Tx,x)_H.
\end{align*}
Then the displayed expansion says
\begin{align*}
Q(x)=\sum_j \lambda_j |(x,e_j)_H|^2.
\end{align*}
[/step]
[step:Show the leading eigenspace gives the lower bound in the max-min formula]
Define the $n$-dimensional subspace
\begin{align*}
L_n=\operatorname{span}\{e_1,\dots,e_n\}.
\end{align*}
If $x\in L_n$ and $\|x\|_H=1$, then
\begin{align*}
x=\sum_{j=1}^n (x,e_j)_H e_j.
\end{align*}
Using the diagonal quadratic form and the ordering $\lambda_j\ge \lambda_n$ for $1\le j\le n$, we get
\begin{align*}
Q(x)=\sum_{j=1}^n \lambda_j |(x,e_j)_H|^2.
\end{align*}
Therefore
\begin{align*}
Q(x)\ge \lambda_n \sum_{j=1}^n |(x,e_j)_H|^2.
\end{align*}
Since $(e_1,\dots,e_n)$ is an [orthonormal basis](/page/Orthonormal%20Basis) of $L_n$ and $\|x\|_H=1$,
\begin{align*}
\sum_{j=1}^n |(x,e_j)_H|^2=1.
\end{align*}
Hence $Q(x)\ge \lambda_n$ for every unit vector $x\in L_n$, so
\begin{align*}
\min_{\substack{x\in L_n, \|x\|_H=1}} Q(x)\ge \lambda_n.
\end{align*}
Consequently,
\begin{align*}
\max_{\substack{L\subset H, \dim L=n}}
\ \min_{\substack{x\in L, \|x\|_H=1}}
Q(x)\ge \lambda_n.
\end{align*}
[guided]
We want a subspace on which every unit vector has Rayleigh quotient at least $\lambda_n$. The natural candidate is the span of the eigenvectors corresponding to the first $n$ eigenvalues, so define
\begin{align*}
L_n=\operatorname{span}\{e_1,\dots,e_n\}.
\end{align*}
This subspace has dimension $n$ because the vectors $e_1,\dots,e_n$ are orthonormal.
Let $x\in L_n$ satisfy $\|x\|_H=1$. Since $(e_1,\dots,e_n)$ is an orthonormal basis of $L_n$, we have
\begin{align*}
x=\sum_{j=1}^n (x,e_j)_H e_j.
\end{align*}
Substituting this expansion into the diagonal formula for the quadratic form gives
\begin{align*}
Q(x)=\sum_{j=1}^n \lambda_j |(x,e_j)_H|^2.
\end{align*}
For each index $j$ with $1\le j\le n$, the eigenvalue ordering gives $\lambda_j\ge \lambda_n$. Therefore each summand is bounded below by replacing $\lambda_j$ with $\lambda_n$:
\begin{align*}
Q(x)\ge \lambda_n \sum_{j=1}^n |(x,e_j)_H|^2.
\end{align*}
The last sum is exactly $\|x\|_H^2$ by [Parseval's identity](/theorems/434) in the finite-dimensional [Hilbert space](/page/Hilbert%20Space) $L_n$. Since $\|x\|_H=1$, this becomes
\begin{align*}
Q(x)\ge \lambda_n.
\end{align*}
Thus every unit vector in $L_n$ has quadratic form at least $\lambda_n$, and so
\begin{align*}
\min_{\substack{x\in L_n, \|x\|_H=1}} Q(x)\ge \lambda_n.
\end{align*}
Because the outer maximum ranges over all $n$-dimensional subspaces, it is at least the value obtained from this particular subspace $L_n$:
\begin{align*}
\max_{\substack{L\subset H, \dim L=n}}
\ \min_{\substack{x\in L, \|x\|_H=1}}
Q(x)\ge \lambda_n.
\end{align*}
[/guided]
[/step]
[step:Use dimension counting to bound every $n$-dimensional subspace from above]
Let $L\subset H$ be an arbitrary subspace with $\dim L=n$. Define
\begin{align*}
E_{n-1}=\operatorname{span}\{e_1,\dots,e_{n-1}\},
\end{align*}
with the convention $E_0=\{0\}$ when $n=1$.
We claim that
\begin{align*}
L\cap E_{n-1}^{\perp}\ne \{0\}.
\end{align*}
Indeed, the [orthogonal projection](/theorems/437)
\begin{align*}
P_{E_{n-1}}:H\to E_{n-1}
\end{align*}
restricts to a [linear map](/page/Linear%20Map)
\begin{align*}
P_{E_{n-1}}|_L:L\to E_{n-1}.
\end{align*}
Since $\dim L=n$ and $\dim E_{n-1}=n-1$, the [rank-nullity theorem](/theorems/916) gives
\begin{align*}
\dim \ker(P_{E_{n-1}}|_L)\ge 1.
\end{align*}
But
\begin{align*}
\ker(P_{E_{n-1}}|_L)=L\cap E_{n-1}^{\perp}.
\end{align*}
Choose $0\ne y\in L\cap E_{n-1}^{\perp}$ and define
\begin{align*}
x=\frac{y}{\|y\|_H}.
\end{align*}
Then $x\in L$, $\|x\|_H=1$, and $(x,e_j)_H=0$ for $1\le j\le n-1$.
Using the diagonal expansion, non-negativity of the eigenvalues, and the ordering $\lambda_j\le \lambda_n$ for every $j\ge n$, we obtain
\begin{align*}
Q(x)=\sum_{j\ge n} \lambda_j |(x,e_j)_H|^2.
\end{align*}
Hence
\begin{align*}
Q(x)\le \lambda_n\sum_{j\ge n}|(x,e_j)_H|^2.
\end{align*}
By Bessel's inequality,
\begin{align*}
\sum_{j\ge n}|(x,e_j)_H|^2\le \|x\|_H^2=1.
\end{align*}
Therefore $Q(x)\le \lambda_n$. Since this unit vector lies in $L$,
\begin{align*}
\min_{\substack{u\in L, \|u\|_H=1}} Q(u)\le \lambda_n.
\end{align*}
Because $L$ was arbitrary, this proves
\begin{align*}
\max_{\substack{L\subset H, \dim L=n}}
\ \min_{\substack{u\in L, \|u\|_H=1}}
Q(u)\le \lambda_n.
\end{align*}
Combining this with the previous step gives
\begin{align*}
\lambda_n
=
\max_{\substack{L\subset H, \dim L=n}}
\ \min_{\substack{x\in L, \|x\|_H=1}}
(Tx,x)_H.
\end{align*}
[/step]
[step:Use the orthogonal complement of the first eigenspaces for the upper bound in the min-max formula]
Define the closed subspace
\begin{align*}
M_n=E_{n-1}^{\perp}.
\end{align*}
Since $E_{n-1}$ is finite-dimensional, $M_n$ is closed and
\begin{align*}
\operatorname{codim} M_n=n-1.
\end{align*}
If $x\in M_n$ and $\|x\|_H=1$, then $(x,e_j)_H=0$ for $1\le j\le n-1$. Thus the same diagonal estimate as above gives
\begin{align*}
Q(x)\le \lambda_n.
\end{align*}
Therefore
\begin{align*}
\max_{\substack{x\in M_n, \|x\|_H=1}} Q(x)\le \lambda_n.
\end{align*}
It follows that
\begin{align*}
\min_{\substack{M\subset H\ \mathrm{closed}, \operatorname{codim} M=n-1}}
\ \max_{\substack{x\in M, \|x\|_H=1}}
Q(x)\le \lambda_n.
\end{align*}
[/step]
[step:Use codimension counting to bound every finite-codimensional subspace from below]
Let $M\subset H$ be a closed subspace with
\begin{align*}
\operatorname{codim} M=n-1.
\end{align*}
Define
\begin{align*}
F_n=\operatorname{span}\{e_1,\dots,e_n\}.
\end{align*}
We claim that
\begin{align*}
M\cap F_n\ne \{0\}.
\end{align*}
Let
\begin{align*}
\pi:H\to H/M
\end{align*}
be the quotient map. The restriction
\begin{align*}
\pi|_{F_n}:F_n\to H/M
\end{align*}
is linear. Since $\dim F_n=n$ and $\dim(H/M)=n-1$, rank-nullity gives
\begin{align*}
\dim \ker(\pi|_{F_n})\ge 1.
\end{align*}
But
\begin{align*}
\ker(\pi|_{F_n})=M\cap F_n.
\end{align*}
Choose $0\ne y\in M\cap F_n$ and define
\begin{align*}
x=\frac{y}{\|y\|_H}.
\end{align*}
Then $x\in M$, $\|x\|_H=1$, and
\begin{align*}
x=\sum_{j=1}^n (x,e_j)_H e_j.
\end{align*}
Using $\lambda_j\ge \lambda_n$ for $1\le j\le n$, we get
\begin{align*}
Q(x)=\sum_{j=1}^n \lambda_j |(x,e_j)_H|^2.
\end{align*}
Therefore
\begin{align*}
Q(x)\ge \lambda_n \sum_{j=1}^n |(x,e_j)_H|^2.
\end{align*}
Since $x\in F_n$ and $\|x\|_H=1$,
\begin{align*}
\sum_{j=1}^n |(x,e_j)_H|^2=1.
\end{align*}
Thus $Q(x)\ge \lambda_n$. Hence
\begin{align*}
\max_{\substack{u\in M, \|u\|_H=1}} Q(u)\ge \lambda_n.
\end{align*}
Because $M$ was arbitrary,
\begin{align*}
\min_{\substack{M\subset H\ \mathrm{closed}, \operatorname{codim} M=n-1}}
\ \max_{\substack{u\in M, \|u\|_H=1}}
Q(u)\ge \lambda_n.
\end{align*}
Combining this inequality with the previous step gives
\begin{align*}
\lambda_n
=
\min_{\substack{M\subset H\ \mathrm{closed}, \operatorname{codim} M=n-1}}
\ \max_{\substack{x\in M, \|x\|_H=1}}
(Tx,x)_H.
\end{align*}
[/step]
[step:Justify attainment of the inner extrema]
For each finite-dimensional subspace $L\subset H$, the unit sphere
\begin{align*}
S_L=\{x\in L:\|x\|_H=1\}
\end{align*}
is compact, and the map $Q|_{S_L}:S_L\to\mathbb R$ is continuous because $T\in\mathcal L(H)$. Hence the minimum over $S_L$ is attained.
For a closed subspace $M\subset H$, let
\begin{align*}
P_M:H\to M
\end{align*}
be the orthogonal projection onto $M$, and define
\begin{align*}
T_M:M&\to M
\end{align*}
by
\begin{align*}
T_Mx=P_MTx.
\end{align*}
The operator $T_M$ is compact, self-adjoint, and non-negative on $M$, and
\begin{align*}
(T_Mx,x)_H=(Tx,x)_H
\end{align*}
for every $x\in M$. By the compact self-adjoint spectral theorem for non-negative compact operators (citing a result not yet in the wiki: Spectral theorem for compact [self-adjoint operators](/page/Self-Adjoint%20Operators)), either $T_M=0$, in which case the maximum of $Q$ on the unit sphere of $M$ is $0$ and is attained at every unit vector of $M$, or the maximum equals the largest positive eigenvalue of $T_M$ and is attained at a corresponding unit eigenvector. This verifies that the maxima appearing in the min-max formula are genuine maxima. The two variational identities proved above are therefore identities with the extrema exactly as stated.
[/step]