HOME
The Info List - Boolean Logic



--- Advertisement ---


(i) (i) (i)

In mathematics and mathematical logic , BOOLEAN ALGEBRA is the branch of algebra in which the values of the variables are the truth values _true_ and _false_, usually denoted 1 and 0 respectively. Instead of elementary algebra where the values of the variables are numbers, and the prime operations are addition and multiplication, the main operations of Boolean algebra are the conjunction _and_ denoted as ∧, the disjunction _or_ denoted as ∨, and the negation _not_ denoted as ¬. It is thus a formalism for describing logical relations in the same way that ordinary algebra describes numeric relations.

Boolean algebra was introduced by George Boole in his first book _The Mathematical Analysis of Logic_ (1847), and set forth more fully in his _An Investigation of the Laws of Thought _ (1854). According to Huntington , the term "Boolean algebra" was first suggested by Sheffer in 1913.

Boolean algebra has been fundamental in the development of digital electronics , and is provided for in all modern programming languages. It is also used in set theory and statistics .

CONTENTS

* 1 History * 2 Values

* 3 Operations

* 3.1 Basic operations * 3.2 Secondary operations

* 4 Laws

* 4.1 Monotone laws * 4.2 Nonmonotone laws * 4.3 Completeness * 4.4 Duality principle

* 5 Diagrammatic representations

* 5.1 Venn diagrams * 5.2 Digital logic gates

* 6 Boolean algebras

* 6.1 Concrete Boolean algebras * 6.2 Subsets as bit vectors * 6.3 The prototypical Boolean algebra * 6.4 Boolean algebras: the definition * 6.5 Representable Boolean algebras

* 7 Axiomatizing Boolean algebra

* 8 Propositional logic

* 8.1 Applications

* 8.2 Deductive systems for propositional logic

* 8.2.1 Sequent calculus

* 9 Applications

* 9.1 Computers * 9.2 Two-valued logic

* 9.3 Boolean operations

* 9.3.1 Boolean searches

* 10 See also

* 11 References

* 11.1 General

* 12 Further reading * 13 External links

HISTORY

Boole's algebra predated the modern developments in abstract algebra and mathematical logic; it is however seen as connected to the origins of both fields. In an abstract setting, Boolean algebra was perfected in the late 19th century by Jevons , Schröder , Huntington , and others until it reached the modern conception of an (abstract) mathematical structure . For example, the empirical observation that one can manipulate expressions in the algebra of sets by translating them into expressions in Boole's algebra is explained in modern terms by saying that the algebra of sets is _a_ Boolean algebra (note the indefinite article ). In fact, M. H. Stone proved in 1936 that every Boolean algebra is isomorphic to a field of sets .

In the 1930s, while studying switching circuits , Claude Shannon observed that one could also apply the rules of Boole's algebra in this setting, and he introduced SWITCHING ALGEBRA as a way to analyze and design circuits by algebraic means in terms of logic gates . Shannon already had at his disposal the abstract mathematical apparatus, thus he cast his switching algebra as the two-element Boolean algebra . In circuit engineering settings today, there is little need to consider other Boolean algebras, thus "switching algebra" and "Boolean algebra" are often used interchangeably. Efficient implementation of Boolean functions is a fundamental problem in the design of combinational logic circuits. Modern electronic design automation tools for VLSI circuits often rely on an efficient representation of Boolean functions known as (reduced ordered) binary decision diagrams (BDD) for logic synthesis and formal verification .

Logic sentences that can be expressed in classical propositional calculus have an equivalent expression in Boolean algebra. Thus, BOOLEAN LOGIC is sometimes used to denote propositional calculus performed in this way. Boolean algebra is not sufficient to capture logic formulas using quantifiers , like those from first order logic . Although the development of mathematical logic did not follow Boole's program, the connection between his algebra and logic was later put on firm ground in the setting of algebraic logic , which also studies the algebraic systems of many other logics. The problem of determining whether the variables of a given Boolean (propositional) formula can be assigned in such a way as to make the formula evaluate to true is called the Boolean satisfiability problem
Boolean satisfiability problem
(SAT), and is of importance to theoretical computer science , being the first problem shown to be NP-complete . The closely related model of computation known as a Boolean circuit relates time complexity (of an algorithm ) to circuit complexity .

VALUES

Whereas in elementary algebra expressions denote mainly numbers , in Boolean algebra they denote the truth values _false_ and _true_. These values are represented with the bits (or binary digits), namely 0 and 1. They do not behave like the integers 0 and 1, for which 1 + 1 = 2, but may be identified with the elements of the two-element field GF(2) , that is, integer arithmetic modulo 2 , for which 1 + 1 = 0. Addition and multiplication then play the Boolean roles of XOR (exclusive-or) and AND (conjunction) respectively, with disjunction _x_∨_y_ (inclusive-or) definable as _x_ + _y_ + _xy_.

Boolean algebra also deals with functions which have their values in the set {0, 1}. A sequence of bits is a commonly used such function. Another common example is the subsets of a set _E_: to a subset _F_ of _E_ is associated the indicator function that takes the value 1 on _F_ and 0 outside _F_. The most general example is the elements of a Boolean algebra , with all of the foregoing being instances thereof.

As with elementary algebra, the purely equational part of the theory may be developed without considering explicit values for the variables.

OPERATIONS

BASIC OPERATIONS

The basic operations of Boolean calculus are as follows.

* AND (conjunction ), denoted _x_∧_y_ (sometimes _x_ AND _y_ or K_xy_), satisfies _x_∧_y_ = 1 if _x_ = _y_ = 1 and _x_∧_y_ = 0 otherwise. * OR (disjunction ), denoted _x_∨_y_ (sometimes _x_ OR _y_ or A_xy_), satisfies _x_∨_y_ = 0 if _x_ = _y_ = 0 and _x_∨_y_ = 1 otherwise. * NOT (negation ), denoted ¬_x_ (sometimes NOT _x_, N_x_ or !_x_), satisfies ¬_x_ = 0 if _x_ = 1 and ¬_x_ = 1 if _x_ = 0.

Alternatively the values of _x_∧_y_, _x_∨_y_, and ¬_x_ can be expressed by tabulating their values with truth tables as follows.

X {DISPLAYSTYLE X} Y {DISPLAYSTYLE Y} X Y {DISPLAYSTYLE XWEDGE Y} X Y {DISPLAYSTYLE XVEE Y}

