Theorem: Nat.and_xor (Algdata/Data/Nat/Bits.lean)

State before:
l m n : Nat
⊢ l &&& (m ^^^ n) = l &&& m ^^^ l &&& n
Tactic:
apply bitext
State after:
case a
l m n : Nat
⊢ ∀ (i : Nat), getBit (l &&& (m ^^^ n)) i = getBit (l &&& m ^^^ l &&& n) i

State before:
case a
l m n : Nat
⊢ ∀ (i : Nat), getBit (l &&& (m ^^^ n)) i = getBit (l &&& m ^^^ l &&& n) i
Tactic:
intro i
State after:
case a
l m n i : Nat
⊢ getBit (l &&& (m ^^^ n)) i = getBit (l &&& m ^^^ l &&& n) i

State before:
case a
l m n i : Nat
⊢ getBit (l &&& (m ^^^ n)) i = getBit (l &&& m ^^^ l &&& n) i
Tactic:
conv => lhs; change (bitwise and l (bitwise bne m n)).getBit i
State after:
case a
l m n i : Nat
⊢ getBit (bitwise and l (bitwise bne m n)) i = getBit (l &&& m ^^^ l &&& n) i

State before:
case a
l m n i : Nat
⊢ getBit (bitwise and l (bitwise bne m n)) i = getBit (l &&& m ^^^ l &&& n) i
Tactic:
conv => rhs; change (bitwise bne (bitwise and l m) (bitwise and l n)).getBit i
State after:
case a
l m n i : Nat
⊢ getBit (bitwise and l (bitwise bne m n)) i = getBit (bitwise bne (bitwise and l m) (bitwise and l n)) i

State before:
case a
l m n i : Nat
⊢ getBit (bitwise and l (bitwise bne m n)) i = getBit (bitwise bne (bitwise and l m) (bitwise and l n)) i
Tactic:
simp [bitwise_getBit]
State after:
case a
l m n i : Nat
⊢ (getBit l i && getBit m i != getBit n i) = ((getBit l i && getBit m i) != (getBit l i && getBit n i))

State before:
case a
l m n i : Nat
⊢ (getBit l i && getBit m i != getBit n i) = ((getBit l i && getBit m i) != (getBit l i && getBit n i))
Tactic:
cases l.getBit i <;> cases m.getBit i <;> cases n.getBit i <;> decide
State after:
no goals