hcju/stacksqa huggingface dataset:
Since $X$ is smooth over $k$ it is geometrically reduced over $k$, see Varieties, Lemma \ref{varieties-lemma-smooth-geometrically-normal}. Hence $H^0(X, \mathcal{O}_X) = \prod k_i$ is a finite product of finite separable field extensions $k_i/k$, see Varieties, Lemma \ref{varieties-lemma-proper-geometrically-reduced-global-sections}. It follows that $\Omega_{H^0(X, \mathcal{O}_X)/k} = \prod \Omega_{k_i/k} = 0$ (see for example Algebra, Lemma \ref{algebra-lemma-characterize-separable-algebraic-field-extensions}). Since the map of the lemma factors as $$ H^0(X, \mathcal{O}_X) \to \Omega_{H^0(X, \mathcal{O}_X)/k} \to H^0(X, \Omega_{X/k}) $$ by functoriality of the de Rham complex (see Section \ref{section-de-rham-complex}), we conclude.
We will apply Weil Cohomology Theories, Proposition \ref{weil-proposition-chern-class} to get this. \medskip\noindent Let $\mathcal{C}$ be the category of all quasi-compact and quasi-separated schemes. This certainly satisfies conditions (1), (2), and (3) (a), (b), and (c) of  Weil Cohomology Theories, Section \ref{weil-section-chern}. \medskip\noindent As our contravariant functor $A$ from $\mathcal{C}$ to the category of graded algebras will send $X$ to $A(X) = \bigoplus_{i \geq 0} H_{dR}^{2i}(X/\mathbf{Z})$ endowed with its cup product. Functoriality is discussed in Section \ref{section-de-rham-cohomology} and the cup product in Section \ref{section-cup-product}. For the additive maps $c_1^A$ we take $c_1^{dR}$ constructed in Section \ref{section-first-chern-class}. \medskip\noindent In fact, we obtain commutative algebras by Lemma \ref{lemma-cup-product-graded-commutative} which shows we have axiom (1) for $A$. \medskip\noindent To check axiom (2) for $A$ it suffices to check that $H^*_{dR}(X \coprod Y/\mathbf{Z}) =  H^*_{dR}(X/\mathbf{Z}) \times H^*_{dR}(Y/\mathbf{Z})$. This is a consequence of the fact that de Rham cohomology is constructed by taking the cohomology of a sheaf of differential graded algebras (in the Zariski topology). \medskip\noindent Axiom (3) for $A$ is just the statement that taking first Chern classes of invertible modules is compatible with pullbacks. This follows from the more general Lemma \ref{lemma-pullback-c1}. \medskip\noindent Axiom (4) for $A$ is the projective space bundle formula which we proved in Proposition \ref{proposition-projective-space-bundle-formula}. \medskip\noindent Axiom (5).  Let $X$ be a quasi-compact and quasi-separated scheme and let $\mathcal{E} \to \mathcal{F}$ be a surjection of finite locally free $\mathcal{O}_X$-modules of ranks $r + 1$ and $r$. Denote $i : P' = \mathbf{P}(\mathcal{F}) \to \mathbf{P}(\mathcal{E}) = P$ the corresponding incusion morphism. This is a morphism of smooth projective schemes over $X$ which exhibits $P'$ as an effective Cartier divisor on $P$. Thus by Lemma \ref{lemma-check-log-smooth} the complex of log poles for $P' \subset P$ over $\mathbf{Z}$ is defined. Hence for $a \in A(P)$ with $i^*a = 0$ we have $a \cup c_1^A(\mathcal{O}_P(P')) = 0$ by Lemma \ref{lemma-log-complex-consequence}. This finishes the proof.
Exactly as in the proof of Lemma \ref{lemma-chern-classes} one shows that the category of quasi-compact and quasi-separated schemes over $\mathbf{Q}$ together with the functor $A^*(X) = \bigoplus_{i \geq 0} H_{dR}^{2i}(X/\mathbf{Q})$ satisfy the axioms of Weil Cohomology Theories, Section \ref{weil-section-chern}. Moreover, in this case $A(X)$ is a $\mathbf{Q}$-algebra for all $X$. Hence the lemma follows from Weil Cohomology Theories, Proposition \ref{weil-proposition-chern-character}.
This follows from an almost trivial calculation once we correctly interpret this. First, we recall that the functor $\mathcal{H}^c_Z$ computed on the category of $\mathcal{O}_X$-modules agrees with the similarly defined functor on the category of abelian sheaves on $X$, see Cohomology, Lemma \ref{cohomology-lemma-sections-support-abelian-unbounded}. Hence, the differential $\text{d} : \Omega^p_{X/S} \to \Omega^{p + 1}_{X/S}$ induces a map $\mathcal{H}^c_Z(\Omega^p_{X/S}) \to \mathcal{H}^c_Z(\Omega^{p + 1}_{X/S})$. Moreover, the formation of the extended alternating {\v C}ech complex in Derived Categories of Schemes, Remark \ref{perfect-remark-support-c-equations} works on the category of abelian sheaves. The map $$ \Coker\left(\bigoplus \mathcal{F}_{1 \ldots \hat i \ldots c} \to \mathcal{F}_{1 \ldots c}\right) \longrightarrow i_*\mathcal{H}^c_Z(\mathcal{F}) $$ used in the construction of $c_{f_1, \ldots, f_c}$ in Derived Categories of Schemes, Remark \ref{perfect-remark-supported-map-c-equations} is well defined and functorial on the category of all abelian sheaves on $X$. Hence we see that the lemma follows from the equality $$ \text{d}\left( \frac{\tilde \omega \wedge \text{d}f_1 \wedge \ldots \wedge \text{d}f_c}{f_1 \ldots f_c}\right) = \frac{\text{d}(\tilde \omega) \wedge \text{d}f_1 \wedge \ldots \wedge \text{d}f_c}{f_1 \ldots f_c} $$ which is clear.
The assumptions imply that given $x \in Z \subset X$ there exists an open neighbourhood $U$ of $x$ such that $Z$ is cut out by $c$ elements $f_1, \ldots, f_c \in \mathcal{O}_X(U)$. Thus it suffices to show that given $f_1, \ldots, f_c$ and $g_1, \ldots, g_c$ in $\mathcal{O}_X(U)$ cutting out $Z \cap U$, the maps $\gamma^p_{f_1, \ldots, f_c}$ and $\gamma^p_{g_1, \ldots, g_c}$ are the same. To do this, after shrinking $U$ we may assume $g_j = \sum a_{ji} f_i$ for some $a_{ji} \in \mathcal{O}_X(U)$. Then we have $c_{f_1, \ldots, f_c} = \det(a_{ji}) c_{g_1, \ldots, g_c}$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-supported-map-determinant}. On the other hand we have $$ \text{d}(g_1) \wedge \ldots \wedge \text{d}(g_c) \equiv \det(a_{ji}) \text{d}(f_1) \wedge \ldots \wedge \text{d}(f_c) \bmod (f_1, \ldots, f_c)\Omega^c_{X/S} $$ Combining these relations, a straightforward calculation gives the desired equality.
The restriction $\alpha|_Z$ is the element of $H^q(Z, \Omega^p_{Z/S})$ given by functoriality for Hodge cohomology. Applying functoriality for cohomology using $\gamma^p : \Omega^p_{Z/S} \to \mathcal{H}^c_Z(\Omega^{p + c}_{X/S})$ we get get $\gamma^p(\alpha|_Z)$ in $H^q(Z, \mathcal{H}^c_Z(\Omega^{p + c}_{X/S}))$. This explains the left hand side of the formula. \medskip\noindent To explain the right hand side, we first pullback by the map of ringed spaces $i : (Z, i^{-1}\mathcal{O}_X) \to (X, \mathcal{O}_X)$ to get the element $i^{-1}\alpha \in H^q(Z, i^{-1}\Omega^p_{X/S})$. Let $\gamma^0(1) \in H^0(Z, \mathcal{H}_Z^c(\Omega^c_{X/S}))$ be the image of $1 \in H^0(Z, \mathcal{O}_Z) = H^0(Z, \Omega^0_{Z/S})$ by $\gamma^0$. Using cup product we obtain an element $$ i^{-1}\alpha \cup \gamma^0(1) \in H^{q + c}(Z,  i^{-1}\Omega^p_{X/S} \otimes_{i^{-1}\mathcal{O}_X} \mathcal{H}^c_Z(\Omega^c_{X/S})) $$ Using Cohomology, Remark \ref{cohomology-remark-support-cup-product} and wedge product there are canonical maps $$ i^{-1}\Omega^p_{X/S} \otimes_{i^{-1}\mathcal{O}_X}^\mathbf{L} R\mathcal{H}_Z(\Omega^c_{X/S}) \to R\mathcal{H}_Z(\Omega^p_{X/S} \otimes_{\mathcal{O}_X}^\mathbf{L} \Omega^c_{X/S}) \to R\mathcal{H}_Z(\Omega^{p + c}_{X/S}) $$ By Derived Categories of Schemes, Lemma \ref{perfect-lemma-supported-trivial-vanishing} the objects $R\mathcal{H}_Z(\Omega^j_{X/S})$ have vanishing cohomology sheaves in degrees $> c$. Hence on cohomology sheaves in degree $c$ we obtain a map $$ i^{-1}\Omega^p_{X/S} \otimes_{i^{-1}\mathcal{O}_X} \mathcal{H}^c_Z(\Omega^c_{X/S}) \longrightarrow \mathcal{H}^c_Z(\Omega^{p + c}_{X/S}) $$ The expression $i^{-1}\alpha \wedge \gamma^0(1)$ is the image of the cup product $i^{-1}\alpha \cup \gamma^0(1)$ by the functoriality of cohomology. \medskip\noindent Having explained the content of the formula in this manner, by general properties of cup products (Cohomology, Section \ref{cohomology-section-cup-product}), it now suffices to prove that the diagram $$ \xymatrix{ i^{-1}\Omega^p_X \otimes \Omega^0_Z \ar[rr]_{\text{id} \otimes \gamma^0} \ar[d] & & i^{-1}\Omega^p_X \otimes \mathcal{H}^c_Z(\Omega^c_X) \ar[d]^\wedge \\ \Omega^p_Z \otimes \Omega^0_Z \ar[r]^\wedge & \Omega^p_Z \ar[r]^{\gamma^p} & \mathcal{H}^c_Z(\Omega^{p + c}_X) } $$ is commutative in the category of sheaves on $Z$ (with obvious abuse of notation). This boils down to a simple computation for the maps $\gamma^j_{f_1, \ldots, f_c}$ which we omit; in fact these maps are chosen exactly such that this works and such that $1$ maps to $\frac{\text{d}f_1 \wedge \ldots \wedge \text{d}f_c}{f_1 \ldots f_c}$.
More precisely, consider the composition \begin{align*} \mathcal{O}_{X'}|_{Z'} \otimes_{h^{-1}\mathcal{O}_X|_Z}^\mathbf{L} h^{-1}R\mathcal{H}_Z(\Omega^{p + c}_{X/S}) & \to R\mathcal{H}_{Z'}(Lg^*\Omega^{p + c}_{X/S}) \\ & \to R\mathcal{H}_{Z'}(g^*\Omega^{p + c}_{X/S}) \\ & \to R\mathcal{H}_{Z'}(\Omega^{p + c}_{X'/S'}) \end{align*} where the first arrow is given by Cohomology, Remark \ref{cohomology-remark-support-functorial} and the last one by functoriality of differentials. Since we have the vanishing of cohomology sheaves in degrees $> c$ by Derived Categories of Schemes, Lemma \ref{perfect-lemma-supported-trivial-vanishing} this induces the right vertical arrow. We can check the commutativity locally. Thus we may assume $Z$ is cut out by $f_1, \ldots, f_c \in \Gamma(X, \mathcal{O}_X)$. Then $Z'$ is cut out by $f'_i = g^\sharp(f_i)$. The maps $c_{f_1, \ldots, f_c}$ and $c_{f'_1, \ldots, f'_c}$ fit into the commutative diagram $$ \xymatrix{ h^*i^*\Omega^p_{X/S} \ar[rr]_-{h^{-1}c_{f_1, \ldots, f_c}} \ar[d] & & \mathcal{O}_{X'}|_{Z'} \otimes_{h^{-1}\mathcal{O}_X|_Z} h^{-1}\mathcal{H}^c_Z(\Omega^p_{X/S}) \ar[d] \\ (i')^*\Omega^p_{X'/S'} \ar[rr]^{c_{f'_1, \ldots, f'_c}} & & \mathcal{H}^c_{Z'}(\Omega^p_{X'/S'}) } $$ See Derived Categories of Schemes, Remark \ref{perfect-remark-supported-functorial}. Recall given a $p$-form $\omega$ on $Z$ we define $\gamma^p(\omega)$ by choosing (locally on $X$ and $Z$) a $p$-form $\tilde \omega$ on $X$ lifting $\omega$ and taking $\gamma^p(\omega) = c_{f_1, \ldots, f_c}(\tilde \omega) \wedge \text{d}f_1 \wedge \ldots \wedge \text{d}f_c$. Since the form $\text{d}f_1 \wedge \ldots \wedge \text{d}f_c$ pulls back to $\text{d}f'_1 \wedge \ldots \wedge \text{d}f'_c$ we conclude.
This lemma follows from Lemma \ref{lemma-gysin-projection} and Cohomology, Lemma \ref{cohomology-lemma-support-cup-product}. We suggest the reader skip over the more detailed discussion below. \medskip\noindent We will use without further mention that $R\mathcal{H}_Z(\Omega^j_{X/S}) = \mathcal{H}^c_Z(\Omega^j_{X/S})[-c]$ for all $j$ as pointed out in Remark \ref{remark-how-to-use}. We will also silently use the identifications $H^{q + c}_Z(X, \Omega^j_{X/S}) = H^{q + c}(Z, R\mathcal{H}_Z(\Omega^j_{X/S}) = H^q(Z, \mathcal{H}^c_Z(\Omega^j_{X/S}))$, see Cohomology, Lemma \ref{cohomology-lemma-local-to-global-sections-with-support} for the first one. With these identifications \begin{enumerate} \item $\gamma^0(1) \in H^c_Z(X, \Omega^c_{X/S})$ maps to $\gamma^{0, 0}(1)$ in $H^c(X, \Omega^c_{X/S})$, \item the right hand side $i^{-1}\alpha \wedge \gamma^0(1)$ of the equality in Lemma \ref{lemma-gysin-projection} is the (image by wedge product of the) cup product of Cohomology, Remark \ref{cohomology-remark-support-cup-product-global}  of the elements $\alpha$ and $\gamma^0(1)$, in other words, the constructions in the proof of Lemma \ref{lemma-gysin-projection} and in Cohomology, Remark \ref{cohomology-remark-support-cup-product-global} match, \item by Cohomology, Lemma \ref{cohomology-lemma-support-cup-product} this maps to $\alpha \cup \gamma^{0, 0}(1)$ in $H^{q + c}(X, \Omega^p_{X/S} \otimes \Omega^c_{X/S})$, and \item the left hand side $\gamma^p(\alpha|_Z)$ of the equality in Lemma \ref{lemma-gysin-projection} maps to $\gamma^{p, q}(\alpha|_Z)$. \end{enumerate} This finishes the proof.
The map $\gamma^0 : \mathcal{O}_Z \to \mathcal{H}^d_Z(\Omega^d_{X/k}) = R\mathcal{H}_Z(\Omega^d_{X/k})[d]$ is adjoint to a map $$ g^0 : i_*\mathcal{O}_Z \longrightarrow \Omega^d_{X/k}[d] $$ in $D(\mathcal{O}_X)$. Recall that $\Omega^d_{X/k} = \omega_X$ is a dualizing sheaf for $X/k$, see Duality for Schemes, Lemma \ref{duality-lemma-duality-proper-over-field}. Hence the $k$-linear dual of the map in the statement of the lemma is the map $$ H^0(X, \mathcal{O}_X) \to \Ext^d_X(i_*\mathcal{O}_Z, \omega_X) $$ which sends $1$ to $g^0$. Thus it suffices to show that $g^0$ is nonzero. This we may do in any neighbourhood $U$ of the point $x$. Choose $U$ such that there exist $f_1, \ldots, f_d \in \mathcal{O}_X(U)$ vanishing only at $x$ and generating the maximal ideal $\mathfrak m_x \subset \mathcal{O}_{X, x}$. We may assume assume $U = \Spec(R)$ is affine. Looking over the construction of $\gamma^0$ we find that our extension is given by $$ k \to (R \to \bigoplus\nolimits_{i_0} R_{f_{i_0}} \to \bigoplus\nolimits_{i_0 < i_1} R_{f_{i_0}f_{i_1}} \to \ldots \to R_{f_1\ldots f_r})[d] \to R[d] $$ where $1$ maps to $1/f_1 \ldots f_c$ under the first map. This is nonzero because $1/f_1 \ldots f_c$ is a nonzero element of local cohomology group $H^d_{(f_1, \ldots, f_d)}(R)$ in this case,
The first part of the statement follows from Derived Categories of Schemes, Lemma \ref{perfect-lemma-proper-flat-geom-red}. Setting $S' = \underline{\Spec}_S(f_*\mathcal{O}_X)$ we get a factorization $X \to S' \to S$ (this is the Stein factorization, see More on Morphisms, Section \ref{more-morphisms-section-stein-factorization}, although we don't need this) and we see that $\Omega_{X/S} = \Omega_{X/S'}$ for example by Morphisms, Lemma \ref{morphisms-lemma-triangle-differentials} and \ref{morphisms-lemma-etale-at-point}. This of course implies that $\text{d} : f_*\mathcal{O}_X \to f_*\Omega_{X/S}$ is zero.
Let $\omega^\bullet_{X/S}$ be the relative dualizing complex of $X$ over $S$ as in Duality for Schemes, Remark \ref{duality-remark-relative-dualizing-complex} and let $Rf_*\omega_{X/S}^\bullet \to \mathcal{O}_S$ be its trace map. By Duality for Schemes, Lemma \ref{duality-lemma-smooth-proper} there exists an isomorphism $\omega^\bullet_{X/S} \cong \Omega^d_{X/S}[d]$ and using this isomorphism we obtain $t$. The complexes $Rf_*\Omega^p_{X/S}$ are perfect by Lemma \ref{lemma-proper-smooth-de-Rham}. Since $\Omega^p_{X/S}$ is locally free and since $\Omega^p_{X/S} \otimes_{\mathcal{O}_X} \Omega^{d - p}_{X/S} \to \Omega^d_{X/S}$ exhibits an isomorphism $\Omega^p_{X/S} \cong \SheafHom_{\mathcal{O}_X}(\Omega^{d - p}_{X/S}, \Omega^d_{X/S})$ we see that the pairing induced by the relative cup product is perfect by Duality for Schemes, Remark \ref{duality-remark-relative-dualizing-complex-relative-cup-product}. \medskip\noindent Uniqueness of $t$. Choose a distinguished triangle $f_*\mathcal{O}_X \to Rf_*\mathcal{O}_X \to P \to f_*\mathcal{O}_X[1]$. By Lemma \ref{lemma-relative-bottom-part-degenerates} the object $P$ is perfect of tor amplitude in $[1, \infty)$ and the triangle is locally on $S$ split. Thus $R\SheafHom_{\mathcal{O}_X}(P, \mathcal{O}_X)$ is perfect of tor amplitude in $(-\infty, -1]$. Hence duality (above) shows that locally on $S$ we have $$ Rf_*\Omega^d_{X/S}[d] \cong R\SheafHom_{\mathcal{O}_S}(f_*\mathcal{O}_X, \mathcal{O}_S) \oplus R\SheafHom_{\mathcal{O}_X}(P, \mathcal{O}_X) $$ This shows that $R^df_*\Omega^d_{X/S}$ is finite locally free and that we obtain a perfect $\mathcal{O}_S$-bilinear pairing $$ f_*\mathcal{O}_X \times R^df_*\Omega^d_{X/S} \longrightarrow \mathcal{O}_S $$ using $t$. This implies that any $\mathcal{O}_S$-linear map $t' : R^df_*\Omega^d_{X/S} \to \mathcal{O}_S$ is of the form $t' = t \circ g$ for some $g \in \Gamma(S, f_*\mathcal{O}_X) = \Gamma(X, \mathcal{O}_X)$. In order for $t'$ to still determine a perfect pairing $g$ will have to be a unit. This finishes the proof.
[Proof in case $S$ is reduced] Assume $S$ is reduced. Observe that $\text{d} : R^df_*\Omega^{d - 1}_{X/S} \to R^df_*\Omega^d_{X/S}$ is an $\mathcal{O}_S$-linear map of (quasi-coherent) $\mathcal{O}_S$-modules. The $\mathcal{O}_S$-module $R^df_*\Omega^d_{X/S}$ is finite locally free (as the dual of the finite locally free $\mathcal{O}_S$-module $f_*\mathcal{O}_X$ by Lemmas \ref{lemma-relative-duality-hodge} and \ref{lemma-relative-bottom-part-degenerates}). Since $S$ is reduced it suffices to show that the stalk of $\text{d}$ in every generic point $\eta \in S$ is zero; this follows by looking at sections over affine opens, using that the target of $\text{d}$ is locally free, and Algebra, Lemma \ref{algebra-lemma-reduced-ring-sub-product-fields} part (2). Since $S$ is reduced we have $\mathcal{O}_{S, \eta} = \kappa(\eta)$, see Algebra, Lemma \ref{algebra-lemma-minimal-prime-reduced-ring}. Thus $\text{d}_\eta$ is identified with the map $$ \text{d} : H^d(X_\eta, \Omega^{d - 1}_{X_\eta/\kappa(\eta)}) \longrightarrow H^d(X_\eta, \Omega^d_{X_\eta/\kappa(\eta)}) $$ which is zero by Lemma \ref{lemma-top-part-degenerates}.
Denote $p : X \to S$ and $q : Y \to S$ be the structure morphisms. Let $\xi'_i : \Omega^\bullet_{X/S} \to \Omega^\bullet_{X/S}[n_i]$ be the map of Remark \ref{remark-cup-product-as-a-map} corresponding to $\xi_i$. Denote $$ \tilde \xi_i : \Omega^\bullet_{Y/S} \to Rf_*\Omega^\bullet_{X/S}[n_i] $$ the composition of $\xi'_i$ with the canonical map $\Omega^\bullet_{Y/S} \to Rf_*\Omega^\bullet_{X/S}$. Using $$ R\Gamma(Y, Rf_*\Omega^\bullet_{X/S}) = R\Gamma(X, \Omega^\bullet_{X/S}) $$ on cohomology $\tilde \xi_i$ is the map $\eta \mapsto \xi_i \cup f^*\eta$ from $H^m_{dR}(Y/S)$ to $H^{m + n}_{dR}(X/S)$. Further, since the formation of $\xi'_i$ commutes with restrictions to opens, so does the formation of $\tilde \xi_i$ commute with restriction to opens. \medskip\noindent Thus we can consider the map $$ \tilde \xi = \bigoplus \tilde \xi_i[-n_i] : \bigoplus \Omega^\bullet_{Y/S}[-n_i] \longrightarrow Rf_*\Omega^\bullet_{X/S} $$ To prove the lemma it suffices to show that this is an isomorphism in $D(Y, q^{-1}\mathcal{O}_S)$. If we could show $\tilde \xi$ comes from a map of filtered complexes (with suitable filtrations), then we could appeal to the spectral sequence of Lemma \ref{lemma-spectral-sequence-smooth} to finish the proof. This takes more work than is necessary and instead our approach will be to reduce to the affine case (whose proof does in some sense use the spectral sequence). \medskip\noindent Indeed, if $Y' \subset Y$ is is any open with inverse image $X' \subset X$, then $\tilde \xi|_{X'}$ induces the map $$ \bigoplus\nolimits_{i = 1}^N H^*_{dR}(Y'/S) \longrightarrow H^*_{dR}(X'/S), \quad (a_1, \ldots, a_N) \longmapsto  \sum \xi_i|_{X'} \cup f^*a_i $$ on cohomology over $Y'$, see discussion above. Thus it suffices to find a basis for the topology on $Y$ such that the proposition holds for the members of the basis (in particular we can forget about the map $\tilde \xi$ when we do this). This reduces us to the case where $Y$ and $S$ are affine which is handled by Lemma \ref{lemma-global-generation-on-fibres} and the proof is complete.
Choose an affine open $\Spec(A) \subset X$ such that $\mathcal{E}$ restricts to the trivial locally free module $\mathcal{O}_{\Spec(A)}^{\oplus r}$. Then $P \times_X \Spec(A) = \mathbf{P}^{r - 1}_A$. Thus we see that $p$ is proper and smooth, see Section \ref{section-projective-space}. Moreover, the classes $c_1^{dR}(\mathcal{O}_P(1))^i$, $i = 0, 1, \ldots, r - 1$ restricted to a fibre $X_y = \mathbf{P}^{r - 1}_y$ freely generate the de Rham cohomology $H^*_{dR}(X_y/y)$ over $\kappa(y)$, see Lemma \ref{lemma-de-rham-cohomology-projective-space}. Thus we've verified the conditions of Proposition \ref{proposition-global-generation-on-fibres} and we win.
In the discussion above we showed that our data (D0), (D1), (D2') satisfies axioms (A1) -- (A9) of Weil Cohomology Theories, Section \ref{weil-section-c1}. Hence we conclude by Weil Cohomology Theories, Proposition \ref{weil-proposition-get-weil}. \medskip\noindent Please don't read what follows. In the proof of the assertions we also used Lemmas \ref{lemma-proper-smooth-de-Rham}, \ref{lemma-pullback-c1}, \ref{lemma-log-complex-consequence}, \ref{lemma-kunneth-de-rham}, \ref{lemma-bottom-part-degenerates}, and \ref{lemma-de-rham-cohomology-projective-space}, Propositions \ref{proposition-projective-space-bundle-formula}, \ref{proposition-blowup-split}, and \ref{proposition-Garel}, Weil Cohomology Theories, Lemmas \ref{weil-lemma-check-over-extension}, \ref{weil-lemma-chern-classes}, \ref{weil-lemma-cycle-classes}, and \ref{weil-lemma-poincare-duality}, Weil Cohomology Theories, Remark \ref{weil-remark-trace}, Varieties, Lemmas \ref{varieties-lemma-proper-geometrically-reduced-global-sections} and \ref{varieties-lemma-ample-positive}, Intersection Theory, Section \ref{intersection-section-projection} and Lemma \ref{intersection-lemma-projection-generically-finite}, More on Morphisms, Lemma \ref{more-morphisms-lemma-lci-permanence}, Algebra, Lemma \ref{algebra-lemma-CM-over-regular-flat}, and Chow Homology, Lemma \ref{chow-lemma-degrees-and-numerical-intersections}.
[Proof of Theorem \ref{theorem-baffling}] We need to verify the existence of a functorial isomorphism as above. For an \'etale morphism $\varphi : U \to X$, consider the diagram $$ \xymatrix{ U \ar@{-->}[rd] \ar@/^1pc/[rrd]^{F_U} \ar@/_1pc/[rdd]_\varphi \\ & {U \times_{\varphi, X, F_X} X} \ar[r]_-{\text{pr}_1} \ar[d]^{\text{pr}_2} & U \ar[d]^\varphi \\ & X \ar[r]^{F_X} & X. } $$ The dotted arrow is an \'etale morphism and a universal homeomorphism, so it is an isomorphism. See \'Etale Morphisms, Lemma \ref{etale-lemma-relative-frobenius-etale}.
We explain how to deduce this from Theorem \ref{theorem-D}. We first use some \'etale cohomology arguments to reduce the proof to an algebraic statement which we subsequently prove. \medskip\noindent Let $\mathcal{F}$ be as in the theorem. We can write $\mathcal{F}$ as $\mathcal{F}'\otimes \mathbf{Q}_\ell$ where $\mathcal{F}' = \left\{\mathcal{F}'_n\right\}$ is a $\mathbf{Z}_\ell$-sheaf without torsion, i.e., $\ell : \mathcal{F}'\to \mathcal{F}'$ has trivial kernel in the category of $\mathbf{Z}_\ell$-sheaves. Then each $\mathcal{F}_n'$ is a flat constructible $\mathbf{Z}/\ell^n\mathbf{Z}$-module on $X_\etale$, so $\mathcal{F}'_n \in D_{ctf}(X, \mathbf{Z}/\ell^n\mathbf{Z})$ and $\mathcal{F}_{n+1}' \otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} = \mathcal{F}_n'$. Note that the last equality holds also for standard (non-derived) tensor product, since $\mathcal{F}'_n$ is flat (it is the same equality). Therefore, \begin{enumerate} \item the complex $K_n = R\Gamma_c\left(X_{\bar k}, \mathcal{F}_n'\right)$ is perfect, and it is endowed with an endomorphism $\pi_n : K_n\to K_n$ in $D(\mathbf{Z}/\ell^n\mathbf{Z})$, \item there are identifications $$ K_{n+1} \otimes^{\mathbf{L}}_{\mathbf{Z}/\ell^{n+1}\mathbf{Z}} \mathbf{Z}/\ell^n\mathbf{Z} = K_n $$ in $D_{perf}(\mathbf{Z}/\ell^n\mathbf{Z})$, compatible with the endomorphisms $\pi_{n+1}$ and $\pi_n$ (see \cite[Rapport 4.12]{SGA4.5}), \item the equality $\text{Tr}\left(\pi_X^* |_{K_n}\right) = \sum_{x\in X(k)} \text{Tr}\left(\pi_x |_{(\mathcal{F}'_n)_{\bar x}}\right)$ holds, and \item for each $x\in X(k)$, the elements $\text{Tr}(\pi_x |_{\mathcal{F}'_{n, \bar x}}) \in \mathbf{Z}/\ell^n\mathbf{Z}$ form an element of $\mathbf{Z}_\ell$ which is equal to $\text{Tr}(\pi_x |_{\mathcal{F}_{\bar x}}) \in \mathbf{Q}_\ell$. \end{enumerate} It thus suffices to prove the following algebra lemma.
Let $\varphi : U \to X$ be \'etale. Recall that ${\pi_X}_* \mathcal{F} (U) = \mathcal{F} (U \times_{\varphi, X, \pi_X} X)$. Since $\pi_X = F_X^f$, it follows from the proof of Theorem \ref{theorem-baffling} that there is a functorial isomorphism $$ \xymatrix{ U \ar[rd]_{\varphi} \ar[rr]_-{\gamma_U} & & U \times_{\varphi, X, \pi_X} X \ar[ld]^{\text{pr}_2} \\ & X } $$ where $\gamma_U = (\varphi, F_U^f)$. Now we define an isomorphism $$ \mathcal{F} (U) \longrightarrow {\pi_X}_* \mathcal{F} (U) = \mathcal{F} (U \times_{\varphi, X, \pi_X} X) $$ by taking the restriction map of $\mathcal{F}$ along $\gamma_U^{-1}$. The other isomorphism is analogous.