proposition: Lemma lacv_no_dangling_dst: forall (g : LGraph) (v : VType) (to : nat), no_dangling_dst g -> graph_has_gen g to -> graph_has_v g v -> no_dangling_dst (lgraph_add_copied_v g v to).
proof: Proof. intros; intro x; intros. simpl. destruct (V_EqDec x (new_copied_v g to)). - unfold equiv in e0. subst x. pose proof H3. remember (new_copied_v g to) as new. apply get_edges_fst in H3. destruct e as [? s]. simpl in H3. subst v0. rewrite get_edges_In, Heqnew, lacv_get_edges_new in H4. rewrite pcv_dst_new. 2: assumption. apply lacv_graph_has_v_old. 1: assumption. apply (H v); [|rewrite get_edges_In]; assumption. - assert (x <> new_copied_v g to) by intuition auto. clear c. rewrite pcv_dst_old. + apply lacv_graph_has_v_old. 1: assumption. apply lacv_graph_has_v_inv in H2. 2: assumption. destruct H2. 2: contradiction. apply (H x). 1: assumption. unfold get_edges in *. rewrite lacv_make_fields_not_eq in H3; assumption. + unfold get_edges in H3. rewrite <- filter_sum_right_In_iff in H3. apply e_in_make_fields' in H3. destruct H3 as [s ?]. subst e. simpl. assumption. Qed.
imports: Coq.ZArith.ZArith Coq.Program.Basics Coq.micromega.Lia 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 VST.zlist.list_solver CertiGraph.lib.EquivDec_ext CertiGraph.lib.List_ext CertiGraph.graph.graph_model CertiGraph.graph.graph_gen