Section LISTS.
Variable V: Type.
Variable list_cell: V -> val -> val -> mpred.
Fixpoint list_rep (l: list V) (x: val) : mpred :=
match l with
| h::hs =>
EX y:val, list_cell h y x * list_rep hs y
| nil =>
!! (x = nullval) && emp
end.

Lemma list_rep_local_facts:
(forall v q p, list_cell v q p |-- !! (isptr p)) ->
forall l p, list_rep l p |-- !! (is_pointer_or_null p  /\ (p=nullval <-> l=nil)).