Proving Hartshorne's Exercise I-1.9 by using exercise I-1.8 My question is about this solution suggestion about solving Hartshorne's Exercise I-1.9 by using exercise I-1.8:

Hartshorne's Chapter 1, exercise 1.9: Irreducible components of $Z(\mathfrak a)$ have dimension $\geq n-r$ if $\mathfrak a$ is an ideal generated by $r$ elements.
Hartshorne's Chapter 1, exercise 1.8: Let $Y$ be an affine variety of dimension $r$ in $\mathbf A^n$. Let $H$ be a hypersurface in $\mathbf A^n$, and assume that $Y \nsubseteq H$. Then every irreducible component of $Y \cap H$ has dimension $r-1$.

Suppose $\mathfrak{a}$ can be generated by $f_1, \dots, f_r$ and no one is in the ideal generated by the rest of them (note they are not necessarily irreducible. But it seems to me that I don't need to assue $H$ in Ex. 1.8 is the zero set of an irreducible polynomial. Let me know if I am wrong). We'll induct on $r$. I can prove that any irreducible component $Y$ of $Z(\mathfrak{a})$ is contained in an irreducible component $Y'$ of $Z(f_1, \dots, f_{r-1})$. But, to use 1.8, I have to show that $Y'$ is not contained in $Z(f_r)$ and that $Y$ is an irreducible component of $Y' \cap Z(f_r)$
Question 1: does the assumption that $f_r\notin (f_1,\dots, f_{r-1})$ imply that $Y'$ is not contained in $Z(f_r)$? If not, how do we remedy this?
Question 2: how to prove that $Y$ is an irreducible component of $Y' \cap Z(f_r)$ (something might be missing here and I can't prove it at least)? It is irreducible but why it appears in the irreducible decomposition of $Y' \cap Z(f_r)$?
 A: *

*You don't need to show this: if $Y'\subset Z(f_r)$, then intersecting doesn't drop it's dimension, which is just fine. (Remember, you want to show that the dimension of each irreducible component is at least $n-r$, so if it's bigger, this is acceptable.)

*Suppose there were a closed irreducible subset of $Y'\cap Z(f_r)$ properly containing $Y$. Then this would also be a closed irreducible subset of $Z(\mathfrak{a})$ properly containing $Y$, which contradicts the fact that $Y$ is an irreducible component (and thus maximal with respect to containment by irreducible subsets) of $Z(\mathfrak{a})$.
Also, you're correct that you don't need to assume that $H$ is the zero set of an irreducible polynomial. Suppose $H=Z(fg)$: then $H=Z(f)\cup Z(g)$, so $Y\cap H = (Y\cap Z(f))\cup (Y\cap Z(g))$, and so everything works out just fine.
Finally, I'd like to point out that you can skip both of these issues: the idea is that for an irreducible variety $Y$ and a hypersurface $H$, all irreducible components of $Y\cap H$ have dimension $\dim Y$ or $\dim Y-1$ depending on whether they're contained in $H$ or not, respectively. So what you want to do is start with $X=\Bbb A^n$, intersect it with $Z(f_1)$, get a list of irreducible components of $Z(f_1)$ of codimension 0 or 1, intersect these with $Z(f_2)$, get a list of irreducible components of $Z(f_1,f_2)$ of codimension 0, 1, or 2, and continue on until you get a list of irreducible components of $Z(f_1,\cdots,f_r)$ of codimension at most $r$ (aka dimension at least $n-r$) and then you've finished the exercise.
