Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Rural hospitals theorem, one-position case: unmatched hospitals

Proved
RuralHospitals.one_to_one_unmatched_hospital

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

rural-hospitalsstable-matching

Consider a matching market with a finite set DDD of doctors and a finite set HHH of hospitals, in which every hospital has exactly one position and all preferences are strict. Let AAA and BBB be two stable matchings. For every hospital h∈Hh\in Hh∈H,

A(h)=∅  ⟹  B(h)=∅,A(h)=\varnothing \implies B(h)=\varnothing,A(h)=∅⟹B(h)=∅,

where A(h)A(h)A(h) denotes the set of doctors assigned to hhh in AAA. In words: a hospital unmatched in one stable matching is unmatched in every stable matching.

This is the hospital half of Part 1 of the rural hospitals theorem in the one-position special case (McVitie–Wilson 1970).

Formalization Note Uses the model RuralHospitals.Market (definition RuralHospitals_Market): finite types D (doctors) and H (hospitals); strict preferences given by injective rank functions on Option H / Option D (smaller rank = preferred, none = unmatched / empty position); responsive hospital preferences; capacities capacity : H → ℕ. An assignment is a map μ : D → Option H, and assigned μ h is the finite set of doctors placed at h.

Preamble
import Mathlib
import Definitions.Def_RuralHospitals_Market
Formal statement
namespace RuralHospitals

theorem one_to_one_unmatched_hospital {D H : Type*} [Fintype D] [Fintype H] [DecidableEq H]
    (M : Market D H) (hcap : ∀ h, M.capacity h = 1) (μ ν : Assignment D H)
    (hμ : M.IsStable μ) (hν : M.IsStable ν) (h : H) (hh : assigned μ h = ∅) :
    assigned ν h = ∅ := by sorry

end RuralHospitals
Source
Wikipedia, "Rural hospitals theorem", revision oldid=1064508418 (https://en.wikipedia.org/w/index.php?title=Rural_hospitals_theorem&oldid=1064508418), section "Proof of a special case": "The same is true for the hospitals: any hospital that is unmatched in A, must be unmatched in B too." Primary reference: McVitie–Wilson, BIT 10 (1970) 295–309, doi:10.1007/BF01934199.
Human review
  • Endorsed by Shuze Chen · Oct 11, 2026

    Confirmed by the moderator at approval.

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