Proof using.
intros.
eapply In_cons_neq.
- eapply In_cons_neq.
+ eauto.
+ discriminate.
- discriminate.
Qed.

(* Specifications: *)
Lemma O_IRO_preserved :
forall xs ys zs k' ir,
NoDup (get_op_output_keys (xs ++ I k' :: ys ++ O k' :: zs)) ->
(forall k, In (O k) (xs ++ I k' :: ys ++ O k' :: zs) ->
In (IRO k) (IRI k' :: IRO k' :: ir)) ->
forall k, In (O k) (xs ++ ys ++ zs) ->
In (IRO k) ir.