Isomorphism of polynomial rings in several variables I have been struggling with the following problem: 

How can one prove that if there is an isomorphism between several variable polynomial rings over a field $K$, $ \varphi : K[X_1, \dots, X_n] \to K[X_1, \dots, X_m]$ such that $\varphi$ restricted to $K$ is $id$, then one must have $m=n$. 

Any help appreciated, thanks.
 A: Extend $\varphi$ to a $K$-isomorphism of fields between $K(X_1, \dots, X_n)$ and $K(X_1, \dots, X_m)$. Since both are field extensions of $K$ and their transcendence degree are $n$, respectively $m$, then $m=n$.
A: If the two rings are isomorphic, they must have the same Krull dimension.  The Krull dimension of $K[X_1,\ldots,X_n]$ is $n$.
A: If $K$ is a field, then the global dimension of $K[X_1,\dots,X_m]$ is $n$ and it is invariant under ring isomorphisms.
A: If $K_n=K[X_1,\dots,X_n]$ with $n$ a field, it is easy to check that the module $\operatorname{Der}(K_n)$ of $K$-linear derivations $K_n\to K_n$ is free of rank $n$. Since $K_n$ is commutative, the rank of a free $K_n$-module is well-defined.
It follows at once that from this that $K_n\cong K_m$ as $K$-algebras implies $n=m$.
A: If $K$ is a field, write $K_n$ for $K[X_1,\dots,X_n]$.
If $K_n$ and $K_m$ are isomorphic as $K$-algebras and $\bar K$ is an algebraically closed field containing $K$, extending scalars gives us an isomorphism $\bar K_n\cong\bar K_m$ of $\bar K$-algebras.
Now the Nullstellensatz describes all maximal ideals $\mathfrak m$ of $\bar K_n$ and makes it easy to check that $\dim_{\bar K}\mathfrak m/\mathfrak m^2=n$ for all maximal ideals $\mathfrak m$. This implies at once that $n=m$.

We can avoid the Nullstellensatz, actually. For any field, the minimal codimension of a maximal ideal $\mathfrak m$ in $K_n$ is $1$, and for any ideal with that codimension we have $\dim_K\mathfrak m/\mathfrak m^2=n$. It follows that $n$ is invariant under isomorphisms of $K$-algebras.
