proposition: Lemma reachable_src_no_edge: forall (g: Gph) (p: path) (s: V) (e: E) P, g |= p is s ~o~> src g e satisfying P -> exists p', g |= p' is s ~o~> src g e satisfying P /\ ~ In e (snd p') /\ length (snd p') <= length (snd p).
proof: Proof. intros. destruct (in_dec equiv_dec e (snd p)). 2: (exists p; now split). eapply reachable_path_unique_edge in i; eauto. destruct i as [p1 [p2 [? [? [? ?]]]]]. apply reachable_by_path_app_cons in H0. destruct H0. exists (s, p1). split; [|split]; auto. simpl. rewrite app_length in H3. lia. 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