Let $A$ and $B$ be semi decidable languages. Moreover, $A \cup B$ and $A \cap B$ are decidable. I want to show that $B$ is decidable.
Firstly, I would like to know if the following approach works:
First, we can check if $w \in A \cup B$. Since this is decidable, we know that either $w \in A$ or $w \in B$. Now, I wanted to argue that, since $A$ is semi-decidable, so is $A^c$, where $A^c$ is the complement of $A$. Then $A^c \cap B$ is also decidable and wen can simply check if $w \in A^c \cap B$, but I am not sure if that is correct?
"First, we can check if $w \in A \cup B$. Since this is decidable, we know that either $w \in A$ or $w \in B$."
I am failing to understand your proof right here.
Here is an approach to prove. Instead of reasoning on the level of each input to a Turing machine, let us reason on the level of semi-decidability and decidability.
The conditions areCondition 1 and condition 3 imply
Condition 4 and condition 5 imply
Condition 2 and condition 6 imply $B$ is decidable.
Exercise (provided by Johannes Kloos). Let $A$ and $B$ be semi-decidable languages such that both $A\cup B$ and $A\cap B$ are co-semi-decidable languages. Show that $B$ is decidable.