Which elements of a ring have zero differential?

Let $A$ be an algebra over $B$ (all rings commutative with a unit) and let $\Omega_{A/B}$ be the module of differentials of $A$ over $B$ with $d:A\to \Omega_{A/B}$ the universal derivation. Is there a nice characterization of the set $Z=\{a\in A | d(a)=0\}$? (surely in includes $B$, but it can be bigger).

I am mainly interested in the cases where $A$ is a finitely generated $k$-domain, where $k$ is an algebraically closed field of characteristic zero. Is it true in this case that $Z=k$?

I think (or hope) that the more specialized question in algebro-geometric terms is equivalent to the following: Given an algebraic variety $X$ over an algebraically closed field with zero characteristic and a regular function $f$ on $X$ whose differential is zero, must $f$ be constant?

-
If I understand correctly, the MO thread QiL put below implies that the answer to the more specialized question is YES (together with a vast generalization), but is there a more elementary proof in this case? btw, please upvote Qil's answer, for some stupid technical reason I can't. – KotelKanim Aug 23 '12 at 13:06

An anwser can be found at http://mathoverflow.net/questions/75329/

For the second part of your question, I guess you consider $f$ as a morphism $\phi: X\to\mathbb A^1_k$. Then $d\phi=0$ (as differential of a morphism) is equivalent to $df=0$ as image of $f\in O(X)$ in $\Omega^1_{X/k}$: we can suppose $X=\mathrm{Spec}(A)$ is affine. Then the morphism $\phi$ correspond to the homomorphism $$k[T] \to A, \quad T\mapsto f.$$ So the differential of the morphism $\phi$ consists in $$d\phi: AdT = A\otimes_{k[T]} \Omega_{k[T]/k} \to \Omega_{A/k}, \quad dT\mapsto df.$$ Therefore $d\phi=0$ iff $df=0$.

Finally, of cours $\phi$ is constant iff $f\in k$ (because $k$ is algebraically closed) and (I guess) $X$ is reduced.

-
Wow! That guy over at MathOverflow sure knows what he is talking about! – Georges Elencwajg Aug 23 '12 at 14:25

After reading the great answer in QiL's link, I decided to post it here specialized to the case I described.

Let $k$ be an algebraically closed field of characteristic zero and $B$ a finitely generated $k$-domain. We denote by $\Omega_{B/k}$ the module of differentials and by $d_B:B\to \Omega_{B/k}$ the universal derivation.

Claim: $\ker d_B=k$.

Proof: Let $L=Frac(B)$ and let $d_L:L\to \Omega_{L/k}$. We first prove the analogous result for $d_L$. Denote $E=\ker d_L$ and note that $E$ is a field (follows from Leibniz rule) and thus we have a tower of extensions $L/E/k$. The crutial point is that for separable extensions of fields (and here we use the assumption of zero characteristic) we have

$\mbox{tr.deg}(L/k)=\dim _L \Omega_{L/k}$

and

$\mbox{tr.deg}(L/E)=\dim _L \Omega_{L/E}$

On the other hand, we have a natural map $\Omega_{L/k} \to \Omega_{L/E}$ induced by the inclusion $k\to E$ (every $E$-derivation is in particular a $k$-derivation), but from the definition $E=\ker( {L\to \Omega_{L/k}})$ it is obvious that this map is an isomorphism (because every $k$-derivation is automatically an $E$-derivation) so we get

$\dim _L \Omega_{L/k}=\dim _L \Omega_{L/E}$

and together with the previous observation that

$\mbox{tr.deg}(L/k) = \mbox{tr.deg}(L/E)$

but this means that $\mbox{tr.deg}(E/k)=0$ and therefore that $E$ is algebraic over $k$ and since $k$ is algebraically closed it follows that $E=k$. What remains is to note that the inclusion $B\to L$ induces a natural map $\Omega_{B/k}\to \Omega_{L/k}$ so if $b\in B$ has zero differential then "chasing the diagram" it also has zero differential as an element of $L$ and therefore $b\in k$.

Remark: In the original proof there is also a reference to the question whether $\Omega_{B/k}\to \Omega_{L/k}$ is injective, but I don't see why is that important, at least in this situation, and I'll be happy to be corrected if I'am missing something.

-
I think you are right. The injectivity of $\Omega_{B/k}\to \Omega_{L/k}$ is useless. – user18119 Aug 23 '12 at 21:20
+1: Posting this self-contained special case is a very helpful initiative. – Georges Elencwajg Aug 24 '12 at 9:50