Ricardian model: countries, autarky and trade sets, competitive output
DefinitionComparativeAdvantage_ModelThis file fixes the vocabulary of the two-country, two-good (cloth and wine) Ricardian model with labour as the only factor of production.
- Country. A country is given by its labour force , the labour needed to produce one unit of cloth, and the labour needed to produce one unit of wine, all strictly positive. Foreign's data are written , , .
- Comparative advantage in cloth. Home has a comparative advantage in cloth relative to Foreign when
- Autarky set. The bundles with and .
- Trade set, cloth specialization. At world prices : the bundles with and .
- Trade set, wine specialization. The bundles with and .
- Competitive output. A bundle with and full employment , such that cloth is produced () only if , and wine is produced () only if : labour works only in a sector paying the highest wage.
- Ricardo's countries. England: , , . Portugal: , , (hours of work).
Every statement of the mission is phrased in these terms.
Formalization Note Positivity of , , is stored inside the structure. Prices are not part of the structure; theorems that divide by prices assume them positive. Division by zero in Lean returns , so the trade sets are only meaningful for positive prices.
import Mathlib
namespace ComparativeAdvantage
/-- A country of the two-good (cloth, wine) one-factor Ricardian model.
`L` is its labour force, `aLC` the amount of labour required to produce one unit of cloth,
`aLW` the amount of labour required to produce one unit of wine. All three are positive. -/
structure Country where
L : ℝ
aLC : ℝ
aLW : ℝ
L_pos : 0 < L
aLC_pos : 0 < aLC
aLW_pos : 0 < aLW
/-- `h` has a comparative advantage in cloth relative to `f`: its opportunity cost of cloth in
terms of wine is lower, `aLC / aLW < a'LC / a'LW`. -/
def HasComparativeAdvantageInCloth (h f : Country) : Prop :=
h.aLC / h.aLW < f.aLC / f.aLW
/-- Autarky production (= consumption) possibilities of `c`: the bundles `(QC, QW)` of cloth
and wine with `QC, QW ≥ 0` and `aLC * QC + aLW * QW ≤ L`. -/
def autarkySet (c : Country) : Set (ℝ × ℝ) :=
{q | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ c.aLC * q.1 + c.aLW * q.2 ≤ c.L}
/-- Consumption possibilities of `c` under free trade at world prices `PC` (cloth) and `PW`
(wine) when `c` produces cloth exclusively and trades cloth for wine:
`QC, QW ≥ 0` and `aLC * QC + aLC * (PW / PC) * QW ≤ L`. -/
def tradeSetCloth (c : Country) (PC PW : ℝ) : Set (ℝ × ℝ) :=
{q | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ c.aLC * q.1 + c.aLC * (PW / PC) * q.2 ≤ c.L}
/-- Consumption possibilities of `c` under free trade at world prices `PC`, `PW` when `c`
produces wine exclusively and trades wine for cloth:
`QC, QW ≥ 0` and `aLW * (PC / PW) * QC + aLW * QW ≤ L`. -/
def tradeSetWine (c : Country) (PC PW : ℝ) : Set (ℝ × ℝ) :=
{q | 0 ≤ q.1 ∧ 0 ≤ q.2 ∧ c.aLW * (PC / PW) * q.1 + c.aLW * q.2 ≤ c.L}
/-- `q = (QC, QW)` is a competitive output of `c` at prices `PC`, `PW`: labour is fully
employed (`aLC * QC + aLW * QW = L`, `QC, QW ≥ 0`), and labour works in a sector only if that
sector's wage (`PC / aLC` in cloth, `PW / aLW` in wine) is at least the other sector's wage. -/
def IsCompetitiveOutput (c : Country) (PC PW : ℝ) (q : ℝ × ℝ) : Prop :=
0 ≤ q.1 ∧ 0 ≤ q.2 ∧ c.aLC * q.1 + c.aLW * q.2 = c.L ∧
(0 < q.1 → PW / c.aLW ≤ PC / c.aLC) ∧ (0 < q.2 → PC / c.aLC ≤ PW / c.aLW)
/-- England in Ricardo's example: 220 hours of labour, 100 hours per unit of cloth,
120 hours per unit of wine. -/
noncomputable def england : Country where
L := 220
aLC := 100
aLW := 120
L_pos := by norm_num
aLC_pos := by norm_num
aLW_pos := by norm_num
/-- Portugal in Ricardo's example: 170 hours of labour, 90 hours per unit of cloth,
80 hours per unit of wine. -/
noncomputable def portugal : Country where
L := 170
aLC := 90
aLW := 80
L_pos := by norm_num
aLC_pos := by norm_num
aLW_pos := by norm_num
end ComparativeAdvantage
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.
The file declares, inside the namespace ComparativeAdvantage:
- a structure Country with three real fields , , and three proof fields asserting , , ; no other constraint;
- for countries , the proposition HasComparativeAdvantageInCloth , which is exactly
(real division; all denominators are positive by the structure);
- for a country , the set autarkySet of pairs with , and ;
- for a country and arbitrary reals (no sign assumption), tradeSetCloth , the pairs with , and ; if then is by Lean's convention and the condition becomes ;
- tradeSetWine , the pairs with , and (again if );
- the predicate IsCompetitiveOutput : , , , and () and (); prices are arbitrary reals here;
- two specific countries: england with and portugal with .
There are no lemmas or axioms in the file.
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.