Definition compat_pointer_chunks (chunk1 chunk2: memory_chunk) : Prop :=
  match chunk1, chunk2 with
  | (Mint32 | Many32), (Mint32 | Many32) => True
  | (Mint64 | Many64), (Mint64 | Many64) => True
  | _, _ => False
  end.

Lemma range_perm_inj: forall f m1 m2 b1 lo hi k p b2 delta, mem_inj f m1 m2 -> range_perm m1 b1 lo hi k p -> f b1 = Some(b2, delta) -> range_perm m2 b2 (lo + delta) (hi + delta) k p.