90 points carnevalem 10 hours ago 38 comments
anewhnaccount2 7 hours ago | parent
Alexander-Barth 3 hours ago | parent
https://github.com/Broyojo/python-formalization/blob/main/AG...
jakobnissen 6 hours ago | parent
I guess longer term it needs to be built into the language, to prevent code and lean proofs from drifting. I.e. it could be opt-in properties that are written along the code, and which is then checked in the test suite. So very similar to ordinary compiler checks, except more expressive and expensive, and done only at test time.
skeledrew 4 hours ago | parent
abhiram-ar 4 hours ago | parent
tclancy 1 hour ago | parent
eternauta3k 6 hours ago | parent
choeger 6 hours ago | parent
I am not a lean expert, but I imagine that python primitives like dicts, ints, functions, etc., have been defined in lean. So if you add a way to annotate python code with a proof, you should as well be able to automatically translate it to Lean completely.
perching_aix 5 hours ago | parent
for full, honest to god, end to end verification this would be insufficient. but you don't need that in order to reap benefits.
just gotta make sure you actually bound the triage process with some sort of automated verification process. like comparative test cases or similar. otherwise it's just a particularly expensive way of agentic hallucination.
senderista 6 hours ago | parent
woggy 6 hours ago | parent
iib 5 hours ago | parent
[1] https://github.com/kim-em/lean-zip#verification-enables-perf...
pjmlp 5 hours ago | parent
erfgh 4 hours ago | parent
LtWorf 4 hours ago | parent
xmcqdpt2 24 minutes ago | parent
actionfromafar 3 hours ago | parent
davidricodias 2 hours ago | parent
Imagine a proof that needs the axiom that all numbers are below 2^32. What happens if my system is expected to handle numbers greater than 2^32?? There you have the bug... Also it could mean that the system is not validating the boundness of the input, and 2^32 is the maximum that allows for coherent execution downstream of the execution. In both cases, it needs to be checked :)
debugnik 2 hours ago | parent
tomtom1337 2 hours ago | parent
- if the rewrite in Lean happens line-by-line, how can the two implementations differ in their result (Step 2)?
- how does this approach know "something that should always be true" in Step 3 (is it the intelligence of the LLM "guessing"?).
Alexander-Barth 2 hours ago | parent
> Source, in order of preference: (a) the implementation disagreeing with itself (C vs Python twin, fast vs slow path, method vs equivalent method, round-trips, str vs bytes); (b) undisputed invariants (no crash, no internal error leaking, results in range, no hang); (c) explicit doc sentences read in context.[...]
https://github.com/Broyojo/python-formalization/blob/main/AG...
svara 2 hours ago | parent
For the next step, I have the same question. It's the crux of the approach and the article is surprisingly light on detail:
> The hardest part wasn't getting AI agents to write proofs. It was getting proofs that actually mean something
So it was done by AI but they don't make entirely clear how the interesting proof statements were chosen.
auggierose 6 minutes ago | parent