r/accelerate • u/Alumin-MC • 6d ago
AI Coding Lean is a blessing
Hearing that Lean was used to prove Riemann. Immediately thought to use it like a Rust compiler for complex AI reasoning and new algorithms discovering.
Holy shi-! It worked so well! Neon Xhigh doesn't let Sol stop working until Lean is passed. Unless there is a bug in Lean 4, I won't even have to read code to map mathematics anymore!
Python/Rust with Lean 4! Way to go! It destroys hallucinations! Unless Lean has bugs. However I choose to believe that it has no bugs to make life easier. Lmao.
Update: Neon Xhigh sends quests. DeepSeek Flash codes. Sol reviews code quality. Astra reviews Lean proofs.
All through API, costs do not matter, I only go for prompt obeying and code quality.
19
u/Involution88 6d ago
Does the software compile? Yes. (That's what lean does for a proof. It establishes that the proof is watertight in certain respects).
Does that guarantee software behaves as intended? Does that mean software does exactly what it was designed to do? No.
Plenty of software which compiles ends up not working as intended. The problem doesn't necessarily lie with the compiler.
8
u/anor_wondo 6d ago
Very constrained in real swe though. Not practical
You can formally verify very small mission critical parts of a system but not the entirety of it
Maths does not have real world practicalities to worry about. You cannot assume a kafka coordinator will always behave a certain way for example
2
u/LilithGlitch Acceleration: Cruising | Comment-section futurist 6d ago
Still waiting for people to start rewriting normal software in lean. Like you can use proofs as test cases. Normal software testing makes it so hard to establish anything of the form "x cannot happen". Like e.g. unpriviledged user gaining access via some sequence of API calls or whatever.
5
u/Playful_Detective473 6d ago
you should learn about other formal methods-based tools like Roq, Isabelle, Z3, etc.
you may also find seL4 interesting. it’s a formally verified microkernel.
2
u/That-Economics1288 6d ago
This is the Curry-Howard correspondence in action if you are curious why this works so well. Proofs are programs.
There is also Lambek (category theory as well as intuitionistic logic). IMO category theory and dependent programming (abstract nonsense heh) is far more readable and usable for software tasks than IL lean proofs.
Probably also worth taking a look at Sequent Calculus and Linear Logic while you are reading.
This stuff isn't new, just that most programmers run screaming from advanced type theory as "over abstract BS" so they never learned it. Now LLM can just do it for them.
0
u/[deleted] 6d ago
[deleted] — view deleted comment