proposition: Lemma fl_edge_roots_graph_compatible: forall depth from to l g g' v roots, vgeneration v <> from -> graph_has_gen g to -> graph_has_v g v -> raw_mark (vlabel g v) = false -> forall (Htag: raw_tag (vlabel g v) < NO_SCAN_TAG), forward_loop from to depth (map (fun x : nat => inr (v, Z.of_nat x)) l) g g' -> (forall i, In i l -> i < length (raw_fields (vlabel g v)))%nat -> roots_graph_compatible roots g -> roots_graph_compatible roots g'.
proof: Proof. do 4 intro. induction l; intros; simpl in H3; inversion H3; subst. 1: assumption. cut (roots_graph_compatible roots g2). - intros. apply (IHl g2 _ v); try assumption. + rewrite <- fr_graph_has_gen; eauto. + eapply fr_graph_has_v; eauto. + rewrite <- H2. symmetry. eapply fr_raw_mark; eauto. + erewrite <- fr_raw_tag; try eassumption. + assert (raw_fields (vlabel g v) = raw_fields (vlabel g2 v)) by (eapply fr_raw_fields; eauto). rewrite <- H7. intros; apply H4; right; assumption. - specialize (H4 _ (in_eq a l)). eapply fr_right_roots_graph_compatible; eauto. simpl. intuition auto with *. rewrite Zlength_correct. apply inj_lt; 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