Definition good_op_move (x y : op) : Prop :=
    (forall k k', ~ (x = O k /\ y = I k')) /\
    (forall k, ~ (x = I k /\ y = O k)).

Lemma in_before_preserved : forall xs ys zs k', NoDup (get_op_output_keys (xs ++ I k' :: ys ++ O k' :: zs)) -> (forall k, In (O k) (xs ++ I k' :: ys ++ O k' :: zs) -> before (I k) (O k) (xs ++ I k' :: ys ++ O k' :: zs)) -> forall k, In (O k) (xs ++ ys ++ zs) -> before (I k) (O k) (xs ++ ys ++ zs).