Metamath Proof Explorer


Theorem had0

Description: If the first input is false, then the adder sum is equivalent to the exclusive disjunction of the other two inputs, and conversely. (Contributed by Mario Carneiro, 4-Sep-2016) (Proof shortened by Wolf Lammen, 12-Jul-2020) Strengthen to a biconditional. (Revised by BJ, 10-Aug-2026)

Ref Expression
Assertion had0 ( ¬ 𝜑 ↔ ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( 𝜓𝜒 ) ) )

Proof

Step Hyp Ref Expression
1 hadrot ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ hadd ( 𝜓 , 𝜒 , 𝜑 ) )
2 df-had ( hadd ( 𝜓 , 𝜒 , 𝜑 ) ↔ ( ( 𝜓𝜒 ) ⊻ 𝜑 ) )
3 df-xor ( ( ( 𝜓𝜒 ) ⊻ 𝜑 ) ↔ ¬ ( ( 𝜓𝜒 ) ↔ 𝜑 ) )
4 xor3 ( ¬ ( ( 𝜓𝜒 ) ↔ 𝜑 ) ↔ ( ( 𝜓𝜒 ) ↔ ¬ 𝜑 ) )
5 3 4 bitri ( ( ( 𝜓𝜒 ) ⊻ 𝜑 ) ↔ ( ( 𝜓𝜒 ) ↔ ¬ 𝜑 ) )
6 2 5 bitri ( hadd ( 𝜓 , 𝜒 , 𝜑 ) ↔ ( ( 𝜓𝜒 ) ↔ ¬ 𝜑 ) )
7 1 6 bitri ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( ( 𝜓𝜒 ) ↔ ¬ 𝜑 ) )
8 biass ( ( ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( 𝜓𝜒 ) ) ↔ ¬ 𝜑 ) ↔ ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( ( 𝜓𝜒 ) ↔ ¬ 𝜑 ) ) )
9 7 8 mpbir ( ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( 𝜓𝜒 ) ) ↔ ¬ 𝜑 )
10 9 bicomi ( ¬ 𝜑 ↔ ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( 𝜓𝜒 ) ) )