## Hartshorne Definition Question

I have a question from Algebraic Geometry by Robin Hartshorne. Here is a proof in the textbook:

Theorem. Let $\displaystyle X$ be a variety and $\displaystyle Y \subseteq \mathbb{A}^n$ be an affine variety. Let $\displaystyle x_1, \ldots, x_n$ be the coordinate functions on $\displaystyle \mathbb{A}^n$. A map of sets $\displaystyle \psi : X \rightarrow Y$ is a morphism if and only if $\displaystyle x_i \circ \psi$ is a regular function on $\displaystyle X$ for each $\displaystyle i=1, \ldots, n$.

Proof
$\displaystyle (\Rightarrow)$ If $\displaystyle \psi$ is a morphism then the $\displaystyle x_i \circ \psi$ are regular functions. This is by the definition of a morphism.

$\displaystyle (\Leftarrow)$ Suppose the $\displaystyle x_i \circ \psi$ are regular. Let $\displaystyle f=f(x_1, \ldots, x_n)$ be any polynomial. Then $\displaystyle f \circ \psi$ is also regular on $\displaystyle X$. Now because the closed sets of $\displaystyle Y$ are defined by the vanishing of polynomial functions and because regular functions are continuous, $\displaystyle \psi^{-1}$ takes closed sets to closed sets. So $\displaystyle \psi$ is continuous. Recall that regular functions on open subsets of $\displaystyle Y$ are locally quotients of polynomials. Hence $\displaystyle g \circ \psi$ is regular where $\displaystyle g$ is a regular function on any open subset of $\displaystyle Y$. Therefore $\displaystyle \psi$ is a morphism.

There is no definition for the $\displaystyle i$-th coordinate function given in this textbook. I looked in Ideals, Varieties, and Algorithms and it gives the following definition:

Definition
(i) Given a polynomial $\displaystyle f \in k[x_1, \ldots, x_n]$, we let $\displaystyle \overline{f}$ denote the polynomial function in $\displaystyle A(X)$ represented by $\displaystyle f$.

(ii) Each variable $\displaystyle x_i$ gives a polynomial function $\displaystyle \overline{x_i} : X \rightarrow k$ whose value at a point $\displaystyle p \in X$ is the $\displaystyle i$-th coordinate of $\displaystyle p$. We call $\displaystyle \overline{x_i} \in A(X)$ the $\displaystyle i$-th coordinate function on $\displaystyle X$.

Is this the same definition that Hartshorne is using? If it is different, what is the correct definition? Thanks.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0, "url": "http://mathhelpforum.com/advanced-algebra/152854-hartshorne-definition-question.html", "fetch_time": 1529958063000000000, "content_mime_type": "text/html", "warc_filename": "crawl-data/CC-MAIN-2018-26/segments/1529267868876.81/warc/CC-MAIN-20180625185510-20180625205510-00501.warc.gz", "warc_record_offset": 204728129, "warc_record_length": 9364, "token_count": 588, "char_count": 2306, "score": 3.609375, "int_score": 4, "crawl": "CC-MAIN-2018-26", "snapshot_type": "latest", "language": "en", "language_score": 0.7603708505630493, "file_path": "/sailhome/yjruan/project/latent-lm/data/processed/finemath-4plus/finemath-4plus/train-00020-of-00064.parquet"}