Summation over Finite Set is Well-Defined

Theorem
Let $\mathbb A$ be one of the standard number systems $\N,\Z,\Q,\R,\C$.

Let $S$ be a finite set.

Let $f : S \to \mathbb A$ be a mapping.

Let $n$ be the cardinality of $S$.

let $\N_{<n}$ be an initial segment of the natural numbers.

Let $g,h : \N_{<n} \to S$ be bijections.

Then we have an equality of indexed summations of the compositions $f\circ g$ and $f\circ h$:


 * $\displaystyle\sum_{i \mathop= 0}^{n-1} f(g(i)) = \displaystyle\sum_{i \mathop= 0}^{n-1} f(h(i))$

That is, the definition of summation over finite set does not depend on the choice of the bijection $g : S \to \N_{<n}$.

Outline of Proof
We reduce the case of arbitrary sets to Indexed Summation does not Change under Permutation.

Proof
By Inverse of Bijection is Bijection, $h^{-1} : \N_{<n} \to S$ is a bijection.

By Composite of Bijections is Bijection, the composition $h^{-1}\circ g$ is a permutation of $\N_{<n}$.

By Indexed Summation does not Change under Permutation, we have an equality of indexed summations:


 * $\displaystyle\sum_{i \mathop= 0}^{n-1} (f\circ h)(i) = \displaystyle\sum_{i \mathop= 0}^{n-1} (f\circ h)\circ(h^{-1}\circ g)(i)$

By Composition of Mappings is Associative and Bijection Composite with Inverse, the second indexed summation equals $\displaystyle\sum_{i \mathop= 0}^{n-1} f(g(i))$.

Also see

 * Change of Variables in Summation over Finite Set