proposition: Lemma list_append: forall {sh: share} {ls : listspec list_structid list_link list_token} (hd mid tl:val) ct1 ct2 P, (forall x tl', lseg_cell ls sh x tl tl' * P tl |-- FF) -> (lseg ls sh ct1 hd mid) * lseg ls sh ct2 mid tl * P tl|-- (lseg ls sh (ct1 ++ ct2) hd tl) * P tl.
proof: Proof. intros. unfold lseg. normalize. eapply derives_trans. apply LsegGeneral.list_append. intros. eapply derives_trans; [ | apply (H x0 tl')]. unfold lseg_cell, LsegGeneral.lseg_cell. entailer. apply exp_right with (x++al). rewrite prop_true_andp; auto. rewrite map_app; reflexivity. Qed.
imports: VST.floyd.base2 VST.floyd.client_lemmas VST.floyd.closed_lemmas VST.floyd.nested_pred_lemmas VST.floyd.nested_field_lemmas VST.floyd.efield_lemmas VST.floyd.mapsto_memory_block VST.floyd.reptype_lemmas VST.floyd.data_at_rec_lemmas VST.floyd.field_at VST.floyd.nested_loadstore VST.floyd.entailer