__ __ __ __ /\ \ /\ \__/\ \__ __/\ \__ \ `\`\\/'/\_\ \ ,_\ ___ ____/\_\ \ ,_\ __ `\ `\ /'\/\ \ \ \/ /',__ /',__\/\ \ \ \/ /'__`\ `\ \ \ \ \ \ \ \_/\__, ` /\__, `\ \ \ \ \_/\ __/ \ \_\ \ \_\ \__\/\____/ \/\____/\ \_\ \__\ \____\ \/_/ \/_/\/__/\/___/ \/___/ \/_/\/__/\/____/
When I learned about boolean algebra the one thing that didn't seem clear to me was the consensus theorem.
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 term is redundant.
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 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
Doing an or operation between a value and false will give the value unchanged. That means that the term has no effect when if is false.
When 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 is always true when is true. When the result of an and operation is true it means that both values where true, so in this case is true, as well as . Knowing that they are both true the next step is substituting both of them into the equation.
Doing an and operation between a value and true will not change the original value. This means that the equations is equal to . An or operation between a value and its opposite will always be true which shows that 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 and manipulate it until the term is added.
De Morgan's law (on each part)
De Morgan's law (on the whole expression)
Distribute
The part will always be false.
De Morgan's law (on the whole expression)
De Morgan's law (on each part)
Distribute the first two parts
Ignore
Distribute the rest
Simplify and reorder terms
Factor out
will always be true