Proof with auto with arith.
unfold compose.
unfold RsumOver...
intros.
apply Rsum_Permutation.
rewrite <- (map_map (minus d) f).
apply Permutation_map.
apply NoDup_incl_Permutation.
rewrite map_length.
repeat rewrite nats_length...
apply NoDup_map.
intros.
apply minus_eq_inv_r with d...
destruct (In_nats_inv _ _ _ H0)...
apply le_trans with ((b + w)%nat)...
destruct (In_nats_inv _ _ _ H1).
apply le_trans with ((b + w)%nat)...
apply NoDup_nats.
intro.
intro.
destruct (In_map_inv H0).
destruct H1.
destruct (In_nats_inv _ _ _ H2).
subst.
apply In_nats; omega.
Qed.
(* Ravg *)
Definition Ravg (l: list R): R := Rsum l / INR (length l).

(* Specifications: *)
Lemma Ravg_nil: Ravg nil = 0.
Proof with auto.