Show that there exists a regular function that is not a quotient of polynomials

Let $k$ be an algebraically closed field. Consider the Zariski-closed subset $Y=Z(xw-yz)\subset k^n$. On $U=Y\setminus Z(y,w)$ we consider the function $$ f\colon U\to k, P=(a,b,c,d)\mapsto \begin{cases} a/b &\text{if $P\in U\setminus Z(y)$,}\\ c/d & \text{if $P\in U\setminus Z(w).$} \end{cases} $$ My lectures notes claim that this is an example of a function that cannot be written as $f=g/h$ for $f,g\in k[x,y,z,w]$. I haven't been able to actually prove this. What I checked was that $xw-yz$ is an irreducible polynomial, and hence $Z(xw-yz)$ is irreducible. This would mean that if there were $g,h\in k[x,y,z,w]$, then $x/y=f/g$ on $U\setminus Z(y)$, and hence $xg=yf$ (since $U$ is also irreducible). Likewise $z/w=f/g$ yields $zg=wf$ on $U$. I can't find a contraction using this, which I need. Could someone help me out?

This question has been asked before (e.g. here: An example of a regular function over an open set), but the accepted answer talks about Cartier divisors, which I haven't seen before, so I'm actually hoping there is a more elementary argument.


You can't find a contradiction from what you wrote because there isn't one.

In the function field $k[Y] = \mathrm{Frac}(A)$ where $A = k[x,y,z,w]/(xw-yz)$ we do indeed have $\frac{f}{g} = \frac{x}{y} = \frac{z}{w}$ exactly because $xw - yz = 0$ and in the function field every nonzero element becomes invertible.

However, you are not asking about rational functions (the functions that live in the function field) but about regular functions meaning that you must have $\frac{f}{g} = \frac{x}{y} = \frac{z}{w}$ in the function field and additionally $g$ vanish nowhere on $U$ so that this fraction produces a well-defined regular function.

Let's see why we must have $g$ vanish somewhere on $U$. We are going to turn this into a pure algebra question. If $g$ did not vanish on $U$ then $Z(g) \subset Z(y,w)$ since $Z(y,w)$ is the complement of $U$. Therefore, $I = (y,w) \subset \sqrt{(g)}$ because these are radical ideals. By Krull's prinicpal ideal theorem $\sqrt{(g)}$ has height $1$ and $I$ is a nonzero prime ideal inside $\sqrt{(g)}$ so $I = \sqrt{(g)}$. Thus $g \in I$ and $I^n = (g)$ for some power $n$.

Let $\mathfrak{m} = (x,y,z,w)$ be the maximal ideal corresponding to the cone point. Now compute that $\dim_{\kappa} I^n_{\mathfrak{m}} / \mathfrak{m} I^n_{\mathfrak{m}} \ge 2$ (think about if $y^n - w^n$ can be in $\mathfrak{m} I^n_{\mathfrak{m}}$) for all $n$ to show that it is impossible for $I^n$ to be principal.