(** Auto-specializing a hypothesis *)

Ltac autospec H := specialize (H ltac:(solve [eauto])).(** When a hypothesis/term is provably equal, but not convertible, to
    your goal *)

Ltac exact_eq H :=
  revert H;
  match goal with
    |- ?p -> ?q => cut (p = q); [intros ->; auto | ]
  end.

(* Specifications: *)
Lemma perm_search: forall {A} (a b: A) r s t, Permutation (a::t) s -> Permutation (b::t) r -> Permutation (a::r) (b::s).
Lemma Permutation_concat: forall {A} (P Q: list (list A)), Permutation P Q -> Permutation (concat P) (concat Q).
Lemma Permutation_app_comm_trans: forall (A: Type) (a b c : list A), Permutation (b++a) c -> Permutation (a++b) c.