AFTD Auto-Formalizing Theoretical Domains

GS.pref_list_mem

theoremverifiedformalizationimported Lean

Every element of Fin n appears in a full-permutation list.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
open List Finset in
lemma GS.pref_list_mem {n : ℕ} (l : List (Fin n)) (hnd : l.Nodup) (hlen : l.length = n)
    (x : Fin n) : x ∈ l
Formalizes
EconCSLib, `GS.pref_list_mem`
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.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Used by 13
  • holdinv_stepHoldInv is preserved by one DA step. Proof structure: case-analyze on the pair (s.holding p, bestNew p) that drives daStep's…
  • not_free_of_nc_genextChoice i ≥ n + injectivity + JInv → man i is not free.
  • GS.daStep_NoAchievableRejectionInductive step (KEY LEMMA). NoAchievableRejection is preserved by one daStep. Also threads HoldInv (for the old-holder index…
  • GS.joinWoman_injectiveThe join woman-assignment is injective.
  • rsinv_stabilityIf j strictly prefers i over his final partner, i's final partner has rank ≤ j.
  • GS.opposed_preferencesOpposed preferences. Let μ be a stable matching. If man j is matched to woman wj under another matching ν and **strictly…
  • GS.meetMan_worse_leftGS.meetMan_worse_left
  • GS.joinWoman_worse_leftIf i is the join-partner of her μ-man j, then i weakly prefers her ν-man to j (so j is her worse man).
  • GS.opposed_preferences_womenDual of opposed_preferences: if woman i strictly prefers man mi to her candidate-man mi', then mi strictly prefers his…
  • GS.StableMatching.instPartialOrderMen-preference order: μ ≤ ν iff every man weakly prefers his ν-partner to his μ-partner (smaller idxOf = more preferred).
  • galeShapley_isStableGale-Shapley stability: the DA output has no blocking pair. The statement is in the *market* frame (IsBlocking … (i : M) (j : W)).…
  • 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…
  • GS.meetMan_injectiveGS.meetMan_injective

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true inopen List Finset in/-- Every element of `Fin n` appears in a full-permutation list. -/lemma GS.pref_list_mem {n : ℕ} (l : List (Fin n)) (hnd : l.Nodup) (hlen : l.length = n)    (x : Fin n) : x ∈ l := by  rw [← List.mem_toFinset]  exact (Finset.eq_univ_of_card _ (by rw [List.toFinset_card_of_nodup hnd, hlen,    Fintype.card_fin])).symm ▸ Finset.mem_univ _
See it in the graphDiscuss this resultChallenge it