What may be relevant to the discovery/invention question is what Wigner called the
Unreasonable Effectiveness of Mathematics in the Natural Sciences. There's something absolutely frightening about the fact that we have occasionally developed an entire mathematical model only to later find that it applies to some model of reality (quantum mechanics is what's in my head at the moment).
There are always limitations in the real world that add constraints to how much it acts like these models, but still, we can discover things within math that lead us to discover things in the universe. Einstein thought the existence of black holes in his models was a flaw that would later be corrected - and then we found them. It's fairly preposterous that these axiomatic abstractions should reveal anything about the world.
Think about an electron. They are point particles - literally (we say with decent confidence) zero volume. And yet in that zero volume, like the intersection of lines, exists things we call 'charge', 'mass', 'spin', 'quantum number', and so on. It's something that is beyond all intuition, purely mathematical from our perspective, and yet it exists, unquestionably.