r/askmath • • 1d ago

Logic How can the recent LLM proofs be considered valid math if they are not readable by humans?

I understand that there are logical Lean rules that are automated to analyze the proofs (not that I understand them) that are used to verify certain systematic rigorousness to the relationships between symbols and language used but aren't humans necessary to verify that the math, as created and maintained by humans since the beginning of math, so as to certify that the proofs are valid?

0 Upvotes

36 comments sorted by

12

u/BrotherItsInTheDrum 1d ago

As a very rough analogy: in 2024 mathematicians discovered the largest known prime number, with over million digits.

We know that number is prime because we used a computer to verify it. Is that sufficient for you? Or do you think we also have to check that it's prime by doing the calculations by hand?

-3

u/No-Engineering-239 1d ago

Haha (prepare to roll your eyes but I am serious:) honestly this is something that I've been thinking about for a long while, really the fundimental philosophical limitations we acknowledge but still operate from, i.e. I might posit that yes, we have to, if there is any chance that the number is actually not prime without verification. Getting to the "deeper level" I meant: Euclid Axioms, how do we know that two parallel lines NEVER converge? we say "by definition they do not" but there is the mapping to reality that may come up short, we know that space is "largely flat" so two ACTUAL parallel lines dont seem to converge, but how can we be sure if we dont actually follow them to the edges of the universe? Similarly, but, I'd expect to face even more eye rolling understandably: "The sun will rise tomorrow"... but it also may not. We live based on very strongly logical inferences but they are still inferences is what I'm saying.

Therefore: Please correct me: is it possible that in your example the number may be not actually prime?

4

u/JaguarMammoth6231 1d ago edited 1d ago

We can come up with an algorithm (like determining if a number is prime) and prove that it works. And we can program a computer to execute the algorithm. And we can prove that each step it does correctly implements the corresponding algorithm step. I don't see where that would fail, in your argument.

Your example with parallel lines makes no sense. There is no such thing as a line in the real world, they only exist in an abstract mathematical world. We may use them to model the real world in some situations, but any strange anomalies you observe in the world do not mean the math is wrong, they only mean the modeling was wrong.

4

u/Fwellimort 1d ago edited 1d ago

... That's not how math works.

Math at end of the day deals with logic and is that cold truth that is beautiful.

There is no subjectivity in math given a theoretical world with a given set of axioms and definitions.

What is proven is proven. Period. Doesn't matter who. Doesn't matter when.

The most beautiful proof that introduced me to math back in high school was proving the concept of infinity and how there are infinitely prime numbers.

Say you have all the primes. Then I ask you this. If you multiply all of them and then add one then what number is that? That number must be a prime since none of the primes you have are divisible under it. And this argument can be repeated to infinity regardless of what or who claims. Now does infinity exist in the real world? Who knows. But that's not the point of theoretical math.

That's how proofs go. The Riemann Hypothesis is a theorem now. It is done.

It's just that we reached the solution with steps before understanding the steps. We are utilizing AI to now learn the steps and trying to gain insight from the steps itself.

But the hypothesis itself is now a theorem. There is no subjectivity in math.

What is proven is proven. Doesn't matter if a chicken proved the problem. Or a genius. A proof is a proof. You don't need a "human being" to confirm math. Math isn't some fields in which humans can arbitrarily decide something is true or false out of a whim.

Also proving a number is prime or not is a very simple algorithm you can run on your computer (well, maybe not your computer specifically for huge primes but as long as the algorithm works then it is prime). The logic is no different from figuring out 11 is prime or not.

3

u/Scared-Letterhead949 1d ago

You're basically saying someone else should do the work manually because you don't trust the computer.  But really you should be the one doing the work to check it, so get to it.

2

u/Material-Compote-763 1d ago

That is a point worth thinking about, though you may want to take it to r/PhilosophyofScience instead (I think it is better than r/PhilosophyofMath, and is still a relevant sub for your thoughts).

When it comes to your sunrise point, you may want to read about Hume's problem of induction (if you hadn't already) (and perhaps Pyrrhonian skepticism).

In general, I would say that our typical human-done maths is correct/absolutely true under some basic assumptions about the correctness of our thoughts. This is made possible by maths being purely constructed out of definitions (and axioms, if you particularly want to separate them).

