Metamath Proof Explorer


Theorem consensus

Description: The consensus theorem. This theorem and its dual (with \/ and /\ interchanged) are commonly used in computer logic design to eliminate redundant terms from Boolean expressions. Specifically, we prove that the term ( ps /\ ch ) on the left-hand side is redundant. (Contributed by NM, 16-May-2003) (Proof shortened by Andrew Salmon, 13-May-2011) (Proof shortened by Wolf Lammen, 20-Jan-2013)

Ref Expression
Assertion consensus ( ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) ∨ ( 𝜓𝜒 ) ) ↔ ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )

Proof

Step Hyp Ref Expression
1 id ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) → ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
2 orc ( ( 𝜑𝜓 ) → ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
3 2 adantrr ( ( 𝜑 ∧ ( 𝜓𝜒 ) ) → ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
4 olc ( ( ¬ 𝜑𝜒 ) → ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
5 4 adantrl ( ( ¬ 𝜑 ∧ ( 𝜓𝜒 ) ) → ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
6 3 5 pm2.61ian ( ( 𝜓𝜒 ) → ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
7 1 6 jaoi ( ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) ∨ ( 𝜓𝜒 ) ) → ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
8 orc ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) → ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) ∨ ( 𝜓𝜒 ) ) )
9 7 8 impbii ( ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) ∨ ( 𝜓𝜒 ) ) ↔ ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )