13

I have some statement, which is "proved" by numerical methods (particularly, using simulations), since it isn't possible to prove analytically. Is it legitimate to articulate this statement as a Theorem, if it isn't proved analytically. If no, what should I call it?

P.S. More details regarding the statement.

I have some data generating process and need to prove that the generated data as a function of some variable has some properties. For example, I have $x^1,...,x^n$ generated data (n=100000) and need to show that the function $x(\gamma)$ is positive defined over the domain. Therefore, on the generated data I apply interpolation technique in order to construct the function and I check the property.

ssane
  • 443
  • 16
    How is it proved by numerical methods? There are computer proofs that use reliable numerical methods based on interval arithmetic. See https://scicomp.stackexchange.com/a/1028/640 – lhf Jan 06 '19 at 10:32
  • @lhf I have edited the question, please have a look. – ssane Jan 06 '19 at 10:42
  • 12
    Not really, no. You could call it a conjecture, and cite the computation as evidence towards it being true. – Theo Bendit Jan 06 '19 at 10:43
  • @TheoBendit Thank you for your comment. Actually, I show in the prove of the statement that the only way to prove it is numerical techniques, since it can't be proved analytically. – ssane Jan 06 '19 at 10:48
  • 3
    @sane This might be something that I'd have to see the specifics to comment on properly, but in general, if you want to call it a theorem, you'll need to have a proof attached. You might have sampled 100 000 points, but why that number? Could your opinion change if you sampled 100 000 0000 points? Why didn't you sample, say, 10 instead? What is it about this property that makes you absolutely certain that 100 000 points will tell you definitively whether a function has it or not, but sampling 10 won't? A proof should leave no room for doubt, when verified. – Theo Bendit Jan 06 '19 at 10:53
  • 2
    How do you know for sure that what you have observed in your simulated data is not a fluke? – littleO Jan 06 '19 at 10:53
  • @TheoBendit So I need to show that the function $x(\gamma)>0$ over the domain $\gamma \in[0,1]$. i take $m=100 000$ points $\gamma^1,...\gamma^m$, therefore construct the function based on $m$ points using interpolation techniques. Although I think that the specified $m$ observations are sufficient, nevertheless I can generate 100 000 000 points form $\gamma \in [0,1]$, if it will change something. – ssane Jan 06 '19 at 11:04
  • @littleO I am sure because I control the data generating process. In other words, manually I estimate the points $\gamma_i$ and specify the estimation error (tolerance). – ssane Jan 06 '19 at 11:08
  • 4
    @sane It won't change things. It'll provide more evidence, but no (finite) number of points will constitute a proof in itself. You have no way of knowing whether the function ducks below zero at other points, maybe at a value much larger than the values tested, or maybe at one tricky point in between the points you've tested. Most numbers cannot be expressed by notation, let alone computers! That is, most numbers have absolutely no chance of being tested numerically. How do you know the function doesn't become negative there? – Theo Bendit Jan 06 '19 at 11:08
  • Is there an axiom that makes rigorous a numerical proof? – dmtri Jan 06 '19 at 11:29
  • 1
    When you say, it cannot be proved, Do you mean that it is not in our powers yet, or it is proved that it cannot be proved? – dmtri Jan 06 '19 at 11:33
  • @dmtri I mean that it is proved that it cannot be proved. – ssane Jan 06 '19 at 11:35
  • 13
    @sane How do you know that it cannot be proved? – Noah Schweber Jan 06 '19 at 12:12
  • @NoahSchweber I obtain the data $x_i$'s from $n$ degree polynomial, therefore I can't solve for $x_i$'s for $n>4$. Instead I use numerical methods, to estimate $x_i$'s. – ssane Jan 06 '19 at 14:23
  • So you have the function explicitly available and it is a polynomial? Then you can definitly use numerical methods like interval arithmetic mentioned by @lhf, which give you a valid proof. You could also try something like SOS (sum-of-squares) programming. If you post the polynomial, maybe we can say more. – SampleTime Jan 06 '19 at 14:28
  • 3
    It is at best empirical evidence, possibly over-fitting, at worst cherry-picking. And "theorem" has a very specific meaning in mathematics. No theorem can be proven in the way you are thinking of. – user21820 Jan 06 '19 at 15:00
  • @user21820 Then, what should I call my findings? – ssane Jan 06 '19 at 15:05
  • Exactly as I said. If you understand all the pitfalls in such kind of evidence, then perhaps you can call it empirical evidence. If you do not, then most likely you can only call it over-fitting or cherry-picking. – user21820 Jan 06 '19 at 15:10
  • @user21820 Actually, I do recognize all pitfalls in such kind of evidence, but from other hand I am pretty sure that here we can't have any pitfall, since as I mentioned the domain is $[0,1]$ and I pick up $100 000$ points from that interval. However, I am sure, but it isn't proof. – ssane Jan 06 '19 at 15:15
  • @sane So to get you right, the domain of $\gamma$ is $[0, 1]$ but what is the domain of $x$ and $y$? If you perform sampling, you also have to specify these. Are they bounded as well? – SampleTime Jan 06 '19 at 15:19
  • @sane Ok, and you want to show that $x > 0$ for all $\gamma \in [0, 1]$ and all $y \in [0, 1]$, correct? – SampleTime Jan 06 '19 at 15:53
  • 2
    @sane, the argument you are giving to Noah Schweber is certainly not a proof that your statement can not be proven. There are many results (theorems) concerning objects that can not (yet?) be computed explicitly. – Surb Jan 06 '19 at 19:13
  • Please update your question with the actual equation instead of putting them into different comments, because otherwise it is difficult to follow. – SampleTime Jan 06 '19 at 19:39
  • 1
    There are ways that are not "numeric methods" that may be able to show that a polynomial is positive everywhere in the domain $[0,1],$ even for a polynomial of very high degree. You should not assume there is no analytic proof just because the degree is greater than $4.$ After all, you have no need to know where the zeros are, as long as you know they are not in $[0,1].$ – David K Jan 07 '19 at 01:09
  • 2
    I can't believe no one posted it yet, but I can't see it here so: https://math.stackexchange.com/questions/514/conjectures-that-have-been-disproved-with-extremely-large-counterexamples – ℋolo Jan 07 '19 at 11:23
  • If we could the Riemann hypothesis would become a theorem by now. – Yanko Jan 07 '19 at 13:10
  • 1
    @sane: Your comment suggests that you are in fact unaware of the pitfalls. I challenge you to numerically show that $x^{x+1/\ln(x)/e}-1>0$ for all $x∈[0,1]$. – user21820 Jan 07 '19 at 14:56
  • (converted from an answer to a comment); perhaps not directly relevant to your precise question, but a famous result whose proof is based on (rigorous) numerical computations is Warwick Tucker's proof of the existence of Lorenz attractor, e.g. https://www.ensta-bretagne.fr/jaulin/swim13_slides_tucker.pdf – John Donn Jan 07 '19 at 15:37

