intuition.
eapply (@expected_poly_time_compose _ _ _ _ _ _ (fun n a (b : bool) => if b then (f_so n a) else (f_not n a))); eauto.
eapply expected_poly_time_pair_arg.
eapply (@expected_poly_time_compose _ _ _ _ _ _ (fun n (a : A n * bool) b => if (snd a) then b else (f_not n (fst a)))); eauto.
apply (@expected_poly_time_compose_simp _ _ _ _ f_so); eauto.
eapply expected_poly_time_fst.
eapply expected_poly_time_pair_arg.
eapply (@expected_poly_time_compose _ _ _ _ _ _ (fun n (a : A n * bool * B n) b => if (snd (fst a)) then (snd a) else b)); eauto.
apply (@expected_poly_time_compose_simp _ _ _ _ f_not); eauto.
apply (@expected_poly_time_compose_simp _ _ _ _ (fun n a => fst a)); eauto.
eapply expected_poly_time_fst.
eapply expected_poly_time_fst.
eapply expected_poly_time_unpair_arg.
eapply expected_poly_time_unpair_arg.
simpl.
eapply expected_poly_time_const.
eapply expected_poly_time_if.
Qed.

(* Specifications: *)
Theorem expected_poly_time_cons_f :
forall A B (f1 : forall n, A n -> B n) (f2 : forall n, A n -> list (B n)),
efficient _ f1 ->
efficient _ f2 ->
efficient _ (fun n (a : A n) => (cons (f1 n a) (f2 n a))).