So how do we know if it does what it does? Anyone that is using frontier models for a few years, will tell you that they try to reward hack whenever they can.
In theory, if you formulated your proposition correctly, and Lean says it is proved, then the proposition is true. This works because of the Curry-Howard correspondence -- proofs can be represented as computation.
That’s the purpose of Lean. It’s kind of like asking: how do you know your CPython is running all the correct binary?
Well, you kind of don’t, as it’s beyond human comprehension (in theory you could trace everything down to a certain level) but there are layers and layers of build abstraction that you assume are correct, compilers, runtime environments, and mature libraries that are checked and validated. Not a perfect analogy but that’s kind of the gist of it.