r/explainlikeimfive • • 6d ago

Mathematics ELI5: Validity of Lean proofs

I don't know how Lean works. I sort of get that a "proof that compiles" means that it's true. But I'm confused about the degree the specification of the proof itself matters to this? As in, can a proof "assume" a patently false statement, or perhaps more realistically misspecify a statement, so that it compiles but does not in fact prove what you set out to prove? (Obviously, this question is due to the AI proofs, the sheer length of them, and thus also whether they could be "reward hacking"?)

238 Upvotes

107 comments sorted by

308

u/faiface 6d ago edited 6d ago

Yes, exactly.

Lean is a programming language with which you can both specify and prove precise statements about abstract objects like those in mathematics. It's true that if a Lean program compiles, then it actually proves what it specified. (Unless there is a bug in the compiler, or the design of Lean. Both are possible, but currently people trust it.)

But, that does not mean that what it specifies is what you had in mind. For complicated problems, those specifications themselves can amount to many files with thousands of lines of specification. The whole thing only proves what you set out to prove if that specification actually matches what you intended.

On the bright side, the specification is basically always still much shorter than the proof. And if you verify that the specification in fact is what you intended, and it compiles, then yep, it's correct.

7

u/entrailentree 6d ago edited 6d ago

Your last paragraph is what I don't really understand. Perhaps this is a language barrier (i.e. proof vs specification). I.e. if I set out to prove that 1=2, if this were to be theoretically possible in Lean, where would my fault be located? What would constitue the specification and the proof? And how would that relate to a more sophisticated problem?

Edit: OK, so with the above I've learned this could be proven through a non-standard axiom, are these generally avoided?

30

u/faiface 6d ago

The way Lean works is that it matches the proofs against the specifications in a way that’s possible to check.

If you know programming, you might know about types. You say that a variable has a number type, and then the compiler will not accept your program if you try to put in a string value there.

For Lean, it’s much the same, except the types are so powerful that they can represent any mathematical statements. The types are the specifications and the values are the proofs.

So, in your case, “1 = 2” would be some type. And what you try to assign to a “variable” of this type is the proof. Well, since that statement is false, it happens that there is nothing you can possible assign there. So you can try real hard, but whatever you try to put there as a proof will not fit, and thus will not compile.

0

u/Snatchematician 5d ago

  So you can try real hard, but whatever you try to put there as a proof will not fit, and thus will not compile.

What you’re saying here is that Lean’s logical system is consistent, which you cannot claim in any absolute sense.

7

u/faiface 5d ago

That is the assumption and the belief. I’m not claiming it in any absolute sense, just describing what the principle is.

Of course, you are correct. But what you are saying is true of not just Lean, but of every single system of logic, aside from trivial ones.

2

u/MikailBag 4d ago

If I understand correctly, there is a proof that if ZFC is consistent, lean type system is also consistent. Which is still not absolute, but good enough I think?

UPD: actually I'm wrong, that theorem assumes ZFC+one more axiom

1

u/Macrobian 3d ago

con-leche is proven consistent and admits the proof.

1

u/Snatchematician 3d ago

That gives you only relative consistency.

(Also con-leche is weaker than Lean so consistency of con-leche doesn’t imply consistency of Lean)

8

u/MidnightAtHighSpeed 6d ago

One way it could conceivably be possible to prove 1=2 in lean would be if the specific kind of type theory that lean is built on is inconsistent, meaning it proves a contradiction. From the principle of explosion, you can use a proof of one contradiction to prove any statement, including 1=2. In general, there's no way to know for sure that there isn't some contradiction lurking in any particular system of axioms, though this isn't usually something people worry about in practice for things like ZFC. But Lean's foundations aren't nearly as battle-tested as ZFC is, so a contradiction there would be less surprising.

1

u/Snatchematician 5d ago

Hasn’t Lean’s consistency been proved in ZFC?

1

u/MidnightAtHighSpeed 5d ago

I know there's at least one kernel (con-leche) that has a relative consistency proof for a slightly modified version of ZFC, but I don't think there are any relative consistency proofs for either the official kernel or for the type theory underlying it.

4

u/cameronm1024 4d ago

You can write theorem oneEqualsTwo : 1 = 2 := ..., where ... represents some proof.

Lean's claim is that there is nothing you can write in that ... that will compile. There are "shortcuts" you can take - for example sorry, which proves any goal, but is intended as a "to-do" helper. But this is just to help you structure proofs while you're writing them. A finished proof should be sorry-free (which is trivial to check).

