commutativity of restriction and Gysin morphisms in a cartesian square Let $X, Y, Z$ be compact topological manifolds $f: Y \to X, g: Z \to X$ be embeddings of submanifolds meeting transversely and let $W = Y \times_X Z$:
$$
\begin{array}{ccc}
    Y & \to^f & X \\
    \uparrow^G & & \uparrow^g\\
    W & \to^F & Z \\
\end{array}
$$
My question is: How does one show that the two morphisms $F_! \circ G^*$ and $g^*
\circ f_!$ from $H^*(Y, \mathbb Q)$ to $H^*(Z, \mathbb Q)$ coincide?
Here $F_!, f_!$ are Gysin morphisms; let us not concern ourselves with degree shift for brevity.
Using the natural morphisms ${\mathbb Q}_Y \to G_*{\mathbb Q}_W$ and ${\mathbb Q}_W \to RF^!{\mathbb Q}_Z$ and adjunction the first morphism can be represented as the composition of the following morphisms
$$
RHom_Y({\mathbb Q}_Y, {\mathbb Q}_Y) \to RHom_Y({\mathbb Q}_Y, G_* {\mathbb Q}_W) \cong RHom_W(G^*{\mathbb Q}_Y,{\mathbb Q}_W) \cong RHom_W({\mathbb Q}_W,{\mathbb Q}_W) \to RHom_W({\mathbb Q}_W, RF^!{\mathbb Q}_Z) \cong RHom_Z(RF_! {\mathbb Q}_W, {\mathbb Q}_Z) \cong RHom_Z({\mathbb Q}_Z, {\mathbb Q}_Z) 
$$
and using the natural morphisms  ${\mathbb Q}_Y \to Rf^!{\mathbb Q}_X$ and  ${\mathbb Q}_X \to g_*{\mathbb Q}_Z$  the second morphism can be represented as the composition of
$$
RHom_Y({\mathbb Q}_Y, {\mathbb Q}_Y) \to RHom_Y({\mathbb Q}_Y, Rf^!{\mathbb Q}_X) \cong RHom_X(Rf_!{\mathbb Q}_Y, {\mathbb Q}_X) \cong RHom_X({\mathbb Q}_X, {\mathbb Q}_X) \to RHom_X({\mathbb Q}_X, g_*{\mathbb Q}_Z) \cong RHom_Z(g^*{\mathbb Q}_X, {\mathbb Q}_Z) \cong RHom_Z({\mathbb Q}_Z, {\mathbb Q}_Z)
$$
The base change theorem (Iversen, "Cohomology of sheaves" VII.2.6)
gives an isomorphism of the corresponding functors, i.e. $RF_! \circ
G^* \mathcal F \cong g^* \circ Rf_!  \mathcal F$ functorially in the object $\mathcal F$ in the derived category. I am not sure how one aplies this statement about functors to deduce the statement about morphisms on cohomology.
 A: One way to see this is to use the definition of the Gysin map via Thom isomorphisms. Then (at least in this simplest case where everything is an embedding) the statement reduces to the fact that Thom isomorphisms are natural for pullbacks of bundles.
To explain what I mean, let me give one possible definition of the Gysin map $f_!:H^*(Y)\to H^{*+k}(X)$ associated to the embedding $f:Y\hookrightarrow X$ of codimension $k$. Let $V\subseteq X$ be a normal tubular neighbourhood of $Y$ in $X$ endowed with a Riemannian metric. Then we can identify $f_!$ with the composition
$$
H^*(Y)\cong H^{*+k}(D(V),S(V))\cong \tilde{H}^{*+k}(Th(V))\to \tilde{H}^{*+k}(X_+)\cong H^{*+k}(X),
$$
where $D(V)$, $S(V)$ and $Th(V)=D(V)/S(V)$ are the disc bundle, sphere bundle and Thom space of $V$ respectively, the first isomorphism is the Thom isomorphism for $V$, and the only non-isomorphism is induced by the Pontryagin-Thom collapse map from the one-point compactification of $X$ to the Thom space of $V$. (Of all the viewpoints on Gysin maps espoused at How should one think about pushforward in cohomology?, this is closest to Tilman's. By the way, Algori's answer there seems to be related to your sheaf-theoretic approach.)
Now since the normal bundle of $F: W\hookrightarrow Z$ is the pullback of the normal bundle of $f$ under $G:W\to Y$, by choosing compatible Riemannian metrics we get a commuting square
$\require{AMScd}$
\begin{CD}
   H^*(Y) @>>> H^{*+k}(D(V),S(V))\\
    @V G^* V V @VV\bar{G}^*V\\
   H^*(W) @>>> H^{*+k}(D(U),S(U)) 
