Ltac do_fresh1 :=
repeat match goal with H: Ile _ _ |- _ => revert H
| H: Ident.lt _ _ |- _ => revert H
| H: fresh _ _ _ |- _ => revert H end;
clear;
unfold fresh; simpl;
repeat ((rewrite freshmax_list_app || rewrite freshmax_list_rev
|| rewrite varmax_minid || rewrite varmax_minid'); simpl).
Ltac do_fresh :=
do_fresh1; intros;
repeat match goal with
|  H: Ident.lt (var_max _ _) _ |- _ => apply var_max_split in H; destruct H
end;
repeat apply var_max_intro; auto;
try solve [etransitivity; eauto].
Definition set_in_state nextv z s := State (env_set nextv z (stk s)) (hp s).

Axiom list_denote_space_agree:
forall pos s nextv z,
fresh (freshmax_list freshmax_space_atom) pos nextv ->
list_denote space_atom_denote (@sepcon _ _) emp pos s ->
list_denote space_atom_denote (@sepcon _ _) emp pos (set_in_state nextv z s).