proposition: Lemma is_partial_graph_reachable_by_path: forall (g1 g2: PreGraph V E) (p: path) (n: V) (P: Ensemble V) (n': V), is_partial_graph g1 g2 -> g1 |= p is n ~o~> n' satisfying P -> g2 |= p is n ~o~> n' satisfying P.
proof: Proof. intros. destruct H0 as [[? ?] [? ?]]. destruct p as [v p]. split; split; auto. + clear H0 H3. revert v H2 H1. induction p; intros. - simpl in H1 |-* . auto. - rewrite pfoot_cons in H1 |-* . destruct H as [? [? [? ?]]]. assert (strong_evalid g1 a) by (destruct H2; simpl in H5; destruct p; intuition). destruct H5 as [? [? ?]]. assert (dst g1 a = dst g2 a) by (apply H4; auto). rewrite <- H8. apply IHp; auto. apply valid_path_cons in H2. auto. + apply is_partial_graph_valid_path with g1; auto. + unfold path_prop in *. simpl fst in *. simpl snd in *. destruct H3. split; auto. rewrite Forall_forall in H4 |-* . intros. specialize (H4 _ H5). destruct H as [? [? [? ?]]]. pose proof (valid_path_strong_evalid _ _ _ _ H2 H5). destruct H9 as [? [? ?]]. assert (src g1 x = src g2 x) by (apply H7; auto). assert (dst g1 x = dst g2 x) by (apply H8; auto). rewrite <- H12, <- H13. easy. 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