proposition: Lemma reachable_from_roots: forall (g: LGraph) (roots: roots_t) v, reachable_through_set g (filter_sum_right roots) v <-> exists i r, 0 <= i < Zlength roots /\ Znth i roots = inr r /\ reachable g r v.
proof: Proof. intros. unfold reachable_through_set. split; intros. - destruct H as [s [? ?]]. rewrite <- filter_sum_right_In_iff in H. apply In_Znth in H. destruct H as [i [? ?]]. exists i, s. split3; auto. - destruct H as [i [r [? [? ?]]]]. exists r. split; auto. rewrite <- filter_sum_right_In_iff, <- H0. now apply Znth_In. Qed.
imports: Coq.ZArith.ZArith Coq.Program.Basics 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 CertiGraph.lib.Coqlib CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.graph.graph_model CertiGraph.graph.graph_gen CertiGraph.graph.path_lemmas CertiGraph.graph.subgraph2 CertiGraph.graph.graph_relation CertiGraph.graph.graph_isomorphism CertiGraph.graph.reachable_ind CertiGraph.CertiGC.GCGraph