Skip to main content

Boolean Algebra

(Content adapted from Critchlow & Eck)

So far we have discussed how to write and interpret propositions. This section deals with manipulating them. For this, we need algebra. Ordinary algebra, of the sort taught in high school, is about manipulating numbers, variables that represent numbers, and operators such as ++ and ×\times that apply to numbers. Now, we need an algebra that applies to logical values, propositional variables, and logical operators. The first person to think of logic in terms of algebra was the mathematician, George Boole, who introduced the idea in a book that he published in 1854. The algebra of logic is now called Boolean algebra in his honor.

The algebra of numbers includes a large number of rules for manipulating expressions. The distributive law, for example, says that x(y+z)=xy+xzx(y+z)=xy+xz, where xx, yy, and zz are variables that stand for any numbers or numerical expressions. This law means that whenever you see something of the form xy+xzxy+xz in a numerical expression, you can substitute x(y+z)x(y+z) without changing the value of the expression, and vice versa. Note that the equals sign in x(y+z)=xy+xzx(y+z)=xy+xz means "has the same value as, no matter what numerical values xx, yy, and zz have."

Laws

In Boolean algebra, we work with logical values instead of numerical values. There are only two logical values, true and false. We will write these values as T\T and F\F. The symbols T\T and F\F play a similar role in Boolean algebra to the role that constant numbers such as 1 and 3.14159 play in ordinary algebra. Instead of the equals sign, Boolean algebra uses logical equivalence, \equiv, which has essentially the same meaning.1 For example, for propositions pp, qq, and rr, the \equiv operator in p(qr)(pq)rp\land(q\land r)\equiv(p\land q)\land r means "has the same value as, no matter what logical values pp, qq, and rr have."

Many of the rules of Boolean algebra are fairly obvious, if you think a bit about what they mean. Even those that are not obvious can be verified easily by using a truth table. Below we list the most important of these laws. You will notice that all these laws, except the first, come in pairs: Each law in the pair can be obtained from the other by interchanging \land with \lor and T\T with F\F. This cuts down on the number of facts you have to remember.2

Name

Law

Double negation

¬(¬p)p\lnot(\lnot p)\equiv p

Excluded middle

p¬pTp\lor\lnot p\equiv\T

Contradiction

p¬pFp\land\lnot p\equiv\F

Identity laws

Tpp\T\land p\equiv p

Fpp\F\lor p \equiv p

Idempotent laws

pppp\land p\equiv p

pppp\lor p\equiv p

Commutative laws

pqqpp\land q\equiv q\land p

pqqpp\lor q\equiv q\lor p

Associative laws

(pq)rp(qr)(p\land q)\land r\equiv p\land(q\land r)

(pq)rp(qr)(p\lor q)\lor r\equiv p\lor(q\lor r)

Distributive laws

p(qr)(pq)(pr)p\land(q\lor r)\equiv (p\land q)\lor (p\land r)

p(qr)(pq)(pr)p\lor(q\land r)\equiv (p\lor q)\land (p\lor r)

De Morgan's laws

¬(pq)(¬p)(¬q)\lnot(p\land q)\equiv (\lnot p)\lor(\lnot q)

¬(pq)(¬p)(¬q)\lnot(p\lor q)\equiv (\lnot p)\land(\lnot q)

Just as an example, let's verify the first rule in the table, the Law of Double Negation. This law is just the old, basic grammar rule that two negatives make a positive. Although this rule is questionable as it applies to English as it is actually usedno matter what the grammarian says, "I can't get no satisfaction" doesn't really mean "I can get satisfaction"the validity of the rule in logic can be verified just by computing the two possible cases: when pp is true and when pp is false. When pp is true, then by the definition of the ¬\lnot operator, ¬p\lnot p is false. But then, again by the definition of ¬\lnot, the value of ¬(¬p)\lnot(\lnot p) is true, which is the same as the value of pp. Similarly, in the case where pp is false, ¬(¬p)\lnot(\lnot p) is also false. Organized into a truth table, this argument takes the rather simple form

