De Morgan's laws in logic and set theory 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?
The explanation can be seen in the following chain of equivalences: $$\begin{align}(A \cap B)^C &amp; = \{x\mid x \notin (A \cap B)\}\\ \\ &amp; = \{x\mid \lnot [x\in (A\cap B)]\} \\ \\&amp; = \{x\mid \lnot (x \in A \land x \in B)\} \\ \\ &amp; = \{x\mid \lnot(x \in A)\lor \lnot (x \in B)\}  \\\\&amp; = \{x \mid x \notin A \lor x \notin B\}\\ \\ &amp; = \{x\mid x\in A^C \lor x \in B^C\} \\ \\ &amp;= A^C \cup B^C\end{align}$$
My opinion is that set theory law is just a special case of the logic law. For example, we can note $a\in A$(in set domain) as $\mathcal{A}$(in logic domain) and $a\notin A$ noted as $\lnot\mathcal{A}$.