8,500 Lines of C Paired with 15,000 Lines of Lean for Physics Algorithm Verification

kylekabasares · x · 2026-07-21

A developer showcased a rigorous practice combining algorithms with physics: for Maxwell's equations in electrodynamics, Lanyon implemented a hyperbolicity-preserving wave-propagation scheme in 8,500 lines of formally verified C. Furthermore, he verified it using 15,000 lines of Lean code, proving 156 correctness theorems—including convergence and L^2 stability—down to floating-point precision.

Original post →

More from Research

Research channel →