Evaluating rational functions In Hartshorne's Algebraic Geometry the function field $K(Y)$ of a variety $Y$ is defined as the set of equivalence classes $<U,f>$ with $f$ being a regular function on the open subset $U\neq\emptyset$. We have $<U,f>=<V,g>$ if $f$ and $g$ agree on $U\cap V$.
Now for my question:
How does one evaluate a "rational function on $Y$" $f$? Is it $f(P)$ using the Evaluation map for polynomials? In this case, I don't see that this is well defined: Let $P\in U\setminus V$ and $<U,f>=<V,g>$, then g(P) might not even be defined!
I also wonder what the motivation of the term "rational function on $Y$" is, while an element of $K(Y)$ is in generel just regular on an non-empty open subset of Y.
I have also seen definitions of the function field, not taking the domain into respect, where I assume one takes the largest possible. How is this consistent with Hartshorne and where are my mistakes? Thanks for your help!
 A: The point is this: on a variety $Y$, given open subsets $U$ and $V$ and regular functions $f : U \to k$ and $g : V \to k$, if $f |_{U \cap V} = g |_{U \cap V}$, there is a unique regular function $h : U \cup V \to k$ such that $f = h |_U$ and $g = h |_V$. (There's only one thing it can be – you just have to check that it works!) Therefore, in any equivalence class of regular functions, there is a unique maximal representative.
In particular, you can evaluate a rational function at a point $P$ so long as there is some representative defined at $P$. They are called rational functions as a matter of tradition, not because they are actually functions. (It is tempting to think of rational functions on $Y$ as being regular maps $Y \to \mathbb{P}^1$, but that doesn't work in general: for example, $x / y$ defines a regular function $\mathbb{A}^2 \setminus \{ (0, 0) \} \to k$, hence a rational function $\mathbb{A}^2 ⤍ k$, but there is no way of extending it to a regular map $\mathbb{A}^2 \to \mathbb{P}^1$.)
