Describe $\operatorname{Spec} R/fR$ with respect to prime decomposition of $f$ in a PID. This is an exercise from Goertz/Wedhorn: Let $R$ be a PID and $f\in R$ with prime-decomposition $f=\epsilon f_1^{n_1}\ldots f_k^{n_k}$. Analyse the affine scheme $X=\operatorname{Spec} R/fR$, so the topological space, stalks and $\mathcal{O}_X(U)$ for $U$ open.
What I have so far:$X=\operatorname{Spec} R/fR$ is homeomorphic to $V(f)\subseteq \operatorname{Spec} R$, and the prime ideals in the letter set are precisely $\{(f_1)=\mathfrak{p}_1,\ldots,(f_k)=\mathfrak{p}_k\}$. Thus, as a set we have $\operatorname{Spec} R/fR=\{\overline{\mathfrak{p}_1},\ldots,\overline{\mathfrak{p}_k}\}.$ For the stalk we have $$\mathcal{O}_{X,\overline{\mathfrak{p}_s}}=(R/fR)_{\overline{\mathfrak{p}_s}}\cong (R/(f_1^{n_1}))_{\overline{\mathfrak{p}_s}}\times\ldots\times (R/(f_k^{n_k}))_{\overline{\mathfrak{p}_s}}=(R/(f_s)^{n_s})_{\overline{\mathfrak{p}_s}},$$ because for $l\neq s$ we have $(f_l^{n_l})\cap(R\setminus\mathfrak{p}_s)\neq\emptyset$, as otherwise we would have $(f_l)^{n_l}\subseteq \mathfrak{p}_s$ and then also $(f_l)\subseteq\mathfrak{p}_s$ because the latter is prime. But this would force $l=s$ since both ideals are maximal. Now the topology on $\operatorname{Spec} R/fR$ is the discrete topology, because it's finite and the closed sets are precisely the finite subsets. Given an open - so arbitrary - $U=\{\overline{\mathfrak{p}_{m_1}},\ldots,\overline{\mathfrak{p}_{m_r}}\}\subseteq X,$ we consider $g=\prod _{i\neq m_j}f_i\in R$ and then have $D(\overline{g})=U$. This gives $$\mathcal{O}_X(U)=(R/fR)_{\overline{g}}\cong (R/f_1^{n_1})_{\overline{g}}\times\ldots\times (R/f_k^{n_k})_{\overline{g}}=\prod_j (R/f_{m_j}^{n_{m_j}})_{\overline{g}}.$$
My questions:

*

*Is this correct?

*Am I done with this exercise? I have kind of a bad feeling regarding if I'm done with such vaguely formulated exercises. I don't know if I could simplify a bit more, for example. Maybe a bit of life advice concerning this would also be appreciated. I'm grateful for any sort of help.

 A: The scheme $X$ is the coproduct (=disjoint union) of the schemes $X_i=\operatorname{Spec}(R/\langle f_i^{n_i} \rangle)$, namely $ X=\coprod X_i$.
Each underlying topological space $\vert X_i\vert=\{p_i\}$ is a singleton set and $\vert X\vert=\coprod\vert X_i\vert=\{p_1,\cdots,p_k\}$ has the discrete topology.
The local rings of these schemes are $\mathcal O_{X,p_i}=\mathcal O_{X_i,p_i}=R/\langle f_i^{n_i} \rangle$.
Finally, for every subset $S\subset \{1,\cdots ,k\}$ and corresponding open subset $U=\{p_i\vert i\in S\}\subset X$ we have $$\mathcal O_X(U)=\prod_{i\in S}O_{X_i,p_i}=\prod_{i\in S}R/\langle f_i^{n_i} \rangle$$
Note carefully:
a) In general an affine scheme with finitely many points need not have discrete topology.
The simplest counterexample is $S=\operatorname {Spec A}=\{\mathfrak m, (0)\}$, the affine scheme associated to a discrete valuation ring $A$ with maximal ideal $\mathfrak m$.
The open subsets of  the topological space $\vert S\vert$ are  $\{(0)\}$,$S$ and $\emptyset$.
Thus $\vert S\vert$  is a non discrete space even though it has only two points: the closed point $\mathfrak m$ and the open but not closed point $(0)$.
b) However our $X$ is discrete because $X$ has dimension zero since  $R/\langle f\rangle$ is an Artin ring.
A: The "chinese remainder theorem" says the following: If $I_1,..,I_l$ are coprime ideals in a commutative ring $A$ ($I_i +I_j=(1)$ for $i \neq j$) let $I:=I_1\cdots I_l$.
It follows there is an isomorphism of rings
$$A/I \cong A/I_1\times \cdots \times A/I_l:=A_1\times \cdots \times A_l$$
If your ideals $\mathfrak{p}_i$ are coprime you get such a decomposition. This gives a "decomposition"
$$Spec(A/I) \cong Spec(A_1)\cup \cdots \cup Spec(A_l)$$.
of $Spec(A/I)$ into a disjoint union of the schemes $Spec(A_i)$.
If your ring $R$ is  PID and your ideals $(f_i)\subseteq R$ are maximal, it follows your ideals are coprime, meaning  $(f_i)+(f_j)=(1)$ for $i \neq j$. Hence you get if $f:=f_1\cdots f_k$ an isomorphism of commutative rings
$$\phi: R/(f) \cong R/(f_1)\times \cdots \times R/(f_k) .$$
The map $\phi$ induce an isomorphism of schemes $Spec(R/(f)) \cong \cup_i Spec(R/(f_i)$
where the union is disjoint. The subscheme $X_i:=Spec(R/(f_i))$ is open and closed in $X:=Spec(R/(f))$. Since $(f_i)$ is a maximal ideal it follows $X_i$ is a reduced and irreducible scheme of dimension zero: $X_i\cong \{(0)\}$ where $(0)\subseteq R/(f_i)$ is the zero ideal. $X$ is a reduced scheme since it is a disjoint union of reduced schemes.
More generally: If $(f_i)+(f_j)=(1)$ for $i \neq j$ it follows $(f_i^{n_i})+(f_j^{n_j})=(1)$ and hence the ideals $(f_i^{n_i})$ are coprime for any $n_i\geq 1$. You get similarly using the crt an isomorphism of rings
$$R^*:=R/(f_1^{n_1}\cdots f_k^{n_k})\cong R/(f_1^{n_1})\times \cdots \times R/(f_k^{n_k}):=R_1\times \cdots \times R_k.$$
The ring $R_i$ is reduced iff $n_i=1$. Let  $X:=
Spec(R^*)$ and $X_i:=Spec(R_i)$. It follows $X\cong \cup X_i$ is a disjoint union and $X_i \subseteq X$ is open and closed. $X$ is reduced iff $n_i=1$ for all $i$.
Note that if $I,J \subseteq R$ are coprime ideals with $a\in I, b\in J$ with $a+b=1$ we get the following:
$$1=1^{k+l+1}=(a+b)^{k+l+1} =\sum_{u+v=k+l+1} \alpha_{u,v}a^ub^v$$
and for all $u,v$ it follows $\alpha_{u,v}a^ub^v \in I^k+J^l$ hence $1\in I^k+J^l$ and it follows $I^k$ and $J^l$ are coprime for any integers $k,l \geq 1$. Hence in your case if the ideals $(f_1),..,(f_k)$ are coprime it follows for any integers $n_i \geq 1$ the ideals $(f_i^{n_i})$ are coprime.
Your ring $R$ is zero dimensional and you will find a similar discussion here:
Is the ring of the polynomials on a finite algebraic set always a product of local rings?
