Ltac geninv x :=
  let H := fresh in (generalize x; intro H; inv H).

Lemma match_env_restrict_invariant: forall f1 cenv e sp lo hi f2 (WD1: SM_wd f1) (WD2: SM_wd f2) (ME: match_env (restrict (as_inj f1) (vis f1)) cenv e sp lo hi) (INT: intern_incr f1 f2) (HA: forall b delta, as_inj f2 b = Some(sp, delta) -> as_inj f1 b = Some(sp, delta)) (HB: forall b, Plt b lo -> (as_inj f2) b = (as_inj f1) b), match_env (restrict (as_inj f2) (vis f2)) cenv e sp lo hi.