proposition: Lemma rev_hd_last: forall {A:Type} (l: list A), hd_error l = last_error (rev l).
proof: Proof. induction l. auto. simpl. rewrite (last_err_appcons (rev l) a). reflexivity. 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