order_prefix
deforiginal
Given a finite type α with decidable equality, an ordering bijection e : Fin (Fintype.card α) ≃ α, and a natural number k, order_prefix e k is the finite set of elements e(j) for all indices j : Fin (Fintype.card α) strictly less than k.
Statement
def order_prefix {α : Type*} [DecidableEq α] [Fintype α] (e : Fin (Fintype.card α) ≃ α) (k : ℕ) : Finset α
- Related work
- arXiv:2611.16207, Section 3
- Verified
- 14 Nov 2026
- Axioms
- none listed
- Used by 3
- local_no_swapFor a cooperative game v on a finite type α and an ordering bijection e : Fin (Fintype.card α) ≃ α, local_no_swap v e states that for all…
- local_no_swap_of_in_coreFor any cooperative game v on a finite type α satisfying v(∅) = 0 and any ordering bijection e : Fin (Fintype.card α) ≃ α, if the marginal…
- order_prefix_zeroFor any ordering bijection e of a finite type α, the prefix of length zero is empty: order_prefix e 0 = ∅.
Read back from the Lean
Given a type α with decidable equality and a Fintype instance, an equivalence e : Fin (Fintype.card α) ≃ α, and a natural number k, order_prefix e k is defined as the Finset α consisting of the image under e of all j : Fin (Fintype.card α) such that (j : ℕ) < k (i.e., the first k elements of α according to the enumeration e).
Written by a model that saw only the Lean, never the English above. If the two disagree, that is worth a challenge.
Lean source view module on GitHub
/-- The prefix of the first k elements of a finite type α under an ordering bijection e : Fin (Fintype.card α) ≃ α. -/ def order_prefix {α : Type*} [DecidableEq α] [Fintype α] (e : Fin (Fintype.card α) ≃ α) (k : ℕ) : Finset α := (Finset.univ.filter (fun (j : Fin (Fintype.card α)) => (j : ℕ) < k)).image e