Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Comparative statics of supply and demand

Proved
SupplyDemand.comparative_statics

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

economicsmicroeconomicssupply-and-demand

Fix a set I⊆RI\subseteq\mathbb RI⊆R of admissible prices. Supply curves are assumed strictly increasing on III and demand curves strictly decreasing on III; all equilibrium prices are assumed to lie in III.

  1. Demand shift. If D1(p)<D2(p)D_1(p)<D_2(p)D1​(p)<D2​(p) for all p∈Ip\in Ip∈I, (p1,q1)(p_1,q_1)(p1​,q1​) is an equilibrium of (S,D1)(S,D_1)(S,D1​) and (p2,q2)(p_2,q_2)(p2​,q2​) is an equilibrium of (S,D2)(S,D_2)(S,D2​), then
p1<p2andq1<q2.p_1<p_2\quad\text{and}\quad q_1<q_2.p1​<p2​andq1​<q2​.
  1. Supply shift. If S1(p)<S2(p)S_1(p)<S_2(p)S1​(p)<S2​(p) for all p∈Ip\in Ip∈I, (p1,q1)(p_1,q_1)(p1​,q1​) is an equilibrium of (S1,D)(S_1,D)(S1​,D) and (p2,q2)(p_2,q_2)(p2​,q2​) is an equilibrium of (S2,D)(S_2,D)(S2​,D), then
p2<p1andq1<q2.p_2<p_1\quad\text{and}\quad q_1<q_2.p2​<p1​andq1​<q2​.

An increase in demand raises both equilibrium price and quantity; an increase in supply lowers the price and raises the quantity. The statements for decreases are obtained by exchanging the indices.

Formalization Note Curves are functions R→R\mathbb R\to\mathbb RR→R; the slope assumptions are imposed on an arbitrary set III of admissible prices, and all equilibrium prices are assumed to lie in III.

Preamble
import Mathlib
import Definitions.Def_SupplyDemand_Model
Formal statement
namespace SupplyDemand

theorem comparative_statics (I : Set ℝ) :
    (∀ (S D₁ D₂ : ℝ → ℝ), StrictMonoOn S I → StrictAntiOn D₁ I → StrictAntiOn D₂ I →
      (∀ p ∈ I, D₁ p < D₂ p) →
      ∀ p₁ q₁ p₂ q₂ : ℝ, p₁ ∈ I → p₂ ∈ I →
        IsEquilibrium S D₁ p₁ q₁ → IsEquilibrium S D₂ p₂ q₂ →
        p₁ < p₂ ∧ q₁ < q₂) ∧
    (∀ (S₁ S₂ D : ℝ → ℝ), StrictMonoOn S₁ I → StrictMonoOn S₂ I → StrictAntiOn D I →
      (∀ p ∈ I, S₁ p < S₂ p) →
      ∀ p₁ q₁ p₂ q₂ : ℝ, p₁ ∈ I → p₂ ∈ I →
        IsEquilibrium S₁ D p₁ q₁ → IsEquilibrium S₂ D p₂ q₂ →
        p₂ < p₁ ∧ q₁ < q₂) := by sorry

end SupplyDemand
Source
Wikipedia, "Supply and demand", revision 1378800284, https://en.wikipedia.org/w/index.php?title=Supply_and_demand&oldid=1378800284, section "Changes in market equilibrium", "Demand curve shifts", "Supply curve shifts"
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.

For every set I⊆RI\subseteq\mathbb RI⊆R the statement asserts the conjunction of two universally quantified claims.

(1) For all functions S,D1,D2:R→RS,D_1,D_2:\mathbb R\to\mathbb RS,D1​,D2​:R→R: if SSS is strictly increasing on III, D1D_1D1​ and D2D_2D2​ are strictly decreasing on III, and D1(p)<D2(p)D_1(p)<D_2(p)D1​(p)<D2​(p) for every p∈Ip\in Ip∈I, then for all reals p1,q1,p2,q2p_1,q_1,p_2,q_2p1​,q1​,p2​,q2​ with p1∈Ip_1\in Ip1​∈I, p2∈Ip_2\in Ip2​∈I, D1(p1)=q1D_1(p_1)=q_1D1​(p1​)=q1​, S(p1)=q1S(p_1)=q_1S(p1​)=q1​, D2(p2)=q2D_2(p_2)=q_2D2​(p2​)=q2​, S(p2)=q2S(p_2)=q_2S(p2​)=q2​, one has p1<p2p_1<p_2p1​<p2​ and q1<q2q_1<q_2q1​<q2​.

(2) For all functions S1,S2,D:R→RS_1,S_2,D:\mathbb R\to\mathbb RS1​,S2​,D:R→R: if S1S_1S1​ and S2S_2S2​ are strictly increasing on III, DDD is strictly decreasing on III, and S1(p)<S2(p)S_1(p)<S_2(p)S1​(p)<S2​(p) for every p∈Ip\in Ip∈I, then for all reals p1,q1,p2,q2p_1,q_1,p_2,q_2p1​,q1​,p2​,q2​ with p1,p2∈Ip_1,p_2\in Ip1​,p2​∈I, D(p1)=q1D(p_1)=q_1D(p1​)=q1​, S1(p1)=q1S_1(p_1)=q_1S1​(p1​)=q1​, D(p2)=q2D(p_2)=q_2D(p2​)=q2​, S2(p2)=q2S_2(p_2)=q_2S2​(p2​)=q2​, one has p2<p1p_2<p_1p2​<p1​ and q1<q2q_1<q_2q1​<q2​.

Existence of equilibria is neither assumed nor asserted; all inequalities are strict.

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