In set theory numbers are defined as sets
$$\emptyset,\{\emptyset\},\{\emptyset,\{\emptyset\}\},\{\emptyset,\{\emptyset\},\{\emptyset,\{\emptyset\}\}\},\dots$$
where $n+1=n\cup\{n\}$ and $n-1=\bigcup_{k\in n}k, \; n\ne\emptyset$. As I remember there are some complicated formulas for $m+n$ and $m\cdot n$ but I don't know how to get them and would like some hints.
Also, is there a canonical way to interpret a number $k\in\{0,\dots, n^m-1\}$ as a function $m\to n$? I'll guess $\emptyset$ and $\{\emptyset\}$ are trivial, but the rest?
You can either do it with ordinal arithmetic, which means defining the properties by induction and using the induction theorem. Or you can do it with cardinal arithmetic:
$$m+n=k\iff \exists f\colon m\times\{0\}\cup n\times\{1\}\to k\text{ a bijection}$$
Then you just need to show that $k$ is unique, which essentially means showing that the natural numbers are Dedekind finite, and this can be shown using induction.