proposition: Lemma pcv_reachable_new: forall g old_v new_v v, sound_gc_graph g -> no_dangling_dst g -> vvalid g old_v -> ~ vvalid g new_v -> reachable g old_v v <-> v = old_v \/ reachable (pregraph_copy_v g old_v new_v) new_v v /\ new_v <> v.
proof: Proof. intros. rewrite reachable_same_or_edge'; auto. rewrite (reachable_same_or_edge' (pregraph_copy_v g old_v new_v)). 2: rewrite pcv_vvalid_iff; now right. split; intros; destruct H3; [left | right | left | ]; auto. - destruct H3 as [z [? ?]]. split; [right; exists z|]. 2: intro; apply reachable_foot_valid in H4; now subst. rewrite pcv_edge in H3; eauto. split; auto. eapply is_partial_graph_reachable; eauto. apply pcv_is_partial_graph; auto. - destruct H3. destruct H3; [easy|]. destruct H3 as [z [? ?]]. right. exists z. assert (g |= old_v ~> z) by (rewrite pcv_edge; eauto). split; auto. apply pcv_reachable_old in H5; auto. now destruct H6 as [_ [? _]]. 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