proposition: Lemma frr_not_pointing: forall from to roots1 g1 roots2 g2, copy_compatible g1 -> roots_graph_compatible roots1 g1 -> from <> to -> graph_has_gen g1 to -> Zlength roots1 = Zlength roots2 -> forward_roots_relation from to roots1 g1 roots2 g2 -> roots_have_no_gen roots2 from.
proof: Proof. intros. revert H H0 H2 H3; induction H4; intros. intros ? Hx; inv Hx. intros ? ?. destruct H6. - clear IHforward_roots_relation. pose proof upd_roots_not_pointing from to 0 g1 (r::roots1) (upd_root from to g1 r :: roots1) H0 H2 H1 ltac:(list_solve). simpl in H7. rewrite upd_Znth0 in H7. rewrite Znth_0_cons in H7. specialize (H7 (eq_refl _) v 0). rewrite Znth_0_cons in H7. specialize (H7 H6). destruct H7. apply H7. constructor. auto. - apply IHforward_roots_relation; auto. eapply fr_copy_compatible; eassumption. pose proof fr_roots_graph_compatible 0 from to (inl 0) g1 g2 (r::roots1) H3 ltac:(simpl; list_solve) H0. simpl in H7. specialize (H7 H H1 H2). rewrite upd_Znth0 in H7. apply Forall_filter_sum_right_cons_e in H7; auto. erewrite <- fr_graph_has_gen; eassumption. 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