proposition: Lemma data_at_tarray_split_1: forall sh p (tt: type) (v: reptype tt) (l: list (reptype tt)), complete_legal_cosu_type tt = true -> data_at sh (tarray tt (Zlength l + 1)) (v :: l) p = data_at sh tt v p * data_at sh (tarray tt (Zlength l)) l (offset_val (sizeof tt) p).
proof: Proof. intros. rewrite (data_at_tarray_split sh (Zlength l + 1) 1 p tt (v :: l) (v :: l) [v] l). - replace (sizeof tt * 1)%Z with (sizeof tt) by lia. replace (Zlength l + 1 - 1) with (Zlength l) by lia. f_equal. rewrite (data_at_singleton_array_eq _ tt v); reflexivity. - rep_lia. - rewrite Zlength_cons. lia. - autorewrite with sublist; reflexivity. - simpl. vm_compute. reflexivity. - simpl. rewrite sublist_1_cons. replace (Zlength l + 1 - 1) with (Zlength l) by lia. autorewrite with sublist. reflexivity. - assumption. Qed.
imports: VST.veric.compcert_rmaps VST.msl.shares VST.msl.wand_frame VST.concurrency.conclib CertiGraph.lib.List_ext CertiGraph.msl_ext.log_normalize CertiGraph.msl_ext.ramification_lemmas CertiGraph.graph.graph_model CertiGraph.CertiGC.GCGraph CertiGraph.CertiGC.env_graph_gc CertiGraph.msl_ext.iter_sepcon Coq.Lists.List