apply Memory.mk_inj_iff.mpr
case hi.h₂
n✝ : ℕ
b : Bool
n : ℕ
hn : n = 0 → b = true
a✝ : encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2))
⊢ encode (b :: Nat.bits n) =
    Memory.mk (decide (Nat.bit b n ≠ 0)) (encode (decide (Nat.bit b n % 2 = 1))) (encode (Nat.bit b n / 2))
case hi.h₂
n✝ : ℕ
b : Bool
n : ℕ
hn : n = 0 → b = true
a✝ : encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2))
⊢ true = decide (Nat.bit b n ≠ 0) ∧
    encode b = encode (decide (Nat.bit b n % 2 = 1)) ∧ encodeList (Nat.bits n) = encode (Nat.bit b n / 2)