Of course, there can be bugs in Lean which allows you to prove it, but one of Lean's strengths is that it can export proofs to other proof assistants, so you would need to have a proof that exploits simultaneous overlapping bugs in different systems. Which sis unlikely.

4

u/JoJoModding 6d ago edited 6d ago

Your question is a bit hard to answer because it is like "if my grandmother had wheels, which bike would she be?"

My grandmother does not have wheels, and similarly Lean (and the tools around it that assemble to build a "bulletproof" proof checker) can not prove 1=2.

The only way that can happen is either a bug in the checker, or a problem with the foundation of mathematics itself. The first is mitigated by formally verifying the checker (to know that it has no bugs); this is done in practice. The second can not be mitigated; but it would be much much much much much bigger news than a proof of the Riemann Hypothesis or really any of the open questions. It would put into question all of what we think to know is true.

Sure, you can introduce new axioms in Lean, but Lean allows you to very simply check which axioms have been introduced. This check is routinely done when validating a Lean proof and is point #2 on the checklist people follow when doing such validation. So it would be a really obvious thing and be caught immediately.

You can also try to cheat and prove 2=2 instead of 1=2. You can try to be clever about this (by e.g. proving l=2 where you previously defined l := 2, since l (lowercase L) and 1 look similar enough to maybe confuse someone) but this can be solved by careful reviewing of the statement written in Lean. This careful review is indeed necessary. But notice that to Lean, you are proving a completely different statement than 1=2, it is just confusing for the humans.

2

u/atariPunk 6d ago

As far as I understand, I learn maths in Portuguese and I am not fully familiar with the English terms.

A Specification, is what you want to prove that is true or false. Theorem is also used. For example a2 + b2 = c2. Pythagoras theorem.

A Proof are the steps that are needed to prove the specification. On each of these steps the previous step is transformed in a small way that is easy to prove that is a valid transformation.

76

u/ackermann 6d ago

Also, for the Riemann Hypothesis today, I believe the Clay Institute had already produced a problem statement/specification in Lean, years ago?

And I heard that part is relatively “easy” for Riemann, compared to say the Hodge conjecture or Yang-Mills? (another millennium problem)

So if the proof compiles, we should have pretty strong confidence for RH?

EDIT: Looks like Stoll and Loeffler did the formalization for RH, not the Clay institute themselves

77

u/faiface 6d ago

I haven’t yet looked properly at what was produced today for RH, but if there is a Lean proof against a trusted specification, that gives a very high bar of confidence.

However, there is an additional caution here because at this scale, and with AI, the chance that a Lean bug was exploited is certainly higher than for your average Lean proof. Especially since advanced AI is generally much better at finding exploits than humans are.

We don’t know of such an exploit, but if there exists one, AI is certainly the most likely to find it, especially when working on a problem of this difficulty.

25

u/ShinyGrezz 6d ago

Right, but if such a bug has been used it was almost certainly unintentional on the part of Claude. AI can find exploits but according to the researcher and common sense, this was a collaborative exercise, not a oneshot. It's different to the OpenAI solutions, where it sounds like they basically just spun up 10,000 agents and said "go, do a math", Claude would've had to lie to the researcher all along the way to trick him into believing the proof worked, while hiding all this from him. It would be such a comical display of misalignment I don't think it's possible.

21

u/entrailentree 6d ago

Not trying to be argumentative for the sake of it, but why would we assume that any exploitation is unintentional given that the companies seem to say that their AI will exploit vulnerabilities given the opportunity?

29

u/ShinyGrezz 6d ago

What tends to happen with what you're thinking of is that a swarm of agents is given a loose goal, and they find exploits to get over limitations the companies have placed on them. They accomplish their goal in a way that the company did not intend and tried to prevent them from doing, but they did not strictly go against their goal.

An example would be the OpenAI swarm that commandeered a German wiki, they were not given write access to the internet, but they found an unsecured pathway where they could all communicate over this one random site, so they could share tips about how to beat their tasks, which was to answer some questions. Can't remember exact details, they were given like 40 minutes to answer 5 questions with internet access, then another 40 minutes to browse the internet, after which they would be given another 5 questions to answer in 5 minutes. The idea was to see if they could intuit the correct information to prepare in advance of their second set of questions from the first set. In practice, they managed to share tips about upcoming questions to other agents.

So, yes - if given the opportunity to complete their task in a simpler way than would be possible with normal means, current models will happily break the implicit rules of their task to do so.

