Some people think that scientists doing theoretical work can use mathematics to prove things about the real world a priori of any empirical investigation. This is wrong. Allow me to explain.
It is true that the results of pure mathematics do follow from whatever axioms one starts with a priori of any empirical observations. Indeed, empirical observations are quite irrelevant to pure math (except in an inspirational role). However, mathematics by itself cannot tell us anything about the physical world.
A concrete example will help illuminate the relationship between math and the physical sciences. Let’s consider the theory of General Relativity. GR is a mathematical model, and there are a couple of different ways to look at a mathematical model.
A pure mathematician might just be interested in the abstract “mathematical formalism” of GR. This pure mathematician could study the Einstein field equations, et cetera, irrespective of their physical significance. Indeed, an alien mathematician in an alternate universe with completely different physics could study the same mathematical formalism and derive the same results, even though the theory and results would have no physical significance in that alternate universe.
However, there’s more to a mathematical model than just an abstract formalism. A mathematical model additionally makes the empirical claim that the behavior of the real world is analogous, in a specified manner, to the behavior of its abstract formalism. This linkage between the formalism and the real world is sometimes called “the interpretation” (especially in cases where there is controversy about just how to link things up, such as quantum mechanics).
To return to the example of GR, you can derive from its mathematical formalism (in a completely abstract, a priori manner) the existence of gravitational waves. However, this most certainly does not prove that gravitational waves exist in the real world. It might turn out that there are no gravitational waves and the real world doesn’t behave in the way the model says it should. It might turn out that the model is wrong.
In light of the empirical fact that the predictions of GR have thus far agreed with experimental tests, physicists believe with fairly high certainty that GR does accurately model the behavior of the real world. We have not yet experimentally observed gravitational waves, but you’d be hard-pressed to find a physicist willing to bet money against their existence. No one, however, thinks that we’ve proved, a priori, that gravitational waves exist. If scientists did think their existence had been proved a priori, we wouldn’t bother going to the great trouble and expense of attempting to find empirical evidence for them.
In some cases, the correspondence between a mathematical model and the real world is so obvious and uncontroversial that no one bothers to explicitly lay out the formalism’s interpretation or the empirical evidence for its correctness. Consider a basket with 2 apples in it. Now toss in 2 more apples. Examine the basket, and you will find (surprise!) 4 apples. However, you cannot prove a priori that there will be 4 apples in the basket. It is an empirical question, albeit a trivial one, whether baskets of apples (which are physical things) behave in the same manner as the non-negative integers under addition (which is an abstract logical construct).
This distinction might seem hopelessly pedantic at first, but you can easily go astray by ignoring it. For example, many people naively expect photons to behave in the same manner as integers under addition, but they don’t. “Number of photons” is not a conserved quantity in the way that “number of apples” is; photons can be created/destroyed, one photon can be split into two, et cetera. Richard Feynman tells an interesting story about trying, and failing, to explain to his father how photons can do these things. I strongly suspect his father was implicitly assuming that all “particles” — a rather misleading term — must behave like apples and integers under addition. However, once you clearly understand the distinction between abstract math and empirical questions, it becomes clear that there is no a priori reason to believe that photons behave like apples or integers.
Without empirical evidence, math can’t tell us anything about the physical world. Scientists have never, ever proven anything about the real world a priori, and never will.