[Math] Prove a set is not recursive / recursively enumerable

computability

I have two sets B which is recursively enumerable and is not recursive, and A which is recursive. Is $A-B$ recursive and / or recursively enumerable? What about $B-A$?

$B-A$ is obviously recursively enumerable (to generate its elements, I can generate B's elements and check if they are in A).

If A and/or B is/are the empty set or their intersection is the empty set, it's easy. Otherwise, I believe $B-A$ is not recursive (I can't tell if a number is in B, since B is not recursive) and $A-B$ is not recursively enumerable (I can generate A's elements, but I can't check if they are in B), so it's not recursive either.

Am I wrong? How can I actually prove any of those?

Best Answer

$A - B$ will be computable if $A - B$ is finite or if $A \cap B$ is finite. In either case, a trivial modification of the procedure to compute $A$ gives a procedure to compute $A - B$.

If $A - B$ and $A \cap B$ are infinite, then $A$ is infinite, so by computably renumbering the sets we can assume $A = \mathbb{N}$. In this case, since $B$ is r.e. but not computable, $B^c$ will not be r.e.

You can expand the arguments in those two paragraphs to make more formal proofs, if needed.

Related Question