Definition msubst_extract_local (Delta: tycontext) (T1: PTree.t val) (T2: PTree.t (type * val)) (GV: option globals) (x: localdef): Prop :=
match x with
| temp i u =>
match T1 ! i with
| Some v => u = v
| None => False
end
| lvar i ti u =>
match T2 ! i with
| Some (tj, v) =>
if eqb_type ti tj
then u = v
else False
| _ => False
end
| gvars gv =>
match GV with
| Some gv0 => gv0 = gv
| _ => False
end
end.
Definition msubst_extract_locals (Delta: tycontext) (T1: PTree.t val) (T2: PTree.t (type * val)) (GV: option globals) := VST_floyd_map (msubst_extract_local Delta T1 T2 GV).

Lemma go_lower_localdef_one_step_canon_canon {cs: compspecs} : forall Delta Ppre Qpre Rpre Ppost l Qpost Rpost T1 T2 GV,
local2ptree Qpre = (T1, T2, nil, GV) ->
local (tc_environ Delta) && PROPx Ppre (LOCALx Qpre (SEPx Rpre)) && PROPx (Ppost ++ msubst_extract_local Delta T1 T2 GV l :: nil) (LOCALx Qpost (SEPx Rpost)) |-- PROPx Ppost (LOCALx (l :: Qpost) (SEPx Rpost)).