Prove that $f$ composed with itself equals $f$ If $U$ is a given universe with (fixed) $S, T \in U$, define $f : P(U) \to P(U)$ by $f(A) = T \cap (S \cup A)$ for $A \subseteq U$. Prove that $f^2 = f$.
I don't understand the above problem.
$f^2 = f \circ f = f(f(x))$, right? So in order for $f(A) = f(f(A))$, $f(A)$ must equal $A$, but it equals $T \cap (S \cup A)$.
Help a brainlet out.
 A: Let $A\in P(U)$. Then,
$$f(\color{blue}A)=T\cap (S\cup \color{blue}A).$$ Thus,
$$\begin{align}
f^2(A)&=f(\color{blue}{f(A)})\\
&=T\cap(S\cup \color{blue}{f(A)}),\quad\text{distribute $T$ and we get}\\
&=(T\cap S)\cup \big[T\cap f(A)\big]\\
&=(T\cap S)\cup \big[T\cap \color\red(T\cap(S\cup A )\color\red) \big],\quad\text{apply associative property for $\cap$ to get}\\
&=(T\cap S)\cup \big[(T\cap T)\cap(S\cup A ) \big]\\
&=(T\cap S)\cup \big[T\cap(S\cup A ) \big],\quad\text{distribute $T$ again and we get}\\
&=(T\cap S)\cup \big[(T\cap S)\cup(T\cap A)\big],\quad\text{apply associative property for $\cup$ and we get}\\
&=\big[(T\cap S)\cup (T\cap S)\big]\cup(T\cap A)\\
&=(T\cap S)\cup(T\cap A),\quad\text{factor out $T$ to get}\\
&=T\cap(S\cup A)\\
&=f(A).
\end{align}
$$
Finally, $f^2=f$.
A: You have to prove that $f(f(A)) =  f(T \cap (S \cup A)) = T \cap (S \cup (T \cap (S \cup A)))$ equals $f(A) = T \cap (S \cup A)$. 
In order to prove this, you will need that the intersection is distributive with respect to the union of two sets and that the union is distributive with respect to the intersection of sets.
The following contains a spoiler, so if you want to try this yourself, do not look at the following box (before you have tried the computations yourself):

\begin{align} T \cap (S \cup (T \cap (S \cup A))) &= T \cap (S \cup ((T \cap S) \cup (T \cap A))\\ &= (T \cap S) \cup (T \cap (T \cap S)) \cup (T \cap (T \cap A))\\ &= (T \cap S) \cup (T \cap S) \cup (T \cap A)\\ &= (T \cap S) \cup (T \cap A)\\ &= T \cap (S \cup A)\end{align}

