Summing permutation function values over the entire domain I am trying to prove the following intuitive, helpful result rigorously:

Let $S$ be a finite set and $f: S \rightarrow S$ bijective. Let $(Y, +)$ be an Abelian group and $g: S \rightarrow Y$. Then $$ \sum_{x \in S} g(f(x))=\sum_{x \in S} g(x). $$

I was trying induction on the size of $S$ but that got me nowhere.
 A: Given a function  $y : S \to Y$, we first of all need a reasonable definition of
$$\sum_{x \in S} y(x) . \tag{1}$$
This is not trivial because in $Y$ we initially we only have sums $y+y'$ of two elements.
Let us remark that we can identify functions $y : S \to Y$ with "tuples" $(y_x)_{x \in S}$ with entries $y_x \in Y$ indexed by the elements of $S$; simply take $y_x = y(x)$. This leads to writing $(1)$ in the perhaps more customary form
$$\sum_{x \in S} y_x .\tag{2}$$
The first step is to consider $S = [n] = \{1,\ldots,n\}$ and to define
$$\sum_{i \in [n]} y(i) = \sum_{i=1}^n y(i) = \sum_{i=1}^n y_i . \tag{3}$$
As usual the RHS is defined recursively (i.e. using induction) via
$\sum_{i=1}^0 y(i) = 0$ and $\sum_{i=1}^{n+1} y(i) = \sum_{i=1}^n y(i) + y(n+1)$ for $n \ge 0$. Note that we allow $n=0$ in which case $[n] = \emptyset$. Thus $\sum_{i=1}^0 y(i)$ is "the sum with $0$ summands".
For an arbitrary $S$ we can choose a bijection $b : [n] \to S$ for some $n$ and define
$$\sum_{x \in S} y(x) = \sum_{x \in S \textit{ via } b} y(x) := \sum_{i =1}^n yb(i) . \tag{4}$$
Here $yb$ denotes the function $y \circ b$.
But wait, is this well-defined? Could it be that different bijections $b, b' : [n] \to S$ yield different values $\sum_{x \in S \textit{ via } b} y(x)$ and $\sum_{x \in S \textit{ via } b'} y(x)$?
To exclude this it suffices to prove that for any bijection $\pi : [n] \to [n]$ (i.e. for any permutation of $[n]$) we get
$$\sum_{i =1}^n y(i) = \sum_{i =1}^n y\pi(i) . \tag{5}$$
In fact, if  $b, b' : [n] \to S$ are bijections, then $\pi = b^{-1}b'$ is a permutation of $[n]$ and by $(4)$ applied for $yb$ we get
$$\sum_{x \in S \textit{ via } b} y(x) = \sum_{i =1}^n yb(i) = \sum_{i =1}^n yb\pi(i) = \sum_{i =1}^n yb'(i) = \sum_{x \in S \textit{ via } b'} y(x) .$$
Once we know that the RHS of $(4)$ does not depend on the choice of $b$, it is also clear that for each bijection $f : S \to S$ we have
$$\sum_{x \in S} y(x) = \sum_{x \in S} yf(x) . \tag{6}$$
In fact, take a bijection $b : [n] \to S$. Then also $f^{-1} b :[n] \to S$ is a bijection and we get
$$\sum_{x \in S} yf(x) = \sum_{x \in S \textit{ via } f^{-1} b} yf(x) = \sum_{i =1}^n yff^{-1}b(i) =  \sum_{i =1}^n yb(i) = \sum_{x \in S \textit{ via } b} y(x) = \sum_{x \in S} y(x) .$$
We shall now prove $(5)$. It is well-known that each permutation of $[n]$ can be expressed as a product of adjacent transpositions. These are the bijections $\tau^n_k : [n] \to [n]$ for $k = 1,\ldots,n-1$ which permute $k$ and $k+1$ and leave all other elements fixed. Thus it suffices to prove
$$\sum_{i =1}^n y(i) = \sum_{i =1}^n y\tau^n_k(i) . \tag{7} $$
$(5)$ follows then from the formula $\sum_{i =1}^n y(i) = \sum_{i =1}^n y\tau^n_{k_1} \ldots \tau^n_{k_m} (i)$ which is proved via induction on $m$.
We prove $(7)$ by induction on $n$.
The base case $n = 1$ is trivial because there do not exist transpositions on $[1]$. Now assume that $(7)$ is satisfied for all $k = 1, \ldots, n-1$. We have to show that
$$\sum_{i =1}^{n+1} y(i) = \sum_{i =1}^{n+1} y\tau^{n+1}_k(i) $$
for all $y : [n+1] \to Y$ and all $k = 1, \ldots, n$. Let $\bar y = y \mid_{[n]}$.
For $k = n$ we get
$$\sum_{i =1}^{n+1} y\tau^{n+1}_n(i) = \sum_{i =1}^{n} y\tau^{n+1}_n(i) + y\tau^{n+1}_n(n+1) = \left(\sum_{i =1}^{n-1} y\tau^{n+1}_n(i) + y\tau^{n+1}_n(n)\right) + y\tau^{n+1}_n(n+1) \\= \left(\sum_{i =1}^{n-1} \bar y(i) + y(n+1)\right) + y(n) \\= \sum_{i =1}^{n-1} \bar y(i) + (y(n+1) + y(n))  = \sum_{i =1}^{n-1} \bar y(i) + (y(n) + y(n+1)) \\= \left(\sum_{i =1}^{n-1} \bar y(i) + y(n)\right) + y(n+1) = \left(\sum_{i =1}^{n-1} \bar y(i) + \bar y(n)\right) + y(n+1) = \sum_{i =1}^{n} \bar y(i) + y(n+1) \\= \sum_{i =1}^{n} y(i) + y(n+1) = \sum_{i =1}^{n+1} y(i) .$$
For $k < n$ we get
$$\sum_{i =1}^{n+1} y\tau^{n+1}_k(i) = \sum_{i =1}^{n} y\tau^{n+1}_k(i) + y\tau^{n+1}_k(n+1) = \sum_{i =1}^{n} \bar y\tau^{n}_k(i) + y(n+1) = \sum_{i =1}^{n} \bar y(i) + y(n+1) \\= \sum_{i =1}^{n} y(i) + y(n+1) = \sum_{i =1}^{n+1} y(i).$$
