gs_injective
theoremverifiedformalizationimported Lean
gs w m is injective.
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_injective : Function.Injective (gs w m)
- Formalizes
- EconCSLib, `gs_injective`
- 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_injective← gs_injective (EconCSLib/MarketDesign/Matching/GaleShapley.lean:1031): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 6
- final_holding_injective
finalStateholding is injective. - final_all_women_holdAt termination, every woman holds some man.
- 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.DAStateDA state: per-man proposal cursor + per-woman tentative hold.
- GS.finalState
finalState: rundaRunwith fueln*n + 1frominitState.
- final_holding_injective
- Used by 1
- gs_bijective
gs w mis a bijection onFin n.
- gs_bijective
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 List Finset inopen GS invariable {n : ℕ} [NeZero n] invariable (w m : Preferences n) in/-- `gs w m` is injective. -/lemma gs_injective : Function.Injective (gs w m) := by intro j1 j2 heq simp only [gs] at heq obtain ⟨i1, hi1⟩ := final_all_women_hold w m j1 obtain ⟨i2, hi2⟩ := final_all_women_hold w m j2 simp [hi1, hi2] at heq; subst heq exact final_holding_injective w m j1 j2 i1 hi1 hi2