hcju/stacksqa huggingface dataset:
Let $j : X \to \overline{X}$ be as in Lemma \ref{lemma-dim-1-projective-completion}. Consider the normalization $X'$ of $\overline{X}$ in $X$. By Lemma \ref{lemma-relative-normalization-finite} the morphism $X' \to \overline{X}$ is finite. By Morphisms, Lemma \ref{morphisms-lemma-finite-projective} $X' \to \overline{X}$ is projective. By Morphisms, Lemma \ref{morphisms-lemma-projective-over-quasi-projective-is-H-projective} we see that $X' \to \overline{X}$ is H-projective. By Morphisms, Lemma \ref{morphisms-lemma-H-projective-composition} we see that $X' \to \Spec(k)$ is H-projective. Let $\{x'_1, \ldots, x'_m\} \subset X'$ be the inverse image of $\{x_1, \ldots, x_n\} = \overline{X} \setminus X$. Then $\dim(\mathcal{O}_{X', x'_i}) = 1$ for all $1 \leq i \leq m$. Hence the local rings $\mathcal{O}_{X', x'}$ are discrete valuation rings by Morphisms, Lemma \ref{morphisms-lemma-relative-normalization-normal-codim-1}. Then $X \to X'$ and $\{x'_1, \ldots, x'_m\}$ is as desired.
Choose $X \to \overline{X}$ as in Lemma \ref{lemma-dim-1-projective-completion}. By Lemma \ref{lemma-find-globally-generated} we can find a globally generated invertible sheaf $\mathcal{L}$ on $\overline{X}$ and a section $s \in \Gamma(\overline{X}, \mathcal{L})$ such that $X = \overline{X}_s$. Choose a basis $s = s_0, s_1, \ldots, s_m$ of the finite dimensional $k$-vector space $\Gamma(\overline{X}, \mathcal{L})$ (Cohomology of Schemes, Lemma \ref{coherent-lemma-proper-over-affine-cohomology-finite}). We obtain a corresponding morphism $$ f : \overline{X} \longrightarrow \mathbf{P}^m_k $$ such that the inverse image of $D_{+}(T_0)$ is $X$, see Constructions, Lemma \ref{constructions-lemma-projective-space}. In particular, $f$ is non-constant, i.e., $\Im(f)$ has more than one point. A topological argument shows that $f$ maps the generic point $\eta$ of $\overline{X}$ to a nonclosed point of $\mathbf{P}^n_k$. Hence if $y \in \mathbf{P}^n_k$ is a closed point, then $f^{-1}(\{y\})$ is a closed set of $\overline{X}$ not containing $\eta$, hence finite. By Cohomology of Schemes, Lemma \ref{coherent-lemma-proper-finite-fibre-finite-in-neighbourhood}\footnote{One can avoid using this lemma which relies on the theorem of formal functions. Namely, $\overline{X}$ is projective hence it suffices to show a proper morphism $f : X \to Y$ with finite fibres between quasi-projective schemes over $k$ is finite. To do this, one chooses an affine open of $X$ containing the fibre of $f$ over a point $y$ using that any finite set of points of a quasi-projective scheme over $k$ is contained in an affine. Shrinking $Y$ to a small affine neighbourhood of $y$ one reduces to the case of a proper morphism between affines. Such a morphism is finite by Morphisms, Lemma \ref{morphisms-lemma-integral-universally-closed}.} we conclude that $f$ is finite. Hence $X = f^{-1}(D_{+}(T_0))$ is affine.
Let $X = \bigcup X_i$ be the decomposition of $X$ into irreducible components. We think of $X_i$ as an integral scheme (using the reduced induced scheme structure, see Schemes, Definition \ref{schemes-definition-reduced-induced-scheme}). In particular $X_i$ is a singleton (hence affine) or a curve hence affine by Lemma \ref{lemma-curve-affine-projective}. Then $\coprod X_i \to X$ is finite surjective and $\coprod X_i$ is affine. Thus we see that $X$ is affine by Cohomology of Schemes, Lemma \ref{coherent-lemma-image-affine-finite-morphism-affine-Noetherian}.
More precisely, set $X_{k'} = X \times_{\Spec(k)} \Spec(k')$. Let $\mathcal{E}_{k'} = p^*\mathcal{E}$ where $p : X_{k'} \to X$ is the projection. By Cohomology of Schemes, Lemma \ref{coherent-lemma-flat-base-change-cohomology} we have $H^i(X_{k'}, \mathcal{E}_{k'}) = H^i(X, \mathcal{E}) \otimes_k k'$ and $H^i(X_{k'}, \mathcal{O}_{X_{k'}}) = H^i(X, \mathcal{O}_X) \otimes_k k'$. Hence we see that the Euler characteristics are unchanged, hence the degree is unchanged.
The morphism $f$ is proper (Morphisms, Lemma \ref{morphisms-lemma-image-proper-scheme-closed}) and has fibres of dimension $\leq 0$. Hence $f$ is finite (Cohomology of Schemes, Lemma \ref{coherent-lemma-proper-finite-fibre-finite-in-neighbourhood}). Thus $$ Rf_*f^*\mathcal{E} = f_*f^*\mathcal{E} = \mathcal{E} \otimes_{\mathcal{O}_X} f_*\mathcal{O}_{X'} $$ Since $f$ induces an isomorphism on local rings at generic points of all irreducible components of dimension $1$ we see that the kernel and cokernel $$ 0 \to \mathcal{K} \to \mathcal{O}_X \to f_*\mathcal{O}_{X'} \to \mathcal{Q} \to 0 $$ have supports of dimension $\leq 0$. Note that tensoring this with $\mathcal{E}$ is still an exact sequence as $\mathcal{E}$ is locally free. We obtain \begin{align*} \chi(X, \mathcal{E}) - \chi(X', f^*\mathcal{E}) & = \chi(X, \mathcal{E}) - \chi(X, f_*f^*\mathcal{E}) \\ & = \chi(X, \mathcal{E}) - \chi(X, \mathcal{E} \otimes f_*\mathcal{O}_{X'}) \\ & = \chi(X, \mathcal{K} \otimes \mathcal{E}) - \chi(X, \mathcal{Q} \otimes \mathcal{E}) \\ & = n\chi(X, \mathcal{K}) - n\chi(X, \mathcal{Q}) \\ & = n\chi(X, \mathcal{O}_X) - n\chi(X, f_*\mathcal{O}_{X'}) \\ & = n\chi(X, \mathcal{O}_X) - n\chi(X', \mathcal{O}_{X'}) \end{align*} which proves what we want. The first equality as $f$ is finite, see Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}. The second equality by projection formula, see Cohomology, Lemma \ref{cohomology-lemma-projection-formula}. The third by additivity of Euler characteristics, see Lemma \ref{lemma-euler-characteristic-additive}. The fourth by Lemma \ref{lemma-chi-tensor-finite}.
Let $\mathcal{P}$ be the property of coherent sheaves $\mathcal{F}$ on $X$ expressing that the formula of the lemma holds. We claim that the assumptions (1) and (2) of Cohomology of Schemes, Lemma \ref{coherent-lemma-property} hold for $\mathcal{P}$. Namely, (1) holds because the Euler characteristic and the rank $r$ are additive in short exact sequences of coherent sheaves. And (2) holds too: If $Z = X$ then we may take $\mathcal{G} = \mathcal{O}_X$ and $\mathcal{P}(\mathcal{O}_X)$ is true by the definition of degree. If $i : Z \to X$ is the inclusion of a closed point we may take $\mathcal{G} = i_*\mathcal{O}_Z$ and $\mathcal{P}$ holds by Lemma \ref{lemma-chi-tensor-finite} and the fact that $r = 0$ in this case.
Observe that the statement makes sense because $C_i \to \Spec(k)$ is proper of dimension $1$ (Morphisms, Lemmas \ref{morphisms-lemma-closed-immersion-proper} and \ref{morphisms-lemma-composition-proper}). Consider the open subscheme $U_i = X \setminus (\bigcup_{j \not = i} C_j)$ and let $X_i \subset X$ be the scheme theoretic closure of $U_i$. Note that $X_i \cap U_i = U_i$ (scheme theoretically) and that $X_i \cap U_j = \emptyset$ (set theoretically) for $i \not = j$; this follows from the description of scheme theoretic closure in Morphisms, Lemma \ref{morphisms-lemma-quasi-compact-immersion}. Thus we may apply Lemma \ref{lemma-degree-birational-pullback} to the morphism $X' = \bigcup X_i \to X$. Since it is clear that $C_i \subset X_i$ (scheme theoretically) and that the multiplicity of $C_i$ in $X_i$ is equal to the multiplicity of $C_i$ in $X$, we see that we reduce to the case discussed in the following paragraph. \medskip\noindent Assume $X$ is irreducible with generic point $\xi$. Let $C = X_{red}$ have multiplicity $m$. We have to show that $\deg(\mathcal{E}) = m \deg(\mathcal{E}|_C)$. Let $\mathcal{I} \subset \mathcal{O}_X$ be the ideal defining the closed subscheme $C$. Let $e \geq 0$ be minimal such that $\mathcal{I}^{e + 1} = 0$ (Cohomology of Schemes, Lemma \ref{coherent-lemma-power-ideal-kills-sheaf}). We argue by induction on $e$. If $e = 0$, then $X = C$ and the result is immediate. Otherwise we set $\mathcal{F} = \mathcal{I}^e$ viewed as a coherent $\mathcal{O}_C$-module (Cohomology of Schemes, Lemma \ref{coherent-lemma-i-star-equivalence}). Let $X' \subset X$ be the closed subscheme cut out by the coherent ideal $\mathcal{I}^e$ and let $m'$ be the multiplicity of $C$ in $X'$. Taking stalks at $\xi$ of the short exact sequence $$ 0 \to \mathcal{F} \to \mathcal{O}_X \to \mathcal{O}_{X'} \to 0 $$ we find (use Algebra, Lemmas \ref{algebra-lemma-length-additive}, \ref{algebra-lemma-dimension-is-length}, and \ref{algebra-lemma-length-independent}) that $$ m = \text{length}_{\mathcal{O}_{X, \xi}} \mathcal{O}_{X, \xi} = \dim_{\kappa(\xi)} \mathcal{F}_\xi + \text{length}_{\mathcal{O}_{X', \xi}} \mathcal{O}_{X', \xi} = r + m' $$ where $r$ is the rank of $\mathcal{F}$ as a coherent sheaf on $C$. Tensoring with $\mathcal{E}$ we obtain a short exact sequence $$ 0 \to \mathcal{E}|_C \otimes \mathcal{F} \to \mathcal{E} \to \mathcal{E} \otimes \mathcal{O}_{X'} \to 0 $$ By induction we have $\chi(\mathcal{E} \otimes \mathcal{O}_{X'}) = m' \deg(\mathcal{E}|_C)$. By Lemma \ref{lemma-degree-on-proper-curve} we have $\chi(\mathcal{E}|_C \otimes \mathcal{F}) = r \deg(\mathcal{E}|_C) + n \chi(\mathcal{F})$. Putting everything together we obtain the result.
By Lemma \ref{lemma-degree-in-terms-of-components} and elementary arithmetic, we reduce to the case of a proper curve. Then there exists a modification $f : X' \to X$ such that $f^*\mathcal{E}$ has a filtration whose successive quotients are invertible modules, see Divisors, Lemma \ref{divisors-lemma-filter-after-modification}. By Lemma \ref{lemma-degree-birational-pullback} we may work on $X'$. Thus we may assume we have a filtration $$ 0 = \mathcal{E}_0 \subset \mathcal{E}_1 \subset \mathcal{E}_2 \subset \ldots \subset \mathcal{E}_n = \mathcal{E} $$ by locally free $\mathcal{O}_X$-modules with $\mathcal{L}_i = \mathcal{E}_i/\mathcal{E}_{i - 1}$ is invertible. By Modules, Lemma \ref{modules-lemma-det-ses} and induction we find $\det(\mathcal{E}) = \mathcal{L}_1 \otimes \ldots \otimes \mathcal{L}_n$. Thus the equality follows from Lemma \ref{lemma-degree-tensor-product} and additivity (Lemma \ref{lemma-degree-additive}).
Since $D$ is nowhere dense in $X$ (Divisors, Lemma \ref{divisors-lemma-complement-effective-Cartier-divisor}) we see that $\dim(D) \leq 0$. Hence $D$ is finite over $k$ by Lemma \ref{lemma-algebraic-scheme-dim-0}. Since $k$ is a field, the morphism $D \to \Spec(k)$ is finite locally free and hence has a degree (Morphisms, Definition \ref{morphisms-definition-finite-locally-free}), which is clearly equal to $\dim_k \Gamma(D, \mathcal{O}_D)$ as stated in the lemma. By Divisors, Definition \ref{divisors-definition-invertible-sheaf-effective-Cartier-divisor} there is a short exact sequence $$ 0 \to \mathcal{O}_X \to \mathcal{O}_X(D) \to i_*i^*\mathcal{O}_X(D) \to 0 $$ where $i : D \to X$ is the closed immersion. Tensoring with $\mathcal{E}$ we obtain a short exact sequence $$ 0 \to \mathcal{E} \to \mathcal{E}(D) \to i_*i^*\mathcal{E}(D) \to 0 $$ The equation of the lemma follows from additivity of the Euler characteristic (Lemma \ref{lemma-euler-characteristic-additive}) and Lemma \ref{lemma-chi-tensor-finite}.
The degree of $X$ over $Y$ is defined in Morphisms, Definition \ref{morphisms-definition-degree}. Thus $f_*\mathcal{O}_X$ is a coherent $\mathcal{O}_Y$-module of rank $\deg(X/Y)$, i.e., $\deg(X/Y) = \dim_{\kappa(\xi)} (f_*\mathcal{O}_X)_\xi$ where $\xi$ is the generic point of $Y$. Thus we obtain \begin{align*} \chi(X, f^*\mathcal{E}) & = \chi(Y, f_*f^*\mathcal{E}) \\ & = \chi(Y, \mathcal{E} \otimes f_*\mathcal{O}_X) \\ & = \deg(X/Y) \deg(\mathcal{E}) + n \chi(Y, f_*\mathcal{O}_X) \\ & = \deg(X/Y) \deg(\mathcal{E}) + n \chi(X, \mathcal{O}_X) \end{align*} as desired. The first equality as $f$ is finite, see Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}. The second equality by projection formula, see Cohomology, Lemma \ref{cohomology-lemma-projection-formula}. The third equality by Lemma \ref{lemma-degree-on-proper-curve}.
Let $s$ be a nonzero section of $\mathcal{L}$. Since $X$ is a curve, we see that $s$ is a regular section. Hence there is an effective Cartier divisor $D \subset X$ and an isomorphism $\mathcal{L} \to \mathcal{O}_X(D)$ mapping $s$ the canonical section $1$ of $\mathcal{O}_X(D)$, see Divisors, Lemma \ref{divisors-lemma-characterize-OD}. Then $\deg(\mathcal{L}) = \deg(D)$ by Lemma \ref{lemma-degree-effective-Cartier-divisor}. As $\deg(D) \geq 0$ and $= 0$ if and only if $D = \emptyset$, this proves (1) and (2). In case (3) we see that $\deg(\mathcal{L}) = 0$ and $D = \emptyset$. Similarly for (4). To see (5) apply (1) and (4) to the invertible sheaf $$ \mathcal{L} \otimes_{\mathcal{O}_X} \mathcal{N}^{\otimes -1} = \SheafHom_{\mathcal{O}_X}(\mathcal{N}, \mathcal{L}) $$ which has degree $\deg(\mathcal{L}) - \deg(\mathcal{N})$ by Lemma \ref{lemma-degree-tensor-product}.
Let $s \in H^0(X, \mathcal{L})$ be nonzero. Since $X$ is reduced there exists an irreducible component $C$ of $X$ with $s|_C \not = 0$. But if $s|_C$ is nonzero, then $s$ is nonwhere vanishing on $C$ by Lemma \ref{lemma-check-invertible-sheaf-trivial}. This in turn implies $s$ is nowhere vanishing on every irreducible component of $X$ meeting $C$. Since $X$ is connected, we conclude that $s$ vanishes nowhere and the lemma follows.
If $\mathcal{L}$ is ample, then there exists an $n > 0$ and a section $s \in H^0(X, \mathcal{L}^{\otimes n})$ with $X_s$ affine. Since $X$ isn't affine (otherwise by Morphisms, Lemma \ref{morphisms-lemma-finite-proper} $X$ would be finite), we see that $s$ vanishes at some point. Hence $\deg(\mathcal{L}^{\otimes n}) > 0$ by Lemma \ref{lemma-check-invertible-sheaf-trivial}. By Lemma \ref{lemma-degree-tensor-product} we conclude that $\deg(\mathcal{L}) = 1/n\deg(\mathcal{L}^{\otimes n}) > 0$. \medskip\noindent Assume $\deg(\mathcal{L}) > 0$. Then $$ \dim_k H^0(X, \mathcal{L}^{\otimes n}) \geq \chi(X, \mathcal{L}^n) = n\deg(\mathcal{L}) + \chi(X, \mathcal{O}_X) $$ grows linearly with $n$. Hence for any finite collection of closed points $x_1, \ldots, x_t$ of $X$, we can find an $n$ such that $\dim_k H^0(X, \mathcal{L}^{\otimes n}) > \sum \dim_k \kappa(x_i)$. (Recall that by Hilbert Nullstellensatz, the extension fields $k \subset \kappa(x_i)$ are finite, see for example Morphisms, Lemma \ref{morphisms-lemma-closed-point-fibre-locally-finite-type}). Hence we can find a nonzero $s \in H^0(X, \mathcal{L}^{\otimes n})$ vanishing in $x_1, \ldots, x_t$. In particular, if we choose $x_1, \ldots, x_t$ such that $X \setminus \{x_1, \ldots, x_t\}$ is affine, then $X_s$ is affine too (for example by Properties, Lemma \ref{properties-lemma-affine-cap-s-open} although if we choose our finite set such that $\mathcal{L}|_{X \setminus \{x_1, \ldots, x_t\}}$ is trivial, then it is immediate). The conclusion is that we can find an $n > 0$ and a nonzero section $s \in H^0(X, \mathcal{L}^{\otimes n})$ such that $X_s$ is affine. \medskip\noindent We will show that for every quasi-coherent sheaf of ideals $\mathcal{I}$ there exists an $m > 0$ such that $H^1(X, \mathcal{I} \otimes \mathcal{L}^{\otimes m})$ is zero. This will finish the proof by Cohomology of Schemes, Lemma \ref{coherent-lemma-vanshing-gives-ample}. To see this we consider the maps $$ \mathcal{I} \xrightarrow{s} \mathcal{I} \otimes \mathcal{L}^{\otimes n} \xrightarrow{s} \mathcal{I} \otimes \mathcal{L}^{\otimes 2n} \xrightarrow{s} \ldots $$ Since $\mathcal{I}$ is torsion free, these maps are injective and isomorphisms over $X_s$, hence the cokernels have vanishing $H^1$ (by Cohomology of Schemes, Lemma \ref{coherent-lemma-coherent-support-dimension-0} for example). We conclude that the maps of vector spaces $$ H^1(X, \mathcal{I}) \to H^1(X, \mathcal{I} \otimes \mathcal{L}^{\otimes n}) \to H^1(X, \mathcal{I} \otimes \mathcal{L}^{\otimes 2n}) \to \ldots $$ are surjective. On the other hand, the dimension of $H^1(X, \mathcal{I})$ is finite, and every element maps to zero eventually by Cohomology of Schemes, Lemma \ref{coherent-lemma-section-affine-open-kills-classes}. Thus for some $e > 0$ we see that $H^1(X, \mathcal{I} \otimes \mathcal{L}^{\otimes en})$ is zero. This finishes the proof.
Let $x_1, \ldots, x_r \in X$ be the isolated closed points. Think of $x_i = \Spec(\kappa(x_i))$ as a scheme. Consider the morphism of schemes $$ f : C_1 \amalg \ldots \amalg C_t \amalg x_1 \amalg \ldots \amalg x_r \longrightarrow X $$ This is a finite surjective morphism of schemes proper over $k$ (details omitted). Thus $\mathcal{L}$ is ample if and only if $f^*\mathcal{L}$ is ample (Cohomology of Schemes, Lemma \ref{coherent-lemma-surjective-finite-morphism-ample}). Thus we conclude by Lemma \ref{lemma-ample-curve}.
Since $X$ is a curve, the local ring $\mathcal{O}_{X, x}$ is a Noetherian local domain of dimension $1$ (Lemma \ref{lemma-dimension-locally-algebraic}). Parts (4) and (5) are equivalent by definition and are equivalent to $\mathcal{I}_x = \mathfrak m_x \subset \mathcal{O}_{X, x}$ having one generator (Divisors, Lemma \ref{divisors-lemma-effective-Cartier-in-points}). The equivalence of (1), (2), (3), (4), and (5) therefore follows from Algebra, Lemma \ref{algebra-lemma-characterize-dvr}. The final statement follows from Lemma \ref{lemma-dense-smooth-open-variety-over-perfect-field}.
Choose a closed immersion $i : X \to \mathbf{P}^n_k$ (Lemma \ref{lemma-dim-1-proper-projective}). Setting $\mathcal{L} = i^*\mathcal{O}_{\mathbf{P}^n}(d)$ for $d \gg 0$ we see that there exists an invertible sheaf $\mathcal{L}$ with $H^0(X, \mathcal{L}) \not = 0$ and $H^1(X, \mathcal{L}) = 0$ (see Cohomology of Schemes, Lemma \ref{coherent-lemma-vanshing-gives-ample} for vanishing and the references therein for nonvanishing). We will finish the proof of (1) by descending induction on $t = \dim_k H^0(X, \mathcal{L})$. The base case $t = 1$ is trivial. Assume $t > 1$. \medskip\noindent Let $U \subset X$ be the nonempty open subset of nonsingular points studied in Lemma \ref{lemma-dense-smooth-open-variety-over-perfect-field}. Let $s \in H^0(X, \mathcal{L})$ be nonzero. There exists a closed point $x \in U$ such that $s$ does not vanish in $x$. Let $\mathcal{I}$ be the ideal sheaf of $i : x \to X$ as in Lemma \ref{lemma-regular-point-on-curve}. Look at the short exact sequence $$ 0 \to \mathcal{I} \otimes_{\mathcal{O}_X} \mathcal{L} \to \mathcal{L} \to i_*i^*\mathcal{L} \to 0 $$ Observe that $H^0(X, i_*i^*\mathcal{L}) = H^0(x, i^*\mathcal{L})$ has dimension $1$ as $x$ is a $k$-rational point ($k$ is algebraically closed). Since $s$ does not vanish at $x$ we conclude that $$ H^0(X, \mathcal{L}) \longrightarrow H^0(X, i_*i^*\mathcal{L}) $$ is surjective. Hence $\dim_k H^0(X, \mathcal{I} \otimes_{\mathcal{O}_X} \mathcal{L}) = t - 1$. Finally, the long exact sequence of cohomology also shows that $H^1(X, \mathcal{I} \otimes_{\mathcal{O}_X} \mathcal{L}) = 0$ thereby finishing the proof of the induction step. \medskip\noindent To get an invertible sheaf as in (2) take an invertible sheaf $\mathcal{L}$ as in (1) and do the argument in the previous paragraph one more time.
Let $\mathcal{N}$ be the invertible module we found in Lemma \ref{lemma-general-degree-g-line-bundle} part (2). The degree of $\mathcal{N}$ is $\chi(X, \mathcal{N}) - \chi(X, \mathcal{O}_X) = 0 - (1 - g) = g - 1$. Hence the degree of $\mathcal{L} \otimes \mathcal{N}^{\otimes - 1}$ is $\deg(\mathcal{L}) - (g - 1) \geq g$. Hence $\chi(X, \mathcal{L} \otimes \mathcal{N}^{\otimes -1}) \geq g + 1 - g = 1$. Thus there is a nonzero global section $s$ whose zero scheme is an effective Cartier divisor $D$ of degree $\deg(\mathcal{L}) - (g - 1)$. This gives a short exact sequence $$ 0 \to \mathcal{N} \xrightarrow{s} \mathcal{L} \to i_*(\mathcal{L}|_D) \to 0 $$ where $i : D \to X$ is the inclusion morphism. We conclude that $H^0(X, \mathcal{L})$ maps isomorphically to $H^0(D, \mathcal{L}|_D)$ which has dimension $\deg(\mathcal{L}) - (g - 1)$. The result follows from the definition of degree.
We prove this by induction on $\dim(\text{Supp}(\mathcal{F}))$. If this number is zero, then the function is constant with value $\dim_k \Gamma(X, \mathcal{F})$ by Lemma \ref{lemma-chi-tensor-finite}. Assume $\dim(\text{Supp}(\mathcal{F})) > 0$. \medskip\noindent If $\mathcal{F}$ has embedded associated points, then we can consider the short exact sequence $0 \to \mathcal{K} \to \mathcal{F} \to \mathcal{F}' \to 0$ constructed in Divisors, Lemma \ref{divisors-lemma-remove-embedded-points}. Since the dimension of the support of $\mathcal{K}$ is strictly less, the result holds for $\mathcal{K}$ by induction hypothesis and with strictly smaller total degree. By additivity of the Euler characteristic (Lemma \ref{lemma-euler-characteristic-additive}) it suffices to prove the result for $\mathcal{F}'$. Thus we may assume $\mathcal{F}$ does not have embedded associated points. \medskip\noindent If $i : Z \to X$ is a closed immersion and $\mathcal{F} = i_*\mathcal{G}$, then we see that the result for $X$, $\mathcal{F}$, $\mathcal{L}_1, \ldots, \mathcal{L}_r$ is equivalent to the result for $Z$, $\mathcal{G}$, $i^*\mathcal{L}_1, \ldots, i^*\mathcal{L}_r$ (since the cohomologies agree, see Cohomology of Schemes, Lemma \ref{coherent-lemma-relative-affine-cohomology}). Applying Divisors, Lemma \ref{divisors-lemma-no-embedded-points-endos} we may assume that $X$ has no embedded components and $X = \text{Supp}(\mathcal{F})$. \medskip\noindent Pick a regular meromorphic section $s$ of $\mathcal{L}_1$, see Divisors, Lemma \ref{divisors-lemma-regular-meromorphic-section-exists}. Let $\mathcal{I} \subset \mathcal{O}_X$ be the ideal of denominators of $s$ and consider the maps $$ \mathcal{I}\mathcal{F} \to \mathcal{F},\quad \mathcal{I}\mathcal{F} \to \mathcal{F} \otimes \mathcal{L}_1 $$ of Divisors, Lemma \ref{divisors-lemma-make-maps-regular-section}. These are injective and have cokernels $\mathcal{Q}$, $\mathcal{Q}'$ supported on nowhere dense closed subschemes of $X = \text{Supp}(\mathcal{F})$. Tensoring with the invertible module $\mathcal{L}_1^{\otimes n_1} \otimes \ldots \otimes \mathcal{L}_1^{\otimes n_1}$ is exact, hence using additivity again we see that \begin{align*} &\chi(X, \mathcal{F} \otimes \mathcal{L}_1^{\otimes n_1} \otimes \ldots \otimes \mathcal{L}_r^{\otimes n_r}) - \chi(X, \mathcal{F} \otimes \mathcal{L}_1^{\otimes n_1 + 1} \otimes \ldots \otimes \mathcal{L}_r^{\otimes n_r}) \\ & = \chi(\mathcal{Q} \otimes \mathcal{L}_1^{\otimes n_1} \otimes \ldots \otimes \mathcal{L}_r^{\otimes n_r}) - \chi(\mathcal{Q}' \otimes \mathcal{L}_1^{\otimes n_1} \otimes \ldots \otimes \mathcal{L}_r^{\otimes n_r}) \end{align*} Thus we see that the function $P(n_1, \ldots, n_r)$ of the lemma has the property that $$ P(n_1 + 1, n_2, \ldots, n_r) - P(n_1, \ldots, n_r) $$ is a numerical polynomial of total degree $<$ the dimension of the support of $\mathcal{F}$. Of course by symmetry the same thing is true for $$ P(n_1, \ldots, n_{i - 1}, n_i + 1, n_{i + 1}, \ldots, n_r) - P(n_1, \ldots, n_r) $$ for any $i \in \{1, \ldots, r\}$. A simple arithmetic argument shows that $P$ is a numerical polynomial of total degree at most $\dim(\text{Supp}(\mathcal{F}))$.