intuition.
apply constant_cost_pair_args in H1.
destruct H1.
destruct H1.
intuition.
eapply constant_cost_le.
eapply constant_cost_bind; eauto.
omega.
Qed.

(* Specifications: *)
Theorem constant_cost_compose_binary_pair :
forall (A B C D: Type)
(f1 : A -> B)(f2 : A ->C)(f3 : B -> C -> D) c1 c2 c3,
cost f1 c1 ->
cost f2 c2 ->
cost (fun p => f3 (fst p) (snd p)) c3 ->
cost (fun a => f3 (f1 a) (f2 a)) (c1 + c2 + c3).