proposition: Lemma copied_vertex_reachable: forall (g: LGraph) (r v: VType) to, sound_gc_graph g -> copied_vertex_prop g (vgeneration r) to -> raw_mark (vlabel g r) = true -> reachable g r v -> reachable g (copied_vertex (vlabel g r)) v \/ raw_mark (vlabel g v) = true.
proof: Proof. intros. unfold reachable, reachable_by in H2. destruct H2 as [[s p] ?]. assert (phead (s, p) = r) by (eapply reachable_by_path_head; eauto). simpl in H3. subst s. remember (vgeneration r) as from. clear Heqfrom. eapply copied_vertex_reachable_by_path in H2; eauto. destruct H2. 1: now right. destruct H2 as [p' [? ?]]. left. now exists (copied_vertex (vlabel g r), p'). 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