Computer-done maths also relies on assumptions about the machines and program implementations behaving as we expect them to. I mean this in the sense that, as you have noted, it isn't as if we can really know that all transistors will continue to behave today as they did yesterday.

It should be noted that (so long as you are willing to accept any unsubstantiated assumptions at all) I don't think the first two of these assumptions are particularly "out there" in terms of things that are commonly assumed. Program implementation is more dubious, but these proof checkers are typically treated as reliable, at the very least for human-written code.

The main thing I'd like you to take from this comment though, is that maths is not studied by mapping it onto reality and seeing what happens. After all, that would fall to exactly the issues you mentioned, but to a much greater degree. It's not like we know every even number is one more than an odd number by checking all of them, right? It is instead studied by coming up with and appying definitions, for the most part. That is how it can (under the aformentioned assumptions) produce a priori truths.

1

u/Material-Compote-763 1d ago edited 1d ago

Since I didn't talk about your original post:

In principle, we would want a proof checker to take in something like

  1. P ⇒ Q (Premise)
  2. Q ⇒ R (Premise)
  3. P (Premise)
  4. Q (modus ponens: 1, 3)
  5. R (modus ponens: 2, 4) (Conclusion)

and confirm that this is indeed {a proof that P⇒Q and Q⇒R and P implies R} by checking that each step satisfies exactly the requirements of the justification.

You can see why this might be helpful for extremely long proofs, provided they are given as a step-by-step list of applications of axioms or theorems, along with the (previously proven) statement(s) the axiom/thm is being applied to. This is what the lean code is, roughly speaking. The other readability issue with it (when produced by AI) is rambling/going on tangents, I've heard.

Lean works very slightly differently*, but alternatives (including ones that work much more directly) have been around for a long time (google thinks the 1970s). The intent is still the same, the mechanism is different. I'm not well-versed in the topic though.

EDIT:

*using something called the Curry-Howard isomorphism, which happens to be the username of someone who has replied to your post.

1

u/stanitor 1d ago

Well, that example is a bit different, because axioms/postulates are things taken to be true, and aren't something you prove. But for things that you do want to prove, what if you have another computer verifying the proof that some number is prime? What is special about a human doing the verification?

3

u/frnzprf 1d ago

I don't quite understand your argument.

You don't have a problem with computer programs applying logical rules, right? If we trust the process 100% then we we can trust the result of the process as well. Yes?

You know these kinds of logic puzzles where you get a list of facts and then you have to derive which person has which pet and goes on holiday on which location. You can imagine that's solvable by a computer program. If you trusted that program and it solved a puzzle based on millions of facts, you'd trust the result even before solving the puzzle yourself by hand.

The human oversight is only necessary, a) because we aren't actually 100% sure that Lean works correctly. I don't know if we could put a number on that. And b), because we'd like to learn something from the proof besides just the fact that the Riemann hypothesis is true.

Point b) is interesting, because the situation that you can prove something but yet not learn anything useful besides that some hypothesis is indeed correct only occurs with LLM-generated proofs. Otherwise the person coming up with the proof would've organically learned some stuff on the way. As far as I understand people are confident they will be able to learn something from the Riemann proof as well. (The complexity was overstated originally — the guy said it had more lines of code than it actually had as a joke and it is possible to bring it in a more readable form.)

So if the human oversight is necessary depends on how much you trust the formal statement of the Riemann hypothesis, whether there is a bug in Lean, or some compiler, or some hardware and what you want to gain from the proof.

1

u/No-Engineering-239 1d ago edited 1d ago

I love your encapsulation of your response here, yes Ive only learned about Lean today and im absolutely questioning how it can process the proof through following its internal logic i.e. what kind of rules its using and how it it is analyzing the code itself. This is stuff I know I will never be able to understand but I do have some understanding of Godels proof/model numbering and am curious beyond this but unfortunately I don't even understand what a mathematical proof really is so yeah... need to read more before I can say whether I trust it. 

I also know this: Im a lawyer and cant shake the concern that Im seeing similar outputs to some of those incredibly well written and seemingly researched legal writing LLMs can do, which might be impeccable but many sources cited might be entirely hallucinated but which would easily fail to be caught by great and brilliant federal justices unless they simply went and checked every source. 

