Let $f\colon X\to \mathbb{A}^n\_{\mathbb{C}}$ be a morphism of $\mathbb{C}$-schemes. Suppose $f$ is (a) separated, (b) flat, (c) locally of finite type, (d) all fibers are quasi-compact, is $X$ necessarily quasi-compact?



fiberwise-quasi-compact implies quasi-compact?
Here is a counterexample:


**Example.** We will define $X$ as a union of affine varieties
$$U\_0 \subseteq U\_1 \subseteq \ldots$$
as follows: start with $U\_0 = \mathbf A^1 \times (\mathbf A^1 \setminus 0) \subseteq \mathbf A^2 = V\_0$ with its natural projection to $\mathbf A^1$, and let $Z\_0 = \mathbf A^1 \times 0$ be the complement of $U\_0$ in $V\_0$.


Choose a sequence of points $x\_1,x\_2,\ldots$ on $\mathbf A^1$. Define $V\_i$ as the blowup of $V\_0$ in the points $(x\_1,0), \ldots, (x\_i,0)$, so we have maps
$$\ldots \to V\_i \to V\_{i-1} \to \ldots \to V\_0.$$
Let $E\_i$ be the exceptional divisor for $V\_i \to V\_{i-1}$, let $Z\_i$ be the strict transform of $Z\_0$ in $V\_i$, and let $U\_i$ be its complement in $V\_i$. For each $i$, the centre of the blowup $V\_i \to V\_{i-1}$ is contained in $Z\_{i-1}$, giving an isomorphism
$$V\_i\setminus(E\_i \cup Z\_i) \stackrel\sim\longrightarrow V\_{i-1}\setminus Z\_{i-1},$$
hence an open immersion
$$U\_{i-1} = V\_{i-1}\setminus Z\_{i-1} \cong V\_i\setminus (E\_i \cup Z\_i) \hookrightarrow V\_i \setminus Z\_i = U\_i.$$
Define $X$ as the union. The maps $U\_i \to \mathbf A^1$ are compatible, so they give a map $X \to \mathbf A^1$. It is flat since $X$ is integral and dominant over the Dedekind scheme $\mathbf A^1$. It is separated and locally of finite type since $X \to \operatorname{Spec} k$ is. Finally, the fibres are quasi-compact: each step $U\_{i-1} \hookrightarrow U\_i$ only modifies the fibre over $x\_i$. But $X$ itself is not quasi-compact. $\square$


