proposition: Lemma Znth_frame2rootpairs' : forall z r s, 0 <= z < Zlength s -> Znth z (frame2rootpairs' r 0 s) = {| rp_adr := offset_val (z * WORD_SIZE) r; rp_val := Znth z s|}.
proof: Proof. intros. rewrite <- (Z.add_0_l z) at 2. set (i:=0). clearbody i. revert i z H; induction s; simpl; intros. list_solve. destruct (zeq z 0). list_solve. rewrite Znth_pos_cons by lia. specialize (IHs (i+1) (z-1) ltac:(list_solve)). unfold Z.succ. rewrite IHs. f_equal. f_equal. lia. 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