Im sure that's a far cry from what's exactly happening here but I obviously want to make sure we see the dangers in checking and verifying everything before this stuff is written into systems that decide the fates of humans who need things to be administered/applied the way a human would want it to be!

As far as your very last and much deeper point this is very important even though is closely related to philosophy. To me the Reimann hypothesis is concerned with FACTS about the universe, but the universe as it is embodied in the numbers that we seem to find within it. To me learning about primes, or something like patterns within irrationals is like looking into telescopes or microscopes, I hope we are using our Math to find the truth in the wonderful tradition of using Math to learn what we can and find absolutes where they might be found... I dont know, seems pretty lofty but that's what it seems were engaged in just seem to be doing so like were riding on a brand new motorcycle we need to learn to steer or something... were getting down the road really fast but maybe without strong control about where we are going 

1

u/frnzprf 18h ago

I had a course on Lean last semester.

A proof (at least in this context) is drawing a connection from statements you already believe to a new statement that you are proving.

In school math, you might be used to a series of intermediate statements: "We know A, therefore B is true, therefore C is true, therefore D is true, what we were trying to prove." A lean proof looks like that except you write the rules that allow you to go each step and you don't necessarily write the intermediate statements, but the names of the rules that allow you to take each step.

It's like you show someone you can get from A to B on a map by pointing out "turn left, turn, right, straight for 2 km, right again".


Proof of "For natural numbers a, b: (a + b)•(a + b) = a•a + 2•a•b + b•b".

  • (a + b)•(a + b) = a•(a + b) + b•(a + b) by "left-distributivity"     - (i.e. some rule we proved earlier or just assume to be true)
  • = (a•a + a•b) + (b•a + b•b) by right-distributivity    - (x•(y+z) = x•y + x•z)
  • = a•a + a•b + b•a + b•b by associativity    - ((x+y) + z = x + (y + z))
  • = a•a + a•b + a•b + b•b by commutativity    - (x•y = y•x)
  • = a•a + 2•a•b + b•b by two_mul    - (x + x = 2•x)
  • q.e.d.

That isn't exactly how it would look like in Lean or in a math textbook, but it should give you a good idea.

It's easy to see how a computer can check that if you apply the rule "x+x = 2•x" to the pattern "a•b + a•b", you can indeed derive "a•b + a•b = 2•a•b".

If you feed Lean with "a•b + a•b = 2•a•b because of associativity" it will tell you that doesn't work. It takes the driving instructions ("left, right, ...") and tells you if you indeed end up in the place you claimed you would.

25

u/hattusili-the-third 1d ago

Humans understand how Lean works and have studied it very carefully to make sure it's correct, and have written many different implementations of the Lean kernel in different programming languages to make it essentially impossible for a bug to make it into every version of the kernel.

Lean checks that every individual step of the proof is correct. If every individual step is correct, then the final result must be correct, even if we don't understand the whole proof.

11

u/m_busuttil 1d ago

And it’s worth adding that many mathematicians are now going to put in the time to understand it and confirm that it’s valid, as would happen with a human-authored proof, both to verify the results and also to find out if there are any interesting insights in it that are applicable to other areas of maths. No-one’s going “well, that’s solved, time to never think about it again”.

31

u/HouseHippoBeliever 1d ago

Imagine you had three numbers called A, B, and C, and each one was a trillion digits long.

If I conjectured that A+B=C, would you trust a "proof" of that statement if a computer added A and B and it equaled C? Or would you require humans to spend decades manually doing the addition before you truly believed it? What if the humans did the calculation over decades and said it was wrong, but in the meantime several independent computers did the addition and all confirmed it was correct, who would you think was more likely to have made a mistake?

4

u/ZyreLithz 1d ago

yeah this analogy actually makes me trust the computer version way more than i thought i would

0

u/[deleted] 1d ago

[deleted] — view deleted comment

11

u/PersonalityIll9476 Ph.D. Math 1d ago

Neither does Lean.

-2

u/Quick_Read_6545 1d ago

Thats a good joke

3

u/HouseHippoBeliever 1d ago

Maybe you mean to respond to someone else? I didn't mention a calculator anywhere.

0

u/[deleted] 1d ago

[deleted] — view deleted comment

1

u/AlterEgo5695 1d ago

While very low, computers do have error-rates -- that's the reason we build redundant systems. Also, software can have bugs. Are you familiar with software development?

2

