Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Rural hospitals theorem, one-position case: unmatched doctors

Proved
RuralHospitals.one_to_one_unmatched_doctor

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 doctor d∈Dd\in Dd∈D,

d is unmatched in A  ⟹  d is unmatched in B.d \text{ is unmatched in } A \implies d \text{ is unmatched in } B.d is unmatched in A⟹d is unmatched in B.

This is the doctor half of Part 1 of the rural hospitals theorem in the special case of one position per hospital (the stable marriage setting with unequal sides), first proved by McVitie and 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_doctor {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 ν) (d : D) (hd : μ d = none) :
    ν d = none := 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": "Hence, if d0 is unmatched in A, he must be unmatched in B too." Primary reference: D. G. McVitie, L. B. Wilson, Stable marriage assignment for unequal sets, 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