(** Properties of [cenv_for]. *)
Definition cenv_for_gen (atk: VSet.t) (vars: list (ident * type)) : compilenv :=
List.fold_right (add_local_variable atk) VSet.empty vars.
Remark add_local_variable_charact:
forall id ty atk cenv id1,
VSet.In id1 (add_local_variable atk (id, ty) cenv) <->
VSet.In id1 cenv \/ exists chunk, access_mode ty = By_value chunk /\ id = id1 /\ VSet.mem id atk = false.

Lemma cenv_for_gen_compat:
forall atk id vars,
VSet.In id (cenv_for_gen atk vars) -> VSet.mem id atk = false.