Lemma 51.9.2. Let $A$ be a Noetherian ring. Let $M$ be a finite $A$-module. Let $\mathfrak p$ be a prime ideal. Assume $e = \text{depth}_{A_\mathfrak p}(M_\mathfrak p) < \infty$. Then there exists a nonempty open $U \subset V(\mathfrak p)$ such that $\text{depth}_{A_\mathfrak q}(M_\mathfrak q) \geq e$ for all $\mathfrak q \in U$ and for all but finitely many $\mathfrak q \in U$ we have $\text{depth}_{A_\mathfrak q}(M_\mathfrak q) > e$.

Proof. By definition of depth we have $\mathfrak p M_\mathfrak p \not= M_\mathfrak p$ and there exists an $M_\mathfrak p$-regular sequence $f_1, \ldots , f_ e \in \mathfrak p A_\mathfrak p$. After replacing $A$ by a principal localization we may assume $f_1, \ldots , f_ e \in \mathfrak p$ form an $M$-regular sequence, see Algebra, Lemma 10.67.6. Consider the module $M' = M/(f_1, \ldots , f_ e)M$. Since $\mathfrak p \in \text{Supp}(M')$ and since the support of a finite module is closed, we find $V(\mathfrak p) \subset \text{Supp}(M')$. Thus for $\mathfrak q \in V(\mathfrak p)$ we get $\mathfrak q M_\mathfrak q \not= M_\mathfrak q$. Hence, using that localization is exact, we see that $\text{depth}_{A_\mathfrak q}(M_\mathfrak q) \geq e$ for any $\mathfrak q \in V(I)$ by definition of depth. Moreover, as soon as $\mathfrak q$ is not an associated prime of the module $M'$, then the depth goes up. Thus we see that the final statement holds by Algebra, Lemma 10.62.5. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).