pp¬p\lnot p¬(¬p)\lnot(\lnot p)
truefalsetrue
falsetruefalse

The fact that the first and last columns are identical shows the logical equivalence of pp and ¬(¬p)\lnot(\lnot p). The point here is not just that ¬(¬p)p\lnot(\lnot p)\equiv p, but also that this logical equivalence is valid because it can be verified computationally based just on the relevant definitions. Its validity does not follow from the fact that "it's obvious" or "it's a well-known rule of grammar." Students often ask "Why do I have to prove something when it's obvious." The point is that logicand mathematics more generallyis its own little world with its own set of rules. Although this world is related somehow to the real world, when you say that something is obvious (in the real world), you aren't playing by the rules of the world of logic. The real magic of mathematics is that by playing by its rules, you can come up with things that are decidedly not obvious, but that still say something about the real worldoften, something interesting and important.

Each of the rules in the figure above can be verified in the same way, by making a truth table to check all the possible cases.

Substitution

It's important to understand that the propositional variables in the laws of Boolean algebra can stand for any propositions, including compound propositions. It is not just true, as the Double Negation Law states, that ¬(¬p)p\lnot(\lnot p)\equiv p. It is also true that ¬(¬q)q\lnot(\lnot q)\equiv q, that ¬(¬(pq))(pq)\lnot(\lnot(p\land q))\equiv (p\land q), that ¬(¬(p(q¬p)))(p(q¬p))\lnot(\lnot(p\rightarrow(q\land\lnot p)))\equiv(p\rightarrow (q\land\lnot p)), and an infinite number of other statements of the same form. Here, a "statement of the same form" is one that can be obtained by substituting something for pp in both places where it occurs in ¬(¬p)p\lnot(\lnot p)\equiv p. How can I be sure that all these infinitely many statements are valid when all that I've checked is one little two-line truth table? The answer is that any given proposition, QQ, no matter how complicated, has a particular truth value, either true or false. So, the question of the validity of ¬(¬Q)Q\lnot(\lnot Q)\equiv Q always reduces to one of the two cases I already checked in the truth table. (Note that for this argument to be valid, the same QQ must be substituted for pp in every position where it occurs.) While this argument may be "obvious," it is not exactly a proof, but for now we will just accept the validity of the following theorem:

Theorem: First Substitution Law
Suppose that QQ is any proposition, and that pp is a propositional variable. Consider any tautology. If (Q)(Q) is substituted for pp in all places where pp occurs in the tautology, then the result is also a tautology.

Since logical equivalence is defined in terms of tautology, it is also true that when (Q)(Q) is substituted for pp in a logical equivalence, the result is again a logical equivalence.3

