GS.opposed_preferences
theoremverifiedformalizationimported Lean
Opposed preferences. Let μ be a stable matching. If man j is matched to woman wj under another matching ν and strictly prefers wj to his μ-partner wj', then wj strictly prefers her μ-partner m' to j. Intuition: the two sides' interests are opposed across stable matchings — when a man trades up, the woman he gains trades down. Proof: otherwise (wj, j) would be a blocking pair for μ (he prefers her to his μ-partner by hypothesis; she would prefer him to her μ-partner m'), contradicting stability. Only μ need be stable.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open GS in variable {n : ℕ} (w m : Preferences n) in theorem GS.opposed_preferences (μ : Matching (Fin n) (Fin n)) (hμ : Matching.IsStable (MatchingMarket.ofEquivData w m) μ) {j wj wj' m' : Fin n} (hμ_j : μ.matchW j = some wj') (hpref : (m.prefs j).idxOf wj < (m.prefs j).idxOf wj') (hμ_w : μ.matchM wj = some m') : (w.prefs wj).idxOf m' < (w.prefs wj).idxOf j
- Formalizes
- EconCSLib, `GS.opposed_preferences`
- 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.opposed_preferences← GS.opposed_preferences (EconCSLib/MarketDesign/Matching/Lattice.lean:47): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 9
- Matching.IsStableA matching is stable if it has no blocking pair. [MSZ 22.5]
- 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… - instCoeFunPrefForallForallPropinstCoeFunPrefForallForallProp
- 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… - MatchingMarket.ofEquivDataBuild a
MatchingMarket (Fin n) (Fin n)from list-based preference data.some j ≻ some kiffjappears earlier in the list;noneis… - GS.pref_list_memEvery element of
Fin nappears in a full-permutation list. - PrefA bundled weak preference relation. Use this interface when several agents may rank the same outcome type differently. Use…
- Used by 2
- GS.joinWoman_worse_rightDual of
joinWoman_worse_leftwith the roles ofμ,νswapped. - GS.joinWoman_worse_leftIf
iis the join-partner of herμ-manj, theniweakly prefers herν-man toj(sojis her worse man).
- GS.joinWoman_worse_rightDual of
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) in/-- **Opposed preferences.** Let `μ` be a stable matching. If man `j` is matched to woman `wj` under another matching `ν` and **strictly prefers** `wj` to his `μ`-partner `wj'`, then `wj` strictly prefers her `μ`-partner `m'` to `j`. Intuition: the two sides' interests are opposed across stable matchings — when a man trades up, the woman he gains trades down. Proof: otherwise `(wj, j)` would be a blocking pair for `μ` (he prefers her to his `μ`-partner by hypothesis; she would prefer him to her `μ`-partner `m'`), contradicting stability. Only `μ` need be stable. -/theorem GS.opposed_preferences (μ : Matching (Fin n) (Fin n)) (hμ : Matching.IsStable (MatchingMarket.ofEquivData w m) μ) {j wj wj' m' : Fin n} (hμ_j : μ.matchW j = some wj') (hpref : (m.prefs j).idxOf wj < (m.prefs j).idxOf wj') (hμ_w : μ.matchM wj = some m') : (w.prefs wj).idxOf m' < (w.prefs wj).idxOf j := by -- `wj ≠ wj'` since `j` strictly prefers `wj` over `wj'`. have hwj_ne : wj ≠ wj' := by intro he; rw [he] at hpref; exact (lt_irrefl _ hpref) -- `j ≠ m'`: else `μ` would match `wj` to `j`, contradicting `μ.matchW j = some wj'`. have hj_ne : j ≠ m' := by intro he; subst he have : μ.matchW j = some wj := (μ.consistent wj j).mp hμ_w rw [hμ_j] at this exact hwj_ne (Option.some.inj this).symm -- Suppose `wj` does NOT strictly prefer `m'` to `j`; derive a blocking pair. by_contra hle push_neg at hle -- (w.prefs wj).idxOf j ≤ (w.prefs wj).idxOf m' -- `wj` then strictly prefers `j` to `m'` (strictness from `j ≠ m'`). have hlt : (w.prefs wj).idxOf j < (w.prefs wj).idxOf m' := by refine lt_of_le_of_ne hle (fun e => hj_ne ?_) exact (List.idxOf_inj (pref_list_mem _ (w.valid wj).1 (w.valid wj).2 j)).mp e -- `(wj, j)` blocks `μ`. exact hμ wj j ⟨by rw [hμ_w]; exact ⟨by show (w.prefs wj).idxOf j ≤ (w.prefs wj).idxOf m'; omega, by show ¬ (w.prefs wj).idxOf m' ≤ (w.prefs wj).idxOf j; omega⟩, by rw [hμ_j]; exact ⟨by show (m.prefs j).idxOf wj ≤ (m.prefs j).idxOf wj'; omega, by show ¬ (m.prefs j).idxOf wj' ≤ (m.prefs j).idxOf wj; omega⟩⟩