Let $X$ be an irreducible affine variety (integral, reduced scheme of finite type over an algebraically closed field $\Bbbk$ *of characteristic zero*) of dimension $n$. The well-known Noether Normalization Lemma states that there is a finite morphism $\pi:X\to\mathbb A\_\Bbbk^n$. 


Assume now that I have an irreducible codimension one subvariety $Y\subseteq X$. 


**Edit:** Also assume that the generic point of $Y$ is a regular point of $X$. Even more, you may assume that the generic point of $Y$ is in the normal locus of $X$ or even in the nonsingular locus of $X$. In fact, in cases that interest me, $Y$ is completely contained in the nonsingular locus of $X$.


I think it should be possible to choose a Noether Normalization as above with the property that $Y$ is not in the ramification locus, i.e. there is some $p\in\pi(Y)$ with $|\pi^{-1}(p)|=\deg(\pi)$. In other words: I want to choose $\pi$ such that it is unramified at the generic point of $Y$.


The question is: Can I do this? Assuming that I can: Do you know a proof or a reference for this statement? Even under additional assumptions, an affirmative answer would be very much appreciated. 


Thanks a lot.


**Edit:** I realize now, after soberly considering Cantlog's comments, that I do indeed wish that $\deg\pi|\_Y=\deg\pi$ holds in my situation, with $\pi$ unramified at the generic point of $Y$. This can also be expressed as the requirement that the inertia index of $\pi$ at the generic point of $Y$ is equal to $\deg\pi$. Clearly, this is not possible in general, but it will be possible in some cases. If you can name sufficient conditions for such a Normalization to exist, I would be very grateful.



Control ramification in Noether Normalization
Let $y\_0\in Y$ be a point in the smooth locus of $X$. We are going to construct a finite morphism $\pi: X\to \mathbb A^n\_k$ unramified (thus étale) at $y\_0$. As the ramification locus is closed, this will imply that $\pi$ is unramified at the generic point of $Y$. From now on we can merely forget $Y$. I will suppose $k$ is perfect and infinite to avoid complications.


Let $\overline{X}$ be a projective closure of $X$, write $\overline{X}=\mathrm{Proj}(B)$ for some homogeneous $k$-algebra $B$, and write $\overline{X}\setminus X=V\_+(f\_0)$. By homogeneous prime avoidance, there exists a homogeneous element $f\_1\in B$ of degree $1$ such that 


1. $y\_0\in V\_+(f\_1)$;
2. $V\_+(f\_1)$ does not contain any irreducible component of $V\_+(f\_0)$;
3. $V\_+(f\_1)$ does not contain the tangent space of $X$ at $y\_0$ (that is $(f\_1)\_{y\_0}\notin {\mathfrak m}^2(1)\_{y\_0}$, where $\mathfrak m$ is the sheaf of ideals defining $y\_0$ in $X$).


Condition (2) implies that $V\_+(f\_0)\cap V\_+(f\_1)$ has dimension $n-2$. Condition (3) insures that $V\_+(f\_1)$ is smooth at $y\_0$. Next we take a homogeneous element $f\_2$ of degree $1$ such that 


1. $y\_0\in V\_+(f\_2)$;
2. $V\_+(f\_2)$ does not contain any irreducible component of $V\_+(f\_0)\cap V\_+(f\_1)$ (in particular it doesn't contain any irreducible component of $V\_+(f\_1)$);
3. $V\_+(f\_2)$ does not contain the tangent space of $V\_+(f\_1)$ at $y\_0$.


We repeat this operation to find homogeous elements $f\_1, \dots, f\_n$ of degree $1$ such that 


1. $V\_+(f\_1)\cap \cdots \cap V\_+(f\_n)$ has dimension $0$ and is smooth at $y\_0$;
2. $V\_+(f\_0)\cap \cdots \cap V\_+(f\_n)=\emptyset$.


Now consider the morphism 
$$ \pi : \overline{X}\to \mathbb P^n\_k=\mathrm{Proj}(k[T\_0,\cdots, T\_n]), \quad x\mapsto (f\_0(x),..., f\_n(x)).$$
We have $\pi^{-1}((1,0,..., 0))=V\_+(f\_1)\cap \cdots \cap V\_+(f\_n)$ (as schemes) is finite and smooth at $y\_0$, so $\pi$ is unramified at $y\_0$. Moreover $\pi^{-1}(\mathbb A^n\_k)=D\_+(f\_0)=X$ if $\mathbb A^n\_k$ corresponds to $T\_0\ne 0$ in $\mathbb P^n\_k$. 


It remains to see that $\pi$ is finite. This is e.g. Lemma 3 in Kedlaya, "More étale covers...", J. Alg. Geo. (2005). For completeness, let me give the arguments here. Let $z\in \mathbb P^n\_k$. Then $z\in D\_+(T\_i)$ for some $i\le n$. We have $\pi^{-1}(z)$ proper over $k(z)$ because $\pi$ is proper, and affine because it is contained in the affine variety $D\_+(f\_i)$. So it is finite. This implies that $\pi$ is quasi-finite and proper, hence finite. 


If $X$ is smooth, one can construct the $f\_i$ so that $V\_+(f\_1)\cap \cdots V\_+(f\_n)$ is smooth. Then $\pi$ is unramified above $\pi(y\_0)$. If we can manage to have $Y\supseteq V\_+(f\_1)\cap\cdots V\_+(f\_n)$, then $\pi|\_Y$ has same degree as $\pi$. This is possible if $Y$ is also smooth and is defined by a single element $f\_1$. 


