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 dsh psh s v,
typed_true (tptr list_struct) v ->
lseg ls dsh psh s v nullval = lseg_cons ls dsh psh s v nullval.