# $\operatorname{Spec} A$ as a colimit

I was reading the lecture notes on algebraic geometry and came across with the following definition:

Let $$A$$ be a commutative ring with unit, then $$\operatorname{Spec} A$$ is defined as the collection of all ring homomorphism $$A\rightarrow K$$, where $$K$$ is some field, and where we identify two maps $$f:A\rightarrow K$$ and $$f':A\rightarrow K'$$ if there exists a field homomorphism $$\alpha:K\rightarrow K'$$ such that $$f'=\alpha \circ f$$.

And then the author went on: this is a rather categorical definition, and in fact we could rephrase it as $$\operatorname{Spec} A=\operatorname*{colim}_{K\in \mathfrak{Field}} \operatorname{Hom}_{\mathfrak{Ring}}(A,K).$$ where $$\mathfrak{Field}$$ is the category of fields and $$\mathfrak{Ring}$$ is the category of rings.

I am trying to prove this but not sure if I am on the right track: Let $$\mathfrak{C}$$ be the subcategory of the coslice category of $$\mathfrak{Ring}$$ over $$A$$ where the objects are $$f:A\rightarrow K$$ and the morphisms are $$\alpha: f\rightarrow f'$$ such that $$f'=\alpha \circ f$$. But then I don't see how to proceed from there. Is there any literature about this definition of spectrum of a ring rather than the usual definition as the set of all prime ideals of $$A$$? Thank you.

