I want to show the following two propositions:
- The domain of a recursive function is recursively enumerable.
- The range of a recursive function is recursively enumerable.
I have thought the following in order to prove the first proposition.
Suppose that we have a recursive function $f$. Then we know that there is an algorithm $A$ that computes $f$. So if $m \in dom(f)$ then we know that the algorithm $A$ with input $m$ terminates, giving output "yes". Since $m$ is arbitrary, we deduce that the domain of a recursive function is recursively enumerable.
Is my idea right? If so, can't we also deduce from that that the domain of a recursive function is recursive since the algorithm always terminates for the elements of the domain?
Can you give me a hint how we can show the second proposition?