# Definition of Regular function

In Harsthone page 15, the notion of regular function of a quasi affine variety $$Y$$ is defined as followds.

A function $$f:Y \to k$$ is regular at a point $$P \in Y$$ if there is an open neighborhood $$U$$ with $$p \in U \subset Y$$ and polynomial $$g,h \in A = k [x_1,...,x_n]$$, such that $$h$$ is nowhere zero on $$U$$ and $$f=g/h$$ on $$U$$. We say that $$f$$ is regular on $$Y$$ if it is regular at every point of $$Y$$. We denote by $$\mathcal{O}(Y)$$ the ring of all regular functions on $$Y$$.

On the other hand,

in the page 17, THEOREM 3.3 in the book said that

$$\mathcal{O}(Y)$$ is isomorphic to the affine coordinate ring of $$Y$$,
$$\mathcal{O}(Y)\cong A(Y)=k[x_1,...,x_n]/I(Y)$$.

But I cannot understand it. Because any element of $$A(Y)$$ can be represented by the polynomial and not its ratio. So why is $$\mathcal{O}(Y)$$ defined by using ratio $$g/h$$ of polynomials $$g,h$$?

• The goal is to have a local definition of regularity, exactly like for smooth manifolds. The point of allowing quotients is to be able to say, for instance, that $1/x$ is regular on $\mathbb{A}^1 \backslash \{0\}$. The theorem expresses a non-trivial property, that is, that every function that is locally regular is actually a polynomial. Commented Nov 3, 2019 at 14:04
• I was wrong because I dropped the term quasi from the above definition. In quasi-affine case, it is difficult for me to reveal what is the coodinate ring. If $Y$ is quasi affine variety, then $I(Y)=\{0\}$? In harsthone book, I cannot find the definition of regular functions for non-quasi affine varieties. $1/x$ can be represented by some polynomial which represents the class in the coordinate ring $k[x]/I(\mathbb{A}-\{0\})$? Commented Nov 4, 2019 at 11:04
• No. Theorem 3.3 works only for affine varieties. Indeed, $1/x$ is regular on $\mathbb{A}^1 \backslash \{0\}$, but isn’t equal to any polynomial function (note that its vanishing ideal is $0$). In general, the correspondence between vanishing ideals and varieties works only for affine (or projective) varieties, not quasi-affine or quasi-projective ones. Commented Nov 4, 2019 at 14:00

Let me give you an easy case of the statement: consider $$Y=\mathbb{A}^1$$ (over an algebraically closed field $$k$$). Then you know that $$A(Y)=k[x]$$.
Consider a regular function $$f:Y\to k$$. Given a point on $$Y$$ and an open neighborhood $$U$$ of this point, you know that you can write $$f_U=g_U/h_U$$, with $$h_U$$ never vanishing. But then for any $$a\in zero(h_U)$$, there is an open neighborhood $$V$$ containing $$a$$ with $$f_V=g_V/h_V$$ and $$h_V$$ not vanishing on $$V$$.
On $$U\cap V$$, you have $$f_U=f_V$$, ie $$g_Vh_U=h_Vg_U$$. As $$h_V(a)\neq 0$$, you necessarily have $$g_U(a)=0$$ with at least same multiplicity as $$h_U$$. Since this is true for all $$a\in zero(h_U)$$, we obtain $$h_U |g_U$$, so $$f_U$$ is a polynomial.
Now $$f$$ is locally given by polynomials, so it is globally a polynomial.