Section enumerator_list_enumerator.
Variable X : Type.
Variables (T : nat -> list X).
Let e (n : nat) : option X :=
let (n, m) := unembed n in
nth_error (T n) m.
End enumerator_list_enumerator.
Definition to_cumul {X} (L : nat -> list X) := fix f n :=
match n with 0 => [] | S n => f n ++ L n end.
Hint Resolve cumul_In In_cumul : core.

Lemma cumul_spec {X} {L} {p : X -> Prop} :
list_enumerator L p -> list_enumerator (to_cumul L) p.