Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 3.2.5 — every optimal matching is increasing

Proved
Supermodularity.Matching.isIncreasing_of_optimal_of_jointlyStrictlySupermodular

by mikedeng1 · Sep 19, 2026 · Mathlib 0df444a (Lean v4.33.1)

comparative-staticsmatchingorder-theorysupermodularity

Suppose f(x,j)f(x,j)f(x,j) is strictly supermodular in the joint variable (x,j)(x,j)(x,j) on (∏i=1nXi)×{1,…,m}\bigl(\prod_{i=1}^n X_i\bigr) \times \{1,\dots,m\}(∏i=1n​Xi​)×{1,…,m} (with {1,…,m}\{1,\dots,m\}{1,…,m} ordered as a chain). Then every optimal matching is increasing (IsIncreasingMatching).

Topkis, Theorem 3.2.5 (p. 101): "If f(x,j)f(x,j)f(x,j) is strictly supermodular in (x,j)(x,j)(x,j) on ×i=1nXi×{1,…,m}\times_{i=1}^n X_i \times \{1,\dots,m\}×i=1n​Xi​×{1,…,m}, then each optimal matching is increasing." The proof first invokes Theorem 3.2.4 to get that any optimal matching is ordered, then swaps the assignments of any two firms out of order and derives a strict profit improvement from joint strict supermodularity, contradicting optimality. Combined with Theorem 3.2.3, when the labor market is also tight this shows a matching is optimal if and only if it is increasing.

Formalization Note. The hypothesis here — strict supermodularity of the joint function (x,j)↦f(x,j)(x,j)\mapsto f(x,j)(x,j)↦f(x,j) on the product lattice (∏iXi)×Fin m\bigl(\prod_i X_i\bigr)\times\mathrm{Fin}\,m(∏i​Xi​)×Finm — is strictly stronger than, and not to be confused with, Theorem 3.2.4's pair of hypotheses (joint non-strict supermodularity together with strict supermodularity in xxx alone for each fixed jjj); the two milestones keep their own hypotheses rather than one being stated as a special case of the other.

Preamble
import Mathlib
import Definitions.Def_Supermodularity_Matching_StrictlySupermodularOn
import Definitions.Def_Supermodularity_Matching_IsOptimalMatching
import Definitions.Def_Supermodularity_Matching_IsIncreasingMatching
Formal statement
namespace Supermodularity.Matching

theorem isIncreasing_of_optimal_of_jointlyStrictlySupermodular
    {n m : ℕ} {X : Fin n → Type*} [∀ i, Lattice (X i)]
    (f : (∀ i, X i) → Fin m → ℝ)
    (hf : StrictlySupermodularOn (fun p : (∀ i, X i) × Fin m => f p.1 p.2) Set.univ) :
    ∀ x : Fin m → ∀ i, X i, IsOptimalMatching f x → IsIncreasingMatching x := by sorry

end Supermodularity.Matching
Source
Topkis, Supermodularity and Complementarity, Princeton University Press, 2011, p. 101, Theorem 3.2.5
Read-back

What the Lean code literally says, in plain math · claude-opus-5

This statement concerns a family of types X0,…,Xn−1X_0, \dots, X_{n-1}X0​,…,Xn−1​ — formally X:Fin n→TypeX : \mathrm{Fin}\,n \to \mathrm{Type}X:Finn→Type — where the two natural numbers nnn and mmm and the family XXX itself are implicit arguments, inferred rather than supplied. Each member XiX_iXi​ is assumed to carry a lattice structure, and nothing more: no linearity, no distributivity, no completeness, no boundedness, no nonemptiness. Write

X  =  ∏i∈Fin nXi\mathcal{X} \;=\; \prod_{i \in \mathrm{Fin}\,n} X_iX=i∈Finn∏​Xi​

for the type of dependent tuples ppp assigning to each index iii an element pi∈Xip_i \in X_ipi​∈Xi​; this product carries the coordinatewise lattice order induced by the assumed structures, and Fin m={0,…,m−1}\mathrm{Fin}\,m = \{0,\dots,m-1\}Finm={0,…,m−1} carries its usual linear order. The two combine, through the standard product instances, into the componentwise lattice order on X×Fin m\mathcal{X} \times \mathrm{Fin}\,mX×Finm: (p,j)≤(q,k)(p, j) \le (q, k)(p,j)≤(q,k) exactly when pi≤qip_i \le q_ipi​≤qi​ for every iii and j≤kj \le kj≤k.

