Definition restrict_env_comp  {key: Type}{A: Type}{KE: EqDec key} (ids: list key) (rho:env key A) : env key A:=
mk_env _ (restrict_env_comp'_finite ids rho).

(* Specifications: *)
Lemma restrict_env_nil  {key: Type}{A: Type}{KE: EqDec key}:
forall ge, restrict_env nil ge = (empty_env: env key A).
Lemma restrict_env_app  {key: Type}{A: Type}{KE: EqDec key} :
forall ids1 ids2 (rho: env key A),  list_disjoint ids1 ids2 ->
join (restrict_env ids1 rho) (restrict_env ids2 rho) (restrict_env (ids1++ids2) rho).
Lemma restrict_env_comp_join {key: Type}{A: Type}{KE: EqDec key}:
forall ids (ge: env key A), join (restrict_env ids ge) (restrict_env_comp ids ge) ge.
Lemma restrict_env_rev {key: Type}{A: Type}{KE: EqDec key}:
forall ids, @restrict_env key A _ (rev ids) = restrict_env ids.