Formal methods veteran: without formal semantics, a Lean proof can't make code 'correct'

JiaweiLiu_ · x · 2026-09-20

Formal verification expert RosuGrigore warns the new wave of AI-era computer scientists who believe "I proved it in Lean, so it's correct": you cannot even define code correctness without a formal semantics of the programming language.

His simple demonstration: run the same program under gcc and clang at various optimization levels and watch the results diverge before attempting a Lean proof. The formal semantics is the hard part, requiring both human judgement and an appropriate language framework — orthogonal to Lean, which only works after the semantics exists.

A pointed technical corrective to the current hype around AI-assisted Lean proofs.

Related event: Formal verification veteran warns Lean proofs don't guarantee code correctness(2 posts)→

Original post →

More from Research

Research channel →