Edit: I think maybe I'm making this way harder than it needs to be. If $L\subsetneq R:= k[z_1,...,z_m]$ is an ideal such that $V(L)$ is equidimensional and $f_1,...,f_p\in R$, then it seems like Krull's PIT gives $$dim(R/\mathfrak{p}) \geq dim(R/L)-p $$ for any prime $\frak p$ minimal over $(f_1,...,f_p)+L$. Maybe all the talk about regular embeddings and localizing just confused me. Or maybe I'm still confused.
I've been trying to do this Ravi Vakil exercise for a while now:
It all makes sense until the end. I need to show that the diagonal $$\Delta = V(x_1-y_1,x_2-y_2,...,x_d-y_d)\subset Spec~k[x_1,...,x_d,y_1,...,y_d]= \mathbb{A}_k^d\times \mathbb{A}_k^d$$
cuts away no more than $d$ dimensions from $X\times Y \subset \mathbb{A}_k^d\times \mathbb{A}_k^d$. $~~$ (This suffices since then
$$dim(X\cap Y) = dim(X\times Y \cap \Delta) \geq dim(X)+dim(Y)-d.)$$
Vakil says to do this "locally" and use Krull's PIT. Ok so it suffices to show that the embedding
$$\iota: (X\times Y) \cap \Delta \longrightarrow X\times Y $$
is "a regular embedding of codimension $d$" in the sense that for every point $p\in (X\times Y) \cap \Delta$, the kernel of the induced map of stalks $$ ker~\big(~\mathcal{O}_{X\times Y ,~ \iota(p)} \longrightarrow \mathcal{O}_{(X\times Y) \cap \Delta, ~p}\big) $$ is generated by a "regular sequence" of length $d$, $$\sigma_1,...,\sigma_d.$$ "Regular sequence" means that for $i=1,...,d$, we have that $\sigma_i$ is not a zero-divisor of $$\mathcal{O}_{X\times Y ,~ \iota(p)}\big/(\sigma_1,...,\sigma_{i-1}). $$ Showing this "regularity" condition suffices because then it is also true that every $p\in X\times Y$ is contained in some open neighborhood $U\subset X\times Y$ such that $\Delta\cap U$ is cut out from $U$ by such a sequence, so that we can then apply Krull's PIT one element of the sequence at a time to show that each element cuts away exactly $1$ dimension from $U$ (recalling that $X\times Y$ and therefore $U$ is equidimensional since $X$ and $Y$ are equidimensional -- thanks to Alex Youcis for the proof of that.)
OK MY QUESTION IS: How do I find this regular sequence x_1,...,x_d at each point $p$?
In algebraic terms, given radical ideals $I\subset k[x_1,...,x_n]=k[\overline x]$, $J\subset k[y_1,...,y_n]=k[\overline y]$ (such that $V(I), V(J)$ are equidimensional), and a prime ideal $$\mathfrak p\subset k[\overline x]\otimes_k k[\overline y]\big/ (I\otimes k[\overline y]+ k[\overline x]\otimes J)$$ I need to somehow find a regular sequence of elements in
$$\bigg(k[\overline x]\otimes_k k[\overline y]\big/ (I\otimes k[\overline y]+ k[\overline x]\otimes J)\bigg)_\frak p$$
that generates the ideal $(x_1-y_1,x_2-y_2,...,x_d-y_d)_\frak p$.
And another peripheral question that occurs to me just now: If we can complete the proof in this way, haven't we actually shown that the codimension of every component of $X\cap Y$ is exactly $codim_{\mathbb{A}_k^d}(X)+codim_{\mathbb{A}_k^d}(Y)$? After all, we covered $X\cap Y$ with open sets $W$, each obtained by starting with $U$, a pure $dim(X)+dim(Y)$-dimensional variety, and cutting out $W$ with a regular sequence of length $d$. So isn't every such $W$ of pure dimension $dim(X)+dim(Y)-d$? Anyway that's probably a stupid question that just occurred to me; my real interest is in the first question of how to complete the proof.
