(* listRepeat is used to show some interesting properties of rel_map and pred_count. *)
Fixpoint listRepeat(A : Type)(a : A) n :=
  match n with
    | 0 => nil
    | S n' => a :: (listRepeat a n')
  end.

Lemma pred_count_first_skip : forall (A : Type)(P : A -> Prop)(ls : list A)(c : nat), pred_count P ls c -> forall n, exists c1 c2, pred_count P (firstn n ls) c1 /\ pred_count P (skipn n ls) c2 /\ (c1 + c2 = c)%nat.