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 \left({g \left({i}\right)}\right) = \sum_{i \mathop = 0}^{n - 1} f \left({h \left({i}\right)}\right)$

That is, the definition of summation over a 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} \left({f \circ h}\right) \left({i}\right) = \sum_{i \mathop = 0}^{n-1} \left({f \circ h}\right) \circ \left({h^{-1} \circ g}\right) \left({i}\right)$

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

Also see

 * Change of Variables in Summation over Finite Set