fact: Definition mv (d: direction) (t: (list bool * bool * list bool)) := match d with | go_left => match t with | (l :: ls, a, rs) => (ls, l, a :: rs) | (nil, a, rs) => (nil, false, a :: rs) end | go_right => match t with | (ls, a, r :: rs) => (a :: ls, r, rs) | (ls, a, nil) => (a :: ls, false, nil) end end.