eapply expected_poly_time_bind_0_f.
eapply expected_poly_time_rnd.
exists 0%nat.
exists 1%nat.
exists 0%nat.
intuition.
eapply expected_poly_time_ret_f.
eapply expected_poly_time_vec_hd.
Qed.

(* Specifications: *)
Theorem expected_poly_time_if_f :
forall (A B: nat -> Type)(f_b : forall n, (A n) -> bool)(f_so f_not : forall n, A n -> B n),
efficient _ f_b ->
efficient _ f_so ->
efficient _ f_not ->
efficient _ (fun n (a : A n) => if (f_b n a) then (f_so n a) else (f_not n a)).