GS.stableMeet_isStable
theoremverifiedformalizationimported Lean
The meet of two stable matchings is stable.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open GS in variable {n : ℕ} (w m : Preferences n) in variable {w m} in variable (μ ν : Matching (Fin n) (Fin n)) (hμ : Matching.IsStable (MatchingMarket.ofEquivData w m) μ) (hν : Matching.IsStable (MatchingMarket.ofEquivData w m) ν) in theorem GS.stableMeet_isStable : Matching.IsStable (MatchingMarket.ofEquivData w m) (stableMeet μ ν hμ hν)
- Formalizes
- EconCSLib, `GS.stableMeet_isStable`
- Lean proof
- By xbei (from the file's git history), from github.com/gametheoryinlean/EconCSLib at
1a88f809b538(Copyright (c) 2026 EconCSLib contributors. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.30.0.GS.stableMeet_isStable← GS.stableMeet_isStable (EconCSLib/MarketDesign/Matching/Lattice.lean:443): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 23
- GS.mPartnerThe man partnered to woman
iunder a stable matchingμ. - Matching.IsStableA matching is stable if it has no blocking pair. [MSZ 22.5]
- GS.prefM_strictGS.prefM_strict
- GS.stableMeetThe meet
μ ∧ ν: each woman keeps her more-preferred man; each man keeps his less-preferred woman. - GS.stableMeet_matchMGS.stableMeet_matchM
- Matching.IsBlockingA pair
(m, w)is a blocking pair for matchingμif bothmandwstrictly prefer each other to their current partners. [MSZ 22.5] - GS.stableMeet_matchWGS.stableMeet_matchW
- strictStrict preference derived from a weak preference relation.
- MatchingA matching is a partial bijection between
MandW.matchM iis the partner ofi ∈ M(ornoneif unmatched).matchW jis the… - GS.meetMan_le_leftGS.meetMan_le_left
- GS.matchM_mPartnerGS.matchM_mPartner
- instCoeFunPrefForallForallPropinstCoeFunPrefForallForallProp
- GS.meetMan_mem_womenGS.meetMan_mem_women
- GS.matchW_wPartnerGS.matchW_wPartner
- GS.meetManWoman
i's more-preferred man acrossμandν. - GS.wPartnerThe woman partnered to man
junder a stable matchingμ(total, since a stable matching of the balanced market is perfect). - GS.PreferencesList-based preferences:
prefs iis a full permutation ofFin n, ordered from most to least preferred. - MatchingMarketA two-sided matching market.
MandWare the two sides (e.g., men and women, hospitals and residents). Each agent has a preference… - GS.meetEquivThe meet man-assignment packaged as an equivalence.
- MatchingMarket.ofEquivDataBuild a
MatchingMarket (Fin n) (Fin n)from list-based preference data.some j ≻ some kiffjappears earlier in the list;noneis… - GS.meetMan_le_rightGS.meetMan_le_right
- GS.prefW_strictGS.prefW_strict
- PrefA bundled weak preference relation. Use this interface when several agents may rank the same outcome type differently. Use…
- GS.mPartnerThe man partnered to woman
- Used by 2
- GS.wPartner_stableMeetGS.wPartner_stableMeet
- GS.StableMatching.instLatticeConway–Knuth lattice. The stable matchings of a one-to-one market form a lattice under the men-preference order: the join gives every…
Lean source view module on GitHub
Choose a tactic — a marked line — to see the goals Lean had before and after it, as in Lean’s infoview. Step with ← → or j k.
set_option autoImplicit true inset_option relaxedAutoImplicit true inopen GS invariable {n : ℕ} (w m : Preferences n) invariable {w m} invariable (μ ν : Matching (Fin n) (Fin n)) (hμ : Matching.IsStable (MatchingMarket.ofEquivData w m) μ) (hν : Matching.IsStable (MatchingMarket.ofEquivData w m) ν) in/-- The meet of two stable matchings is stable. -/theorem GS.stableMeet_isStable : Matching.IsStable (MatchingMarket.ofEquivData w m) (stableMeet μ ν hμ hν) := by intro i j hblock obtain ⟨hi, hj⟩ := hblock rw [stableMeet_matchM] at hi rw [stableMeet_matchW] at hj set jw := (meetEquiv μ ν hμ hν).symm j with hjwdef have hi' : (w.prefs i).idxOf j < (w.prefs i).idxOf (meetMan μ ν hμ hν i) := prefM_strict.mp hi have hj' : (m.prefs j).idxOf i < (m.prefs j).idxOf jw := prefW_strict.mp hj have hmeet_jw : meetMan μ ν hμ hν jw = j := (meetEquiv μ ν hμ hν).apply_symm_apply j rcases meetMan_mem_women μ ν hμ hν hmeet_jw with hm | hn · -- `jw` is `j`'s `μ`-woman, so `(i, j)` blocks `μ`. refine hμ i j ⟨?_, ?_⟩ · rw [matchM_mPartner μ hμ i] exact prefM_strict.mpr (lt_of_lt_of_le hi' (meetMan_le_left μ ν hμ hν i)) · rw [matchW_wPartner μ hμ j, hm]; exact prefW_strict.mpr hj' · -- `jw` is `j`'s `ν`-woman, so `(i, j)` blocks `ν`. refine hν i j ⟨?_, ?_⟩ · rw [matchM_mPartner ν hν i] exact prefM_strict.mpr (lt_of_lt_of_le hi' (meetMan_le_right μ ν hμ hν i)) · rw [matchW_wPartner ν hν j, hn]; exact prefW_strict.mpr hj'