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.

Lemma In_cumul {X} (L : nat -> list X) x n :
In x (to_cumul L n) -> exists n, In x (L n).