induction 1; intuition.
simpl.
eapply comp_spec_ret.
trivial.
simpl.
case_eq (P1 a); intuition.
assert (P2 b = true).
eapply H3; eauto.
rewrite H5.
prog_simp.
eauto.
case_eq (P2 b); intuition.
assert (P1 a = true).
eapply H3; intuition; eauto.
congruence.
eapply comp_spec_seq; intuition.
Qed.

(* Specifications: *)
Theorem compFold_eq :
forall (A1 A2 : Set) P (ls1 : list A1) (ls2 : list A2),
list_pred P ls1 ls2 ->
forall (B : Set)(eqd : EqDec B) (c1 : B -> A1 -> Comp B) (c2: B -> A2 -> Comp B),
(forall acc a1 a2, P a1 a2 -> In a1 ls1 -> In a2 ls2 ->
comp_spec eq (c1 acc a1) (c2 acc a2) ) ->
forall init,
comp_spec eq (compFold _ c1 init ls1) (compFold _ c2 init ls2).