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

Lemma list_cell_valid_pointer:
forall (LS: listspec list_structid list_link list_token) (dsh psh: Share.t) v p,
sepalg.nonidentity dsh ->
sepalg.join_sub dsh psh ->
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)) ->
list_cell LS dsh v p * field_at_ psh list_struct (StructField list_link::nil) p
|-- valid_pointer p.