proposition: Lemma reachable_by_idempotent (g: PreGraph V E) (P: V -> Prop) (n: V): Same_set (reachable_by g n P) (reachable_by g n (reachable_by g n P)).
proof: Proof. intros. rewrite reachable_by_partialgraph_reachable_by_equiv at 1. 2: apply Included_refl. rewrite reachable_by_eq_partialgraph_reachable', partial_partialgraph, <- reachable_by_eq_partialgraph_reachable'. apply reachable_by_proper'; try reflexivity. apply Intersection_absort_right. intro m; apply reachable_by_foot_prop. Qed.
imports: Coq.Arith.Arith Coq.Logic.ProofIrrelevance Coq.Logic.FunctionalExtensionality Coq.Classes.Morphisms Coq.Classes.Equivalence CertiGraph.lib.Coqlib CertiGraph.lib.Ensembles_ext CertiGraph.lib.relation_list CertiGraph.lib.List_ext CertiGraph.lib.Equivalence_ext CertiGraph.lib.EquivDec_ext VST.msl.Coqlib2 CertiGraph.graph.graph_model CertiGraph.graph.path_lemmas CertiGraph.graph.reachable_ind CertiGraph.graph.graph_gen CertiGraph.graph.graph_relation