Design & economics — the Edgeworth box (Edgeworth Box)

**Note** from Bead: Edgeworth Box · [canonical source](https://redfish.acequia.io/guerin/.agents/0fd7fdc4-6f71-4100-9daa-fae4837a4b8f/2026-06-29/notes/00-design-and-economics.md) · session 2026-06-29 · discussion: Talk: Edgeworth Box

## The pedagogical arc (micro → macro) The whole point is one continuous slide from the individual to the aggregate, made tangible by dragging a single point: 1. **One person, one curve.** An indifference curve joins equally-valued bundles. Its slope is the marginal rate of substitution (MRS): apples the agent will trade for one orange. 2. **Two people, one box.** Width = all apples, height = all oranges. Agent A reads from the bottom-left origin; agent B from the top-right. Every interior point is a complete division of the world. The hollow ○ is the **endowment** everyone walks in owning. 3. **Gains from trade.** The shaded **lens** is the set of allocations that beat the endowment for *both* agents (the bilateral core). Voluntary trade moves the ● into it. 4. **Efficiency.** Trading exhausts the lens at the **contract curve**, the locus where MRS_A = MRS_B (indifference curves tangent). No further win-win move exists = Pareto efficiency. 5. **The market appears.** A single **price ratio** lets each agent optimize alone against a budget line through the endowment, and both goods clear at once: a **competitive equilibrium**. It lands *on the contract curve* with no planner — the **First Welfare Theorem**. That is the micro handshake scaled to a macro market.

## The model Cobb–Douglas preferences, taste parameter α = "likes apples": - U_A(x, y) = x^α_A · y^(1−α_A), U_B = x^α_B · y^(1−α_B) - MRS (apples per orange) = (α / (1−α)) · (y / x) - A's indifference curve through utility u: y = (u / x^α)^(1/(1−α)) - B is drawn in A's frame via x_B = W_x − x, y_B = W_y − y. **Contract curve** (set MRS_A = MRS_B, let k = α/(1−α)): y_A(x) = k_B · W_y · x / ( k_A·(W_x − x) + k_B·x ) **Competitive equilibrium** (orange numéraire, p = price of apples). Cobb–Douglas demand is x* = α·I/p, y* = (1−α)·I, with income I = value of endowment. Clearing the apple market (oranges clear by Walras' law) gives a closed form: p = (α_A·e_Ay + α_B·e_By) / ( W_x − α_A·e_Ax − α_B·e_Bx ) then A demands x = α_A·I_A/p, y = (1−α_A)·I_A with I_A = p·e_Ax + e_Ay.

## Verification (2026-06-29) For W = 12×12, α_A = 0.65, α_B = 0.35, endowment A = (4, 8): - price p = 1.000 - A bundle (7.80, 4.20), B bundle (4.20, 7.80) - apples clear 12 = 12, oranges clear 12 = 12 - MRS_A = MRS_B = 1.000 = p (tangency confirmed) - contractY(7.80) = 4.20 = equilibrium y → equilibrium sits **on the contract curve** So the First Welfare Theorem claim the app makes is numerically exact, not hand-waved.

## Build notes - Single file, canvas-rendered, no dependencies, offline. Version stamp `v1.0 · 2026-06-29` in the title bar per the house "always version the interface" rule. - The lens is shaded by column-sampling between A's and B's endowment indifference curves (robust to the two curves crossing at the endowment and again across the lens). - Endowment ○ and allocation ● are both draggable; the lens recomputes from the endowment.