The First Substitution Law lets you do algebra! For example, you can substitute pqp\rightarrow q for pp in the law of double negation, ¬(¬p)p\lnot(\lnot p)\equiv p. This allows you to "simplify" the expression ¬(¬(pq))\lnot(\lnot(p\rightarrow q)) to pqp\rightarrow q with confidence that the resulting expression has the same logical value as the expression you started with. (That's what it means for ¬(¬(pq))\lnot(\lnot(p\rightarrow q)) and pqp\rightarrow q to be logically equivalent.) You can play similar tricks with all the laws in the table above. Even more important is the Second Substitution Law, which says that you can substitute an expression for a logically equivalent expression, wherever it occurs. Once again, we will accept this as a theorem without trying to prove it here. It is surprisingly hard to put this law into words:

Theorem: Second Substitution Law
Suppose that PP and QQ are any propositions such that PQP\equiv Q. Suppose that RR is any compound proposition in which (P)(P) occurs as a subproposition. Let RR' be the proposition that is obtained by substituting (Q)(Q) for that occurrence of (P)(P) in RR. Then RRR\equiv R'.

Note that in this case, the theorem does not require (Q)(Q) to be substituted for every occurrence of (P)(P) in RR. You are free to substitute for one, two, or as many occurrences of (P)(P) as you like, and the result is still logically equivalent to RR.

The Second Substitution Law allows us to use the logical equivalence ¬(¬p)p\lnot(\lnot p)\equiv p to "simplify" the expression q(¬(¬p))q\rightarrow (\lnot(\lnot p)) by substituting (p)(p) for (¬(¬p))(\lnot(\lnot p)). The resulting expression, q(p)q\rightarrow(p), or just qpq \rightarrow p without the parentheses, is logically equivalent to the original q(¬(¬p))q\rightarrow (\lnot(\lnot p)). Once again, we have to be careful about parentheses: The fact that pppp\lor p\equiv p does not allow us to rewrite qpprq\land p\lor p\land r as qprq\land p\land r. The problem is that qpprq\land p\lor p\land r means (qp)(pr)(q\land p)\lor (p\land r), so that (pp)(p\lor p) is not a subexpression. So even though in practice we won't always write all the parentheses, you always have to be aware of where the parentheses belong.

The final piece of algebra in Boolean algebra is the observation that we can chain logical equivalences together. That is, from PQP\equiv Q and QRQ\equiv R, it follows that PRP\equiv R. This is really just a consequence of the Second Substitution Law: The equivalence QRQ\equiv R allows us to substitute RR for QQ in the statement PQP\equiv Q, giving PRP\equiv R. (Remember that logical equivalence is defined in terms of a proposition.) This means that we can show that two compound propositions are logically equivalent by finding a chain of logical equivalences that lead from one to the other. For example:

p(pq)p\land(p\rightarrow q)p(¬pq)\equiv p\land(\lnot p\lor q)definition of pqp\rightarrow q, 2nd Subst. Law
(p¬p)(pq)\equiv (p\land \lnot p)\lor (p\land q)Distributive Law
F(pq)\equiv \F\lor(p\land q)Law of Contradiction, 2nd Subst. Law
(pq)\equiv (p\land q)Identity Law

Each step in the chain has its own justification. In several cases, a substitution law is used without stating as much. In the first line, for example, the definition of pqp\rightarrow q is that pq¬pqp\rightarrow q\equiv \lnot p\lor q. The Second Substitution Law allows us to substitute (¬pq)(\lnot p\lor q) for (pq)(p\rightarrow q). In the last line, we implicitly applied the First Substitution Law to the Identity Law, Fpp\F\lor p\equiv p, to obtain F(pq)(pq)\F\lor(p\land q)\equiv (p\land q).

The chain of equivalences in the above example allows us to conclude that p(pq)p\land(p\rightarrow q) is logically equivalent to pqp\land q. This means that if you were to make a truth table for these two expressions, the truth values in the column for p(pq)p\land(p\rightarrow q) would be identical to those in the column for pqp\land q. We know this without actually making the table. In this case, the table would only be four lines long and easy enough to make. But Boolean algebra can be applied in cases where the number of propositional variables is too large for a truth table to be practical.

Let's do another example. Recall that a compound proposition is a tautology if it is true for all possible combinations of truth values of the propositional variables that it contains. But another way of saying the same thing is that PP is a tautology if PTP\equiv\T. So, we can prove that a compound proposition, PP, is a tautology by finding a chain of logical equivalences leading from PP to T\T. For example:

((pq)¬p)q((p\lor q)\land \lnot p)\rightarrow q(¬((pq)¬p))q\equiv (\lnot((p\lor q)\land\lnot p))\lor qdefinition of \rightarrow
(¬(pq)¬(¬p))q\equiv (\lnot(p\lor q) \lor \lnot (\lnot p))\lor qDeMorgan's Law, 2nd Subst. Law
(¬(pq)p)q\equiv (\lnot(p\lor q) \lor p)\lor qDouble Negation, 2nd Subst. Law
(¬(pq))(pq)\equiv (\lnot (p\lor q)) \lor (p\lor q)Associative Law for \lor
T\equiv \TLaw of Excluded Middle

From this chain of equivalences, we can conclude that ((pq)¬p)q((p\lor q) \land \lnot p)\rightarrow q is a tautology.

Now, it takes some practice to look at an expression and see which rules can be applied to it; to see (¬(pq))(pq)(\lnot (p\lor q)) \lor (p\lor q) as an application of the law of the excluded middle for example, you need to mentally substitute (pq)(p\lor q) for pp in the law as it is stated in the table. Often, there are several rules that apply, and there are no definite guidelines about which one you should try. This is what makes algebra something of an art.

Additional Laws

It is certainly not true that all possible rules of Boolean algebra are given in the figure. For one thing, there are many rules that are easy consequences of the rules that are listed there. For example, although the table asserts only that Fpp\F\lor p\equiv p, it is also true that pFpp\lor\F\equiv p. This can be checked directly or by a simple calculation:

pFp\lor\FFp\equiv \F\lor pCommutative Law
p\equiv pIdentity Law as given in the table

Additional rules can be obtained by applying the Commutative Law to other rules in the table, and we will use such rules freely in the future.

Another sort of easy extension can be applied to the Associative Law, (pq)rp(qr)(p\lor q)\lor r\equiv p\lor(q\lor r). The law is stated for the \lor operator applied to three terms, but it generalizes to four or more terms. For example

((pq)r)s((p\lor q)\lor r)\lor s(pq)(rs)\equiv (p\lor q)\lor (r\lor s)by the Associative Law for three terms
p(q(rs))\equiv p\lor(q\lor (r\lor s))by the Associative Law for three terms

We will, of course, often write this expression as pqrsp\lor q\lor r\lor s, with no parentheses at all, knowing that wherever we put the parentheses the value is the same.

One other thing that you should keep in mind is that rules can be applied in either direction. The Distributive Law, for example, allows you to distribute the pp in p(q¬p)p\lor(q\land\lnot p) to get (pq)(p¬p)(p\lor q)\land(p\lor\lnot p). But it can also be used in reverse to "factor out" a term, as when you start with (q(pq))(q(qp))(q\lor(p\rightarrow q))\land(q\lor(q\rightarrow p)) and factor out the qq to get q((pq)(qp))q\lor((p\rightarrow q)\land(q\rightarrow p)).

Understanding the Laws

So far in this section, I have been working with the laws of Boolean algebra without saying much about what they mean or why they are reasonable. Of course, you can apply the laws in calculations without understanding them. But if you want to figure out which calculations to do, you need some understanding. Most of the laws are clear enough with a little thought. For example, if we already know that qq is false, then pqp\lor q will be true when pp is true and false when pp is false. That is, pFp\lor\F has the same logical value as pp. But that's just what the Identity Law for \lor says. A few of the laws need more discussion.

The Law of the Excluded Middle, p¬pTp\lor\lnot p\equiv \T, says that given any proposition pp, at least one of pp or ¬p\lnot p must be true. Since ¬p\lnot p is true exactly when pp is false, this is the same as saying that pp must be either true or false. There is no middle ground.4 The Law of Contradiction, p¬pFp\land\lnot p\equiv\F, says that it is not possible for both pp and ¬p\lnot p to be true. Both of these rules are obvious.

The Distributive Laws cannot be called obvious, but a few examples can show that they are reasonable. Consider the statement, "This card is the ace of spades or clubs." Clearly, this is equivalent to "This card is the ace of spaces or this card is the ace of clubs." But this is just an example of the first distributive law! For, let aa represent the proposition "This card is an ace," let ss represent "This card is a spade," and let cc represent "This card is a club." Then "This card is the ace of spades or clubs" can be translated into logic as a(sc)a\land(s\lor c), while "This card is the ace of spades or this card is the ace of clubs" becomes (as)(ac)(a\land s)\lor (a\land c). And the distributive law assures us that a(sc)(as)(ac)a\land(s\lor c)\equiv(a\land s)\lor (a\land c). The second distributive law tells us, for example, that "This card is either a joker or is the ten of diamonds" is logically equivalent to "This card is either a joker or a ten, and it is either a joker or a diamond." That is, j(td)(jt)(jd)j\lor(t\land d)\equiv(j\lor t)\land(j\lor d). The distributive laws are powerful tools and you should keep them in mind whenever you are faced with a mixture of \land and \lor operators.

De Morgan's Laws must also be less than obvious, since people often get them wrong. But they do make sense. When considering ¬(pq)\lnot(p\land q), you should ask yourself, how can "pp and qq" fail to be true. It will fail to be true if either pp is false or if qq is false (or both). That is, ¬(pq)\lnot(p \land q) is equivalent to (¬p)(¬q)(\lnot p)\lor(\lnot q). Consider the sentence "A raven is large and black." If a bird is not large and black, then it is not a raven. But what exactly does it mean to be "not (large and black)"? How can you tell whether the assertion "not (large and black)" is true of something? This will be true if it is either not large or not black. (It doesn't have to be bothit could be large and white, it could be small and black.) Similarly, for "pp or qq" to fail to be true, both pp and qq must be false. That is, ¬(pq)\lnot(p\lor q) is equivalent to (¬p)(¬q)(\lnot p)\land (\lnot q). This is De Morgan's second law.

