Definition composite_env_legal_fieldlist env :=
forall (id : positive) (co : composite),
env ! id = Some co -> composite_legal_fieldlist co.
Class compspecs := mkcompspecs {
cenv_cs : composite_env;
cenv_consistent: composite_env_consistent cenv_cs;
cenv_legal_fieldlist: composite_env_legal_fieldlist cenv_cs;
cenv_legal_su: composite_env_complete_legal_cosu_type cenv_cs;
ha_env_cs: PTree.t Z;
ha_env_cs_consistent: hardware_alignof_env_consistent cenv_cs ha_env_cs;
ha_env_cs_complete: hardware_alignof_env_complete cenv_cs ha_env_cs;
la_env_cs: PTree.t legal_alignas_obs;
la_env_cs_consistent: legal_alignas_env_consistent cenv_cs ha_env_cs la_env_cs;
la_env_cs_complete: legal_alignas_env_complete cenv_cs la_env_cs;
la_env_cs_sound: legal_alignas_env_sound cenv_cs ha_env_cs la_env_cs
}.
Existing Class composite_env.
Existing Instance cenv_cs.
Arguments sizeof {env} !t / .
Arguments alignof {env} !t / .
Arguments sizeof_pos {env} t _.
Arguments alignof_pos {env} t.
Arguments complete_legal_cosu_type {cenv} !t / .
(* TODO: handle other part of compspecs like this. *)
Goal forall {cs: compspecs} t, sizeof t >= 0.
Hint Rewrite eval_id_same : normalize.

(* Specifications: *)
Lemma eval_id_other: forall rho id id' v,
id<>id' -> eval_id id' (env_set rho id v) = eval_id id' rho.