Remix.run Logo
▲ wodenokoto 2 hours ago

Isn’t “proof is checked in Lean” kinda similar to assuming your code works just because it compiles.

Sure, the code works, but does it work at doing what you want?

Sure, the proof is valid, but does it prove what you set out to prove?

▲throwawayffffas 21 minutes ago | parent | next [-]

The gist of the article is that it's worse.

That it's the equivalent of saying "It's full moon tonight because I wrote this program".

And he states that you have to check that:

1. The statement the author is making corresponds to the statement in the lean program.

2. The lean program actually compiles.

3. There is no shenanigans hidden in the lean program to disguise a trivial proof as the one stated.

4. The program does not exploit bugs in lean.

▲bananaflag an hour ago | parent | prev | next [-]

No, because proofs are programs and theorems are types. It is enough to construct a function of the needed type to have a proof of the needed theorem. You don't need to look through all the code to see that the function has the desired type.

▲Sharlin 12 minutes ago | parent | next [-]

You have to be sure that the formalized theorem matches the informally stated theorem. Which is what GP meant and what the article is about. A program does what is written, not what is meant; a Lean program proves what is written, not what is meant.

▲lordnacho 31 minutes ago | parent | prev [-]

This sounds interesting enough that I think a link would be useful

▲RossBencina 23 minutes ago | parent [-]

Here you go: https://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspon...

▲fancyfredbot an hour ago | parent | prev | next [-]

I think it's a reasonable point but a bad analogy.

It's more like assuming that because your code is formally proven correct the client will be happy with it.

The code can be right but it may still do the wrong thing.

▲pasquinelli 41 minutes ago | parent [-]

you just said the same thing

▲ 2 hours ago | parent | prev | next [-]
[deleted]
▲oulipo 2 hours ago | parent | prev | next [-]

If the proof is valid, it DOES prove what your theorem is saying (except for rare verification kernel bugs). The issue is mostly: did you correctly formalize and check the specification of your theorem itself...

▲dgellow an hour ago | parent | prev | next [-]

I mean, in some strange way, yes. Because your type system is basically a set of claims that are proven by your compiler. But the analogy doesn’t go further than that. The running program itself is the proof

▲j16sdiz 2 hours ago | parent | prev [-]

it is more like "unit test pass"

Fresh today, I asked llm to fix a unit test for me, it replaced the test with no-op.