TITLE: Is the singular locus ideal preserved by all derivations?
QUESTION [17 upvotes]: Let $R$ be a commutative ring, with whatever hypotheses let you answer the question -- e.g. Noetherian, local, finitely generated over $\mathbb C$.
Let $I$ be the ideal defining the singular locus in Spec $R$. (With the reduced subscheme structure, or defined using minors of a Jacobian matrix, again whatever helps.)
Is it obvious and/or true that any derivation $d:R \to R$, i.e. additive map satisfying the Leibniz rule $d(ab) = a\ db + b\ da$, has $dI \leq I$?
Morally, $d$ is defining an infinitesimal automorphism of Spec $R$, and the singular locus should be preserved by automorphisms. So I would have hoped that there was a mindless proof using the Jacobian, but I haven't found one. As usual, a reference would be even better than a proof.

REPLY [12 votes]: The fact that the set-theoretic singular locus is preserved is true only in characteristic zero: for example if you take the curve ($x^p = y^2$) in $\mathbb{A}^2$, then the ideal $(x, y)$ is not preserved by the derivation $d/dx$ in characteristic $p$. On the other hand, the Jacobian ideal in this case, $(y)$, is preserved.
In characteristic zero one can prove that the set-theoretic singular locus is preserved by exponentiating derivations: given a derivation $D$ of $\mathcal{O}_X$ one can consider $e^{t D}$, a derivation of $\mathcal{O}_X[[t]]$, and the composition of this with a character $\mathcal{O}_X \to k$ corresponding to a singular point gives a character $\mathcal{O}_X((t)) \to k$ also with the same dimension of tangent space, hence corresponding to a singular point. Therefore the singular locus is preserved, since the set-theoretic singular locus is the intersection of all such kernels.
This theorem is due to, I believe, Seidenberg: it is the corollary to Theorem 12 in "Differential ideals in rings of finitely generated type" in AJM 1967.