proposition: Theorem permutation_app4 : forall l1 l2 l3 l4:list A, permutation l1 l2 -> permutation l3 l4 -> permutation (l1 ++ l3) (l2 ++ l4).
proof: Proof. intros l1 l2 l3 l4 H H0. apply permutation_transitive with (l1 ++ l4). - apply permutation_long_head; assumption. - apply permutation_transitive with (l4 ++ l1). + apply permutation_app. + apply permutation_transitive with (l4 ++ l2). * apply permutation_long_head; assumption. * apply permutation_app. Qed.
imports: List Lia