If $A\leq_p B$ and $B$ is in $NP$, is it true that $A$ is in $NP$?
What about : "if $A\leq_p B$ and $B$ is in $coNP$, then $A$ is in $coNP$"?
Thanks in advance.
I think both hold. If $B$ is in $NP$, then the yes-instances of $B$ can be verified in polynomial time. If $A \leq_p B$, I can "translate" an instance of $A$ to a instance of $B$. Then I can use the verification algorithm for $B$ to check the yes-instances of $A$. The same should be valid for the second affirmation. I'm not sure though.