proposition: Lemma do_gen_firstn_gen_clear: forall g1 g2 roots1 roots2 i, do_generation_relation i (S i) roots1 roots2 g1 g2 -> graph_has_gen g1 (S i) -> firstn_gen_clear g1 i -> firstn_gen_clear g2 (S i).
proof: Proof. intros. destruct H as [g3 [g4 [? [? ?]]]]. eapply frr_firstn_gen_clear in H1; eauto. destruct H2 as [n [? ?]]. eapply svwl_firstn_gen_clear in H1; eauto. 2: erewrite <- frr_graph_has_gen; eauto. subst g2. apply firstn_gen_clear_reset. 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