For two sets $A,B$ there are functions - $f: A\rightarrow B$ and $g: P(B) \rightarrow P(A)$ such that $D$ belongs to $P(B)$ and $g(D)=f^{-1}[D]$.
I need to prove that $f$ is surjective if and only if $g$ is injective.
It is my first ever semester so I'm still learning these basics.
I did the first part like so: Assume $f$ is surjective, I'll show that $g$ is injective. Let $D_1,D_2$ be in $P(B)$ such that $g(D_1)=g(D_2)$, I'll show that $D_1=D_2$.
From the question it's clear that $f^{-1}[D_1]=f^{-1}[D_2]$
Because it's surjective then $f(f^{-1}[D_1]) = f(f^{-1}[D_2]) \Rightarrow D_1=D_2$. So I proved that it's injective.
Now the second part is to prove that if $g$ is injective then $f$ is surjective. And I probably didn't even begin right so I would love to have a direction from you guys. I know that I either assume that $g$ is injective and prove that $f$ is surjective or show that if $f$ is not surjective then $g$ is not injective. And in both cases I'm stuck.
Would appreciate your help/guidance. Thank you!