Defining a Partition on Z I'm having difficulty answering/proofing this question I have in my set theory class. QUESTION HERE ALONG WITH MY WORK

 A: Think of this: define first for $\;n\in\Bbb N=\{1,2,3,...\}\;$ :
$$\begin{cases}B_0=\left\{2^0=1,\,3,\,5,\,7,\,\ldots,\,2n-1\,\ldots\right\}\\{}\\
B_1=\left\{2^1=2,\,6,\,10,\,14,\,\ldots,\,4n-2,\ldots\right\}\\{}\\
B_2=\left\{2^2=4,\,12,\,20,\,28,\ldots,12n-8,\ldots\right\}\\{}\\\ldots\\{}\\
B_n=\left\{2^n,\,2^n+2^{n+1},\,2^n+2^{n+2},\ldots,2^{n+1}n-2^n,\ldots\right\}\\{}\\\ldots\end{cases}$$
Check that $\;\{B_n\}_{n\in\Bbb N}\;$ is a partition of $\;\Bbb N\;$ , and now define
$$\forall\,n\in\Bbb Z\;,\;\;n\le0\;,\;\;A_n:=\{n\}\;,\;\;\text{and}\;\;\forall\,n\in\Bbb Z\;,\;\;n> 0\;,\;\;B_n$$
Check now that $\;\{A_n,\,B_n\}\;$ is a partition of $\;\Bbb Z\;$ fulfilling your conditions.
A: I think your idea is correct, but your syntax for expressing it is wrong. In particular, the set builder notation
$$\{x\mid P(x)\}$$ means the set of all $x$ for which $P(x)$ is true, so something like $$A_n=\{n\mid n\leq0\}$$
would actually mean that $A_n$ is the set of zero and all negative real numbers, which is probably not what you want to express. Instead simply $$A_n=\{-n\}\text{ for }n\in\mathbb Z_{>0}$$ does what you want. Similarly the notation for defining $B_n$ should be
$$B_n=\{2^{n-1}(2m+1)\mid m\in\mathbb Z_{\geq0}\}$$
or simply
$$B_n=\{2^{n-1},2^{n-1}\cdot3,2^{n-1}\cdot5,\dots\}.$$
But of course, although your construction is correct you have to prove rigorously that it works. (To do so, you might want to consider using the unique factorisation theorem for integers.)
