Section MINMAX_II.
Variable j12 j12' :meminj.
Variable m1' m2: mem.
Definition MINMAX_Offset (b2:block) : option (Z * Z) :=
if plt b2 (Mem.nextblock m2)
then match (zmap_finite_c _ (PMap.get b2 m2.(Mem.mem_contents)))
with (min2, max2) =>
match minmax m1' j12 b2 with
Some(min1, max1) =>
Some(Z.min min1 min2, Z.max max1 max2)
| None => Some(min2,max2)
end
end
else minmax m1' j12' b2.
Hypothesis inc12: inject_incr j12 j12'.
Hypothesis VBj12'_1: forall b1 b2 delta,
j12' b1 = Some (b2, delta) ->
Mem.valid_block m1' b1.
Hypothesis JJ: forall b1 b2 delta,
j12' b1 = Some (b2, delta) ->
Mem.valid_block m2 b2 ->
j12 b1 = Some (b2, delta).
End MINMAX_II.

(*Another variant, needed in effect_simulations_trans.*)
Lemma interpolate_II_strong: forall m1 m2 j12 (MInj12 : Mem.inject j12 m1 m2) m1'
(Fwd1: mem_forward m1 m1') j23 m3
(MInj23 : Mem.inject j23 m2 m3) m3' (Fwd3: mem_forward m3 m3')
j' (MInj13': Mem.inject j' m1' m3')
(InjIncr: inject_incr (compose_meminj j12 j23) j')
(InjSep: inject_separated (compose_meminj j12 j23) j' m1 m3)
(Unch11': Mem.unchanged_on
(loc_unmapped (compose_meminj j12 j23)) m1 m1')
(Unch33': Mem.unchanged_on
(loc_out_of_reach (compose_meminj j12 j23) m1) m3 m3'),
exists m2', exists j12', exists j23', j'=compose_meminj j12' j23' /\
(forall b1 b2 d1, j12' b1 = Some(b2,d1) ->
j12 b1 = Some(b2,d1) \/
exists b3 d, j' b1 = Some(b3,d)) /\
(forall b2 b3 d2, j23' b2 = Some(b3,d2) ->
j23 b2 = Some(b3,d2) \/
exists b1 d, j' b1 = Some(b3,d)) /\
inject_incr j12 j12' /\ inject_incr j23 j23' /\
Mem.inject j12' m1' m2' /\ mem_forward m2 m2' /\
Mem.inject j23' m2' m3' /\
Mem.unchanged_on (loc_out_of_reach j12 m1) m2 m2' /\
inject_separated j12 j12' m1 m2 /\
inject_separated j23 j23' m2 m3 /\
Mem.unchanged_on (loc_unmapped j23) m2 m2' /\
Mem.unchanged_on (loc_out_of_reach j23 m2) m3 m3'.