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

State before:
f : Bool → Bool → Bool
f_stable : f false false = false
m n k : Nat
⊢ bitwise f m n % 2 ^ k = bitwise f (m % 2 ^ k) (n % 2 ^ k)
Tactic:
apply bitext
State after:
case a
f : Bool → Bool → Bool
f_stable : f false false = false
m n k : Nat
⊢ ∀ (i : Nat), getBit (bitwise f m n % 2 ^ k) i = getBit (bitwise f (m % 2 ^ k) (n % 2 ^ k)) i

State before:
case a
f : Bool → Bool → Bool
f_stable : f false false = false
m n k : Nat
⊢ ∀ (i : Nat), getBit (bitwise f m n % 2 ^ k) i = getBit (bitwise f (m % 2 ^ k) (n % 2 ^ k)) i
Tactic:
intro i
State after:
case a
f : Bool → Bool → Bool
f_stable : f false false = false
m n k i : Nat
⊢ getBit (bitwise f m n % 2 ^ k) i = getBit (bitwise f (m % 2 ^ k) (n % 2 ^ k)) i

State before:
case a
f : Bool → Bool → Bool
f_stable : f false false = false
m n k i : Nat
⊢ getBit (bitwise f m n % 2 ^ k) i = getBit (bitwise f (m % 2 ^ k) (n % 2 ^ k)) i
Tactic:
simp [getBit_mod_two_pow, bitwise_getBit f f_stable]
State after:
case a
f : Bool → Bool → Bool
f_stable : f false false = false
m n k i : Nat
⊢ (decide (i < k) && f (getBit m i) (getBit n i)) = f (decide (i < k) && getBit m i) (decide (i < k) && getBit n i)

State before:
case a
f : Bool → Bool → Bool
f_stable : f false false = false
m n k i : Nat
⊢ (decide (i < k) && f (getBit m i) (getBit n i)) = f (decide (i < k) && getBit m i) (decide (i < k) && getBit n i)
Tactic:
cases decide (i<k) <;> simp [f_stable]
State after:
no goals