(* ---------------------------------------------------------------------- *)
(** **** Properties of map *)

(* Specifications: *)
(** Map is applied on type(s). *)
Axiom map_empty : forall A B (f : A -> B),
map f (@empty A) = (@empty B).
Axiom map_single : forall A B (f : A -> B) x (v : A),
map f (x ∶ v) = x ∶ (f v).
Axiom map_singles : forall A B (f : A -> B) xs (vs : list A),
map f (xs ∷ vs) = xs ∷ (List.map f vs).
(** Map commutes with concatenation. *)
Axiom map_concat : forall A B (f : A -> B) (E F : gen_env A),
map f (E & F) = (map f E) & (map f F).
(** Dom is unchanged by map. *)
Axiom dom_map : forall A B (E : gen_env A) (f : A -> B),
dom (map f E) = dom E.
(** Belongs commutes with map. *)
Axiom belongs_map : forall A B x (E : gen_env A) (f : A -> B),
x ∈ E ->
x ∈ (map f E).
Axiom belongs_map_inv : forall A B x (E : gen_env A) (f : A -> B),
x ∈ (map f E) ->
x ∈ E.
(** All_belongs commutes with map. *)
Axiom all_belongs_map : forall A B xs (E : gen_env A) (f : A -> B),
xs ⊂ E ->
xs ⊂ (map f E).
Axiom all_belongs_map_inv : forall A B xs (E : gen_env A) (f : A -> B),
xs ⊂ (map f E) ->
xs ⊂ E.
(** Notin commutes with map. *)
Axiom notin_map : forall A B x (E : gen_env A) (f : A -> B),
x ∉ E ->
x ∉ (map f E).
Axiom notin_map_inv : forall A B x (E : gen_env A) (f : A -> B),
x ∉ (map f E) ->
x ∉ E.
(** All_notin commutes with map. *)
Axiom all_notin_map : forall A B xs (E : gen_env A) (f : A -> B),
xs ⊄ E ->
xs ⊄ (map f E).
Axiom all_notin_map_inv : forall A B xs (E : gen_env A) (f : A -> B),
xs ⊄ (map f E) ->
xs ⊄ E.
(** Ok commutes with map. *)
Axiom ok_map : forall A B (E : gen_env A) (f : A -> B),
ok E ->
ok (map f E).
Axiom ok_map_inv : forall A B (E : gen_env A) (f : A -> B),
ok (map f E) ->
ok E.
Lemma map_empty : forall f,
map f (@empty A) = (@empty B).
Lemma map_concat : forall f E F,
map f (E & F) = (map f E) & (map f F).
Lemma dom_map : forall E f,
dom (map f E) = dom E.
Lemma belongs_map : forall x E f,
x ∈ E ->
x ∈ (map f E).
Lemma belongs_map_inv : forall x E f,
x ∈ (map f E) ->
x ∈ E.
Lemma all_belongs_map : forall xs E f,
xs ⊂ E ->
xs ⊂ (map f E).
Lemma all_belongs_map_inv : forall xs E f,
xs ⊂ (map f E) ->
xs ⊂ E.
Lemma notin_map : forall x E f,
x ∉ E ->
x ∉ (map f E).
Lemma notin_map_inv : forall x E f,
x ∉ (map f E) ->
x ∉ E.
Lemma all_notin_map : forall xs E f,
xs ⊄ E ->
xs ⊄ (map f E).
Lemma all_notin_map_inv : forall xs E f,
xs ⊄ (map f E) ->
xs ⊄ E.
Lemma ok_map : forall E f,
ok E ->
ok (map f E).
Lemma ok_map_inv : forall E f,
ok (map f E) ->
ok E.