(*************************************************************************** * Generic Environments implemented as lists                                * *                                                                          * * Emmanuel Polonowski, April 2011, Coq v8.3                                * *                                                                          * * (Inspired by the work of A. Chargueraud :                                * *  http://www.chargueraud.org/softs/ln/index.php)                          * ***************************************************************************)
Require List Bool.
Set Implicit Arguments.
(* ********************************************************************** *)
(** * Module of an implementation of environments with lists              *)
Module CoreGenericEnvListDef (VarType : UsualDecidableType).
Definition TVar := VarType.t.
(* ---------------------------------------------------------------------- *)
(** ** Definitions *)
Definition gen_env A := list (TVar * A).
Section CoreDefinitions.
Variable A B : Type.
Implicit Types x y : TVar.
Implicit Types xs ys : list TVar.
Implicit Types v w : A.
Implicit Types vs ws : list A.
Implicit Types E F G : gen_env A.
Implicit Types f g : A -> B.
Definition eq_keys_dec := VarType.eq_dec.
(** Preliminary properties of eq_keys_dec. *)

(* Specifications: *)
Lemma eq_keys_true : forall A x (a b : A),
(if eq_keys_dec x x then a else b) = a.