KnapsackAuction.dpSolveList_supportedOn
theoremverifiedformalizationimported Lean
KnapsackAuction.dpSolveList_supportedOn
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in open KnapsackAuction in open scoped BigOperators in variable {I : Type*} [Fintype I] [DecidableEq I] in lemma KnapsackAuction.dpSolveList_supportedOn (w b : I → Nat) : ∀ items capacity, supportedOn items (dpSolveList w b items capacity)
- Formalizes
- EconCSLib, `KnapsackAuction.dpSolveList_supportedOn`
- 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.KnapsackAuction.dpSolveList_supportedOn← KnapsackAuction.dpSolveList_supportedOn (EconCSLib/MechanismDesign/Auction/Knapsack.lean:585): verbatim
- Verified
- 08 Oct 2026
- Axioms
Classical.choiceQuot.soundpropext- Built on 6
- KnapsackAuction.dpSolveListA computable dynamic-programming solver for finite
0/1knapsack instances. The solver processes the agents in the given list order and… - KnapsackAuction.supportedOnAn allocation is supported on a list of agents if every selected agent appears in that list.
- KnapsackAuction.BinaryAllocationA discrete knapsack allocation profile: each agent is either selected or not.
- KnapsackAuction.natBinarySocialWelfareInteger-valued welfare of a binary allocation profile.
- KnapsackAuctionA knapsack auction with public weights
w iand total capacityW. The underlying strategic object is aSingleParameterMechanism I U,… - KnapsackAuction.capacityThe total capacity bound.
- KnapsackAuction.dpSolveListA computable dynamic-programming solver for finite
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 KnapsackAuction inopen scoped BigOperators invariable {I : Type*} [Fintype I] [DecidableEq I] inlemma KnapsackAuction.dpSolveList_supportedOn (w b : I → Nat) : ∀ items capacity, supportedOn items (dpSolveList w b items capacity) := by intro items induction items with | nil => intro capacity i hi simp [dpSolveList] at hi | cons i items ih => intro capacity by_cases hwi : w i ≤ capacity · let skip := dpSolveList w b items capacity let takeTail := dpSolveList w b items (capacity - w i) let take := Function.update takeTail i true by_cases hchoose : natBinarySocialWelfare b take ≥ natBinarySocialWelfare b skip · simp [dpSolveList, hwi, skip, takeTail, take, hchoose] intro j hj by_cases hji : j = i · subst hji simp · exact List.mem_cons.2 (.inr (ih (capacity - w i) j (by simpa [take, Function.update, hji] using hj))) · simp [dpSolveList, hwi, skip, takeTail, take, hchoose] intro j hj exact List.mem_cons.2 (.inr (ih capacity j hj)) · intro j hj have hj' : dpSolveList w b items capacity j = true := by simpa [dpSolveList, hwi] using hj exact List.mem_cons.2 (.inr ((ih capacity) j hj'))