properties of recursively enumerable sets $A \times B$ is an r.e.(recursively enumerable) set,  I want to show that $A$ (or $B$) is  r.e. ($A$ and $B$ are nonempty)
I need to find a formula. I've got an idea that I should use the symbolic definition of an r.e. set. That is, writing a formula for the function that specifies $A$ or $B$, assuming a formula exists for $A \times B$. I guess I must use Gödel number somewhere. 
I should've mentioned that I asked this question over there (Computer Science) but since I am more interested in mathematical arguments and looking for formulas, I'd ask it here as well. 

The notion of computable or c.e. is usually defined on $\omega$. To understand what $A \times B$ being computable or c.e., you should identify order pairs $(x,y)$ with the natural number under a bijective pairing function. Any of the usual standard pairing function, the projection maps $\pi_1$ and $\pi_2$ are computable. 
First note that $\emptyset \times B = \emptyset$. So the result does not hold if one of the sets is empty. 
Suppose $A$ and $B$ are not empty. Suppose $A \times B$ is c.e. Then there is a total computable function $f$ with range $A \times B$. Then $\pi_1 \circ f$ and $\pi_2 \circ f$ are total computable functions with range $A$ and $B$, respectively. So $A$ and $B$ are c.e. 
