hcju/stacksqa huggingface dataset:
The map $f \star 1_X$ is the map with components $$ X_n = \text{id}_\mathcal{C} \circ X_n \xrightarrow{f \star 1_{X_n}} \text{id}_\mathcal{C} \circ X_n = X_n $$ For a transformation $a : F \to G$ of endofunctors of $\mathcal{C}$ we have $a \circ (f \star 1_F) = f \star a = (f \star 1_G) \circ a$. Thus $f \star 1_X$ is indeed a morphism of simplicial objects. Similarly for $1_X \star f$. \medskip\noindent To show the morphisms are homotopic we construct morphisms $h_{n, i} : X_n \to X_n$ for $n \geq 0$ and $0 \leq i \leq n + 1$ satisfying the relations described in Lemma \ref{lemma-relations-homotopy}. See also Remark \ref{remark-homotopy-better}. It turns out we can take $$ h_{n, i} = 1_i \star f \star 1_{n + 1 - i} $$ where $1_i$ is the identity transformation on $Y \circ \ldots \circ Y$ as in the proof of Lemma \ref{lemma-godement}. We have $h_{n, 0} = f \star 1_{X_n}$ and $h_{n, n + 1} = 1_{X_n} \star f$ which checks the first condition. In checking the other conditions we use the comments made in the proof of Lemma \ref{lemma-godement-two-maps} about the maps $d^n_j$ and $s^n_j$. \medskip\noindent We check condition (2) of Lemma \ref{lemma-relations-homotopy}. Let $i > j$. We have to show $$ d^n_j \circ (1_i \star f \star 1_{n + 1 - i}) = (1_{i - 1} \star f \star 1_{n + 1 - i}) \circ d^n_j $$ Since $i - 1 \geq j$ we can use one of the possible descriptions of $d^n_j$ to rewrite the left hand side as $$ (d^{i - 1}_j \star 1_{n - i + 1}) \circ (1_i \star f \star 1_{n + 1 - i}) = d^{i - 1}_j \star f \star 1_{n + 1 - i} $$ Similarly the right hand side becomes $$ (1_{i - 1} \star f \star 1_{n + 1 - i}) \circ (d^{i - 1}_j \star 1_{n - i + 1}) = d^{i - 1}_j \star f \star 1_{n + 1 - i} $$ Thus we obtain the same result and (2) is checked. \medskip\noindent The conditions (3), (4), and (5) of Lemma \ref{lemma-relations-homotopy} are checked in exactly the same manner using the strategy of the proof of Lemma \ref{lemma-godement-two-maps}. We omit the details\footnote{When $f$ is invertible it suffices to prove that $(a_n) = 1_X$ and $(b_n) = f^{-1} \star 1_X \star f$ are homotopic. But this follows from Lemma \ref{lemma-godement-two-maps} because in this case $a = b = 1_{\text{id}_\mathcal{C}}$.}.
Consider $Y = U \circ V : \mathcal{A} \to \mathcal{A}$. We already have the transformation $d : Y = U \circ V \to \text{id}_\mathcal{A}$. Let us denote $$ s = 1_U \star \eta \star 1_V : Y = U \circ \text{id}_\mathcal{S} \circ V \longrightarrow U \circ V \circ U \circ V = Y \circ Y $$ This places us in the sitation of Example \ref{example-godement}. It is immediate from the formulas that the $X, d^n_i, s^n_i$ constructed above and the $X, s^n_i, s^n_i$ constructed from $Y, d, s$ in Example \ref{example-godement} agree. Thus, according to Lemma \ref{lemma-godement} it suffices to prove that $$ 1_Y = (d \star 1_Y) \circ s = (1_Y \star d) \circ s \quad\text{and}\quad (s \star 1) \circ s = (1 \star s) \circ s $$ The first equal sign translates into the equality $$ 1_U \star 1_V = (d \star 1_U \star 1_V) \circ (1_U \star \eta \star 1_V) $$ which holds if we have $1_U = (d \star 1_U) \circ (1_U \star \eta)$ which in turn holds by (\ref{equation-composition}). Similarly for the second equal sign. For the last equation we need to prove $$ (1_U \star \eta \star 1_V \star 1_U \star 1_V) \circ (1_U \star \eta \star 1_V) = (1_U \star 1_V \star 1_U \star \eta \star 1_V) \circ (1_U \star \eta \star 1_V) $$ For this it suffices to prove $(\eta \star 1_V \star 1_U) \circ \eta = (1_V \star 1_U \star \eta) \circ \eta$ which is true because both sides are the same as $\eta \star \eta$.
As in the proof of Lemma \ref{lemma-standard-simplicial} we set $Y = U \circ V$ so that we are in the sitation of Example \ref{example-godement}. \medskip\noindent Proof of the first homotopy equivalence. By Lemma \ref{lemma-godement-section} to construct a map $h : V \to V \circ X$ right inverse to $1_V \star \epsilon$ it suffices to construct a map $h_0 : V \to V \circ Y = V \circ U \circ V$ such that $1_V = (1_V \star d) \circ h_0$. Of course we take $h_0 = \eta \star 1_V$ and the equality holds by (\ref{equation-composition}). To finish the proof we need to show the two maps $$ (1_V \star \epsilon) \circ h, 1_V \star \text{id}_X : V \circ X \longrightarrow V \circ X $$ are homotopic. This follows immediately from Lemma \ref{lemma-godement-two-maps} (with $G = G' = V$ and $F = F' = \text{id}_\mathcal{S}$). \medskip\noindent The proof of the second homotopy equivalence. By Lemma \ref{lemma-godement-section} to construct a map $h : U \to X \circ U$ right inverse to $\epsilon \star 1_U$ it suffices to construct a map $h_0 : U \to Y \circ U = U \circ V \circ U$ such that $1_U = (d \star 1_U) \circ h_0$. Of course we take $h_0 = 1_U \star \eta$ and the equality holds by (\ref{equation-composition}). To finish the proof we need to show the two maps $$ (\epsilon \star 1_U) \circ h, \text{id}_X \star 1_U : X \circ U \longrightarrow X \circ U $$ are homotopic. This follows immediately from Lemma \ref{lemma-godement-two-maps} (with $G = G' = \text{id}_\mathcal{A}$ and $F = F' = U$).
Let $B''' \subset B$ be the $A$-subalgebra generated by the images of $B' \to B$ and $B'' \to B$. As $B'$ and $B''$ are each generated by finitely many elements integral over $A$, we see that $B'''$ is generated by finitely many elements integral over $A$ and we conclude that $B'''$ is finite over $A$ (Algebra, Lemma \ref{algebra-lemma-characterize-finite-in-terms-of-integral}). Consider the maps $$ B = B' \otimes_{B'} B \to B''' \otimes_{B'} B \to B \otimes_{B'} B = B $$ The final equality holds because $\Spec(B) \to \Spec(B')$ is an open immersion (and hence a monomorphism). The second arrow is injective as $B' \to B$ is flat. Hence both arrows are isomorphisms. This means that $$ \xymatrix{ \Spec(B''') \ar[d] & \Spec(B) \ar[d] \ar[l] \\ \Spec(B') & \Spec(B) \ar[l] } $$ is cartesian. Since the base change of an open immersion is an open immersion we conclude.
Let $B', B'', B'''$ be as in Lemma \ref{lemma-dominate-factorizations}. We obtain a canonical map $$ \omega''' = \Hom_A(B''', A) \otimes_{B'''} B \longrightarrow \Hom_A(B', A) \otimes_{B'} B = \omega' $$ and a similar one involving $B''$. If we show these maps are isomorphisms then the lemma is proved. Let $g \in B'$ be an element such that $B'_g \to B_g$ is an isomorphism and hence $B'_g \to (B''')_g \to B_g$ are isomorphisms. It suffices to show that $(\omega''')_g \to \omega'_g$ is an isomorphism. The kernel and cokernel of the ring map $B' \to B'''$ are finite $A$-modules and $g$-power torsion. Hence they are annihilated by a power of $g$. This easily implies the result.
Say $A \to B' \to B$ is a factorization with $A \to B'$ finite and $\Spec(B) \to \Spec(B')$ an open immersion. In case (1) we may use the factorization $A_f \to B'_f \to B$ to compute $\omega_{B/A_f}$ and use Algebra, Lemma \ref{algebra-lemma-hom-from-finitely-presented}. In case (2) use the factorization $A \to B' \to B_g$ to see the result. Part (3) follows from a combination of (1) and (2).
Assume that $A \to A_1$ is flat. By construction of $\omega_{B/A}$ we may assume that $A \to B$ is finite. Then $\omega_{B/A} = \Hom_A(B, A)$ and $\omega_{B_1/A_1} = \Hom_{A_1}(B_1, A_1)$. Since $B_1 = B \otimes_A A_1$ the result follows from More on Algebra, Lemma \ref{more-algebra-lemma-pseudo-coherence-and-base-change-ext}.
Choose a factorization $A \to B' \to B$ with $A \to B'$ finite and $B' \to B$ inducing an open immersion on spectra. As $\omega_{B/A} = \omega_{B'/A} \otimes_{B'} B$ it suffices to prove the statement for $\omega_{B'/A}$. Thus we may assume $A \to B$ is finite. \medskip\noindent Assume $\mathfrak p \in \text{Ass}(A)$ and $\mathfrak q$ is a prime of $B$ lying over $\mathfrak p$. Let $x \in A$ be an element whose annihilator is $\mathfrak p$. Choose a nonzero $\kappa(\mathfrak p)$ linear map $\lambda : \kappa(\mathfrak q) \to \kappa(\mathfrak p)$. Since $A/\mathfrak p \subset B/\mathfrak q$ is a finite extension of rings, there is an $f \in A$, $f \not \in \mathfrak p$ such that $f\lambda$ maps $B/\mathfrak q$ into $A/\mathfrak p$. Hence we obtain a nonzero $A$-linear map $$ B \to B/\mathfrak q \to A/\mathfrak p \to A,\quad b \mapsto f\lambda(b)x $$ An easy computation shows that this element of $\omega_{B/A}$ has annihilator $\mathfrak q$, whence $\mathfrak q \in \text{Ass}(\omega_{B/A})$. \medskip\noindent Conversely, suppose that $\mathfrak q \subset B$ is a prime ideal lying over a prime $\mathfrak p \subset A$ which is not an associated prime of $A$. We have to show that $\mathfrak q \not \in \text{Ass}_B(\omega_{B/A})$. After replacing $A$ by $A_\mathfrak p$ and $B$ by $B_\mathfrak p$ we may assume that $\mathfrak p$ is a maximal ideal of $A$. This is allowed by Lemma \ref{lemma-dualizing-flat-base-change} and Algebra, Lemma \ref{algebra-lemma-localize-ass}. Then there exists an $f \in \mathfrak m$ which is a nonzerodivisor on $A$. Then $f$ is a nonzerodivisor on $\omega_{B/A}$ and hence $\mathfrak q$ is not an associated prime of this module.
Let $\mathfrak q \subset B$ be a prime lying over $\mathfrak p \subset A$. We will show that the localization $\omega_{B/A, \mathfrak q}$ is flat over $A_\mathfrak p$. This suffices by Algebra, Lemma \ref{algebra-lemma-flat-localization}. By Algebra, Lemma \ref{algebra-lemma-etale-makes-quasi-finite-finite-one-prime} we can find an \'etale ring map $A \to A'$ and a prime ideal $\mathfrak p' \subset A'$ lying over $\mathfrak p$ such that $\kappa(\mathfrak p') = \kappa(\mathfrak p)$ and such that $$ B' = B \otimes_A A' = C \times D $$ with $A' \to C$ finite and such that the unique prime $\mathfrak q'$ of $B \otimes_A A'$ lying over $\mathfrak q$ and $\mathfrak p'$ corresponds to a prime of $C$. By  Lemma \ref{lemma-dualizing-flat-base-change} and Algebra, Lemma \ref{algebra-lemma-base-change-flat-up-down} it suffices to show $\omega_{B'/A', \mathfrak q'}$ is flat over $A'_{\mathfrak p'}$. Since $\omega_{B'/A'} = \omega_{C/A'} \times \omega_{D/A'}$ by Lemma \ref{lemma-dualizing-product} this reduces us to the case where $B$ is finite flat over $A$. In this case $B$ is finite locally free as an $A$-module and $\omega_{B/A} = \Hom_A(B, A)$ is the dual finite locally free $A$-module.
If $A \to B$ is finite flat, then $B$ is finite locally free as an $A$-module. In this case $\omega_{B/A} = \Hom_A(B, A)$ is the dual finite locally free $A$-module and formation of this module commutes with arbitrary base change which proves the lemma in this case. In the next paragraph we reduce the general (quasi-finite flat) case to the finite flat case just discussed. \medskip\noindent Let $\mathfrak q_1 \subset B_1$ be a prime. We will show that the localization of the map at the prime $\mathfrak q_1$ is an isomorphism, which suffices by Algebra, Lemma \ref{algebra-lemma-characterize-zero-local}. Let $\mathfrak q \subset B$ and $\mathfrak p \subset A$ be the prime ideals lying under $\mathfrak q_1$. By Algebra, Lemma \ref{algebra-lemma-etale-makes-quasi-finite-finite-one-prime} we can find an \'etale ring map $A \to A'$ and a prime ideal $\mathfrak p' \subset A'$ lying over $\mathfrak p$ such that $\kappa(\mathfrak p') = \kappa(\mathfrak p)$ and such that $$ B' = B \otimes_A A' = C \times D $$ with $A' \to C$ finite and such that the unique prime $\mathfrak q'$ of $B \otimes_A A'$ lying over $\mathfrak q$ and $\mathfrak p'$ corresponds to a prime of $C$. Set $A'_1 = A' \otimes_A A_1$ and consider the base change maps (\ref{equation-bc-dualizing}) for the ring maps $A \to A' \to A'_1$ and $A \to A_1 \to A'_1$ as in the diagram $$ \xymatrix{ \omega_{B'/A'} \otimes_{B'} B'_1 \ar[r] & \omega_{B'_1/A'_1} \\ \omega_{B/A} \otimes_B B'_1 \ar[r] \ar[u] & \omega_{B_1/A_1} \otimes_{B_1} B'_1 \ar[u] } $$ where $B' = B \otimes_A A'$, $B_1 = B \otimes_A A_1$, and $B_1' = B \otimes_A (A' \otimes_A A_1)$. By Lemma \ref{lemma-bc-map-dualizing} the diagram commutes. By Lemma \ref{lemma-dualizing-flat-base-change} the vertical arrows are isomorphisms. As $B_1 \to B'_1$ is \'etale and hence flat it suffices to prove the top horizontal arrow is an isomorphism after localizing at a prime $\mathfrak q'_1$ of $B'_1$ lying over $\mathfrak q$ (there is such a prime and use Algebra, Lemma \ref{algebra-lemma-local-flat-ff}). Thus we may assume that $B = C \times D$ with $A \to C$ finite and $\mathfrak q$ corresponding to a prime of $C$. In this case the dualizing module $\omega_{B/A}$ decomposes in a similar fashion (Lemma \ref{lemma-dualizing-product}) which reduces the question to the finite flat case $A \to C$ handled above.
Choose a factorization $A \to B' \to B$ where $A \to B'$ is finite and $\Spec(B') \to \Spec(B)$ is an open immersion. Then $\omega_{B/A}^\bullet = \omega_{B'/A}^\bullet \otimes_B^\mathbf{L} B'$ by Dualizing Complexes, Lemmas \ref{dualizing-lemma-composition-shriek-algebraic} and \ref{dualizing-lemma-upper-shriek-localize} and the definition of $\omega_{B/A}^\bullet$. Hence it suffices to show there is an isomorphism when $A \to B$ is finite. In this case we can use Dualizing Complexes, Lemma \ref{dualizing-lemma-upper-shriek-finite} to see that $\omega_{B/A}^\bullet = R\Hom(B, A)$ and hence $H^0(\omega^\bullet_{B/A}) = \Hom_A(B, A)$ as desired.
By Morphisms, Lemma \ref{morphisms-lemma-etale-flat-etale-fibres} it suffices to check that the fibres of $\pi$ are \'etale. Since the construction of the trace pairing commutes with base change we reduce to the following question: Let $k$ be a field and let $A$ be a finite dimensional $k$-algebra. Show that $A$ is \'etale over $k$ if and only if the trace pairing $Q_{A/k} : A \times A \to k$, $(a, b) \mapsto \text{Trace}_{A/k}(ab)$ is nondegenerate. \medskip\noindent Assume $Q_{A/k}$ is nondegenerate. If $a \in A$ is a nilpotent element, then $ab$ is nilpotent for all $b \in A$ and we conclude that $Q_{A/k}(a, -)$ is identically zero. Hence $A$ is reduced. Then we can write $A = K_1 \times \ldots \times K_n$ as a product where each $K_i$ is a field (see Algebra, Lemmas \ref{algebra-lemma-finite-dimensional-algebra}, \ref{algebra-lemma-artinian-finite-length}, and \ref{algebra-lemma-minimal-prime-reduced-ring}). In this case the quadratic space $(A, Q_{A/k})$ is the orthogonal direct sum of the spaces $(K_i, Q_{K_i/k})$. It follows from Fields, Lemma \ref{fields-lemma-separable-trace-pairing} that each $K_i$ is separable over $k$. This means that $A$ is \'etale over $k$ by Algebra, Lemma \ref{algebra-lemma-etale-over-field}. The converse is proved by reading the argument backwards.
Let $\mathfrak q \subset B$ be a prime ideal lying over the prime $\mathfrak p \subset A$. By Algebra, Lemma \ref{algebra-lemma-etale-makes-quasi-finite-finite-one-prime} we can find an \'etale ring map $A \to A_1$ and a prime ideal $\mathfrak p_1 \subset A_1$ lying over $\mathfrak p$ such that $\kappa(\mathfrak p_1) = \kappa(\mathfrak p)$ and such that $$ B_1 = B \otimes_A A_1 = C \times D $$ with $A_1 \to C$ finite and such that the unique prime $\mathfrak q_1$ of $B \otimes_A A_1$ lying over $\mathfrak q$ and $\mathfrak p_1$ corresponds to a prime of $C$. Observe that $\omega_{C/A_1} = \omega_{B/A} \otimes_B C$ (combine Lemmas \ref{lemma-dualizing-flat-base-change} and \ref{lemma-dualizing-product}). Since the collection of ring maps $B \to C$ obtained in this manner is a jointly injective family of flat maps and since the image of $\tau_{B/A}$ in $\omega_{C/A_1}$ is prescribed the uniqueness follows.
Suppose we have $A \to A_1$ with $A_1$ Noetherian and a product decomposition $B \otimes_A A_1 = C \times D$ with $A_1 \to C$ finite. Of course in this case $A_1 \to D$ is also finite. Set $B_1 = B \otimes_A A_1$. Since the construction of traces commutes with base change we see that $\text{Trace}_{B/A}$ maps to $\text{Trace}_{B_1/A_1}$. Thus the proof is finished by noticing that $\text{Trace}_{B_1/A_1} = (\text{Trace}_{C/A_1}, \text{Trace}_{D/A_1})$ under the isomorphism $\omega_{B_1/A_1} = \omega_{C/A_1} \times \omega_{D/A_1}$ of Lemma \ref{lemma-dualizing-product}.
Part (1) is a formal consequence of the definition. \medskip\noindent Statement (2) makes sense because $\omega_{B/R} = \omega_{B/A}$ by Lemma \ref{lemma-localize-dualizing}. Denote $\tau'$ the element $\tau$ but viewed as an element of $\omega_{B/R}$. To see that (2) is true suppose that we have $R \to R_1$ with $R_1$ Noetherian and a product decomposition $B \otimes_R R_1 = C \times D$ with $R_1 \to C$ finite. Then with $A_1 = (R_1)_f$ we see that $B \otimes_A A_1 = C \times D$. Since $R_1 \to C$ is finite, a fortiori $A_1 \to C$ is finite. Hence we can use the defining property of $\tau$ to get the corresponding property of $\tau'$. \medskip\noindent Statement (3) makes sense because $\omega_{B_g/A} = (\omega_{B/A})_g$ by Lemma \ref{lemma-localize-dualizing}. The proof is similar to the proof of (2). Suppose we have $A \to A_1$ with $A_1$ Noetherian and a product decomposition $B_g \otimes_A A_1 = C \times D$ with $A_1 \to C$ finite. Set $B_1 = B \otimes_A A_1$. Then $\Spec(C) \to \Spec(B_1)$ is an open immersion as $B_g \otimes_A A_1 = (B_1)_g$ and the image is closed because $B_1 \to C$ is finite (as $A_1 \to C$ is finite). Thus we see that $B_1 = C \times D_1$ and $D = (D_1)_g$. Then we can use the defining property of $\tau$ to get the corresponding property for the image of $\tau$ in $\omega_{B_g/A}$. \medskip\noindent Statement (4) makes sense because $\omega_{B/A} = \omega_{B_1/A} \times \omega_{B_2/A}$ by Lemma \ref{lemma-dualizing-product}. Suppose we have $A \to A'$ with $A'$ Noetherian and a product decomposition $B \otimes_A A' = C \times D$ with $A' \to C$ finite. Then it is clear that we can refine this product decomposition into  $B \otimes_A A' = C_1 \times C_2 \times D_1 \times D_2$ with $A' \to C_i$ finite such that $B_i \otimes_A A' = C_i \times D_i$. Then we can use the defining property of $\tau$ to get the corresponding property for the image of $\tau$ in $\omega_{B_i/A}$. This uses the obvious fact that $\text{Trace}_{C/A'} = (\text{Trace}_{C_1/A'}, \text{Trace}_{C_2/A'})$ under the decomposition $\omega_{C/A'} = \omega_{C_1/A'} \times \omega_{C_2/A'}$.
Suppose we have $A \to A_1$ with $A_1$ Noetherian and a product decomposition $B \otimes_A A_1 = C \times D$ with $A_1 \to C$ finite. We have to show that the image of $\tau$ in $\omega_{C/A_1}$ is $\text{Trace}_{C/A_1}$. Observe that $g_1, \ldots, g_m$ generate the unit ideal in $B_1 = B \otimes_A A_1$ and that $\tau$ maps to a trace element in $\omega_{(B_1)_{g_i}/A_1}$ by Lemma \ref{lemma-trace-base-change}. Hence we may replace $A$ by $A_1$ and $B$ by $B_1$ to get to the situation as described in the next paragraph. \medskip\noindent Here we assume that $B = C \times D$ with $A \to C$ is finite. Let $\tau_C$ be the image of $\tau$ in $\omega_{C/A}$. We have to prove that $\tau_C = \text{Trace}_{C/A}$ in $\omega_{C/A}$. By the compatibility of trace elements with products (Lemma \ref{lemma-trace-base-change}) we see that $\tau_C$ maps to a trace element in $\omega_{C_{g_i}/A}$. Hence, after replacing $B$ by $C$ we may assume that $A \to B$ is finite flat. \medskip\noindent Assume $A \to B$ is finite flat. In this case $\text{Trace}_{B/A}$ is a trace element by Lemma \ref{lemma-finite-flat-trace}. Hence $\text{Trace}_{B/A}$ maps to a trace element in $\omega_{B_{g_i}/A}$ by Lemma \ref{lemma-trace-base-change}. Since trace elements are unique (Lemma \ref{lemma-trace-unique}) we find that $\text{Trace}_{B/A}$ and $\tau$ map to the same elements in $\omega_{B_{g_i}/A} = (\omega_{B/A})_{g_i}$. As $g_1, \ldots, g_m$ generate the unit ideal of $B$ the map $\omega_{B/A} \to \prod \omega_{B_{g_i}/A}$ is injective and we conclude that $\tau_C = \text{Trace}_{B/A}$ as desired.
Conditions (1) and (2) are equivalent by Lemma \ref{lemma-finite-flat-trace}. Let $\mathfrak m \subset A$. Since $\dim_k(A) < \infty$ it is clear that $A$ has finite length over $A$. Choose a filtration $$ A = I_0 \supset \mathfrak m = I_1 \supset I_2 \supset \ldots I_n = 0 $$ by ideals such that $I_i/I_{i + 1} \cong k'$ as $A$-modules. See Algebra, Lemma \ref{algebra-lemma-simple-pieces} which also shows that $n = \text{length}_A(A)$. If $a \in \mathfrak m$ then $aI_i \subset I_{i + 1}$ and it is immediate that $\text{Trace}_{A/k}(a) = 0$. If $a \not \in \mathfrak m$ with image $\lambda \in k'$, then we conclude $$ \text{Trace}_{A/k}(a) = \sum\nolimits_{i = 0, \ldots, n - 1} \text{Trace}_k(a : I_i/I_{i - 1} \to I_i/I_{i - 1}) = n \text{Trace}_{k'/k}(\lambda) $$ The proof of the lemma is finished by applying Fields, Lemma \ref{fields-lemma-separable-trace-pairing}.
Write $I = \Ker(B \otimes_A B \to B)$ and $I' = \Ker(B' \otimes_A B' \to B')$. As $\Spec(B) \to \Spec(B')$ is an open immersion, it follows that $B = (B \otimes_A B) \otimes_{B' \otimes_A B'} B'$. Thus we see that $I = I'(B \otimes_A B)$. Since $I'$ is finitely generated and $B' \otimes_A B' \to B \otimes_A B$ is flat, we conclude that $J = J'(B \otimes_A B)$, see Algebra, Lemma \ref{algebra-lemma-annihilator-flat-base-change}. Since the $B' \otimes_A B'$-module structure of $J'$ factors through $B' \otimes_A B' \to B'$ we conclude that (1) is true. Part (2) is a consequence of (1).
Because of the construction of the pairing in Remark \ref{remark-construction-pairing} both (1) and (2) reduce to the case where $A \to B$ is finite. Then (1) follows from the fact that the contraction map $\Hom_A(M, A) \otimes_A M \otimes_A M \to M$, $\lambda \otimes m \otimes m' \mapsto \lambda(m)m'$ commuted with base change. To see (2) use that $J = J_1 \times J_2$ is contained in the summands $B_1 \otimes_A B_1$ and $B_2 \otimes_A B_2$ of $B \otimes_A B$.
We first prove this when $A \to B$ is finite and flat. In this case we can localize on $A$ and assume $B$ is finite free as an $A$-module. Let $b_1, \ldots, b_n$ be a basis of $B$ as an $A$-module and denote $b_1^\vee, \ldots, b_n^\vee$ the dual basis of $\omega_{B/A}$. Note that $\sum b_i \otimes c_i \in J$ maps to the element of $\Hom_B(\omega_{B/A}, B)$ which sends $b_i^\vee$ to $c_i$. Suppose $\varphi : \omega_{B/A} \to B$ is $B$-linear. Then we claim that $\xi = \sum b_i \otimes \varphi(b_i^\vee)$ is an element of $J$. Namely, the $B$-linearity of $\varphi$ exactly implies that $(b \otimes 1)\xi = (1 \otimes b)\xi$ for all $b \in B$. Thus our map has an inverse and it is an isomorphism. \medskip\noindent Let $\mathfrak q \subset B$ be a prime lying over $\mathfrak p \subset A$. We will show that the localization $$ J_\mathfrak q \longrightarrow \Hom_B(\omega_B/A, B)_\mathfrak q $$ is an isomorphism. This suffices by Algebra, Lemma \ref{algebra-lemma-characterize-zero-local}. By Algebra, Lemma \ref{algebra-lemma-etale-makes-quasi-finite-finite-one-prime} we can find an \'etale ring map $A \to A'$ and a prime ideal $\mathfrak p' \subset A'$ lying over $\mathfrak p$ such that $\kappa(\mathfrak p') = \kappa(\mathfrak p)$ and such that $$ B' = B \otimes_A A' = C \times D $$ with $A' \to C$ finite and such that the unique prime $\mathfrak q'$ of $B \otimes_A A'$ lying over $\mathfrak q$ and $\mathfrak p'$ corresponds to a prime of $C$. Let $J'$ be the annihilator of $\Ker(B' \otimes_{A'} B' \to B')$. By Lemmas \ref{lemma-dualizing-flat-base-change}, \ref{lemma-noether-different-base-change}, and \ref{lemma-noether-pairing-compatibilities} the map $J' \to \Hom_{B'}(\omega_{B'/A'}, B')$ is gotten by applying the functor $- \otimes_B B'$ to the map $J \to \Hom_B(\omega_{B/A}, B)$. Since $B_\mathfrak q \to B'_{\mathfrak q'}$ is faithfully flat it suffices to prove the result for $(A' \to B', \mathfrak q')$. By Lemmas \ref{lemma-dualizing-product}, \ref{lemma-noether-different-product}, and \ref{lemma-noether-pairing-compatibilities} this reduces us to the case proved in the first paragraph of the proof.