> [!NOTE] Lemma (Associativity) > Let $S_{1},S_{2},S_{3},S_{4}$ be sets and $f,g,h$ be functions $h:S_{1}\to S_{2}, \quad g:S_{2}\to S_{3}, \quad f: S_{3}\to S_{4}$Then $f\circ(g\circ h) = (f \circ g) \circ h$ ([[Function Composition|composition]] is [[Associativity|associative]]). ^f4ab9a *Proof*. Take $x\in A.$ Then $\begin{align} (f\circ(g\circ h)) (x) & = f((g \circ h)(x) ) \\ & = f(g(h(x))) \\ &= (f\circ g) (h(x)) \\ &= ((f\circ g) \circ h ) (x) \end{align}$Thus $f\circ (g\circ h)=(f\circ g) \circ h.$