Lemma 36.32.5. Let $f : X \to S$ be a morphism of schemes. Assume

1. $f$ is proper, flat, and of finite presentation, and

2. for all $s \in S$ we have $\kappa (s) = H^0(X_ s, \mathcal{O}_{X_ s})$.

Then we have

1. $f_*\mathcal{O}_ X = \mathcal{O}_ S$ and this holds after any base change,

2. locally on $S$ we have

$Rf_*\mathcal{O}_ X = \mathcal{O}_ S \oplus P$

in $D(\mathcal{O}_ S)$ where $P$ is perfect of tor amplitude in $[1, \infty )$.

Proof. By cohomology and base change (Lemma 36.30.4) the complex $E = Rf_*\mathcal{O}_ X$ is perfect and its formation commutes with arbitrary base change. This first implies that $E$ has tor aplitude in $[0, \infty )$. Second, it implies that for $s \in S$ we have $H^0(E \otimes ^\mathbf {L} \kappa (s)) = H^0(X_ s, \mathcal{O}_{X_ s}) = \kappa (s)$. It follows that the map $\mathcal{O}_ S \to Rf_*\mathcal{O}_ X = E$ induces an isomorphism $\mathcal{O}_ S \otimes \kappa (s) \to H^0(E \otimes ^\mathbf {L} \kappa (s))$. Hence $H^0(E) \otimes \kappa (s) \to H^0(E \otimes ^\mathbf {L} \kappa (s))$ is surjective and we may apply More on Algebra, Lemma 15.76.2 to see that, after replacing $S$ by an affine open neighbourhood of $s$, we have a decomposition $E = H^0(E) \oplus \tau _{\geq 1}E$ with $\tau _{\geq 1}E$ perfect of tor amplitude in $[1, \infty )$. Since $E$ has tor amplitude in $[0, \infty )$ we find that $H^0(E)$ is a flat $\mathcal{O}_ S$-module. It follows that $H^0(E)$ is a flat, perfect $\mathcal{O}_ S$-module, hence finite locally free, see More on Algebra, Lemma 15.74.2 (and the fact that finite projective modules are finite locally free by Algebra, Lemma 10.78.2). It follows that the map $\mathcal{O}_ S \to H^0(E)$ is an isomorphism as we can check this after tensoring with residue fields (Algebra, Lemma 10.79.4). $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).