proposition: Theorem arrayLookup_pred_2 : forall (A B C: Set)(eqda : EqDec A) (P : list B -> list C -> Prop) (ls1 : list (A * list B))(ls2 : list (A * list C)) a, list_pred (fun x y => (fst x = a \/ fst y = a) -> (fst x = a /\ fst y = a /\ P (snd x) (snd y))) ls1 ls2 -> P nil nil -> P (arrayLookupList _ ls1 a) (arrayLookupList _ ls2 a).
proof: Proof. induction ls1; intuition; simpl in *. inversion H; clear H; subst. unfold arrayLookupList. simpl. trivial. inversion H; clear H; subst. unfold arrayLookupList. simpl. destruct a2. simpl in *. intuition. case_eq (eqb a a0); intuition. rewrite eqb_leibniz in H2. subst. intuition. subst. rewrite eqb_refl. trivial. case_eq (eqb a a1); intuition. rewrite eqb_leibniz in H3. subst. intuition. subst. rewrite eqb_refl in H2. discriminate. eapply IHls1; intuition. Qed.
imports: FCF.Crypto FCF.Fold Permutation FCF.CompFold