Lemma 36.31.2. Let $X$ be a scheme. Let $E \in D(\mathcal{O}_ X)$ be perfect. The function

$\chi _ E : X \longrightarrow \mathbf{Z},\quad x \longmapsto \sum (-1)^ i \dim _{\kappa (x)} H^ i(E \otimes _{\mathcal{O}_ X}^\mathbf {L} \kappa (x))$

is locally constant on $X$.

Proof. By Cohomology, Lemma 20.46.3 we see that we can, locally on $X$, represent $E$ by a finite complex $\mathcal{E}^\bullet$ of finite free $\mathcal{O}_ X$-modules. On such an open the function $\chi _ E$ is constant with value $\sum (-1)^ i \text{rank}(\mathcal{E}^ i)$. $\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).