__ __ __ __ /\ \ /\ \__/\ \__ __/\ \__ \ `\`\\/'/\_\ \ ,_\ ___ ____/\_\ \ ,_\ __ `\ `\ /'\/\ \ \ \/ /',__ /',__\/\ \ \ \/ /'__`\ `\ \ \ \ \ \ \ \_/\__, ` /\__, `\ \ \ \ \_/\ __/ \ \_\ \ \_\ \__\/\____/ \/\____/\ \_\ \__\ \____\ \/_/ \/_/\/__/\/___/ \/___/ \/_/\/__/\/____/

When I learned about boolean algebra the one thing that didn't seem clear to me was the consensus theorem.

$$xy+\stackrel{\u203e}{x}z+yz=xy+\stackrel{\u203e}{x}z$$Once I learned about this I was confused why this would work. It seems like such a random property. To get a better sense of what it is saying I tried to prove it myself. The first idea I had to prove it is to make a truth table for all the parts. Looking at the truth table below you should be able to see that the $yz$ term is redundant.

$x$ | $y$ | $z$ | $xy$ | $\stackrel{\u203e}{x}z$ | $yz$ |
---|---|---|---|---|---|

0 | 0 | 0 | 0 | 0 | 0 |

0 | 0 | 1 | 0 | 1 | 0 |

0 | 1 | 0 | 0 | 0 | 0 |

0 | 1 | 1 | 0 | 1 | 1 |

1 | 0 | 0 | 0 | 0 | 0 |

1 | 0 | 1 | 0 | 0 | 0 |

1 | 1 | 0 | 1 | 0 | 0 |

1 | 1 | 1 | 1 | 0 | 1 |

This proves that the theorem is true, but it didn't help me understand why it is true. The next thing I did was prove it by manipulating the boolean algebra. This strategy was probably this worst way to do this as it was the most work and revealed nothing to me about why it is true. There might have been a better process to take that is more enlightening, but I did not find it. Despite this I will put the proof at the bottom of this page.

Ultimately the thing that gave me the best understanding of why the theorem works is by understanding what it is saying. The most important term to focus on is the $yz$ term. As it is a boolean value there are two values it could be, and if we prove that for both of these values it is redundant than we have proved the term is redundant in all cases.

First let's consider when it is false. We can substitute the value false into the equation to get

$$xy+\stackrel{\u203e}{x}z+F$$Doing an or operation between a value and false will give the value unchanged. That means that the $yz$ term has no effect when if is false.

When $yz$ is true it is a bit harder to show that it has no effect, but still easy enough. Doing an or operation between a value and true will always be true, so we need to show that $xy+\stackrel{\u203e}{x}z$ is always true when $yz$ is true. When the result of an and operation is true it means that both values where true, so in this case $y$ is true, as well as $z$. Knowing that they are both true the next step is substituting both of them into the equation.

$$xT+\stackrel{\u203e}{x}T$$Doing an and operation between a value and true will not change the original value. This means that the equations is equal to $x+\stackrel{\u203e}{x}$ . An or operation between a value and its opposite will always be true which shows that $xy+\stackrel{\u203e}{x}z$ is always true. That was the final thing needed to show that the consensus theorem is true.

Here is the proof using only boolean algebra. I will start with the expression $xy+\stackrel{\u203e}{x}z$ and manipulate it until the $yz$ term is added.

$$xy+\stackrel{\u203e}{x}z$$De Morgan's law (on each part)

$$\stackrel{\u203e}{x}+\stackrel{\u203e}{y}+x+\stackrel{\u203e}{z}$$De Morgan's law (on the whole expression)

$$\frac{}{(\stackrel{\u203e}{x}+\stackrel{\u203e}{y})(x+\stackrel{\u203e}{z})}$$Distribute

$$\frac{}{\stackrel{\u203e}{x}x+\stackrel{\u203e}{x}\stackrel{\u203e}{z}+\stackrel{\u203e}{y}x+\stackrel{\u203e}{y}\stackrel{\u203e}{z}}$$The $\stackrel{\u203e}{x}x$ part will always be false.

$$\frac{}{\stackrel{\u203e}{x}\stackrel{\u203e}{z}+\stackrel{\u203e}{y}x+\stackrel{\u203e}{y}\stackrel{\u203e}{z}}$$De Morgan's law (on the whole expression)

$$(\stackrel{\u203e}{x}\stackrel{\u203e}{z})(\stackrel{\u203e}{y}x)(\stackrel{\u203e}{y}\stackrel{\u203e}{z})$$De Morgan's law (on each part)

$$(x+z)(y+\stackrel{\u203e}{x})(y+z)$$Distribute the first two parts

$$(xy+x\stackrel{\u203e}{x}+zy+z\stackrel{\u203e}{x})(y+z)$$Ignore $\stackrel{\u203e}{x}x$

$$(xy+zy+z\stackrel{\u203e}{x})(y+z)$$Distribute the rest

$$xyy+zyy+z\stackrel{\u203e}{x}y+xyz+zzy+zz\stackrel{\u203e}{x}$$Simplify and reorder terms

$$xy+\stackrel{\u203e}{x}z+yz+yz+xyz+\stackrel{\u203e}{xyz}$$Factor out $yz$

$$xy+\stackrel{\u203e}{x}z+yz(1+1+x+\stackrel{\u203e}{x})$$$(1+1+x+\stackrel{\u203e}{x})$ will always be true

$$xy+\stackrel{\u203e}{x}z+yz$$