proposition: Lemma rmm_eq_upd_bunch: forall z (roots: roots_t) k v l, Znth z roots = inr k -> In (k, v) l -> 0 <= z < Zlength roots -> NoDup (map fst l) -> restricted_roots_map z roots l = upd_Znth z roots (inr v).
proof: Proof. intros. apply Znth_list_eq. split. - rewrite restricted_roots_map_Zlength. list_solve. - intros. rewrite restricted_roots_map_Zlength in H3; auto. destruct (Z.eq_dec j z). + subst. rewrite restricted_roots_map_Znth_same; auto. rewrite upd_Znth_same; auto. rewrite H. simpl. now rewrite (list_map_In _ _ v). + rewrite restricted_roots_map_Znth_diff by auto. list_solve. Qed.
imports: Coq.ZArith.ZArith Coq.Program.Basics 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 CertiGraph.lib.Coqlib CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.graph.graph_model CertiGraph.graph.graph_gen CertiGraph.graph.path_lemmas CertiGraph.graph.subgraph2 CertiGraph.graph.graph_relation CertiGraph.graph.graph_isomorphism CertiGraph.graph.reachable_ind CertiGraph.CertiGC.GCGraph