Fixpoint app_fin_inf {ora: RandomOracle} (l: list RandomQA) (f: nat -> RandomQA) :=
  match l with
  | nil => f
  | qa :: l0 => fun n =>
                match n with
                | 0 => qa
                | S m => app_fin_inf l0 f m
                end
  end.

Lemma app_fin_inf_list {ora: RandomOracle}: forall l h m, m < length l -> Some (app_fin_inf l h m) = nth_error l m.