fact: Fixpoint flatten (f : symbol) (l : list term) : list term := match l with | nil => nil | (Var _ as t) :: tl => t :: (flatten f tl) | (Term g ll as t) :: tl => if F.Symb.eq_bool f g then ll ++ (flatten f tl) else t :: (flatten f tl) end.
imports: Coq(Relations List Arith Morphisms) CoLoR(more_list list_permut list_sort term_spec term_o equational_theory_spec equational_theory)