GS.propTarget
defimported Lean
The woman man i proposes to at cursor index k (none if out of bounds).
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open List Finset in def GS.propTarget {n : ℕ} (m : Preferences n) (i : Fin n) (k : ℕ) : Option (Fin n)
- Defined in
- EconCSLib, `GS.propTarget`
- 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.propTarget← GS.propTarget (EconCSLib/MarketDesign/Matching/GaleShapley.lean:151): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 1
- GS.PreferencesList-based preferences:
prefs iis a full permutation ofFin n, ordered from most to least preferred.
- GS.PreferencesList-based preferences:
- Used by 16
- proposal_rank_boundWhen free man
jproposes to womaniindaStep, the resulting hold has rank ≤ j. - holdinv_step
HoldInvis preserved by one DA step. Proof structure: case-analyze on the pair(s.holding p, bestNew p)that drivesdaStep's… - GS.propTarget_lt
propTargetreturnssomewhenk < n. - GS.daStepOne step of standard men-proposing DA. All free men propose; women pick the best of {held, new proposers} by rank; free men advance their…
- GS.daStep_holdingOne step of DA: woman
p's new holding, expanded once. This is the workhorse rewrite for any proof that needs to case-split on what… - jinv_step
JInvis preserved by onedaStep. - pl_free_propsHelper: membership in the proposerList implies freedom and proposal target.
- GS.daStep_nc_heldGS.daStep_nc_held
- GS.daStep_nc_freeGS.daStep_nc_free
- GS.daStep_NoAchievableRejectionInductive step (KEY LEMMA).
NoAchievableRejectionis preserved by onedaStep. Also threadsHoldInv(for the old-holder index… - finalState_rank_boundAt termination: if man j proposed to woman i at some round (j was free, i was his nc-th choice at state s, and the rest of the run reaches…
- daStep_held_of_free_propFree man
iproposing to womanpmakes her held indaStep. - proposal_rank_bound_runOver a daRun, if man j proposed to woman i at the first step, woman i's final partner has rank ≤ j's rank in w.prefs i.
- holding_rank_mono_stepAfter one
daStep, womanj's held man's rank can only decrease (she only upgrades). - holding_injective_stepIn
daStep,holdingremains injective. - rsinv_stepRSInv is preserved by one daStep.
- proposal_rank_boundWhen free man
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in open List Finset in /-- The woman man `i` proposes to at cursor index `k` (none if out of bounds). -/ def GS.propTarget {n : ℕ} (m : Preferences n) (i : Fin n) (k : ℕ) : Option (Fin n) := (m.prefs i)[k]?