Base change of trace for Gorenstein or Cohen-Macaulay morphisms

This is basically a question of functoriality for base change of CM morphisms.

EDIT: $\text{ }$ Brian Conrad sent me an email explaining the that this is indeed true, and follows from his book. I'll explain this in my case a little later. First I will state the question.

Suppose that $f : X \to V$ is an equidimensional (dimension $d$) finite type (reduced, if it helps) Cohen-Macaulay morphism (flat with Cohen-Macaulay fibers). I'm also happy to assume that $V$ is integral, excellent and has a dualizing complex. Additionally suppose that we have $f' : X' \to V$ another equidimensional (dimension $d$) finite-type (reduced) Cohen-Macaulay morphism that factors through $f$ as below.

$$f' : X' \xrightarrow{\phi} X \to V.$$

Further suppose that $\phi$ is finite (although the question could be asked more generally for proper $\phi$, I'll phrase it for finite $\phi$). If it helps at any point, please feel free to assume that $f$ and $f'$ are Gorenstein morphisms.

Recall that $\omega_{f}[d] = f^! \mathcal{O}_V$ and that by Brian Conrad's book [LINK: Google books][1] we know that both $\omega_f$ and $\omega_{f'}$ are compatible with base change.

I'd like to conclude that the following natural map is also compatible with base change:

$$\phi_* \omega_{f'} \cong R \mathcal{H}om_{O_X}(\phi_* O_{X'}, \omega_f ) \cong \mathcal{H}om_{O_X}(\phi_* O_{X'}, \omega_f ) \to \omega_f$$.
The map can be interpreted as evaluation at 1.

In other words, I'd like to know that the trace map of $\phi$ is compatible with base change. Furthermore, it would be even good enough to prove this in the $f, f'$ Gorenstein morphisms case.

One way to do this would be as follows. If $g : T \to V$ is any other morphism and $f_T : X_T \to T$ and $f_T': X_T' \to T$ are the base changes and $g_X : X_T \to X$ is the projection, is it true that the natural map (denoted [*] below) $$g_X^* \phi_* \omega_{f'} \cong g_X^* \mathcal{H}om_{O_X}(\phi_* O_{X'}, \omega_f ) \to \mathcal{H}om_{O_{X_T}}(\phi_* O_{X_T'}, \omega_{f_T} ) \cong (\phi_T)_* \omega_{f_T'}$$ between abstractly isomorphic sheaves is an isomorphism?

Edit: Brian Conrad pointed out to me that this is already a special case of what is in his Theorem 3.6.1 (assuming I understand everything right). Essentially the point is that in my case everything is finite type, which makes it all much easier.

-

A short answer, if you are willing to upgrade your discussion to a derived category situation. The natural base-change isomorphism of duality $${g'}^* f^! \cong {f'}^! g^*$$ holds under the hypothesis of a "Tor-independent" square. In other words, you may not have $g$ flat, but if $f$ is, it holds. This is the case always if you work with varieties over a field and the map $f$ is the structural morphism. All this is explained in Lipman's Notes on derived functors and Grothendieck duality in SLN 1960. See Theorem 4.4.1 and its corollaries.
Hi Leo, Thanks, I'm more or less willing to upgrade to derived categories (since the things I'm pulling back actually have no interesting cohomology, even after upper shriek), but I thought I'd need some properness for $f$ as well there? This led us to Sasty's paper (which does away with the properness). $$\text{ }$$ But then I was also worried that I actually needed something a little more (ie, factoring that isomorphism through something) which seemed to require unraveling that isomorphism, and I was hoping that there was an easier way. Brian then pointed out that indeed there was! – Karl Schwede Feb 7 '13 at 14:45
Roughly, everything works under the hypothesis that $f$ is proper. But then, using the localization property of "upper shriek" (Verdier: Base change for twisted inverse image of coherent sheaves) by Nagata localization it works on a separated situation. Of course, Sastry has the most general factorization theorem in this setting. – Leo Alonso Feb 7 '13 at 15:55
Hi Leo, I guess I was a little worried about preserving the flatness of $f$ when compactifying (ie, can I compactify while keeping $f$ flat?). Is that known? Or is there some other way to do this? – Karl Schwede Feb 7 '13 at 18:40
@Leo, Karl: Let $f:X\rightarrow Y$ be a finite surjection between 2-dimensional normal local noetherian schemes, with respective closed points $x$ and $y$. Then $U=X-x$ is finite flat over $V=Y-y$ since $U$ and $V$ are Dedekind, so $U\rightarrow Y$ is flat. I claim there is no proper flat $f':X'\rightarrow Y$ containing $U$ as dense open if $f$ isn't flat. Suppose $f'$ exists, so it is finite and ${f'}^{-1}(V)=U$. The normalization of $X'$ is clearly $X$. Clearly $X'$ is R$_1$, and it inherits $S_2$ from $Y$, so $X'$ is normal (i.e., $X'=X$) and hence $X$ is $Y$-flat. QED – user30379 Feb 15 '13 at 3:40