Finally, we’re going to come to the Kahler criterion for regularity.  As far as algebraic geometry is concerned, it states that a variety over an algebraically closed field of characteristic zero is nonsingular precisely when the sheaf of differentials on it (to be defined shortly) is locally free of rank equal to the dimension.

Theorem 1 Suppose ${A}$ is a local domain which is a localization of a finitely generated ${k}$-algebra for ${k}$ a field of characteristic zero, with residue field ${k}$. Then ${A}$ is a regular local ring if and only if ${\Omega_{A/k}}$ is a free ${A}$-module of rank ${\dim A}$.

First, I claim ${\Omega_{A/k}}$ is finitely generated. This follows because the corresponding claim is true for a polynomial ring, we have a conormal sequence implying it for finitely generated algebras over a field, and taking differentials commutes with localization.

Let ${K}$ be the residue field of ${A}$. I claim $\displaystyle \boxed{ \dim k \otimes \Omega_{A/k} = \dim( \mathfrak{m}/\mathfrak{m}^2 ) , \quad \dim (K \otimes \Omega_{A/k}) = \dim A.}$

Then, the theorem will follow from the next lemma:

Lemma 2

Let ${M}$ be a finitely generated module over the local noetherian domain ${A}$, with residue field ${k}$ and quotient field ${K}$. Then ${M}$ is free iff $\displaystyle \dim K \otimes M = \dim k \otimes M$

The lemma is easy and fun, so let’s prove it here. If ${M}$ is free, the equality is immediate. Suppose the equality holds. In any case, there is an epimorphism ${F \rightarrow M}$ for ${F}$ free, say with kernel ${R}$. Then $\displaystyle 0 \rightarrow K \otimes R \rightarrow K \otimes F \rightarrow K \otimes M \rightarrow 0$

is exact (localization is an exact functor) and $\displaystyle k \otimes R \rightarrow k \otimes F \rightarrow k \otimes M \rightarrow 0$

is exact. The arrow on the left is injective in view of a dimension count that works because of the hypothesis. This holds for any surjection ${F \rightarrow M}$. In fact, by Nakayama’s lemma, we can construct ${F}$ of rank ${\dim(M \otimes k)}$ with ${k \otimes F \rightarrow k \otimes M}$ an isomorphism, implying ${k \otimes R = 0}$, implying ${R=0}$ by Nakayama again.

Anyway, the equality ${\dim k \otimes \Omega_{A/k} = \dim( \mathfrak{m}/\mathfrak{m}^2 ) }$ follows because the two are isomorphic; this is a refinement of the conormal sequence in this case.

For the second equality, note that ${K \otimes \Omega_{A/k} = \Omega_{K/k}}$, whose dimension is the transcendence degree of ${K}$ over ${k}$. This actually equals ${\dim A}$, because ${A}$ is the localization of a finitely generated ${k}$-algebra at a maximal ideal (since ${k}$ is also the residue field).

(I should note incidentally that finitely generated domains over a field are very nice. Their dimension is equal to the transcendence degree of their quotient field; this is a conseqeuence of the Noether normalization lemma and the fact that Krull dimension is preserved by integral extensions; cf. e.g. hilbertthm90’s two posts at A Mind for Madness. Also, such rings are catenarian: every maximal chain of prime ideals has length equal to the Krull dimension.  In particular, any localization at a maximal ideal has the same dimension.)

You don’t actually need characteristic zero for any of this.