3

Can somebody give an example of a function $f : \mathbb{N} → \mathbb{N}$ which is partial, injective, and surjective. I was thinking about $f(x)=x-1$, but I am not sure if it is surjective.

  • 1
    If the function is prescribed by $x\mapsto x-1$ then for every $x\in\mathbb N$ we have $f(x+1)=x$. So the function is surjective. – drhab Jan 19 '18 at 14:00

1 Answers1

4

Your suggestion $f(x)=x-1$ is a valid example for a suitable choice of $S\subset \mathbb N$ on which $f$ is to be defined.

More generally, if $S_n=\{n,n+1,n+2,\dots\}$ and $\mathbb N = S_0$, then $f:\mathbb S_n\longrightarrow \mathbb N$ defined by $f(x)=x-n$ is a partial function $f:\mathbb N \longrightarrow\hspace{-12pt}{\small|}\hspace{11pt} \mathbb N$ that is both injective and surjectice.

Fimpellizzeri
  • 23,321