\end{CD}
for some normal tubular neighbourhood $U$ of $W$ in $Z$. Then it's a hop, skip and a jump to extend this diagram to get the full statement.
All of this generalises to proper maps oriented with respect to whatever cohomology theory you're using.
Edit (to give more details): To finish the proof we have to check that the following diagram commutes, where the compositions along the rows are the Gysin maps $f_!$ and $F_!$:
\begin{CD}
   H^*(Y) @>>> \tilde{H}^{*+k}(Th(V)) @>>>\tilde{H}^{*+k}(X_+)\\
    @V G^* V V @VVTh(\bar{G})^*V  @VVg_+^* V\\
   H^*(W) @>>> \tilde{H}^{*+k}(Th(U)) @>>> \tilde{H}^{*+k}(Z_+)
\end{CD}
The left hand square commutes by naturality of the Thom Isomorphism (this is a well-known fact which should be stated in Algebraic Topology texts - the statement at least is in tom Dieck's recent book). I claim that we can choose $U$ so that the map $\overline{G}:U\to V$ is the restriction $g|_U$ on the nose, which makes evident the commutativity of the diagram of pointed spaces
\begin{CD}
   Th(U) @<<< Z_+ \\
    @V Th(\overline{G})VV @VVg_+ V\\
   Th(V) @<<< X_+ 
\end{CD}
involving the Pontryagin-Thom collapse maps.
A: Let me sketch how I would do it in the six functor formalism. Let us consider slightly more generally a cartesian square of spaces
$$
\begin{array}{ccc}
    Y & \to^f & X \\
    \uparrow^G & & \uparrow^g\\
    W & \to^F & Z \\
\end{array}
$$
in which:

*

*$f$ is proper

*we have fixed an isomorphism $f^! \mathbf Z = \mathbf Z[d]$ for some $d$ (i.e. $f$ is oriented)

*the map $G^\ast f^! \to F^! g^\ast$, obtained as the mate of the inverse of $g^\ast f_!\stackrel \sim\to F_!G^\ast $, is an isomorphism (transversality). In particular $F$ is also oriented.

We have a commutative diagram of natural transformations between endofunctors of the derived category $D(X)$ (all functors derived from now on)
$$
\begin{array}{ccc}
    f_!f^! & \to & \mathrm{id} \\
    \downarrow & & \downarrow\\
    g_\ast g^\ast f_!f^! & \to & g_\ast g^\ast \\
\end{array}
$$
and I claim that if we apply this diagram to the unit object $\mathbf Z$ and take global sections then we obtain a commuting diagram
$$
\begin{array}{ccc}
    H(Y)[d] & \to & H(X) \\
    \downarrow & & \downarrow\\
    H(W)[d] & \to & H(Z) \\
\end{array}
$$
where the vertical maps are pullback in cohomology and horizontal are Gysin maps. The point is that using base change ($g^\ast f_! = F_! G^\ast$), transversality ($G^\ast f^! = F^! g^\ast$), and properness+commutativity (in the form $f_!G_\ast = g_\ast F_!$) it follows that
$$ f_! G_\ast G^\ast f^! \cong g_\ast g^\ast f_!f^! \cong g_\ast F_!F^! g^\ast $$
where the first expression makes clear that the left vertical map is pullback in cohomology, the second makes clear commutativity of the square above, third makes clear that the lower horizontal map is the Gysin map.
What is needed to finish the proof is to check that the isomorphisms above actually make the diagrams commute. So, first of all, both sides of
$$f_!G_\ast G^\ast \cong g_\ast g^\ast f_!$$
receive a natural transformation from $f_!$, and one must check that the obvious triangle commutes. This means that we need a stronger statement than just base change in the form of the existence of some isomorphism $F_!G^\ast \cong g^\ast f_!$, we want more specifically that the map $g^\ast f_! \to F_! G^\ast$ obtained as the mate of $ f_! G_\ast\stackrel \sim \to g_\ast F_! $ is an isomorphism.
Similarly both sides of
$$ g^\ast f_!f^! \cong F_!F^! g^\ast $$
admit a natural transformation to $g^\ast$, and again one should check that the triangle commutes, and again it is because the transversality and base change isomorphisms are obtained as mates.
