LLMs are basically a human guided brute force. Lean, mathlib, human design inputs, etc all work to reduce the search space of the brute force. Users are presenting the LLMs with human defined puzzle pieces that have the rules encoded in them with a way to verify anything it generates. The compile verification on its own allows the LLMs to avoid wasting additional time searching down bad paths. The LLMs have a higher chance of success if they are brute forcing a smaller search space.