(** Invariance properties for [match_callstack]. *)

(* Specifications: *)
Lemma match_callstack_invariant:
forall f1 m1 tm1 f2 m2 tm2 cs bound tbound,
match_callstack f1 m1 tm1 cs bound tbound ->
inject_incr f1 f2 ->
(forall b ofs p, Plt b bound -> Mem.perm m2 b ofs Max p -> Mem.perm m1 b ofs Max p) ->
(forall sp ofs, Plt sp tbound -> Mem.perm tm1 sp ofs Cur Freeable -> Mem.perm tm2 sp ofs Cur Freeable) ->
(forall b, Plt b bound -> f2 b = f1 b) ->
(forall b b' delta, f2 b = Some(b', delta) -> Plt b' tbound -> f1 b = Some(b', delta)) ->
match_callstack f2 m2 tm2 cs bound tbound.
Lemma match_callstack_incr_bound:
forall f m tm cs bound tbound bound' tbound',
match_callstack f m tm cs bound tbound ->
Ple bound bound' -> Ple tbound tbound' ->
match_callstack f m tm cs bound' tbound'.