Section expected_poly_time_theory.
Context `{ept : expected_poly_time_predicate}.
intuition.
eapply (@expected_poly_time_compose _ _ _ _ _ _ (fun n a b => (f2 n b))); eauto.
eapply expected_poly_time_const; eauto.
Qed.
intuition.
eapply (@expected_poly_time_compose _ _ _ _ _ _ (fun n a b => f3 n (f1 n a) b)); eauto.
eapply (@expected_poly_time_compose _ _ _ _ _ _ (fun n a b => f3 n b)); eauto.
eapply expected_poly_time_const.
eauto.
Qed.
intuition.
eapply (@expected_poly_time_compose_binary _ _ _ _ _ _ (fun n b c => pair b c)); eauto.
eapply expected_poly_time_pair.
Qed.
intuition.
eapply (@expected_poly_time_compose_binary _ _ _ _ _ _ BVxor); eauto.
eapply expected_poly_time_bvxor.
Qed.
intuition.
eapply (@expected_poly_time_compose_binary _ _ _ _ _ _ (fun n a b => eqb a b)); eauto.
eapply expected_poly_time_eqb_bool.
Qed.
intuition.
eapply (@expected_poly_time_compose_simp _ _ _ _ (fun n a => fst a)); eauto.
eapply expected_poly_time_fst.
Qed.
intuition.
eapply (@expected_poly_time_compose_simp _ _ _ _ (fun n a => snd a)); eauto.
eapply expected_poly_time_snd.
Qed.
intuition.
eapply (@expected_poly_time_compose_0 _ _ _ _ _ (fun n b => f3 n (f1 n) b)); eauto.
eapply (@expected_poly_time_compose_0 _ _ _ _ _ (fun n b => f3 n b)); eauto.
Qed.

Theorem expected_poly_time_bind_0_f :
forall (A B : nat -> Set) (a : forall n, Comp (A n)) (b : forall n, A n -> Comp (B n)),
efficient _ a ->
efficient _ b ->
efficient _ (fun n => (Bind (a n) (b n))).