Oddly enough, most uses of Lean never actually run the program. The fact that it type checks is enough to prove the theorem in question.
That said, if execution is seriously required for your problem along with strong logic on the side, you may prefer Dafny which transpiles the computation part of your proof to C++ or Go.