Let $R$ be a ring and let $P_1,\ldots,P_m$ denote all of its minimal prime ideals. Consider the following sequence $$0 \to R/\left(P_1 \cap \ldots \cap P_m\right) \stackrel{\iota}{\to} \prod_{i=1}^m R/P_i \stackrel{\phi}{\to} \prod_{1 \le i < j \le m} R/(P_i+P_j) \to 0$$ where $\iota(f) = (f+P_i)_i$ and $\phi((f_i+P_i)_i) = (f_i-f_j + (P_i+P_j))_{i,j}$.
Why is this sequence exact?
That $\iota$ is injective is easy. But how do we show that $\operatorname{Im}(\iota) = \operatorname{Ker}(\phi)$? The inclusion "$\subseteq$" is trivial, but I don't know how to prove "$\supseteq$".
Edit: Since being exact is a local property, and the statement is pretty clear for the case $m=2$, it is only left to show the statement for minimal primes all contained in a given maximal ideal.
The motivation behind this is that I would like to "glue" regular functions given on the irreducible components of a curve to a global regular function. But this should only be possible if they agree pairwise at all intersection points of the components. And this should be characterized by the last non-trivial term in the sequence.
Edit: The edit above translates as follows: We only need to show the statement for points where more than two components intersect.
It’s false. Take $R=\mathbb C[x,y]/\left((x)\cap (y)\cap (x-y)\right)$. $R$ possesses three minimal primes, namely $(x)$, $(y)$, and $(x-y)$—label these as $P_1$ through $P_3$ respectively. Then $\text{Im}(\iota)\not\ni (0,0,x)\in \text{Ker}(\phi)$. In effect, for the three functions to ‘glue’, they need agree not only in value at the ‘origin’ of the scheme $\text{Spec}(\mathbb C[x,y])$ but must additionally be consistent at the level of first (directional) derivatives.