To be specific, Lean is a programming language, just one that's specifically made for writing math proofs. If it compiles them it's logically consistent. If part of that is an understandable version of the RH then it definitely works out. It might just take a lot of effort to understand why.
If RH being true or not is important then this is useful. If you need to understand why it's true or not (often this is just as important, or even moreso, than the knowledge of if it's true) then it's less valuable.