(** Composing two memory injections. *)

(* Specifications: *)
Lemma mem_inj_compose:
forall f f' m1 m2 m3,
mem_inj f m1 m2 -> mem_inj f' m2 m3 -> mem_inj (compose_meminj f f') m1 m3.
Theorem inject_compose:
forall f f' m1 m2 m3,
inject f m1 m2 -> inject f' m2 m3 ->
inject (compose_meminj f f') m1 m3.
Lemma val_lessdef_inject_compose:
forall f v1 v2 v3,
Val.lessdef v1 v2 -> Val.inject f v2 v3 -> Val.inject f v1 v3.
Lemma val_inject_lessdef_compose:
forall f v1 v2 v3,
Val.inject f v1 v2 -> Val.lessdef v2 v3 -> Val.inject f v1 v3.
Lemma extends_inject_compose:
forall f m1 m2 m3,
extends m1 m2 -> inject f m2 m3 -> inject f m1 m3.
Lemma inject_extends_compose:
forall f m1 m2 m3,
inject f m1 m2 -> extends m2 m3 -> inject f m1 m3.
Lemma extends_extends_compose:
forall m1 m2 m3,
extends m1 m2 -> extends m2 m3 -> extends m1 m3.
Lemma mem_inj_compose:
forall f f' m1 m2 m3,
mem_inj f m1 m2 -> mem_inj f' m2 m3 -> mem_inj (compose_meminj f f') m1 m3.
Theorem inject_compose:
forall f f' m1 m2 m3,
inject f m1 m2 -> inject f' m2 m3 ->
inject (compose_meminj f f') m1 m3.
Lemma val_lessdef_inject_compose:
forall f v1 v2 v3,
Val.lessdef v1 v2 -> Val.inject f v2 v3 -> Val.inject f v1 v3.
Lemma val_inject_lessdef_compose:
forall f v1 v2 v3,
Val.inject f v1 v2 -> Val.lessdef v2 v3 -> Val.inject f v1 v3.
Lemma extends_inject_compose:
forall f m1 m2 m3,
extends m1 m2 -> inject f m2 m3 -> inject f m1 m3.
Lemma inject_extends_compose:
forall f m1 m2 m3,
inject f m1 m2 -> extends m2 m3 -> inject f m1 m3.
Lemma extends_extends_compose:
forall m1 m2 m3,
extends m1 m2 -> extends m2 m3 -> extends m1 m3.