I don't have any specific resources to recommend, however I'll give my take on the foundations of 'numbers'.

We use the label 'number' to refer to a broad swathe of mathematical objects, objects that are different but also so similar they often appear interchangeable (for example counting numbers and fractions).

In the formal mathematical sense, a specific type of number is a group of objects which have been defined to have specific properties. I'm going to leave object and property as defined in the usual sense, I think most people have a good idea about what those are and not sure I can add anything to them.

There are no rules as to what properties you are allowed to give to objects, nor what group of objects you want to include, but generally if you are learning about some specific thing it's because people find them useful or interesting; the definitions we have for different types of numbers are the ones we have found useful or interesting.

Remember that the different types of number appear very similar. It is common to build a 'hierarchy' of differnt types of numbers, where we start with a simple type of number and then add new properties and objects when we find limitations we don't want.

The first type of number in this hierarchy are the natural numbers (sometimes called counting numbers). The most common properties defined for these today are called the Peano axioms [0]. There are quite a few of them, and the history of how we came to the formalisation is very interesting (a lot of it is about avoiding inconsistencies/contradictions) but the key ideas are:

- there is a natural number called 0

- every natural number has a successor, which is also a natural number - we can write S(n) is the successor of n

Most of the other axioms define what it means for two natural numbers to be equal (=).

Just having these objects isn't particularly useful, we typically want to do things like add, multiply, and compare numbers. To do that we include some operations: addition (+), multiplication (*), and total ordering(<=).

These are defined as, taking a, b, c as natural numbers:

- a + 0 = a

- a + S(b) = S(a + b) (this is recursive, so if we define 1 as 1:=S(0) then we have 1+1 = 1+S(0) = S(1+0) = S(1))

- a * 0 = 0

- a * S(b) = a + (a * b)

- a <= b if (and only if) there exists some c such that a + c = b

Importantly, using these definitions, we can say that the natural numbers are closed under addition and multiplication; whenever you add or multiply two natural numbers together you get another natural number.

To continue building the hierarchy we notice that there are operations we would like to do but are not possible for every natural number (please note I am skipping over the formalisations from hereon and talking about the motivation for different types of numbers).

We notice that if we can add two numbers together we should be able to subtract them again. If a + b = c, then c - b = a. However (for example) 0 - 1 is not a natural number. So we extend the natural numbers to the integers, such that the integers are closed under subtraction.

If we can multiply it makes sense to try and divide, but 2 / 3 is not an integer so we extend integers to the rationals (ratios of integers) which are closed under division. We add an object called 2/3 so that now when we can say 2 / 3 = 2/3.

The next step in the hierarchy is a bit more complex. We notice that we can define a subset of rational numbers that all meet a certain criteria, for example all rational numbers that are less than 2. We call 2 an upper bound of that subset. Notice that 2 is a rational number, and that there are no rational numbers smaller than 2 that are also an upper bound of our subset - 2 is the least upper bound. Define a new subset, where we say a rational number x is in the subset if x * x < 2. We can easily see that 2 is an upper bound for this set, but so is the rational number 1.5, and 1.42, and 1.415. In fact, there is no least upper bound for this set that is a rational number. We extend the rational numbers to include a least upper bound for every subset of rationals, and we call this the real numbers. The real numbers have a lot of nice properties, most notably they are complete under the normal ordering, which essentially means that there are no gaps.

The reals don't have everything though! We notice that we can create polynomial equations, like x * x - 1 = 0 and that sometimes these can be solved (in this case x = 1 or x = -1 solves the equation) and in other cases they can't. For example, there are no real numbers that are the solution to the equation x * x + 1 = 0. We can extend the real numbers to the complex numbers by adding a new object called i, which has the property i * i = -1. A complex number has the form a + b * i, where a and b are real numbers. The complex numbers are called algebraically closed, and there is a really nice result that shows that all polynomials have solutions in the complex numbers.

The hierarchy actually keeps going, but hopefully you can see that numbers are just objects with properties that behave in useful and interesting ways under different operations. The formal definitions we have today have been refined over a long period of time to avoid contradictions and other issues, but there is nothing stopping you from making up your own numbers with their own properties. If they are useful or interesting other people will probably use them too!

[0] https://en.wikipedia.org/wiki/Peano_axioms