proposition: Theorem constant_cost_bind_pair : forall (A : Type)(B C: Set) (f1 : A -> Comp B)(f2 : A -> B -> Comp C) c1 c2, cost f1 c1 -> cost (fun p => f2 (fst p) (snd p)) c2 -> cost (fun a => Bind (f1 a) (f2 a)) (c1 + c2).
proof: Proof. intuition. apply constant_cost_pair_args in H1. destruct H1. destruct H1. intuition. eapply constant_cost_le. eapply constant_cost_bind; eauto. lia. Qed.
imports: FCF.Crypto