Two-element Boolean algebra explained

In mathematics and abstract algebra, the two-element Boolean algebra is the Boolean algebra whose underlying set (or universe or carrier) B is the Boolean domain. The elements of the Boolean domain are 1 and 0 by convention, so that B = . Paul Halmos's name for this algebra "2" has some following in the literature, and will be employed here.

Definition

B is a partially ordered set and the elements of B are also its bounds.

An operation of arity n is a mapping from Bn to B. Boolean algebra consists of two binary operations and unary complementation. The binary operations have been named and notated in various ways. Here they are called 'sum' and 'product', and notated by infix '+' and '∙', respectively. Sum and product commute and associate, as in the usual algebra of real numbers. As for the order of operations, brackets are decisive if present. Otherwise '∙' precedes '+'. Hence is parsed as and not as . Complementation is denoted by writing an overbar over its argument. The numerical analog of the complement of is . In the language of universal algebra, a Boolean algebra is a

\langleB,+,

,\overline{..},1,0\rangle

algebra of type

\langle2,2,1,0,0\rangle

.

Either one-to-one correspondence between and yields classical bivalent logic in equational form, with complementation read as NOT. If 1 is read as True, '+' is read as OR, and '∙' as AND, and vice versa if 1 is read as False. These two operations define a commutative semiring, known as the Boolean semiring.

Some basic identities

2 can be seen as grounded in the following trivial "Boolean" arithmetic:

\begin{align} &1+1=1+0=0+1=1\\ &0+0=0\\ &0 ⋅ 0=0 ⋅ 1=1 ⋅ 0=0\\ &1 ⋅ 1=1\\ &\overline{0}=0\\ &\overline{1}=1 \end{align}

Note that:

This Boolean arithmetic suffices to verify any equation of 2, including the axioms, by examining every possible assignment of 0s and 1s to each variable (see decision procedure).

The following equations may now be verified:

\begin{align} &A+A=A\\ &AA=A\\ &A+0=A\\ &A+1=1\\ &A0=0\\ &\overline{\overline{A}}=A \end{align}

Each of '+' and '∙' distributes over the other:

A(B+C)=AB+AC;

A+(BC)=(A+B)(A+C).

That '∙' distributes over '+' agrees with elementary algebra, but not '+' over '∙'. For this and other reasons, a sum of products (leading to a NAND synthesis) is more commonly employed than a product of sums (leading to a NOR synthesis).

Each of '+' and '∙' can be defined in terms of the other and complementation:

AB=\overline{\overline{A}+\overline{B}}

A+B=\overline{\overline{A}\overline{B}}.

We only need one binary operation, and concatenation suffices to denote it. Hence concatenation and overbar suffice to notate 2. This notation is also that of Quine's Boolean term schemata. Letting (X) denote the complement of X and "" denote either 0 or 1 yields the syntax of the primary algebra of G. Spencer-Brown's Laws of Form.

A basis for 2 is a set of equations, called axioms, from which all of the above equations (and more) can be derived. There are many known bases for all Boolean algebras and hence for 2. An elegant basis notated using only concatenation and overbar is:

ABC=BCA

(Concatenation commutes, associates)

\overline{A}A=1

(2 is a complemented lattice, with an upper bound of 1)

A0=A

(0 is the lower bound).

A\overline{AB}=A\overline{B}

(2 is a distributive lattice)

Where concatenation = OR, 1 = true, and 0 = false, or concatenation = AND, 1 = false, and 0 = true. (overbar is negation in both cases.)

If 0=1, (1)-(3) are the axioms for an abelian group.

(1) only serves to prove that concatenation commutes and associates. First assume that (1) associates from either the left or the right, then prove commutativity. Then prove association from the other direction. Associativity is simply association from the left and right combined.

This basis makes for an easy approach to proof, called "calculation" in Laws of Form, that proceeds by simplifying expressions to 0 or 1, by invoking axioms (2) - (4), and the elementary identities

AA=A,\overline{\overline{A}}=A,1+A=1

, and the distributive law.

Metatheory

De Morgan's theorem states that if one does the following, in the given order, to any Boolean function:

the result is logically equivalent to what you started with. Repeated application of De Morgan's theorem to parts of a function can be used to drive all complements down to the individual variables.

A powerful and nontrivial metatheorem states that any identity of 2 holds for all Boolean algebras.[1] Conversely, an identity that holds for an arbitrary nontrivial Boolean algebra also holds in 2. Hence all identities of Boolean algebra are captured by 2. This theorem is useful because any equation in 2 can be verified by a decision procedure. Logicians refer to this fact as "2 is decidable". All known decision procedures require a number of steps that is an exponential function of the number of variables N appearing in the equation to be verified. Whether there exists a decision procedure whose steps are a polynomial function of N falls under the P = NP conjecture.

The above metatheorem does not hold if we consider the validity of more general first-order logic formulas instead of only atomic positive equalities. As an example consider the formula . This formula is always true in a two-element Boolean algebra. In a four-element Boolean algebra whose domain is the powerset of, this formula corresponds to the statement and is false when x is . The decidability for the first-order theory of many classes of Boolean algebras can still be shown, using quantifier elimination or small model property (with the domain size computed as a function of the formula and generally larger than 2).

See also

Further reading

Many elementary texts on Boolean algebra were published in the early years of the computer era. Perhaps the best of the lot, and one still in print, is:

The following items reveal how the two-element Boolean algebra is mathematically nontrivial.

Notes and References

  1. Book: 10.1007/978-0-387-68436-9. Introduction to Boolean Algebras. Undergraduate Texts in Mathematics. 2009. Halmos. Paul. Givant. Steven. 978-0-387-40293-2.