Why is the composition of Hartshorne-smooth morphisms H-smooth? - a question on irreducible components I got stuck at Section III, Proposition 10. 1(c) of Hartshorne "Algebraic Geometry," which states that the composition of two smooth morphisms is again smooth.
Here, smoooth means the following.

The morphism $f: X\to Y$ between schemes of finite type over a field $k$ are called smooth of relative dimension $n$ if
  
  
*
  
*$f$ is flat,
  
*for every irreducible component $X'$ of $X$, and $Y'$ of $Y$ with $f(X')\subseteq Y'$, $\mathrm{dim} X'- \mathrm{dim} Y'=n$, and
  
*for every $x\in X$, $\mathrm{dim}_{k(x)}(\Omega_{X/Y}\otimes k(x))=n$.
  

I am thinking that condition 2 is unusual compared to other textbooks, and this makes things difficult for me.
Especially, I cannot understand the following part of the proof of Proposition 10.1(c). Let $f:X\to Y$, and $g:Y\to Z$ be smooth of dimension $m$, and $n$. Then, the author states that the condition 2 of the smoothness for $g\circ f$ easily follows because, if $X'$, $Y'$, and $Z'$ are irreducible components of $X$, $Y$, and $Z$ with $f(X')\subseteq Y'$, and $g(Y')\subseteq Z'$, then $\mathrm{dim} X'-\mathrm{dim} Z' = m+n$. I was wondering if you could answer why you could take such $Z'$ for arbitrary $X'$, and $Z'$ with $g(f(X'))\subseteq Z'$. Any help is appreciated.
 A: I myself got an answer to this question.
First, note that the condition 2. is stable under the base change along the morphism between schemes of finite type over $k$. You need to prove this in order to get over Proposition 10.1(b).
Take an arbitrary $z\in Z$. Let $X_z$, and $Y_z$ be the fiber of $z$ in $X$, and $Y$. Take an arbitrary irreducible component $X'$ of $X_z$. We must show that the dimension of $X'$ is $m + n$.
The generic point of $X'$ goes into an irreducible component $Y'$ of $Y_z$, when $f(X')\subseteq Y'\Leftrightarrow X'\subseteq f^{-1}(Y')$. Then, $X'$ is an irreducible component of $f^{-1}(Y')$ also. Because of [1], $f^{-1}(Y') \to Y'$ can be viewed a base change of $f$, with $Y'$ endowed with the reduced closed subscheme structure, and $f^{-1}(Y')$ with some corresponding scheme structure. Since condition 2. is stable under base change in a nice situation, $f^{-1}(Y') \to Y'$ also satisfies condition 2., and so $\dim X' = \dim Y' + m = n + m$. You know the last equality through the condition 2. for $g$, and Corollary 9.6 of Hartshorne.
[1]Image of base change of immersion
