How to define the conception of a sum without the operation of addition? In short: I look for a definition of a sum of any number of natural numbers in the terms of pure set theory. Until now, neither have I found such a definition in books, nor invented it by myself.
In details:
Let there be $n$ piles of apples on a table (${n}\in\mathbb{N}_{>0}$). Let $x_i$ be the number of apples in each pile (${x_i}\in\mathbb{N}_{>0}$, ${i}=1…n$). How to define the conception of “total number of apples on the table” through ${x_i}$, without using the operation of arithmetic addition?
All sources known to me reduce this conception to the arithmetic addition one way or another. But it seems not quite correct to me: addition doesn’t reflect the main point of the conception, but it only is one of the possible operations for calculating this “total number”. Besides that, the entity of “total number of apples on the table” exists regardless of the fact whether we perform any operations to calculate it.
Furthermore, addition is defined for two or more addends, while “total number of apples on the table” exists and is computable even if $n=1$.
I am interested in a definition in terms of pure set theory. Individual natural numbers (for example, $n$ and each of ${x_i}$) can be defined, e.g. as finite ordinals. I look for a definition of “total number” also in the context of set theory (e.g. as a result of unions, intersections and other set operations).
Is this possible?
 A: If you have an indexed family of cardinalities $(\kappa_i)_{i\in I}$, then you can define the sum of the $\kappa_i$s to mean any cardinality $\lambda$ where


*

*There is a family of sets $(A_i)_{i\in I}$ such that ...

*For each $i$ it holds that $|A_i|=\kappa_i$, and

*The $A_i$s are pairwise disjoint, and

*$\lambda = \left| \bigcup_{i\in I} A_i\right|$.


I will leave it to you to prove that


*

*Every family $(\kappa_i)_{i\in I}$ has at least one sum (easy).

*Every family $(\kappa_i)_{i\in I}$ has as most one sum (fairly easy if you assume the axiom of choice; but not provable in ZF. It appears to be unknown whether it implies the axiom of choice).

*The sum of a finite family of finite numbers is finite (possibly hard, depending on how you define "finite", and how purist you are about not giving binary addition any special treatment).
A: We use the following definition (see this wikipedia link),

Definition: A set $S$ is said to be finite if it can be given a total
ordering which is well-ordered both forwards and backwards. That is,
every non-empty subset of S has both a least and a greatest element in
the subset.

We define the operator $\Gamma$ to map any $(A,\le)$ well-ordered set as follows:
$
\Gamma(A,\le)=\begin{cases} \bigr(A \setminus \{\text{min}(A)\},\,\rho_{\le} \setminus  \{ \text{min}(A)\}\times A \bigr) &\text{where } A \ne \emptyset \\
(\emptyset,\emptyset)&\text{otherwise}
\end{cases}
$
If presented with a finite family of finite sets $(A_i)_{i\in I}$ that are pairwise disjoint, then put a total ordering $\rho_{\le}$ on the union
$\quad A = \bigcup_{i\in I} A_i$
so that $A$ is well-ordered both forwards and backwards.
Define by recursion a function operating on the finite ordinals $\omega$ via
$\quad g(\emptyset) = (A, \le)$
$\quad g(\alpha \cup \{\alpha\}) = \Gamma\bigr(g(\alpha)\bigr)$
There exists an ordinal $\kappa$ such that $g(\kappa) = (\emptyset,\emptyset)$. Let
$\quad \mathcal E = \{ \kappa \in \omega \mid g(\kappa) = (\emptyset,\emptyset)\}$
If $\mathcal E = \omega$ then the sum of the $A_i$ is equal to $\emptyset$ (i.e. $0$).
Otherwise the sum is the ordinal preceding $\text{min}(\mathcal E)$.
The OP has to confirm that the sum so specified does not depend on how the set $A$ is well-ordered.
