Why $av$ is integral over $k[Y\times \mathbb{A}^r]$

I am reading Shafarevich's Basic Algebraic Geometry 1(Third Edition). I met some trouble when I read the proof of Theorem1.14 in page 62. The theorem is

Theorem 1.14 If $f:X\to Y$ is a regular map and $f(X)$ is dense in $Y$, then $f(X)$ contains an open set of $Y$.

The proof assumes $X$ is irreducible and affine, $r$ is the transcendence degreee of the field extension $k(X)/k(Y)$. Choose $r$ elements $u_1, \dots, u_r\in k[X]$ that are algebraically independent over $K(Y)$. Then $$K[X]\supset k[Y][u_1,\dots,u_r]\supset k[Y] \quad\text{and}\quad k[Y][u_1.\dots,u_r]=k[Y\times\mathbb{A}^r].$$

In the seventh line of page 63, it says:

Any element $v\in k[X]$ is algebraic over $k[Y\times \mathbb{A}^r]$, hence there exists an element $a\in k[Y\times \mathbb{A}^r]$ such that $av$ is integral over $k[Y\times \mathbb{A}^r]$.

I don't know how to prove this statement.

• If an element $x$ is algebraic, then there exists some elements $a_0,\dots,a_n$ such that $a_nx^n+\cdots+a_0=0$. By multiplying this equation with $a_n^{n-1}$ notice that $a_nx$ is integral. Commented May 27, 2018 at 20:26
• @user26857 nice answer, thank you! Commented May 27, 2018 at 23:19

That is a general fact, we are going to prove it:

Let be $$R$$ a domain, $$K=q.f(R)$$ and let be $$L$$ a finite and algebraic extension over $$K$$. Then:

i) $$\forall v\in L$$ $$\exists$$ $$a\in R-\{0\}:$$ $$av$$ is integral over $$R$$.

ii) Exists a basis of $$L$$ over $$K$$ such that their elements are integral over $$R$$.

Proof of i)

Let be $$v\in L$$, we have $$L/K$$ is algebraic then exists $$a_n,\ldots,a_1,a_0\in K$$ such that $$a_nv^{n}+a_{n-1}v^{n-1}+\cdots+a_1v+a_0=0$$ We have $$K=q.f(R)$$ so $$\forall\hspace{0.05cm}i\in\{0,1\ldots,n\}\hspace{0.05cm} \exists\hspace{0.05cm}b_i\in R,c_i\in R-\{0\}: a_i=\frac{b_i}{c_i}$$ Let be $$\gamma:=\prod_{i=0}^{n}c_i$$, $$\gamma_j=\prod_{0\leq i\leq n,i\neq j}c_i$$ and $$r_j:=\gamma_{j}b_{j}\in R$$, then $$a_nv^{n}+a_{n-1}v^{n-1}+\cdots+a_1v+a_0=0 \Rightarrow \gamma_{n}b_nv^{n}+\gamma_{n-1}b_{n-1}v^{n-1}+\cdots+\gamma_{1}b_1v+\gamma_{0}b_0=0\Rightarrow$$ $$r_nv^{n}+r_{n-1}v^{n-1}+\cdots+r_1v+r_0=0$$ Now we multiply by $$r_n^{n-1}$$ the last expression : $$0=r_n^{n-1}r_nv^{n}+r_n^{n-1}r_{n-1}v^{n-1}+\cdots+r_n^{n-1}r_1v+r_n^{n-1}r_0=$$ $$(r_nv)^n + r_{n-1}(r_nv)^{n-1}+\cdots+r_1r_n^{n-2}(r_nv)+r_{n}^{n-1}r_0$$ Thus the polynomial $$P(x) = x^n + r_{n-1}x^{n-1}+\cdots+r_1r_n^{n-2}x+r_{n}^{n-1}r_0$$ has a zero in $$r_nv$$, it is monic and belong to $$R[X]$$, so $$r_nv$$ is integral over $$R$$

Proof of ii):

We have $$L/K$$ is finite then $$m:=[L:K]=dim_{K}(L)<\infty$$ Thus exists $$\{v_1,\ldots,v_m\}$$ basis of $$L$$. If we use i) we have $$\forall\hspace{0.05cm}i\in\{1\ldots,m\}\hspace{0.05cm} \exists\hspace{0.05cm}a_i\in R-\{0\}$$ such that $$a_iv_i$$ is integral over $$R$$. We have to show $$\{a_1v_1,\ldots,a_mv_m\}$$ is lineary independent over $$K$$:

Let be $$\lambda_1,\ldots,\lambda_n\in K$$ such that $$\sum_{i=1}^{m}\lambda_i(a_iv_i)=0$$ Now we use $$\{v_1,\ldots,v_m\}$$ is lineary independent: $$0=\sum_{i=1}^{m}\lambda_i(a_iv_i) = \sum_{i=1}^{m}(\lambda_ia_i)v_i \Rightarrow 0=\lambda_ia_i\hspace{0.15cm}\forall\hspace{0.05cm}i\in\{1\ldots,m\}$$ We have $$a_i\neq 0$$ for all $$i\in\{1\ldots,m\}$$ then $$\lambda_i=0$$ for all $$i\in\{1\ldots,m\}$$. Thus $$\{a_1v_1,\ldots,a_mv_m\}\subset L$$ is lineary indepent over $$K$$ and the set $$\{a_1v_1,\ldots,a_mv_m\}$$ is a basis because $$m=dim_K(L))$$.