proposition: Lemma reset_nth_space_Znth: forall s i, i < length s -> reset_nth_space i s = upd_Znth (Z.of_nat i) s (reset_space (Znth (Z.of_nat i) s)).
proof: Proof. intros ? ?. revert s. induction i; intros; destruct s; simpl in H; try lia. - simpl. rewrite upd_Znth0_old, Znth_0_cons, sublist_1_cons, sublist_same; try reflexivity; rewrite Zlength_cons. lia. pose proof (Zlength_nonneg s0). lia. - replace (Z.of_nat (S i)) with (Z.of_nat i + 1)%Z by (zify; lia). rewrite Znth_pos_cons by lia. replace (Z.of_nat i + 1 - 1)%Z with (Z.of_nat i) by lia. simpl. rewrite upd_Znth_pos_cons. + replace (Z.of_nat i + 1 - 1)%Z with (Z.of_nat i) by lia. rewrite <- IHi; [reflexivity | lia]. + rewrite Zlength_correct. 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