proposition: Lemma permutations_trans l1 l2 l3 : l1 ∈ permutations l2 → l2 ∈ permutations l3 → l1 ∈ permutations l3.
proof: Proof. revert l1 l2. induction l3 as [|x l3 IH]; intros l1 l2; simpl. - rewrite !elem_of_list_singleton. intros Hl1 ->; simpl in *. by rewrite elem_of_list_singleton in Hl1. - rewrite !elem_of_list_bind. intros Hl1 [l2' [Hl2 Hl2']]. destruct (permutations_interleave_toggle x l1 l2 l2') as [? [??]]; eauto. Qed.
imports: stdpp(options)