(* ---------------------------------------------------------------------- *)
(** **** Properties of all_belongs *)

(* Specifications: *)
(** All_belongs and belongs. *)
Axiom all_belongs_def : forall A xs (E : gen_env A),
(forall x, List.In x xs -> x ∈ E) ->
xs ⊂ E.
Axiom all_belongs_def_inv : forall A xs (E : gen_env A),
xs ⊂ E ->
(forall x, List.In x xs -> x ∈ E).
Axiom all_belongs_belongs : forall A x xs (E : gen_env A),
(x :: xs) ⊂ E ->
x ∈ E ∧ xs ⊂ E.
Axiom belongs_all_belongs : forall A x xs (E : gen_env A),
x ∈ E ∧ xs ⊂ E ->
(x :: xs) ⊂ E.
(** All_belongs is false on empty environments. *)
Axiom all_belongs_empty : forall A xs,
xs ⊂ (@empty A) ->
xs = nil.
Axiom all_belongs_nil : forall A (E : gen_env A),
nil ⊂ E.
(** All_belongs in singular(s). *)
Axiom all_belongs_single : forall A xs y (v : A),
xs = y :: nil ->
xs ⊂ (y ∶ v).
Axiom all_belongs_single_inv : forall A xs y (v : A),
length xs = 1 ->
xs ⊂ (y ∶ v) ->
xs = y :: nil.
Axiom all_belongs_singles : forall A xs ys (vs : list A),
length ys = length vs ->
List.incl xs ys ->
xs ⊂ (ys ∷ vs).
Axiom all_belongs_singles_inv : forall A xs ys (vs : list A),
xs ⊂ (ys ∷ vs) ->
List.incl xs ys.
(** All_belongs and concatenation. *)
Axiom all_belongs_concat_l : forall A xs (F G : gen_env A),
xs ⊂ F ->
xs ⊂ (F & G).
Axiom all_belongs_concat_r : forall A xs (F G : gen_env A),
xs ⊂ F ->
xs ⊂ (G & F).
(** All_belongs and dom. *)
Axiom all_belongs_dom : forall A xs (E : gen_env A),
xs ⊂ E ->
List.incl xs (dom E).
Axiom all_belongs_dom_inv : forall A xs (E F : gen_env A),
List.incl xs (dom E) ->
xs ⊂ E.