End ListLib.
Definition listboxrep (sh: share) (contents: list int) (x: val) : mpred :=
EX y: val, data_at sh (tptr t_struct_list) y x * listrep sh contents y.
Module LBsegWandQFrame.
Definition lbseg (sh: share) (contents: list int) (x z: val) : mpred :=
ALL tcontents: list int, listboxrep sh tcontents z -* listboxrep sh (contents ++ tcontents) x.

Lemma singleton_lbseg: forall sh (a: int) (x y: val),
data_at sh (tptr t_struct_list) y x *
field_at sh t_struct_list [StructField _head] (Vint a) y |--
lbseg sh [a] x (field_address t_struct_list [StructField _tail] y).