4 Answers4

53

In general, numerical methods don't constitute proofs. If all we have is an unknown blackbox function $f:\mathbb{R} \to \mathbb{R}$ that we know nothing about, and all we can do is compute its value at (finitely) many points, then we simply can't prove that $f$ is positive.

However, in specific cases, we could have arguments based on numerical methods that are valid. Typically, we'd need to make a numerical approximation, and then prove, using non-numerical methods, that our numerical approximation is accurate enough for the theorem to follow. As such, how numerical methods can aid us in proving a statement is very statement-specific.

Take, for example the following problem: Prove that $f(x) = x^2 + 1 > 0 \ \forall x \in [-1, 1]$.

Invalid proof: We computed $f(x)$ at $10^{10^{10000}}$ random points and used linear interpolation between them. Here's a plot. We can see that $f(x)$ is always positive.

Valid proof 1: We computed $f(x)$ at points three points: $f(-1) = 2$, $f(0) = 1$, and $f(1)=2$. Let $g(x)$ be the linear interpolation of the points $(-1, 2)$, $(0, 1)$, and $(1, 2)$. $g$ attains its minimum at $g(0) = 1$. Since $f^{\prime \prime} = 2$, we can compute an error bound on our interpolation (see https://ccrma.stanford.edu/~jos/resample/Linear_Interpolation_Error_Bound.html): $|f(x) - g(x)| \leq \frac{2}{8}$. Therefore, we can conclude that $f(x) \geq \frac{3}{4} > 0$.

Note: Often, if we need to resort to numerical methods, if would be just as hard to compute derivatives. However, we don't need the actual derivatives, we just need an upper bound. The better the bound, the less points we would need to evaluate $f(x)$ at. Furthermore, bound to the first derivative is enough, but having second could also reduce the number of points needed.

Valid proof 2 (sketch): We know that $f(x)$ is convex. We use a numerical method to compute its minimum. find that $\min f(x) \approx 1.0000000075$. We also have an (true, non-numerical) error bound on our approximation: $|1.0000000075 - \min f(x)| < 0.001$. Therefore, $f(x) > 1.0000000075 - 0.001 > 0$.

Finally, it doesn't really matter whether analytical proofs exist or not. The validity of any proof is only determined by that proof and no others.

In fact, it has been proven that not all true statements can be proven. But that is no reason to reduce our standards of rigor.

Todor Markov
  • 2,869
  • A numerical proof would lead thousands of mathematician to unemployment, so far. That is why we do not like it? – dmtri Jan 06 '19 at 11:28
  • 2
    Thank you for your answer. I have a question regarding "valid proof 1". You have computed the error bound of the interpolation, but this computation is affordable, when you have the functional form $f(x)$ (actually you have assumed it). But in my case I don't have the functional form, therefore how can I replicate Valid proof 1 to my statement? – ssane Jan 06 '19 at 11:34
  • @sane I'd need to know the full context to even attempt to answer that: what's the function (as best as you can describe it), where does it come from, how do you compute it? It's not always possible to replicate valid proof 1. Ultimately, you need to have some property that prevents the function from being, for example, positive everywhere except at x=5.3242463456343 – Todor Markov Jan 06 '19 at 12:20
  • 3
    "Valid proof 1" is perverse (it belongs in the well known book "Mathematics made difficult" IMO) - if you know enough calculus to find the second derivative and understand use the result quoted, you know enough to show that the minimum value is when $x = 0$ without using the "numerical method" at all. Numerical method 2 is not a proof, unless you have a non-numerical proof that the error bound of your algorithm is guaranteed to be correct, when using approximate arithmetic (e.g. working to a fixed number of decimal places, or using IEEE floating point arithmetic on a computer). – alephzero Jan 06 '19 at 12:34
  • 22
    @alephzero The point of the first proof was to explain how one would argue something "numerically" using a simple example. Of course one can show that $x^2+1$ is non-negative in a billion easier ways, but they would be totally irrelevant to the question. –  Jan 06 '19 at 13:30
  • Then what should I call my findings? – ssane Jan 06 '19 at 15:10
  • 7
    @sane A guess. Because that's what it is. An educated guess with a reasonable amount of evidence behind it. – user3482749 Jan 06 '19 at 20:14
  • If you knew the function's relation to other functions, you could also squeeze it and obtain a proof that way. – Stian Jan 07 '19 at 08:08
  • 1
    @dmtri no, we don't like it because they're not actual proofs. Without the proper regularity arguments we can end up "proving" numerically things that are actually wrong. – RcnSc Jan 07 '19 at 09:54
  • ”We sue a numerical method" - Poor method :( – Pedro A Jan 07 '19 at 10:01
  • @sane If we have $f(x) = g(y)$, we can use implicit differentiation to get $\frac{df}{dx}\frac{dx}{dy} = \frac{dg}{dy}$, therefore $\frac{dx}{dy} = \frac{g^\prime(y)}{f^\prime(x)}$ (note this is an expression of both $x$ and $y$). Then if we can compute a (non-numerical) upper bound $A$ on $|\frac{dx}{dy}|$, we have $f(x \pm \epsilon) \geq f(x) - \epsilon A$. From there we can find out how many points we need to get a good enough bound for the whole domain. – Todor Markov Jan 07 '19 at 13:53
  • @TodorMarkov What if we have $f(x_1,...,x_n)=g(y)$? – ssane Jan 08 '19 at 06:29
  • 1
    @sane In that case it doesn't make much sense to talk about a function $x(y)$ - there would likely be infinitely many. If you have $y(x)$, you can bound partials $|\frac{\partial y}{\partial x_i}| < A_i$. Then you'd have $y(x_1 + \epsilon_1, \dots, x_n + \epsilon_n) > f(x_1, \dots, x_n) - \sum \epsilon_i A_i$. However, in practice that would only be useful in low dimensions, otherwise the number of points needed to have a tight enough grid would be prohibitively huge. – Todor Markov Jan 08 '19 at 08:42
14

Well, is it proven or is it not proven? The way you've phrased your question is "if I've proven something with numerical methods, have I proven it?". Well, yes - you just said you had.

Say you want to prove that $f(n)$ is a prime number for $n<10^7$. Well then if you loop through all the numbers less than $10^7$ and check that $f(n)$ is prime for all of them, you have a proof. It isn't somehow less of a proof just because it doesn't involve a bunch of algebraic symbols and words like "therefore" and "by contradiction".

However, if you want to prove that $f(n)$ is a prime number for all numbers, and you check for $n\leq10^7$, that simply isn't a proof. There's no sophisticated philosophical reason why it isn't, it just clearly isn't, is it? I mean, $f(10^7+1)$ might not be prime, for all you know.

So what you really should be asking is whether or not you actually have proven your statement.

Jack M
  • 27,819
  • 7
  • 63
  • 129
  • 1
    Thank you for your answer. Actually, I pick up (finite) points, therefore according to your answer I can't consider it as a proof. Then, please suggest what should I call it? – ssane Jan 06 '19 at 15:12
  • 2
    @sane It's computations which suggest a result might be true. – Jack M Jan 06 '19 at 16:32
  • 1
    @sane: In short, your claim must be as accurate as your proof. If you've run your number simulation on a set of numbers (which is obviously finite), then you can only claim that it if proven for that set of numbers. You cannot make any claims about untested numbers. What you should do is amend your claim. Instead of saying "f(n) is a prime", you should say "f(n) is a prime for 0 < n < 10^7" (for example). – Flater Jan 07 '19 at 14:37
5

And it turns out that with further analysis of your actual problem you could have found an exact proof with first semester calculus means. There is no need for speculative numerical explorations.

For your actual problem, to find solutions $x(γ,y)>0$ for the equation $$ (γ^{n−1}y)^n+(γ^{n−2}y)^{n−1}+...+(γy)^2+y=A(γ,y)=x^n+x^{n−1}+...+x, $$ it is rather easy to answer that there is exactly one positive root $x$ for fixed positive $y$ and $γ$.

The right side at $x=0$ is zero and grows monotonically and convexly towards infinity, thus there is a positive root of the equation by the intermediate value theorem. Further, there is a lower bound $$ x>\frac{A}{1+A}\ge\frac{y}{1+y} $$ for the positive root, as either $x\ge 1$ or, for $0<x<1$, $$ A(1-x)=x(1-x^n)<x\implies x>\frac{A}{1+A} $$


In general, there are methods to determine the number of positive roots like Descartes rule or the Hurwitz criteria of stability. Descartes rule counts the sign changes in the coefficient sequence. Here $x^n+...+x^2+x-A=0$ has exactly one sign change which proves the existence of exactly one positive root.

The polynomial equation has lower root bounds $a_nx^n+...+a_1x+a_0=0$ $$ |x|\ge\frac{|a_0|}{|a_0|+\max_{k=1..n}|a_k|} ~~ \text{ or } ~~ |x|\ge\frac{|a_0|}{\max(|a_0|,\,|a_1|+...+|a_n|)} $$ which are lower bound for a single positive root.

Lutz Lehmann
  • 126,666
  • Sorry, I had a typo, this isn't the problem that I consider. – ssane Jan 06 '19 at 16:05
  • 2
    @sane : Then please add the correct problem statement somewhere, preferably to the body of the question text. It is better to add relevant, essential information there than in comments. There are many elementary and not so elementary results on the location and bounds of real roots, starting with Descartes' rule. – Lutz Lehmann Jan 06 '19 at 16:09
  • 4
    @sane: This should be in your Question, not hidden in comments. In your first equation, where are the transitions between $a$ and $a+1$ in the numerators on each side? In your second equation, does the sum on the right terminate? – Eric Towers Jan 06 '19 at 18:53
  • Ok, it looks more difficult to decide on the positivity of $h$. Still, I do not see it as hopeless to try to derive theoretical results, the right sides are still monotonic and convex polynomials in $1/(1+x)$ resp. $1/(1+z)$ with a nice structure. – Lutz Lehmann Jan 06 '19 at 18:55
  • @EricTowers In the first equation for the last term ($n$-th), in the numerator we have $a+1$, instead of $a$. Regarding second equation, I haven't space in order to finish the expression, the last term is identical to the last term of the LHS expression with denominator $(1+z)^n$ instead of $(1+\gamma^{n-1}y)^n$. (P.S. I write this in the comments, since my question is slightly different) – ssane Jan 06 '19 at 18:59
  • 3
    @sane : It belongs in your Question, because your question is an instance of an XY problem. – Eric Towers Jan 06 '19 at 19:02
  • We need to solve the polynomials for $1+x$ and $1+y$, then subtract 1. But since we have $n$ degree polynomial, we can't solve it analytically (for instance for $n=25$) or it can be solved with very huge efforts, which isn't reasonable. Therefore, I decided to proceed with numerical techniques. Do you see any other option? – ssane Jan 06 '19 at 19:56
  • @sane : Please open a new topic with that question, as the general question about the proof method has been answered exhaustively as "in this generality, NO, and if at all, then only with strict error bounds in all stages." – Lutz Lehmann Jan 06 '19 at 20:02
  • @LutzL I am trying to show that we can't prove the statement using approach, which identifies bounds on roots (I mean lower and upper bounds). I know only Cauchy's theorem and your approach. My question is: (i) whether I have to apply all techniques which identify lower and upper bounds of the root, or one of them is enough, in order to state that this technique doesn't give insight regarding comparison of roots of two polynomials (ii) and what are other methods I have to consider besides Cauchy's theorem and the approach that was suggested by you? Thank you. – ssane Jan 10 '19 at 17:29
  • I think that to get in any way close to an impossibility argument is more difficult than finding analytical root approximations with close error bounds and proving the claim for some part of the domain and carving out ever larger parts by improving the bounds. – Lutz Lehmann Jan 10 '19 at 18:22
  • @LutzL I would highly appreciate if you could give me some links about "root approximations with close error bounds". Actually, what does it mean? Thank you. – ssane Jan 10 '19 at 18:43
  • As I already said, you should open a new question asking for close approximations of $x,z$ or just bounding their difference away from zero, resp. alternatively the same for the quantities $\frac1{1+x}$ and $\frac1{1+z}$. Comments are not for extended discussions. – Lutz Lehmann Jan 10 '19 at 18:54
2

As other answers have said, a statement is either proven or unproven. If it is proven, we call it a theorem, regardless of the methods used. I'm answering separately to call attention to some of the pitfalls of trying to "prove" things with numerical methods.

The vast majority of real-world numerical computing (outside of the financial sector) uses IEEE 754 floating point to represent numbers which may not be integers. In short, the floating point numbers are a finite (but large) subset of the dyadic rationals, which become sparser (at a roughly logarithmic rate) as we move away from zero. There are also a few "special" values which are used to represent the results of invalid operations or arithmetic overflow.

Why does this matter? It's important to understand the limitations of floating point arithmetic. In particular:

  • It does not support irrational numbers whatsoever. The Dirichlet function and its cousins cannot be usefully analyzed at all.
  • Numbers which are farther from zero have less precision, so functions with essential singularities will be difficult to work with in the neighborhoods of their singularities.
  • Limits are potentially an issue. Normally, a limit only exists if it exists under any possible choice of epsilon, but the floating point numbers can only choose finitely many epsilons, all of which are dyadic rationals. So if you take a limit of a function which behaves "specially" over the dyadic rationals (e.g. certain combinations of trigonometric functions), you may derive an incorrect value or incorrectly conclude that the limit exists at all.
  • The floating point numbers are non-associative under every operation that matters, because of intermediate rounding. No useful algebraic manipulations will preserve equality. So equality is basically useless and you have to approximate it by looking at whether numbers are "close enough" instead. For some applications, this is a problem (e.g. proving that a value is never exactly zero is impossible if it comes arbitrarily close to zero).
Kevin
  • 2,690
  • And even for integers, a real world computer is probably really working with the integers modulo some power of 2. In many cases, they silently overflow so considerable care is needed even if you expect that a solution exists within the available range. – badjohn Jan 07 '19 at 14:22