Suppose that I have a variety $X$, and a set of subvarieties $A_1,...,A_r$ of codimension $n$ and a set of subvarieties $B_1,...,B_s$ of codimension $m$. Is there a nice way to determine whether there's a subvariety $Y$ such that $A_i \cap Y$ is of codimension $<n$ in $Y$ and $B_i \cap Y$ is of codimension $m$ in $Y$?
In the particular case I am thinking of, $X$ is simply affine space of dimension $n$, and the $A_i$ and $B_i$ are all subspaces containing the origin.