Proof using.
induction l; intros; simpl in *; intuition.
apply IR_equiv_trans with (l2 := (a :: IRI k :: l)).
- auto.
- specialize (H a). concludes. break_exists. subst.
auto using IR_equivalent_refl, good_move_II.
Qed.
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)).
Inductive op_equivalent : list op -> list op -> Prop :=
| op_equiv_nil : op_equivalent [] []
| op_equiv_cons : forall x xs ys, op_equivalent xs ys -> op_equivalent (x :: xs) (x :: ys)
| op_equiv_move : forall x y xs ys, good_op_move x y ->
op_equivalent xs ys -> op_equivalent (x :: y :: xs) (y :: x :: ys)
| op_equiv_trans : forall l1 l2 l3, op_equivalent l1 l2 -> op_equivalent l2 l3 -> op_equivalent l1 l3.

Lemma op_equiv_Permutation :
forall xs ys,
op_equivalent xs ys ->
Permutation xs ys.