You need to pick an abstraction level. I don't prove in lean the impact of my programs on the price of eggs at the local market. I don't prove in lean how much energy my programs consume, or even how much RAM they consume. I do prove that say a particular pair of functions commute, or that another function is idempotent, or that under a denotational semantics a collection of functions can be composed without error.
I think that is a valid level to use formal verification but I would argue it is much more powerful to also have a formal model of code. For example, if I have:
Yes it is very helpful to know some properties about `run_some_function` (maybe it is commutative? idempotent?), but it is much more valuable to have a model which can translate what ultimately is being passed to `run_some_action` at the end and how that derives from the return of `run_some_function`, grounding the LLM's reasoning in something deterministic it can't break from.