[proofplan]
Set $R:=k[y_1,\dots,y_d]$ and $A:=k[X]$. Since $A$ is finite over $R$, the extension $R\subset A$ is integral, so prime ideals in $R$ and $A$ can be compared using [lying over](/theorems/2876), [going up](/theorems/2945), and incomparability. Going up lifts a maximal-length chain of prime ideals in the [polynomial ring](/page/Polynomial%20Ring) to $A$, giving $\dim A\ge d$, while incomparability forces contractions of strict chains in $A$ to remain strict in $R$, giving $\dim A\le d$. Finally $\dim R=d$ for a polynomial ring in $d$ variables over a field, so $\dim X=\dim A=d$.
[/proofplan]
[step:Pass from the variety to its coordinate ring]
Let
\begin{align*}A:=k[X]\end{align*}
be the coordinate ring of $X$, and define
\begin{align*}
R:=k[y_1,\dots,y_d]\subset A.
\end{align*}
By the statement, $y_1,\dots,y_d$ are algebraically independent over $k$, so $R$ is a polynomial ring in $d$ variables over $k$.
The dimension convention in the theorem is
\begin{align*}
\dim X=\dim A,
\end{align*}
where $\dim A$ denotes the Krull dimension of $A$, namely the supremum of all integers $r\ge 0$ for which there exists a strictly increasing chain of prime ideals
\begin{align*}
\mathfrak q_0\subsetneq \mathfrak q_1\subsetneq \cdots \subsetneq \mathfrak q_r
\end{align*}
in $A$. Thus it is enough to prove
\begin{align*}
\dim A=d.
\end{align*}
[/step]
[step:Use finiteness to obtain an integral extension]
Since $A$ is finite as an $R$-module, every element $a\in A$ is integral over $R$. Indeed, multiplication by $a$ defines an $R$-[linear map](/page/Linear%20Map) $m_a:A\to A$ given by $m_a(b)=ab$. Because $A$ is a finite $R$-module, the Cayley-Hamilton argument for finite modules gives a monic polynomial $P_a(T)\in R[T]$ such that $P_a(a)=0$. Hence $R\subset A$ is an integral ring extension.
[/step]
[step:Lift a length $d$ prime chain from the polynomial subring]
The polynomial ring $R=k[y_1,\dots,y_d]$ has Krull dimension $d$ (citing a result not yet in the wiki: Krull Dimension of a Polynomial Ring over a Field). In particular, there exists a strictly increasing chain of prime ideals $\mathfrak p_0\subsetneq \mathfrak p_1\subsetneq \cdots \subsetneq \mathfrak p_d$ in $R$.
Because $R\subset A$ is integral, the [Lying Over](/theorems/2944) Theorem applies to the prime ideal $\mathfrak p_0\subset R$ and gives a prime ideal $\mathfrak q_0\subset A$ satisfying $\mathfrak q_0\cap R=\mathfrak p_0$. Then the Going Up Theorem for integral extensions applies successively to the chain $\mathfrak p_0\subsetneq\cdots\subsetneq \mathfrak p_d$ and produces prime ideals $\mathfrak q_0\subset \mathfrak q_1\subset \cdots \subset \mathfrak q_d$ in $A$ such that $\mathfrak q_i\cap R=\mathfrak p_i$ for every $0\le i\le d$.
The inclusions $\mathfrak q_i\subset \mathfrak q_{i+1}$ are strict. If $\mathfrak q_i=\mathfrak q_{i+1}$, then contracting to $R$ would give $\mathfrak p_i=\mathfrak q_i\cap R=\mathfrak q_{i+1}\cap R=\mathfrak p_{i+1}$, contradicting $\mathfrak p_i\subsetneq \mathfrak p_{i+1}$. Thus $A$ contains a strict prime chain of length $d$, and therefore $\dim A\ge d$.
[guided]
We want a lower bound for $\dim A$, so we need to build a long strict chain of prime ideals in $A$. The polynomial subring $R=k[y_1,\dots,y_d]$ already has dimension $d$ (citing a result not yet in the wiki: Krull Dimension of a Polynomial Ring over a Field). Thus there is a strict chain of prime ideals $\mathfrak p_0\subsetneq \mathfrak p_1\subsetneq \cdots \subsetneq \mathfrak p_d$ in $R$.
The point of proving that $R\subset A$ is integral is that integral extensions let prime ideals be lifted. First, the Lying Over Theorem says that for the prime ideal $\mathfrak p_0\subset R$, there exists a prime ideal $\mathfrak q_0\subset A$ lying above it, meaning $\mathfrak q_0\cap R=\mathfrak p_0$. Next, the Going Up Theorem says that once a prime upstairs has been chosen over $\mathfrak p_0$, the rest of the chain downstairs can be lifted. Applying it successively gives prime ideals $\mathfrak q_0\subset \mathfrak q_1\subset \cdots \subset \mathfrak q_d$ in $A$ such that each $\mathfrak q_i$ lies above $\mathfrak p_i$: $\mathfrak q_i\cap R=\mathfrak p_i$.
It remains to check that this lifted chain is strict, because Krull dimension counts strict chains. Suppose for contradiction that $\mathfrak q_i=\mathfrak q_{i+1}$ for some $i$. Contracting this equality to $R$ gives $\mathfrak p_i=\mathfrak q_i\cap R=\mathfrak q_{i+1}\cap R=\mathfrak p_{i+1}$. This contradicts the strictness of the chain in $R$. Therefore every inclusion $\mathfrak q_i\subset \mathfrak q_{i+1}$ is strict, and $A$ has a strict prime chain of length $d$. Hence $\dim A\ge d$.
[/guided]
[/step]
[step:Contract every strict prime chain in the coordinate ring]
Let $\mathfrak q_0\subsetneq \mathfrak q_1\subsetneq \cdots \subsetneq \mathfrak q_r$ be any strict chain of prime ideals in $A$. For each $0\le i\le r$, define the contraction $\mathfrak p_i:=\mathfrak q_i\cap R$. Since contraction of a prime ideal under a ring homomorphism is prime, each $\mathfrak p_i$ is a prime ideal of $R$, and the inclusions $\mathfrak p_0\subset \mathfrak p_1\subset \cdots \subset \mathfrak p_r$ hold.
These inclusions are strict. If $\mathfrak p_i=\mathfrak p_{i+1}$ for some $i$, then $\mathfrak q_i\subsetneq \mathfrak q_{i+1}$ would be two distinct comparable prime ideals of $A$ lying over the same prime ideal of $R$. This contradicts the Incomparability Theorem for integral extensions. Therefore $\mathfrak p_0\subsetneq \mathfrak p_1\subsetneq \cdots \subsetneq \mathfrak p_r$ is a strict chain of prime ideals in $R$.
Since $\dim R=d$, every strict prime chain in $R$ has length at most $d$. Hence $r\le d$. Because the original chain in $A$ was arbitrary, $\dim A\le d$.
[/step]
[step:Conclude the dimension equality]
The preceding two steps give $d\le \dim A$ and $\dim A\le d$. Therefore $\dim A=d$. Using the convention $\dim X=\dim A$ for affine varieties, we obtain $\dim X=d$. This proves the theorem.
[/step]