[Math] De Morgan’s laws in logic and set theory

elementary-set-theorylogicsoft-question

In logic De Morgan's law means $\lnot (A \land B) \Leftrightarrow \lnot A \lor \lnot B$

In set theory De Morgan's law means $(A \cap B)^C = A^C \cup B^C$

I'm surprised that the same idea is true in different fields. Is there any explanation for this phenomenon or is it just a coincidence?

Best Answer

The explanation can be seen in the following chain of equivalences: $$\begin{align}(A \cap B)^C & = \{x\mid x \notin (A \cap B)\}\\ \\ & = \{x\mid \lnot [x\in (A\cap B)]\} \\ \\& = \{x\mid \lnot (x \in A \land x \in B)\} \\ \\ & = \{x\mid \lnot(x \in A)\lor \lnot (x \in B)\} \\\\& = \{x \mid x \notin A \lor x \notin B\}\\ \\ & = \{x\mid x\in A^C \lor x \in B^C\} \\ \\ &= A^C \cup B^C\end{align}$$