Inductive assign_locT (ce : composite_env) (ty : type) (m : mem) (b : block) (ofs : ptrofs)
: val -> mem -> list mem_event -> Prop :=
assign_locT_value : forall (v : val) (chunk : memory_chunk) (m' : mem),
access_mode ty = By_value chunk ->
Mem.storev chunk m (Vptr b ofs) v = Some m' ->
assign_locT ce ty m b ofs v m' (Write b (Ptrofs.unsigned ofs) (encode_val chunk v) ::nil)
| assign_locT_copy : forall (b' : block) (ofs' : ptrofs) (bytes : list memval) (m' : mem),
access_mode ty = By_copy ->
(@sizeof ce ty > 0 -> (alignof_blockcopy ce ty | Ptrofs.unsigned ofs')) ->
(@sizeof ce ty > 0 -> (alignof_blockcopy ce ty | Ptrofs.unsigned ofs)) ->
b' <> b \/
Ptrofs.unsigned ofs' = Ptrofs.unsigned ofs \/
Ptrofs.unsigned ofs' + @sizeof ce ty <= Ptrofs.unsigned ofs \/
Ptrofs.unsigned ofs + @sizeof ce ty <= Ptrofs.unsigned ofs' ->
Mem.loadbytes m b' (Ptrofs.unsigned ofs') (@sizeof ce ty) = Some bytes ->
Mem.storebytes m b (Ptrofs.unsigned ofs) bytes = Some m' ->
assign_locT ce ty m b ofs (Vptr b' ofs') m'
(Read b' (Ptrofs.unsigned ofs') (@sizeof ce ty) bytes ::
Write b (Ptrofs.unsigned ofs) bytes :: nil).

Lemma assign_locT_ax2 ce ty m b ofs v m' (A:assign_loc ce ty m b ofs v m'):
exists T, assign_locT ce ty m b ofs v m' T.