Computable function and decidable sets: For a computable $g$ and decidable set $A$ , Does $g(A), g^{-1}(A)$ necessarily decidable? I'm trying to solve the following exercise from an old exam:
For a computable function $G: \mathbb{N} \to \mathbb{N} $, and a set of numbers $A$, we define $g^{-1}(A)=\{x|g(x) \in A\} $ and $g(A)=\{g(x)| x\in A\}$. If $A$ is a decidable group so..
here there were 4 options and I chose $g(A)$ is not necessarily decidable, and $g^{-1}$ is certainly decidable. 
I chose this option since we are not sure that $g$ is a total computable function, and it might not stop on one of $x \in A$, but why does $g^{-1}(A)=\{x|g(x) \in A\} $ have to be decidable? we need to use $g$ to find out that $g(x) \in A$, no? 
 A: Your reasoning works out for $g(A)$, but $g^{-1}(A)$ needn't be decidable. Just take $A=\mathbb{N}$: then in particular $g^{-1}(A)$ decidable means the domain of every partial computable function is decidable. But the recursively enumerable sets are exactly the domains of computable functions, so we'd have every r.e. set recursive. 
Thanks for sharing the specific choices that were offered you in your comment below. None of them hold for an arbitrary computable function (though see below for a total one,) and we can show this without taking $A$ to be anything fancier than $\mathbb{N}$ itself. First, $g(\mathbb{N})$ may be decidable, for instance, if it's finite. $g^{-1}(\mathbb{N})$ may be decidable. For instance, if $g$ is total, $g^{-1}(\mathbb{N})=\mathbb{N}$. 
$g(\mathbb{N})$ may be undecidable: take $g$ to be identity on the diagonal set $D=\{n: f_n(n) \textrm{is defined} \}$, where $f_n$ is some Godel numbering of the computable functions, and $0$ elsewhere. $g^{-1}(\mathbb{N})$ may be undecidable: take $g$ again to be identity on $D$, but now undefined elsewhere. It's immediate that these last two sets are undecidable by the diagonalization argument that you've likely seen at some point-I'll elaborate if not.
As we've agreed below, the questioner must have intended $g$ to be total. Then we see something like the first diagonal function defined above has $g(\mathbb{N})$ undecidable, but $g^{-1}(\mathbb{N})$ is decidable for decidable $A$ by simply computing $g(n)$ and seeing whether it's in $A$.
