(*Definition empstack : stack := empty_env.

Lemma emp_stack : forall (x : option var), stack_get empstack x = empty_val.
Proof. unfold stack_get; intros. destruct x; auto. apply env_gempty. Qed.*)

Inductive state := State: forall (s: stack) (h: heap), state.(*Definition empstack : stack := empty_env.

Lemma emp_stack : forall (x : option var), stack_get empstack x = empty_val.
Proof. unfold stack_get; intros. destruct x; auto. apply env_gempty. Qed.*)

Inductive state := State: forall (s: stack) (h: heap), state.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.

(* Specifications: *)
Lemma join_state_eq: Join_state = Join_bij _ _ _ state_bij.