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__T {X} {L} :
list_enumerator__T L X -> list_enumerator__T (to_cumul L) X.