1

I know this question was answered before. I'd like to refer @Asaf_Karagila's answer.

He defined the following function:
$$g(k)=\begin{cases}\frac k2 & k\text{ is even}\\1+\sum_{m\leq k}f_m(k) &\text{otherwise}\end{cases}$$

How can you tell that $g(k)$ is surjective?
When $k$ is odd, $g(k)$ returns $1 + $ the sum of all $f_m(k)$ where $m\le k$. What is the meaning of that and how can you even tell that $f_m(k)$ is defined?

for example, it's a possiblity that $f_m$ domain's is $\mathbb{N}_{odd}$ while $k$ is even.

AnnieOK
  • 2,990

2 Answers2

2

$g$ is surjective because for any $y\in \Bbb N$ we have $g(2y)=y$, hence the image of $g$ covers the whole $\Bbb N$.

The domain of a function is supposed to be the whole space: if we're talking about a function $h:X\to Y$, then by definition $h(x)$ is defined for all $x\in X$. Thus all functions $f_m$ are defined for all $k$. Finally, $1+\sum_{m\le k}f_m(k)$ is, by definition of the sum, $$1+f_0(k)+f_1(k)+\dots+f_k(k).$$

TZakrevskiy
  • 23,308
2

$g$ as defined in Asaf's answer is clearly surjective because, being defined as $g(k)=k/2$ for $k$ even, when $k$ spans the even numbers, $k/2$ spans all the numbers.