# Lemma 3.6 of Hartshorne's book

This is lemma 3.6 page 20 of Hartshorne's Algebraic Geometry book. Let $X$ be a variety and let $Y$ be an affine variety. A map $f: X \rightarrow Y$ is a morphism if and only if $x_{i} \circ f$ is a regular function on $X$ for each $i$ where $x_{i}$ are the coordinate functions.

The first part says: if $f$ is a morphism then $x_{i} \circ f$ must be regular by definition of morphism. I'm assuming he's considering the pullback, however in order to do this we need to know that each $x_{i}$ is a regular function on $X$, why is this?

-
It is the restriction of a polynomial function to $X$, no? – Mariano Suárez-Alvarez May 11 '12 at 2:27
@Mariano Suárez-Alvarez: I know that is true by definition of how morphisms from any variety $X$ to $\mathbb{A}^{1}$ are given (from other book) but it seems Hartshorne's does not defines this before, so I'm wondering how he concludes that. – Mario May 11 '12 at 2:31
I don't have my copy with me, but a regular function on an affine variety is for Hartshorne a function to $k$ that is locally a quotient of polynomials (and the local denominator does not vanish). $x_i$ definitely fits the bill. – Dylan Moreland May 11 '12 at 2:33
@Dylan Moreland: never mind, I see my mistake now, thanks. – Mario May 11 '12 at 2:46