The data is a function

f:X→Fin m→R,f : \mathcal{X} \to \mathrm{Fin}\,m \to \mathbb{R},f:X→Finm→R,

a real-valued function of a tuple and an index. The single hypothesis hfh_fhf​ asserts that the uncurried version of fff — the map (p,j)↦f(p)(j)(p, j) \mapsto f(p)(j)(p,j)↦f(p)(j) on the product lattice X×Fin m\mathcal{X} \times \mathrm{Fin}\,mX×Finm — satisfies the predicate StrictlySupermodularOn relative to the set Set.univ\texttt{Set.univ}Set.univ, i.e. the whole ambient type, so no region of the domain is excluded. Crucially, the supermodularity condition is imposed jointly, on the single lattice X×Fin m\mathcal{X} \times \mathrm{Fin}\,mX×Finm in which the tuple coordinates and the index coordinate are treated on the same footing; it is not a condition asserted separately in each argument, nor one asserted only in the X\mathcal{X}X coordinate.

The conclusion is a universally quantified implication over

x:Fin m→X,x : \mathrm{Fin}\,m \to \mathcal{X},x:Finm→X,

that is, over all ways of assigning to each of the mmm indices jjj a tuple x(j)∈Xx(j) \in \mathcal{X}x(j)∈X. Note the argument order here is the reverse of fff's: fff consumes a tuple and then an index, whereas xxx consumes an index and returns a tuple. For every such xxx, the statement asserts: if IsOptimalMatching holds of the pair (f,x)(f, x)(f,x), then IsIncreasingMatching holds of xxx. The direction is a one-way implication, not an equivalence: nothing is claimed about increasing assignments that fail to be optimal.

Three predicates in this statement — StrictlySupermodularOn, IsOptimalMatching, and IsIncreasingMatching — are supplied by imported files whose contents are not part of the declaration, so the statement itself fixes only how they are applied, not what they mean. All that the code exhibits is their arity and the types they are fed: StrictlySupermodularOn receives a real-valued function on X×Fin m\mathcal{X} \times \mathrm{Fin}\,mX×Finm together with a subset of that type (here the universal set); IsOptimalMatching receives fff and xxx together, so its content may involve both the objective and the assignment; and IsIncreasingMatching receives xxx alone, so whatever monotonicity it expresses is a property of the assignment Fin m→X\mathrm{Fin}\,m \to \mathcal{X}Finm→X in isolation, with no reference to fff. A reader wanting the substantive content of the claim must consult those three definitions; this statement asserts the implication between them and nothing further.

In the degenerate cases the hypotheses permit: if n=0n = 0n=0, then X\mathcal{X}X is the empty product, a one-element type, so every assignment xxx is constant at its unique tuple and fff depends only on the index; if some XiX_iXi​ is an empty type and n>0n > 0n>0, then X\mathcal{X}X is empty, fff is the empty function, and — provided m>0m > 0m>0 — the type Fin m→X\mathrm{Fin}\,m \to \mathcal{X}Finm→X is empty as well, so the conclusion's universal quantifier ranges over nothing and holds vacuously. If m=0m = 0m=0, then Fin 0\mathrm{Fin}\,0Fin0 is empty, so X×Fin 0\mathcal{X} \times \mathrm{Fin}\,0X×Fin0 is empty and Set.univ\texttt{Set.univ}Set.univ on it is the empty set, making the supermodularity hypothesis a condition on an empty domain; simultaneously Fin 0→X\mathrm{Fin}\,0 \to \mathcal{X}Fin0→X has exactly one inhabitant, the empty function, so the conclusion reduces to the single claim that this empty assignment is an increasing matching whenever it is an optimal one — whatever those predicates say when handed an empty assignment. If m=0m = 0m=0 and n=0n = 0n=0 both hold, every object in sight is trivial and the statement reduces to one instance of the implication on the unique empty assignment. Since XiX_iXi​ are arbitrary lattices with no nonemptiness assumption, the hypothesis hfh_fhf​ may in these cases be satisfiable only vacuously, and the theorem correspondingly carries no content there.

Human review
  • Endorsed by Shuze Chen · Sep 28, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 28, 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