(* ---------------------------------------------------------------------- *)
(** **** Properties of get *)

(* Specifications: *)
(** Get is None on empty. *)
Axiom get_empty : forall A x,
get x (@empty A) = None.
(** Get is Some when it binds. *)
Axiom get_single_eq : forall A x y (v : A),
x = y ->
get x (y ∶ v) = Some v.
Axiom get_single_eq_inv : forall A x y (v w : A),
get x (y ∶ w) = Some v ->
x = y /\ v = w.
(** Get is decidable. *)
Axiom get_dec : forall A x (E : gen_env A),
{ v : A | get x E = Some v } + { get x E = None }.
(** Get and concatenation. *)
Axiom get_concat_r : forall A x y (v : A) (E : gen_env A),
x = y ->
get x (E & (y ∶ v)) = Some v.
Axiom get_concat_l : forall A x y (v : A) (E : gen_env A),
x <> y ->
get x (E & (y ∶ v)) = get x E.
Axiom get_concat_inv : forall A x y (v w : A) (E : gen_env A),
get x (E & (y ∶ v)) = Some w ->
(x = y /\ v = w) \/ (x <> y /\ get x E = Some w).
Lemma get_empty : forall x,
get x (@empty A) = None.
Lemma get_dec : forall x E,
{ v : A | get x E = Some v } + { get x E = None }.
Lemma get_concat_r : forall x y v E,
x = y ->
get x (E & (y ∶ v)) = Some v.
Lemma get_concat_l : forall x y v E,
x <> y ->
get x (E & (y ∶ v)) = get x E.
Lemma get_concat_inv : forall x y v w E,
get x (E & (y ∶ v)) = Some w ->
(x = y /\ v = w) \/ (x <> y /\ get x E = Some w).