hcju/stacksqa huggingface dataset:
The functor is fully faithful due to the exactness of (\ref{equation-BL-cech-mod-re}) for glueable modules, which tells us exactly that $H^0 \circ \text{Can} = \text{id}$ on the full subcategory of glueable modules. Hence it suffices to check essential surjectivity. That is, we must show that an arbitrary glueing datum $(M', M_1, \alpha_1)$ arises from some glueable $R$-module. \medskip\noindent We first check that the map $\text{d} : M' \oplus M_1 \to (M')_f$ used in the definition of the functor $H^0$ is surjective. Observe that $(x, y) \in M' \oplus M_1$ maps to $\text{d}(x, y) = x/1 - \alpha_1^{-1}(y \otimes 1)$ in $(M')_f$. If $z \in (M')_f$, then we can write $\alpha_1(z) = \sum y_i \otimes g_i$ with $g_i \in R'$ and $y_i \in M_1$. Write $\alpha_1^{-1}(y_i \otimes 1) = y_i'/f^n$ for some $y'_i \in M'$ and $n \geq 0$ (we can pick the same $n$ for all $i$). Write $g_i = a_i + f^n b_i$ with $a_i \in R$ and $b_i \in R'$. Then with $y = \sum a_i y_i \in M_1$ and $x = \sum b_i y'_i \in M'$ we have $\text{d}(x, -y) = z$ as desired. \medskip\noindent Put $M = H^0((M', M_1, \alpha_1)) = \Ker(\text{d})$. We obtain an exact sequence of $R$-modules \begin{equation} \label{equation-define-M} 0 \to M \to M' \oplus M_1 \to (M')_f \to 0. \end{equation} We will prove that the maps $M \to M'$ and $M \to M_1$ induce isomorphisms $M \otimes_R R' \to M'$ and $M \otimes_R R_f \to M_1$. This will imply that $M$ is glueable for $(R \to R', f)$ and gives rise to the original glueing datum. \medskip\noindent Since $f$ is a nonzerodivisor on $M_1$, we have $M[f^\infty] \cong M'[f^\infty]$. This yields an exact sequence \begin{equation} \label{equation-exact-mod-torsion} 0 \to M/M[f^\infty] \to M_1 \to (M')_f/M' \to 0. \end{equation} Since $R \to R_f$ is flat, we may tensor this exact sequence with $R_f$ to deduce that $M \otimes_R R_f = (M/M[f^\infty]) \otimes_R R_f \to M_1$ is an isomorphism. \medskip\noindent By Lemma \ref{lemma-BL3} we have $\text{Tor}_1^R(R', \Coker(M' \to (M')_f)) = 0$. The sequence (\ref{equation-exact-mod-torsion}) thus remains exact upon tensoring over $R$ with $R'$. Using $\alpha_1$ and Lemma \ref{lemma-torsion-completion} the resulting exact sequence can be written as \begin{equation} \label{equation-mod-torsion-sequence} 0 \to (M/M[f^\infty]) \otimes_R R' \to (M')_f \to (M')_f/M' \to 0 \end{equation} This yields an isomorphism $(M/M[f^\infty]) \otimes_R R' \cong M'/M'[f^\infty]$. This implies that in the diagram $$ \xymatrix{ & M[f^\infty] \otimes_R R' \ar[r] \ar[d] & M \otimes_R R'  \ar[r] \ar[d] & (M/M[f^\infty]) \otimes_R R' \ar[r] \ar[d] & 0 \\ 0 \ar[r] & M'[f^\infty] \ar[r] & M' \ar[r] & M'/M'[f^\infty] \ar[r] & 0, } $$ the third vertical arrow is an isomorphism. Since the rows are exact and the first vertical arrow is an isomorphism by Lemma \ref{lemma-torsion-completion} and $M[f^\infty] = M'[f^\infty]$, the five lemma implies that $M \otimes_R R' \to M'$ is an isomorphism. This completes the proof.
We will show that for all $\mathfrak p \subset A$ there is a unique prime $\mathfrak q \subset B$ lying over $\mathfrak p$ and $\kappa(\mathfrak p) = \kappa(\mathfrak q)$. This implies that $B \otimes_A B \to B$ is bijective on spectra as well as surjective and flat. Hence it is an isomorphism for example by the description of pure ideals in Algebra, Lemma \ref{algebra-lemma-pure-open-closed-specializations}. Hence $A \to B$ is a faithfully flat epimorphism of rings. We get $A = B$ by Algebra, Lemma \ref{algebra-lemma-faithfully-flat-epimorphism}. \medskip\noindent Note that the fibre ring $B \otimes_A \kappa(\mathfrak p)$ is a colimit of \'etale extensions of $\kappa(\mathfrak p)$ by Lemmas \ref{lemma-base-change-weakly-etale} and \ref{lemma-absolutely-flat-over-field}. Hence, if there exists more than one prime lying over $\mathfrak p$ or if $\kappa(\mathfrak p) \not = \kappa(\mathfrak q)$ for some $\mathfrak q$, then $B \otimes_A L$ has a nontrivial idempotent for some (separable) algebraic field extension $L \supset \kappa(\mathfrak p)$. \medskip\noindent Let $\kappa(\mathfrak p) \subset L$ be an algebraic field extension. Let $A' \subset L$ be the integral closure of $A/\mathfrak p$ in $L$. By Lemma \ref{lemma-integral-over-henselian} we see that $A'$ is a strictly henselian local ring whose residue field is a purely inseparable extension of the residue field of $A$. Thus $B \otimes_A A'$ is a local ring by Lemma \ref{lemma-local-tensor-with-integral}. On the other hand, $B \otimes_A A'$ is integrally closed in $B \otimes_A L$ by Lemma \ref{lemma-normality-goes-up}. Since $B \otimes_A A'$ is local, it follows that the ring $B \otimes_A L$ does not have nontrivial idempotents which is what we wanted to prove.
By Algebra, Lemma \ref{algebra-lemma-finite-flat-local} we see that $M_\mathfrak p$ is finite free for all prime ideals $\mathfrak p \subset R$. By Algebra, Lemma \ref{algebra-lemma-finite-projective} it suffices to show that the function $\rho_M : \mathfrak p \mapsto \dim_{\kappa(\mathfrak p)} M \otimes_R \kappa(\mathfrak p)$ is locally constant on $\Spec(R)$. Because $M/IM$ is finite projective, this is true on $V(I) \subset \Spec(R)$. Since every closed point of $\Spec(R)$ is in $V(I)$ and since $\rho_M(\mathfrak p) = \rho_M(\mathfrak q)$ whenever $\mathfrak p \subset \mathfrak q \subset R$ are prime ideals, we conclude by an elementary argument on topological spaces which we omit.
Proof of (1). As $P'$ is projective as an $R$-module we may choose a lift $\psi : P' \to P$ of the map $P' \to P'/IP' \xrightarrow{\overline{\varphi}^{-1}} P/IP$. By Nakayama's lemma (Algebra, Lemma \ref{algebra-lemma-NAK}) $\psi \circ \varphi$ and $\varphi \circ \psi$ are surjective. Hence these maps are isomorphisms (Algebra, Lemma \ref{algebra-lemma-fun}). Thus $\varphi$ is an isomorphism. \medskip\noindent Proof of (2). Choose an isomorphism $P/IP \cong P'/IP'$. Since $P$ is projective we can choose a lift $\varphi : P \to P'$ of the map $P \to P/IP \to P'/IP'$. Then $\varphi$ is an isomorphism by (1).
We first show that $g'(M) \cap I^nN \subset g'(I^{n - c}M)$ for $n \geq c$. Let $a$ be an element of $M$ such that $g'(a) \in I^nN$. We want to adjust $a$ by an element of $f'(L)$, i.e, without changing $g'(a)$, so that $a \in I^{n-c}M$. Assume that $a \in I^rM$, where $r < n - c$. Then $$ g(a) = g'(a) + (g - g')(a) \in I^n N + I^{r + c + 1}N = I^{r + c + 1}N. $$ By Artin-Rees for $g$ we have $g(a) \in g(I^{r + 1}M)$. Say $g(a) = g(a_1)$ with $a_1 \in I^{r + 1}M$. Since the sequence $S$ is exact, $a - a_1 \in f(L)$. Accordingly, we write $a = f(b) + a_1$ for some $b \in L$. Then $f(b) = a - a_1 \in I^rM$. Artin-Rees for $f$ shows that if $r \geq c$, we may replace $b$ by an element of $I^{r - c}L$. Then in all cases, $a = f'(b) + a_2$, where $a_2 = (f - f')(b) + a_1 \in I^{r + 1}M$. (Namely, either $c \geq r$ and $(f - f')(b) \in I^{r + 1}M$ by assumption, or $c < r$ and $b \in I^{r - c}$, whence again $(f - f')(b) \in I^{c + 1} I^{r - c} M = I^{r + 1}M$.) So we can adjust $a$ by the element $f'(b) \in f'(L)$ to increase $r$ by $1$. \medskip\noindent In fact, the argument above shows that $(g')^{-1}(I^nN) \subset f'(L) + I^{n - c}M$ for all $n \geq c$. Hence $S'$ is exact because $$ (g')^{-1}(0) = (g')^{-1}(\bigcap I^nN) \subset \bigcap f'(L) + I^{n - c}M = f'(L) $$ as $I$ is contained in the Jacobson radical of $A$, see Algebra, Lemma \ref{algebra-lemma-intersection-powers-ideal-module}.
Set $D = A \times_B C$. There is a commutative diagram $$ \xymatrix{ 0 & B \ar[l] & A \ar[l] & I \ar[l] & 0 \ar[l] \\ 0 & C \ar[l] \ar[u] & D \ar[l] \ar[u] & I \ar[l] \ar[u] & 0 \ar[l] } $$ with exact rows. Choose $y_1, \ldots, y_n \in B$ which are generators for $B$ as a $C$-module. Choose $x_i \in A$ mapping to $y_i$. Then $1, x_1, \ldots, x_n$ are generators for $A$ as a $D$-module. The map $D \to A \times C$ is injective, and the ring $A \times C$ is finite as a $D$-module (because it is the direct sum of the finite $D$-modules $A$ and $C$). Hence the lemma follows from the Artin-Tate lemma (Algebra, Lemma \ref{algebra-lemma-Artin-Tate}).
Follows from Lemma \ref{lemma-fibre-product-finite-type} and induction on the size of $I$. Namely, let $I = I' \amalg \{i_0\}$. Let $P'$ be the ring defined by the diagram of the lemma using $I'$. Then $P'$ is of finite type by induction hypothesis. Finally, $P$ sits in a fibre product diagram $$ \xymatrix{ B_{i_0} & A_{i_0} \ar[l] \\ P' \ar[u] & P \ar[u] \ar[l] & } $$ to which the lemma applies.
The equality $B' = B \times_R R'$ tells us that $$ 0 \to B' \to B \oplus R' \xrightarrow{s, -t} R $$ is an exact sequence of $B'$-modules. We have $B_g = B_h$, $R'_f = R'_h$, and $R_{s(g)} = R_{t(f)} = R_h$ as $B'$-modules. By exactness of localization (Algebra, Proposition \ref{algebra-proposition-localization-exact}) we find that $$ 0 \to B'_h \to B_g \oplus R'_f \xrightarrow{s, -t} R_{s(g)} = R_{t(f)} $$ is an exact sequence. This proves the lemma.
Given an object $(N, M', \varphi)$ of the category $\text{Mod}_B \times_{\text{Mod}_R} \text{Mod}_{R'}$ we set $$ N \times_\varphi M' = \{(n, m') \in N \times M' \mid \varphi(n \otimes 1) = m' \otimes 1\text{ in }M' \otimes_{R'} R\} $$ viewed as a $B'$-module. The adjointness statement is that for a $B'$-module $L'$ and a triple $(N, M', \varphi)$ we have $$ \Hom_{B'}(L', N \times_\varphi M') = \Hom_B(L' \otimes_{B'} B, N) \times_{\Hom_R(L' \otimes_{B'} R, M' \otimes_{R'} R)} \Hom_{R'}(L' \otimes_{B'} R', M') $$ By Algebra, Lemma \ref{algebra-lemma-adjoint-tensor-restrict} the right hand side is equal to $$ \Hom_{B'}(L', N) \times_{\Hom_{B'}(L', M' \otimes_{R'} R)} \Hom_{B'}(L', M') $$ Thus it is clear that for a pair $(g, f')$ of elements of this fibre product we get an $B'$-linear map $L' \to N \times_\varphi M'$, $l' \mapsto (g(l'), f'(l'))$. Conversely, given a $B'$ linear map $g' : L' \to N \times_\varphi M'$ we can set $g$ equal to the composition $L' \to N \times_\varphi M' \to N$ and $f'$ equal to the composition $L' \to N \times_\varphi M' \to M'$. These constructions are mutually inverse to each other and define the desired isomorphism.
Since $B' = B \times_A A'$ we obtain a commutative square of spectra, which induces a continuous map $$ can : \Spec(B) \amalg_{\Spec(A)} \Spec(A') \longrightarrow \Spec(B') $$ as the source is a pushout in the category of topological spaces (which exists by Topology, Section \ref{topology-section-colimits}). \medskip\noindent To show the map $can$ is surjective, let $\mathfrak q' \subset B'$ be a prime ideal. If $\mathfrak q' \cap I = 0$ (here and below we take the liberty of considering $I$ as an ideal of $B'$ as well as an ideal of $A$), then $\mathfrak q'$ corresponds to a prime ideal of $B$ and is in the image. If not, then pick $h \in I \cap \mathfrak q'$. In this case $B_h = A_h = 0$ and the ring map $B'_h \to A'_h$ is an isomorphism, see Lemma \ref{lemma-diagram-localize}. Thus we see that $\mathfrak q'$ corresponds to a unique prime ideal $\mathfrak p' \subset A'$ which meets $I$. \medskip\noindent Since $B' \to B$ is surjective, we see that $can$ is injective on the summand $\Spec(B)$. We have seen above that $\Spec(A') \to \Spec(B')$ is injective on the complement of $V(I) \subset \Spec(A')$. Since $V(I) \subset \Spec(A')$ is exactly the image of $\Spec(A) \to \Spec(A')$ a trivial set theoretic argument shows that $can$ is injective. \medskip\noindent To finish the proof we have to show that $can$ is open. To do this, observe that an open of the pushout is of the form $V \amalg U'$ where $V \subset \Spec(B)$ and $U' \subset \Spec(A')$ are opens whose inverse images in $\Spec(A)$ agree. Let $v \in V$. We can find a $g \in B$ such that $v \in D(g) \subset V$. Let $f \in A$ be the image. Pick $f' \in A'$ mapping to $f$. Then $D(f') \cap U' \cap V(I) = D(f') \cap V(I)$. Hence $V(I) \cap D(f')$ and $D(f') \cap (U')^c$ are disjoint closed subsets of $D(f') = \Spec(A'_{f'})$. Write $(U')^c = V(J)$ for some ideal $J \subset A'$. Since $A'_{f'} \to'_{f'}/IA'_{f'} \times A'_{f'}/J'A'_{f'}$ is surjective by the disjointness just shown, we can find an $a'' \in A'_{f'}$ mapping to $1$ in $A'_{f'}/IA'_{f'}$ and mapping to zero in $A'_{f'}/J'A'_{f'}$. Clearing denominators, we find an element $a' \in J$ mapping to $f^n$ in $A$. Then $D(a'f') \subset U'$. Let $h' = (g^n, a'f') \in B'$. Since $B'_{h'} = B_{g^n} \times_{A_{f^n}} A'_{a'f'}$ by a previously cited lemma, we see that $D(h)$ pulls back to an open neighbourhood of $v$ in the pushout, i.e., the image of $V \amalg U$ contains an open neighbourhood of the image of $v$. We omit the (easier) proof that the same thing is true for $u' \in U'$ with $u' \not \in V(I)$.
The adjointness statement follows from the more general Lemma \ref{lemma-modules}. To prove the final assertion, recall that $B' = B \times_A A'$ and $N' = N \times_{\varphi, M} M'$ and extend these equalities to  $$ \vcenter{ \xymatrix{ A & A' \ar[l] & I \ar[l] \\ B \ar[u] & B' \ar[l] \ar[u] & J \ar[l] \ar[u] } } \quad\text{and}\quad \vcenter{ \xymatrix{ M & M' \ar[l] & K \ar[l] \\ N \ar[u]_\varphi & N' \ar[l] \ar[u] & L \ar[l] \ar[u] } } $$ where $I, J, K, L$ are the kernels of the horizontal maps of the original diagrams. We present the proof as a sequence of observations: \begin{enumerate} \item $K = IM'$ (see statement lemma), \item $B' \to B$ is surjective with kernel $J$ and $J \to I$ is bijective, \item $N' \to N$ is surjective with kernel $L$ and $L \to K$ is bijective, \item $JN' \subset L$, \item $\Im(N \to M)$ generates $M$ as an $A$-module (because $N \otimes_B A = M$), \item $\Im(N' \to M')$ generates $M'$ as an $A'$-module (because it holds modulo $K$ and $L$ maps isomorphically to $K$), \item $JN' = L$ (because $L \cong K = I M'$ is generated by images of elements $x n'$ with $x \in I$ and $n' \in N'$ by the previous statement), \item $N' \otimes_{B'} B = N$ (because $N = N'/L$, $B = B'/J$, and the previous statement), \item there is a map $\gamma : N' \otimes_{B'} A' \to M'$, \item $\gamma$ is surjective (see above), \item the kernel of the composition $N' \otimes_{B'} A' \to M' \to M$  is generated by elements $l \otimes 1$ and $n' \otimes x$ with $l \in K$, $n' \in N'$, $x \in I$ (because $M = N \otimes_B A$ by assumption and because $N' \to N$ and $A' \to A$ are surjective with kernels $L$ and $I$), \item any element of $N' \otimes_{B'} A'$ in the submodule generated by the elements $l \otimes 1$ and $n' \otimes x$ with $l \in L$, $n' \in N'$, $x \in I$ can be written as $l \otimes 1$ for some $l \in L$ (because $J$ maps isomorphically to $I$ we see that $n' \otimes x = n'x \otimes 1$ in $N' \otimes_{B'} A'$; similarly $x n' \otimes a' = n' \otimes xa' = n'(xa') \otimes 1$ in $N' \otimes_{B'} A'$ when $n' \in N'$, $x \in J$ and $a' \in A'$; since we have seen that $JN' = L$ this proves the assertion), \item the kernel of $\gamma$ is zero (because by (10) and (11) any element of the kernel is of the form $l \otimes 1$ with $l \in L$ which is mapped to $l \in K \subset M'$ by $\gamma$). \end{enumerate} This finishes the proof.
As in the proof of Lemma \ref{lemma-module-over-fibre-product} let $J \subset B'$ be the kernel of the map $B' \to B$. Then $L' \otimes_{B'} B = L'/JL'$. Hence to prove surjectivity it suffices to show that elements of the form $(0, z)$ of the fibre product are in the image of the map of the lemma. The kernel of the map $L' \otimes_{B'} A' \to L' \otimes_{B'} A$ is the image of $L' \otimes_{B'} I \to L' \otimes_{B'} A'$. Since the map $J \to I$ induced by $B' \to A'$ is an isomorphism the composition $$ L' \otimes_{B'} J \to L' \to (L' \otimes_{B'} B) \times_{(L' \otimes_{B'} A)} (L' \otimes_{B'} A') $$ induces a surjection of $L' \otimes_{B'} J$ onto the set of elements of the form $(0, z)$. To see the map is not injective in general we present a simple example. Namely, take a field $k$, set $B' = k[x, y]/(xy)$, $A' = B'/(x)$, $B = B'/(y)$, $A = B'/(x, y)$ and $L' = B'/(x - y)$. In that case the class of $x$ in $L'$ is nonzero but is mapped to zero under the displayed arrow.
We will use the results of Lemma \ref{lemma-module-over-fibre-product} without further mention. Choose generators $y_1, \ldots, y_r$ of $N$ over $B$ and generators $x_1, \ldots, x_s$ of $M'$ over $A'$. Using that $N = N' \otimes_{B'} B$ and $B' \to B$ is surjective we can find $u_1, \ldots, u_r \in N'$ mapping to $y_1, \ldots, y_r$ in $N$. Using that $M' = N' \otimes_{B'} A'$ we can find $v_1, \ldots, v_t \in N'$ such that $x_i = \sum v_j \otimes a'_{ij}$ for some $a'_{ij} \in A'$. In particular we see that the images $\overline{v}_j \in M'$ of the $v_j$ generate $M'$ over $A'$. We claim that $u_1, \ldots, u_r, v_1, \ldots, v_t$ generate $N'$ as a $B'$-module. Namely, pick $\xi \in N'$. We first choose $b'_1, \ldots, b'_r \in B'$ such that $\xi$ and $\sum b'_i u_i$ map to the same element of $N$. This is possible because $B' \to B$ is surjective and $y_1, \ldots, y_r$ generate $N$ over $B$. The difference $\xi - \sum b'_i u_i$ is of the form $(0, \theta)$ for some $\theta$ in $IM'$. Say $\theta$ is $\sum t_j\overline{v}_j$ with $t_j \in I$. As $J = \Ker(B' \to B)$ maps isomorphically to $I$ we can choose $s_j \in J \subset B'$ mapping to $t_j$. Because $N' = N \times_{\varphi, M} M'$ it follows that $\xi = \sum b'_i u_i + \sum s_j v_j$ as desired.
In the proof we will use Lemma \ref{lemma-module-over-fibre-product} without further mention. \medskip\noindent Proof of (1). Set $J = \Ker(B' \to B)$. This is an ideal of $B'$ mapping isomorphically to $I = \Ker(A' \to A)$. Let $\mathfrak b' \subset B'$ be an ideal. We have to show that $\mathfrak b' \otimes_{B'} N' \to N'$ is injective, see Algebra, Lemma \ref{algebra-lemma-flat}. We know that $$ \mathfrak b'/(\mathfrak b' \cap J) \otimes_{B'} N' = \mathfrak b'/(\mathfrak b' \cap J) \otimes_B N \to N $$ is injective as $N$ is flat over $B$. As $\mathfrak b' \cap J \to \mathfrak b' \to \mathfrak b'/(\mathfrak b' \cap J) \to 0$ is exact, we conclude that it suffices to show that $(\mathfrak b' \cap J) \otimes_{B'} N' \to N'$ is injective. Thus we may assume that $\mathfrak b' \subset J$. Next, since $J \to I$ is an isomorphism we have $$ J \otimes_{B'} N' = I \otimes_{A'} A' \otimes_{B'} N' = I \otimes_{A'} M' $$ which maps injectively into $M'$ as $M'$ is a flat $A'$-module. Hence $J \otimes_{B'} N' \to N'$ is injective and we conclude that $\text{Tor}_1^{B'}(B'/J, N') = 0$, see Algebra, Remark \ref{algebra-remark-Tor-ring-mod-ideal}. Thus we may apply Algebra, Lemma \ref{algebra-lemma-what-does-it-mean} to $N'$ over $B'$ and the ideal $J$. Going back to our ideal $\mathfrak b' \subset J$, let $\mathfrak b' \subset \mathfrak b'' \subset J$ be the smallest ideal whose image in $I$ is an $A'$-submodule of $I$. In other words, we have $\mathfrak b'' = A' \mathfrak b'$ if we view $J = I$ as $A'$-module. Then $\mathfrak b''/\mathfrak b'$ is killed by $J$ and we get a short exact sequence $$ 0 \to \mathfrak b' \otimes_{B'} N' \to \mathfrak b'' \otimes_{B'} N' \to \mathfrak b''/\mathfrak b' \otimes_{B'} N' \to 0 $$ by the vanishing of $\text{Tor}_1^{B'}(\mathfrak b''/\mathfrak b', N')$ we get from the application of the lemma. Thus we may replace $\mathfrak b'$ by $\mathfrak b''$. In particular we may assume $\mathfrak b'$ is an $A'$-module and maps to an ideal of $A'$. Then $$ \mathfrak b' \otimes_{B'} N' = \mathfrak b' \otimes_{A'} A' \otimes_{B'} N' = \mathfrak b' \otimes_{A'} M' $$ This tensor product maps injectively into $M'$ by our assumption that $M'$ is flat over $A'$. We conclude that $\mathfrak b' \otimes_{B'} N' \to N' \to M'$ is injective and hence the first map is injective as desired. \medskip\noindent Proof of (2). This follows by tensoring the short exact sequence $0 \to B' \to B \oplus A' \to A \to 0$ with $L'$ over $B'$. \medskip\noindent Proof of (3). Immediate consequence of (1) and (2).
Recall that a module is finite projective if and only if it is finitely presented and flat, see Algebra, Lemma \ref{algebra-lemma-finite-projective}. Using Lemmas \ref{lemma-flat-module-over-fibre-product} and \ref{lemma-finite-module-over-fibre-product} we reduce to showing that $N' = N \times_{\varphi, M} M'$ is a $B'$-module of finite presentation if $N$ finite projective over $B$ and $M'$ finite projective over $A'$. \medskip\noindent By Lemma \ref{lemma-finite-module-over-fibre-product} the module $N'$ is finite over $B'$. Choose a surjection $(B')^{\oplus n} \to N'$ with kernel $K'$. By base change we obtain maps $B^{\oplus n} \to N$, $(A')^{\oplus n} \to M'$, and $A^{\oplus n} \to M$ with kernels $K_B$, $K_{A'}$, and $K_A$. There is a canonical map $$ K' \longrightarrow K_B \times_{K_A} K_{A'} $$ On the other hand, since $N' = N \times_{\varphi, M} M'$ and $B' = B \times_A A'$ there is also a canonical map $K_B \times_{K_A} K_{A'} \to K'$ inverse to the displayed arrow. Hence the displayed map is an isomorphism. By Algebra, Lemma \ref{algebra-lemma-extension} the modules $K_B$ and $K_{A'}$ are finite. We conclude from Lemma \ref{lemma-finite-module-over-fibre-product} that $K'$ is a finite $B'$-module provided that $K_B \to K_A$ and $K_{A'} \to K_A$ induce isomorphisms $K_B \otimes_B A = K_A = K_{A'} \otimes_{A'} A$. This is true because the flatness assumptions implies the sequences $$ 0 \to K_B \to B^{\oplus n} \to N \to 0 \quad\text{and}\quad 0 \to K_{A'} \to (A')^{\oplus n} \to M' \to 0 $$ stay exact upon tensoring, see Algebra, Lemma \ref{algebra-lemma-flat-tor-zero}.
The adjointness statement follows from the more general Lemma \ref{lemma-modules}. The final assertion follows from the corresponding assertion of Lemma \ref{lemma-module-over-fibre-product} because $N' \otimes_{D'} D = N' \otimes_{D'} D' \otimes_{B'} B = N' \otimes_{B'} B$ and $N' \otimes_{D'} C' = N' \otimes_{D'} D' \otimes_{B'} A' = N' \otimes_{B'} A'$.
Recall that $D' \to D \times_C C'$ is surjective by Lemma \ref{lemma-module-over-fibre-product-bis}. Observe that $N' = N \times_{\varphi, M} M'$ is a module over $D \times_C C'$. We can apply Lemma \ref{lemma-finite-module-over-fibre-product} to the data $C, C', D, D', IC', M', M, N, \varphi$ to see that $N' = N \times_{\varphi, M} M'$ is finite over $D \times_C C'$. Thus it is finite over $D'$.
Part (1) follows from part (1) of Lemma \ref{lemma-flat-module-over-fibre-product}. \medskip\noindent Part (2) follows from part (2) of Lemma \ref{lemma-flat-module-over-fibre-product} using that $L' \otimes_{D'} D = L' \otimes_{B'} B$, $L' \otimes_{D'} C' = L' \otimes_{B'} A'$, and $L' \otimes_{D'} C = L' \otimes_{B'} A$, see discussion in Situation \ref{situation-relative-module-over-fibre-product}. \medskip\noindent Part (3) is an immediate consequence of (1) and (2).