0 0 0 0

1 0 0 1

0 1 0 1

1 1 1 1

X {DISPLAYSTYLE X} X {DISPLAYSTYLE NEG X}

0 1

1 0

If the truth values 0 and 1 are interpreted as integers, these operations may be expressed with the ordinary operations of arithmetic, or by the minimum/maximum functions: x y = x y = min ( x , y ) x y = x + y ( x y ) = max ( x , y ) x = 1 x {displaystyle {begin{aligned}xwedge y&=xtimes y=min(x,y)\xvee y&=x+y-(xtimes y)=max(x,y)\neg x width:37.201ex; height:9.176ex;" alt="{displaystyle {begin{aligned}xwedge y&=xtimes y=min(x,y)\xvee y&=x+y-(xtimes y)=max(x,y)\neg x"> x y = ( x y ) x y = ( x y ) {displaystyle {begin{aligned}xwedge y&=neg (neg xvee neg y)\xvee y width:20.571ex; height:6.176ex;" alt="{begin{aligned}xwedge y&=neg (neg xvee neg y)\xvee y"> x y = x y {displaystyle xrightarrow y=neg {x}vee y} x y = ( x y ) ( x y ) {displaystyle xoplus y=(xvee y)wedge neg {(xwedge y)}} x y = ( x y ) {displaystyle xequiv y=neg {(xoplus y)}}

These definitions give rise to the following truth tables giving the values of these operations for all four possible inputs.

X {DISPLAYSTYLE X} Y {DISPLAYSTYLE Y} X Y {DISPLAYSTYLE XRIGHTARROW Y} X Y {DISPLAYSTYLE XOPLUS Y} X Y {DISPLAYSTYLE XEQUIV Y}

0 0 1 0 1

1 0 0 1 0

0 1 1 1 0

1 1 1 0 1

The first operation, _x_ → _y_, or C_xy_, is called MATERIAL IMPLICATION. If _x_ is true then the value of _x_ → _y_ is taken to be that of _y_. But if _x_ is false then the value of _y_ can be ignored; however the operation must return _some_ truth value and there are only two choices, so the return value is the one that entails less, namely _true_. ( Relevance logic addresses this by viewing an implication with a false premise as something other than either true or false.)

The second operation, _x_ ⊕ _y_, or J_xy_, is called EXCLUSIVE OR (often abbreviated as XOR) to distinguish it from disjunction as the inclusive kind. It excludes the possibility of both _x_ and _y_. Defined in terms of arithmetic it is addition mod 2 where 1 + 1 = 0.

The third operation, the complement of exclusive or, is EQUIVALENCE or Boolean equality: _x_ ≡ _y_, or E_xy_, is true just when _x_ and _y_ have the same value. Hence _x_ ⊕ _y_ as its complement can be understood as _x_ ≠ _y_, being true just when _x_ and _y_ are different. Equivalence counterpart in arithmetic mod 2 is _x_ + _y_ + 1.

Given two operands, each with two possible values, there are 22 = 4 possible combinations of inputs. Because each output can have two possible values, there are a total of 24 = 16 possible binary Boolean operations .

LAWS

A LAW of Boolean algebra is an identity such as _x_∨(_y_∨_z_) = (_x_∨_y_)∨_z_ between two Boolean terms, where a BOOLEAN TERM is defined as an expression built up from variables and the constants 0 and 1 using the operations ∧, ∨, and ¬. The concept can be extended to terms involving other Boolean operations such as ⊕, →, and ≡, but such extensions are unnecessary for the purposes to which the laws are put. Such purposes include the definition of a Boolean algebra as any model of the Boolean laws, and as a means for deriving new laws from old as in the derivation of _x_∨(_y_∧_z_) = _x_∨(_z_∧_y_) from _y_∧_z_ = _z_∧_y_ as treated in the section on axiomatization .

MONOTONE LAWS

Boolean algebra satisfies many of the same laws as ordinary algebra when one matches up ∨ with addition and ∧ with multiplication. In particular the following laws are common to both kinds of algebra:

Associativity of {displaystyle vee } :

x ( y z ) {displaystyle xvee (yvee z)} = ( x y ) z {displaystyle =(xvee y)vee z}

Associativity of {displaystyle wedge } :

x ( y z ) {displaystyle xwedge (ywedge z)} = ( x y ) z {displaystyle =(xwedge y)wedge z}

Commutativity of {displaystyle vee } :

x y {displaystyle xvee y} = y x {displaystyle =yvee x}

Commutativity of {displaystyle wedge } :

x y {displaystyle xwedge y} = y x {displaystyle =ywedge x}

Distributivity of {displaystyle wedge } over {displaystyle vee } :

x ( y z ) {displaystyle xwedge (yvee z)} = ( x y ) ( x z ) {displaystyle =(xwedge y)vee (xwedge z)}

Identity for {displaystyle vee } :

x 0 {displaystyle xvee 0} = x {displaystyle =x}

Identity for {displaystyle wedge } :

x 1 {displaystyle xwedge 1} = x {displaystyle =x}

Annihilator for {displaystyle wedge } :

x 0 {displaystyle xwedge 0} = 0 {displaystyle =0}

The following laws hold in Boolean Algebra, but not in ordinary algebra:

Annihilator for {displaystyle vee } :

x 1 {displaystyle xvee 1} = 1 {displaystyle =1}

Idempotence of {displaystyle vee } :

x x {displaystyle xvee x} = x {displaystyle =x}

Idempotence of {displaystyle wedge } :

x x {displaystyle xwedge x} = x {displaystyle =x}

Absorption 1:

x ( x y ) {displaystyle xwedge (xvee y)} = x {displaystyle =x}

Absorption 2:

x ( x y ) {displaystyle xvee (xwedge y)} = x {displaystyle =x}

Distributivity of {displaystyle vee } over {displaystyle wedge } :

x ( y z ) {displaystyle xvee (ywedge z)} = ( x y ) ( x z ) {displaystyle =(xvee y)wedge (xvee z)}

Taking x = 2 in the third law above shows that it is not an ordinary algebra law, since 2×2 = 4. The remaining five laws can be falsified in ordinary algebra by taking all variables to be 1, for example in Absorption Law 1 the left hand side would be 1(1+1) = 2 while the right hand side would be 1, and so on.

All of the laws treated so far have been for conjunction and disjunction. These operations have the property that changing either argument either leaves the output unchanged or the output changes in the same way as the input. Equivalently, changing any variable from 0 to 1 never results in the output changing from 1 to 0. Operations with this property are said to be MONOTONE. Thus the axioms so far have all been for monotonic Boolean logic. Nonmonotonicity enters via complement ¬ as follows.

NONMONOTONE LAWS

The complement operation is defined by the following two laws. Complementation 1 x x = 0 Complementation 2 x x = 1 {displaystyle {begin{aligned}&{text{Complementation 1}}&xwedge neg x&=0\&{text{Complementation 2}}&xvee neg x width:36.505ex; height:5.843ex;" alt="{begin{aligned}&{text{Complementation 1}}&xwedge neg x&=0\&{text{Complementation 2}}&xvee neg x"> Double negation ( x ) = x {displaystyle {begin{aligned}&{text{Double negation}}&neg {(neg {x})} width:32.723ex; height:2.843ex;" alt="{begin{aligned}&{text{Double negation}}&neg {(neg {x})}"> ( x ) ( y ) = x y ( x ) + ( y ) = ( x + y ) {displaystyle {begin{aligned}(-x)(-y)&=xy\(-x)+(-y) width:25.521ex; height:6.176ex;" alt="{begin{aligned}(-x)(-y)&=xy\(-x)+(-y)"> De Morgan 1 x y = ( x y ) De Morgan 2 x y = ( x y ) {displaystyle {begin{aligned}&{text{De Morgan 1}}&neg xwedge neg y&=neg {(xvee y)}\&{text{De Morgan 2}}&neg xvee neg y width:38.265ex; height:6.176ex;" alt="{begin{aligned}&{text{De Morgan 1}}&neg xwedge neg y&=neg {(xvee y)}\&{text{De Morgan 2}}&neg xvee neg y"> Figure 2. Venn diagrams for conjunction, disjunction, and complement

For conjunction, the region inside both circles is shaded to indicate that _x_∧_y_ is 1 when both variables are 1. The other regions are left unshaded to indicate that _x_∧_y_ is 0 for the other three combinations.

The second diagram represents disjunction _x_∨_y_ by shading those regions that lie inside either or both circles. The third diagram represents complement ¬_x_ by shading the region _not_ inside the circle.

While we have not shown the Venn diagrams for the constants 0 and 1, they are trivial, being respectively a white box and a dark box, neither one containing a circle. However we could put a circle for _x_ in those boxes, in which case each would denote a function of one argument, _x_, which returns the same value independently of _x_, called a constant function. As far as their outputs are concerned, constants and constant functions are indistinguishable; the difference is that a constant takes no arguments, called a _zeroary_ or _nullary_ operation, while a constant function takes one argument, which it ignores, and is a _unary_ operation.

Venn diagrams are helpful in visualizing laws. The commutativity laws for ∧ and ∨ can be seen from the symmetry of the diagrams: a binary operation that was not commutative would not have a symmetric diagram because interchanging _x_ and _y_ would have the effect of reflecting the diagram horizontally and any failure of commutativity would then appear as a failure of symmetry.

Idempotence of ∧ and ∨ can be visualized by sliding the two circles together and noting that the shaded area then becomes the whole circle, for both ∧ and ∨.

To see the first absorption law, _x_∧(_x_∨_y_) = _x_, start with the diagram in the middle for _x_∨_y_ and note that the portion of the shaded area in common with the _x_ circle is the whole of the _x_ circle. For the second absorption law, _x_∨(_x_∧_y_) = _x_, start with the left diagram for _x_∧_y_ and note that shading the whole of the _x_ circle results in just the _x_ circle being shaded, since the previous shading was inside the _x_ circle.

The double negation law can be seen by complementing the shading in the third diagram for ¬_x_, which shades the _x_ circle.

To visualize the first De Morgan's law, (¬_x_)∧(¬_y_) = ¬(_x_∨_y_), start with the middle diagram for _x_∨_y_ and complement its shading so that only the region outside both circles is shaded, which is what the right hand side of the law describes. The result is the same as if we shaded that region which is both outside the _x_ circle _and_ outside the _y_ circle, i.e. the conjunction of their exteriors, which is what the left hand side of the law describes.

The second De Morgan's law, (¬_x_)∨(¬_y_) = ¬(_x_∧_y_), works the same way with the two diagrams interchanged.

The first complement law, _x_∧¬_x_ = 0, says that the interior and exterior of the _x_ circle have no overlap. The second complement law, _x_∨¬_x_ = 1, says that everything is either inside or outside the _x_ circle.

DIGITAL LOGIC GATES

Digital logic is the application of the Boolean algebra of 0 and 1 to electronic hardware consisting of logic gates connected to form a circuit diagram . Each gate implements a Boolean operation, and is depicted schematically by a shape indicating the operation. The shapes associated with the gates for conjunction (AND-gates), disjunction (OR-gates), and complement (inverters) are as follows.

The lines on the left of each gate represent input wires or _ports_. The value of the input is represented by a voltage on the lead. For so-called "active-high" logic, 0 is represented by a voltage close to zero or "ground", while 1 is represented by a voltage close to the supply voltage; active-low reverses this. The line on the right of each gate represents the output port, which normally follows the same voltage conventions as the input ports.

Complement is implemented with an inverter gate. The triangle denotes the operation that simply copies the input to the output; the small circle on the output denotes the actual inversion complementing the input. The convention of putting such a circle on any port means that the signal passing through this port is complemented on the way through, whether it is an input or output port.

The Duality Principle , or De Morgan\'s laws , can be understood as asserting that complementing all three ports of an AND gate converts it to an OR gate and vice versa, as shown in Figure 4 below. Complementing both ports of an inverter however leaves the operation unchanged.

More generally one may complement any of the eight subsets of the three ports of either an AND or OR gate. The resulting sixteen possibilities give rise to only eight Boolean operations, namely those with an odd number of 1's in their truth table. There are eight such because the "odd-bit-out" can be either 0 or 1 and can go in any of four positions in the truth table. There being sixteen binary Boolean operations, this must leave eight operations with an even number of 1's in their truth tables. Two of these are the constants 0 and 1 (as binary operations that ignore both their inputs); four are the operations that depend nontrivially on exactly one of their two inputs, namely _x_, _y_, ¬_x_, and ¬_y_; and the remaining two are _x_⊕_y_ (XOR) and its complement _x_≡_y_.

BOOLEAN ALGEBRAS

Main article: Boolean algebra (structure)

The term "algebra" denotes both a subject, namely the subject of algebra , and an object, namely an algebraic structure . Whereas the foregoing has addressed the subject of Boolean algebra, this section deals with mathematical objects called Boolean algebras, defined in full generality as any model of the Boolean laws. We begin with a special case of the notion definable without reference to the laws, namely concrete Boolean algebras, and then give the formal definition of the general notion.

CONCRETE BOOLEAN ALGEBRAS

A CONCRETE BOOLEAN ALGEBRA or field of sets is any nonempty set of subsets of a given set _X_ closed under the set operations of union , intersection , and complement relative to _X_.

(As an aside, historically _X_ itself was required to be nonempty as well to exclude the degenerate or one-element Boolean algebra, which is the one exception to the rule that all Boolean algebras satisfy the same equations since the degenerate algebra satisfies every equation. However this exclusion conflicts with the preferred purely equational definition of "Boolean algebra," there being no way to rule out the one-element algebra using only equations— 0 ≠ 1 does not count, being a negated equation. Hence modern authors allow the degenerate Boolean algebra and let _X_ be empty.)

EXAMPLE 1. The power set 2_X_ of _X_, consisting of all subsets of _X_. Here _X_ may be any set: empty, finite, infinite, or even uncountable .

EXAMPLE 2. The empty set and _X_. This two-element algebra shows that a concrete Boolean algebra can be finite even when it consists of subsets of an infinite set. It can be seen that every field of subsets of _X_ must contain the empty set and _X_. Hence no smaller example is possible, other than the degenerate algebra obtained by taking _X_ to be empty so as to make the empty set and _X_ coincide.

EXAMPLE 3. The set of finite and cofinite sets of integers, where a cofinite set is one omitting only finitely many integers. This is clearly closed under complement, and is closed under union because the union of a cofinite set with any set is cofinite, while the union of two finite sets is finite. Intersection behaves like union with "finite" and "cofinite" interchanged.

EXAMPLE 4. For a less trivial example of the point made by Example 2, consider a Venn diagram formed by _n_ closed curves partitioning the diagram into 2_n_ regions, and let _X_ be the (infinite) set of all points in the plane not on any curve but somewhere within the diagram. The interior of each region is thus an infinite subset of _X_, and every point in _X_ is in exactly one region. Then the set of all 22_n_ possible unions of regions (including the empty set obtained as the union of the empty set of regions and _X_ obtained as the union of all 2_n_ regions) is closed under union, intersection, and complement relative to _X_ and therefore forms a concrete Boolean algebra. Again we have finitely many subsets of an infinite set forming a concrete Boolean algebra, with Example 2 arising as the case _n_ = 0 of no curves.

SUBSETS AS BIT VECTORS

A subset _Y_ of _X_ can be identified with an indexed family of bits with index set _X_, with the bit indexed by _x_ ∈ _X_ being 1 or 0 according to whether or not _x_ ∈ _Y_. (This is the so-called characteristic function notion of a subset.) For example, a 32-bit computer word consists of 32 bits indexed by the set {0,1,2,…,31}, with 0 and 31 indexing the low and high order bits respectively. For a smaller example, if _X_ = {_a,b,c_} where _a, b, c_ are viewed as bit positions in that order from left to right, the eight subsets {}, {_c_}, {_b_}, {_b_,_c_}, {_a_}, {_a_,_c_}, {_a_,_b_}, and {_a_,_b_,_c_} of _X_ can be identified with the respective bit vectors 000, 001, 010, 011, 100, 101, 110, and 111. Bit
Bit
vectors indexed by the set of natural numbers are infinite sequences of bits, while those indexed by the reals in the unit interval are packed too densely to be able to write conventionally but nonetheless form well-defined indexed families (imagine coloring every point of the interval either black or white independently; the black points then form an arbitrary subset of ).

From this bit vector viewpoint, a concrete Boolean algebra can be defined equivalently as a nonempty set of bit vectors all of the same length (more generally, indexed by the same set) and closed under the bit vector operations of bitwise ∧, ∨, and ¬, as in 1010∧0110 = 0010, 1010∨0110 = 1110, and ¬1010 = 0101, the bit vector realizations of intersection, union, and complement respectively.

THE PROTOTYPICAL BOOLEAN ALGEBRA

Main article: two-element Boolean algebra

The set {0,1} and its Boolean operations as treated above can be understood as the special case of bit vectors of length one, which by the identification of bit vectors with subsets can also be understood as the two subsets of a one-element set. We call this the PROTOTYPICAL Boolean algebra, justified by the following observation. The laws satisfied by all nondegenerate concrete Boolean algebras coincide with those satisfied by the prototypical Boolean algebra.

This observation is easily proved as follows. Certainly any law satisfied by all concrete Boolean algebras is satisfied by the prototypical one since it is concrete. Conversely any law that fails for some concrete Boolean algebra must have failed at a particular bit position, in which case that position by itself furnishes a one-bit counterexample to that law. Nondegeneracy ensures the existence of at least one bit position because there is only one empty bit vector.

The final goal of the next section can be understood as eliminating "concrete" from the above observation. We shall however reach that goal via the surprisingly stronger observation that, up to isomorphism, all Boolean algebras are concrete.

BOOLEAN ALGEBRAS: THE DEFINITION

The Boolean algebras we have seen so far have all been concrete, consisting of bit vectors or equivalently of subsets of some set. Such a Boolean algebra consists of a set and operations on that set which can be _shown_ to satisfy the laws of Boolean algebra.

Instead of showing that the Boolean laws are satisfied, we can instead postulate a set _X_, two binary operations on _X_, and one unary operation, and _require_ that those operations satisfy the laws of Boolean algebra. The elements of _X_ need not be bit vectors or subsets but can be anything at all. This leads to the more general _abstract_ definition. A BOOLEAN ALGEBRA is any set with binary operations ∧ and ∨ and a unary operation ¬ thereon satisfying the Boolean laws.

For the purposes of this definition it is irrelevant how the operations came to satisfy the laws, whether by fiat or proof. All concrete Boolean algebras satisfy the laws (by proof rather than fiat), whence every concrete Boolean algebra is a Boolean algebra according to our definitions. This axiomatic definition of a Boolean algebra as a set and certain operations satisfying certain laws or axioms _by fiat_ is entirely analogous to the abstract definitions of group , ring , field etc. characteristic of modern or abstract algebra .

Given any complete axiomatization of Boolean algebra, such as the axioms for a complemented distributive lattice , a sufficient condition for an algebraic structure of this kind to satisfy all the Boolean laws is that it satisfy just those axioms. The following is therefore an equivalent definition. A BOOLEAN ALGEBRA is a complemented distributive lattice.

The section on axiomatization lists other axiomatizations, any of which can be made the basis of an equivalent definition.

REPRESENTABLE BOOLEAN ALGEBRAS

Although every concrete Boolean algebra is a Boolean algebra, not every Boolean algebra need be concrete. Let _n_ be a square-free positive integer, one not divisible by the square of an integer, for example 30 but not 12. The operations of greatest common divisor , least common multiple , and division into _n_ (that is, ¬_x_ = _n_/_x_), can be shown to satisfy all the Boolean laws when their arguments range over the positive divisors of _n_. Hence those divisors form a Boolean algebra. These divisors are not subsets of a set, making the divisors of _n_ a Boolean algebra that is not concrete according to our definitions.

However, if we _represent_ each divisor of _n_ by the set of its prime factors, we find that this nonconcrete Boolean algebra is isomorphic to the concrete Boolean algebra consisting of all sets of prime factors of _n_, with union corresponding to least common multiple, intersection to greatest common divisor, and complement to division into _n_. So this example while not technically concrete is at least "morally" concrete via this representation, called an isomorphism . This example is an instance of the following notion. A Boolean algebra is called REPRESENTABLE when it is isomorphic to a concrete Boolean algebra.

The obvious next question is answered positively as follows. Every Boolean algebra is representable.

That is, up to isomorphism, abstract and concrete Boolean algebras are the same thing. This quite nontrivial result depends on the Boolean prime ideal theorem , a choice principle slightly weaker than the axiom of choice , and is treated in more detail in the article Stone\'s representation theorem for Boolean algebras . This strong relationship implies a weaker result strengthening the observation in the previous subsection to the following easy consequence of representability. The laws satisfied by all Boolean algebras coincide with those satisfied by the prototypical Boolean algebra.

It is weaker in the sense that it does not of itself imply representability. Boolean algebras are special here, for example a relation algebra is a Boolean algebra with additional structure but it is not the case that every relation algebra is representable in the sense appropriate to relation algebras.

AXIOMATIZING BOOLEAN ALGEBRA

Main articles: Axiomatization of Boolean algebras and Boolean algebras canonically defined

The above definition of an abstract Boolean algebra as a set and operations satisfying "the" Boolean laws raises the question, what are those laws? A simple-minded answer is "all Boolean laws," which can be defined as all equations that hold for the Boolean algebra of 0 and 1. Since there are infinitely many such laws this is not a terribly satisfactory answer in practice, leading to the next question: does it suffice to require only finitely many laws to hold?

In the case of Boolean algebras the answer is yes. In particular the finitely many equations we have listed above suffice. We say that Boolean algebra is FINITELY AXIOMATIZABLE or FINITELY BASED.

Can this list be made shorter yet? Again the answer is yes. To begin with, some of the above laws are implied by some of the others. A sufficient subset of the above laws consists of the pairs of associativity, commutativity, and absorption laws, distributivity of ∧ over ∨ (or the other distributivity law—one suffices), and the two complement laws. In fact this is the traditional axiomatization of Boolean algebra as a complemented distributive lattice .

By introducing additional laws not listed above it becomes possible to shorten the list yet further. In 1933 Edward Huntington showed that if the basic operations are taken to be _x_∨_y_ and ¬_x_, with _x_∧_y_ considered a derived operation (e.g. via De Morgan's law in the form _x_∧_y_ = ¬(¬_x_∨¬_y_)), then the equation ¬(¬_x_∨¬_y_)∨¬(¬_x_∨_y_) = _x_ along with the two equations expressing associativity and commutativity of ∨ completely axiomatized Boolean algebra. When the only basic operation is the binary NAND operation ¬(_x_∧_y_), Stephen Wolfram has proposed in his book _ A New Kind of Science _ the single axiom (((_xy_)_z_)(_x_((_xz_)_x_))) = _z_ as a one-equation axiomatization of Boolean algebra, where for convenience here _xy_ denotes the NAND rather than the AND of _x_ and _y_.

PROPOSITIONAL LOGIC

Main article: Propositional calculus

PROPOSITIONAL LOGIC is a logical system that is intimately connected to Boolean algebra. Many syntactic concepts of Boolean algebra carry over to propositional logic with only minor changes in notation and terminology, while the semantics of propositional logic are defined via Boolean algebras in a way that the tautologies (theorems) of propositional logic correspond to equational theorems of Boolean algebra.

Syntactically, every Boolean term corresponds to a PROPOSITIONAL FORMULA of propositional logic. In this translation between Boolean algebra and propositional logic, Boolean variables _x,y_… become PROPOSITIONAL VARIABLES (or ATOMS) _P,Q_,…, Boolean terms such as _x_∨_y_ become propositional formulas _P_∨_Q_, 0 becomes _false_ or ⊥, and 1 becomes _true_ or T. It is convenient when referring to generic propositions to use Greek letters Φ, Ψ,… as metavariables (variables outside the language of propositional calculus, used when talking _about_ propositional calculus) to denote propositions.

The semantics of propositional logic rely on TRUTH ASSIGNMENT s. The essential idea of a truth assignment is that the propositional variables are mapped to elements of a fixed Boolean algebra, and then the TRUTH VALUE of a propositional formula using these letters is the element of the Boolean algebra that is obtained by computing the value of the Boolean term corresponding to the formula. In classical semantics, only the two-element Boolean algebra is used, while in Boolean-valued semantics arbitrary Boolean algebras are considered. A TAUTOLOGY is a propositional formula that is assigned truth value _1_ by every truth assignment of its propositional variables to an arbitrary Boolean algebra (or, equivalently, every truth assignment to the two element Boolean algebra).

These semantics permit a translation between tautologies of propositional logic and equational theorems of Boolean algebra. Every tautology Φ of propositional logic can be expressed as the Boolean equation Φ = 1, which will be a theorem of Boolean algebra. Conversely every theorem Φ = Ψ of Boolean algebra corresponds to the tautologies (Φ∨¬Ψ) ∧ (¬Φ∨Ψ) and (Φ∧Ψ) ∨ (¬Φ∧¬Ψ). If → is in the language these last tautologies can also be written as (Φ→Ψ) ∧ (Ψ→Φ), or as two separate theorems Φ→Ψ and Ψ→Φ; if ≡ is available then the single tautology Φ ≡ Ψ can be used.

APPLICATIONS

One motivating application of propositional calculus is the analysis of propositions and deductive arguments in natural language. Whereas the proposition "if _x_ = 3 then _x_+1 = 4" depends on the meanings of such symbols as + and 1, the proposition "if _x_ = 3 then _x_ = 3" does not; it is true merely by virtue of its structure, and remains true whether "_x_ = 3" is replaced by "_x_ = 4" or "the moon is made of green cheese." The generic or abstract form of this tautology is "if _P_ then _P_", or in the language of Boolean algebra, "_P_ → _P_".

Replacing _P_ by _x_ = 3 or any other proposition is called INSTANTIATION of _P_ by that proposition. The result of instantiating _P_ in an abstract proposition is called an INSTANCE of the proposition. Thus "_x_ = 3 → _x_ = 3" is a tautology by virtue of being an instance of the abstract tautology "_P_ → _P_". All occurrences of the instantiated variable must be instantiated with the same proposition, to avoid such nonsense as _P_ → _x_ = 3 or _x_ = 3 → _x_ = 4.

Propositional calculus restricts attention to abstract propositions, those built up from propositional variables using Boolean operations. Instantiation is still possible within propositional calculus, but only by instantiating propositional variables by abstract propositions, such as instantiating _Q_ by _Q_→_P_ in _P_→(_Q_→_P_) to yield the instance _P_→((_Q_→_P_)→_P_).

(The availability of instantiation as part of the machinery of propositional calculus avoids the need for metavariables within the language of propositional calculus, since ordinary propositional variables can be considered within the language to denote arbitrary propositions. The metavariables themselves are outside the reach of instantiation, not being part of the language of propositional calculus but rather part of the same language for talking about it that this sentence is written in, where we need to be able to distinguish propositional variables and their instantiations as being distinct syntactic entities.)

DEDUCTIVE SYSTEMS FOR PROPOSITIONAL LOGIC

An axiomatization of propositional calculus is a set of tautologies called axioms and one or more inference rules for producing new tautologies from old. A _proof_ in an axiom system _A_ is a finite nonempty sequence of propositions each of which is either an instance of an axiom of _A_ or follows by some rule of _A_ from propositions appearing earlier in the proof (thereby disallowing circular reasoning). The last proposition is the THEOREM proved by the proof. Every nonempty initial segment of a proof is itself a proof, whence every proposition in a proof is itself a theorem. An axiomatization is SOUND when every theorem is a tautology, and COMPLETE when every tautology is a theorem.

Sequent Calculus

Main article: Sequent calculus

Propositional calculus is commonly organized as a Hilbert system , whose operations are just those of Boolean algebra and whose theorems are Boolean tautologies, those Boolean terms equal to the Boolean constant 1. Another form is sequent calculus , which has two sorts, propositions as in ordinary propositional calculus, and pairs of lists of propositions called sequents , such as _A_∨_B_, _A_∧_C_,… {displaystyle vdash } _ A_, _B_→_C_,…. The two halves of a sequent are called the antecedent and the succedent respectively. The customary metavariable denoting an antecedent or part thereof is Γ, and for a succedent Δ; thus Γ,_A_ {displaystyle vdash } _ Δ would denote a sequent whose succedent is a list Δ and whose antecedent is a list Γ with an additional proposition A_ appended after it. The antecedent is interpreted as the conjunction of its propositions, the succedent as the disjunction of its propositions, and the sequent itself as the entailment of the succedent by the antecedent.

Entailment differs from implication in that whereas the latter is a binary _operation_ that returns a value in a Boolean algebra, the former is a binary _relation_ which either holds or does not hold. In this sense entailment is an _external_ form of implication, meaning external to the Boolean algebra, thinking of the reader of the sequent as also being external and interpreting and comparing antecedents and succedents in some Boolean algebra. The natural interpretation of {displaystyle vdash } _ is as ≤ in the partial order of the Boolean algebra defined by x_ ≤ _y_ just when _x_∨_y_ = _y_. This ability to mix external implication {displaystyle vdash } and internal implication → in the one logic is among the essential differences between sequent calculus and propositional calculus.

APPLICATIONS

Boolean algebra as the calculus of two values is fundamental to computer circuits, computer programming, and mathematical logic, and is also used in other areas of mathematics such as set theory and statistics.

COMPUTERS

In the early 20th century, several electrical engineers intuitively recognized that Boolean algebra was analogous to the behavior of certain types of electrical circuits. Claude Shannon formally proved such behavior was logically equivalent to Boolean algebra in his 1937 master's thesis, _A Symbolic Analysis of Relay and Switching Circuits _.

Today, all modern general purpose computers perform their functions using two-value Boolean logic; that is, their electrical circuits are a physical manifestation of two-value Boolean logic. They achieve this in various ways: as voltages on wires in high-speed circuits and capacitive storage devices, as orientations of a magnetic domain in ferromagnetic storage devices, as holes in punched cards or paper tape, and so on. (Some early computers used decimal circuits or mechanisms instead of two-valued logic circuits.)

Of course, it is possible to code more than two symbols in any given medium. For example, one might use respectively 0, 1, 2, and 3 volts to code a four-symbol alphabet on a wire, or holes of different sizes in a punched card. In practice, the tight constraints of high speed, small size, and low power combine to make noise a major factor. This makes it hard to distinguish between symbols when there are several possible symbols that could occur at a single site. Rather than attempting to distinguish between four voltages on one wire, digital designers have settled on two voltages per wire, high and low.

Computers use two-value Boolean circuits for the above reasons. The most common computer architectures use ordered sequences of Boolean values, called bits, of 32 or 64 values, e.g. 01101000110101100101010101001011. When programming in machine code , assembly language , and certain other programming languages , programmers work with the low-level digital structure of the data registers . These registers operate on voltages, where zero volts represents Boolean 0, and a reference voltage (often +5V, +3.3V, +1.8V) represents Boolean 1. Such languages support both numeric operations and logical operations. In this context, "numeric" means that the computer treats sequences of bits as binary numbers (base two numbers) and executes arithmetic operations like add, subtract, multiply, or divide. "Logical" refers to the Boolean logical operations of disjunction, conjunction, and negation between two sequences of bits, in which each bit in one sequence is simply compared to its counterpart in the other sequence. Programmers therefore have the option of working in and applying the rules of either numeric algebra or Boolean algebra as needed. A core differentiating feature between these families of operations is the existence of the carry operation in the first but not the second.

TWO-VALUED LOGIC

Other areas where two values is a good choice are the law and mathematics. In everyday relaxed conversation, nuanced or complex answers such as "maybe" or "only on the weekend" are acceptable. In more focused situations such as a court of law or theorem-based mathematics however it is deemed advantageous to frame questions so as to admit a simple yes-or-no answer—is the defendant guilty or not guilty, is the proposition true or false—and to disallow any other answer. However much of a straitjacket this might prove in practice for the respondent, the principle of the simple yes-no question has become a central feature of both judicial and mathematical logic, making two-valued logic deserving of organization and study in its own right.

A central concept of set theory is membership. Now an organization may permit multiple degrees of membership, such as novice, associate, and full. With sets however an element is either in or out. The candidates for membership in a set work just like the wires in a digital computer: each candidate is either a member or a nonmember, just as each wire is either high or low.

Algebra
Algebra
being a fundamental tool in any area amenable to mathematical treatment, these considerations combine to make the algebra of two values of fundamental importance to computer hardware, mathematical logic, and set theory.

Two-valued logic can be extended to multi-valued logic , notably by replacing the Boolean domain {0, 1} with the unit interval , in which case rather than only taking values 0 or 1, any value between and including 0 and 1 can be assumed. Algebraically, negation (NOT) is replaced with 1 − _x_, conjunction (AND) is replaced with multiplication ( x y {displaystyle xy} ), and disjunction (OR) is defined via De Morgan\'s law . Interpreting these values as logical truth values yields a multi-valued logic, which forms the basis for fuzzy logic and probabilistic logic . In these interpretations, a value is interpreted as the "degree" of truth – to what extent a proposition is true, or the probability that the proposition is true.

BOOLEAN OPERATIONS

The original application for Boolean operations was mathematical logic , where it combines the truth values, true or false, of individual formulas.

Natural languages such as English have words for several Boolean operations, in particular conjunction (_and_), disjunction (_or_), negation (_not_), and implication (_implies_). _But not_ is synonymous with _and not_. When used to combine situational assertions such as "the block is on the table" and "cats drink milk," which naively are either true or false, the meanings of these logical connectives often have the meaning of their logical counterparts. However, with descriptions of behavior such as "Jim walked through the door", one starts to notice differences such as failure of commutativity, for example the conjunction of "Jim opened the door" with "Jim walked through the door" in that order is not equivalent to their conjunction in the other order, since _and_ usually means _and then_ in such cases. Questions can be similar: the order "Is the sky blue, and why is the sky blue?" makes more sense than the reverse order. Conjunctive commands about behavior are like behavioral assertions, as in _get dressed and go to school_. Disjunctive commands such _love me or leave me_ or _fish or cut bait_ tend to be asymmetric via the implication that one alternative is less preferable. Conjoined nouns such as _tea and milk_ generally describe aggregation as with set union while _tea or milk_ is a choice. However context can reverse these senses, as in _your choices are coffee and tea_ which usually means the same as _your choices are coffee or tea_ (alternatives). Double negation as in "I don't not like milk" rarely means literally "I do like milk" but rather conveys some sort of hedging, as though to imply that there is a third possibility. "Not not P" can be loosely interpreted as "surely P", and although _P_ necessarily implies "not not _P_" the converse is suspect in English, much as with intuitionistic logic . In view of the highly idiosyncratic usage of conjunctions in natural languages, Boolean algebra cannot be considered a reliable framework for interpreting them.

Boolean operations are used in digital logic to combine the bits carried on individual wires, thereby interpreting them over {0,1}. When a vector of _n_ identical binary gates are used to combine two bit vectors each of _n_ bits, the individual bit operations can be understood collectively as a single operation on values from a Boolean algebra with 2_n_ elements.

Naive set theory interprets Boolean operations as acting on subsets of a given set _X_. As we saw earlier this behavior exactly parallels the coordinate-wise combinations of bit vectors, with the union of two sets corresponding to the disjunction of two bit vectors and so on.

The 256-element free Boolean algebra on three generators is deployed in computer displays based on raster graphics , which use bit blit to manipulate whole regions consisting of pixels , relying on Boolean operations to specify how the source region should be combined with the destination, typically with the help of a third region called the mask . Modern video cards offer all 223 = 256 ternary operations for this purpose, with the choice of operation being a one-byte (8-bit) parameter. The constants SRC = 0xaa or 10101010, DST = 0xcc or 11001100, and MSK = 0xf0 or 11110000 allow Boolean operations such as (SRC^DST)&MSK (meaning XOR the source and destination and then AND the result with the mask) to be written directly as a constant denoting a byte calculated at compile time, 0x60 in the (SRC^DST)border:solid #aaa 1px">

* Mathematics
Mathematics
portal

* Binary number * Boolean algebra (structure) * Boolean algebras canonically defined * Booleo * Heyting algebra * Intuitionistic logic * List of Boolean algebra topics * Logic design * Propositional calculus * Relation algebra * Three-valued logic * Vector logic

REFERENCES

* ^ Boole, George (2003) . _An Investigation of the Laws of Thought_. Prometheus Books. ISBN 978-1-59102-089-9 . * ^ "The name Boolean algebra (or Boolean 'algebras') for the calculus originated by Boole, extended by Schröder, and perfected by Whitehead seems to have been first suggested by Sheffer, in 1913." E. V. Huntington, "New sets of independent postulates for the algebra of logic, with special reference to Whitehead and Russell\'s _Principia mathematica_", in _Trans. Amer. Math. Soc._ 35 (1933), 274-304; footnote, page 278. * ^ _A_ _B_ _C_ _D_ _E_ _F_ Givant, Steven; Halmos, Paul (2009). _Introduction to Boolean Algebras_. Undergraduate Texts in Mathematics, Springer . ISBN 978-0-387-40293-2 . * ^ _A_ _B_ _C_ J. Michael Dunn; Gary M. Hardegree (2001). _Algebraic methods in philosophical logic_. Oxford University Press US. p. 2. ISBN 978-0-19-853192-0 . * ^ Norman Balabanian; Bradley Carlson (2001). _Digital logic design principles_. John Wiley. pp. 39–40. ISBN 978-0-471-29351-4 . , online sample * ^ Rajaraman & Radhakrishnan. _Introduction To Digital Computer Design An 5Th Ed._ PHI Learning Pvt. Ltd. p. 65. ISBN 978-81-203-3409-0 . * ^ John A. Camara (2010). _Electrical and Electronics Reference Manual for the Electrical and Computer
Computer
PE Exam_. www.ppi2pass.com. p. 41. ISBN 978-1-59126-166-7 . * ^ Shin-ichi Minato, Saburo Muroga (2007). "Binary Decision Diagrams". In Wai-Kai Chen. _The VLSI handbook_ (2nd ed.). CRC Press. ISBN 978-0-8493-4199-1 . chapter 29. * ^ Alan Parkes (2002). _Introduction to languages, machines and logic: computable languages, abstract machines and formal logic_. Springer. p. 276. ISBN 978-1-85233-464-2 . * ^ Jon Barwise ; John Etchemendy ; Gerard Allwein; Dave Barker-Plummer; Albert Liu (1999). _Language, proof, and logic_. CSLI Publications. ISBN 978-1-889119-08-3 . * ^ Ben Goertzel (1994). _Chaotic logic: language, thought, and reality from the perspective of complex systems science_. Springer. p. 48. ISBN 978-0-306-44690-0 . * ^ Halmos, Paul (1963). Lectures on Boolean Algebras. van Nostrand. * ^ O'Regan, Gerard (2008). _A brief history of computing_. Springer. p. 33. ISBN 978-1-84800-083-4 . * ^ Steven R. Givant; Paul Richard Halmos (2009). _Introduction to Boolean algebras_. Springer. pp. 21–22. ISBN 978-0-387-40293-2 . * ^ Venn, John (July 1880). "I. On the Diagrammatic and Mechanical Representation of Propositions and Reasonings" (PDF). _The London, Edinburgh, and Dublin Philosophical Magazine and Journal of Science _. 5. Taylor ">(PDF) from the original on 2017-05-16. * ^ Shannon, Claude (1949). "The Synthesis of Two-Terminal Switching Circuits". _Bell System Technical Journal_. 28: 59–98. doi :10.1002/j.1538-7305.1949.tb03624.x . * ^ Koppelberg, Sabine (1989). "General Theory of Boolean Algebras". _Handbook of Boolean Algebras, Vol. 1 (ed. J. Donald Monk with Robert Bonnet)_. Amsterdam: North Holland. ISBN 978-0-444-70261-6 . * ^ Hausman, Alan; Howard Kahane; Paul Tidman (2010) . _Logic and Philosophy: A Modern Introduction_. Wadsworth Cengage Learning. ISBN 0-495-60158-6 . * ^ Girard, Jean-Yves ; Paul Taylor; Yves Lafont (1990) . _Proofs and Types_. Cambridge University Press (Cambridge Tracts in Theoretical Computer
Computer
Science, 7). ISBN 0-521-37181-3 . * ^ Not all search engines support the same query syntax. Additionally, some organizations (such as Google) provide "specialized" search engines that support alternate or extended syntax. (See e.g.,Syntax cheatsheet, Google
Google
codesearch supports regular expressions). * ^ Doublequote-delimited search terms are called "exact phrase" searches in the Google
Google
documentation.

GENERAL

Mano, Morris; Ciletti, Michael D. (2013). _Digital Design_. Pearson. ISBN 978-0-13-277420-8 .

FURTHER READING

* J. Eldon Whitesitt (1995). _ Boolean algebra and its applications_. Courier Dover Publications. ISBN 978-0-486-68483-3 . Suitable introduction for students in applied fields. * Dwinger, Philip (1971). _Introduction to Boolean algebras_. Würzburg: Physica Verlag. * Sikorski, Roman (1969). _Boolean Algebras_ (3/e ed.). Berlin: Springer-Verlag. ISBN 978-0-387-04469-9 . * Bocheński, Józef Maria (1959). _A Précis of Mathematical Logic_. Translated from the French and German editions by Otto Bird. Dordrecht, South Holland: D. Reidel.

HISTORICAL PERSPECTIVE

* George Boole (1848). "The Calculus of Logic," _Cambridge and Dublin Mathematical Journal III: 183–98._ * Theodore Hailperin (1986). _Boole's logic and probability: a critical exposition from the standpoint of contemporary algebra, logic, and probability theory_ (2nd ed.). Elsevier. ISBN 978-0-444-87952-3 . * Dov M. Gabbay, John Woods, ed. (2004). _The rise of modern logic: from Leibniz to Frege_. Handbook of the History of Logic. 3. Elsevier. ISBN 978-0-444-51611-4 . , several relevant chapters by Hailperin, Valencia, and Grattan-Guinesss * Calixto Badesa (2004). _The birth of model theory: Löwenheim's theorem in the frame of the theory of relatives_. Princeton University Press. ISBN 978-0-691-05853-5 . , chapter 1, " Algebra
Algebra
of Classes and Propositional Calculus" * Burris, Stanley, 2009. The Algebra
Algebra
of Logic Tradition. Stanford Encyclopedia of Philosophy . * Radomir S. Stankovic; Jaakko Astola (2011). _From Boolean Logic to Switching Circuits and Automata: Towards Modern Information Technology_. Springer. ISBN 978-3-642-11681-0 .

EXTERNAL LINKS

_ The Wikibook How To Search_ has a page on the topic of: _BOOLEAN LOGIC _

_ The Wikibook Electronics_ has a page on the topic of: _BOOLEAN ALGEBRA _

* Boolean Algebra
Algebra
chapter on All About Circuits * How Stuff Works – Boolean Logic * Science and Technology - Boolean Algebra
Algebra
contains a list and

.