proposition: Lemma compFold_spec' : forall (A B: Type)(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).
proof: Proof. induction lsa; destruct lsb; intuition. simpl. eapply comp_spec_ret; intuition. simpl in *. discriminate. simpl in *. discriminate. simpl. eapply comp_spec_seq; intuition. eapply H1; eauto. eapply IHlsa; eauto. Qed.
imports: FCF.FCF Permutation