Section CostTheory.
Context `{function_cost_model}.
intuition.
eapply cost_le.
eapply (cost_compose f1 _ ).
eauto.
intuition.
eapply cost_const.
intuition.
eauto.
omega.
Qed.
intuition.
eapply cost_le.
eapply (cost_compose f2 (fun a x => f3 (f1 a) x)).
eauto.
intuition.
eapply (cost_compose f1 (fun a => f3)).
eauto.
intuition.
eapply cost_const.
intuition.
eauto.
intuition.
omega.
Qed.
intuition.
eapply cost_uncurry_1.
eapply cost_ext.
2:{
eapply cost_ident.
}
intuition.
Qed.

Theorem cost_pair_2 :
forall (A B : Type) a,
cost (@pair A B a) 0.