proposition: Lemma svwl_graph_has_v_inv: forall from to l g1 g2, graph_has_gen g1 to -> scan_vertex_while_loop from to l g1 g2 -> forall v, graph_has_v g2 v -> graph_has_v g1 v \/ (vgeneration v = to /\ gen_v_num g1 to <= vindex v < gen_v_num g2 to).
proof: Proof. intros ? ? ?. induction l; intros; inversion H0; subst. 1: left; assumption. 1: eapply IHl; eauto. assert (graph_has_gen g3 to) by (rewrite <- svfl_graph_has_gen; eauto). specialize (IHl _ _ H2 H9 _ H1). destruct IHl. - eapply svfl_graph_has_v_inv in H6; eauto. destruct H6; [left|right]. 1: assumption. destruct H6 as [? [? ?]]. split; [|split]; [assumption..|]. apply svwl_gen_v_num_to in H9; [lia | assumption]. - right. destruct H3 as [? [? ?]]. split; [|split]; try assumption. apply svfl_gen_v_num_to in H6; [lia | 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