Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Proposition 3.13 -- the second-best trading mechanism

Proved
MechanismDesign.BilateralTrade.second_best

by mikedeng1 · Oct 3, 2026 · Mathlib 0df444a (Lean v4.33.1)

bilateral-trademechanism-designp2o-batch-b23bp2o-gran-per-chapterp2o-plan-bookp2o-v1second-best

In the bilateral trade environment, suppose θ‾B<θ‾S\underline\theta_B < \overline\theta_Sθ​B​<θS​ and θ‾B>θ‾S\overline\theta_B > \underline\theta_SθB​>θ​S​, and that FSF_SFS​ and FBF_BFB​ are regular: ψS(θS)=θS+FS(θS)/fS(θS)\psi_S(\theta_S) = \theta_S + F_S(\theta_S)/f_S(\theta_S)ψS​(θS​)=θS​+FS​(θS​)/fS​(θS​) and ψB(θB)=θB−(1−FB(θB))/fB(θB)\psi_B(\theta_B) = \theta_B - (1-F_B(\theta_B))/f_B(\theta_B)ψB​(θB​)=θB​−(1−FB​(θB​))/fB​(θB​) are increasing. A direct mechanism (q,tS,tB)(q, t_S, t_B)(q,tS​,tB​) is incentive-compatible, individually rational and ex ante budget balanced, and maximizes expected welfare among all such mechanisms, if and only if:

  1. there is some λ>0\lambda > 0λ>0 such that for all θ∈Θ\theta \in \Thetaθ∈Θ
