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 lbseg_lbseg: forall sh (s1 s2: list int) (x y z: val),
lbseg sh s2 y z * lbseg sh s1 x y |-- lbseg sh (s1 ++ s2) x z.