proposition: Lemma revmap_fold_comp : forall {A B} (f: A -> B) (seq: list A), Monad.equiv (fold_left (fun cacc elem => (acc <- cacc; ret (f elem :: acc))%comp) seq (ret nil)) (ret (@revmap A B f seq)).
proof: Proof. intros. rewrite <- (app_nil_r (revmap f seq)). rewrite revmap_fold_comp_generalized. split; intros; computes_to_inv; subst; eauto using BindComputes. Qed.
imports: CertifiedExtraction.Extraction.Internal CertifiedExtraction.Extraction.External.Core CertifiedExtraction.Extraction.External.Loops CertifiedExtraction.Extraction.External.GenericADTMethods CertifiedExtraction.Extraction.External.FacadeADTs