AFTD Auto-Formalizing Theoretical Domains

picking_prefix_state

def

The state of a picking-sequence run after its first s turns: the bundle map together with the set of already allocated items, obtained by folding picking_turn over the first s entries of the sequence with each agent's bid as her ranking.

Statement

def picking_prefix_state {N G : Type*} [DecidableEq N] [DecidableEq G] {m : ℕ}
    (seq : List N) (rank : N → Fin m ≃ G) (s : ℕ) : (N → Finset G) × Finset G
Source
step towards round_robin_item_preserving_swaps_polynomial_convergence
Verified
20 Oct 2026
Axioms
none listed
Built on 1
  • picking_turnOne turn of a picking-sequence mechanism: the active agent i receives the first good of its reported ranking l (best first) that is not…
Used by 17

Lean source view module on GitHub

/-- Prefix state (bundles, allocated set) after s turns of a picking sequence. -/
def picking_prefix_state {N G : Type*} [DecidableEq N] [DecidableEq G] {m : ℕ}
    (seq : List N) (rank : N → Fin m ≃ G) (s : ℕ) : (N → Finset G) × Finset G := (seq.take s).foldl (fun st a => picking_turn (List.ofFn ⇑(rank a)) a st) (fun _ => ∅, ∅)
See it in the graphDiscuss this resultChallenge it