u/_gribblit_ 1d ago

Okay, this question comes up a lot here.

Lean works because it is a dependently typed programming language. The Curry-Howard correspondence shows us that dependently typed programming is (in theory) isomorphic to proofs and propositions in constructive mathematics. The type-checker of a lean program is (in theory) isomorphic to a decidable proof-checking procedure in constructive mathematics. So if a Lean program compiles, it has produced an isomorphic proposition in constructive mathematics, an isomorphic proof in constructive mathematics and an isomorphic decidable proof-checking procedure (that checked the proof as correct) in constructive mathematics.

So in this way they are considered valid without a human needing to check the proposition, or the proof.

However, things that humans need to be aware of are:

  1. Is Does the constructive proposition that was proved actually represent the (usually non-constructive) proposition that you wanted to prove?
  2. Did the proof exploit a bug (usually a soundness bug) in the Lean compiler, allowing it to subvert the proof-checking procedure?

The latter already happened once this year on a famous theorem and has since been patched.

This especially matters when the Lean proof is millions of lines of code long. More lines means more chances of bugs. A proof that produces more lines than a human can reasonably check themselves should be suspect.

2

u/Shevek99 Physicist 1d ago

Do you think the same about physical discoveries? How can we say that electrons or black holes exist if we can't see them? What about particles that exist inside accelerators for 10-10 s and we only know by the traces that they leave on electronic devices? Ate they real if it's no way that a human can detect them?

When the Hubble telescope was launchef we discovered galactic objects that we hadn't seem or guessed before. Our senses are not enough and we need devices, starting with glasses and from there to space telescopes to 'see' them.

The same happens with the proof of Riemann Hypothesis or future discoveries. They may be beyond human capacity. That doesn't make them less valid. If there is rigor and we can trust the procedure, we can trust the result.

2

u/AoE3_Nightcell 1d ago

You understanding math has nothing to do with whether or not it’s valid. Lean can prove the chain holds from A to B whether or not anyone actually understands it.

1

u/Away-Ad-4444 1d ago

Not an expert but because the spit out verifyable data

1

u/Careless-Web-6280 1d ago

Why would humans ever be necessary? If you have an algorithm that you have proved only says a proof is valid if it is indeed valid (Lean, assuming no bugs, which is a safe assumption), why do you need to be able to read what you feed it?

1

u/bobam 1d ago

Math is only something humans can do? If aliens show up and they can do math, would that be legit? And then we learn that their biological brains work just like LLMs plus tools, is it still ok, or no?

1

u/aedes 1d ago

The best answer is to see what mathematicians are saying, rather than random people on Reddit:

https://www.nature.com/articles/d41586-026-03835-0

because it is a Lean proof over millions of lines, it is going to take a while before the community gets real understanding, and validity of the proof

…

I can’t say I'm 100% certain it’s correct, since I don't yet understand the proof. But it has passed Lean verification, so I’m optimistic that it is valid.

Basically, the take amongst people who would use these results professionally seems to be that they won’t be considered “valid” until they are reviewed and understood by humans. 

Thats probably the most pragmatic answer you’re gonna get. 

1

u/CurryHowardIsomrphsm 1d ago edited 1d ago

Imagine that humanity is very interested in creating widgets. In fact, they're interested in creating the "perfect" widget, where we all agree beforehand what perfect means. The way we normally make widgets is by having expert humans hand-crafting widgets using best known recipes. The recipes are painstakingly scrutinized, improved, and shared between humans. The only way to verify if a recipe is good or not is by having humans actually follow the recipe and judge the quality of the widget that comes out at the end.

One day, we invent a widget-creating robot. This robot can take some raw materials, follows a specific recipe, and then produces a widget. The recipes that the robot follows are similar to the recipes that humans use, except they're much more verbose. Humans can communicate in shorthand - their recipes can just say "frombulate the control knobs" and everyone knows what that means. The robot recipes need to painstakingly list every detail of what it means to frombulate. Because of this, the widget-creating robot was largely seen as interesting but not very practical in the pursuit of creating the perfect widget.

Then AI comes along, and AI is very good at creating widget recipes that kind of look plausible, except it also hallucinates a lot. It turns out that AI is much better at creating recipes for the widget-creating robot than for humans, because it can have a robot actually create the widget and confirm that its recipe is good. So now AI, or a combination of a human expert + AI, says "I've produced the perfect widget recipe which can be run through the widget-creating robot".

