proposition: Lemma in_path_split: forall g p n, In_path g n p -> valid_path g p -> exists p1 p2, p = p1 +++ p2 /\ paths_meet_at g p1 p2 n.
proof: Proof. intros. destruct p as [v p]. hnf in H. simpl in H. destruct H. + subst. exists (v, nil), (v, p). unfold path_glue. simpl. split; split; auto. + destruct H as [e [? ?]]. destruct (in_split _ _ H) as [p1 [p2 ?]]. destruct H1. - exists (v, p1), (src g e, e :: p2). unfold path_glue. simpl. subst p. split; auto. subst n. split; auto. apply pfoot_split in H0. auto. - exists (v, p1 +:: e), (dst g e, p2). unfold path_glue. simpl. subst p. rewrite <- app_assoc. rewrite <- app_comm_cons. rewrite app_nil_l. split; auto. split. * rewrite pfoot_last. auto. * simpl. auto. Qed.
imports: Coq.Logic.ProofIrrelevance Coq.micromega.Lia CertiGraph.lib.Coqlib CertiGraph.lib.EnumEnsembles CertiGraph.lib.List_ext CertiGraph.lib.EquivDec_ext CertiGraph.graph.graph_model Coq.Lists.List Coq.Lists.ListDec