The exercise I'm doing is stated as follows:
Is the function $\theta:\scr{P}(\Bbb{Z})\rightarrow\scr{P}(\Bbb{Z})$ defined as $\theta(X)=\overline{X}$ bijective? If so, find $\theta^{-1}$
Where $\overline{X}$ denotes the complement of $X$
My reasoning is this:
Suppose $\theta(A)=\theta(A')$. This means $\overline{A}=\overline{A'}$ and therefore $A=A'$. Since $\theta(A)=\theta(A')\Rightarrow A=A'$ we can say that $\theta$ is injective.
Now suppose $B\in\scr{P}(\Bbb{Z})$. We seek some $A\in\scr{P}(\Bbb{Z})$ such that $\theta(A)=B$, which is to say $\overline{A}=B$. Solving for $A$ gives us $A=\overline{B}$, so $\theta(\overline{B})=B$, which means $\theta$ is surjective and therefore bijective.
Now to find $\theta^{-1}$ we let $Y=\overline{X}$. Switching $X$ and $Y$ and solving for $Y$ yields $Y=\overline{X}$. Therefore $\theta^{-1}(X)=\overline{X}$. This is easily verified by computing $\theta^{-1}\circ\theta$ :
$\theta^{-1}\circ\theta=\theta^{-1}(\theta(X))=\theta^{-1}(\overline{X})=\overline{\overline{X}}=X$
Is my reasoning here valid? My main concern lies in the first step where I showed that $\theta$ is injective. The entire exercise seemed a bit trivial so I'm worried that I'm overlooking something obvious. Any advice is appreciated, thanks!