# divisors on relative projective space

Let $X$ be a separated irreducible variety which is regular in codimension $1$ (I want to talk about Weil divisors), and write $\mathbb{P}^n_X = \mathbb{P}^n_k \times X$ for the projective space over $X$. Now if $Y \subset \mathbb{P}^n_X$ is a prime Weil divisor, i.e. an irreducible closed subvariety of codimension $1$, we can consider the generic fiber $Y_K$ (here $K$ is the function field of $X$).

Since closed embeddings are stable under base change, $Y_K$ is a closed subscheme of $\mathbb{P}^n_K$, and clearly $Y_K \neq \varnothing$ if and only if the projection of $Y$ to $X$ is dense. My question: in this case ($Y_K \neq \varnothing$), can we conclude that $Y_K$ is an integral subvariety of $\mathbb{P}^n_K$ of codimension $1$? Hopefully this is true, since then we will have a well-defined degree map $\text{Pic } \mathbb{P}^n_X \to \mathbb{Z}$.

Edit: Maybe I should be asking a more general question: if $Y \to X$ is a dominant morphism of (separated, if necessary) irreducible varieties and $K$ denotes the function field of $X$, is $Y_K = Y \times_X \text{Spec } K$ an irreducible variety over $K$? The codimension $1$ assertion seems easier, since it is local, but I don't know a good criterion for irreducibility.

-
What about $Y_K$ being reduced? This seems to be wrong in general (but I haven't given it much thought). –  Martin Brandenburg May 29 '12 at 19:15

First the local rings of $Y_K$ are localizations of local rings of $Y$ (can replace $X$ by an affine dense open subvariety, then $K$ is a localization of $O(X)$), so $Y_K$ is locally integral.
Second, the generic point of $Y$ belongs to $Y_K$, so it is also the generic point of $Y_K$. This implies that $Y_K$ is irreducible.
Edit Codimension of $Y_K$. Let $d=\dim X$. Then $\dim Y=n+d-1$, and we have $$\dim Y_K=\dim Y - \dim X=n-1$$ (dimension formula for irreducible algebraic varieties). So $Y_K$ is of codimension $1$ in $\mathbb P^n_K$.
What about the codimension $1$ question? –  Justin Campbell May 29 '12 at 22:41