I'm not understanding the following passage and I'm hoping someone could elucidate (for context, this is in the lead up to the definition of the sign of a permutation) where the author says:
Let $f$ be a function of $n$ variables, say $f\space\colon\mathbb{Z}^n\to\mathbb{Z}$, so we can evaluate $f\left(x_1,\ldots,x_n\right)$. Let $\sigma$ be a permutation of $J_n$ (the author previously defined $J_n=\left\{1,\ldots,n\right\}$). We define the function $\pi\left(\sigma\right)f$ by $$\pi\left(\sigma\right)f\left(x_1,\ldots,x_n\right)=f\left(x_{\sigma\left(1\right)},\ldots,x_{\sigma\left(n\right)}\right).$$ Then for $\sigma,\tau\in{S_n}$ we have $\pi\left(\sigma\tau\right)=\pi\left(\sigma\right)\pi\left(\tau\right)$. Indeed, we use the definition applied to the function $g=\pi\left(\tau\right)f$ to get \begin{align*} \pi\left(\sigma\right)\pi\left(\tau\right)f\left(x_1,\ldots,x_n\right)&=\left(\pi\left(\tau\right)f\right)\left(x_{\sigma\left(1\right)},\ldots,x_{\sigma\left(n\right)}\right)\\ &=f\left(x_{\sigma\tau\left(1\right)},\ldots,x_{\sigma\tau\left(n\right)}\right) \\ &=\pi\left(\sigma\tau\right)f\left(x_{1},\ldots,x_{n}\right). \end{align*} Since the identity in $S_n$ operates as the identity on functions, it follows that we have obtained an operation of $S_n$ on the set of functions.
Now if I let $G$ be the set of functions $\mathbb{Z}^n\to\mathbb{Z}$, then I agree the mapping $S_n\times G\to G$ defined by $\left(\varpi,f\left(x_1,\ldots,x_n\right)\right)\mapsto{f\left(x_{\varpi\left(1\right)},\ldots,x_{\varpi\left(n\right)}\right)}$ is well-defined since functions are well-defined, by definition.
Where I get lost is (and let me note how pleased I am that the align* environment works) \begin{align*} \pi\left(\sigma\right)\pi\left(\tau\right)f\left(x_1,\ldots,x_n\right)&=\left(\pi\left(\tau\right)f\right)\left(x_{\sigma\left(1\right)},\ldots,x_{\sigma\left(n\right)}\right)\\ &=f\left(x_{\sigma\tau\left(1\right)},\ldots,x_{\sigma\tau\left(n\right)}\right) \\ &=\pi\left(\sigma\tau\right)f\left(x_{1},\ldots,x_{n}\right). \end{align*}
I would go about it as \begin{align*} \pi\left(\sigma\right)\pi\left(\tau\right)f\left(x_1,\ldots,x_n\right)&=\pi\left(\sigma\right)f\left(x_{\tau\left(1\right)},\ldots,x_{\tau\left(n\right)}\right)\\ &=f\left(x_{\sigma\tau\left(1\right)},\ldots,x_{\sigma\tau\left(n\right)}\right) \\ &=\pi\left(\sigma\tau\right)f\left(x_{1},\ldots,x_{n}\right). \end{align*}
I'm not sure why the author used $\left(\pi\left(\tau\right)f\right)$ in the RHS of the first line of the aligned equation instead of $\left(\pi\left(\tau\right)f\left(x_{\sigma\left(1\right)},\ldots,x_{\sigma\left(n\right)}\right)\right)$ and I don't follow why the $\pi(\sigma)$ term 'acts' first. I get why we can take out $\sigma\tau$ since function composition is associative, thus, $(\sigma\circ\tau)(1)=\sigma(\tau(1))$.