• See my edits for proper MathJax (and LaTeX) usage. Note that \operatorname{} does not merely prevent italicization, but also results in context-dependent spacing, so that for example, the space to the right of $\operatorname{kos}$ in $\operatorname{kos}A$ differs from that in $\operatorname{kos}(A),$ those two being coded respectively as \operatorname{kos}A and \operatorname{kos}(A). (I don't know why so many mathematicians don't know things like this.) $\qquad$ Mar 19, 2021 at 17:20
• When you say "prove this", do you mean to prove that the description as a colimit agrees with the description in the second paragraph, or to prove that the description as a colimit agrees with the usual definition as the set of all prime ideals in $A$? Mar 19, 2021 at 17:22
• Basically, if $p$ is a prime ideal of $A$, then you get a ring homomorphism $A\rightarrow A/p \rightarrow \operatorname{Frac}(A/p)$. On the other hand, for any ring homomorphism $\phi:A\rightarrow K$, you get a prime ideal $\operatorname{ker}(\phi)$. This is the only construction that makes sense. Mar 19, 2021 at 17:22
• @Ishigami This is a colimit in the category of sets. Do you know how to describe arbitrary colimits in Set? It's basically exactly what's written in the second paragraph: take the disjoint union of all the sets in the diagram, and then quotient by the equivalence relation generated by identifying two elements if one is mapped to the other by a connecting map in the diagram. Mar 19, 2021 at 19:32
• @Ishigami Right, the colimit diagram here is "large" (it's indexed by the whole category of fields!), so there's no guarantee that the colimit will exist: the construction I described in my last comment might be a proper class. However, one can show in this case that the colimit exists by showing there is a set of representatives for the equivalence classes, i.e., the equivalence classes are in bijection with the set of prime ideals of $A$. This is done in the notes you link to and also in paul blart math cop's answer below. Mar 19, 2021 at 21:10

I'd like to briefly mention a slight set theoretic issue. The category of $$\mathbf{Fields}$$ is not small, so strictly speaking this colimit could "diverge" and no longer yield a set as an answer. In fact, the definition you gave in the second paragraph is a bit sketchy as well. The collection of all maps $$A \longrightarrow K$$ for all fields is definitely not a set, so modding out by an equivalence relation is not strictly in set theory. I won't dwell on these issues much, as they can be rectified (as below), and are beyond the scope of this question and of my understanding. But suffice it so say that this is a reason to use the usual definition of $$\operatorname{Spec}$$ as prime ideals.

I'll show this by directly proving that $$\operatorname{Spec} A$$ as you have it defined in the second paragraph satisfies the universal property of the below colimit. What is that universal property? Well it means that any cocone out of the indexing diagram is a map out of the colimit. More formally, let's fix some set $$X$$. Then a cocone from the indexing diagram to $$X$$ is a collection of commutative diagrams

for all maps $$i: K \longrightarrow L$$ of fields. To say that $$\operatorname{Spec} A$$ is a colimit of this diagram means that for any such cocone $$(X, \{f_K\}_{K \in \mathbf{Fields}})$$, we have the following commutative diagram, again for every such map $$i: K \longrightarrow L$$:

We can see therefore that it is, strictly speaking, incorrect to say that $$\operatorname{Spec} A$$ is the colimit of this diagram. Instead, we need to say that the cocone $$(\operatorname{Spec} A, \{\alpha_K\}_{K \in \mathbf{Fields}})$$ is the colimit. In other words, that this cocone is initial among all cocones. In particular, we need our maps $$\alpha_K: \operatorname{Hom}(A, K) \longrightarrow \operatorname{Spec} A$$ for all fields $$K$$. Well per your second paragraph, the elements of $$\operatorname{Spec} A$$ are define as equivalence classes of such maps. So we take $$\alpha_K(f) = [f]$$, where the brackets denote the equivalence class of $$f: A \longrightarrow K$$ viewed in $$\operatorname{Spec} A$$.

Now we have to check that this is actually a cocone, i.e. that for $$i: K \longrightarrow L$$ that $$\alpha_L \circ h_i = \alpha_K$$. Indeed, take some $$f: A \longrightarrow K$$. The right hand side is $$\alpha_K(f) = [f]$$ as above. The left hand side is $$\alpha_L(i \circ f) = [i \circ f] = [f]$$ by the very definition of the equivalence relation you gave! I hope now that you can sort of see what @AlexKruckman in the comments meant. The construction you gave in the second paragraph fits the colimit like a glove, and that is precisely because it is the standard construction of a colimit of sets.

EDIT: For this next paragraph, see the comments for a discussion of an error. I assumed $$f \sim i \circ f$$ was the equivalence relation, but it merely generates it. The proof I wrote below can be adapted to this correct equivalence relation but I'll leave it as is. The key ideas remain the same.

Anyways, we now have two tasks. Construct a map $$F: \operatorname{Spec} A \longrightarrow X$$ that fits in the diagram and proving that it is unique. We need, of course, for any $$f \in \operatorname{Hom}(A, K)$$ to have $$f_K(f) = F(\alpha_K(f))$$. So we'll do the naive thing and literally define $$F([f]) = \alpha_K(f)$$, given a representative $$f:A \longrightarrow K$$. But why is this well defined? It comes down again to commutativity - this time of the cocone with vertex $$X$$. Indeed, suppose $$[f] = [f']$$ where $$f \in \operatorname{Hom}(A, K)$$ and $$f' \in \operatorname{Hom}(A, L)$$. Then by definition, there is a map $$i: K \longrightarrow L$$ such that $$i \circ f = f'$$. In other words, $$h_i(f) = f'$$. Now, recall that we assumed the outer triangle commuted, i.e. $$f_L \circ h_i = f_K$$. Hence, $$f_L(h_i(f)) = f_K(f)$$ so $$f_L(f') = f_K(f)$$. And by my definition, $$F([f]) = f_K(f)$$ and $$F([f']) = f_L(f') = f_K(f)$$. Thus, $$F([f]) = F([f'])$$ whenever $$[f] = [f']$$ and we have well definition. Furthermore, we need to show that $$F$$ actually commutes in the diagram. This again fits like a glove. $$F(\alpha_K(f)) = F([f]) = f_K(f)$$, so $$F \circ \alpha_K = f_K$$ for all fields $$K$$.

So far we have found that given any cocone to $$X$$, we have a map from the cocone of $$\operatorname{Spec} A$$ to the cocone of $$X$$. All we nee to do now is show uniqueness. Indeed, suppose we had some other $$G: \operatorname{Spec} A \longrightarrow X$$ that fits into that commutative diagram. Then $$G \circ \alpha_K = f_K$$ so $$f_K(f) = G(\alpha_K(f)) = G([f])$$. This is exactly how $$F$$ was defined, so $$F = G$$. Once again, this all came to us for free. The hard work was done in the definition you gave.

Now, let's return to the classical definition of $$\operatorname{Spec} A$$ as the collection of prime ideals. As @WhatsUp pointed out in the comments, the relation between the two is that every prime ideal $$\mathfrak p$$ of $$A$$ gives us a map $$A \longrightarrow A/\mathfrak p \longrightarrow \operatorname{Frac}(A/\mathfrak p)$$, meaning the quotient field of the domain $$A/\mathfrak p$$. This is often called the residue field of $$\mathfrak p$$ and is denoted $$k(\mathfrak p)$$. On the other hand, every map $$f: A \longrightarrow K$$, $$K$$ a field, will have $$\ker(f)$$ a prime ideal by the first isomorphism theorem. These very closely related. $$\ker(A \longrightarrow k(\mathfrak p)) = \mathfrak p$$ and given $$f: A \longrightarrow K$$, $$k(\ker(f))$$ has an embedding into $$K$$ via extending the inclusion $$A/\ker(f) \longrightarrow K$$ to the field of fractions. So in particular, this gives us inverse bijections between your $$\operatorname{Spec} A$$ and the usual prime spectrum. We take $$\mathfrak p \mapsto [A \longrightarrow k(\mathfrak p)]$$ and $$[f] \mapsto \ker(f)$$. This is well defined because a map between fields in necessarily an injection and therefore does not affect the kernel. In other words, we can restrict the index diagram from ranging over the entire category of $$\mathbf{Fields}$$ to ranging over the full subcategory whose objects are the residue fields $$k(\mathfrak p)$$. This also resolves the set theoretic issue. The colimit over this restricted diagram is the same as the colimit ranging over the entire large category. Since the restricted diagram is small, the set theoretic issues can go away. This idea of restricting to a subdiagram is related to the general notion of a final functor. I think that the subset of the category of open sets of a space consisting of basic open set is another such example, but to be completely honest I'm not too familiar with final functors so please take what I'm saying with a grain of salt.

• What an amazingly thorough answer! One nitpick: in your paragraph that begins "Anyways...", you say that if $[f] = [f']$, then there is some $i$ with $i\circ f=f'$. This isn't quite true, because identifying $f$ and $f'$ like this forces lots of other identifications on us. The equivalence relation is the symmetric-transitive closure of this relation between functions. Concretely, $[f]=[f']$ iff there is a chain of functions $f=f_0, f_1,\dots,f_n=f'$ such that for each $k$, there is $i_k$ such that either $i_k\circ f_k=f_{k+1}$ or $i_k\circ f_{k+1}=f_k$. Mar 20, 2021 at 12:34
• Thank you! And you're right, that completely slipped my mind. I suppose the fact that the relations I used generate the equivalence relation at hand was really what I needed. Thank you for pointing that out! Mar 20, 2021 at 15:59