Finite sum of complex numbers

Set

context $ (z_i) \in \mathrm{FinSequence}(\mathbb C)$
context $ n=\mathrm{length}((z_i)) $
definiendum $\sum: \mathrm{FinSequence}(\mathbb C)\to \mathbb C$
definiendum $\sum_{i=1}^n\ z_i:= \begin{cases} 0 & \mathrm{if}\ n=0\\\\ \left(\sum_{i=1}^{n-1}\ z_i\right)\ +\ z_n & \mathrm{else} \end{cases}$

Theorem

$\sum_{k=1}^n z^k=\frac{1}{1-z}(1-z^{n+1})$

Subset of

Finite sum over a monoid