refine Nat.binaryRec' (n := n) Memory.zero_def'.symm ?hi
n : ℕ
⊢ encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2))
case hi
n : ℕ
⊢ ∀ (b : Bool) (n : ℕ),
    (n = 0 → b = true) →
      encode n = Memory.mk (decide (n ≠ 0)) (encode (decide (n % 2 = 1))) (encode (n / 2)) →
        encode (Nat.bit b n) =
          Memory.mk (decide (Nat.bit b n ≠ 0)) (encode (decide (Nat.bit b n % 2 = 1))) (encode (Nat.bit b n / 2))