# True/False as sets in boolean algebra?

I have a quick question. I've been studying a little boolean algebra and noticed that the basic operations seem to correlate well with set operations.

So to extrapolate, I tried to visualize True and False as sets. The only way I got this to work is considering True as the universal set and False as the empty set. Is this the right and only way of thinking about it?

## 2 Answers

Let $p(x)$ a predicate. Let's call the set of $x$'s for which $p(x)$ holds true $P$: $$P=\{x|p(x)\}$$ Then trivially: $$p(x)\equiv x\in P$$

Now it follows $$$$\begin{split} \neg p(x)&\equiv x\in P^c\\ p(x)\vee q(x)&\equiv x\in P\cup Q\\ p(x)\wedge q(x)&\equiv x\in P\cap Q\\ \end{split}$$$$ where $q(x)\equiv x\in Q$

You can see that $$\operatorname{True}\equiv p(x)\vee \neg p(x)\equiv x\in P\cup P^c\equiv x\in 1$$ $$\operatorname{False}\equiv p(x)\wedge\neg p(x)\equiv x\in P\cap P^c=x\in\emptyset$$

where $1$ is the universe.

For a set $A$ in a universal set $U$, it may be best to think of each individual element of $U$ being associated with True (if the element is in $A$) and False (if the element is not in $A$).

• But take two true bools X*Y = True, they are each within set A, but their intersection is the null set. – StackOverflowOfficial Sep 8 '17 at 15:40
• Goldname: $X, Y \in A$, (elements of A,) so it makes no sense to talk about the intersection of two elements of the set A. $A \cap (U\setminus A) = A\cap A^c = \varnothing.$ One can show that if X, Y are elements of A, (both true), we have that $X\land Y$ is true, and is also in A. – amWhy Sep 8 '17 at 16:01
• Each set $A$ can be associated with a vector of $1$s (True) and $0$s (False) indexed by the elements of $U$. Then for instance you can use these vectors to do operations (such as union, intersection, complement, symmetric difference) on subsets of $U$. – paw88789 Sep 8 '17 at 16:06