I read that there are performance bottlenecks for proof assistants, and
verification of software often has 10x--100x as many lines of proof as lines of code being verified.
I guess there is also much run-time overhead for proof assistants compared to a program without proofs. I was just wondering if one can verify a piece of code and then generate this code in another language (e.g. python) that is more efficient to execute. In particular, I am interested in Lean 4 to generate scientific computing code in python.
Naively, I can think of using Lean to directly write python programs as strings. But just as using splitOn to parse CSV's. All sorts of things could go wrong.
So my general questions are:
Is there a well-established way to generate programs in another language in proof assistants?
Has any work been done in generating python code from Lean 4?