Theorem 37.33.8 (Theorem of the cube). Let $S$ be a scheme. Let $X$, $Y$, and $Z$ be schemes over $S$. Let $x : S \to X$ and $y : S \to Y$ be sections of the structure morphisms. Let $\mathcal{L}$ be an invertible module on $X \times _ S Y \times _ S Z$. If

1. $X \to S$ and $Y \to S$ are flat, proper morphisms of finite presentation with geometrically integral fibres,

2. the pullbacks of $\mathcal{L}$ by $x \times \text{id}_ Y \times \text{id}_ Z$ and $\text{id}_ X \times y \times \text{id}_ Z$ are trivial over $Y \times _ S Z$ and $X \times _ S Z$,

3. there is a point $z \in Z$ such that $\mathcal{L}$ restricted to $X \times _ S Y \times _ S z$ is trivial, and

4. $Z$ is connected,

then $\mathcal{L}$ is trivial.

Proof. Observe that the morphism $X \times _ S Y \to S$ is a flat, proper morphism of finite presentation whose geometrically integral fibres (see Varieties, Lemmas 33.9.2, 33.8.4, and 33.6.7 for the statement about the fibres). By Derived Categories of Schemes, Lemma 36.32.6 we see that the pushforward of the structure sheaf by $X \to S$, $Y \to S$, or $X \times _ S Y \to S$ is the structure sheaf of $S$ and the same remains true after any base change. Thus we may apply Lemma 37.33.1 to the morphism

$p : X \times _ S Y \times _ S Z \longrightarrow Z$

and the invertible module $\mathcal{L}$ to get a “universal” locally closed subscheme $Z' \subset Z$ such that $\mathcal{L}|_{X \times _ S Y \times _ S Z'}$ is the pullback of an invertible module $\mathcal{N}$ on $Z'$. The existence of $z$ shows that $Z'$ is nonempty. By Lemma 37.33.4 we see that $Z' \subset Z$ is a closed subscheme. Let $z' \in Z'$ be a point. Observe that we may write $p$ as the product morphism

$(X \times _ S Z) \times _ Z (Y \times _ S Z) \longrightarrow Z$

Hence we may apply Lemma 37.33.7 to the morphism $p$, the point $z'$, and the sections $\sigma : Z \to X \times _ S Z$ and $\tau : Z \to Y \times _ S Z$ given by $x$ and $y$. We conclude that $Z'$ is open. Hence $Z' = Z$ and $\mathcal{L} = p^*\mathcal{N}$ for some invertible module $\mathcal{N}$ on $Z$. Pulling back via $x \times y \times \text{id}_ Z : Z \to X \times _ S Y \times _ S Z$ we obtain on the one hand $\mathcal{N}$ and on the other hand we obtain the trivial invertible module by assumption (2). Thus $\mathcal{N} = \mathcal{O}_ Z$ and the proof is complete. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).