In a forest where every bird can be combined, must some bird be fond of itself?
Imagine a forest of birds where, for any two birds A and B, calling A to B produces some bird's call in response, written AB. Suppose this forest also contains a mockingbird M, defined so that for any bird x, Mx always equals xx. Does it follow that some bird in the forest must be fond of itself, meaning there's some bird x for which xx equals x?
Reveal the answer
Yes, surprisingly, it's guaranteed. Apply the mockingbird to itself: MM equals MM by its own defining rule, which means there is indeed a bird (namely MM) that equals its own call to itself. This is a real theorem from combinatory logic, a branch of logic underlying how functional programming languages process code, dressed up by Raymond Smullyan as a puzzle about birds in his 1985 book.
— Raymond Smullyan, To Mock a Mockingbird — Alfred A. Knopf, 1985
Go deeper: get the book →