(** Valid values are the ones that have no pointers outside the domain of f*)
  Definition valid_val (f: memren) (v : val) : Prop :=
    match v with
    | Vptr b _ =>
      exists b', f b = Some b'
    | _ => True
    end.Definition valid_memval (f: memren) (mv : memval) : Prop :=
    match mv with
    | Fragment v _ _ =>
      valid_val f v
    | _ => True
    end.

Lemma store_wd_domain: forall (m m' : mem) (chunk : memory_chunk) (v : val) b ofs f (Hdomain: domain_memren f m) (Hstore: Mem.store chunk m b ofs v = Some m') (Hval_wd: mem_wd.val_valid v m) (Hmem_wd: valid_mem m), valid_mem m' /\ domain_memren f m'.