Recalling that pqp\rightarrow q is equivalent to (¬p)q(\lnot p)\lor q, we can apply De Morgan's law to obtain a formula for the negation an implication:

¬(pq)\lnot(p\rightarrow q)¬((¬p)q)\equiv \lnot((\lnot p)\lor q)
(¬(¬p))(¬q)\equiv (\lnot(\lnot p))\land(\lnot q)
p¬q\equiv p\land\lnot q

That is, pqp\rightarrow q is false exactly when both pp is true and qq is false. For example, the negation of "If you have an ace, you win" is "You have an ace, and you don't win." Think of it this way: if you had an ace and you didn't win, then the statement "If you have an ace, you win" was not true.

Exercises

  1. Construct truth tables to demonstrate the validity of each of the distributive laws.

  2. Construct the following truth tables:

    • Construct truth tables to demonstrate that ¬(pq)\lnot (p \land q) is not logically equivalent to (¬p)(¬q)(\lnot p) \land (\lnot q).
    • Construct truth tables to demonstrate that ¬(pq)\lnot (p \lor q) is not logically equivalent to (¬p)(¬q)(\lnot p) \lor (\lnot q).
    • Construct truth tables to demonstrate the validity of both De Morgan's Laws.
  3. Construct truth tables to demonstrate that ¬(pq)\lnot(p\rightarrow q) is not logically equivalent to any of the following.

    • (¬p)(¬q)(\lnot p) \rightarrow (\lnot q)

      Answer
      ppqq¬(pq)\lnot(p\rightarrow q)(¬p)(¬q)(\lnot p) \rightarrow (\lnot q)
      F\FF\FF\FT\T
      F\FT\TF\FF\F
      T\TF\FT\TT\T
      T\TT\TF\FT\T
    • (¬p)q(\lnot p) \rightarrow q

      Answer
      ppqq¬(pq)\lnot(p\rightarrow q)(¬p)q(\lnot p) \rightarrow q
      F\FF\FF\FF\F
      F\FT\TF\FT\T
      T\TF\FT\TT\T
      T\TT\TF\FT\T
    • p(¬q)p \rightarrow (\lnot q)

      Answer
      ppqq¬(pq)\lnot(p\rightarrow q)p(¬q)p \rightarrow (\lnot q)
      F\FF\FF\FT\T
      F\FT\TF\FT\T
      T\TF\FT\TT\T
      T\TT\TF\FF\F
    • Refer back to this section for a formula that is logically equivalent to ¬(pq)\lnot(p\rightarrow q).

      Answer

      Just before the exercises it was shown that ¬(pq)\lnot(p\rightarrow q) is equivalent to p¬qp\land\lnot q.

  4. Is ¬(pq)\lnot(p\leftrightarrow q) logically equivalent to (¬p)(¬q)(\lnot p) \leftrightarrow (\lnot q)?

    Answer

    No, since (¬p)(¬q)(\lnot p) \leftrightarrow (\lnot q) is equivalent to pqp\leftrightarrow q (either check the truth tables, or expand out both exressions using the definition of \leftrightarrow and then use the fact that an implication is equivalent to its contrapositive). Instead, ¬(pq)\lnot(p\leftrightarrow q) is equivalent to pqp\oplus q (again, check the truth tables or expand the definitions).

  5. In the algebra of numbers, there is a distributive law of multiplication over addition: x(y+z)=xy+xzx(y+z)=xy+xz. What would a distributive law of addition over multiplication look like? Is it a valid law in the algebra of numbers?

    Answer

    If addition distributed over multiplication, then we would have x+yz=(x+y)(x+z)x+yz=(x+y)(x+z), but this is not true (for example, take x=1x=1, y=2y=2, and z=3z=3; then x+yz=7x+yz=7, but (x+y)(x+z)=12(x+y)(x+z)=12).

  6. The distributive laws given in the table are sometimes called the left distributive laws. The right distributive laws say that (pq)r(pr)(qr)(p\lor q)\land r\equiv (p\land r)\lor (q\land r) and that (pq)r(pr)(qr)(p\land q)\lor r\equiv (p\lor r)\land (q \lor r). Show that the right distributive laws are also valid laws of Boolean algebra. (Note: In practice, both the left and the right distributive laws are referred to simply as the distributive laws, and both can be used freely in proofs.)

    Answer

    The commutative laws are enough to show that these are also true, since the left and right arguments may be swapped on each of the operations.

  7. Show that p(qrs)(pq)(pr)(ps)p\land(q\lor r\lor s)\equiv (p\land q)\lor(p\land r)\lor(p\land s) for any propositions pp, qq, rr, and ss. In words, we can say that conjunction distributes over a disjunction of three terms. (Recall that the \land operator is called conjunction and \lor is called disjunction.) Translate into logic and verify the fact that conjunction distributes over a disjunction of four terms. Argue that, in fact, conjunction distributes over a disjunction of any number of terms.

  8. There are two additional basic laws of logic, involving the two expression pFp\land\F and pTp\lor\T. What are the missing laws? Show that your answers are, in fact, laws.

    Answer

    The laws are pFFp\land\F\equiv\F and pTTp\lor\T\equiv\T. These are sometimes called the "annihilation" or "annulment" laws, and they are akin to the property x0=0x\cdot 0=0 in ordinary algebra.

    If you think of F\F as being the disjunction of zero terms, and T\T as the conjunction of zero terms (just as 00 is the sum of zero numbers), then these laws extend the previous exercise to the case of distributing over zero terms.

  9. For each of the following pairs of propositions, show that the two propositions are logically equivalent by finding a chain of equivalences from one to the other. State which definition or law of logic justifies each equivalence in the chain.

    • p(qp),pqp\land (q\land p),\quad p\land q
    • (¬p)q,pq(\lnot p)\rightarrow q,\quad p\lor q
    • (pq)¬q,p¬q(p\lor q)\land\lnot q,\quad p\land \lnot q
    • p(qr),(pq)rp\rightarrow(q\rightarrow r),\quad (p\land q)\rightarrow r
    • (pr)(qr),(pq)r(p\rightarrow r)\land(q\rightarrow r),\quad (p\lor q)\rightarrow r
    • p(pq),pqp\rightarrow(p\land q),\quad p\rightarrow q
  10. For each of the following compound propositions, find a simpler proposition that is logically equivalent. Try to find a proposition that is as simple as possible.

    • (pq)¬q(p\land q)\lor\lnot q

      Answer

      p¬qp\lor\lnot q, or qpq\rightarrow p

    • ¬(pq)p\lnot(p\lor q)\land p

      Answer

      F\F

    • p¬pp\rightarrow\lnot p

      Answer

      ¬p\lnot p

    • ¬p(pq)\lnot p\land(p\lor q)

      Answer

      ¬pq\lnot p\land q

    • (qp)q(q\land p)\rightarrow q

      Answer

      T\T

    • (pq)(¬pq)(p\rightarrow q)\land(\lnot p\rightarrow q)

      Answer

      qq

  11. Express the negation of each of the following sentences in natural English:

    • It is sunny and cold.

      Answer

      It is not sunny, or it is not cold.

    • I will have cake or I will have pie.

      Answer

      I will not have cake and I will not have pie.

    • If today is Tuesday, this is Belgium.

      Answer

      Today is Tuesday and this is not Belgium.

    • If you pass the final exam, you pass the course.

      Answer

      You pass the final exam but you do not pass the course.

  12. Apply one of the laws of logic to each of the following sentences, and rewrite it as an equivalent sentence. State which law you are applying.

    • I will have coffee and cake or pie.
      Answer

      I will have coffee and cake, or I will have coffee and pie (Distributive).

    • He has neither talent nor ambition.
      Answer

      He does not have talent and he does not have ambition (DeMorgan).

    • You can have spam, or you can have spam.
      Answer

      You can have spam (Idempotence).

  13. Use Boolean algebra to show that the implication operator (\rightarrow) is functionally complete, provided the constant F\F is also available (this is not unreasonable in an electronic circuit, where F\F is represented by the ground voltage). That is, show how to define pqp\land q, pqp\lor q, and ¬p\lnot p by giving equivalent expressions using only \rightarrow and F\F in addition to the input variables pp and qq.

    Answer

    Since ¬p(pF)\lnot p\equiv(p\rightarrow\F) (check the truth table, or expand pFp\rightarrow\F into ¬pF\lnot p\lor\F and use the identity law), we may use the fact that (¬p)q(¬¬p)qpq(\lnot p)\rightarrow q\equiv(\lnot\lnot p)\lor q\equiv p\lor q to conclude that both ¬\lnot and \lor are expressible with only \rightarrow and F\F. We already know that these two together are functionally complete, therefore we may convert any boolean expression into one using only \rightarrow and F\F.


  1. In ordinary algebra, it's easy to be confused by the equals sign, because it has two very different roles. In an identity such as the distributive law, it means "is always equal to." On the other hand, an equation such as x2+3x=4x^2+3x=4 is a statement that might or might not be true, depending on the value of xx. Boolean algebra has two operators, \equiv and \leftrightarrow, that play roles similar to the two roles of the equals sign.
  2. It is also an example of a more general fact known as duality, which asserts that given any tautology that uses only the operators \land, \lor, and ¬\lnot, another tautology can be obtained from it by interchanging \land with \lor and T\T with F\F. We won't attempt to prove this here.
  3. I've added parentheses around QQ here for technical reasons. Sometimes, the parentheses are necessary to make sure that QQ is evaluated as a whole, so that its final value is used in place of pp. As an example of what can go wrong, consider qrq\land r. If this is substituted literally for pp in ¬(¬p)\lnot(\lnot p), without parentheses, the result is ¬(¬qr)\lnot(\lnot q \land r). But this expression means ¬((¬q)r)\lnot((\lnot q)\land r), which is not equivalent to qrq\land r.
  4. In propositional logic, this is easily verified with a small truth table. But there is a surprising amount of argument about whether this law is valid in all situations. In the real world, there often seems to be a gray area between truth and falsity. Even in mathematics, there are some people who think there should be a third truth value, one that means something like "unknown" or "not proven." But the mathematicians who think this way tend to be considered a bit odd by most other mathematicians.