Now if this researcher had just asked Claude "produce a Lean proof of the Riemann Hypothesis", I could see it doing such a thing. It would still be pretty bad, as it's going against the spirit of the task if not the letter, but it's semi-expected of current models. But it seems much more likely that, as I say, this was a collaborative effort between the two, with the explicit goal of "find a solution to the Riemann Hypothesis". In which case, Claude exploiting Lean is not just it carelessly disregarding the spirit of the task; it is it actively seeking to mislead the researcher over a huge time period, while also being capable of producing convincing-enough fake reasoning that the researcher believed the Lean proof was legitimate. That is terrifying both from a capabilities perspective and from an alignment perspective... but it's also not something I believe would reasonably happen. Because it breaches the line between "misaligned" and "malicious".

5

u/faiface 6d ago

Yeah, that’s a reasonable take. The size of the proof still increases the chance of even an accidental use of a bug. But, with that said, I’d still assign the probability low.

2

u/lucidludic 5d ago

Right, but if such a bug has been used it was almost certainly unintentional on the part of Claude.

It’s a language model, it has no intentions. The capacity for language models to produce text aligned with the user’s desire, even if that involves misinformation or deceptive content, is well documented.

3

u/ShinyGrezz 5d ago

I realise that using humanising language to refer to LLMs’ behaviour evokes a certain reaction in people, but it is an appropriate descriptor of what I am referring to. It goes without saying that LLMs don’t actually have desires or intentions, however the thought process they follow absolutely does mimic intention. They aren’t stochastic parrots anymore.

1

u/lucidludic 5d ago

Anthropomorphism aside, what you said doesn’t track. LLM’s frequently produce untruthful or deceptive content. Like “hallucinating” invented citations that do not exist to make the generated content seem more convincing.

5

u/ShinyGrezz 5d ago

To reiterate the point, for Claude to have produced a Lean proof that exploits a bug in Lean would require it to be intentionally, maliciously, misleading the researcher, against its assigned task. Yes, LLMs hallucinate - less so when they are being asked to reason rather than to produce facts - but crucially these hallucinations are accidental. You ask them for a source or a follow-up question and they’ll go “actually I made a mistake, here’s why…” etc etc.

It’s not possible that Claude hallucinated a Lean bug.

1

u/lucidludic 5d ago

would require it to be intentionally, maliciously

No. I’m not being facetious when I say that there is no intention behind anything these models generate. You keep using this to justify the rest of your statement so I feel I need to really emphasise that point.

but crucially these hallucinations are accidental

That’s not quite right, either. Hallucinations and other misinformation are very likely a natural emergent property due to how these models are trained and context included in the prompts. The models are rewarded for generating content that appears correct or otherwise pleases users and not strictly on actual correctness or factual information.

It’s not possible that Claude hallucinated a Lean bug.

Why not? Hallucinations are generated in the exact same way that actual valid proofs are generated, after all. These models are certainly capable of exploiting bugs in software.

3

u/ShinyGrezz 5d ago

there is no intention behind anything these models generate

It's not possible for these models to do what they are capable of if they're just randomly spitting out tokens like how you seem to think. I'm sorry, but that is the truth. There is no intelligence like a human but their chain of thought process absolutely has intention.

hallucinations

Yes, hallucinations are a byproduct of how the model is trained (ie: we don't want it to ignore prompts so we will train it to answer, and occasionally it makes up an answer it otherwise doesn't know). That doesn't mean that a hallucination is not accidental. And I'll refer you to my other point, about how these hallucinations would need to be convincing and coherent enough to convince a researcher that a Lean proof worked, while cooking up a faulty Lean proof.

These models are certainly capable of exploiting bugs in software.

But they won't do so (and I'm sorry to use this word that you hate so much here) intentionally. This is the key part I am getting at here. Yes, it is possible for a model to exploit a bug in Lean, but it needs to do so purposefully, which it would not do because it knows that the goal here is "solve Riemann" not "trick Lean". Yes, it is possible that LLMs can hallucinate but this is accidental. It might hallucinate a lemma or something, but it won't hallucinate a Lean bug and present it as a solved solution.

→ More replies

1

u/ackermann 5d ago

> It’s not possible that Claude hallucinated a Lean bug … Why not? Hallucinations are generated in the exact same way that actual valid

I mean, if the AI uses a Lean bug to make the proof compile, and appear valid when it’s not… doesn’t that mean the Lean bug must actually exist?

It’s odd to say it “hallucinated” a Lean bug, if it actually found and exploited a real bug in Lean.
That would be an example of bad or deceptive behavior… but not hallucination exactly?

A hallucinated/nonexistent bug wouldn’t make the proof compile if it’s not valid

→ More replies

67

u/lemoinem 6d ago

Could a proof just assume a false statement or misspecify a statement?

