(** Properties of the compilation environment produced by [build_compilenv] *)
Remark block_alignment_pos:
forall sz, block_alignment sz > 0.
Remark assign_variable_incr:
forall id sz cenv stksz cenv' stksz',
assign_variable (cenv, stksz) (id, sz) = (cenv', stksz') -> stksz <= stksz'.
Remark assign_variables_incr:
forall vars cenv sz cenv' sz',
assign_variables (cenv, sz) vars = (cenv', sz') -> sz <= sz'.
Remark inj_offset_aligned_block:
forall stacksize sz,
Mem.inj_offset_aligned (align stacksize (block_alignment sz)) sz.
Remark inj_offset_aligned_block':
forall stacksize sz,
Mem.inj_offset_aligned (align stacksize (block_alignment sz)) (Z.max 0 sz).

(* Specifications: *)
Lemma assign_variable_sound:
forall cenv1 sz1 id sz cenv2 sz2 vars,
assign_variable (cenv1, sz1) (id, sz) = (cenv2, sz2) ->
~In id (map fst vars) ->
0 <= sz1 ->
cenv_compat cenv1 vars sz1 ->
cenv_separated cenv1 vars ->
cenv_compat cenv2 (vars ++ (id, sz) :: nil) sz2
/\ cenv_separated cenv2 (vars ++ (id, sz) :: nil).
Lemma assign_variables_sound:
forall vars' cenv1 sz1 cenv2 sz2 vars,
assign_variables (cenv1, sz1) vars' = (cenv2, sz2) ->
list_norepet (map fst vars' ++ map fst vars) ->
0 <= sz1 ->
cenv_compat cenv1 vars sz1 ->
cenv_separated cenv1 vars ->
cenv_compat cenv2 (vars ++ vars') sz2 /\ cenv_separated cenv2 (vars ++ vars').