Theorem. Let $f: W \rightarrow X, g : X \rightarrow Y, h: Y \rightarrow Z$ be maps. Then
(1) $h \circ ( g \circ f) = (h \circ g) \circ f$, i.e., the composition of maps is associative.
Proof is left as an exercise.
My attempt:
Proof: By definition of map composition
$h \circ ( g \circ f) = (h \circ g) \circ f$
$h \circ (W \rightarrow Y) = (X \rightarrow Z) \circ f $
$W \rightarrow Y \rightarrow Z = W \rightarrow X \rightarrow Z$
$W \rightarrow Z = W \rightarrow Z$
$\blacksquare$
I'd like to know, if either the proof and the way of writing it are correct. Or, if there's a more elegant way to write the proof (if correct).
Liesen, J., Mehrmann, V. 2015. Linear Algebra. Berlin, Germany.: Springer.