Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Terms of trade: specialization pays exactly when the world price beats the opportunity cost

Proved
ComparativeAdvantage.terms_of_trade_iff

by Lucas · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

comparative-advantageeconomicsinternational-trade

Let a country have unit labour requirements aLC,aLW>0a_{LC},a_{LW}>0aLC​,aLW​>0 and labour force L>0L>0L>0, and let world prices be PC,PW>0P_C,P_W>0PC​,PW​>0.

  1. Its autarky set is contained in its consumption set when it specializes in cloth if and only if
aLCaLW≤PCPW.\frac{a_{LC}}{a_{LW}}\le\frac{P_C}{P_W}.aLW​aLC​​≤PW​PC​​.
  1. Its autarky set is contained in its consumption set when it specializes in wine if and only if
PCPW≤aLCaLW.\frac{P_C}{P_W}\le\frac{a_{LC}}{a_{LW}}.PW​PC​​≤aLW​aLC​​.

Hence terms of trade that benefit both a cloth exporter and a wine exporter lie between the two countries' opportunity costs.

Preamble
import Mathlib
import Definitions.Def_ComparativeAdvantage_Model
Formal statement
namespace ComparativeAdvantage

theorem terms_of_trade_iff (c : Country) (PC PW : ℝ) (hPC : 0 < PC) (hPW : 0 < PW) :
    (autarkySet c ⊆ tradeSetCloth c PC PW ↔ c.aLC / c.aLW ≤ PC / PW) ∧
    (autarkySet c ⊆ tradeSetWine c PC PW ↔ PC / PW ≤ c.aLC / c.aLW) := by sorry

end ComparativeAdvantage
Source
Wikipedia, "Comparative advantage" (PDF export supplied with the request); https://en.wikipedia.org/wiki/Comparative_advantage, section "Terms of trade"
Read-back

What the Lean code literally says, in plain math · Aristotle (Harmonic) — same agent as the drafter; non-blind

Disclosure — NON-BLIND read-back. This read-back was written by the same agent (Aristotle, by Harmonic) that drafted the Lean statement it describes, with full knowledge of the source article and of the intended meaning. It is not independent, blind testimony and must not be mistaken for one. An independent blind read-back is still recommended before the proposal is submitted.

Here a country ccc is a triple of real numbers (L,aLC,aLW)(L, a_{LC}, a_{LW})(L,aLC​,aLW​), all strictly positive (the structure itself carries the positivity proofs). Let c=(L,aLC,aLW)c=(L,a_{LC},a_{LW})c=(L,aLC​,aLW​) be a country and PC>0P_C>0PC​>0, PW>0P_W>0PW​>0. The statement asserts both equivalences:

  1. [every (x,y)(x,y)(x,y) with x,y≥0x,y\ge0x,y≥0 and aLCx+aLWy≤La_{LC}x+a_{LW}y\le LaLC​x+aLW​y≤L also satisfies aLCx+aLC(PW/PC)y≤La_{LC}x+a_{LC}(P_W/P_C)y\le LaLC​x+aLC​(PW​/PC​)y≤L]   ⟺  aLC/aLW≤PC/PW\iff a_{LC}/a_{LW}\le P_C/P_W⟺aLC​/aLW​≤PC​/PW​;
  2. [every (x,y)(x,y)(x,y) with x,y≥0x,y\ge0x,y≥0 and aLCx+aLWy≤La_{LC}x+a_{LW}y\le LaLC​x+aLW​y≤L also satisfies aLW(PC/PW)x+aLWy≤La_{LW}(P_C/P_W)x+a_{LW}y\le LaLW​(PC​/PW​)x+aLW​y≤L]   ⟺  PC/PW≤aLC/aLW\iff P_C/P_W\le a_{LC}/a_{LW}⟺PC​/PW​≤aLC​/aLW​.

Only one country appears; the statement about two trading partners is obtained by applying it to each.

Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Lucas · Oct 10, 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