The Stacks project, tag 0F38, at revision a04446e (28 July 2026). Official page: stacks.math.columbia.edu/tag/0F38
Weightings
The material in this section is taken from [SGA4, Exposee XVII, 6.2.4].
Let \(\pi : U \to V\) be a locally quasi-finite morphism of schemes with finite fibres. Given a function \(w : U \to \mathbf{Z}\) we define a function \[\textstyle{\int}_\pi w : V \longrightarrow \mathbf{Z},\quad v \longmapsto \sum\nolimits_{u \in U,\ \pi(u) = v} w(u) [\kappa(u) : \kappa(v)]_s\] Note that the field extensions are finite (Morphisms, Lemma 29.21.5), \([\kappa' : \kappa]_s\) is the separable degree (Fields, Definition 9.14.7), and the sum is finite as the fibres of \(\pi\) are assumed finite. Another way to compute the value of \(\int_\pi w\) at a point \(v \in V\) is as follows. Choose an algebraically closed field \(k\) and a morphism \(\overline{v} : \Spec(k) \to V\) whose image is \(v\). Then we have \[(\textstyle{\int}_\pi w)(v) = \sum\nolimits_{\overline{u} \in U_{\overline{v}}} w(\overline{u})\] where of course \(w(\overline{u})\) denotes the value of \(w\) at the image \(u\) of the point \(\overline{u}\) under the morphism \(U_{\overline{v}} \to U\). Note that we may view \(\overline{u} \in U_{\overline{v}}\) as morphisms \(\overline{u} : \Spec(k) \to U\) such that \(\pi \circ \overline{u} = \overline{v}\). Namely, since \(U \to V\) is locally quasi-finite with finite fibres, the scheme \(U_{\overline{v}}\) is the spectrum of a finite dimension algebra over \(k\) and all of whose prime ideals are maximal ideals with residue field \(k\). To see that the equality holds, note that the number of morphisms \(\overline{u}\) lying over a given \(u\) is equal to \([\kappa(u) : \kappa(v)]_s\) by Fields, Lemma 9.14.8.
Lemma 37.75.1 (0F39) official page ↗
Given a cartesian square \[\xymatrix{ U \ar[d]_\pi & U' \ar[l]^h \ar[d]^{\pi'} \\ V & V' \ar[l]_g }\] with \(\pi\) locally quasi-finite with finite fibres and a function \(w : U \to \mathbf{Z}\) we have \((\int_\pi w) \circ g = \int_{\pi'} (w \circ h)\).
Proof. This follows immediately from the second description of \(\int_\pi w\) given above. To prove it from the definition, you use that if \(E/F\) is a finite extension of fields and \(F'/F\) is another field extension, then writing \((E \otimes_F F')_{red} = \prod E'_i\) as a product of fields finite over \(F'\), we have \[[E : F]_s = \sum [E'_i : F']_s\] To prove this equality pick an algebraically closed field extension \(\Omega/F'\) and observe that \[\begin{align*} [E : F]_s & = |\Mor_F(E, \Omega)| \\ & = |\Mor_{F'}(E \otimes_F F', \Omega)| \\ & = |\Mor_{F'}((E \otimes_F F')_{red}, \Omega)| \\ & = \sum |\Mor_{F'}(E'_i, \Omega)| \\ & = \sum [E'_i : F']_s \end{align*}\] where we have used Fields, Lemma 9.14.8.
Definition 37.75.2 (0F3A) official page ↗
Let \(f : X \to Y\) be a locally quasi-finite morphism. A weighting or a pondération of \(f\) is a map \(w : X \to \mathbf{Z}\) such that for any diagram \[\xymatrix{ X \ar[d]_f & U \ar[l]^h \ar[d]^\pi \\ Y & V \ar[l]_g }\] where \(V \to Y\) is étale, \(U \subset X_V\) is open, and \(U \to V\) finite, the function \(\int_\pi (w \circ h)\) is locally constant.
Of course taking \(w = 0\) we obtain a weighting of any locally quasi-finite morphism \(f\), albeit not a very interesting one. It will turn out that positive weightings, i.e., \(w : X \to \mathbf{Z}_{> 0}\) are the most interesting ones for various purposes.
Lemma 37.75.3 (0F3B) official page ↗
Let \(f : X \to Y\) be a locally quasi-finite morphism. Let \(w : X \to \mathbf{Z}\) be a weighting. Let \(f' : X' \to Y'\) be the base change of \(f\) by a morphism \(Y' \to Y\). Then the composition \(w' : X' \to \mathbf{Z}\) of \(w\) and the projection \(X' \to X\) is a weighting of \(f'\).
Proof. Consider a diagram \[\xymatrix{ X' \ar[d]_{f'} & U' \ar[l]^{h'} \ar[d]^{\pi'} \\ Y' & V' \ar[l]_{g'} }\] as in Definition 37.75.2 for the morphism \(f'\). For any \(v' \in V'\) we have to show that \(\int_{\pi'} (w' \circ h')\) is constant in an open neighbourhood of \(v'\). By Lemma 37.75.1 (and the fact that étale morphisms are open) we may replace \(V'\) by any étale neighbourhood of \(v'\). After replacing \(V'\) by an étale neighbourhood of \(v'\) we may assume that \(U' = U'_1 \amalg \ldots \amalg U'_n\) where each \(U'_i\) has a unique point \(u'_i\) lying over \(v'\) such that \(\kappa(u'_i)/\kappa(v')\) is purely inseparable, see Lemma 37.41.5. Clearly, it suffices to prove that \(\int_{U'_i \to V'} w'|_{U'_i}\) is constant in a neighbourhood of \(v'\). This reduces us to the case discussed in the next paragraph.
We have \(v' \in V'\) and there is a unique point \(u'\) of \(U'\) lying over \(v'\) with \(\kappa(u')/\kappa(v')\) purely inseparable. Denote \(x \in X\) and \(y \in Y\) the image of \(u'\) and \(v'\). We can find an étale neighbourhood \((V, v) \to (Y, y)\) and an open \(U \subset X_V\) such that \(\pi : U \to V\) is finite and such that there is a unique point \(u \in U\) lying over \(v\) which maps to \(x \in X\) via the projection \(h : U \to X\) such that moreover \(\kappa(u)/\kappa(v)\) is purely inseparable. This is possible by the lemma used above. Consider the morphism \[U'' = U \times_X U' \longrightarrow V \times_Y V' = V''\] Since \(u\) and \(u'\) both map to \(x \in X\) there is a point \(u'' \in U''\) mapping to \((u, u')\). Denote \(v'' \in V''\) the image of \(u''\). After replacing \(V', v'\) by \(V'', v''\) we may assume that the composition \(V' \to Y' \to Y\) factors through a map of étale neighbourhoods \((V', v') \to (V, v)\) such that the induced morphism \(X'_{V'} = X_{V'} \to X_V\) sends \(u'\) to \(u\). Inside the base change \(X'_{V'} = X_{V'}\) we have two open subschemes, namely \(U'\) and the inverse image \(U_{V'}\) of \(U \subset X_V\). By construction both contain a unique point lying over \(v'\), namely \(u'\) for both of them. Thus after shrinking \(V'\) we may assume these open subsets are the same; namely, \(U' \setminus (U' \cap U_{V'})\) and \(U_{V'} \setminus (U' \cap U_{V'})\) have a closed image in \(V'\) and these images do not contain \(v'\). Thus \(U' = U_{V'}\) and we find a cartesian diagram as in Lemma 37.75.1. Since \(\int_\pi (w \circ h)\) is locally constant by assumption we conclude.
Lemma 37.75.4 (0GK8) official page ↗
Let \(f : X \to Y\) be a locally quasi-finite morphism. Let \(w : X \to \mathbf{Z}\) be a weighting of \(f\). If \(X' \subset X\) is open, then \(w|_{X'}\) is a weighting of \(f|_{X'} : X' \to Y\).
Proof. Immediate from the definition.
Lemma 37.75.5 (0GK9) official page ↗
Let \(f : X \to Y\) and \(g : Y \to Z\) be locally quasi-finite morphisms. Let \(w_f : X \to \mathbf{Z}\) be a weighting of \(f\) and let \(w_g : Y \to \mathbf{Z}\) be a weighting of \(g\). Then the function \[X \longrightarrow \mathbf{Z},\quad x \longmapsto w_f(x) w_g(f(x))\] is a weighting of \(g \circ f\).
Proof. Let us set \(w_{g \circ f}(x) = w_f(x) w_g(f(x))\) for \(x \in X\). Consider a diagram \[\xymatrix{ X \ar[d]_{g \circ f} & U \ar[l] \ar[d]^\pi \\ Z & W \ar[l] }\] where \(W \to Z\) is étale, \(U \subset X_W\) is open, and \(U \to W\) finite. We have to show that \(\int_\pi w_{g \circ f}|_U\) is locally constant. Choose a point \(w \in W\). By Lemma 37.75.1 (and the fact that étale morphisms are open) it suffices to show that \(\int_\pi w_{g \circ f}|_U\) is constant after replacing \((W, w)\) by an étale neighbourhood. After replacing \((W, w)\) by an étale neighbourhood we may assume \(U = U_1 \amalg \ldots \amalg U_n\) where each \(U_i\) has a unique point \(u_i\) lying over \(w\) such that \(\kappa(u_i)/\kappa(w)\) is purely inseparable, see Lemma 37.41.5. Clearly, it suffices to show that \(\int_{U_i \to W} w_{g \circ f}|_{U_i}\) is constant in an étale neighbourhood of \(w\). This reduces us to the case discussed in the next paragraph.
We have \(w \in W\) and there is a unique point \(u \in U\) lying over \(w\) with \(\kappa(u)/\kappa(w)\) purely inseparable. Consider the point \(v = f(u) \in Y\). After replacing \((W, w)\) by an elementary étale neighbourhood we may assume there is an open neighbourhood \(V \subset Y_W\) of \(v\) such that \(V \to W\) is finite, see Lemma 37.41.1. Then \(f_W^{-1}(V) \cap U\) is an open neighbourhood of \(u\) where \(f_W : X_W \to Y_W\) is the base change of \(f\) to \(W\). Hence after Zariski shrinking \(W\), we may assume \(f_W(U) \subset V\). Thus we obtain morphisms \[U \xrightarrow{a} V \xrightarrow{b} W\] and \(U \to V\) is finite as \(V \to W\) is separated (because finite). Since \(w_f\) and \(w_g\) are weightings of \(f\) and \(g\) we see that \(\int_a w_f|_U\) is locally constant on \(V\) and \(\int_b w_g|_V\) is locally constant on \(W\). Thus after shrinking \(W\) one more time we may assume these functions are constant say with values \(n\) and \(m\). It follows immediately that \(\int_\pi w_{g \circ f}|_U = \int_{b \circ a} w_{g \circ f}|_U\) is constant with value \(nm\) as desired.
Lemma 37.75.6 (0F3C) official page ↗
Let \(f : X \to Y\) be a locally quasi-finite morphism. Let \(w : X \to \mathbf{Z}\) be a weighting. If \(w(x) > 0\) for all \(x \in X\), then \(f\) is universally open.
Proof. Since the property is preserved by base change, see Lemma 37.75.3, it suffices to prove that \(f\) is open. Since we may also replace \(X\) by any open of \(X\), it suffices to prove that \(f(X)\) is open. Let \(y \in f(X)\). Choose \(x \in X\) with \(f(x) = y\). It suffices to prove that \(f(X)\) contains an open neighbourhood of \(y\) and it suffices to do so after replacing \(Y\) by an étale neighbourhood of \(y\). By étale localization of quasi-finite morphisms, see Section 37.41, we may assume there is an open neighbourhood \(U \subset X\) of \(x\) such that \(\pi = f|_U : U \to Y\) is finite. Then \(\int_\pi w|_U\) is locally constant and has positive value at \(y\). Hence \(\pi(U)\) contains an open neighbourhood of \(y\) and the proof is complete.
Lemma 37.75.7 (0F3D) official page ↗
Let \(f : X \to Y\) be a morphism of schemes. Assume \(f\) is locally quasi-finite, locally of finite presentation, and flat. Then there is a positive weighting \(w : X \to \mathbf{Z}_{> 0}\) of \(f\) given by the rule that sends \(x \in X\) lying over \(y \in Y\) to \[w(x) = \text{length}_{\mathcal{O}_{X, x}} (\mathcal{O}_{X, x}/\mathfrak m_y \mathcal{O}_{X, x}) [\kappa(x) : \kappa(y)]_i\] where \([\kappa' : \kappa]_i\) is the inseparable degree (Fields, Definition 9.14.7).
Proof. Consider a diagram as in Definition 37.75.2. Let \(u \in U\) with images \(x, y, v\) in \(X, Y, V\). Then we claim that \[\text{length}_{\mathcal{O}_{X, x}} (\mathcal{O}_{X, x}/\mathfrak m_y \mathcal{O}_{X, x}) = \text{length}_{\mathcal{O}_{U, u}} (\mathcal{O}_{U, u}/\mathfrak m_v \mathcal{O}_{U, u})\] and \[[\kappa(x) : \kappa(y)]_i = [\kappa(u) : \kappa(v)]_i\] The first equality follows as \(\mathcal{O}_{X, x} \to \mathcal{O}_{U, u}\) is a flat local homomorphism such that \(\mathfrak m_y \mathcal{O}_{U, u} = \mathfrak m_v \mathcal{O}_{U, u}\) and \(\mathfrak m_x \mathcal{O}_{U, u} = \mathfrak m_u\) (because \(\mathcal{O}_{Y, y} \to \mathcal{O}_{V, v}\) and \(\mathcal{O}_{X, x} \to \mathcal{O}_{U, u}\) are unramified) and hence the equality by Algebra, Lemma 10.52.13. The second equality follows because \(\kappa(v)/\kappa(y)\) is a finite separable extension and \(\kappa(u)\) is a factor of \(\kappa(x) \otimes_{\kappa(y)} \kappa(v)\) and hence the inseparable degree is unchanged. Having said this, we see that formation of the function in the lemma commutes with étale base change. This reduces the problem to the discussion of the next paragraph.
Assume that \(f\) is a finite, flat morphism of finite presentation. We have to show that \(\int_f w\) is locally constant on \(Y\). In fact, \(f\) is finite locally free (Morphisms, Lemma 29.49.2) and we will show that \(\int_f w\) is equal to the degree of \(f\) (which is a locally constant function on \(Y\)). Namely, for \(y \in Y\) we see that \[\begin{align*} (\textstyle{\int}_f w)(y) & = \sum\nolimits_{f(x) = y} \text{length}_{\mathcal{O}_{X, x}} (\mathcal{O}_{X, x}/\mathfrak m_y \mathcal{O}_{X, x}) [\kappa(x) : \kappa(y)]_i [\kappa(x) : \kappa(y)]_s \\ & = \sum\nolimits_{f(x) = y} \text{length}_{\mathcal{O}_{X, x}} (\mathcal{O}_{X, x}/\mathfrak m_y \mathcal{O}_{X, x}) [\kappa(x) : \kappa(y)] \\ & = \text{length}_{\mathcal{O}_{Y, y}}((f_*\mathcal{O}_X)_y/ \mathfrak m_y (f_*\mathcal{O}_X)_y) \end{align*}\] Last equality by Algebra, Lemma 10.52.12. The final number is the rank of \(f_*\mathcal{O}_X\) at \(y\) as desired.
Lemma 37.75.8 (0F3E) official page ↗
Let \(f : X \to Y\) be a morphism of schemes. Assume
\(f\) is locally quasi-finite, and
\(Y\) is geometrically unibranch and locally Noetherian.
Then there is a weighting \(w : X \to \mathbf{Z}_{\geq 0}\) given by the rule that sends \(x \in X\) lying over \(y \in Y\) to the “generic separable degree” of \(\mathcal{O}_{X, x}^{sh}\) over \(\mathcal{O}_{Y, y}^{sh}\).
Proof. It follows from Algebra, Lemma 10.156.3 that \(\mathcal{O}_{Y, y}^{sh} \to \mathcal{O}_{X, x}^{sh}\) is finite. Since \(Y\) is geometrically unibranch there is a unique minimal prime \(\mathfrak p\) in \(\mathcal{O}_{Y, y}^{sh}\), see More on Algebra, Lemma 15.108.5. Write \[(\kappa(\mathfrak p) \otimes_{\mathcal{O}_{Y, y}^{sh}} \mathcal{O}_{X, x}^{sh})_{red} = \prod K_i\] as a finite product of fields. We set \(w(x) = \sum [K_i : \kappa(\mathfrak p)]_s\).
Since this definition is clearly insensitive to étale localization, in order to show that \(w\) is a weighting we reduce to showing that if \(f\) is a finite morphism, then \(\int_f w\) is locally constant. Observe that the value of \(\int_f w\) in a generic point \(\eta\) of \(Y\) is just the number of points of the geometric fibre \(X_{\overline{\eta}}\) of \(X \to Y\) over \(\eta\). Moreover, since \(Y\) is unibranch a point \(y\) of \(Y\) is the specialization of a unique generic point \(\eta\). Hence it suffices to show that \((\int_f w)(y)\) is equal to the number of points of \(X_{\overline{\eta}}\). After passing to an affine neighbourhood of \(y\) we may assume \(X \to Y\) is given by a finite ring map \(A \to B\). Suppose \(\mathcal{O}_{Y, y}^{sh}\) is constructed using a map \(\kappa(y) \to k\) into an algebraically closed field \(k\). Then \[\mathcal{O}_{Y, y}^{sh} \otimes_A B = \prod\nolimits_{f(x) = y} \prod\nolimits_{\varphi \in \Mor_{\kappa(y)}(\kappa(x), k)} \mathcal{O}_{X, x}^{sh}\] by Algebra, Lemma 10.153.4 and the lemma used above. Observe that the minimal prime \(\mathfrak p\) of \(\mathcal{O}_{Y, y}^{sh}\) maps to the prime of \(A\) corresponding to \(\eta\). Hence we see that the desired equality holds because the number of points of a geometric fibre is unchanged by a field extension.
Lemma 37.75.9
Let \(f : X \to Y\) be a locally quasi-finite morphism of schemes. Let \(w : X \to \mathbf{Z}\) be a weighting of \(f\). Let \(y \leadsto y'\) be a specialization of points of \(Y\). Assume \(w(x) = 0\) for all \(x \in X\) with \(f(x) = y\). Then \(w(x') = 0\) for all \(x' \in X\) with \(f(x') = y'\).
Proof. Let \(x' \in X\) be a point mapping to \(y'\). By Lemma 37.41.1 we can choose a diagram \[\xymatrix{ U \ar[r] \ar[dr]_\pi & X_V \ar[d] \ar[r] & X \ar[d]^f \\ & V \ar[r]^\varphi & Y }\] with \(V \to Y\) étale, with a point \(v' \in V\) mapping to \(y'\), with \(U \subset Y_V\) open, such that \(U \to V\) is finite, and such that there exists an unique point \(u' \in U\) mapping to \(v'\) which moreover maps to \(x'\) in \(X\). Note that since \(V \to Y\) is open, there exists a point \(v \in V\) specializing to \(v'\) and mapping to \(y\). By Definition 37.75.2 the function \(\int_\pi (w \circ h)\) is locally constant where \(h : U \to X\) is the composition of the top horizontal arrows. Since \(\int_\pi (w \circ h)\) is zero in \(v\) by our assumption on \(w\), we conclude that it is zero at \(v'\). However, the value at \(v'\) is \(w(x')[\kappa(u'):\kappa(v')]_s\) and we conclude.