induction lsa; destruct lsb; destruct n; intuition; simpl in *; try omega; try pairInv; intuition.
inversion H; clear H; subst.
eapply IHlsa.
eauto.
eauto.
eapply IHlsa.
eauto.
eauto.
Qed.

Lemma compFold_spec' :
forall (A B C D : Set)(P2 : list A -> list B -> C -> D -> Prop)(eqdc1 eqdc2  : EqDec C)(eqdd1 eqdd2 : EqDec D)(lsa : list A)(lsb : list B)(c1 : C -> A -> Comp C)(c2 : D -> B -> Comp D) init1 init2,
length lsa = length lsb ->
P2 lsa lsb init1 init2 ->
(forall a lsa b lsb c d, P2 (a :: lsa) (b :: lsb) c d -> comp_spec (P2 lsa lsb) (c1 c a) (c2 d b)) ->
@comp_spec _ _ eqdc1 eqdd1 (P2 nil nil) (compFold eqdc2 c1 init1 lsa) (compFold eqdd2 c2 init2 lsb).