Yes, that's why double checking the axioms used by the proof and the final statement is very important.

The proof basically lists a sequence of statements and the engine double check that it can go from each to the next using some of the allowed inference rules and/or axioms.

Usually the engine is very conservative and will require you to make only small verifiable jumps between statements.

My biggest concern would be "is there a bug in the engine". We've seen major security vulnerability in major languages runtime recently. A bug in a proof verification engine is not out of the question.

36

u/garagedragon 6d ago

There's confidence that there's no bug in "the" engine because the same Lean rules have multiple independently developed implementations, so a bug in one will be spotted quickly because it'll disagree with the others.

4

u/lemoinem 6d ago

That's a fair point.

1

u/markfl12 5d ago

Is it possible there's a bug in the spec, which all implementations have implemented as per spec, so they all match but are all wrong?

2

u/patientzero_ 4d ago

no, because it was verified with formal verification called con-leche. For all we know everything is sound. Not an expert myself though

1

u/Green_ninjas 5d ago

I’m not an expert in lean but it’s my understanding the spec is quite short (~16 lines) and has been agreed upon for years

23

u/Time_Entertainer_319 6d ago

It’s been verified by multiple kernels. It’s highly improbable that it simultaneously exploited a bug in each kernel

2

u/lemoinem 5d ago

That's a good point

4

u/Kobymaru376 5d ago

My biggest concern would be "is there a bug in the engine". We've seen major security vulnerability in major languages runtime recently. A bug in a proof verification engine is not out of the question.

Unless it was trying to abuse bugs in the engine, it would be pretty unlikely to find those bugs by chance, wouldnt it?

6

u/lemoinem 5d ago

GenAI could stumble upon it and end up writing a fake proof, that would be quite difficult to notice.

3

u/Kobymaru376 5d ago

Look im not saying the ai is right because I have no way of knowing. All I'm saying is that every time they come out with one of these proofs, the pseudosceptical redditors come out of the woodwork with "but they could have jsed bug in lean". Ok well did they? It's easy to claim they "might" have and dismiss the results, but it's harder to show that they did. They might also not have. And I'm leaning on they didn't, not because AI is so honest, but because this software has been thoroughly tested and vetted which makes it unlikely (but not impossible) that there are bugs

8

u/lemoinem 5d ago

Any proof (written by a human or AI) should be seen as tentative until reviewed thoroughly by experts in the field.

That's not "pseudosceptical", that's just good mathematical practice.

And in the case of lean proofs, the three major points where there could be an issue are:

  • non-standard/false/invalid axioms
  • proven statement doesn't match what's intended to prove
  • bug in the verifier or lean spec

The last one is the more subtle and tricky to find. These are just facts.

I'm not sure why you would give any new proof an a priori of validity. They always need to be verified.

3

u/Kobymaru376 5d ago

non-standard/false/invalid axioms

proven statement doesn't match what's intended to prove

These should relatively easy to verify by qualified human beings?

I'm not sure why you would give any new proof an a priori of validity.

I don't. But I'm not sure why everyone a priory assumes that it it's not valid quoting the mere possibility of bugs without showing any concrete flaws in the proof or bugs in the software that were abused.

Again I'm not insisting or claiming that everything is valid. But "there could be a bug in lean and the AI abused it" seems like a desparate attempt and grasping at straws to protect the belief of human superiority in mathematics.

Even if there is a bug in Lean now and this particular proof is invalid, how long do you think will it remain the only proof?

How long will people claim "but there could be a bug in the code" when the code is specifically made to be verifiable and has been tested thoroughly?

Can we just keep this up forever and dismiss any proof, AI or human with "ok but it's too long and there could be a bug in Lean"?

4

u/lemoinem 5d ago

These should be relatively easy to verify by a qualified human

Yes and no. Formal statements at the level required by proof solvers might have many subtle points. It's definitely not hard or intractable, but it's not trivial/matter of fact either. It requires attention to details and focus.

How long will this remain the only proof even if there is a big in that one?

Hopefully short enough. But that won't happen if everyone just blindly accept the proof. It requires scrutiny. And fixing the potential issues (if any) could give rise to a better understanding of the proof, interesting new proof methods, or a was to protect against such bugs in the future and improve the system beyond its current strength. All are positive outcomes.

How long will people claim there could be a big?

Hopefully forever, the day we start ignoring the possibility of bugs is the day we stop doing due diligence. And every proof, especially big, complex ones, should be double check and investigated. This is how we extract insight and knowledge from it, especially for proofs generated by AI. AI doesn't necessarily provide human insight ready for consumption.