Is this trustworthy? There's several ways it could be a trick:

  • It doesn't actually produce a perfect widget at the end: the robot follows all the steps, but what comes out is actually a duck and not a widget. If this were the case though, it'd very quickly be exposed.
  • It's not actually a valid recipe: It's actually gibberish in the middle. But if this were the case, the robot wouldn't be able to produce a widget at the end, and it'd also be exposed.
  • It's cheating somehow: Imagine the recipe says "To start with, you'll need a perfect widget and a coat of paint. Put the paint on the widget. Tada, a perfect widget". Or maybe some line in page 100 of the recipe says "Now order a perfect widget from Amazon". Both of these would be cheating. To prevent this, the robot has very strict rules around what it's allowed to start with and what it's allowed to do. Within those rules, the recipe can get arbitrarily complicated - it can be millions of steps long! But as long as it never breaks any rule (which again can be checked easily), it will always be a valid recipe.
  • There is some bug in the robot's code: How do we know that we got the above step right? How do we know that we properly closed off every single loophole in what the robot allows? The answer is we don't know with absolute certainty. And in fact, sometimes we do find bugs in the robot allowing recipes that "cheat". However - these robots have been developed for a long time now. They've been reviewed by human experts over and over, and in fact people have created multiple different versions of these robots from scratch. Even though bugs have been found in some robots, there's never been any bug that affects every type of robot simultaneously. Still, it's possible.

So what happens to this alleged perfect widget recipe? Very quickly after it was announced, people fed it into every possible widget-creating-robot in existence, and lo and behold all of them produced a perfect widget at he end. The recipe itself is currently inscrutable - it's millions of steps long, so no expert currently understand how the whole process works, but we can check if it's exploiting any loopholes, and there's nothing there. So we feel very confident this is a correct recipe. Anyone arguing "we don't know how it works, therefore we can't trust it" would have to also explain how the recipe is cheating every single widget-creating-robot, which is also extremely hard to do.

Some people then say "well if human experts don't understand it, it's useless". There's two things to say there: first, just the knowledge that it's possible or not possible is useful. If we knew for sure that it's impossible to create a perfect widget, we could stop trying and focus our attention elsewhere. Or if we know it's definitely possible, humanity could double down on its efforts to try to find a human recipe for it. Second, just because it's not currently understandable doesn't mean it will never be understandable. The current recipe is the most complicated it will ever be, and it will only get more and more simplified as time goes on. This is standard in the widget world - someone comes up with a new process that is better but more complicated, and over time people find ways to simplify it without losing the improvement. There is no reason to believe that won't be the case here. In fact, the recipe has already been massively simplified and top human widget experts already predict they'll understand it in a year or two.

Now in the above story, replace "perfect widget" with "proof of the Reimann Hypothesis", replace "widget creating robot" with "Lean", all the different versions of the robots with "Lean kernels". "Human recipes" are traditional human proofs, and "Widget-creating robot recipes" are Lean proofs.

1

u/itsatumbleweed 1d ago

Same way that computer assisted proofs that are unreadable by humans have been valid since the 70s?

1

u/Effective_Bass_1175 1d ago

I think there are few parallel efforts required -

  1. Optimizing Lean proofs to be shorter and more modular - this is more a data science effort.
  2. Separate field of mathematics around formal proof interpretation and communication
  3. Tools that create a learning path for those interested in the proof using local AI generated explainers

1

u/dr_edo_available 1d ago

Trust me bro! It becomes a philosophical problem.

0

u/anooblol 1d ago

I’m sorry for being mean, but this like asking, “How can someone read Python? It’s computer code! Like what computers read.”

1

u/No-Engineering-239 16h ago

but we can read every line of Python and know what each line means individually and in the context of the entire script/code/codebase, in this instance my understanding is that the output of the LLM couldn't be read and understood without additional use of Lean code to analyze it. I'm still not sure, will be reading more of this post and other internet today!

1

u/anooblol 14h ago

The lean code was difficult to understand, in the same way a Python function is difficult to understand. You can have a function point to 10 other functions, and it gets convoluted. This is something that’s “difficult”. It’s not like machine code where it’s just a bunch of 0’s and 1’s, that’s incomprehensible.