proposition: Lemma extend_copy_emap_root: forall (g g1 g2 g3 g1' g2' g3' : Graph) root es es_done e0 es_later, vvalid g root -> WeakMarkGraph.unmarked g root -> es = es_done ++ e0 :: es_later -> (forall e : E, In e es <-> out_edges g root e) -> NoDup es -> vcopy1 root g g1 g1' -> edge_copy_list g es_done (g1, g1') (g2, g2') -> extended_copy (dst g e0) (g2, g2') (g3, g3') -> map (LocalGraphCopy.emap g2) es_done = map (LocalGraphCopy.emap g3) es_done.
proof: Proof. intros. destruct (vcopy1_edge_copy_list_spec root es es_done _ g g1 g2 g1' g2' H H0 H1 H2 H3 H4 H5). pose proof WeakMarkGraph.triple_mark1_componded_mark_list root (map (dst g) es_done) (map (dst g) (e0 :: es_later)) (map (dst g) es) g g2 H H0. spec H9; [apply out_edges_step_list; auto |]. spec H9; [rewrite <- map_app; f_equal; auto |]. spec H9; [split_relation_list (g :: g1 :: g1 :: nil) |]. 1: apply WeakMarkGraph.eq_do_nothing; auto. 1: destruct H4 as [? [? ?]]; auto. 1: apply WeakMarkGraph.eq_do_nothing; auto. 1: auto. cbv iota zeta in H9. destruct H9 as [_ ?]. eapply LocalGraphCopy.extend_copy_emap_root; eauto. + intros; destruct (node_pred_dec (WeakMarkGraph.marked g) v); auto. + destruct H4 as [_ [_ ?]]; auto. + intros; rewrite <- (app_same_set H9). destruct (node_pred_dec (WeakMarkGraph.marked g2) v); auto. + rewrite <- H9. destruct H6 as [_ [_ ?]]. exact e. Qed.
imports: VST.msl.seplog VST.msl.log_normalize CertiGraph.lib.Coqlib CertiGraph.lib.Ensembles_ext CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.lib.relation_list CertiGraph.lib.Morphisms_ext CertiGraph.msl_ext.log_normalize CertiGraph.msl_ext.iter_sepcon CertiGraph.msl_ext.ramification_lemmas CertiGraph.graph.graph_model CertiGraph.graph.path_lemmas CertiGraph.graph.reachable_computable CertiGraph.graph.reachable_ind CertiGraph.graph.graph_gen CertiGraph.graph.graph_relation CertiGraph.graph.subgraph2 CertiGraph.graph.dag CertiGraph.graph.weak_mark_lemmas CertiGraph.graph.graph_morphism CertiGraph.graph.local_graph_copy CertiGraph.msl_application.Graph Coq.Logic.Classical