intros.
apply Rle_trans with (C (length l)).
apply C_bounds_avg_qs_cost.
apply C_log_bound.
Qed.

Corollary qs_avg_bigO: over (@length (_ : Set)), Ravg ∘ map (INR ∘ cost ∘ qs) ∘ perms =O(fun n => n * log2ceil n).
Proof with auto with real.