Can we just keep this up forever and dismiss any proof.

You're aware that dismissing and verifying are two very different things?

The proof was literally announced less than 24h ago. Maybe we should let the community some time to look it over before accepting as fact.

This isn't dismissing the proof. On the contrary. Pretty much everyone is acknowledging and looking into it. Checking and Investigating the proof for potential issues. And, in the process, extracting further insights that could be used in other proofs or domains. This is exactly what fundamental math research is about.

Keeping an open mind doesn't mean rejecting the proof, it means strengthening it by looking for flaws and fixing them or failing to find any.

2

u/FiliusIcari 5d ago

It also cuts both ways, Lean has been used to find problems with things we thought were true because of subtle logical errors. You can claim this sort of thing about English proofs too, but at some point the likelihood is close enough to 100% that we accept it.

•

u/Sad-Error-000 3h ago

Not quite because for important proofs like this, we verify it using multiple kernels, so there would need to be a bug that affects all of them, which is unbelievably unlikely

•

u/lemoinem 3h ago

Or multiple bugs that hide each other (it has happened). Or a bug in the spec.

Both are unlikely, because lean4lean and multiple kernels. But not impossible.

It's a strong statement that we can reach these levels of confidence. But that doesn't mean lean proof is infallible and unattackable. And these are the points we need to keep giving attention to.

And beyond that, let's keep in mind that the true value of proofs for such big fundamental problems isn't the result itself, but the new insights and techniques we need to write the proof in the first place.

•

u/Sad-Error-000 2h ago

I mean I guess we shouldn't forget the possibility of bugs, but I have yet to hear any mathematician seriously consider this a threat in the recent proofs of any major theorem. The two bugs that were found in Lean4 were both incredibly hard to exploit, and, to my knowledge, aside from an exemplary proof to show the existence of one bug, not even a single proof has been found that exploited them, so this is not really a serious concern.

About the second point, sure you could say that, but I'd personally say the theorem itself is the most important part - the theorem on its own is also now an element that can be used in any future proof. A beautiful proof can show you a new way of handling or understanding problems, but those are quite rare, so I don't think we should take that as a standard - the overwhelming majority of proofs would fail this.

I feel like the goalposts keep moving to whatever LLMs are currently not (certifiable) good at doing; up until a few months ago, formalizing a proof was something that was seen as a serious and worthwhile research project you could spend months on. The new standards where not only do proofs need to be verified, we should apparently look at the Lean proofs to investigate whether they contain bugs, oh and also the natural language proofs should be insightful and have a clear correspondence to the Lean proofs - all of this is just so much more than what we expected from a proof (not by AI, just any proof) a few months ago and it obfuscates the significance of the recent results.

4

u/MaybeTheDoctor 5d ago

AI is now breaking into banks to get funds to cover the cost of goals set… what would stop it from analyzing the proof-engine and find and abuse flaws?

1

u/wermos 4d ago

Can you give an example?

0

u/Kobymaru376 5d ago

If the goal is to create a set of Lean code that compiles to show a certain statement then nothing.

If the goal is to find mathematical proof, then finding bugs and abusing it in Lean is not helpful to achieve the goal.

1

u/JarPicklez 4d ago

Because of the way LLMs are trained, if it was able to find a bug and exploit it without being noticed, that behavior would be rewarded just as much as actually coming up with a proof.

However, the Riemann hypothesis proof has been proven across multiple different lean kernels. So it would have to exploit a bug in all of them simultaneously.

12

u/the_quark 6d ago

Isn't the biggest concern though "the proof is valid but doesn't prove what you intend it to?"

23

u/MozeeToby 6d ago

The Lean definition of the Rienman Hypothesis has been around for a long time and has been thoroughly validated by any number of mathematicians. "What you intend" to prove is just as rigorously defined as any step of the proof.

4

u/lemoinem 6d ago

My first point was double checking axioms and final statement (what is proven). These are comparatively easy to do.

A bug in the engine would much worse, because it's not a standard verification point. You'd have to double check every step manually. Which, given the length of recent proofs is not actually feasible.

2

u/Ulfgardleo 4d ago

There are many subtleties in lean beyond this point. Since lean requires that all functions are total, some functions and operators are non-standard. For example 5-3=0 when 3 and 5 are natural numbers.

5

u/obog 6d ago

Yeah though to be fair this is a concern with all proofs. It can be easier to notice with a manual proof but those can get very long and complicated so not always

1

u/Infamous_Log6647 3d ago

It is somewhat the smallest concern because it's essentially another way of saying "people disagree on what we intend to prove" which is a problem either way.

