How to turn elements of a ring $A$ into functions on $\text{Spec}A$? Let $A$ be a commutative ring with $1$, and $a \in A$. In our class, we’ve just introduced a construction that aims to turn $a$ into a function on $\text{Spec}A$. There are some points I’m not clear about, so I want to ask here.
The following is a paraphrase of the construction.

We start with $a \in A$ and $P \in \text{Spec}A$. Take: $$\bar{a} \in A/P \ (=: \text{domain } D) \hookrightarrow (\text{the field}) \ K(P) := \text{Quot}(D) = \left\{ \frac{f}{g}: f,g \in D, g \neq 0 \right\}$$
Then we define $a(P) := \bar{a} \in K(P)$.

My questions are as follows:

*

*When the text says $\bar{a} \in K(P)$, would it be correct to understand that as $\bar{a} = \frac{\bar{a}}{1_D} = \frac{a + P}{1_A + P}$?

*This is in fact the first time we are introduced to quotient fields, but there’s not much information after that. How should I understand the notation $\frac{f}{g}$, and what operations am I allowed to do with it?

An example of this construction is then given as follows.

We take the ring $\mathbb{C}^2$, which corresponds to $\text{Spec}\ \mathbb{C}[x,y]$. Take $p = (c,d) \in \mathbb{C}^2$, which corresponds to the ideal $P = (x-c,y-d) \in \text{Spec}\ \mathbb{C}[x,y]$.
Now $K(P) = \mathbb{C}[x,y] / P$, which can be show to be isomorphic to $\mathbb{C}$ via the mapping $x \mapsto c, y \mapsto d$.
Then for $a(x,y) \in \mathbb{C}[x,y], a(x,y) \mapsto \bar{a} \mapsto a(c,d)$.



*Following the recipe, I understand why $a(x,y)$ is mapped to $\bar{a}$. But isn’t $\bar{a}$ in this case is $\bar{a} = a(x,y) + P$? How do we go from this to $a(c,d)$?

 A: To first answer your questions in the order asked:

*

*This is fine (and probably the most intuitive way) as long as you're fine not being too meticulous with the domain in which something is defined. That is to say, if you label the monomorphism $D \hookrightarrow K(P)$ as $\iota$, by $\overline{a} \in K(P)$ the author really replaces $\overline{a}$ with $\iota(\overline{a})$. The remainder of your definitions are correct.


*As some in the comments have mentioned, the field of fractions is an example of localization (at a prime ideal $P$). To give a brief overview, if $P \subset A$ is any prime ideal, we may define the localisation at $P$ as $A_P := A \times (A - P) / \sim$ where $ (p, q) \sim (r, s)$ iff $\exists t \in A - P$ with $$t\cdot (ps - qr) = 0$$ (the whole reason for the $t$ is when we have non-zero divisors in $A - P$  to ensure the only place division by zero has significance is in trivial rings, most of the time you just want $t=1$ so that our equivalence relation is the same as it is for $\mathbb{Q}$). The field of fractions is when your prime ideal is $P = (0)$ — you should basically interpret this as "we consider $(0)$ to be the geometric origin (consequently, if there are zero-divisors, they will be in $P-A$ so you really do want $A$ to be a domain). Short story long, when $A$ is a domain you can do the same things with $\frac{f}{g} \in K(P)$ that you can in $\mathbb{Q}$
(and you really should think of this as a fraction in the full sense, as $\mathbb{Q}$ is realized as the fraction field of $\mathbb{Z}$).


*As mentioned in the comments, you really have $K(P) \cong \mathbb{C}[x, y] / (x- a, y- b)$ for the same reason you say $\mathbb{C}^2$, which corresponds to $\mathbb{C}[x,y]$ (c.f. Hilbert's Nullstellensatz). To see where the map $\overline{a} \mapsto a(c,d)$ comes from, using your notation in part (1) you have $\overline{a} = a + P = a(x, y) + (x - c, y - d)$ so we may define a map $ \textrm{ev}_P : K(P) \to  \mathbb{C}^2$ (called the evaluation map at $P$ or $(c,d)$) by $$a(x,y) + (x - c, y - d) \mapsto a(c, d) + (c- c, d- d) = a(c,d)$$
