Solution (source code)

= Solution

The <dimension of an algebraic set> is the supremum of lengths of strict chains of nonempty <irreducible closed subsets>. It is the maximum of the dimensions of the <irreducible components>. On an <affine variety> $X=\operatorname{Spec}A$, it equals the <Krull dimension> of $A$; if $X$ is irreducible, <Noether normalization> identifies this with the <transcendence degree> of its <function field> over $k$. Nonempty <Zariski-open subsets> of an irreducible <algebraic variety> have the same dimension, so the definition is compatible with affine charts and with <birational maps>. In particular, $\dim\mathbb A^n=\dim\mathbb P^n=n$ and $\dim(X\times Y)=\dim X+\dim Y$ for irreducible <algebraic varieties>.

The <fiber dimension theorem> says that a dominant <morphism of algebraic varieties> $f:X\to Y$ between irreducible <algebraic varieties> has generic fibre dimension
$$
r=\dim X-\dim Y.
$$
Every <irreducible component> of every nonempty fibre over a closed point has dimension at least $r$. There is a nonempty <Zariski-open subset> of $Y$ on which the fibres are nonempty and are <equidimensional algebraic varieties> of dimension $r$. Dominance is required; for a general <morphism of algebraic varieties>, replace $Y$ by the closure of its image. This gives the <dimension of image of a morphism> formula.

For the generic fibre, the formula is the additivity of <transcendence degree> in the tower $k\subset k(Y)\subset k(X)$. The lower bound on closed fibres comes from cutting by at most $\dim Y$ local parameters after a finite <Noether normalization> of an affine target chart: the <principal hypersurface dimension lemma> drops dimension by at most one per equation, and the finite normalization fibre separates the finitely many target points. For the generic upper bound, take finitely many affine source charts and apply <Noether normalization> to each coordinate ring over $k(Y)$. Clearing denominators in $k[Y]$ makes each chart finite over $\mathbb A^r$ relative to a suitable open target chart. Its fibres have dimension at most $r$. Intersecting these finitely many target opens and using the lower bound gives <generic equidimensionality of fibres>.

The <upper semicontinuity of local fibre dimension> is a statement on the source: for a finite-type <morphism of schemes>, the points $x$ satisfying $\dim_xX_{f(x)}\le d$ form an open set. For a <proper morphism>, the maximum fibre dimension is upper semicontinuous on the target as well. The properness qualification matters; one should not assert the latter for every finite-type <morphism of schemes>.

A first application is dimension counting for <plane sections> and intersections. On an irreducible <affine variety>, imposing $q$ <polynomial> equations gives each nonempty component <algebraic codimension> at most $q$, by repeated <principal ideal theorem>. On a <smooth variety> this underlies the <intersection dimension bound on a smooth variety>. A second application is to images: if a <morphism of algebraic varieties> has finite nonempty fibres, its image closure has the same dimension as the source. If it is also <proper>, that image is closed. Thus an <isolated fibre point forces dominance in equal dimensions> when the irreducible source and target have equal dimension.

For the cubic-surface application, <projective lines> in $\mathbb P^3$ form the <Grassmannian> $G=\operatorname{Gr}(2,4)$ of dimension four. Cubic forms form $\mathbb P^{19}$, since there are $\binom63=20$ degree-three <monomials> in four variables. The <cubic surface line incidence variety>
$$
I=\{(L,[F])\in G\times\mathbb P^{19}:F|_L=0\}
$$
has fibre $\mathbb P^{15}$ over every $L$: restricting a cubic to a <projective line> gives four independently prescribable coefficients. It is therefore an irreducible <projective-space bundle> of dimension $4+15=19$. The other projection $\pi:I\to\mathbb P^{19}$ is a <proper morphism>, so its image $Z$ is closed and irreducible.

To show $Z=\mathbb P^{19}$, dimension counting alone is not enough; exhibit a fibre with an isolated point. Take
$$
F_0=x_0^2x_2+x_1^2x_3,\qquad L_0=\{x_2=x_3=0\}.
$$
A nearby <projective line> is the graph $x_2=ax_0+bx_1$, $x_3=cx_0+dx_1$. Restriction gives
$$
F_0|_L=ax_0^3+bx_0^2x_1+cx_0x_1^2+dx_1^3.
$$
It vanishes only when $a=b=c=d=0$. Thus $L_0$ is an isolated reduced point of the fibre. Applying the lower bound in the <fiber dimension theorem> to $I\to Z$ gives $0\ge19-\dim Z$. Since $Z\subseteq\mathbb P^{19}$, its dimension is exactly 19, and closedness forces $Z=\mathbb P^{19}$. This is the <incidence proof that a cubic surface contains a line>. The auxiliary cubic $F_0$ need not be smooth: the argument proves existence for every cubic form, and hence in particular for every <smooth cubic surface>.