Let $Ysubseteq mathbb{A}^n$ be an affine variety with affine co-ordinate ring $A(Y)=k(x_1dots, k_n)/I(Y).$

Denote with $mathcal{O}(Y)$ the ring of all regular functions $fcolon Yto k$.

Fix an affine variety $Y$ and a point $Pin Y$. Let $U,Vsubseteq Y$ be open neighbourhoods of $P$.

For $finmathcal{O}(U)$ and $ginmathcal{O}(V)$ define $f sim g$ if there exists a open neighbourhood $Wsubseteq Ucap V$ of $P$ such that $f|_W=g|_W$. Then $sim$ s an equivalence relation between these the set of all such pairs $(U,f)$. The set $mathcal{O}_{P,Y}$ (or $mathcal{O}_P)$ of all equivalence classes is a local ring, called the ring of germs of functions.

For a pair of functions $(U,f)$, $(V,g)$ (as above except we ignore a specific point $P$), define $fsim’g$ if there exists a open set $Wsubseteq Ucap V$ such that $f|_W=g|_W$. Then $sim’$ is an equivalence relation and the set $K(Y)$ of all equivalence classes is a field.

Denote now with $K(R)$ the quotient field of an integral domain $R$.

I have to prove that in general the following is true:

$$boxed{K(Y)=K(mathcal{O}_P)}$$

We consider the restriction map $$mathcal{O}_{P,Y} to K(Y)quadtext{defined as}quad (f)mapsto (f)’.$$

I have shown that this map is injective, then results that $$K(mathcal{O}_{P,Y})subseteq K(Y).$$

For the opposite inclusion I was suggested to use the following:

Using the above facts, irreducibility of $Y$ and $$color{red}{K(Y)=bigcup_{Qin Y}K(mathcal{O}_Q)}$$

Why is the expression in red true?Question 1.

show that $$K(mathcal{O}_Q)=K(Y)quadtext{for each}quad Qin Y.$$

Could someone suggest me how to proceed? I have no idea how to deal with this inclusion. Thanks!