proposition: Lemma Znth_frames2rootpairs_update_frames: forall fr z roots, Zlength roots = Zlength (frames2rootpairs fr) -> 0 <= z < Zlength roots -> Znth z (frames2rootpairs (update_frames fr roots)) = {| rp_adr := rp_adr (Znth z (frames2rootpairs fr)); rp_val := Znth z roots|}.
proof: Proof. induction fr as [ | [ a r s ] fr']; simpl; intros; autorewrite with sublist in *. - list_solve. - destruct (zlt z (Zlength s)). + rewrite !Znth_app1 by (autorewrite with sublist; simpl in *; list_solve). rewrite !Znth_frame2rootpairs by (simpl in *; list_solve). simpl. f_equal. list_solve. + rewrite !Znth_app2 by (autorewrite with sublist; simpl in *; list_solve). autorewrite with sublist. simpl. autorewrite with sublist. simpl in H. rewrite IHfr'; try list_solve. 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