Fixpoint suml (l : list nat) : nat :=
  match l with
  | nil => 0
  | n :: l' => n + suml l'
  end.

Lemma length_suml_filter b n l: (forall x, In x l -> b <= x < b + n) -> suml (map (fun r => length(filter (beq_nat r) l )) (seq b n)) = length l.