-- Module: Mathlib.Data.Nat.Bitwise
Goal:
f : Bool → Bool → Bool
h : f Bool.false Bool.false = Bool.false
a : Bool
m : ℕ
b : Bool
n : ℕ
h4 : ∀ (x : ℕ), (x + x + 1) / 2 = x
false :
  (if (if Bool.false = Bool.true then 2 * m + 1 else 2 * m) = 0 then
      if f Bool.false Bool.true = Bool.true then if b = Bool.true then 2 * n + 1 else 2 * n else 0
    else
      if (if b = Bool.true then 2 * n + 1 else 2 * n) = 0 then
        if f Bool.true Bool.false = Bool.true then if Bool.false = Bool.true then 2 * m + 1 else 2 * m else 0
      else
        if
            f (decide ((if Bool.false = Bool.true then 2 * m + 1 else 2 * m) % 2 = 1))
                (decide ((if b = Bool.true then 2 * n + 1 else 2 * n) % 2 = 1)) =
              Bool.true then
          bitwise f ((if Bool.false = Bool.true then 2 * m + 1 else 2 * m) / 2)
                ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
              bitwise f ((if Bool.false = Bool.true then 2 * m + 1 else 2 * m) / 2)
                ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
            1
        else
          bitwise f ((if Bool.false = Bool.true then 2 * m + 1 else 2 * m) / 2)
              ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
            bitwise f ((if Bool.false = Bool.true then 2 * m + 1 else 2 * m) / 2)
              ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2)) =
    if f Bool.false b = Bool.true then 2 * bitwise f m n + 1 else 2 * bitwise f m n
true :
  (if (if Bool.true = Bool.true then 2 * m + 1 else 2 * m) = 0 then
      if f Bool.false Bool.true = Bool.true then if b = Bool.true then 2 * n + 1 else 2 * n else 0
    else
      if (if b = Bool.true then 2 * n + 1 else 2 * n) = 0 then
        if f Bool.true Bool.false = Bool.true then if Bool.true = Bool.true then 2 * m + 1 else 2 * m else 0
      else
        if
            f (decide ((if Bool.true = Bool.true then 2 * m + 1 else 2 * m) % 2 = 1))
                (decide ((if b = Bool.true then 2 * n + 1 else 2 * n) % 2 = 1)) =
              Bool.true then
          bitwise f ((if Bool.true = Bool.true then 2 * m + 1 else 2 * m) / 2)
                ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
              bitwise f ((if Bool.true = Bool.true then 2 * m + 1 else 2 * m) / 2)
                ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
            1
        else
          bitwise f ((if Bool.true = Bool.true then 2 * m + 1 else 2 * m) / 2)
              ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
            bitwise f ((if Bool.true = Bool.true then 2 * m + 1 else 2 * m) / 2)
              ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2)) =
    if f Bool.true b = Bool.true then 2 * bitwise f m n + 1 else 2 * bitwise f m n
⊢ (if (if a = Bool.true then 2 * m + 1 else 2 * m) = 0 then
      if f Bool.false Bool.true = Bool.true then if b = Bool.true then 2 * n + 1 else 2 * n else 0
    else
      if (if b = Bool.true then 2 * n + 1 else 2 * n) = 0 then
        if f Bool.true Bool.false = Bool.true then if a = Bool.true then 2 * m + 1 else 2 * m else 0
      else
        if
            f (decide ((if a = Bool.true then 2 * m + 1 else 2 * m) % 2 = 1))
                (decide ((if b = Bool.true then 2 * n + 1 else 2 * n) % 2 = 1)) =
              Bool.true then
          bitwise f ((if a = Bool.true then 2 * m + 1 else 2 * m) / 2)
                ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
              bitwise f ((if a = Bool.true then 2 * m + 1 else 2 * m) / 2)
                ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
            1
        else
          bitwise f ((if a = Bool.true then 2 * m + 1 else 2 * m) / 2)
              ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2) +
            bitwise f ((if a = Bool.true then 2 * m + 1 else 2 * m) / 2)
              ((if b = Bool.true then 2 * n + 1 else 2 * n) / 2)) =
    if f a b = Bool.true then 2 * bitwise f m n + 1 else 2 * bitwise f m n

Tactic:
cases a