q(θ)={1if θB−λ1+λ1−FB(θB)fB(θB)≥θS+λ1+λFS(θS)fS(θS),0otherwise;q(\theta) = \begin{cases} 1 & \text{if } \theta_B - \frac{\lambda}{1+\lambda}\frac{1-F_B(\theta_B)}{f_B(\theta_B)} \ge \theta_S + \frac{\lambda}{1+\lambda}\frac{F_S(\theta_S)}{f_S(\theta_S)},\\ 0 & \text{otherwise;}\end{cases}q(θ)={10​if θB​−1+λλ​fB​(θB​)1−FB​(θB​)​≥θS​+1+λλ​fS​(θS​)FS​(θS​)​,otherwise;​
  1. exact budget balance holds:
∫Θq(θ)[ψB(θB)−ψS(θS)]f(θ) dθ=θ‾S−∫ΘψS(θS)f(θ) dθ;\int_\Theta q(\theta)\big[\psi_B(\theta_B) - \psi_S(\theta_S)\big] f(\theta)\,d\theta = \overline\theta_S - \int_\Theta \psi_S(\theta_S) f(\theta)\,d\theta ;∫Θ​q(θ)[ψB​(θB​)−ψS​(θS​)]f(θ)dθ=θS​−∫Θ​ψS​(θS​)f(θ)dθ;
  1. for all θB∈[θ‾B,θ‾B]\theta_B \in [\underline\theta_B, \overline\theta_B]θB​∈[θ​B​,θB​] and θS∈[θ‾S,θ‾S]\theta_S \in [\underline\theta_S, \overline\theta_S]θS​∈[θ​S​,θS​],
TB(θB)=θBQB(θB)−∫θ‾BθBQB(x) dx,TS(θS)=θ‾S−(1−QS(θS))θS−∫θSθ‾S(1−QS(x)) dx.T_B(\theta_B) = \theta_B Q_B(\theta_B) - \int_{\underline\theta_B}^{\theta_B} Q_B(x)\,dx, \qquad T_S(\theta_S) = \overline\theta_S - (1 - Q_S(\theta_S))\theta_S - \int_{\theta_S}^{\overline\theta_S} (1 - Q_S(x))\,dx .TB​(θB​)=θB​QB​(θB​)−∫θ​B​θB​​QB​(x)dx,TS​(θS​)=θS​−(1−QS​(θS​))θS​−∫θS​θS​​(1−QS​(x))dx.

In the second-best mechanism trade happens less often than efficiency requires: the buyer's value minus a discount must exceed the seller's value plus an increment.

Formalization Note The statement is split into its two directions. Sufficiency assumes (1) on all of Θ\ThetaΘ (and that the mechanism is well defined). Necessity concludes (1) only for almost every θ\thetaθ: changing qqq on a null set leaves every constraint and the objective unchanged, so the page's "for all θ∈Θ\theta \in \Thetaθ∈Θ" cannot be necessary; (2) and (3) are concluded as printed. Welfare is the expectation of Eq. (3.60), θS+q(θ)(θB−θS)+tS−tB\theta_S + q(\theta)(\theta_B-\theta_S) + t_S - t_BθS​+q(θ)(θB​−θS​)+tS​−tB​. Mechanisms are measurable with integrable transfers (Ch. 2 note 2).

Preamble
import Mathlib
import Definitions.Def_MechanismDesign_BilateralTrade_Model

open MeasureTheory
Formal statement
namespace MechanismDesign.BilateralTrade

/-- Proposition 3.13 (p.71), second best. Assume `θ̲_B < θ̄_S`, `θ̄_B > θ̲_S` and that `F_S`,
`F_B` are regular. A direct mechanism is well-defined, incentive-compatible, individually rational,
ex ante budget balanced and maximizes expected welfare among all such mechanisms if and only if
(i) its trading rule is the rule (3.70) for some `λ > 0`, (ii) exact budget balance holds, and
(iii) the interim payments are the incentive-compatible ones with binding participation of
`θ̄_S` and `θ̲_B`. Necessity of (i) is stated almost everywhere (the page's "for all `θ ∈ Θ`" is
false on null sets); sufficiency assumes (i) on all of `Θ`. -/
theorem second_best (E : Environment) (hB : E.loB < E.hiS) (hS : E.loS < E.hiB)
    (hreg : E.Regular) (m : DirectMechanism E) :
    ((m.Admissible ∧ m.ExAnteBB ∧
        ∀ m' : DirectMechanism E, m'.Admissible → m'.ExAnteBB → m'.welfare ≤ m.welfare) →
      (∃ lam : ℝ, 0 < lam ∧ ∀ᵐ θ ∂E.prior, m.q θ = lambdaRule E lam θ) ∧
      (∫ θ, m.q θ * (E.psiB θ.2 - E.psiS θ.1) ∂E.prior = E.hiS - ∫ θ, E.psiS θ.1 ∂E.prior) ∧
      (∀ y ∈ Set.Icc E.loB E.hiB, m.TB y = y * m.QB y - ∫ z in E.loB..y, m.QB z) ∧
      (∀ x ∈ Set.Icc E.loS E.hiS,
        m.TS x = E.hiS - (1 - m.QS x) * x - ∫ z in x..E.hiS, (1 - m.QS z))) ∧
    (m.WellDefined →
      (∃ lam : ℝ, 0 < lam ∧ ∀ θ ∈ E.typeSpace, m.q θ = lambdaRule E lam θ) →
      (∫ θ, m.q θ * (E.psiB θ.2 - E.psiS θ.1) ∂E.prior = E.hiS - ∫ θ, E.psiS θ.1 ∂E.prior) →
      (∀ y ∈ Set.Icc E.loB E.hiB, m.TB y = y * m.QB y - ∫ z in E.loB..y, m.QB z) →
      (∀ x ∈ Set.Icc E.loS E.hiS,
        m.TS x = E.hiS - (1 - m.QS x) * x - ∫ z in x..E.hiS, (1 - m.QS z)) →
      m.Admissible ∧ m.ExAnteBB ∧
        ∀ m' : DirectMechanism E, m'.Admissible → m'.ExAnteBB → m'.welfare ≤ m.welfare) := by sorry

end MechanismDesign.BilateralTrade
Source
Börgers, An Introduction to the Theory of Mechanism Design, Oxford University Press 2015, DOI 10.1093/acprof:oso/9780199734023.001.0001, p.71, Proposition 3.13 (with Assumption 3.3, p.70)
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me