Exact sequence of sheaves on nilpotent thickening I am rather confused by this argument in a lecture in MSRI's deformation theory case. It is Problem 1 and Remark 2.1  in page 17 notes of the notes. It is rather long

Here $R[I]$ is a square zero extension of $R$ by an $R$-module $I$.


Question

*

*How does one obtain the exact sequence of sheaves?  (-line 3)

*Where is flatness used? (-line 1)

 A: I can see why you're confused: there's a small mistake here! It looks like these notes were written by Anton Geraschenko, given the notation and the webpage. It isn't mentioned in these notes, but in these you can see that something marked with $\star\star\star$ is something that the author didn't understand (explained on page 4).
The exact sequence of sheaves comes from the closed immersion $i : X\to X_C$ (which is a closed immersion as it is the base change of the closed immersion $\operatorname{Spec}R\to\operatorname{Spec}R[I]$). So, $i$ gives a surjection
$$
i^\sharp : \mathcal{O}_{X_C}\to i_\ast\mathcal{O}_X
$$
of sheaves. However, since $i$ is a homeomorphism we may identify the underlying topological spaces of $X_C$ and $X,$ and under this identification $i_\ast\mathcal{O}_X$ is simply $\mathcal{O}_X.$ Thus, we have a short exact sequence of sheaves
$$
0\to\mathcal{I}\to\mathcal{O}_{X_C}\to \mathcal{O}_X\to 0,
$$
and we simply need to identify the kernel $\mathcal{I}.$
Suppose for simplicity that $X_C = \operatorname{Spec}C'$ is affine. Then the exact sequence above is obtained from the exact sequence
$$
0\to I\to R[I]\to R\to 0
$$
by base changing to $C':$
$$
0\to I\otimes_{R[I]}C'\to R[I]\otimes_{R[I]}C'\to R\otimes_{R[I]} C'\to 0.
$$
This is still exact because $R[I]\to C'$ is flat -- this is where flatness is used! (The global analogue of this exact sequence is
$$
0\to I\otimes_C\mathcal{O}_{X_C}\to \mathcal{O}_{X_C}\to\mathcal{O}_X\to 0.)
$$
The question remains, why can we identify $I\otimes_C\mathcal{O}_{X_C}$ with $I\otimes_R\mathcal{O}_X$? In our affine case, the former corresponds to $I\otimes_{R[I]} C'$ and the latter corresponds to $I\otimes_R (R[I]\otimes_{R[I]}C') = I\otimes_R C'.$ There is a canonical map
$$
I\otimes_{R[I]} C'\to I\otimes_R C'
$$
and as you already know, this map is an isomorphism when $R[I]\to R$ is an epimorphism. The map $R[I]\to R$ is a surjection, so it is certainly an epimorphism!
