Local Open Scope logic.
(* Lemma da_emp_isptrornull sh t v p : da_emp sh t v p = (!!is_pointer_or_null p) &&  da_emp sh t v p.  Lemma da_emp_null sh t v p: p=nullval -> da_emp sh t v p = emp. Lemma da_emp_ptr sh t v b i: da_emp sh t v (Vptr b i) = data_at sh t v (Vptr b i). *)
unfold data_at. unfold field_at, data_at_rec, at_offset; simpl.
unfold array_pred, unfold_reptype, aggregate_pred.array_pred. entailer.
Qed.

Lemma data_at_weak_valid_ptr: forall (sh : Share.t) (t : type) (v : reptype t) (p : val),
sepalg.nonidentity sh ->