Definition lseg_cell (ls: listspec list_structid list_link list_token)
(sh : share)
(v: elemtype ls) (x y: val) :=
!!is_pointer_or_null y && list_token sh x * list_cell ls sh v x * field_at sh list_struct (StructField list_link :: nil) (valinject (nested_field_type list_struct (StructField list_link :: nil)) y) x.

Lemma lseg_valid_pointer:
forall (ls : listspec list_structid list_link list_token) sh contents p q R,
sepalg.nonidentity sh ->
field_offset cenv_cs list_link list_fields + sizeof (field_type list_link list_fields)
= field_offset_next cenv_cs list_link list_fields  (co_sizeof (get_co list_structid)) ->
R |-- valid_pointer q ->
R * lseg ls sh contents p q |-- valid_pointer p.