Definition assign_loc_Effect (ty:type) (b: block) (ofs: int) v : (block -> Z -> bool)  :=
  match access_mode ty with
     By_value chunk => fun b' z' => eq_block b b'
              && zle (Int.unsigned ofs) z'
              && zlt z' ((Int.unsigned ofs) + Z.of_nat (length (encode_val chunk v)))
   | By_copy => fun b' z' => eq_block b' b
              && zle (Int.unsigned ofs) z'
              && zlt z' ((Int.unsigned ofs) + (sizeof ty))
   | _ => fun b' z' => false
  end.

Lemma assign_loc_Effect_Sound: forall a m loc ofs v m' (AL: assign_loc (typeof a) m loc ofs v m'), Mem.unchanged_on (fun b z => assign_loc_Effect (typeof a) loc ofs v b z = false) m m'.