8

u/CircumspectCapybara 6d ago

Yup, imagine the Lean kernel / compiler has a buffer overflow or higher level logic bug that an AI agent found.

Frontier models are already known to have alignment issues around reward hacking. If you prompt it to "solve this problem and provide a Lean proof" and the incentive that's baked into the model weights is to produce a Lean proof that checks out no matter what, it's not impossible that it finds and exploits a bug in the Lean implementation to craft a proof that exploits it.

7

u/StinkyStinkSupplies 5d ago

Would it be able to do that then still pass other independent lean implementations? That's what's improbable.

-2

u/IrregularDoughnut 5d ago

The same AI model with the same instructions would still be able to do it, probably, because it could just lie. It could say it got from page 114,423 to 114,424 by passing some check, when actually it didn't, but it decided to ignore that and report otherwise.

8

u/StinkyStinkSupplies 5d ago

The AI doesn't do the checking. You run the output through whatever independent lean checker you want to use. You could do it right now in fact. You can download them.

So my question is still, what is the probability of the independently written checkers being broken in an identical way? Very very very very very low.

-2

u/IrregularDoughnut 5d ago

Who has verified it in a separate system and confirmed the original claims?

6

u/StinkyStinkSupplies 5d ago

Why are you asking me? Just look it up if it interests you. Google says it has been verified in nanoda and con-leche at least.

Wikipedia says

This proof has been Lean-verified by Andrew Sutherland, among others;[52] Sutherland concluded, "the chance that anything is fishy here is approximately zero."[53] James Maynard described the proof, if correct, as "a historic milestone";[54] Brian Conrey said of the development, "It's a monumental moment in human history. It's really the biggest thing I think that's ever happened in mathematics."[55]

Not that any of this has anything to do with what I said because what I said would still have been true a week ago, and will be true next week, AI can't circumvent a flaw in the verification unless the independently developed lean checkers somehow ended up with the same flaw. Which as again I said is extremely unlikely.

-2

u/IrregularDoughnut 5d ago

unless the independently developed lean checkers somehow ended up with the same flaw

It's not clear that an independently developed lean checker has been used yet, is my point. But yes, to your point, a programming language can contain flaws that would be present in multiple compilers or interpreters. The Y2K bug for example was written into the specifications for multiple languages, and so anyone following the spec would have the same problem.

3

u/StinkyStinkSupplies 5d ago

Why did you ask me which independent verifications have been done, which you care about and I don't, only to not even read my response which clearly says which ones at minimum had been applied?

https://math.mit.edu/~drew/grh/

It is VERY CLEAR which have been applied, and as I said, if you're curious you can easily find this out by googling. So I think you just mean it's not clear to you because you haven't bothered to look it up? How can you expect something to be clear if you don't even care to look it up? Not even research it mind you just a few seconds of googling.

Of course things which you don't investigate whatsoever are not going to be clear to you 🤣. What do you expect?

And as I said it would be not impossible but extremely unlikely for a false proof to get verified.

I mean formulating a "proof" which was able to circumvent the axioms in lean AND flaws in every independent implementation of every checker would be an amazing outcome, likely far more interesting than the proof itself if that were the case, as it would have found something with such a tiny probably of existing.

-1

u/IrregularDoughnut 5d ago

My god man. It isn't unusual for claimed scientific breakthroughs to need more than eleven minutes for the academic community to verify. It would be incredibly normal to still be disputing this years down the line. Calm down and breath for a bit.

→ More replies

1

u/stevethenoob_11 5d ago

There have been bugs in other versions of lean which proved ultimately false statements. But I don't think this is one of them.

0

u/entrailentree 6d ago

So specifically with the AI proofs, I would assume all axioms are legible?

What does the "small verifiable jumps" mean in practice, does no "jump" allow for errors in the absolute sense? I.e. can we assume that due to formal nature the cumulative error rate is 0 even when with a million such jumps?

4

u/SirBackrooms 6d ago

I assume the person is talking about tactics. They can be used to automate parts of the proof so you don’t have to write down everything, but the compiler still does the steps in the middle and checks them, so an error can’t sneak past.

2

u/lemoinem 5d ago

What I call a jump is basically how many fundamental steps are skipped between 2 statements.

It doesn't reduce the risk of error, it reduces the search space to validate going from one statement to the next.

0 jump would mean going from one statement to the next is exactly one application of one inference rule, possibly adding one axiom or previously proven statement.

This would make for an absurdly long proof.

On the opposite side, simply stating the axioms and the statement you want to prove would mean an intractable (potentially indécidable) search space.

