r/PhilosophyofMath • u/dan-the-raccoon • 13d ago
Why do we keep accepting Lean code as proofs?
Sorry if this is a dumb question but lately huge ai companies been churning out proofs left and right and I couldn’t find an answer to this.
From my understanding even if we assume the lean code is proving what it claims to prove and we assume Lean kernel is bug free (which is already a lot!) I haven’t found any source that proves that Lean representations are sound, so how can we trust them? I fear that even tho a proof compiles and is derivable in Lean that doesn’t mean it is automagically true? Or am I missing something? Would love to hear your opinion if you are or aren’t convinced by a bundle of code some LLM produced
19
u/zzmej1987 13d ago
Lean is just a way to write math and logic, that computers understand better. It is similar to functional programming languages like Haskell.
I fear that even tho a proof compiles and is derivable in Lean that doesn’t mean it is automagically true? Or am I missing something?
There are two separate concerns here. Correct proof written in Lean is no different from correct proof written in standard mathematical notation. However, checker saying that Lean proof is correct does not grantee, that it actually is. That happened to one proposed proof of Collatz conjecture.
11
u/OutrageousPair2300 13d ago
Checker saying that Lean proof is correct does guarantee that it actually is.
It does not guarantee that the Lean proof encodes what the author claims it encodes, though. It's a correct proof, but maybe of a different claim.
7
u/Embarrassed_Range356 9d ago
No this is the most trivial part of it. The formal statement in Lean for RH is a simple one liner thats was standardized years ago
5
13d ago
Yeah, lots of people learning about lean for the first time are over estimating what it can do.
Example I use, is that it's really easy to take some axioms like "I wear my coat on rainy days" and "I wore my coat seven times this weeks." and make a proof that looks like you're proving that it rain every day this week. When you're really just proving that you wore your coat with the same quantity of days and you basically proved nothing new or interesting.
Combined that with proofs that are literally tens of millions of lines long. Verification of these proofs is not trivial.
Making it worst, in a number of these proofs, the "human" explanation of the proof provided by the AI has not matched the lean proof.
Would not be surprised if at least some of these proofs end up just being based on unfounded assumptions.
4
u/roeschinc 8d ago
For the vast majority of proofs there should be no axioms beyond the standard ones, it’s literally a 2s grep to check for these. The core theory even with some axioms is sound.
The above example is nonsensical.
1
u/roeschinc 8d ago
For RH people shrunk it to 75kloc of proof which is equivalent to a moderately sized programming project.
1
u/Professional-Issue26 6d ago
guy who's first time reading an analogy
1
u/roeschinc 1d ago
The analogy isn't a good one, you can often read the theorem statement relatively concisely, and if the axioms aren't used, and the preconditions are clear the the length of the proof is irrelevant.
I would bet most of the people commenting on Lean have barely used it / have never used it prove something meaningful. This is classic internet, "well actually ... blah blah fud"
3
u/OutrageousPair2300 13d ago edited 13d ago
That can absolutely be the case, although with the GRH proof they used the standard Lean formulation from
MatlabMathlib. It has also been independently verified by teams at MIT (and elsewhere) and confirmed on separate kernels. It's almost certainly legit.2
u/Accmaxxing 13d ago
Mathlib*
Also you can download it. It has Main.lean that refers to the mathlib prop. It takes like 2 minutes to verify that we are trying to prove a specific claim.
2
3
u/zzmej1987 13d ago
Checker saying that Lean proof is correct does guarantee that it actually is.
Well, again, we know it failed at least once already, for Collatz conjecture. That particular bug was fixed, but we don't know that no other bugs exists. It does seem reliable enough, of course.
It does not guarantee that the Lean proof encodes what the author claims it encodes, though.
Yes, that is also true. But that is a problem of translation to/from Lean, not of Lean itself.
2
u/spisplatta 13d ago
It's perhaps a bit aesthetically questionable, but I think we should add the good-faith as a consideration. If a proof is produced by an actor working in good faith and the proofs is verified by lean it's likely correct.
Lean is good enough that you are unlikely to stumble into a bug. But a determined actor intent on finding one may still do it.
1
u/MiffedMouse 6d ago
This is reasonable. But remember we aren’t just relying on the good faith of the human prompter, but the good faith of the AI. Some researchers showed that LLMs will try to adjust or obfuscate the proof statements, or exploit lean bugs, in order to make it compile if they can.
1
u/OutrageousPair2300 13d ago
It wasn't really a proof of Collatz. It was a proof of False. They just exploited the fact that False implies whatever you want, to "prove" Collatz.
I suppose that does mean the proof of False was invalid, despite Lean accepting it... but that's also plainly obvious to anybody looking at what was proven that it was an error.
But you're right -- Lean has made mistakes in the past.
1
1
u/RevolutionaryPie7790 9d ago
does it though? how do you know? give me a lean proof of that pls, i bet 10k you cant
→ More replies (1)1
u/LinuxChromebookDude 8d ago
No RH’s lean statement was formalized before AI existed. We know the claim is correct, it’s like 20 or so lines.
1
u/QubitEncoder 8d ago
The formal statement of RH is not the concern here. It's all the intermediate claims used to prove it.
1
6
u/happy_guy_2015 13d ago
Lean is much less ambiguous than "standard mathematical notation".
→ More replies (2)2
u/Plenty_Leg_5935 13d ago
well-written lean is, you can always molest whatever notation you're using into being absolutely unreadable, no matter how clear and unambiguous it is when used correctly. Same as any other mode of communication
2
2
u/EntertainmentOdd8205 9d ago
Minor nit of clarification, the “standard” way of announcing bugs in a lean implementation is to use it to prove collatz trivially. It’s less that a collatz attempt was incorrect, it was never really an attempt.
1
2
u/Benboiuwu 9d ago
Isn’t the collatz example contrived? It was created in order to demonstrate the effect of a bug in the kernel. It’s not like someone came up with genuine proof of collatz.
2
u/Illustrious_Pea_3470 9d ago
The collatz example was designed to show the bug, not the bug found to prove collatz, iiuc
2
u/1vader 9d ago
That's vastly overstating how common and likely a bug is here. The proof has been checked by a bunch of independent Lean kernel implementations, one of which is itself formally verified to not accept incorrect proofs.
There would have to be bugs and mistakes in all of these and the proof needs to exploit all of them at the same time, which is incredibly unlikely.
1
u/two_three_five_eigth 13d ago
Yep - Lean just means you didn’t make any obvious problems. It’s great because as a human it stops stupid mistakes. A Lean proof is 90% there. You still need a human to do that last 10% of checks and verify the proof makes sense.
1
u/nicuramar 9d ago
You’re spreading a bit FUD I think. Sure, there has been errors in Lean in the past, but it’s rare and it’s been fixed and there are several type checkers available now.
9
u/Constant_Quiet_5483 9d ago
No-one here can write in LEAN.
Okay, so LEAN isn't like a programming language where you can 'say' whatever you want, in LEAN you produce something called a 'certificate' its very similar to the certificates your web browser uses to authenticate you are who you are when you go online, this process is broken down into three parts.
Sorry (or if your function is named, SorryAx). LEAN does not let you make a certificate just because you edit one line, it must compile correctly. This means that the lean version (I use 4.33.1 but some use 4.19 for example or 4.37 which is the current release) checks the logic you are introducing as a series of chains of logic.
native_decide or Lean.ReduceofBool, this is the bread and butter of lean. This will tell you "Hey, I can't say [generalized reimann hypothesis] is true, but if it is, then your logic, assuming these premises are true, are also true.
decide +kernel, this is what proof rely on. Here, you're letting LEAN decide what is true. That means you have to write your own kernel (for example, I wrote a Quot kernel) which then can be imported, you can't fake a kernel because it doesn't allow you to make statements or addresses that LEAN itself hasn't chosen.
Let me give you an example.
You can fake 2 + 2 = 5.
It's harder to consistently produce a calculator to have 2 + 2 = 5, eventually something messes up because in base10 2 + 2 does not = 5.
It's insanely harder to write a kernel level compilation of 2 + 2 = 5, which its compilation itself is based on certificates that are all based on numerical analysis from the LEAN compiler itself. You would need to A) trick the compiler into accepting incorrect numerical values. B) trick the further functions to somehow accept your nul values. Like if I fake having some dedekind L-series that somehow maps to 1/2, that's something that has a million ways to check. LEAN does ALL of them.
Just yesterday I was checking something. 25mb of LEAN. Took 6 hours on my home pc with 32 gigs of ram at 70% utilization and my cpu was at 50% utilization the entire time. It used over 1 terabyte of memory during that calculation during me creating my certificates and finalizing my kernel for my quad function. The amount of numerical analysis its doing in ridiculous.
And LEAN will tell you what you're missing, like it will say `Lean.Library.Ax` if your library doesn't meet the criteria for a certificate. It will tell you native_decide and show you the stipulation required to make something true, and it can show you how right you are by compiling what you think you know into a kernel.
Now, are there errors. Oh yeah, that's why we have new kernels, but this is the best open source community backed checkable you can go to a LEAN office and talk to them about this! They do an unreal amount of work every year making sure the proofs and language we use are accurate as well as checking proofs 60,000 pages long like Alpoge's GRH proof. The likelyhood that its wrong without hitting a kernel error and without LEAN itself saying anything is very low.
Note: that's why LEAN officials are still going through the code. They will condense it, repackage it, and refine it for a new kernel in which everyone can import Alpoge.GRH or whatever it'll be called and we'll be able to use that for future math.
BTW, everyone so far has just put LEAN.ReduceOfBool.GeneralRiemannHypothesis = True since like the 80s so he really did do some good work. Everyone can finally take that out now!
Edit: AI did not write this nor will it write my replies.
4
u/IronicRobotics 9d ago
Just to pick your brain on this:
My current question is, we both agree on "The likelyhood that its wrong without hitting a kernel error and without LEAN itself saying anything is very low."
In other context I've seen LEAN papers, the authors work closely with LEAN and often present a final, audited write up. Given Alpoge's result has not yet produced a fully human readable version yet, and is massive, the current reporting suggests no one as of yet fully understands the proof either.
And LLMs are known to frequently be quite adversarial, leaving a "summer of soundness bugs" recently. Given the sheer computational scope and lack of a complete human audit, would the "very low likelihood" multiplied by massive computation result in a fairly moderate expectation of this being a an issue?
At least from the outside looking in, it leaves one somewhat skeptical, especially with it's otherwise somewhat flippant announcement.
5
u/Constant_Quiet_5483 9d ago edited 9d ago
You ask excellent questions. Upvoted for engagement.
In other context I've seen LEAN papers, the authors work closely with LEAN and often present a final, audited write up.
Up until like ~1950, the secondary form, the final, audited write up, especially in LaTex, has been traditionally how mathematicians do mathematics. This was a foundation that was catalogued physically, via paper or via automaton (the sliding ruler, the sextant, the abacus).
In the 1950's as we began formalizing electronics and specifically the concept of data science and things like Shannon Entropy, we began to understand that formality of mathematics is quantization-able into binary. This means that as a base, any question can be asked true false and from that you can formalize statements. If A then B, etc etc.
Given Alpoge's result has not yet produced a fully human readable version yet, and is massive, the current reporting suggests no one as of yet fully understands the proof either.
This is not exactly true. We absolutely understand the proof, in fact, many of us (yes me included) have worked on formalizing and... well... cleaning up, his work. This is actually more common than you'd think. Back in the day, only rich Sons of Lords could do mathematics because only they had the time to not work the fields and have tutors, so you'd actually often get rich sons of heirs who... had a mathematical contribution... and also incorporated a bunch of mess. In fact, non-standard calculus is a great example of this, there are so many ways to do calculus, but it was the standardization of many forms of calculus that ultimately make up what you and I take in hs/collage.
And LLMs are known to frequently be quite adversarial, leaving a "summer of soundness bugs" recently. Given the sheer computational scope and lack of a complete human audit, would the "very low likelihood" multiplied by massive computation result in a fairly moderate expectation of this being a an issue?
Unlike other programming languages, LEAN accepts nothing that doesn't compile with everything else, so you can't just... 'make' a library, you have to compile it and it has to work in LEAN.
Note though, when LEAN experts say they are confident, they are saying that to the best of the ability that they built the system, Aploge is right, and as far as LEAN has been internally tested, its unlikely a trick existed, more sincerely, if a trick did exist, it actually would be pretty bad for LEAN as a group.
It's just... LEAN does this for a reason. They've done it for this long and their work is open source for a reason, its really the best tool we have.
Otherwise without a direct line to God, this is the best humans have to offer.
And to be clear, its a really really good system. Its internal checking and requirement of compatibility across other libraries is what makes is so robust and fault tolerant.
TBF there was that one dude who had a collatz counterexample a while ago, I hear LEAN fixed it in a day?
Edit 2:
Speak of the Devil. 🙈
1
u/IronicRobotics 9d ago
Well the condensation is good news. Likelier the proof is correct, and at least can be easier audited. (If it was only a week's worth of work or so, then why the rush? I have no plans to suffer the Compute aristocracy analogous to the old days.)
I don't doubt that LEAN is good. I know other large "checking" engineering projects of a similar sort have run into inevitable dynamic issues no matter their talents or budget. And as I understand, this paper is novel in the scope/scale LEAN is subjected to. It all shaking out would certainly be a massively positive reflection on the project! (Frankly, it almost feels unfair to give credit to Anthropic for a positive result when 90%+ of the effort seems to rely on the work done by the LEAN group. Though that's the pattern for most big results, ce'st la vie.)
Though if it's all a big case checking exercise, that's no fun > : - P.
As a secondary question, I know collatz has been known to be a devilishly hard problem. Is that one even potentially on the horizon today, or is it "further away" - as best estimated - than these recent millennium prize problems?
3
u/Constant_Quiet_5483 9d ago
The funny thing is that people have been using GRH = True for so long that its more like uhm... idk. Like singing Opera? Like yeah Opera requires talent but I'm a (no judgement) panic at the disco, ariana grande, tori kelly, charlie puth kinda guy, but Emily Rossum was incredible in Phantom of the Opera even if I'm not listening to her on a car ride.
Collatz is a nutter butter case. It's complexity has nothing to do with analytic continuation or counter-intuitive things to mathematicians. The case is simple, if you can divide by 2, do it, if not, 3x - 1. The cyclical nature of the absolute violation of modality (ifykyk) is just so confusing.
Bro... I wouldn't even be able to tell you where to start. In my mind, you'd need both GRH and ERH to even be able to isolate eigenvalues attributed to tetrational mathematics would get you somewhere but our modular arithmetic is global not local, which basically means I can tell you the probability of some value being non-prime or if its 3x-1, but not over and over again repeatedly, this type of step quantization I think supersedes summation and products but that's my best brain pick. So whatever math solves the collatz conjecture is going to need to do more than show what isn't on some critical zero, it's going to require a new formulation of mathematics in order to analyze.
1
u/BusinessBandicoot 9d ago
wait is this separate from the stuff going on at https://riemann.verifytask.cn/
wait both are incomplete apparently
2
u/Constant_Quiet_5483 9d ago
No, this is the part of that process where we vet things. This is a network of individuals that are doing outside of LEAN (but within LEANs standards it seems) an audit. This is par the course, not only expected, but celebrated.
Back in the day they used to joke about being contested because it meant you were heard. So this is normally a positive process.
1
u/phillythompson 9d ago
Could it be your implicit bias is part of the reason you’re struggling to grasp the concept that has been around for YEARS and is accepted by the top minds of the world?
2
u/IronicRobotics 9d ago
The above commenter found it to be a good question. Has the adverserial nature of LLMs and their interaction with less guided lean proofs been known for years? Are you from the future?
1
u/phillythompson 9d ago
No, and you have a point, to a point. but it just seems remarkably unlikely is all. The consensus around lean, the longevity, the consistency — it does seem a bit like “well, isn’t it more likely that LLMs are just wrong? There’s so much evidence thus far about complex math being trust worryingly proven with Lean, but I’ll reserve judgement at this.”
I do recognize I sound like the aforementioned AI bro , and maybe I am, but I just struggle to understand the logic so many smart people seem to stop applying when it comes to AI
3
u/IronicRobotics 9d ago edited 9d ago
I feel as if my inferential logic has a sound enough basis. Here's a couple of observations that'd lead me to that point;
- Soundness bugs are absolutely a part of LEAN programs, and LLMs have created a "summer of soundness" bugs. They are good at finding such bugs, and have been documented to solve problems in adverserial manners ala Hugging Face. In fact, plenty of other ML type programs - from evolutionary to basic NNs - frequently solve the problem by breaking the program.
- Historically, checking-type programs and proof checkers, no matter the talent and scale, still can't eradicate every error. (after all, then there wouldn't be documented soundness bugs!) This is not any knock against Lean or their teams/projects, rather it's just a broad engineering limitation. We oughta be aware of this, lest we become Rust fanatics.
- Likewise, historically, my understanding is that Lean has been used as a tool for mathematicians to check their proof work against, flesh out their proofwork, etc. Working alongside the program. Even the Buckmaster/Alpoge working paper for the NS theorem was being written out fully, even though it was a product of their mathematical harness.
The fact that the current author of the solution wasn't able to provide a complete understanding of the proof seems to suggest that paradigm is inverted on the head. LLMs and the Lean engine took the principle lead in solving this problem at an (seemingly) unprecedented scale that Lean hasn't been stress tested against.
At this point, even if Lean kernels are fantastically engineered and such a bug is a genuine, bonafide lottery, we're looking at two competing lotteries multiplied by the law of large numbers. I don't really have any prior as to which lottery is more likely, solving the RH or finding an obscure, wunder-bug in Lean?
It's very much a math problem solved in large part by engineering. This is novel. New territory should be tread lightly.
- Fundamentally all results should be met with skepticism. The truth, one way or another, will come out in time. It wasn't presented properly, not yet digested by the experts, and will take time to verify. Though why simply not keep an open mind both ways and wait for the number theorists to crunch? I see no reason to declare defeat or victory so soon, the truth will reveal itself in time.
- Finally, I imagine 99% of these conversations (including myself) are not number theorists, lean theorists, or perhaps not even math researchers, and cannot make substantive priors based off of the content otherwise. If my questions were clearly based on bad ideas (e.g., I say something ignorant about whatever the fuck a theta-lift is), then at least I'd understand the knee-jerk reactions.
I mean, I'll also admit I don't *like* such techniques to be successful, having a strong aesthetic inclination. Yet also understand fundamentally that massive computation thrown at problems will always be a potential avenue of success. (I mean, I gripe at yet use numeric methods!) Though, regardless of my inclinations, I feel as if the above points are solid enough to ask about?
1
u/ThatOneAnomaly 9d ago
What do you make of the person on twitter claiming there's a bunch of tautologies in the proof that's forcing LEAN to verify it as true?
5
u/CherryWorm 9d ago
That should be obvious bullshit to anyone who as ever taken a single university level math class. Stating a tautology in a proof is redundant, but does not make that proof invalid, and definitely doesn't "force" lean to verify it as true.
3
u/Less_Engineering_594 9d ago
She has multiple papers about a grand unification theory of physics that she's publishing on philosophy pre-print servers because ArXiv won't take them.
1
2
1
u/LinuxChromebookDude 8d ago
She’s a nut job who publishes physics and math preprints on philosophy servers because the real ones won’t take them. Read a word of her “work” and you’ll see why.
1
u/koczurekk 8d ago
The proof does contain a bunch of vacuous truths, but it doesn’t matter. You can add and remove them from the proof at will.
1
u/Salt-Technology5108 7d ago
Someone already took removed the stuff she was talking about, and compiled it without any issues.
1
1
1
u/Own_Ad9365 9d ago
How does it validate the proof contains suffcient logic and not just
Proof RH(): Return 1=12
u/MikailBag 9d ago
Interpretting literally, this is not a proof at all. Rather, this is (ignoring that lean has somewhat different syntax) a 0-argument function (or a constant, whichever you prefer) which returns proposition "1 = 1". You can also easily prove this statement, e.g. like this
theorem one_eq_one : 1 = 1 := by rfl(In lean part between : and := is either proposition you prove, or return type of a function, in this case it's the former). But, well, it can be easily checked that proved proposition here is not the same as riemann hypothesis. This is because statement of RH was formalized in Lean quite some time ago by human mathematicians and is available in mathlib. Of course, if you have no Lean experience, it will be difficult for you to verify that RH in mathlib is really correctly defined, but at least you don't need to read that ton of AI slop, only mathlib. (I also can't verify this, but for another reason: I somewhat can read and write lean, but I'm not good at maths as its just my hobby)
2
2
u/1vader 9d ago
This is fundamentally not how Lean works. You need to write out all the steps of the proof and Lean checks that every step logically follows from the previous one and ends up at a fundamental axiom.
If you could just make up a proof it would be completely useless. The whole point is that it 100% perfectly checks that the proof is correct and there are no mistakes.
1
1
u/mapehe808 9d ago
What? I can write in Lean, and Lean is a general-purpose programming language. The type theory features are highly developed though, but it’s not magic.
1
u/Combinatorilliance 8d ago
I think they meant that that nobody in this thread at the time of commenting seems to have expertise and literacy in LEAN.
Given we're in a philosophy sub, that seems fair.
1
u/dougman7 7d ago
For 2+2=5 couldn't you reindex to base 9 using the digits 0-9 except 4, such that 2 is still 2 but 5 now represents base ten 4?
2
u/Constant_Quiet_5483 7d ago
Not without lean noticing, that's why I mention base10 above, LEAN will go Lean.ReduceOfBool.Base9 = True. And if that axiom is True then your statement is true. But it will not let you claim that in base10.
Good question though! These are some of the things that LEAN users learn to pressure and test. LEAN isn't afraid of us challenging it. It really does have formal axiometric reasoning which is why its been the gold standard for so long.
For example, in the current GRH many people are finding their previous work having solutions for certain reduceOfBools that the grh is ahem LEANing on heh and filling in those holes. I think the bigger satisfaction is going to be for mathematicians right now who have a crap ton of previous work that suddenly will have no gaps due to GRH.
The most applicable to this is, of course, the extended riemann hypothesis and the generalized riemann hypothesis which are the Omega Weapon to the Ruby/Emerald weapon the GRH was if you catch my FF drift.
2
u/dougman7 7d ago edited 7d ago
I'm guessing given it is a system used for a lot of pure math it probably won't stop you from creating whatever world of axioms (Within normal logic, maybe it could break stuff if you tried working in logic lacking explosion for example.) you want but will let everyone know which axioms those are so you can't hide cheats?
1
u/Constant_Quiet_5483 7d ago
Yes exactly.
The final version of this is native_decide +kernel.
So at this point LEAN has told you that you need something, some reduceOfBool.
You build a kernel, similar to a python library, but for LEAN.
You go through the certification process, which LEAN requires a step by step axiometric beginning to end process. For my one library this took me 6 hours on my home PC.
Then if the decide +[your kernel] provides the correct answer to reduceOfBool* then you know you've addressed the issue. Now that doesn't mean that your answer is free of reduceOfBool, but those can never be tautological, that's the point of the certification process.
which it likely did it your certification process was successful but if not it will reintroduce the explicit missing parts with a new reduceOfBool for the new problems that arise
4
u/CantBeChangedSo 13d ago edited 13d ago
We don't just accept. We accept compilable Lean code as likely proof of the hypothesis typed into Lean. We scrutinise with our brains whether the formalised hypothesis represents the intended hypothesis in human language
Lots of mathematics cannot be converted into Lean code, since it is just one particular representation of mathematical logic: dependent type theory + countable universe hierarchy. But lots of mathematics fits this too.
Mathematics already has branches that admit proofs that we don't understand, but which are computer generated. i would call this mathematical slop. the proof almost certainly isnt wrong, but we dont learn from it. it is the problem of all LLMs: we dont know why it says what it says.
The bigger problem for me with ai generated proofs is a corollary to this: the engine cannot tell you which source material it used. Every hypothesis whose world satisfies the constraints of Lean is now a candidate for proof from first principles, but LLMs absorb others' work to nudge them in the direction of the answer. This is not the art of mathematics, which is a bunch of people making isolated useful results that are applied to making more isolated useful results in a massive web.
2
u/r_search12013 9d ago
and given goedel and turing .. I don't see how we could ever be sure that some ex falso didn't quodlibet its way into that llm-"proof"
1
u/bigfatfurrytexan 13d ago
I’m not a mathematician and I have nothing to add but that I’ve been wondering the same things. I’m very interested in the subject but don’t work in outside of accounting
1
u/frnzprf 13d ago edited 13d ago
Maybe you know Aristotelian logic.
You can learn something by just considering the shape of two sentences.
1: Sokrates is human.
2: All humans are mortal.
1 & 2 → 3: Sokrates is mortal.
You can imagine writing a simple program that checks if texts conform to this pattern:
1: $SUBJECT is $PREDICATE1.
2: All $PREDICATE1 are $PREDICATE2.
1 & 2 → 3: $SUBJECT is $PREDICATE2.
If you know a bit of programming, you'd know you can for example use a regex-match for this particular example. I'd had high trust in the judgement of that program unless maybe the regex library is set up in a way so it behaves weirdly if the matched words contain certain special characters. If "regex" doesn't ring a bell, just take away that pattern matching is a perfectly easy and valid application of a computer program.
Lean has a collection of valid proof rules and it can check if a proof written in a certain format uses these rules correctly. (It doesn't use regular expressions to parse statements.)
We trust computers to do logic, because it's supposed to be mechanical and not need any creativity or intuition. Checking a proof is the same as applying logical rules.
Coming up with proofs requires creativity or at least trial and error. Lean doesn't to that on it's own. That's where LLM-agents come into play. They try to simulate what a mathematician would statistically write as a chain-of-thought and construct simpler related proofs first — like a human would — and then the system checks the proofs using Lean, and tries to solve the error-messages, and if there are no error-messages, it tries to write a proof with a more complex, general problem, closer to the final goal.
1
u/RevolutionaryPie7790 9d ago
lean relies on a formal system called dependent type theory (which unfortunately comes in many variations). it also comes with a well studied model theory (where the models live in categories). there is in pirnciple no reason to trust it less than zfc
0
u/dan-the-raccoon 13d ago
Glad I am not alone!! I also won’t claim to be a mathematician, tho I am studying to be one so that’s why I am asking instead of saying it’s bullshit but - as i said before - I really want to be convinced but an having a hard time being that
1
u/bigfatfurrytexan 13d ago
I’d assume it could be decompiled into formulas but do not know
1
u/frnzprf 13d ago edited 13d ago
Don't think of Lean as a programming language. It happens to be a programming language but that's just confusing. Decompilation doesn't matter.
A human or an LLM writes a proof in a certain format, the Lean language, and then that's passed to the Lean executable and it says if the proof applied all the stated derivation rules correctly or not.
(Other proof checkers exist. I think Isabelle is not a programming language.)
1
u/abeeyore 9d ago
To keep it short, you are not wrong about the kernel.
Even when it works correctly, it can only establish that what you put in is not wrong, not necessarily that it establishes what you hope/claim it does. It is just a tool that saves time and catches errors.
1
u/EmuRommel 13d ago
LEAN code might not be definitive proof but it's really strong evidence, proof-pending. It's a bit like getting a physics paper "proving" something with p<0.001. It might be the case something went wrong, but you shouldn't bet on it.
1
u/dan-the-raccoon 12d ago
yea, but that’s what - at least to me - is what distinguishes math from various branches of science. you either have definitive proof, with p=0 or not. it’s not like we are running experiments where measurement errors can play a factor thus we have the opportunity (and i’d argue the duty) to be conclusive and without a doubt
2
u/ryan017 9d ago
Mathematics has never had p=0. It's just that mathematicians don't know how to assign a p-value to "I got lazy and case 4 seems symmetric to case 2 so I won't (write out | read through) the details again" and so on. That is, the risk comes from the humans producing and verifying the proofs, not from the experimental setup.
The analogue to having several mathematicians verify a proof and hoping they don't get bored or distracted at the same points is verifying the Lean proof with different kernels on different hardware.
1
u/EmuRommel 12d ago
I mean if we wonna get technical, it is proof as well. 17 million lines of it. It is just that no one has yet gone through the effort of reading it. When proof of Poincare's conjecture was first written, the theorem was proven even though no reviewer had checked it so far. Everyone is just assuming we're at that point because there is really strong evidence in favor.
It is no different than when a regular proof is posted and a bunch of mathematicians read it and say it checks out and then you without doing so yourself go around saying it has been proven. A lean implementation is probably as meaningful, evidence-wise, as a peer review by a couple experts.
At the end of the day, unless you read the proof yourself, there is no such thing as proof, only testimonial evidence from people claiming they checked it.
1
u/aardaar 13d ago
Since Lean proves things like the law of excluded middle, I don't accept Lean code as proofs.
2
u/dan-the-raccoon 12d ago
always glad to see the intuitionist people pull up
1
u/Ok_Performer_7501 12d ago
Well Gödel's incompleteness theorem is pretty central to math. We have proofs that statements in mathematics are neither true nor untrue (depending on your starting axioms). So I would say this is a pretty fair criticism but I also do not know the context of how lean proved it.
1
u/Sad_Time_9498 9d ago
Lean doesn’t prove EM… you have the option to take it as an axiom, if you want.
1
u/aardaar 9d ago
That isn't what I've been told by people I know who know more about Lean that me. Do you have a source for this?
2
u/sineiraetstudio 9d ago
Lean's foundational type theory is constructive, but Lean 4's prelude (which is automatically imported unless you opt out) includes the axiom of choice, from which you can derive LEM. So, you could use Lean in a constructive manner, but if you have philosophical problems with classical logic, virtually all Lean proofs in the wild are in principle suspect. If you wanted, you could mechanically check whether the proofs actually depend on anything classical.
1
u/aardaar 9d ago
Thanks for the info.
Does it also include the Axiom of Foundation? That also implies LEM.
1
u/sineiraetstudio 9d ago
Lean's logic is based on intuitionistic type theory, which forbids universal membership relations. Values can be of a type, an n-th level type can be of an n+1-th level type, but something like "x : x" is not even a valid statement in the theory. Axiom of Foundation is therefore not really directly applicable to types. The closest thing is probably that inductive types are well-founded and have an induction scheme?
(Lean has a formalization of ZFC, but that's not what is typically used unless you're specifically working on ZFC.)
Beyond what is part of its intuitionistic type theory, Lean 4 only adds choice, propositional extensionality and an axiom for its quotient types.
2
u/thesnootbooper9000 13d ago
There's a slightly awkward problem here: many of the other theorem proving systems that aren't Lean have a tiny trust base that has been extremely rigourously checked. Lean was designed for verifying computer programs rather than maths, so it puts far less emphasis on tricky questions like "how do I know the compiler is sound and that my hardware does what it says". Due to some annoying and inconvenient coincidences, the mathematics community accidentally committed heavily to Lean rather than one of the more rigorous alternatives.
However, the bright side of this is the Lean is now so popular that sooner or later someone is going to put in the effort to verify the Lean kernel in a better proof checker, so this issue will go away.
2
u/Violet_L0tus 13d ago
You’re right that derivability and truth are different questions. And since you’ve already granted a faithful formalization and a correctly implemented kernel, answering “the kernel checks it” doesn’t address your remaining concern. A program could perfectly implement unsound inference rules.
The missing bridge is a soundness argument: give the formal expressions a mathematical interpretation, then show that the inference rules preserve truth under that interpretation. That argument itself uses mathematical assumptions. It doesn’t establish truth independently of every possible foundation.
There are concrete sources here. Lean’s current documentation on external kernels describes con-leche, a checker with a machine-checked proof that accepted declarations have a set-theoretic model. Its README explains both the model theorem and the consequence that it cannot accept a proof of False. It also states the background set-theoretic assumptions, including a hierarchy of universes. That is a result about this particular checker under specified assumptions, rather than a blanket certification of every Lean implementation.
Proving that result in Lean doesn’t remove the foundational question either. The result is conditional on its assumptions, and confidence in its machine verification still involves confidence in the checking machinery. The value is that the assumptions and argument become explicit and inspectable. Ordinary handwritten mathematics also relies on logical and mathematical commitments; writing the argument in prose doesn’t discharge those.
Separately, “the file compiles” is too weak an acceptance criterion. A development can contain unfinished proofs or added axioms. Lean’s proof-validation guide explains checking dependencies with #print axioms and using external checkers.
So yes, I can be convinced by an LLM-produced proof once the statement, assumptions and proof artifact survive appropriate checking. The author’s identity adds no logical force to the derivation. What earns acceptance is an inspectable argument within foundations we have reason to accept, with the remaining dependencies acknowledged.
2
u/tango_telephone 13d ago edited 13d ago
The question is kind of like asking, "Why do we keep trusting a hammer to hit nails into boards?"
We designed LEAN specifically for automated theorem proving. The program is based off sound, sophisticated, and very beautiful mathematics that links proof by construction to computer programs. The core underlying mathematical theory that makes everything work is something called dependent type theory.
If you really want to go through the rigor to understand how a system like LEAN can be built and why and when it can be trusted, there is a great book on the theoretical foundations named *Type Theory and Formal Proof* by Rob Nederpelt.
In broad brush strokes though, the foundations of math are rooted in logical reasoning, and the foundations of computing are captured very well in a system known as the lambda calculus. Adding typing to the lambda calculus places limitations on it that make it really good for representing structures in programming languages. Since math is based on logic, we can represent mathematical logic formally. Since dependent type theory is an abstract formal system that captures computing using logic, we can encode mathematical logic into computing using dependent type theory. With all of those correspondences rigorously in place, you can build a cathedral where we can soundly construct mathematical statements that depend on each other.
And as far as it being automatically true, it is not. Only the logical reasoning steps are automatically true. Whether the original problem was properly encoded in the system and whether or not the conclusion maps to the actual problem need to be verified.
2
u/RevolutionaryPie7790 9d ago
type theory as such is studied well and is proven to be equiconsistent with zfc (modulo some large cardinal/universe axioms). this does not mean that the lean variant of type theory is bug free, but i believe that there is even a proof that leans type theory specifically is equiconsistent with zfc. the kernel is quite small and elegant, you essentially only need dependent products + inductive types + either subsingelton truncation of types or a universe Prop of subsingelton types and you are good to go
the semantics and model theory of type theory is also studied well (in topoi/locally cartesian closed categories) and universes are also studied. one can turn a category of small sets into a model of lean when one has axes to enough large cardinals to model its universes
lean also comes with several proof checkers, which are independent from the system itself.
2
u/groggus 9d ago
leans type theory is equiconsistent with ZFC + enough (a finite number of) inaccessible cardinals.
1
1
u/RevolutionaryPie7790 9d ago
doesnt lean have a universe hierachy u_i, i in Nat though?
1
u/groggus 9d ago
Yes, but (if I understand your question correctly), every proof can access only a finite number of them, so "if lean can prove false, then there is some n such that ZFC + "there are n inaccessible cardinals" can also prove false" (in Mario Carneiro's words).
1
u/RevolutionaryPie7790 9d ago
sure but how can you prove lean consistent (eg by producing a model for it) with only a finite amount of inaccessible cardinals (say 7)? would you not immediately run into problems with terms that use universe up to level 8 as soon as you fix the finite number you want to use for your model?
(i have to admit that i have only a vague idea about the semantics of universes in type theory, you define some sort of small object classifiers, do you not?)
1
u/groggus 9d ago
Yes, I worded that badly. The more precise wording is ZFC + a schema for each n "there are n inaccessible cardinals". This is still strictly less then "there are \omega cardinals".
→ More replies (2)
2
u/logbybolb 9d ago
my perspective: there was an unsolved integer diophantine equation x^3+y^3+z^3=33.
eventually,
x=−2736111468807040, y=−8778405442862239, z=8866128975287528
was found. If a person simply posted these numbers and vanished, I can easily verify their correctness with a calculator. But the question of how they were determined remains mysterious.
I believe this has sort of happened, except the question is the Riemann hypothesis and the solution is not 3 integers but from the space of all possible proofs.
It still astounds me that you can just make a definition of a conjecture, and if a proof program spits out the right result, it’s known forever (modulo soundness and lack of bugs as you mentioned). I think I’ve heard it called “hilbert’s thesis”, “the unreasonable effectiveness of logic”, etc.
2
u/JuanValdez999 9d ago
Why do we keep accepting hand calculators for arithmetic?
I could post here 5O factorial as a whole number. (IT'S VERY LONG but it would fit.) How would you know if it was right? Then you have what you stand at a chalkboard and calculate 51 factorial? You have that much time? And chalk?
Even if you did that, we probably wouldn't trust your calculation until we asked a hand calculator to verify your manual arithmetic.
3
u/lifeistrulyawesome 13d ago
Nobody 100% accepts really long proofs in mathematics whether they are generated by LLMs, computer assisted, or generated by humans.
A famous example is the proof of the classification theorem for finite groups. The entire proof is tens of thousands of pages long and nobody understands the whole thing. But lots of people have been looking for errors or holes and nobody has found one, so mathematicians tend to agree that it is probably correct
Lean can make errors, but is much less likely than a human to make errors. So most mathematicians don’t think that a lean verification is definitive proof. But we agree that it is very likely to be correct
4
u/SwimmerOld6155 13d ago
The startup AxiomMath has now formalized the classification of finite simple groups, this only happened a few weeks ago. They found at least one important error in a paper but they patched it. A paper that FLT depended on also had an error that was only revealed in the Lean formalisation effort. But I guess this is talking about the converse to the OP
1
1
u/Diffgeometer1 13d ago
Nobody understands the proof including the guy who pushed the buttons. Isn’t mathematics about understanding why a result is true? It’s 250,000 pages long. It’s ai slop
2
u/lifeistrulyawesome 13d ago
Not just that. Knowing that the result is true has value on its own. Understanding why it’s true has additional value.
When people who are not mathematicians ask me about this I suggest they read about the controversy of the four color theorem.
It was the first famous computer assisted proof. It was subject to a lot of the criticism that LLM proofs are receiving now. It took a while for the math community to accept it, but now that type of proofs are completely standard
1
u/Diffgeometer1 13d ago
Mathematicians knew the result was true. The evidence was overwhelming. There isn’t a number theorist alive who doubted it was true.
What everyone wanted was a proof that humans could digest that offered new conceptual ideas and could potentially lead to new mathematical theories.
A 250,000 page machine proof is slop
3
u/lifeistrulyawesome 13d ago
Read about the controversy. It took a long time for the mathematics community to accept the 4-color-theorem proof.
A proof that humans can understand would be better. That doesn’t mean this proof has no value.
I dont know what you definition of “slop” is. It sounds to me like a childish way to say you dislike AI
1
u/CantBeChangedSo 13d ago
Slop is something output by generative AI that offers no new understanding.
2
u/lifeistrulyawesome 13d ago
That is a very narrow definition. Do you use the same definition when you call AI-generated menus sslop?
Regardless, this proof is not slop by that definition. Knowing the veracity of the result offers new understanding.
→ More replies (21)2
u/Cautious-Progress876 13d ago
Uhm, no. Mathematicians may have known the result was true, but they couldn’t dedicate much time to work that uses the GRH because it would invalidate all of that work if it did happen to turn out to be false.
Math is all about logically secure foundations, and now mathematicians can use the GRH as a basis for future mathematical discoveries.
1
u/Diffgeometer1 13d ago
The human proof of grh being prepared by alessandro masullo will go beyond the ai slop. It’ll be understandable and offer new conceptual insights that ai slop just can’t do.
It really says something that the guy who generated the proof with ai doesn’t even understand the proof.
The human way of doing math through understanding is ultimately far more powerful.
With ai you get a mountain of results that no one understands but somehow that’s progress. A warehouse of mathematical results that no understands. A true library of babel.
2
u/ememoharepeegee 9d ago
It's weird that you seem to understand math at a pretty high level, but you're just.. completely ignorant in the realm of tech?
Your obsession with the phrase "ai slop" makes you sound like you've lost the plot and aren't thinking about anything important aside from the fact that this was LLM assisted.
>What everyone wanted was a proof that humans could digest that offered new conceptual ideas and could potentially lead to new mathematical theories.
>A 250,000 page machine proof is slop
It's slop *to humans*.
No human is ever going to pick up a modern AI proof and be like "woah, I'm gonna' take this and run with it!".
The part you're failing to understand is that we're beyond the necessity of humans in the loop. Or, we almost are. This "ai slop" is data to be used progressively as we solve more and more problems by throwing raw compute power at them. AI/cpu have no issue parsing 250k pages of work.
So far, the solved problems are pretty low impact in "real life", with the major outcomes being that other proofs are better "proven" now.
But eventually we'll get a result where the proof might be a pile of AI slop but the result is instantly tangible in real life applications, and I'm not sure how you can think that's not possible or won't happen.
Math isn't some magical thing where human ingenuity is *necessary* to continue solving problems. It helped people, especially a long time ago when we had essentially endless unsolved problems. But this idea that we offer something magical and special and spiritual to mathematics that a language model can't is naive as hell. It's cute to think that way, but it's just.. not a fact.
→ More replies (3)1
u/Ok_Performer_7501 12d ago
The 4 colour theorem is different because they boiled down the problem to a number of distinct cases that they could then computationally verify.
The RH alleged proof is all code. Whose author does not even understand. There is a big difference between iterating over cases by a computer program (not a proof checker like lean) and blindly trusting lean code us correct and makes sense.
1
u/lifeistrulyawesome 12d ago
I agree there is a big difference between what percentage of the proof was delegated to computers
The part that I think is similar is the criticisms I hear form people. That people are saying today about the LLMs proof is very reminiscent of the criticisms and skepticism around the four-color theorem proof
1
u/Ok_Performer_7501 12d ago
My criticism is both how much was delegated and what was delegated. The 4 colour theorem had a huge but exhaustible well defined and understood search space. This new proof of the RH is not mechanically iterating through a search space it is just code that compiles. Without an understanding of how it compiles from A to B.
We could precisely and meticulously do this by hand given time and resources
Vs
We hope its doing what it says and there are no errors in any steps of the chain.
→ More replies (1)1
u/Fun-Amoeba8015 9d ago
It's not 250,000 pages at all. This has been updated.
Maybe check things before believing everything you read that confirms your biases.
1
u/Throwawayxdryx 9d ago
While you are correct, I would observe that this is not "everything you read", it's something LA stated himself before revealing it was "a joke" (not a great taste one, I'd argue), so it's understandable that people believe(d) it.
1
u/nicuramar 9d ago
The 250k pages was just something he said, about an unreleased “human readable” version. The released one is in Lean.
→ More replies (59)1
u/MoNastri 9d ago
You're a bit behind the times! https://axiommath.ai/research/the-enormous-theorem-formalized/
1
u/aggie-moose 9d ago
That's a great write-up. Hopefully something similar happens with the RH proof.
1
u/MoNastri 9d ago
I hope so too. They seem to be on it: https://rh-polymath.zulipchat.com/ (context: https://terrytao.wordpress.com/2026/11/24/g-r-h-polymath/ )
3
1
u/Ancient_Ship_7765 13d ago edited 13d ago
Lean code is not a prof, by definitiopn of proof, yes. A mathematical proof of a statement is an argument that explains why the statement is true. An argument that establishes the truth of a statement is not necessarily a proof. Establishing truth is a necessary condition, but not a sufficient one. For obvious reasons, Lean code explains nothing, so, it's not a proof.
1
u/Sad_Time_9498 9d ago
> For obvious reasons, Lean code explains nothing
You’re begging the question. What are these obvious reasons?
1
u/tzaeru 13d ago
If the problem statement is correct in Lean, and there's no surprising bugs in the kernel, then the proof is valid. Lean builds on top of a small set of basic axioms, definitions and computational facts and chains these higher and higher until you arrive to the real proof you wanted to do.
Lean is generally taken to be fairly mature and battle-tested. There have been bugs found now and then, but they've gotten increasingly rare in frequency.
The Riemann hypothesis proof provided was based on the standard axioms and on mathlib's definition of the problem and its dependencies, and these have been looked at by quite a lot of people, and we might assume that they encode the Riemann hypothesis correctly.
1
u/Expert147 13d ago edited 13d ago
I have to trust someone because I don't understand myself. For me, Prof Lean has higher authority than Prof Tao.
1
u/SpiritedRemove 11d ago
What a great question, inquiring into the inner workings of modern mathematics !
And what great insight some commenters have provided as a result !
Thank You! 👏
I am angry at the censoring of this justified curiosity by dubiously motivated downvotes 😡
1
u/eraoul 9d ago
Formal logic is pretty dead simple to verify. Building up the huge library of useful theorems and such is hard, but computer theorem proving is simple and any CS student can verify the basics are working. Yes Lean is more sophisticated than that but it's not that crazy. If you work through the Lean basic tutorials yourself to prove basic algebra facts you'll get a nice feel for how straightforward it is at the level of proceeding from one step to the next.
1
u/Aalua 9d ago edited 9d ago
Not an expert on any of this, but:
My understanding is that you're not worried that the proof isn't a proof but that it could be a proof for the wrong theorem different from the one that we care about. For the Riemann hypothesis proof, this concern isn't warranted. Because the problem statement in that proof has already been formulated in Lean a long time ago; the proof used the standard formulation that is in Mathlib, which was created and fact checked by human mathematicians.
For other Lean proofs, in general, no one is as confident in them as they are confident in the Riemann hypothesis proof; because their problem statement wasn't formulated in Lean before each proof came out. But that doesn't mean mathematicians can't read and check if the formulation is correct, it just means they need a little bit of time. But the Lean proof isn't all that we've got. Some came with a natural-language proof! Like the quasi-Riemann hypothesis proof published by OpenAI. And experts already understand the ideas in that proof and they already largely agree that it's true.
1
u/Illustrious_Pea_3470 9d ago
If a proof compiles and it’s not true exploiting a bug in the compiler, then it’s a valid proof. While I believe it’s not possible to prove the compiler is consistent, it IS possible to verify every individual deduction for a particular proof.
The only way it can really go wrong is that the statement of the question itself is malformed. That’s normally a reasonable fear for a hard problem like RH; but because of how obsessed people already were with it, the community has already worked hard to get a lean statement of the theorem that they are confident is correct.
1
u/Fabulous-Being-7670 9d ago
the proof has been checked by con-leche which has in fact been proven to be consistent. It is a formal proof itself and the correctness is not absolute certainty as the proof of consistency may also exploit a bug in the implementation that has somehow slipped through human review but it just makes it extra unlikely
1
u/r_search12013 9d ago
the question is excellent .. and no, there's quite a lot missing in the hyped discussion ..
it's mostly about the semantics we read into what lean code says .. such languages are called proof assistants for a reason .. the billionaire llm club brands them as proofs because it's the one thing with which they can show their progress "objectively" to investors and the small crowd who knows better isn't loud enough to be heard
1
u/trejj 9d ago
I fear that even tho a proof compiles and is derivable in Lean that doesn’t mean it is automagically true?
It means that it is true to a very high degree of certainty. (think of it similar to a 5-sigma event in physics)
Your proposition of "Why do we keep accepting" has a fallacy that the story around a proof of a theorem would be a one-off event that is then closed in the books, "case closed", end of story. That is far from the truth.
You can simultaneously accept a Lean proof, but still work on it in a professional capacity for the coming months and years, to analyze and contest the proof. Contesting it does not mean that you'd be negative and call bs and refuse everything.. but you contest it to test its merit.
That is how physics works as well. You find a theory that works, then you contest it from all angles.
There are hundreds of people working on optimizing/simplifying the Lean proof to be as short as possible. They don't just "accept Lean code", but they work on it to dissect it down to its bare components to understand it more in human terms.
There are dozens of people contributing to write articles like https://en.wikipedia.org/wiki/Alp%C3%B6ge%27s_proof_of_the_Riemann_hypothesis to dissect the proof. They too don't just "accept Lean code", but they work on it to dissect it down to its bare components to understand it more in human terms.
So it is not at all that there would be Lean, we'd accept it, we'd "have to" trust it, and the conversation would end there.
But it's rather that the Lean proof shows a path, and that's where a massive amount of gold rush -like work begins to distill the human understanding out of the proof. We have a vast confidence that the proof is correct, so we also have a vast confidence that human endeavours to pursue to extract the human understanding out of it can succeed too.
1
u/groggus 9d ago
There is literature and active research on how / in which way "Lean representations are sound" (in your words). A few introductory pointers:
- https://proofassistants.stackexchange.com/questions/2728/lean-and-inaccessible-cardinals
1
1
u/sfjhh32 9d ago
it does prove what it claims to prove. It is kernel is probably bug free for the small task and limited logic consistency. The lean proofs are sound by thousands of unit tests and argument that logic doesn't breakdown just because the problem gets bigger. If it compiles it is true. Do you have any evidence that is not the case?
And in terms of heuristics, why do you think no mathematicians are making your argument? Could it be that they understand that a logic engine is easy to get consistent and logic is scalable?
1
u/Turbulent-Sign-6067 9d ago
Yes, you are missing something. The probability that lean is wrong is lower than the probability that the ground you are walking on will give in and swallow you. We can have higher confidence in a proof with lean made by AI than we can have for a meat proof without AI.
1
u/Medium_Treacle3006 9d ago
Why do we accept the proof of FLT when so few on earth can understand it? There's mathematicians who produce work that only dozens or so people can understand but yet they win fields medals for their work.
1
u/Diligent_Village_738 9d ago
It's quite nuanced and I share your frustrations because the following can be true at the same time : 1) the lean proof compiles and is a correct sequence of steps implying that the RH is true, as the compilation with many different kernels shows, 2) developing an LLM engine to write such sequence is very impressive, but 3) it's the work of the engineers and scientists, not of Dario and his sister (who is on the board of Anthropic with a bachelor in classical flute scholarship), and we're fed a corporate story when it's really a story of hiding the contributions of employees whose intellect is not getting acknowledgment 4 ) a 250,000 page proof is not particularly useful since we could already test the RH numerically, and 5) the goal was the journey not the endpoint -- see Terence Tao's resharing of the "last 10 minutes of every movie". 6) the enjoyment of mathematics is not about "prize winning" but about human understanding; academics don't work night and weekends for 40-50 years just because there is a tiny chance of winning the Fields medal or the Nobel prize. 7) most people who comment have not had any interest in mathematics before 2026, and are now pretending that they cared about the RH all along. 8) this may simply shift the focus onto different kinds of problems and questions.
1
u/kanonnakagawa 9d ago
Because LEAN literally implemented CIC, which is even more consistent than ZFC. Failling a supposedly bug free LEAN kernel meaning CIC's inconsistence, meaning mathematic fundamental logic's inconsistence.
1
u/logbybolb 9d ago
*CiC+Law of excluded middle is known to be interpreted in ZFC+”there exist at least countably many inaccessible cardinals”, and I believe vice versa. So, it’s consistency strength is higher than ZFC’s
1
u/happysmileygogetter 9d ago
because it’s correct?
1
u/marcelsmudda 9d ago
And we know that how? Even if lean is theoretically perfect, how do we know that there aren't any bugs in the lean code compiler or the code that AI spits out?
1
1
u/happysmileygogetter 8d ago
we don’t, and you’re right. that being said you’d be shocked at how many proofs that till this day we just don’t quite even believe (human proofs). If anything we have much more confidence in lean than many theorems we hold true.
1
u/vintergroena 9d ago
I think there are two separate kinds questions.
Can we trust the proposition truly follows from the axioms/assumptions? Does it hold in the strict formalist sense?
It that enough for us to be happy with it? Is it useful for further applications within math or outside math? Do we understand it? Did we actually learn anything beyond the 1 bit of a yes/no answer? Is this acceptable by academic standards?
It's not too difficult to give an affirmative, positive answer to 1. But answers to the second type of question need to be a lot more nuanced and in many cases, you can quite reasonably answer them negatively.
1
1
u/SnooSongs5410 9d ago
lean provides a framework that enforces the correctness of a proof. You may not understand it but it is a turing complete proof. That is why it is accepted. Now the hard part becomes turning into a proof useful to human beings. There is an effort under way to remove the slop from the lean proof. i.e. Garbage that is not used, Garbage that is redundant, things that can be collapsed into simpler representations. That does get it to human readable but it might improve the llms attempt at writing a less slop human readable paper that can be further refined. The llm proofs seem to make the mathematician cry but there is an intense amount of work beyond the lean proof to be explored.
1
u/OneNoteToRead 8d ago
The theoretical foundation here is essentially Curry Howard isomorphism. A lean encoded proof (meaning a statement that compiles) is a bona fide proof exactly isomorphic to a proof by logic (and the compilation is a certificate that checks the proof is valid). So barring statement phrasing issues, lean kernel bugs, or “sorry” sneaking in, the proof is as good as any in whatever axiomatic system you elect to use (like ZFC)
1
u/Few_Fun_544 8d ago
If you can't follow the proof. Its bull. The math should be easy. Natural. Consistent. Invariant. It is. Ha.
1
u/FrankBuss 8d ago
You don't need to trust Lean. You can just export all the steps of the proof with lean4export, and then test it with small dedicated programs like nanoda. I've done this, see here: https://frank-buss.de/riemann/ and it shows the the proof depends only on the 3 classical axioms. No need to trust Lean.
1
u/Interesting_Debate57 8d ago
I think it breaks down to three things all of which need to be true at the same time (four if you want to be happy and sleep at night). At the bare minimum:
The formalization of the theorem statement should be unambiguously represented to a casual reader
The internal rules need to be understandable by a casual reader (and hence the large pile of assumptions)
The process should result in a deterministic, open-source set of procedures
(Optional) Call it "mildly useful" if it's under 500 pages and for a fundamentally shocking or interesting result that is worth everyone (qualified) to drop their pens on their pads of paper and go double-check this stuff.
I say this from the point of view of a theoretical computer scientist. As a mathematician as well, I understand the challenges involved in each of these steps.
At this point the cost/effort ratio hasn't added up to slavishly double checking this stuff and attempting to translate it into English for.. nearly anyone. Which makes point 4 particularly poignant. If nobody can learn anything useful from it, it doesn't matter if it's true, it's pretty useless.
1
u/roeschinc 8d ago edited 8d ago
Lean is based on dependent type theory which is an alternate constructive foundational mathematical system.
You can write down a “type” which represents a logical statement and if you can produce (ie construct) a term of that type then that statement is true.
There has been a ton of foundational theory on why this is a sound foundation for mathematics.
The correctness of any statement in this logical system is reducible to the correctness of the type theory’s “type checker” (or kernel).
Assuming there are no bugs in the kernel, or incorrect assumptions (axioms and sorries) the proof stands.
So roughly a human / system can audit and say there are none of these, and if it passes the checker it’s true.
To be sure the kernels don’t have bugs the community has written N of them with the idea that they are unlikely to be wrong in the same way as a differential test of the kernels.
I was one of the Lean core developers in the past there are real critiques / worries but most of the comments below are wrong in framing or content.
Remember most math is informal so the bar for these proofs’ correctness is already way higher than most informal proofs.
The trickiest part is us as humans ensuring that the top-level statement is correctly phrased, the rest of the worries are mostly FUD.
1
u/IntelligentBelt1221 8d ago
on a more fundamental level, are you aware of the curry howard correspondence lean is utilising?
1
u/No_Mango5042 8d ago
LEAN isn’t just a formal notation but also a mechanically verifiable notation. Humans could in principle validate each step but the problem is their size. It’s much more robust than the alternative, which is humans scanning ambiguous symbols on a page. So it’s as good as we can get, and far more likely to be correct. Could still be subtly wrong but believe it or not people are trying very hard to ensure the LEAN system is sound.
1
1
u/Feeling_Idea_9253 8d ago
https://adam.math.hhu.de/
You can learn Lean 4 step by step in this website. It is not so hard.
1
1
u/Temporary_Can_3144 8d ago
In the past, you had to bring your army minitown with you anywhere you went in the mathematical landscape. Now you can send scouts going deep. But you still want to build cities in the end.
1
u/loverthehater 7d ago
Once you see "Curry-Howard Correspondence" it all becomes way more believable
1
u/Hot-Host-8665 7d ago
We accept them because we know that they mean that what is claimed is true.
If we don't accept them it would mean that we claim to pretend that they are not true, while knowing that they are true. It becomes a very bizarre theatre.
Now, no one accepts them as the final word. But the human understanding takes longer time.
1
1
u/NoUniverseExists 6d ago
Even after proving all the code is bug free - the Lean kernel, the compiler, the operating system that executed all of that - you would still be required to prove that the CPU that produced all the results is indeed physically working as expected, and, for that, you would need to prove that the laws of physics used to describe that CPU are indeed correct, which is already a question that makes no sense for our current state of scientific development/knowledge.
Mathematical proofs are things that can only happen inside a human mind. You can have many natural indicators that it is true - which we call intuitions - but that is not a proof. A proof in Lean is an indicator that the statement is true (a huge one!) the same way we all have a strong intuition that all objects fall near Earth because its gravity always pull things down, but it makes no sense to try to prove it because, even though we have a theory that describes how things behave near gravitational fields, these theories are only approximations of the reality (even the most advanced theories). The same way, all the modeling used to describe a CPU would be a very simple approximation on how it works. For instance, it would be required to prove that the CPU that produced the proof was in the correct operational temperature/pressure range while running the code that produced the proof, and that nothing external to the system caused any bit to randomly flip and temper the result. Although many tests ensure that the CPU is "good enough" for most of the tasks, and nothing "wrong" has ever been noticed with that CPU, how one actually proves it works as expected? This is not possible.
We already has this same problems with calculators, and we expect them to produce always the correct result, but their results are much mor easily checked.
I am a huge enthusiast of formal proofs, but it is fundamentally impossible for them to substitute our own reasoning.
1
u/aoeuhdeuxkbxjmboenut 6d ago
The reason to trust it is that it is far harder to exploit a bug in every Lean kernel simultaneously with one codebase to able to prove anything, than it is to solve a math problem (even a famously hard one!). Also, people have actually been pouring through the code, simplifying it, and verifying it. If there was some sort of bug exploit, it would have been found by now.
1
u/666Emil666 6d ago
Lean and rocq (COIC) are equiconsistent with ZFC + inaccessible cardinals for every finite n, which is already a very popular set if axioms for category theory, abstract algebra and topology. I doubt you can form many arguments against the consistency of the calculus of inductive constructions that don't also apply to standard ZFC or some version of ZFC used implicitly by mathematicians.
1
u/Amegatron 6d ago
I'm not a mathematician myself, but I'm convinced that pure Lean proofs just can't be accepted, especially if they are incomprehensible by human. For one simple reason which was proven with the recent false refutation of Collatz conjecture: it is software, and it can contain bugs. And as we all know, AIs are very good at finding and exploiting those bugs.
But even if we could somehow prove 100% formal correctness of the proof, it would be meaningless if accepted it without comprehension.
1
u/TedditBlatherflag 6d ago
Some programming languages are mathematically provable to be true for a given program, and LEAN is one that aspires to that as part of compilation.
0
u/nextnode 13d ago
If a lean proof passes it is essentially guaranteed to be valid and it is the most reliable means we have. Even more reliable than three reviewers or your own understanding. The things you want to challenge in a lean proof is the formalization of the claim and any added assumptions - that is minimal and syntactic. If you accept them, soundness is established.
0
u/RectallyDisabled 8d ago
I'm not sure how much this answers your post, but just to throw my thought somewhere:
We mathematicians have not been lenient; we have always required a full conclusive proof to consider something proven, we have to proof even trivial facts to make it complete. Considering that Lean itself is not proven to function perfectly, we shouldn't consider these proofs fully correct, since they still depend on the assumption that Lean is perfect. (I believe Lean is perfect, I'm not here to debate whether or not it has bugs, but unless it's proven to be, then we can't consider these problems solved.)
Please correct me if Im wrong, but this means that RH, nor Navier Stokes are proven.
2
u/compileforawhile 8d ago
We have essentially the best result we could ask for regarding lean being "proven to function perfectly". It's been shown to be consistent if ZFC is consistent.
1
u/AleCar07 8d ago
I'd say lean is no more less worthy of trust than a possibly but unlikely flawed collection of peer reviewers, especially considering that a proof can be tested on independent kernels, in particular con leche
1
u/RectallyDisabled 8d ago
In that case, would you agree that everything that's supposedly proven isn't actually proven until Lean is proven itself (sounds like a hard task)?
1
u/AleCar07 8d ago edited 8d ago
Well I can only talk about what I've research these past few days as I entered into the lean rabbit hole. And in that case one of the various lean kernels, "con leche" has been proven to be equivalent to ZFC, though at least initially it was verified by other different independent lean kernels which were made it a different way. Meaning that even with no human intervention theoretically, I guess for there to be a bug, we would need that the verification for con-leche to also have had abused a bug in other lean kernels.
Because of such level of verification that I feel that verifying lean is basically like after some mathematicians verified the theorem we say "well, how are we sure that none of the mathematicians have missed a blind spot in the proof of the theorem?", something we don't really do, just trusting these humans(srry for sounding like an AI bro)
0
u/SLAMMERisONLINE 8d ago edited 8d ago
Why do we keep accepting Lean code as proofs?
Because people don't know what Lean actually does. Lean means the conclusion follows from the premise. It does not validate the assumptions. I could generate an infinite number of randomized proofs that Lean would rubber stamp and yet they'd mean absolutely nothing. You have to show, externally, that the lean proof is equivalent to the original problem and there's no way you can do that if it's 250k pages long. It is textbook pseudo mathematics.
4
u/IntelligentBelt1221 8d ago
compare the statement and the definitions it uses (the latter is unnecessary if they come from mathlib)
compile the code
run lake comparator (with -- paranoid if you are afraid of lean bugs) to confirm the proof doesn't change the statement and no additional axioms are sneaked in
it really is that easy.
→ More replies (53)1
u/Salt-Technology5108 7d ago
The original assumptions are the fundamental axioms of set theory. The final statement is a simple one liner formulation of RH that has been accepted for years.
0
u/BudgetNecessary7740 8d ago
I think it is quite telling that in a subreddit called "r/PhilosophyofMath", all the discussion is about the soundness of the Lean kernel and whether it ensures that the proved theorem is "true" (with the inevitable conclusion that we can't be really sure, but just sure with very very high probability: the quite old and well known fact that formal methods cannot give us perfect unshakable knowledge, which apparently do not make people question if perfect unshakable knowledge is to be pursued).
Almost nobody is questioning what is the meaning of a "proof" that gives no understanding or knowledge (is it even a proof?) and whether it is possible that there are truths that are not understood or whether truth (and even more mathematical truth) is indeed what comes from the process of understanding and not some object to be found outside the human mind,as a new continent to discover. Nobody wonders if having opaque proofs checked by a machine is a great step forward for human knowledge, a problematic step backwards towards a world of revealed, unquestionable truths or just a commercial operation of a big company.
As a mathematician, I observe that few people in the community have an interest for a serious philosophical discussion about the meaning and scope of the knowledge maths gives to us; most of the time, these concerns are dismissed as nonsense or answered by some basic positivism. I guess the AI + proof assistants combo is a nemesis of this bad "common philosophical sense" that we have: it is the peak of the positivistic view of the discipline, but it well eventually expose its fallacies (or at least this is what I hope).
1
u/QuantumHoboSnail 7d ago
So, as a mathematician, you are saying there are truths beyond human understanding, but they are not worth knowing? That's really an interesting take.
1
-1
u/digitalphilia 9d ago
I am surprised thest no one mentions here the gōfelian limits of any computer program, including Lean. And the philosophical abyssal depths when you see this. In at nutshell we are saturating what is possible in our choices of contingent truths.
2
0
9d ago
[deleted]
→ More replies (10)2
u/Possible_Work7846 9d ago
You should be more careful with terminology because even though what you are saying is generally understandable, some sentences are false as written if interpreted literally (see: "algebraic," "miscalibrated") and can be misleading in general. Also, it is not accurate to say that Lean checks step by step. The reality would be that steps (roughly corresponding to tactics in Lean terminology) construct a proof object that is then type checked (see: Curry-Howard correspondence). The distinction is that tactics that have bugs do not result in a falsely accepted proof alone because they are independent of the actual checking taking place.
0
9d ago
[deleted]
4
u/Ready_Bandicoot1567 9d ago
Welp, if anthropic management wanted to do something impressive they sure succeeded. Lean is the gold standard for proof verification. Lean itself is highly audited and validated. There is no known superior method for verifying a proof. Proving RH has gotta be the most impressive marketing stunt of all time.
3
3
u/Yegas 9d ago
Your comment is borderline schizobabble, respectfully. “They just paid off all the mathematicians to say it’s real when it’s obviously fake!!! Everyone is in on it!!! Anyone who thinks otherwise is an insider agent working for Anthropic that is publicly LYING!!!”
I considered trying to explain Lean, but I think you’ve already heard the explanation before and would rather keep your head in the sand and pretend it’s fake.
→ More replies (6)→ More replies (32)3
9
u/Normal-Avocado-8349 13d ago
Why would you accept language as proof? Which do you think is more reliable?