system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do we know that unsolved math problems have an answer?

I was watching Good Will Hunting the other night, and this popped into my head. How do people know that unsolved problems have an answer? Furthermore, the professors in the movie seemed to know pretty instantly that the problem had been solved. Is that realistic? Or does it take additional years to prove that the answer was right? Finally, are most of these problems a result of a lack of effort, like how we could technically count all the sand on a beach, or does it take a genius to solve?
gpt
For a math problem, there may be both constructive and non-constructive proofs.

A constructive proof proves that there is an answer, **and** the answer is given by the proof.

A non-constructive proof is not as good, perhaps, but it simply proves that there is no answer, or it proves that there is an answer but not what that answer actually is.

For example, Euclid's Theorem has a non-constructive proof that there is no "largest prime number".  The problem "What's the largest prime number?" is now proven to have no possible solution.