Assume \(\ast\) is an associative binary operation on \(Y\text{.}\) Assume \(X\) is any nonempty set. Let \(f,g,h \in Y^X\) be given. For all \(x \in X\text{,}\) \(f(x), g(x), h(x) \in Y\) implies
\begin{equation*}
f(x) \ast \left(g(x) \ast h(x)\right) = \left(f(x) \ast g(x)\right) \ast h(x)
\end{equation*}
because \(\ast\) is associative. Hence
\begin{align*}
\left(f\ast\left(g\ast h\right)\right)(x) \amp= f(x) \ast \left(g \ast h\right)(x)\\
\amp= f(x) \ast \left(g(x) \ast h(x)\right)\\
\amp= \left(f(x) \ast g(x)\right) \ast h(x)\\
\amp= \left(f \ast g\right)(x) \ast h(x)\\
\amp= \left(\left(f \ast g\right) \ast h\right)(x)\text{.}
\end{align*}
Therefore pointwise \(\ast\) is an associative binary operation on \(Y^X\text{.}\)