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.

Theorem expected_poly_time_eqb_bool_f :
forall (A : nat -> Type)(f1 : forall n, A n -> bool)(f2 : forall n, A n -> bool),
efficient _ f1 ->
efficient _ f2 ->
efficient _ (fun n (a : A n) => eqb (f1 n a) (f2 n a)).