Discovered through life. There is no mathematics for a rock or a lake. The human mind saw it reasonable to abstract symmetry and repetitiveness into natural numbers. And then the miracle happened. These two simple rules themselves produced further patterns that we keep discovering till today. Just to name a few, the Pythagorean Theorem and Prime Number theorem, e, π, φ, i and the algebraic closure, Euclidean and non-Euclidean geometries and so on. Ok, not a few but you get the point.
It might seem like this view leeds to logicism championed by Russell and opposed to formalism (i.e. mathematics is just a series of games with the goal being consistency, championed by Hilbert). But my own view is that of Platonism, also hold by Godel. This view supports mathematics is embedded into reality, we discover it because we are alive and sufficiently intricate to conceive it, we are alive because of an statistical anomally of the physical reality. Of course, if you believe in god and creation, Platonisism seems even more probable but my view is you can also believe, with good foundations, in it even by working only with the evidence you have.
For certain, it boils down to whether the axioms of mathematics are "real" or just seem real to us mortal men. Since the minimum axioms boil down to symmetry (relationships to 1) and arbitrary extensionality (in theory infinite computations with 1), we must question these. Are crown is certainly 1. This is the chief axiom. Artificial intelligence will begin to compete us when it will have "common sence" to reckognize 1 chair, 1 human, 1 self- itself. This giant step, if realised, will change the face of the world.
If we have sinned, it may be in our notion of arbitrary extensionality, or infinity. Does our universe have an end? Even more important to mathematicians - is there a point, an insanely large number after which no new theorem can be obtained. The answer amazingly is no. Think simply the never ending primes and the infinity of computations to get the "exact" π. Can it be our abstraction of infinity be an act of genius afterall? Max Tegmark through his Mathematical universe hypothesis explains the possibility whatever entity existing in the mathemtical world occupying a physical counterpart somewhere, sometime. Of course! If the universe is unlimited this is not even a chance - it is a possibility with 100% chances of happening!
But don't let infinity fry your minds, like Cantor and Godel. We are humans and we can only live with 1. Infinity is our ally but a superior one we should use with caution. To get a foot in reality and support my Platonic view (thus math is discovered) I support symmetry is a physical law and so not just a man made axiom. See the three components of our surroundings - they end up being either the Up or Down quark, or an electron. Why is it that way? Why aren't there an infinity of different particles. The answer is because our reality is symmetrical, thus we have right to devise arithmetic.
This discussion can lead to the basic foundation of what is - or the absence of any basis. Who made symmetry? Taking a cue from some remarkable piece of proofs by Cantor, the number line is a line because of the uncountably many transcedental numbers - the numbers constructed by infinity. Our reality as it seems is not transcedental- we have finite particles afterall that support that. My conclusion is our universe is a statistical abnormallity. There exist infinitely more universes without any law, just chaos. Is there life and consciousness in those universes? Maybe we don't invent anything, we just discover...