# Rational functions on reducible affine algebraic sets

Let $X$ be an affine algebraic set in $\mathbb C^n$, i.e., the vanishing set of a family of polynomials. Let's call a function $f:X\to \mathbb C$ locally rational if for every $x\in X$ there exists a Zariski open $U\subseteq \mathbb C^n$ such that the restriction of $f$ to $U\cap X$ is a rational function (i.e., given by a ratio of two polynomials).

If $X$ is irreducible, then there is a theorem in Shafarevich's book which says that any locally rational map $f:X\to \mathbb C$ is in fact a polynomial. Does anyone know of a counterexample to this statement for the case where $X$ is reducible? And in the latter case, what is the optimal refinement of the theorem?

• If by "given by a ratio of two polynomials" you assume that the denominator does not vanish on $U\cap X$ (or, for that matter, on $U$), then the statement also holds for any affine algebraic set. This is built in scheme theory, under the fact that there is a sheaf on $\mathop{\rm Spec}(A)$ with value $A_f$ on $D(f)$. At the level of algebraic sets, unfortunately, Theorem 3.2 of Hartshorne's Algebraic Geometry assumes irreducibility. I had given a proof in general in my Alg. Geometry notes, Théorème 3.3.7, math.u-psud.fr/~chambert/publications/teach/Dea-1999.pdf – ACL Mar 5 '13 at 9:16
• Thank you ACL! I am not an algebraic geometer, but for some reason I was not aware of this simple refinement of the standard argument. – Valerie Mar 6 '13 at 5:40

Answer: see the above instructive comment by ACL.

• Dear @Valerie: You may consider accepting this answer to formally close the question. It may also be helpful to copy ACL's comment into the answer box, with proper attribution. – Ricardo Andrade Oct 23 '13 at 16:43