TITLE: Question about definition of Spec function
QUESTION [0 upvotes]: If we have commutative rings $R$ and $T$ and a homomorphism between them $\phi : R \to T$, then we define $Spec(\phi): Spec(T) \to Spec(R)$ by $p \mapsto \phi^{-1}(p)$.
There is then a theorem in the notes that I am reading that states that if $\phi$ is surjective, then $Spec(\phi)$ is injective.
My question is how $Spec(\phi)$ could ever not be injective, since that would mean that $\phi^{-1}(p)=\phi^{-1}(q)=s$, but $p \not= q$, so $\phi(s)=p \not= q = \phi(s)$.
Moreover I am also unsure as to how $Spec(\phi)$ is even well-defined in the case where $\phi$ is not surjective, or at least if not all prime ideals in $T$ are in $Im(\phi)$.
My other question is about a theorem that says that if $T$ is finite over $R$ then $Spec(\phi)$ has finite fibres, i.e. the set $Spec(\phi)^{-1}(\{p\})$ is finite, and again I fail to see how this set could have size greater than 1.
Any help would be appreciated.

REPLY [3 votes]: We can look at this simple example: let $R=\mathbb{C}[x]$ and $S=\mathbb{C}[x,y]$. Consider the inclusion map $\phi: R \to S$ and the induced map $\operatorname{Spec}(\phi): \operatorname{Spec}(S) \to \operatorname{Spec}(R)$.
Take $p=(x-a)$ (where $a$ is a number) a prime ideal in $\operatorname{Spec}(R)$. What is $\operatorname{Spec}(\phi)^{-1}(\{p\})$? It just consists of all prime ideals $Q$ of $S$ such that $\phi^{-1}(Q)=p$. Can we find more than one of such $Q$? Yes! In fact, we can find infinitely many of them, for example, all prime ideals of the form $(x-a,y-b)$ where $b$ is any number.
Geometrically speaking, you can think of $\operatorname{Spec}(S)$ as a plane and $\operatorname{Spec}(R)$ as a line, say, the $x-$axis of the plane. The map $\operatorname{Spec}(\phi)$ is just the projection map from the plan to the $x-$axis. Prime ideal $p$ corresponds to the point $(a,0)$ and $\operatorname{Spec}(\phi)^{-1}(\{p\})$ is what called the fiber over the point $(a,0)$ (everything that project down to $(a,0)$. Obviously, all the points $(a,b)$ projects to $(a,0)$ and they correspond to prime (maximal) ideals $(x-a,y-b)$.
For an example that $T$ is finite over $R$ and there is a fiber that has more than one points, we can take the following simple one:
Take $R=\mathbb{C}[x]$ and $S=\mathbb{C}[x,y]/(x-y^2)$. Then at each prime ideals $(x-a)$, $a\not = 0$, of $\operatorname{Spec}(R)$, we can see that there are two prime ideals $(x-a,y-a)$ and $(x-a,y+a)$ in $\operatorname{Spec}(\phi)^{-1}((x-a))$. The picture is just the projection of horizontal parabola to the $x-$axis, so above each point $a\not =0$ we have two points of the parabola that maps down to it.
{"set_name": "stack_exchange", "score": 0, "question_id": 4111411}