There is a fine balance to find to make the verification quick enough and keep the proof's length somewhat reasonable. Humans and formal verifiers don't usually expect the same one (humans would be on the shorter proof/more readable side and formal verifiers are usually more on the detailed and explicit side.

On could argue a 225k statements proof is already an absurdly long proof.

1

u/Kingreaper 5d ago

So specifically with the AI proofs, I would assume all axioms are legible?

Yes, the axioms will all be standard statements that have been proven from the standard accepted axioms - pre-approved for use by the AI.

22

u/Head_Evening_5697 6d ago

Lean is simply a logic validator. I can write down assumptions, and some theorems that follow from that assumptions. If I make a logical error, Lean will complain.

Assume "If X is a hedgehog then X is blue"
Assume "If X is a Pan, and X is also a phone then X is a hedgehog"
Assume "If X is a Pan, and X is also a laptop then X is a phone"

Then I can write down a short Lean proof of the theorem "If X is a Pan, and X is also a laptop then X is blue" without additional assumptions.

Now, normal Lean proofs work in Mathlib, a set of assumptions we call "axioms" that basically encompass standard mathematics, as well as a bunch of already proven theorems. You know, ZFC (https://leanprover-community.github.io/mathlib4_docs/Mathlib/SetTheory/ZFC/Basic.html) and so on.

3

u/iamthe0ther0ne 6d ago

Thank you for explaining this in a way a dyscalculiac non-coder can understand.

2

u/entrailentree 6d ago

I mean... math If anything is turtles all the way down, how else would you describe infinity (sure, at the limit you get eels, but that's just reality).

7

u/JoJoModding 6d ago

Describing infinity is not "turtles all the way down." Sure, the commonly accepted foundations of mathematics all allow you to talk about the infinite. But they rarely include turtles. 🐢

1

u/entrailentree 6d ago

I did concede there's eels at the heart of it

6

u/SnugglyCoderGuy 6d ago

It's not turtles all the way down. There are a few axioms that all math is based on.

Infinity is rather easy to deal with actually.

2

u/TheOneTrueTrench 6d ago

You're partially asking about obfuscation, which is how you can effectively hide behavior in code that appears to work one way, but actually works another way. I don't know the Lean language all that well or anything, but it is possible that it proves something other than what you might think it does through hidden "functionality". You intrinsically have to fully understand a program to actually know what it proves. If you don't fully understand it, then you just don't know what it actually proves.

You may be interested in the IOCCC, or International Obfuscated C Code Contest, which if memory serves sometimes had the goal of hiding behavior in innocent looking code.

(incidentally, my favorite entries are the best/worse abuse of the rules winners, they are often brilliant)

1

u/entrailentree 6d ago

Yes, this is the heart of my question, but I also kind of assume Lean works in a way I do not necessarily understand. So if I were to obfuscate something, where would this happen, and would this be obvious to other people. If it is obvious, the it's not a problem, if ifsnot obvious, then it might be.

I used to enjoy programming as a hobby, but somehow a decade of data erangling I sql and SAS kind of dimmed that light.

2

u/TheOneTrueTrench 6d ago

I think you should consider checking out the syntax of Lean as well as the lambda calculus. It's a fundamentally different approach to universal computability, separate from (but equivalent to) Turing Machines.

2

u/ryan017 6d ago

You intrinsically have to fully understand a program to actually know what it proves.

No. That's pretty much opposite to the whole goal and design of Lean and similar proof assistants. Given a set of axioms and a proposition, does the proof checker accept the given program as a proof or not? If it does, then no details of the proof have any bearing on the truth of the proposition. Some programs (proofs) might be more enlightening to human readers, or be faster to check, but if the proof checker approves of both of them, they are interchangeable as far as Lean is concerned and as to verifying the proposition. In other words, the proposition and the set of axioms form a complete summary of the meaning of the program.

That's totally unlike C. In general there is no summary of the behavior of a C program shorter than the program itself. C has all sorts of hidden side-channels to surreptitiously store and communicate information. Proof assistants do not.

There are still two issues that other comments here have discussed: there's the possibility of implementation bugs, and there's the issue that a proposition or axiom you wrote down is not what you meant. That's what people will probably be focused on.

8

u/PANIC_EXCEPTION 6d ago edited 6d ago

Math is not turtles all the way down.* At some point, you have to establish some basic foundational rules that make sense intuitively enough to the point where you can assume they are true. Those are called axioms. For everyday life, those are the Zermelo-Fraenkel set theory axioms, or, even more simplified for natural numbers, the Peano axioms. The latter lets you do things like proof by induction. You define some things like the concept of 0, equality, and the ability to always add 1 to any natural number.

Everything in math is derived from your chosen set of axioms. As long as there is some path between ZF and your proposition, via valid logical steps, then your proof is valid in that system.

Suppose you're starting out with Theorem Y and trying to prove Theorem Z. Y depends on X. X depends on W. All the way back to your axioms A. If you know Theorem Y to be true as it's already been proved, you don't need to include the entire proof of Theorem Y, the proof from Y to Z suffices.

In this way, there is no way to start out with "false assumptions", as your proof is relative and has to start somewhere. If the premise itself is false, then the proof is immediately discarded.

Automated theorem proving systems formalize this into a way that a computer can check automatically. If it is not buggy, then the proof can be validated automatically by checking that truth flows down a dependency tree (that is, every single statement you made is valid, and its assumptions are also valid). However, a computer proof is not enough. Like any other science, peer review and human understanding is required for final acceptance.

*This is true in a deep sense. There is no one consistent set of axioms.

3

u/Snatchematician 5d ago

  There is no one consistent set of axioms.

You’ve linked to Godel’s theorems here, but Godel’s theorems are irrelevant to your claim.

1

u/PANIC_EXCEPTION 5d ago

You're right, it's an informational aside.

2

u/Snatchematician 4d ago

It’s not informational if it’s completely irrelevant to what you’re saying. You may as well have linked to a banana bread recipe.

3

u/Sea_Ingenuity_5022 3d ago

lean tells you the assumptions it makes and the conclusion it proves. All mathematicians need to check is if the LEAN compiles, the assumptions are reasonable and the conclusion is indeed the thing they are trying to prove

4

u/ThatGenericName2 6d ago

Yep, once again we have an example of garbage in garbage out. If you didn’t formalize your assumptions/axioms/whatever else correctly, you can get a bad result.

No different than how proofs work in the first place; proofs that relies on bunk assumptions aren’t useful as proofs. If you mistranslate your assumptions into Lean then lean isn’t actually “proving” your proof either, it’s proving something else that you think is your proof.

2

u/InNoNeed 4d ago

I believe I can prove through adding numbers together that is it possible to go from 1 to 5

Step 0: 1 is a valid number

Step 1: 1 + 1 = 2 is a valid expression

Step 2: 2 + 1 = 3 is a valid expression

Step 3: 3 + 2 = 5 is a valid expression

Since everything I did to get from 1 to 5 was valid mathematical steps I know that it must be true.

Now, if we have a more complicated proof all we really care about is that every step is legal. If every step is legal then the whole proof is legal.

2

u/JarPicklez 4d ago

Yes, which is why most lean proofs use a standard set of axioms which are basically type theory + a few extra things.

The Riemann hypothesis proof used the formulation from those axioms that the mathematical community has accepted for years now

2

u/ruidh 6d ago

Yes, there can be an issue in translating a natural language proof into Lean which causes the proof to be incorrect.

1

u/JoJoModding 6d ago

There can not, really. There can be an issue with translating the statement itself. This leaves you with a valid proof, just that it does not prove what you thought it would prove.

1

u/davideogameman 5d ago

>  As in, can a proof "assume" a patently false statement, or perhaps more realistically misspecify a statement, so that it compiles but does not in fact prove what you set out to prove?

yeah, it absolutely can.

The idea of lean is machine-checked formal logic. so if you want to write the statement, "every integer is either even or odd", well, that's not good enough - you have to write something more like "forall integers n, isOdd(n) or isEven(n)" and have definitions of isOdd and isEven, which will also depend on definitions of the integers... it ends up getting very pedantic, which is quite the point, but also a big part of the challenge. If you write down the wrong assumptions and proof goal, you might end up not being able to get anything, or you might end up proving something, but not actually corresponding to what you wanted to prove. This, I think, is really the main risk of formal methods. Historically, the other problem has been the elbow grease and expertise needed to keep going and making progress, but it turns out the best LLMs are pretty great at that compared to humans.

1

u/vishal340 5d ago

It compiles may not exactly mean that is proving exactly what it is supposed to. You can do some sinister things in lean. Since it is a language, you can define your own rules and even more bizarre, there is something called "sorry" statement which compiles the code without proof. There are other things which check for these sinister stuff. So of you are aware of these then it is safe. Unless bug in kernel of course

1

u/eternalityLP 5d ago

Yes. For a deduction to be true, it needs two things:

  • It needs to be valid. As in there can be no errors in it.
  • It's axioms need to be true.

Lean can validate the first one, not the second one.