Let $f:X\rightarrow Y$ and let $\mathcal{B}$ be an algebra over $Y$. I would like to show that $\lbrace f^{-1}[B]\,|\,B\in \mathcal{B}\rbrace$ is an algebra over $X$.
Here is my attempt:\\\
I let $D=\lbrace f^{-1}[B]\,|\,B\in \mathcal{B}\rbrace$. I know I have to show $M,N\in D \implies M\cup N\in D$ and if $\in D$ , then $M^c\in D.$
This is where I'm stuck and I'll need a little help. I don't know what $D$ looks like.
Added: From @Jonas's comments, I make some additions.
$M\in D\implies$ $M=f^{-1}[B]$ for some $B\in \mathcal{B}$.
$N\in D\implies$ $N=f^{-1}[A ]$ for some $A\in \mathcal{B}$.
$M \cup N = f^{-1}[B]\cup f^{-1}[A]=f^{-1}[B\cup A]$, $B\cup A\in \mathcal{B}$. So $M \cup N \in D.$
Left to show that $M^c\in D$.
$M^c=\left[f^{-1}[B]\right]^c=f^{-1}[B^c]$. So $M^c\in D$ since $B\in \mathcal{B} \implies B^c\in \mathcal{B}.$