proposition: Lemma cti_space_not_eq: forall h i s n (Hi : 0 <= i < Zlength (spaces h)) (Hh : has_space (Znth i (spaces h)) s), (Z.of_nat n) <> i -> nth_space (cut_heap h i s Hi Hh) n = nth_space h n.
proof: Proof. intros. rewrite !nth_space_Znth. simpl. pose proof (Nat2Z.is_nonneg n). remember (Z.of_nat n). clear Heqz. remember (spaces h). destruct (Z_lt_le_dec z (Zlength l)). - assert (0 <= z < Zlength l) by lia. rewrite upd_Znth_diff; [reflexivity |assumption..]. - rewrite !Znth_overflow; [reflexivity | | rewrite upd_Znth_Zlength by assumption]; lia. Qed.
imports: Coq.ZArith.ZArith Coq.Program.Basics Coq.micromega.Lia compcert.lib.Integers compcert.common.Values VST.veric.base VST.veric.Clight_lemmas VST.veric.val_lemmas VST.veric.shares VST.msl.seplog VST.msl.shares VST.zlist.sublist VST.floyd.coqlib3 VST.floyd.functional_base VST.floyd.data_at_rec_lemmas VST.zlist.list_solver CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.graph.graph_model CertiGraph.graph.graph_gen