End LsegRecursiveMaybeLoop.
Module LsegWandFrame.
Definition lseg (sh: share) (tcontents contents: list int) (x z: val) : mpred :=
listrep sh tcontents z -* listrep sh (contents ++ tcontents) x.

Lemma list_lseg: forall sh (s1 s2: list int) (x y: val),
listrep sh s2 y * lseg sh s2 s1 x y |-- listrep sh (s1 ++ s2) x.