AFTD Auto-Formalizing Theoretical Domains

KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest

theoremverifiedformalizationimported Lean

KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest

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] [LinearOrder I] [Nonempty I] in
lemma KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest
    (w b : I → Nat) (capacity : Nat) (hwpos : ∀ i, 0 < w i) :
    natFractionalGreedyValue w b capacity ≤
      integralGreedyValue w b capacity + highestBidValue b
Formalizes
EconCSLib, `KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest`
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 18

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] [LinearOrder I] [Nonempty I] inlemma KnapsackAuction.natFractionalGreedyValue_le_integralGreedyValue_plus_highest    (w b : I → Nat) (capacity : Nat) (hwpos : ∀ i, 0 < w i) :    natFractionalGreedyValue w b capacity ≤      integralGreedyValue w b capacity + highestBidValue b := by  classical  have hnodup :      ((natAuctionData w capacity).sortedAgentsByRatio (realBidOfNat b)).Nodup := by    simpa [sortedAgentsByRatio] using      ((List.nodup_mergeSort          (l := (Finset.univ : Finset I).toList)          (le := fun i j =>            decide              ((natAuctionData w capacity).ratioTieKey (realBidOfNat b) i ≤                (natAuctionData w capacity).ratioTieKey (realBidOfNat b) j))).2        (by simpa using (Finset.nodup_toList (s := (Finset.univ : Finset I)))))  simpa [natFractionalGreedyValue, natFractionalGreedyAllocation,    integralGreedyValue, integralGreedyAllocation] using    (natFractionalGreedyList_le_integralGreedyList_plus_highest      (w := w) (b := b) hwpos hnodup capacity)
See it in the graphDiscuss this resultChallenge it