Definition var := Ident.t.Definition env := var -> nat.Definition env_get (rho: env) : var -> val := fun x => Some (rho x).Definition env_set (x: var) (v: val) (rho: env) : env :=
  match v with
  | None (*empty_val*) => rho
  | Some v' => fun y => if Ident.eq_dec x y then v' else rho y
  end.

(* Specifications: *)
Lemma gss_env (x: var) (v: val) (s: env) : v<>empty_val -> env_get (env_set x v s) x = v.
Lemma gso_env (x y : var) (v: val) (s: env) : x<>y -> env_get (env_set x v s) y = env_get s y.
Lemma env_reset s x : env_set x (env_get s x) s = s.
Lemma env_reset2 s x z : env_set x (env_get s x) (env_set x z s) = s.