(*Definition empstack : stack := empty_env. Axiom emp_stack : forall (x : option var), stack_get empstack x = empty_val.*)
Definition stk (st : state) := match st with State s h => s end.
Definition hp  (st : state) := match st with State s h => h end.
Instance Join_state : Join state :=
fun (s1 s2 s3 : state) =>
join (stk s1) (stk s2) (stk s3) /\ join (hp s1) (hp s2) (hp s3).
Definition state_bij: bijection (heap * stack) state.

Lemma var_nil_or_loc : forall (z : var) (e : env), nil_or_loc (env_get e z).
Notation stack := env.