# Example where naive equality of rational functions does not give a sheaf

Let $$f,g\in \Bbbk[x_1,\dots,x_n]$$. Usually a ring of rational functions is defined as a localization of the polynomial ring (or of the ring of polynomial functions). In this case, equality of rational functions is a global notion: $$\tfrac{f_1}{g_1}=\tfrac{f_2}{g_2}$$ means $$f_1g_2=f_2g_1$$ either as elements in a polynomial ring or as functions on $$\Bbbk^n$$.

Suppose instead we define $$\tfrac{f_1}{g_1}=\tfrac{f_2}{g_2}$$ for $$f_1,g_1$$ coprime and $$f_2,g_2$$ coprime to mean the associated functions coincide when they're defined, i.e on the intersection of the supports of $$g_1,g_2$$. In other words if the polynomial functions $$f_1g_2,f_2g_1$$ are equal on $$\mathrm{supp}(g_1)\cap\mathrm{supp}(g_2)$$.

What is an example where equality of rational functions holds in this local sense but there is no global (defined on the union of the supports) rational function restricting to $$\tfrac{f_1}{g_1},\tfrac{f_2}{g_2}$$?

There seems to be no example in $$\mathbb R,\mathbb C$$ for analytic reasons, but I am not sure what happens over general fields.

• "This makes rational functions into a sheaf." A sheaf on what? Presumably you want to be working with some geometric space here, but you never explain what (probably some definition of "variety" associated to $k[x_1,\cdots,x_n]$, but you need to specify this). Commented May 10, 2020 at 19:53
• @KReiser whoops, forgot about that (though it doesn't alter the question). I'll add the details. Commented May 10, 2020 at 19:54
• I think there are still underlying issues which make it difficult to write a clear answer to this question: you're not so specific on the definition of the sheaf you come up with, and you're not very specific on where you are on the "naive variety" versus scheme viewpoint (nor any possible restrictions on $k$). For instance, one version of an answer is that nothing changes with this relation because two elements of $k[x_1,\cdots,x_n]$ which agree as functions must be equal, but the truth of this statement depends on the answers to some of the aforementioned questions (think $x^p$ versus $x$). Commented May 10, 2020 at 21:59
• Dear @KReiser, forgive me for omitting many details. I will edit my question thoroughly tomorrow. Until then I will just try to say: my question does not require the word 'sheaf' or 'variety'. I am asking whether it's possible for two rational functions to agree as set functions over the intersection of the supports of their denominators, but for there to exist no rational function restricting to each of them. Commented May 10, 2020 at 22:03
• Not on affine space (with suitable hypotheses). Of course, the hypotheses matter! If you're willing to go to varieties which aren't $\Bbb A^n$, there are plentiful examples with basically any choice of hypotheses. Commented May 10, 2020 at 22:05

This cannot happen. We will deal with the cases that $$k$$ is finite and infinite separately, because the failures are essentially different.

In the finite case, any function $$k^n\to k$$ can be represented by a polynomial (Lagrange interpolation is a proof of this, for instance). This implies that we can always find a rational function defined on the union of the supports of $$g_1,g_2$$ which takes the required values everywhere: simply pick as the numerator the polynomial which has values $$f_i/g_i$$ where either expression is defined and the value $$1$$ where neither is defined, and then for the denominator the polynomial which has value $$0$$ where $$g_1$$ and $$g_2$$ vanish and $$1$$ elsewhere.

In the infinite case, we prove a lemma first.

Lemma: If $$F$$ is an infinite field, then any polynomial which vanishes identically on $$F^n$$ is the zero polynomial.

Proof. Start with $$n=1$$. Then any nonzero polynomial of degree $$d$$ has at most $$d$$ distinct roots, and thus cannot vanish identically on an infinite field.

In the case that $$n>1$$, suppose our polynomial $$f\in F[x_1,\cdots,x_n]$$ is nonzero. Writing $$f\in F(x_1,\cdots,x_{n-1})[x_n]$$, we see that there are a finite number of roots of this polynomial in $$x_n$$. So we can pick a $$b_n\in F$$ so that $$f(x_1,\cdots,x_{n-1},b_n)$$ is not identically zero. Repeating this trick a number of times, we find $$b_2,\cdots,b_n$$ so that $$f(x_1,b_2,\cdots,b_n)$$ is nonzero, and then we may apply the $$n=1$$ case. $$\blacksquare$$

Now I claim that for $$k$$ infinite, $$k^n$$ with the Zariski topology (closed subsets are given by the common vanishing locus of an ideal in $$k[x_1,\cdots,x_n]$$) is irreducible. Suppose we can write $$k^n$$ as the union of two distinct proper closed subsets $$C_1=V(I_1)$$ and $$C_2=V(I_2)$$. Now for any choice of nonzero polynomials $$f_1\in I_1$$ and $$f_2\in I_2$$, we get that $$V(f_1)\supset V(I_1)$$ and $$V(f_2)\supset V(I_2)$$, so we have that $$V(f_1)\cup V(f_2)=k^n$$. But $$V(f_1)\cup V(f_2)=V(f_1f_2)$$, so $$f_1f_2$$ vanishses identically and must be zero by the lemma. But $$k[x_1,\cdots,x_n]$$ is a domain, so $$f_1$$ or $$f_2$$ is zero, which is a contradiction.

Next, the vanishing locus of $$f_1g_2-f_2g_1$$ is a Zariski-closed set which contains the Zariski-open subset where $$g_1$$ and $$g_2$$ are simultaneously nonzero. As all open subsets of an irreducible space are dense, this means that $$f_1g_2-f_2g_1$$ vanishes on all of $$k^n$$, so by the lemma it is the zero polynomial. This means that we have $$f_1g_2=f_2g_1$$ as elements of $$k[x_1,\cdots,x_n]$$. Now, applying the fact that polynomial rings over a field are UFDs, we see that if the pairs $$f_1,g_1$$ and $$f_2,g_2$$ are both relatively prime and we have $$f_1g_2=f_2g_1$$, then $$f_1=f_2$$ and $$g_1=g_2$$. So the supports of $$g_1,g_2$$ are the same and $$f_1/g_1$$ suffices.

As a final comment, this is kind of a strange question to ask if you're interested in algebraic geometry, because one of the big moneymakers in the field is keeping track of functions more fastidiously than just by their values. We frequently keep track of functions which are different yet evaluate the same everywhere (two functions differing by a nilpotent element, for instance) and this extra care actually helps us prove theorems and make sense of the geometry we're doing.

• Dear KReiser, in the penultimate paragraph, why does the zero set $\mathbf{Z}(f_1g_2-f_2g_1)$ contain the intersection of the supports of $g_1,g_2$? I don't see why $g_1(a),g_2(a)\neq 0$ implies $f_1g_2-f_2g_1$ is zero at $a$. Commented May 11, 2020 at 10:39
• This is your assumption that $f_1/g_1=f_2/g_2$ as functions where they are both defined. Commented May 11, 2020 at 18:31
• Thank you for this instructive answer! I did not think to use irreducibility. Commented May 12, 2020 at 7:27