Ltac go_lower0 :=
intros ?rho;
try (simple apply grab_tc_environ; intro);
repeat (progress unfold_for_go_lower; simpl).
Ltac old_go_lower :=
go_lower0;
autorewrite with go_lower;
try findvars;
simpl;
autorewrite with go_lower;
try match goal with H: tc_environ _ ?rho |- _ => clear H rho end.
Hint Rewrite eval_id_same : go_lower.
Hint Rewrite eval_id_other using solve [clear; intro Hx; inversion Hx] : go_lower.
(*Hint Rewrite Vint_inj' : go_lower.*)
(*** New go_lower stuff ****)

(* Specifications: *)
Lemma lower_one_temp:
forall t rho Delta P i v Q R S,
(temp_types Delta) ! i = Some t ->
(tc_val t v -> eval_id i rho = v ->
(local (tc_environ Delta) && PROPx P (LOCALx Q (SEPx R))) rho |-- S) ->
(local (tc_environ Delta) && PROPx P (LOCALx (temp i v :: Q) (SEPx R))) rho |-- S.
Lemma lower_one_temp_Vint:
forall t rho Delta P i v Q R S,
(temp_types Delta) ! i = Some t ->
(tc_val t (Vint v) -> eval_id i rho = Vint v ->
(local (tc_environ Delta) && PROPx P (LOCALx Q (SEPx R))) rho |-- S) ->
(local (tc_environ Delta) && PROPx P (LOCALx (temp i (Vint v) :: Q) (SEPx R))) rho |-- S.
Lemma lower_one_lvar:
forall t rho Delta P i v Q R S,
(headptr v -> lvar_denote i t v rho ->
(local (tc_environ Delta) && PROPx P (LOCALx Q (SEPx R))) rho |-- S) ->
(local (tc_environ Delta) && PROPx P (LOCALx (lvar i t v :: Q) (SEPx R))) rho |-- S.
Lemma finish_compute_le:  Lt = Gt -> False.
Lemma lower_one_gvars:
forall  rho Delta P gv Q R S,
((forall i t, (glob_types Delta) ! i = Some t -> headptr (gv i)) -> gvars_denote gv rho ->
(local (tc_environ Delta) && PROPx P (LOCALx Q (SEPx R))) rho |-- S) ->
(local (tc_environ Delta) && PROPx P (LOCALx (gvars gv :: Q) (SEPx R))) rho |-- S.
Lemma finish_lower:
forall rho (D: environ -> Prop) R S,
(D rho -> fold_right_sepcon R |-- S) ->
(local D && PROP() LOCAL() (SEPx R)) rho |-- S.
Lemma lower_one_temp_Vint':
forall sz sg rho Delta P i v Q R S,
(temp_types Delta) ! i = Some (Tint sz sg noattr) ->
((exists j, v = Vint j /\ tc_val (Tint sz sg noattr) (Vint j) /\ eval_id i rho = (Vint j)) ->
(local (tc_environ Delta) && PROPx P (LOCALx Q (SEPx R))) rho |-- S) ->
(local (tc_environ Delta) && PROPx P (LOCALx (temp i v :: Q) (SEPx R))) rho |-- S.