End EVENTVAL_INV.
(** Compatibility with memory injections *)
Section EVENTVAL_INJECT.
Variable f: block -> option (block * Z).
Variable ge1 ge2: Senv.t.
Definition symbols_inject : Prop :=
(forall id, Senv.public_symbol ge2 id = Senv.public_symbol ge1 id)
/\ (forall id b1 b2 delta,
f b1 = Some(b2, delta) -> Senv.find_symbol ge1 id = Some b1 ->
delta = 0 /\ Senv.find_symbol ge2 id = Some b2)
/\ (forall id b1,
Senv.public_symbol ge1 id = true -> Senv.find_symbol ge1 id = Some b1 ->
exists b2, f b1 = Some(b2, 0) /\ Senv.find_symbol ge2 id = Some b2)
/\ (forall b1 b2 delta,
f b1 = Some(b2, delta) ->
Senv.block_is_volatile ge2 b2 = Senv.block_is_volatile ge1 b1).
Hypothesis symb_inj: symbols_inject.

(* Specifications: *)
Lemma eventval_match_inject:
forall ev ty v1 v2,
eventval_match ge1 ev ty v1 -> Val.inject f v1 v2 -> eventval_match ge2 ev ty v2.
Lemma eventval_match_inject_2:
forall ev ty v1,
eventval_match ge1 ev ty v1 ->
exists v2, eventval_match ge2 ev ty v2 /\ Val.inject f v1 v2.
Lemma eventval_list_match_inject:
forall evl tyl vl1, eventval_list_match ge1 evl tyl vl1 ->
forall vl2, Val.inject_list f vl1 vl2 -> eventval_list_match ge2 evl tyl vl2.