proposition: Lemma make_fields_the_same: forall (g1 g2: LGraph) v, (forall e, dst g1 e = dst g2 e) -> (forall v, g1.(vlabel) v = g2.(vlabel) v) -> map start_address g1.(glabel).(g_gen) = map start_address g2.(glabel).(g_gen) -> make_fields_vals g1 v = make_fields_vals g2 v.
proof: Proof. intros. unfold make_fields_vals, make_fields. remember O. clear Heqn. rewrite H0. remember (raw_fields (vlabel g2 v)) as l. clear Heql. cut (forall fl, map (field2val (raw_tag (vlabel g2 v)) g1) fl = map (field2val (raw_tag (vlabel g2 v)) g2) fl). - intros. rewrite H2. rewrite (vertex_address_the_same g1 g2) by assumption. reflexivity. - apply map_ext. intros. unfold field2val. destruct a. 1: reflexivity. rewrite H. apply vertex_address_the_same; 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