Jump to content

Two-element Boolean algebra: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
The '''[[two-element Boolean algebra]]''' is the simplest [[Boolean algebra]], one having just two elements, named 1 and 0 by convention. [[Paul Halmos]]'s name for this algebra, '''2''', has some following among mathematicians and will be employed here.
The '''[[two-element Boolean algebra]]''' is the simplest [[Boolean algebra]], one having just two elements, named 1 and 0 by convention. [[Paul Halmos]]'s name for this algebra, '''2''', has some following among mathematicians and will be employed here.


The [[carrier]] of a Boolean algebra is the [[set]] ''B'' such that the operations of the Boolean algebra are mappings from ''Bn'' to ''B''. All Boolean algebras are then <math><B,+,.,\overline{.},1,0></math> algebras of type <2,2,1,0,0>. One binary operation is denoted by an infix '+', the other by an infix '.'. The latter is often omitted, in which case the operands simply concatenate. '+' and '.' commute and associate, as in real-valued algebra <!--"real valued" is the term I propose for the algebra we all learned in high school.-->. '.' precedes '+', but brackets may override. Hence A.B+C is parsed as (A.B)+C not A.(B+C). ''B'' is a bounded [[partial order|partially ordered set]], whose bounds are the distinguished elements 0 and 1. '''2''' is simply the Boolean algebra such that ''B''={0,1}.
The [[carrier]] of a Boolean algebra is the [[set]] ''B'' such that the [[operation]]s of the Boolean algebra are mappings from ''Bn'' to ''B''. All Boolean algebras are then <math><B,+,.,\overline{.},1,0></math> algebras of type <2,2,1,0,0>. The binary operations are termed 'sum' and 'product', for which the infix notation is '+' and '.', respectively. '.' is often omitted, in which case the operands simply concatenate. '+' and '.' commute and associate, as in real-valued algebra <!--"real valued" is the term I propose for the algebra we all learned in high school.-->. '.' precedes '+', but brackets may override. Hence A.B+C is parsed as (A.B)+C not A.(B+C). The unary operation is 'complementation'. ''B'' is a [[partial order|partially ordered set]], whose [[bounds|bounded set]] are the distinguished elements 0 and 1. '''2''' is simply the Boolean algebra such that ''B''={0,1}.
Interpreting one of 0 and 1 as ''True'' and the other as ''False'' yields classical bivalent logic in equational form. In this case, '+' is read as [[logical OR|OR]] and '.' as [[logical AND|AND]]. These operators are derived by analogy from numerical arithmetic, if any nonzero number is set to 1. Complementation is read as [[logical NOT|NOT]]. The numerical analog of the complement of ''x'' is 1-''x''.
Interpreting one of 0 and 1 as ''True'' and the other as ''False'' yields classical [[bivalent logic]] in equational form. In this case, '+' is read as [[logical OR|OR]] and '.' as [[logical AND|AND]]. These operators are derived by analogy from numerical arithmetic, if any nonzero number is set to 1. Complementation is read as [[logical NOT|NOT]]. The numerical analog of the complement of ''x'' is 1-''x''.


==Basic identities==
==Basic identities==
Line 40: Line 40:
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.
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 metatheorem (whose proof is nontrivial) states that any theorem of '''2''' holds for all Boolean algebras. 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". In practice, the number of steps required to verify an equation via a decision procedure increases exponentially along with the number of its variables.
A powerful and nontrivial [[metatheorem]] states that any theorem of '''2''' holds for all Boolean algebras. 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". In practice, the number of steps required to verify an equation via a decision procedure increases exponentially along with the number of its variables.


For an elegant alternative notation for '''2''', see [[Laws of Form]].
For an elegant alternative notation for '''2''', see [[Laws of Form]].

Revision as of 09:46, 24 October 2005

The two-element Boolean algebra is the simplest Boolean algebra, one having just two elements, named 1 and 0 by convention. Paul Halmos's name for this algebra, 2, has some following among mathematicians and will be employed here.

The carrier of a Boolean algebra is the set B such that the operations of the Boolean algebra are mappings from Bn to B. All Boolean algebras are then algebras of type <2,2,1,0,0>. The binary operations are termed 'sum' and 'product', for which the infix notation is '+' and '.', respectively. '.' is often omitted, in which case the operands simply concatenate. '+' and '.' commute and associate, as in real-valued algebra . '.' precedes '+', but brackets may override. Hence A.B+C is parsed as (A.B)+C not A.(B+C). The unary operation is 'complementation'. B is a partially ordered set, whose bounded set are the distinguished elements 0 and 1. 2 is simply the Boolean algebra such that B={0,1}.

Interpreting one of 0 and 1 as True and the other as False yields classical bivalent logic in equational form. In this case, '+' is read as OR and '.' as AND. These operators are derived by analogy from numerical arithmetic, if any nonzero number is set to 1. Complementation is read as NOT. The numerical analog of the complement of x is 1-x.

Basic identities

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

  • 1+0 = 0+1 = 1 (As in numerical arithmetic)
  • 0+0 = 0 (As in numerical arithmetic)
  • 1+1 = 1
  • 1.1 = 1 (As in numerical arithmetic)
  • 0.0 = 0.1 = 1.0 = 0 (As in numerical arithmetic)

This Boolean arithmetic suffices to verify any equation of 2, including any axiom, by examining every possible assignment of 0s and 1s to each variable (see decision procedure). A little known but powerful axiom set (basis) for 2 is:

  • A+B+C = B+C+A.

The following basic identities can now be verified:

Each of '+' and '.' distributes over the other, that is A.(B+C) = A.B + B.B and A+B.C = (A+B).(A+C). That '.' distributes over '+' conforms to real-valued algebra, but not '+' over '.'. For this and other reasons, a sum of products (which leads to a NAND synthesis) is more commonly employed than a product of sums (which leads to a NOR synthesis).

Other

De Morgan's theorem states that if you do 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 theorem of 2 holds for all Boolean algebras. 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". In practice, the number of steps required to verify an equation via a decision procedure increases exponentially along with the number of its variables.

For an elegant alternative notation for 2, see Laws of Form.