Boolean arithmetic
   HOME

TheInfoList



OR:

In
mathematics Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern 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 Operation or Operations may refer to: Arts, entertainment and media * ''Operation'' (game), a battery-operated board game that challenges dexterity * Operation (music), a term used in musical set theory * ''Operations'' (magazine), Multi-Ma ...
of
arity Arity () is the number of arguments or operands taken by a function, operation or relation in logic, mathematics, and computer science. In mathematics, arity may also be named ''rank'', but this word can have many other meanings in mathematics. In ...
''n'' is a mapping from ''B''n to ''B''. Boolean algebra consists of two
binary operation In mathematics, a binary operation or dyadic operation is a rule for combining two elements (called operands) to produce another element. More formally, a binary operation is an operation of arity two. More specifically, an internal binary op ...
s 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 Commute, commutation or commutative may refer to: * Commuting, the process of travelling between a place of residence and a place of work Mathematics * Commutative property, a property of a mathematical operation whose result is insensitive to th ...
and associate, as in the usual algebra of real numbers. As for the
order of operations In mathematics and computer programming, the order of operations (or operator precedence) is a collection of rules that reflect conventions about which procedures to perform first in order to evaluate a given mathematical expression. For exampl ...
, brackets are decisive if present. Otherwise '∙' precedes '+'. Hence ''A∙B + C'' is parsed as ''(A∙B) + C'' and not as ''A∙(B + C)''. Complementation is denoted by writing an overbar over its argument. The numerical analog of the complement of ''X'' is 1 − ''X''. In the language of universal algebra, a Boolean algebra is a \langle B,+,.,\overline,1,0\rangle algebra of
type Type may refer to: Science and technology Computing * Typing, producing text via a keyboard, typewriter, etc. * Data type, collection of values used for computations. * File type * TYPE (DOS command), a command to display contents of a file. * Ty ...
\langle 2,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 or AND may refer to: Logic, grammar, and computing * Conjunction (grammar), connecting two words, phrases, or clauses * Logical conjunction in mathematical logic, notated as "∧", "⋅", "&", or simple juxtaposition * Bitwise AND, a boole ...
, and vice versa if 1 is read as ''False''. These two operations define a commutative semiring, known as the
Boolean semiring In abstract algebra, a semiring is an algebraic structure similar to a ring, but without the requirement that each element must have an additive inverse. The term rig is also used occasionally—this originated as a joke, suggesting that rigs are ...
.


Some basic identities

2 can be seen as grounded in the following trivial "Boolean" arithmetic: : \begin &1 + 1 = 1 + 0 = 0 + 1 = 1 \\ &0 + 0 = 0 \\ &0\cdot0 = 0\cdot1 = 1\cdot0 = 0 \\ &1\cdot1 = 1 \\ &\overline = 0 \\ &\overline = 1 \end Note that: * '+' and '∙' work exactly as in numerical arithmetic, except that 1+1=1. '+' and '∙' are derived by analogy from numerical arithmetic; simply set any nonzero number to 1. * Swapping 0 and 1, and '+' and '∙' preserves truth; this is the essence of the
duality Duality may refer to: Mathematics * Duality (mathematics), a mathematical concept ** Dual (category theory), a formalization of mathematical duality ** Duality (optimization) ** Duality (order theory), a concept regarding binary relations ** Dual ...
pervading all Boolean algebras. 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 In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm wheth ...
). The following equations may now be verified: : \begin &A + A = A \\ &A \cdot A = A \\ &A + 0 = A \\ &A + 1 = 1 \\ &A \cdot 0 = 0 \\ &\overline = A \end Each of '+' and '∙' distributes over the other: *\ A \cdot (B+C) = A \cdot B + A \cdot C; *\ A+(B \cdot C) = (A+B) \cdot (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: * A \cdot B=\overline * A+B=\overline. 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 In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituency) ...
of the primary algebra of G. Spencer-Brown's '' Laws of Form''. A ''basis'' for 2 is a set of equations, called
axiom An axiom, postulate, or assumption is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments. The word comes from the Ancient Greek word (), meaning 'that which is thought worthy or f ...
s, 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) # \overlineA = 1 (2 is a complemented lattice, with an upper bound of 1) #\ A0 = A (0 is the lower bound). # A\overline = A\overline (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=A, 1+A = 1, and the distributive law.


Metatheory

De Morgan's theorem In propositional logic and Boolean algebra, De Morgan's laws, also known as De Morgan's theorem, are a pair of transformation rules that are both valid rules of inference. They are named after Augustus De Morgan, a 19th-century British mathem ...
states that if one does the following, in the given order, to any Boolean function: * Complement every variable; * Swap '+' and '∙' operators (taking care to add brackets to ensure the order of operations remains the same); * Complement the result, 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. 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 In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm wheth ...
. Logicians refer to this fact as "2 is decidable". All known
decision procedure In computability theory and computational complexity theory, a decision problem is a computational problem that can be posed as a yes–no question of the input values. An example of a decision problem is deciding by means of an algorithm wheth ...
s 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 In mathematics, a polynomial is an expression (mathematics), expression consisting of indeterminate (variable), indeterminates (also called variable (mathematics), variables) and coefficients, that involves only the operations of addition, subtrac ...
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 ''(x = 0) ∨ (x = 1)''. 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 ''(x = ∅) ∨ (x = )'' and is false when ''x'' is '. The decidability for the
first-order theory First-order logic—also known as predicate logic, quantificational logic, and first-order predicate calculus—is a collection of formal systems used in mathematics, philosophy, linguistics, and computer science. First-order logic uses quantif ...
of many classes of
Boolean algebras In abstract algebra, a Boolean algebra or Boolean lattice is a complemented distributive lattice. This type of algebraic structure captures essential properties of both set operations and logic operations. A Boolean algebra can be seen as a gen ...
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

* Boolean algebra *
Bounded set :''"Bounded" and "boundary" are distinct concepts; for the latter see boundary (topology). A circle in isolation is a boundaryless bounded set, while the half plane is unbounded yet has a boundary. In mathematical analysis and related areas of mat ...
*
Lattice (order) A lattice is an abstract structure studied in the mathematical subdisciplines of order theory and abstract algebra. It consists of a partially ordered set in which every pair of elements has a unique supremum (also called a least upper bou ...
* Order theory


References


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: * Mendelson, Elliot, 1970. ''Schaum's Outline of Boolean Algebra''. McGraw–Hill. The following items reveal how the two-element Boolean algebra is mathematically nontrivial. *
Stanford Encyclopedia of Philosophy The ''Stanford Encyclopedia of Philosophy'' (''SEP'') combines an online encyclopedia of philosophy with peer-reviewed publication of original papers in philosophy, freely accessible to Internet users. It is maintained by Stanford University. Eac ...
:
The Mathematics of Boolean Algebra
" by J. Donald Monk. * Burris, Stanley N., and H.P. Sankappanavar, H. P., 1981.

' Springer-Verlag. {{isbn, 3-540-90578-2. Elementary algebra Boolean algebra