induction ls; intuition; simpl.
unfold compMap_fold.
simpl.
eapply comp_spec_eq_refl.
unfold compMap_fold.
simpl.
prog_inline_first.
prog_skip.
prog_simp.
eapply comp_spec_eq_trans.
eapply comp_spec_seq_eq; eauto with inhabited.
intuition.
eapply comp_spec_eq_refl.
unfold compMap_fold.
eapply comp_spec_eq_trans_r.
2:{
eapply comp_spec_right_ident.
}
eapply comp_spec_seq; eauto with inhabited.
eapply (@compFold_spec _ _ _ (fun ls p1 p2 => b :: p1 = p2)); intuition.
subst.
simpl.
comp_skip.
eapply comp_spec_ret.
trivial.
intuition.
subst.
eapply comp_spec_eq_refl.
Qed.

(* Specifications: *)
Lemma compFold_wf :
forall (A B : Set)(eqd : EqDec A)(c : A -> B -> Comp A)(ls : list B) init,
(forall a b, well_formed_comp (c a b)) ->
well_formed_comp (compFold _ c init ls).