# Flatness of relative canonical bundle

I was wondering if there is any general theorem, which guarantees the flatness of $\omega_{X/B}$ over $B$ for a flat morphism $f : X \to B$ of schemes of finite type over $\mathbb{C}$ with equidimensional fibers. I am specially interested in statements which apply to the case of non-reduced $B$. Here by $\omega_{X/B}$ I mean $h^{-n}(f^! \mathcal{O}_B)$ where $n$ is the relative dimension of $f$ and $h^{-n}$ means the cohomology of the complex at the $-n$-th position.

-

A sufficient condition is that $f:X \rightarrow B$ is flat and locally finite type map between locally noetherian schemes such that its fibers are local complete intersection morphism (see EGA IV$\_4$, 19.2 for relative lci maps), in which case $\omega_{X/B}$ is even a line bundle on $X$ whose formation commutes with any base change on $B$. This covers the case of flat families of semistable curves, for example, and this lci condition on fibers is open on the base.

-
Thanks for the nice answer and for the precise reference. Is it, by any chance, known for the little more general case of Gorenstein morphisms? – Zsolt Patakfalvi Mar 16 '10 at 15:37

It sounds like you may want Exercise 9.7 in Hartshorne's "Residues and Duality". I paraphrase the statement:

Exercise 9.7 (RD): Let $f: X \to B$ be a flat morphism of finite type of locally Noetherian preschemes. Then, $f^!(\mathcal{O}_B)$ has a unique non-zero cohomology sheaf, which is flat over $B$, iff all the fibers of $f$ are Cohen-Macaulay schemes of the right dimension. Moreover $f^!(\mathcal{O}_B)$ is isomorphic to (a shift of) an invertible sheaf (on $X$) iff all the fibers of $f$ are Gorenstein schemes of the right dimension.

In particular, this addresses the case you mention in your comment ($f$ Gorenstein), since then $f^!(\mathcal{O}_Y)$ is locally free on $X$ and, since $f$ is flat, certainly flat over $B$.

[Aside: I believe I learned this reference from Brian's book "Grothendieck Duality and Base Change", which I think also contains a proof of this.]

-
Thanks again, so it seems everything works in the CM case. Now the new question is can we weaken it even more. What about $S_r$. I am specially interested in the $S_2$ case. – Zsolt Patakfalvi Mar 16 '10 at 18:29
Theorem 3.5.1 in my duality book is the reference for a solution to the Exercise 9.7. (When I wrote my original response I wanted to say the CM case is sufficient, but I didn't remember offhand if the flatness of that sheaf over the base also held. So I was lazy and just went with lci, which is certainly somewhat restrictive.) I would guess that assuming just $S_2$ is insufficient, but have no idea on a counterexample. – BCnrd Mar 16 '10 at 21:12