proposition: Lemma last_err_split2: forall {A: Type} (l1 l2: list A) (a: A), last_error (l1++a::l2) = last_error (a::l2).
proof: Proof. induction l1; intros. rewrite app_nil_l; auto. replace (last_error ((a :: l1) ++ a0 :: l2)) with (last_error (l1 ++ a0 :: l2)). 2: { simpl. destruct (l1++a0::l2) eqn:Htmp. apply app_eq_nil in Htmp. destruct Htmp. inversion H0. auto. } apply IHl1. Qed.
imports: Coq.Lists.List Coq.micromega.Lia Coq.Sorting.Permutation Coq.ZArith.ZArith_base Coq.ZArith.Zcomplements Coq.Logic.FunctionalExtensionality CertiGraph.lib.Coqlib CertiGraph.lib.EquivDec_ext VST.zlist.sublist VST.zlist.list_solver