gs_bijective
theoremverifiedformalizationimported Lean
gs w m is a bijection on Fin n.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open List Finset in open GS in variable {n : ℕ} [NeZero n] in variable (w m : Preferences n) in lemma gs_bijective : Function.Bijective (gs w m)
- Formalizes
- EconCSLib, `gs_bijective`
- 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_bijective← gs_bijective (EconCSLib/MarketDesign/Matching/GaleShapley.lean:1040): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 3
- gs_injective
gs w mis injective. - GS.PreferencesList-based preferences:
prefs iis a full permutation ofFin n, ordered from most to least preferred. - GS.gsThe Gale-Shapley function: woman
j's partner at termination.
- gs_injective
- Used by 5
- GS.StableMatching.gsStable_greatestThe GS output is the greatest stable matching in the men-preference order: every man weakly prefers his GS partner to his partner in…
- GS.StableMatching.gsStableThe men-proposing Gale–Shapley output, as an element of the lattice of stable matchings.
- galeShapley_isStableGale-Shapley stability: the DA output has no blocking pair. The statement is in the *market* frame (
IsBlocking … (i : M) (j : W)).… - GS.gs_partner_isAchievableThe GS output itself witnesses that
gs.symm jis achievable forj. - GS.galeShapley_isProposingOptimalMen-optimal stable matching (Gale–Shapley 1962, [MSZ 22.10]): in the men-proposing DA, every man's GS partner is at least as preferred…
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open List Finset in open GS in variable {n : ℕ} [NeZero n] in variable (w m : Preferences n) in /-- `gs w m` is a bijection on `Fin n`. -/ lemma gs_bijective : Function.Bijective (gs w m) := Finite.injective_iff_bijective.mp (gs_injective w m)