AFTD Auto-Formalizing Theoretical Domains

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.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 6

Lean source view module on GitHub

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'))
See it in the graphDiscuss this resultChallenge it