Inductive local2list:
  list (environ -> Prop) -> list (ident * val) -> list (ident * (type * val)) -> list (environ -> Prop) -> Prop :=
  | local2list_nil:
      local2list nil (nil) (nil) nil
  | local2list_temp_var: forall v i Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_id i) :: Q) (cons (i, v) T1) T2 Q'
  | local2list_gl_var: forall v i t Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_var i t) :: Q) T1 (cons (i, (t, v)) T2) Q'
  | local2list_unknown: forall Q0 Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (Q0 :: Q) T1 T2 (Q0 :: Q').Inductive local2list:
  list (environ -> Prop) -> list (ident * val) -> list (ident * (type * val)) -> list (environ -> Prop) -> Prop :=
  | local2list_nil:
      local2list nil (nil) (nil) nil
  | local2list_temp_var: forall v i Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_id i) :: Q) (cons (i, v) T1) T2 Q'
  | local2list_gl_var: forall v i t Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_var i t) :: Q) T1 (cons (i, (t, v)) T2) Q'
  | local2list_unknown: forall Q0 Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (Q0 :: Q) T1 T2 (Q0 :: Q').Inductive local2list:
  list (environ -> Prop) -> list (ident * val) -> list (ident * (type * val)) -> list (environ -> Prop) -> Prop :=
  | local2list_nil:
      local2list nil (nil) (nil) nil
  | local2list_temp_var: forall v i Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_id i) :: Q) (cons (i, v) T1) T2 Q'
  | local2list_gl_var: forall v i t Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_var i t) :: Q) T1 (cons (i, (t, v)) T2) Q'
  | local2list_unknown: forall Q0 Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (Q0 :: Q) T1 T2 (Q0 :: Q').Inductive local2list:
  list (environ -> Prop) -> list (ident * val) -> list (ident * (type * val)) -> list (environ -> Prop) -> Prop :=
  | local2list_nil:
      local2list nil (nil) (nil) nil
  | local2list_temp_var: forall v i Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_id i) :: Q) (cons (i, v) T1) T2 Q'
  | local2list_gl_var: forall v i t Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_var i t) :: Q) T1 (cons (i, (t, v)) T2) Q'
  | local2list_unknown: forall Q0 Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (Q0 :: Q) T1 T2 (Q0 :: Q').Inductive local2list:
  list (environ -> Prop) -> list (ident * val) -> list (ident * (type * val)) -> list (environ -> Prop) -> Prop :=
  | local2list_nil:
      local2list nil (nil) (nil) nil
  | local2list_temp_var: forall v i Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_id i) :: Q) (cons (i, v) T1) T2 Q'
  | local2list_gl_var: forall v i t Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (`(eq v) (eval_var i t) :: Q) T1 (cons (i, (t, v)) T2) Q'
  | local2list_unknown: forall Q0 Q T1 T2 Q',
      local2list Q T1 T2 Q'->
      local2list (Q0 :: Q) T1 T2 (Q0 :: Q').Goal False.Goal False.Definition localtempD (p : (ident * val)) := let (i, v) := p in `(eq v) (eval_id i).Definition localvarD (p : ident * (type * val))  := let (i, tv) := p in `(eq (snd tv)) (eval_var i (fst tv)).Definition LocallistD (T1: list (ident * val)) (T2: list (ident * (type * val))) (Q: list (environ -> Prop)) :=
  map localtempD T1 ++ map localvarD T2 ++ Q.

(* Specifications: *)
Lemma PTree_elements_set: forall {A} i (v: A) elm T, In elm (PTree.elements (PTree.set i v T)) -> elm = (i, v) \/ In elm (PTree.elements T).
Lemma local2list_soundness: forall P Q R T1 T2 Q', local2list Q T1 T2 Q' -> PROPx P (LOCALx Q (SEPx R)) = PROPx P (LOCALx (LocallistD T1 T2 Q') (SEPx R)).