proposition: Lemma frr_graph_has_v_inv: forall from to roots1 g1 roots2 g2, graph_has_gen g1 to -> forward_roots_relation from to roots1 g1 roots2 g2 -> forall v, graph_has_v g2 v -> graph_has_v g1 v \/ (vgeneration v = to /\ gen_v_num g1 to <= vindex v < gen_v_num g2 to).
proof: Proof. intros. induction H0. 1: left; assumption. assert (graph_has_gen g2 to) by (rewrite <- fr_graph_has_gen; eauto). specialize (IHforward_roots_relation H3 H1). destruct IHforward_roots_relation. - eapply (fr_O_graph_has_v_inv from to _ g1 g2) in H0; eauto. destruct H0. 1: left; assumption. right. unfold new_copied_v in H0. subst v. clear H2. destruct H1. red in H1. simpl in *. unfold gen_v_num. lia. - right. destruct H4. split. 1: assumption. destruct H5. split. 2: assumption. apply fr_O_gen_v_num_to in H0; [lia | 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