Live data from Hacker News

We have proof automation now

imperialviolet.org

11–20 of 117 posts

Re: We have proof automation now

#12

This can work for core algorithms for sure, but wondering if this will work for production use cases, production apps come with a lot of edge cases - which are more often than not not logical as well to the point it becomes very hard to document them all in the first place.

I have had production edge cases anticipated by AI before that I hadn't accounted for.

Re: We have proof automation now

#13
Strongly agree with the author here. The future will belong to programming languages that natively embed theorem proofers into their type systems so LLMs can forego a lot of testing by just validating the implementations they write against the specs with formal proofs. Writing formal specs is probably the main skill a programmer in the future will need to get work done.

Verus (https://github.com/verus-lang/verus) is a good start for the rust ecosystem, but it's essentially a standalone language today (with custom syntax and type system).

Re: We have proof automation now

#15

This can work for core algorithms for sure, but wondering if this will work for production use cases, production apps come with a lot of edge cases - which are more often than not not logical as well to the point it becomes very hard to document them all in the first place.

The flip side is that we currently put programs into production without understanding how they will behave in those edge cases. If you're lucky, they crash and then restart cleanly. If you're unlucky, they silently corrupt data or violate mission-critical invariants.

Re: We have proof automation now

#16
Cool. Now we can write bugs in our theorem descriptions instead of source code.

Seriously, please review Curry Howard Isomorphism if you’re getting pulled down this rabbit hole.

Programs are proofs. Proofs are programs.

So if you can formally describe the correct output for every input, you can have an LLM loop automatically fill in the gaps of how to get there. Congrats, that sounds at least as hard as writing the correct program in most cases.

Don’t get me wrong, I do think there are useful tools combining formal methods and llms. Let’s just not get carried away.

Re: We have proof automation now

#18
post #16

Cool. Now we can write bugs in our theorem descriptions instead of source code. Seriously, please review Curry Howard Isomorphism if you’re getting pulled down this rabbit hole. Programs are proofs. Proofs are programs. So if you can formally describe the correct output for every input, you can have an LLM loop automatically fill in the gaps of how to get there. Congrats, that sounds at least as hard as writing the c…

Pretty much this. I designed my own research harness and infra for theorem proving and conjecturing; however, you still need to review formulations!

Re: We have proof automation now

#19
post #13

Strongly agree with the author here. The future will belong to programming languages that natively embed theorem proofers into their type systems so LLMs can forego a lot of testing by just validating the implementations they write against the specs with formal proofs. Writing formal specs is probably the main skill a programmer in the future will need to get work done. Verus ( https://github.com/verus-lang/verus ) i…

Lean has dependant types. Wouldn't something like Haskell or Idris, that are trying to be general purpose dependantly typed languages--wouldn't they be a better start than versus?

Versus appears to just be a formal verification tool. Perhaps I misunderstand?

You want the formal verification built into the language because the tooling can start to get really crazy good. Agda is the dependantly typed language I've used the most (long ago), and the tooling was interactive in a helpful way I've never experienced with other languages.

You don't want a separate language used to verify a base language, because then everyone ends up having to know two languages. Looking at the history of computing though, I wouldn't be surprised if this happens.

The actual programming language and the verification language can be the same language though, if we want.

Re: We have proof automation now

#20
post #16

Cool. Now we can write bugs in our theorem descriptions instead of source code. Seriously, please review Curry Howard Isomorphism if you’re getting pulled down this rabbit hole. Programs are proofs. Proofs are programs. So if you can formally describe the correct output for every input, you can have an LLM loop automatically fill in the gaps of how to get there. Congrats, that sounds at least as hard as writing the c…

> Congrats, that sounds at least as hard as writing the correct program in most cases.

That's not remotely true. Or, more formally speaking since we're in a thread about proof assistants, it's not remotely true, up to extensional equality, plus some choices about which axioms you use.

I can write a formal description of what it means to have property in a way that does have computational content that is equivalent to an algorithm[0], but often the clearest way to express the property is equivalent to an algorithm that literally brute forces the problem, like sorting a thing by checking every permutation until you find one that's sorted.

The magic is that you can write a spec that's clear, then have the LLM write the code and prove the spec, so you know that given the right inputs/state, it will return the right outputs/state. Then the gap is performance-like characteristics, which is a pretty great starting point and a lot easier to be just empirical about than correctness.

[0] in Lean you can also use classical logic or add your own axioms, where it's not even comutational.

Post reply on HN