Section MATCH_STACKS.
Variable F: meminj.
Variables m m': mem.
Variable F1: meminj.
Variables m1 m1': mem.
Hypothesis INCR: inject_incr F F1.

Lemma match_stacks_invariant:
forall stk stk' bound, match_stacks F m m' stk stk' bound ->
forall (INJ: forall b1 b2 delta,
F1 b1 = Some(b2, delta) -> Plt b2 bound -> F b1 = Some(b2, delta))
(PERM1: forall b1 b2 delta ofs,
F1 b1 = Some(b2, delta) -> Plt b2 bound ->
Mem.perm m1 b1 ofs Max Nonempty -> Mem.perm m b1 ofs Max Nonempty)
(PERM2: forall b ofs, Plt b bound ->
Mem.perm m' b ofs Cur Freeable -> Mem.perm m1' b ofs Cur Freeable)
(PERM3: forall b ofs k p, Plt b bound ->
Mem.perm m1' b ofs k p -> Mem.perm m' b ofs k p),
match_stacks F1 m1 m1' stk stk' bound
with match_stacks_inside_invariant:
forall stk stk' f' ctx sp' rs1,
match_stacks_inside F m m' stk stk' f' ctx sp' rs1 ->
forall rs2
(RS: forall r, Plt r ctx.(dreg) -> rs2#r = rs1#r)
(INJ: forall b1 b2 delta,
F1 b1 = Some(b2, delta) -> Ple b2 sp' -> F b1 = Some(b2, delta))
(PERM1: forall b1 b2 delta ofs,
F1 b1 = Some(b2, delta) -> Ple b2 sp' ->
Mem.perm m1 b1 ofs Max Nonempty -> Mem.perm m b1 ofs Max Nonempty)
(PERM2: forall b ofs, Ple b sp' ->
Mem.perm m' b ofs Cur Freeable -> Mem.perm m1' b ofs Cur Freeable)
(PERM3: forall b ofs k p, Ple b sp' ->
Mem.perm m1' b ofs k p -> Mem.perm m' b ofs k p),
match_stacks_inside F1 m1 m1' stk stk' f' ctx sp' rs2.