Metamath Proof Explorer


Theorem wl-df3xor2

Description: Alternative definition of wl-df-3xor , using triple exclusive disjunction, or XOR3. You can add more input by appending each one with a \/_ . Copy of hadass . (Contributed by Mario Carneiro, 4-Sep-2016) df-had redefined. (Revised by Wolf Lammen, 1-May-2024)

Ref Expression
Assertion wl-df3xor2 ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( 𝜑 ⊻ ( 𝜓 ⊻ 𝜒 ) ) )

Proof

Step Hyp Ref Expression
1 ifpn ⊢ ( if- ( 𝜑 , ¬ ( 𝜓 ⊻ 𝜒 ) , ( 𝜓 ⊻ 𝜒 ) ) ↔ if- ( ¬ 𝜑 , ( 𝜓 ⊻ 𝜒 ) , ¬ ( 𝜓 ⊻ 𝜒 ) ) )
2 wl-df-3xor ⊢ ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ if- ( 𝜑 , ¬ ( 𝜓 ⊻ 𝜒 ) , ( 𝜓 ⊻ 𝜒 ) ) )
3 df-xor ⊢ ( ( 𝜑 ⊻ ( 𝜓 ⊻ 𝜒 ) ) ↔ ¬ ( 𝜑 ↔ ( 𝜓 ⊻ 𝜒 ) ) )
4 nbbn ⊢ ( ( ¬ 𝜑 ↔ ( 𝜓 ⊻ 𝜒 ) ) ↔ ¬ ( 𝜑 ↔ ( 𝜓 ⊻ 𝜒 ) ) )
5 ifpdfbi ⊢ ( ( ¬ 𝜑 ↔ ( 𝜓 ⊻ 𝜒 ) ) ↔ if- ( ¬ 𝜑 , ( 𝜓 ⊻ 𝜒 ) , ¬ ( 𝜓 ⊻ 𝜒 ) ) )
6 3 4 5 3bitr2i ⊢ ( ( 𝜑 ⊻ ( 𝜓 ⊻ 𝜒 ) ) ↔ if- ( ¬ 𝜑 , ( 𝜓 ⊻ 𝜒 ) , ¬ ( 𝜓 ⊻ 𝜒 ) ) )
7 1 2 6 3bitr4i ⊢ ( hadd ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( 𝜑 ⊻ ( 𝜓 ⊻ 𝜒 ) ) )