Is exercise 1.10d from Hartshorne just entirely wrong or is it salvageable in any non-trivial way? The question is

(d) If $Y$ is a closed subset of an irreducible finite-dimensional topological space $X$, and if $\dim Y=\dim X$, then $Y=X$.

Here we are using this definition for dimension

Definition. If $X$ is a topological space, we define the dimension of $X$ (denoted $\dim X$ ) to be the supremum of all integers $n$ such that there exists a chain $Z_0 \subsetneq Z_1 \subsetneq \ldots \subsetneq Z_n \subsetneq X$ of distinct irreducible closed subsets of $X$.

Letting $X = \{1,2,3\}$ and $Y= \{1,2\}$ where the closed sets are $\emptyset, \{1\}, \{2\}, \{1,2\}, \{1,2,3\}$. You can check that

*

*$X$ is indeed irreducible,

*$Y$ is a closed subset,

*$\dim X = \dim Y = 0$,

but clearly $Y \neq X$. You can salvage the statement by requiring $Y$ to also be irreducible but then the exercise is almost trivial. I am wondering if I am missing something here or if there's some non-trivial way you can salvage this exercise.
(Proof that $\dim X = \dim Y = 0$)
The only irreducible closed subsets of $Y$ are $\{1\}$ and $\{2\}$, these sets are mutually disjoint so clearly, the only maximal chains of irreducible closed subsets of $Y$ are
$$\{1\} \subsetneq Y \quad \text{and} \quad \{2\} \subsetneq Y.$$
Thus $\dim Y = 0$, note that since $Y$ itself is NOT irreducible we also have that the only irreducible closed subsets of $X$ are $\{1\}$ and $\{2\}$, so again the only maximal chains of irreducible closed subsets of $X$ are
$$\{1\} \subsetneq X \quad \text{and} \quad \{2\} \subsetneq X.$$
Thus $\dim X = 0$.
 A: Your definition is incorrect. Here's the definition from page 5 of the text:

If $X$ is a topological space, we define the dimension of $X$ (denoted $\dim X$) to be the supremum of all integers $n$ such that there exists a chain $Z_0\subset\cdots\subset Z_n$ of distinct irreducible closed subsets of $X$.

The issue is you've stuck $X$ on the end and required $Z_n\subset X$ to be a proper inclusion, which is not correct.

Let's check the example you proposed doesn't actually contradict the exercise.
It's a quick check that the listed subsets form a topology: they contain the whole space, the empty set, and they're closed under finite unions and arbitrary intersections.
The irreducible subsets of $X$ are $\{1\}$, $\{2\}$, and $\{1,2,3\}$. Therefore $\{1\}\subset \{1,2,3\}$ is a chain of proper inclusions of nonempty irreducible subsets and there are no longer chains, showing that $\dim X=1$.
The nonempty closed subsets of $Y$ equipped with the induced topology are $\{1\}$, $\{2\}$, and $\{1,2\}$. The only irreducible closed subsets are $\{1\}$ and $\{2\}$, so $\dim Y=0$ and this is not a counterexample.

To show that exercise I.1.10(d) of Hartshorne is fine as written, here is one solution:
Let $Y\subset X$ where $X$ is irreducible, finite dimensional, and $Y\subset X$ is closed. By exercise I.1.10(a), $Y$ is also finite dimensional, so one can pick a chain of inclusions of irreducible closed subsets of $Y$ $Y_1\subset\cdots\subset Y_n$ demonstrating the dimension of $Y$. This chain of inclusions is also a chain of proper inclusions of irreducible closed subsets of $X$: since $Y$ is closed in $X$, the $Y_i$ are too; since the $Y_i$ have the induced topology, they're also irreducible subsets of $X$. Now look at the extended chain $Y_1\subset\cdots\subset Y_n\subset X$. From the assumptions that $\dim Y=\dim X$, we see that we must have $Y_n=X$ as $X$ is irreducible, and therefore $Y_n=Y=X$ as we have an inclusion $Y_n\subset Y\subset X$.
A: The definition of dimension given is not correct. The space $Y$, which is just the two point discrete set, ought to have dimension $0$.
With the index convention here:
Dimension of a Noetherian topological spaces
you get that $Y$ has dimension $0$ and $X$ has dimension $1$, so  there is no contradiction.
I haven't got a copy of Hartshorne with me so I'm not sure what his index conventino is.
