r/mathematics • • 2d ago

​If a proof is an algorithm, why doesn't an algorithm that exhaustively searches for a valid proof for each case (such as a theorem instantiated with specific numbers) count as a valid proof? Is it because it's too slow?

0 Upvotes

23 comments sorted by

61

u/AdApprehensive347 2d ago

if you can guarantee the algorithm terminates then sure! now this "guarantee" is typically a proof of its own...

39

u/HappiestIguana 2d ago

It's called universal search and yes, it's because it's far too slow

1

u/DroopingUvula 2d ago

Most things could be proved by brute force. For example, everything in combinatorics. Feel free to exhaust all options inelegantly, but even if you do, you've gained no insight. Since most problems extend infinitely, it's impossible to actually exhaust all options.

10

u/Embarrassed_Range356 2d ago

I dont understand the question. An search algorithm isnt a proof, but if it find a proof then what it finds is a proof

19

u/dionysiaka 2d ago

Rephrasing the premise a bit -- if you have a collection of axioms and inference rules you can use a algorithm to mechanically churn out true statements, and eventually provide all the proved statements that humans are capable of producing. This has been known for the last century or so. But it's far too slow.

2

u/PaulRudin 1d ago

The provable statements of formal systems might be recursively enumerable, so eventually we'd see all proofs, but as you say - not terribly practical.

But Goedel tells us that there are true statements that can't be decided in a (sufficiently expressive) formal system. So there could be things that are true, but not ever included in such an enumeration.

10

u/Psy-Kosh 2d ago

Because there's no guarantee that the algorithm would ever find a proof in either direction, even given unbounded time? (or did I misunderstand the question?)

4

u/AdventurousDiet7893 2d ago

You can’t exhaustively search infinite. Proof by exhaustion is only possible where you search a finite number.

3

u/oasisarah 2d ago

there are infinite numbers resulting in infinite cases. it would never end. a general/abstract proof covers all cases in a finite amount of time.

3

u/Unable-Primary1954 2d ago

You're confusing the proof (which is an algorithm according to Curry-Howard correspondance) with an algorithm to find a proof/algorithm.

Furthermore:

  • To be a proof, an algorithm needs to be terminating in some sense. Exhaustive search might fail because the proposition is undecidable.
  • Löb theorem tells you that "a proof of a proposition P exists" does not prove "P" and that if you used that hypothesis to prove "P", you could remove it.

5

u/Intrepid-Struggle964 2d ago

You essentially can with lean. Just not how ur picturing the autonomous part

1

u/RobZarevich 2d ago

The 4 colour theorem proof works exactly like you said.

1

u/nicuramar 2d ago

A proof is not really an algorithm. In a formalistic view, it’s a sequence of formulas where each is an axiom or follows from previous ones by a rule of inference. The last one is the thing proved.

1

u/i_wayyy_over_think 2d ago

Also halting problem. If it’s just searching through proof programs dumbly it will eventually hit a program that runs forever but you won’t know without manual analysis if you should just let it run just a while longer or if it be stuck.

1

u/LitespeedClassic 2d ago

Such an algorithm exists, but it doesn’t “count” as a proof because you won’t know what statements it will spit out proofs of.

If you could prove the algorithm will terminate with a proof of theorem X, then that would itself be a proof of theorem X. 

1

u/TheChadThrowawayLad 2d ago

Gödel actually had this idea. I think the context was when creating Gödel's speed-up theorem.

The issue is that some proofs would be extremely long, so the algorithm is impractical. For example, the following statement:

This statement cannot be proved in Peano arithmetic in fewer than a googolplex symbols.

can be proven in Peano arithmetic, but the shortest proof requires at least a googolplex of symbols.

Source is the Gödel's speed-up theorem article on Wikipedia.

1

u/666Emil666 2d ago

Case analysis is one the main tools used in programming languages that exploit the curry Howard Isomorphism. Consider for instance pattern matching, or, for example selecting goals in a Row proof. This is essentially that.

Now, in Rock you could also perform some proof automation and do the cases analysis with the help of the program. In any case, what's essential happening is the construction of a a term with a given type.

From a purely formal and naive point of view, a proof done by mindless case analysis in rock or lean is just as valid as any other. However, there are valid criticisms to be made against, say a proof that does automagic pattern matching or a 1000 copy pasted lines that solves 500 cases.

I'd say that a good proof should still follow the Guarantee+explanation mindset. Even if the proof is automated in Rocq or lean, someone who knows the language should still be able to grasp the main ideas behind the proof and not just trust the type checker blindly

1

u/henke37 1d ago

Usually a question includes, implicitly or not, an arbitrarily large number. It is generally accepted that there is an infinite amount of such numbers, so your number of cases is infinite. You can't exhaust infinity.

1

u/Professional-Buddy42 1d ago

It counts, but you’re not guaranteed to find a solution before the heat death of the universe!

0

u/Intrepid-Struggle964 2d ago

https://github.com/Wesleystone88/Proof-Cairn-Shelf/blob/main/OUTSIDER.md check out my idea here, im aiming to creat something in that sort not so much autonomous but a place where we can break down what we do know so expanding out can be easier

0

u/InterstitialLove 2d ago

That is a proof, 100%, it's not even uncommon

Constructive proofs basically always are instructions on how to create a proof for a given input. For example, Euclid's Elements, I believe the first proof is the existence of an equilateral triangle with a given side length. You start with a side length, and Euclid explains how you would find the triangle for that side length. He proves that this will always work, and so we conclude that it must be true for all side lengths

If that's not what you're referring to, then you'll have to be more specific. If you mean that the algorithm isn't required to be known to work, you have to run it to find out, then obviously that isn't a proof at all

0

u/FernandoMM1220 2d ago

it counts

-2

u/Jmc_da_boss 2d ago

I mean this is basically what LLMs with lean are doing lol.

It's a statistically directed search and verify algo.

It's like "A(i)*"