proposition: Lemma lgd_mfv_change_in_one_spot: forall g v e v' n, 0 <= n < Zlength (make_fields g v) -> raw_mark (vlabel g v) = false -> Znth n (make_fields g v) = inr e -> upd_Znth n (make_fields_vals g v) (vertex_address g v') = (make_fields_vals (labeledgraph_gen_dst g e v') v).
proof: Proof. intros. rewrite (Znth_list_eq (upd_Znth n (make_fields_vals g v) (vertex_address g v')) (make_fields_vals (labeledgraph_gen_dst g e v') v)). rewrite upd_Znth_Zlength, fields_eq_length. 2: rewrite fields_eq_length; rewrite make_fields_eq_length in H; assumption. split. 1: rewrite fields_eq_length; reflexivity. intros. unfold make_fields_vals. replace (raw_mark (vlabel (labeledgraph_gen_dst g e v') v)) with (raw_mark (vlabel g v)) by reflexivity. rewrite H0; rewrite <- make_fields_eq_length in H2. apply lgd_f2v_eq_after_update; assumption. 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