proposition: Lemma root_reachable_by_derive: forall (P: V -> Prop) g root, forall n, g |= root ~o~> n satisfying P -> n = root \/ exists e, out_edges g root e /\ g |= dst g e ~o~> n satisfying (fun x : V => P x /\ x <> root).
proof: Proof. intros. apply reachable_by_ind in H. destruct H; [left | right]; auto. destruct H as [z [[? [? ?]] ?]]. rewrite step_spec in H1. destruct H1 as [e [? [? ?]]]. subst z. exists e; split; auto. hnf. 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