Tactic Notation "env" "induction" ident(E) :=
try (intros until E);
let T := type of E in
let T := eval compute in T in
match T with
| list (?key * ?A) => induction E using (alist_ind A)
end.
Tactic Notation "env" "induction" ident(E) "as" simple_intropattern(P) :=
try (intros until E);
let T := type of E in
let T := eval compute in T in
match T with
| list (?key * ?A) => induction E as P using (alist_ind A)
end.
(* *********************************************************************** *)
(** * Basic facts about [disjoint] *)
Section Disjoint.
Implicit Types A B C : Type.

(* Specifications: *)
Axiom disjoint_sym_1 :
forall A B (E : list (atom*A)) (F : list (atom*B)),
disjoint E F ->
disjoint F E.
Axiom disjoint_sym :
forall A B (E : list (atom*A)) (F : list (atom*B)),
disjoint E F <-> disjoint F E.
Axiom disjoint_nil_1 :
forall A B (E : list (atom*B)),
disjoint (@nil (atom*A)) E.
Axiom disjoint_one_1 :
forall A B (x : atom) (a : A) (F : list (atom*B)),
disjoint (x ~ a) F ->
~ In x (dom F).
Axiom disjoint_one_2 :
forall A B (x : atom) (a : A) (F : list (atom*B)),
~ In x (dom F) ->
disjoint (x ~ a) F.
Axiom disjoint_one_l :
forall A B (x : atom) (a : A) (E : list (atom*B)),
disjoint (x ~ a) E <-> ~ In x (dom E).
Axiom disjoint_one_r :
forall A B (x : atom) (a : A) (E : list (atom*B)),
disjoint E (x ~ a) <-> ~ In x (dom E).
Axiom disjoint_cons_1 :
forall A B x a (E : list (atom*A)) (F : list (atom*B)),
disjoint ((x, a) :: E) F ->
~ In x (dom F).
Axiom disjoint_cons_2 :
forall A B x a (E : list (atom*A)) (F : list (atom*B)),
disjoint ((x, a) :: E) F ->
disjoint E F.
Axiom disjoint_cons_3 :
forall A B x a (E : list (atom*A)) (F : list (atom*B)),
disjoint E F ->
~ In x (dom F) ->
disjoint ((x, a) :: E) F.
Axiom disjoint_cons_l :
forall A B x a (E : list (atom*A)) (F : list (atom*B)),
disjoint ((x, a) :: E) F <-> ~ In x (dom F) /\ disjoint E F.
Axiom disjoint_cons_r :
forall A B x a (E : list (atom*A)) (F : list (atom*B)),
disjoint F ((x, a) :: E) <-> ~ In x (dom F) /\ disjoint E F.
Axiom disjoint_app_1 :
forall A B (E F : list (atom*A)) (G : list (atom*B)),
disjoint (E ++ F) G ->
disjoint E G.
Axiom disjoint_app_2 :
forall A B (E F : list (atom*A)) (G : list (atom*B)),
disjoint (E ++ F) G ->
disjoint F G.
Axiom disjoint_app_3 :
forall A B (E F : list (atom*A)) (G : list (atom*B)),
disjoint E G ->
disjoint F G ->
disjoint (E ++ F) G.
Axiom disjoint_app_l :
forall A B (E F : list (atom*A)) (G : list (atom*B)),
disjoint (E ++ F) G <-> disjoint E G /\ disjoint F G.
Axiom disjoint_app_r :
forall A B (E F : list (atom*A)) (G : list (atom*B)),
disjoint G (E ++ F) <-> disjoint E G /\ disjoint F G.
Axiom disjoint_map_1 :
forall A B C (E : list (atom*A)) (F : list (atom*B)) (f:A->C),
disjoint (map f E) F ->
disjoint E F.
Axiom disjoint_map_2 :
forall A B C (E : list (atom*A)) (F : list (atom*B)) (f:A->C),
disjoint E F ->
disjoint (map f E) F.
Axiom disjoint_map_l :
forall A B C (E : list (atom*A)) (F : list (atom*B)) (f:A->C),
disjoint (map f E) F <-> disjoint E F.
Axiom disjoint_map_r :
forall A B C (E : list (atom*A)) (F : list (atom*B)) (f:A->C),
disjoint F (map f E) <-> disjoint E F.