intros. rewrite lseg_unroll.
apply pred_ext. apply orp_left; auto.
rewrite andp_assoc.
do 2 (apply derives_extract_prop; intro).
congruence.
apply orp_right2. auto.
Qed.

Lemma lseg_nonnull (ls: listspec list_structid list_link list_token):
forall sh s v,
typed_true (tptr list_struct) v ->
lseg ls sh s v nullval = lseg_cons ls sh s v nullval.