# Codimension of points in fibered products

This is a question about a proof in Hartshorne, but let me try to formulate it without reference to Hartshorne.

Let $X$ be a noetherian scheme (which is also integral, separated and regular in codimension one, but I doubt these are important conditions). Let $x$ be a point in $X\times \mathbb A^1$ (fibered product) of codimension $1$. Let $\pi$ be the canonical projection $X\times \mathbb A^1 \to X$. Why does the point $\pi\left(x\right)\in X$ have codimension $\leq 1$ ?

This is tacitly used by Hartshorne in "Algebraic Geometry", proof of Proposition 6.6, Chapter II. (In Hartshorne's language, this is the claim that every point of $X\times \mathbb A^1$ of codimension $1$ is either type 1 or type 2.)

I know that $\pi$ is surjective on the level of sets, but not sure whether this is enough. Maybe there is a nice definition of codimension that does not rely on irreducibility? (I feel that such a definition would make working with codimension easier.)

Generally, what kind of maps in algebraic geometry are known to not increase codimension of points? Is there some type of scheme maps (proper, finite, closed, etc.) that always has this property?

[Full disclosure: This is related to my homework (exercise 6.1 in Chapter II), where I have to do something similar for $X\times \mathbb P^1$; but I can reduce this to the $\mathbb A^1$ case and take the proof of Proposition 6.6 for granted. So you are not helping me cheat; you are preventing me from doing so.]

-
The morphism pi is flat with fibres of dimension 1. Therefore, the point pi(x) has codimension less or equal to 1 by Theorem 4.3.12 in Liu's book on algebraic geometry. The formula I mention can probably also be found in Hartshorne's book Chapter 3.9. A quick look shows it is Proposition III.9.5. Also, I used that the codimension of a point equals the Krull dimension of its local ring. –  Ari Nov 9 '11 at 20:40
If I recall correctly, this comes down to commutative algebra facts (because it would be weird to rely on geometric facts from Chapter 3) Without having the references handy, I think it's Section 10.2 of Eisenbud's book or the last few exercises of Atiyah and Macdonald. –  Daniel Pomerleano Nov 9 '11 at 20:53
Not to say that the commutative algebra isn't roughly the same as what Ariyan is quoting. –  Daniel Pomerleano Nov 9 '11 at 20:55
(just a retag..) –  Artie Prendergast-Smith Nov 9 '11 at 21:38

Suppose that the codimension of $\pi(x)$ is at least two; then there exist a chain of closed irreducible subsets $V_0 \subset V_1 \subset V_2$ containing $\pi(x)$ (the inclusions are proper). The inverse image of this chain in $\mathbb A^1_X$ forms a chain of closed irreducible subsets of length 2, which implies that the codimension of $x$ is at least 2.
: Question: why are the inverse images irreducible? Because the inverse image of $V \subseteq X$ in $\mathbb A^1_X$ is $\mathbb A^1_V$, and if $V$ is irreducible so is $\mathbb A^1_V$. This is a simple exercise, using two facts: the fibers of the projection $\mathbb A^1_V \to V$ are irreducible, and the projection $\mathbb A^1_V \to V$ is open. Now, let me anticipate the next question: why is the projection $\mathbb A^1_V \to V$ open? One can invoke fancy theorems, but it is easy to see. It's a local problem on $V$, so you may assume that $V$ is affine, say $V = \mathop{\rm Spec}R$. Let $U \subseteq \mathbb A^1_R$ be an open subset. Let $\{f_i\}$ be a bunch of polynomials in $R[x]$ whose zero locus is the complement of $U$ is $\mathbb A^1_R$. Then the image of $U$ is the complement of the closed subset of $V$ defined by the coefficients of the $f_i$.