Section BasicLemmas.
Variable X Y: Type.
Implicit Type f: X -> Y.
Implicit Type p: X -> bool.
Implicit Type A B C : list X.
Implicit Type a b c : X.
Global Instance proper_in_incl: Proper (eq ++> incl ==> Basics.impl) (@In X).
Global Instance in_seteq_proper: Proper (eq ++> seteq ++> iff) (@In X).
(* ⊆ *)
Global Instance subrel_incl_seteq: subrelation seteq (@incl X).
End WellFoundedStrictInclusion.
(* app *)
Global Instance proper_app_incl: Proper (incl ++> incl ++> incl) (@app X).
Global Instance proper_app_seteq: Proper (seteq ++> seteq ++> seteq) (@app X).
Hint Rewrite app_nil_l app_nil_r : listdb.
Hint Rewrite <- app_comm_cons : listdb.
Hint Rewrite -> in_app_iff : listdb.
Global Instance proper_incl_seteq: Proper (@seteq X ++> @seteq X ++> iff) incl.
Global Instance proper_rev_incl: Proper (incl ++> incl) (@rev X).
Global Instance proper_rev_seteq: Proper (seteq ++> seteq) (@rev X).
Hint Rewrite rev_seteq rev_involutive rev_length rev_app_distr : listdb.

(* map *)
Lemma map_id_list (g: X -> X) A:
(forall x, x ∈ A -> g x = x) -> map g A = A.