Boole's expansion theorem, often referred to as the Shannon expansion or decomposition, is the identity:
, where
is any Boolean function,
is a variable,
is the complement of
, and
and
are
with the argument
set equal to
and to
respectively.
The terms
and
are sometimes called the positive and negative Shannon cofactors, respectively, of
with respect to
. These are functions, computed by restrict operator,
and
(see valuation (logic) and partial application).
It has been called the "fundamental theorem of Boolean algebra".[1] Besides its theoretical importance, it paved the way for binary decision diagrams (BDDs), satisfiability solvers, and many other techniques relevant to computer engineering and formal verification of digital circuits.
In such engineering contexts (especially in BDDs), the expansion is interpreted as a if-then-else, with the variable
being the condition and the cofactors being the branches (
when
is true and respectively
when
is false).[2]
A more explicit way of stating the theorem is:
![{\displaystyle f(X_{1},X_{2},\dots ,X_{n})=X_{1}\cdot f(1,X_{2},\dots ,X_{n})+X_{1}'\cdot f(0,X_{2},\dots ,X_{n})}](//wikimedia.org/api/rest_v1/media/math/render/svg/1b0676bf7ec8cd8a4eaaef34881497f69fd86f94)
- XOR-Form
- The statement also holds when the disjunction "+" is replaced by the XOR operator:
![{\displaystyle f(X_{1},X_{2},\dots ,X_{n})=X_{1}\cdot f(1,X_{2},\dots ,X_{n})\oplus X_{1}'\cdot f(0,X_{2},\dots ,X_{n})}](//wikimedia.org/api/rest_v1/media/math/render/svg/3024a2d2961c15097c8ad79fe632f25714669bb8)
- Dual form
- There is a dual form of the Shannon expansion (which does not have a related XOR form):
![{\displaystyle f(X_{1},X_{2},\dots ,X_{n})=(X_{1}+f(0,X_{2},\dots ,X_{n}))\cdot (X_{1}'+f(1,X_{2},\dots ,X_{n}))}](//wikimedia.org/api/rest_v1/media/math/render/svg/aaf5a88504a5f213c85628b005e55eb29d42322b)
Repeated application for each argument leads to the Sum of Products (SoP) canonical form of the Boolean function
. For example for
that would be
![{\displaystyle {\begin{aligned}f(X_{1},X_{2})&=X_{1}\cdot f(1,X_{2})+X_{1}'\cdot f(0,X_{2})\\&=X_{1}X_{2}\cdot f(1,1)+X_{1}X_{2}'\cdot f(1,0)+X_{1}'X_{2}\cdot f(0,1)+X_{1}'X_{2}'\cdot f(0,0)\end{aligned}}}](//wikimedia.org/api/rest_v1/media/math/render/svg/02e4c1330e1918eed94ab9ce545165f02a3c5fdd)
Likewise, application of the dual form leads to the Product of Sums (PoS) canonical form (using the distributivity law of
over
):
![{\displaystyle {\begin{aligned}f(X_{1},X_{2})&=(X_{1}+f(0,X_{2}))\cdot (X_{1}'+f(1,X_{2}))\\&=(X_{1}+X_{2}+f(0,0))\cdot (X_{1}+X_{2}'+f(0,1))\cdot (X_{1}'+X_{2}+f(1,0))\cdot (X_{1}'+X_{2}'+f(1,1))\end{aligned}}}](//wikimedia.org/api/rest_v1/media/math/render/svg/41d32b5505a479b41c192fc2380af7cb1c9022ee)
- Linear properties of cofactors:
- For a Boolean function F which is made up of two Boolean functions G and H the following are true:
- If
then ![{\displaystyle F_{x}=H'_{x}}](//wikimedia.org/api/rest_v1/media/math/render/svg/c1d1ebb429dc453e141228da8dc19a8dd15d7bc5)
- If
then ![{\displaystyle F_{x}=G_{x}\cdot H_{x}}](//wikimedia.org/api/rest_v1/media/math/render/svg/a4a96b73b42e7602f01eed58d0d014bc78c2e77c)
- If
then ![{\displaystyle F_{x}=G_{x}+H_{x}}](//wikimedia.org/api/rest_v1/media/math/render/svg/15999b17e59650d64fc4cac4047dbff0bb25f924)
- If
then ![{\displaystyle F_{x}=G_{x}\oplus H_{x}}](//wikimedia.org/api/rest_v1/media/math/render/svg/dba0d5e5744c9c6d0bfda97c3b7dd299eaaaddde)
- Characteristics of unate functions:
- If F is a unate function and...
- If F is positive unate then
![{\displaystyle F=x\cdot F_{x}+F_{x'}}](//wikimedia.org/api/rest_v1/media/math/render/svg/d1446ad8d7cc77416445363d628de5e1e136e484)
- If F is negative unate then
![{\displaystyle F=F_{x}+x'\cdot F_{x'}}](//wikimedia.org/api/rest_v1/media/math/render/svg/f82b7239df3e1c4ab5574cbc0a9725f52e39ce8e)
- Boolean difference:
- The Boolean difference or Boolean derivative of the function F with respect to the literal x is defined as:
![{\displaystyle {\frac {\partial F}{\partial x}}=F_{x}\oplus F_{x'}}](//wikimedia.org/api/rest_v1/media/math/render/svg/643d7d1ab0989857bf45efeecffa0ffc413f8971)
- Universal quantification:
- The universal quantification of F is defined as:
![{\displaystyle \forall xF=F_{x}\cdot F_{x'}}](//wikimedia.org/api/rest_v1/media/math/render/svg/399666ec50fd9f871568c4b71b99a0c6a8abb86a)
- Existential quantification:
- The existential quantification of F is defined as:
![{\displaystyle \exists xF=F_{x}+F_{x'}}](//wikimedia.org/api/rest_v1/media/math/render/svg/ebba3677eb50295e33620a45f5959f546e044f48)
George Boole presented this expansion as his Proposition II, "To expand or develop a function involving any number of logical symbols", in his Laws of Thought (1854),[3] and it was "widely applied by Boole and other nineteenth-century logicians".[4]
Claude Shannon mentioned this expansion, among other Boolean identities, in a 1949 paper,[5] and showed the switching network interpretations of the identity. In the literature of computer design and switching theory, the identity is often incorrectly attributed to Shannon.[6][4]
- Binary decision diagrams follow from systematic use of this theorem
- Any Boolean function can be implemented directly in a switching circuit using a hierarchy of basic multiplexer by repeated application of this theorem.
G. D. Hachtel and F. Somezi (1996), Logic Synthesis and Verification Algorithms, p. 234
Perkowski, Marek A.; Grygiel, Stanislaw (1995-11-20), "6. Historical Overview of the Research on Decomposition", A Survey of Literature on Function Decomposition, Version IV, Functional Decomposition Group, Department of Electrical Engineering, Portland University, Portland, Oregon, USA, p. 21, CiteSeerX 10.1.1.64.1129 (188 pages)