Prove that $A=B$ considering: $(A \cap C = B \cap C) \land (A \cup C = B \cup C)$ So this is the thing I've got to prove:
$ (A \cap C = B \cap C ) \land ( A \cup C = B \cup C ) \Leftrightarrow A = B $
I can understand this intuitively but the formal proof is taking me some time. So far, I've got this: 
$ (A \cap C \subset B \cap C ) \land (B \cap C \subset A \cap C ) \land ( A \cup C \subset B \cup C ) \land ( B \cup C \subset A \cup C ) \Leftrightarrow (A \subset B) \land (B \subset A) $
$ (\forall x) (x \in A \land x \in C \Leftrightarrow x \in B \land x \in C ) \land (\forall x) (x \in A \lor x \in C \Leftrightarrow x \in B \lor x \in C ) \Leftrightarrow (\forall x)(x \in A \Leftrightarrow x \in B) $
But I feel like going nowhere. I assume this has something to do with the transitive property, but I'm not sure how to apply it here. 
 A: Let $x\in A$ then there's two cases


*

*if $x\in C$ then $x\in A\cap C=B\cap C$ then $x\in B$

*and if $x\not\in C$ then $x\in A\cup C=B\cup C$ then $x\in B$


hence we proved that $x\in B$ and then $A\subset B$. The other inclusion is similar. Conclude.
A: To do this on the logic level, one approach is to use the fact that $\;\lor\;$ distributes over $\;\equiv\;$.
For the right hand part, this results in
\begin{align}
& A \cup C \;=\; B \cup C \\
\equiv & \qquad \text{"set extensionality; definition of $\;\cup\;$, twice"} \\
& \langle \forall x :: x \in A \lor x \in C \;\equiv\; x \in B \lor x \in C \rangle \\
\equiv & \qquad \text{"logic: $\;\lor\;$ distributes over $\;\equiv\;$"} \\
(*) \;\;\; \phantom{\equiv} & \langle \forall x :: (x \in A \;\equiv\; x \in B) \lor x \in C \rangle \\
\end{align}
Now for the left hand side we can do something similar:
\begin{align}
& A \cap C \;=\; B \cap C \\
\equiv & \qquad \text{"set extensionality; definition of $\;\cup\;$, twice"} \\
& \langle \forall x :: x \in A \land x \in C \;\equiv\; x \in B \land x \in C \rangle \\
\equiv & \qquad \text{"logic: negate both sides of $\;\equiv\;$ -- to prepare for the next step"} \\
& \langle \forall x :: x \not\in A \lor x \not\in C \;\equiv\; x \not\in B \lor x \not\in C \rangle \\
\equiv & \qquad \text{"logic: $\;\lor\;$ distributes over $\;\equiv\;$"} \\
& \langle \forall x :: (x \not\in A \;\equiv\; x \not\in B) \lor x \not\in C \rangle \\
\equiv & \qquad \text{"logic: simplify by negating both sides of $\;\equiv\;$"} \\
(**) \;\;\; \phantom{\equiv} & \langle \forall x :: (x \in A \;\equiv\; x \in B) \lor x \not\in C \rangle \\
\end{align}
Finally, combine $(*)$ and $(**)$ and use laws of predicate logic to conclude that together they are equivalent to $\;A=B\;$.
