proposition: Lemma localDag_reachable_spec: forall g x S, vvalid g x -> localDag g x -> step_list g x S -> (forall y, reachable g x y <-> reachable_through_set g S y \/ y = x) /\ (forall y, reachable_through_set g S y -> y <> x).
proof: Proof. intros. split; intros. + rewrite (reachable_ind' g x S y H H1). assert (x = y <-> y = x) by (split; congruence). tauto. + destruct H2 as [x0 [? ?]]. rewrite (H1 x0) in H2. specialize (H0 x). spec H0; [apply reachable_refl; auto |]. specialize (H0 x0). assert (vvalid g x0) by (apply reachable_head_valid in H3; auto). assert (edge g x x0) by (split; [| split]; auto). spec H0; [auto |]. intro; subst; tauto. Qed.
imports: Coq.Logic.ProofIrrelevance Coq.Sets.Ensembles Coq.Sets.Finite_sets Coq.Lists.List Coq.Classes.Morphisms CertiGraph.lib.Coqlib CertiGraph.lib.List_ext CertiGraph.lib.EquivDec_ext VST.msl.Coqlib2 CertiGraph.graph.graph_model CertiGraph.graph.path_lemmas CertiGraph.graph.reachable_computable CertiGraph.graph.reachable_ind CertiGraph.graph.subgraph2