unfold bitwise
case refl
f : Bool → Bool → Bool
n : Nat
⊢ bitwise f 0 n / 2 = bitwise f (0 / 2) (n / 2)
case refl
f : Bool → Bool → Bool
n : Nat
⊢ (if 0 = 0 then if f false true = true then n else 0
      else
        if n = 0 then if f true false = true then 0 else 0
        else
          let n' := 0 / 2;
          let m' := n / 2;
          let b₁ := 0 % 2 = 1;
          let b₂ := n % 2 = 1;
          let r := bitwise f n' m';
          if f (decide b₁) (decide b₂) = true then r + r + 1 else r + r) /
      2 =
    if 0 / 2 = 0 then if f false true = true then n / 2 else 0
    else
      if n / 2 = 0 then if f true false = true then 0 / 2 else 0
      else
        let n' := 0 / 2 / 2;
        let m' := n / 2 / 2;
        let b₁ := 0 / 2 % 2 = 1;
        let b₂ := n / 2 % 2 = 1;
        let r := bitwise f n' m';
        if f (decide b₁) (decide b₂) = true then r + r + 1 else r + r