I have the following exercise in my discrete mathematics course.
Let $a_0$ $\in$ $\mathit A$. Show that that the function $f : \mathcal{P}(A) \to \mathcal{P}(A)$ defined by
$f(X) = \begin{cases} X \cup \{a_0\} & a_0 \notin X \\ X \setminus \{a_0\} & a_0 \in X \end{cases}$
is bijective.
I know that a function f is bijective if:
- f is injective, i.e. $f(x) = f(y) \to x = y$
- f is surjective, i.e. for all $y \in$ codomain there is an element $x \in$ domain, such that $f(x) = y $.
I also know that per definition of $f$, $\mathit X$ is a set of elements. But I'm stuck to show the injective and surjective propertie.