Let \(\displaystyle f\colon\mathbb{N}\to\{0,1\}^{\mathbb{N}}\) be any function. Which of these sequences is guaranteed not to lie in the image of \(\displaystyle f\), for every choice of \(\displaystyle f\)?
Step by step with comments, a check and common mistakes.
Step-by-step solution
Fix any function \(\displaystyle f\); each \(\displaystyle f(n)\) is a binary sequence.
\[\displaystyle f(n)\in\{0,1\}^{\mathbb{N}}\]
Define \(\displaystyle u\) by complementing the diagonal of \(\displaystyle f\).
\[\displaystyle u(n)=1-f(n)(n)\]
If \(\displaystyle u=f(k)\) for some \(\displaystyle k\), evaluate both at position \(\displaystyle k\).
\[\displaystyle u(k)=f(k)(k)\]
Then \(\displaystyle 1-f(k)(k)=f(k)(k)\), which is impossible; so \(\displaystyle u\) is never in the image of \(\displaystyle f\), and the correct choice is \(\displaystyle u(n)=1-f(n)(n)\).