How to tell an over-confident student they still have a lot to learn?
I would suggest against [a deleted answer telling to put a lot of weight on simplest textbook examples] (I consider "ha! you missed the example from chapter 2" to be highly unpedagogical, as it is "appeal to authority" and "you should read and remember rather than think").

I think two things may help:


give him problems and require written solutions (it is harder to boast, or mask omissions, when one writes), solved "down to the last $\epsilon$", as you "want to see the proof, not just be convinced that he can prove it",
give more advanced problems (still, which are within his reach), for which answer cannot be hand-waved (e.g. "what is sum of", "give an example of set, such that...") OR don't tell the answer in advance (so instead of "prove X given Y" ask "decide whether X holds for all Y").


In both cases, I would tell him (in person) that he is very smart, and you give him more advanced problems because of that. (And that he still needs to learn to be precise enough for mathematics.)

Maybe he does want to show you that he is smart, and as you do not acknowledge it he, well, tries again.

In any case, I would not undermine his skills. In mathematics &amp; theoretical physics I know a lot of people who underestimate their skills, but not many who overestimate for a longer time (such subject makes one humble, sooner or later).